@23blocks/block-conversations 3.1.0 → 3.3.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/dist/index.esm.js +304 -2
- package/dist/src/lib/conversations.block.d.ts +4 -1
- package/dist/src/lib/conversations.block.d.ts.map +1 -1
- package/dist/src/lib/mappers/group-invite.mapper.d.ts +4 -0
- package/dist/src/lib/mappers/group-invite.mapper.d.ts.map +1 -0
- package/dist/src/lib/mappers/index.d.ts +3 -0
- package/dist/src/lib/mappers/index.d.ts.map +1 -1
- package/dist/src/lib/mappers/meeting.mapper.d.ts +4 -0
- package/dist/src/lib/mappers/meeting.mapper.d.ts.map +1 -0
- package/dist/src/lib/mappers/web-notification.mapper.d.ts +4 -0
- package/dist/src/lib/mappers/web-notification.mapper.d.ts.map +1 -0
- package/dist/src/lib/services/group-invites.service.d.ts +32 -0
- package/dist/src/lib/services/group-invites.service.d.ts.map +1 -0
- package/dist/src/lib/services/index.d.ts +3 -0
- package/dist/src/lib/services/index.d.ts.map +1 -1
- package/dist/src/lib/services/meetings.service.d.ts +25 -0
- package/dist/src/lib/services/meetings.service.d.ts.map +1 -0
- package/dist/src/lib/services/web-notifications.service.d.ts +21 -0
- package/dist/src/lib/services/web-notifications.service.d.ts.map +1 -0
- package/dist/src/lib/types/group-invite.d.ts +42 -0
- package/dist/src/lib/types/group-invite.d.ts.map +1 -0
- package/dist/src/lib/types/index.d.ts +3 -0
- package/dist/src/lib/types/index.d.ts.map +1 -1
- package/dist/src/lib/types/meeting.d.ts +64 -0
- package/dist/src/lib/types/meeting.d.ts.map +1 -0
- package/dist/src/lib/types/web-notification.d.ts +54 -0
- package/dist/src/lib/types/web-notification.d.ts.map +1 -0
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -46,6 +46,15 @@ import { decodePageResult, decodeOne, decodeMany } from '@23blocks/jsonapi-codec
|
|
|
46
46
|
}
|
|
47
47
|
return undefined;
|
|
48
48
|
}
|
|
49
|
+
/**
|
|
50
|
+
* Parse a number value
|
|
51
|
+
*/ function parseNumber(value) {
|
|
52
|
+
if (value === null || value === undefined) {
|
|
53
|
+
return 0;
|
|
54
|
+
}
|
|
55
|
+
const num = Number(value);
|
|
56
|
+
return isNaN(num) ? 0 : num;
|
|
57
|
+
}
|
|
49
58
|
/**
|
|
50
59
|
* Parse an optional number value
|
|
51
60
|
*/ function parseOptionalNumber(value) {
|
|
@@ -480,6 +489,71 @@ function createGroupsService(transport, _config) {
|
|
|
480
489
|
};
|
|
481
490
|
}
|
|
482
491
|
|
|
492
|
+
const groupInviteMapper = {
|
|
493
|
+
type: 'GroupInvite',
|
|
494
|
+
map (resource, _included) {
|
|
495
|
+
var _resource_attributes;
|
|
496
|
+
const attrs = (_resource_attributes = resource.attributes) != null ? _resource_attributes : {};
|
|
497
|
+
var _parseString, _parseString1, _parseString2;
|
|
498
|
+
return {
|
|
499
|
+
id: resource.id,
|
|
500
|
+
uniqueId: (_parseString = parseString(attrs.unique_id)) != null ? _parseString : resource.id,
|
|
501
|
+
groupUniqueId: (_parseString1 = parseString(attrs.group_unique_id)) != null ? _parseString1 : '',
|
|
502
|
+
code: (_parseString2 = parseString(attrs.code)) != null ? _parseString2 : '',
|
|
503
|
+
inviterUniqueId: parseString(attrs.inviter_unique_id),
|
|
504
|
+
maxUses: attrs.max_uses != null ? parseNumber(attrs.max_uses) : undefined,
|
|
505
|
+
usesCount: attrs.uses_count != null ? parseNumber(attrs.uses_count) : undefined,
|
|
506
|
+
expiresAt: parseDate(attrs.expires_at),
|
|
507
|
+
status: parseStatus(attrs.status),
|
|
508
|
+
createdAt: parseDate(attrs.created_at),
|
|
509
|
+
updatedAt: parseDate(attrs.updated_at)
|
|
510
|
+
};
|
|
511
|
+
}
|
|
512
|
+
};
|
|
513
|
+
|
|
514
|
+
function createGroupInvitesService(transport, _config) {
|
|
515
|
+
return {
|
|
516
|
+
async list (groupUniqueId, params) {
|
|
517
|
+
const queryParams = {};
|
|
518
|
+
if (params == null ? void 0 : params.page) queryParams['page'] = String(params.page);
|
|
519
|
+
if (params == null ? void 0 : params.perPage) queryParams['records'] = String(params.perPage);
|
|
520
|
+
if (params == null ? void 0 : params.status) queryParams['status'] = params.status;
|
|
521
|
+
const response = await transport.get(`/groups/${groupUniqueId}/invites`, {
|
|
522
|
+
params: queryParams
|
|
523
|
+
});
|
|
524
|
+
return decodePageResult(response, groupInviteMapper);
|
|
525
|
+
},
|
|
526
|
+
async create (groupUniqueId, data) {
|
|
527
|
+
const response = await transport.post(`/groups/${groupUniqueId}/invites`, {
|
|
528
|
+
invite: {
|
|
529
|
+
max_uses: data == null ? void 0 : data.maxUses,
|
|
530
|
+
expires_at: data == null ? void 0 : data.expiresAt
|
|
531
|
+
}
|
|
532
|
+
});
|
|
533
|
+
return decodeOne(response, groupInviteMapper);
|
|
534
|
+
},
|
|
535
|
+
async revoke (groupUniqueId, code) {
|
|
536
|
+
await transport.delete(`/groups/${groupUniqueId}/invites/${code}`);
|
|
537
|
+
},
|
|
538
|
+
async getQRCode (groupUniqueId, code) {
|
|
539
|
+
const response = await transport.get(`/groups/${groupUniqueId}/invites/${code}/qr`);
|
|
540
|
+
// QR code endpoint typically returns the QR data directly
|
|
541
|
+
const data = response;
|
|
542
|
+
var _data_qr_code, _ref, _data_invite_url, _ref1;
|
|
543
|
+
return {
|
|
544
|
+
qrCode: (_ref = (_data_qr_code = data.qr_code) != null ? _data_qr_code : data.qrCode) != null ? _ref : '',
|
|
545
|
+
inviteUrl: (_ref1 = (_data_invite_url = data.invite_url) != null ? _data_invite_url : data.inviteUrl) != null ? _ref1 : ''
|
|
546
|
+
};
|
|
547
|
+
},
|
|
548
|
+
async join (code, data) {
|
|
549
|
+
const response = await transport.post(`/groups/join/${code}`, {
|
|
550
|
+
user_unique_id: data == null ? void 0 : data.userUniqueId
|
|
551
|
+
});
|
|
552
|
+
return decodeOne(response, groupMapper);
|
|
553
|
+
}
|
|
554
|
+
};
|
|
555
|
+
}
|
|
556
|
+
|
|
483
557
|
const notificationMapper = {
|
|
484
558
|
type: 'Notification',
|
|
485
559
|
map: (resource)=>({
|
|
@@ -1028,11 +1102,234 @@ function createUsersService(transport, _config) {
|
|
|
1028
1102
|
};
|
|
1029
1103
|
}
|
|
1030
1104
|
|
|
1105
|
+
const meetingMapper = {
|
|
1106
|
+
type: 'Meeting',
|
|
1107
|
+
map: (resource)=>({
|
|
1108
|
+
id: resource.id,
|
|
1109
|
+
uniqueId: parseString(resource.attributes['unique_id']) || resource.id,
|
|
1110
|
+
createdAt: parseDate(resource.attributes['created_at']) || new Date(),
|
|
1111
|
+
updatedAt: parseDate(resource.attributes['updated_at']) || new Date(),
|
|
1112
|
+
title: parseString(resource.attributes['title']) || '',
|
|
1113
|
+
description: parseString(resource.attributes['description']),
|
|
1114
|
+
hostUniqueId: parseString(resource.attributes['host_unique_id']) || '',
|
|
1115
|
+
conversationUniqueId: parseString(resource.attributes['conversation_unique_id']),
|
|
1116
|
+
groupUniqueId: parseString(resource.attributes['group_unique_id']),
|
|
1117
|
+
scheduledAt: parseDate(resource.attributes['scheduled_at']),
|
|
1118
|
+
startedAt: parseDate(resource.attributes['started_at']),
|
|
1119
|
+
endedAt: parseDate(resource.attributes['ended_at']),
|
|
1120
|
+
duration: parseOptionalNumber(resource.attributes['duration']),
|
|
1121
|
+
meetingType: parseString(resource.attributes['meeting_type']) || 'video',
|
|
1122
|
+
meetingUrl: parseString(resource.attributes['meeting_url']),
|
|
1123
|
+
externalMeetingId: parseString(resource.attributes['external_meeting_id']),
|
|
1124
|
+
provider: parseString(resource.attributes['provider']),
|
|
1125
|
+
maxParticipants: parseOptionalNumber(resource.attributes['max_participants']),
|
|
1126
|
+
isRecording: parseBoolean(resource.attributes['is_recording']),
|
|
1127
|
+
recordingUrl: parseString(resource.attributes['recording_url']),
|
|
1128
|
+
status: parseStatus(resource.attributes['status']),
|
|
1129
|
+
enabled: parseBoolean(resource.attributes['enabled']),
|
|
1130
|
+
payload: resource.attributes['payload']
|
|
1131
|
+
})
|
|
1132
|
+
};
|
|
1133
|
+
|
|
1134
|
+
function createMeetingsService(transport, _config) {
|
|
1135
|
+
return {
|
|
1136
|
+
async list (params) {
|
|
1137
|
+
const queryParams = {};
|
|
1138
|
+
if (params == null ? void 0 : params.page) queryParams['page'] = String(params.page);
|
|
1139
|
+
if (params == null ? void 0 : params.perPage) queryParams['records'] = String(params.perPage);
|
|
1140
|
+
if (params == null ? void 0 : params.hostUniqueId) queryParams['host_unique_id'] = params.hostUniqueId;
|
|
1141
|
+
if (params == null ? void 0 : params.conversationUniqueId) queryParams['conversation_unique_id'] = params.conversationUniqueId;
|
|
1142
|
+
if (params == null ? void 0 : params.groupUniqueId) queryParams['group_unique_id'] = params.groupUniqueId;
|
|
1143
|
+
if (params == null ? void 0 : params.status) queryParams['status'] = params.status;
|
|
1144
|
+
if (params == null ? void 0 : params.scheduledAfter) queryParams['scheduled_after'] = params.scheduledAfter;
|
|
1145
|
+
if (params == null ? void 0 : params.scheduledBefore) queryParams['scheduled_before'] = params.scheduledBefore;
|
|
1146
|
+
if (params == null ? void 0 : params.sortBy) queryParams['sort'] = params.sortOrder === 'desc' ? `-${params.sortBy}` : params.sortBy;
|
|
1147
|
+
const response = await transport.get('/meetings', {
|
|
1148
|
+
params: queryParams
|
|
1149
|
+
});
|
|
1150
|
+
return decodePageResult(response, meetingMapper);
|
|
1151
|
+
},
|
|
1152
|
+
async get (uniqueId) {
|
|
1153
|
+
const response = await transport.get(`/meetings/${uniqueId}`);
|
|
1154
|
+
return decodeOne(response, meetingMapper);
|
|
1155
|
+
},
|
|
1156
|
+
async create (data) {
|
|
1157
|
+
const response = await transport.post('/meetings', {
|
|
1158
|
+
meeting: {
|
|
1159
|
+
title: data.title,
|
|
1160
|
+
description: data.description,
|
|
1161
|
+
conversation_unique_id: data.conversationUniqueId,
|
|
1162
|
+
group_unique_id: data.groupUniqueId,
|
|
1163
|
+
scheduled_at: data.scheduledAt,
|
|
1164
|
+
meeting_type: data.meetingType,
|
|
1165
|
+
max_participants: data.maxParticipants,
|
|
1166
|
+
is_recording: data.isRecording,
|
|
1167
|
+
provider: data.provider,
|
|
1168
|
+
payload: data.payload
|
|
1169
|
+
}
|
|
1170
|
+
});
|
|
1171
|
+
return decodeOne(response, meetingMapper);
|
|
1172
|
+
},
|
|
1173
|
+
async update (uniqueId, data) {
|
|
1174
|
+
const response = await transport.put(`/meetings/${uniqueId}`, {
|
|
1175
|
+
meeting: {
|
|
1176
|
+
title: data.title,
|
|
1177
|
+
description: data.description,
|
|
1178
|
+
scheduled_at: data.scheduledAt,
|
|
1179
|
+
max_participants: data.maxParticipants,
|
|
1180
|
+
is_recording: data.isRecording,
|
|
1181
|
+
enabled: data.enabled,
|
|
1182
|
+
status: data.status,
|
|
1183
|
+
payload: data.payload
|
|
1184
|
+
}
|
|
1185
|
+
});
|
|
1186
|
+
return decodeOne(response, meetingMapper);
|
|
1187
|
+
},
|
|
1188
|
+
async delete (uniqueId) {
|
|
1189
|
+
await transport.delete(`/meetings/${uniqueId}`);
|
|
1190
|
+
},
|
|
1191
|
+
async createSession (uniqueId) {
|
|
1192
|
+
const response = await transport.post(`/meetings/${uniqueId}/session`, {});
|
|
1193
|
+
var _response_session_id, _ref, _response_token, _response_join_url, _ref1, _response_expires_at;
|
|
1194
|
+
return {
|
|
1195
|
+
sessionId: String((_ref = (_response_session_id = response.session_id) != null ? _response_session_id : response.sessionId) != null ? _ref : ''),
|
|
1196
|
+
meetingUniqueId: uniqueId,
|
|
1197
|
+
token: String((_response_token = response.token) != null ? _response_token : ''),
|
|
1198
|
+
joinUrl: String((_ref1 = (_response_join_url = response.join_url) != null ? _response_join_url : response.joinUrl) != null ? _ref1 : ''),
|
|
1199
|
+
expiresAt: new Date((_response_expires_at = response.expires_at) != null ? _response_expires_at : response.expiresAt)
|
|
1200
|
+
};
|
|
1201
|
+
},
|
|
1202
|
+
async start (uniqueId) {
|
|
1203
|
+
const response = await transport.post(`/meetings/${uniqueId}/start`, {});
|
|
1204
|
+
return decodeOne(response, meetingMapper);
|
|
1205
|
+
},
|
|
1206
|
+
async end (uniqueId) {
|
|
1207
|
+
const response = await transport.post(`/meetings/${uniqueId}/end`, {});
|
|
1208
|
+
return decodeOne(response, meetingMapper);
|
|
1209
|
+
}
|
|
1210
|
+
};
|
|
1211
|
+
}
|
|
1212
|
+
|
|
1213
|
+
function parsePriority(value) {
|
|
1214
|
+
const priority = parseString(value);
|
|
1215
|
+
if (priority === 'low' || priority === 'normal' || priority === 'high' || priority === 'urgent') {
|
|
1216
|
+
return priority;
|
|
1217
|
+
}
|
|
1218
|
+
return 'normal';
|
|
1219
|
+
}
|
|
1220
|
+
const webNotificationMapper = {
|
|
1221
|
+
type: 'WebNotification',
|
|
1222
|
+
map: (resource)=>({
|
|
1223
|
+
id: resource.id,
|
|
1224
|
+
uniqueId: parseString(resource.attributes['unique_id']) || resource.id,
|
|
1225
|
+
createdAt: parseDate(resource.attributes['created_at']) || new Date(),
|
|
1226
|
+
updatedAt: parseDate(resource.attributes['updated_at']) || new Date(),
|
|
1227
|
+
recipientUniqueId: parseString(resource.attributes['recipient_unique_id']) || '',
|
|
1228
|
+
title: parseString(resource.attributes['title']) || '',
|
|
1229
|
+
body: parseString(resource.attributes['body']) || '',
|
|
1230
|
+
icon: parseString(resource.attributes['icon']),
|
|
1231
|
+
imageUrl: parseString(resource.attributes['image_url']),
|
|
1232
|
+
actionUrl: parseString(resource.attributes['action_url']),
|
|
1233
|
+
notificationType: parseString(resource.attributes['notification_type']) || 'general',
|
|
1234
|
+
priority: parsePriority(resource.attributes['priority']),
|
|
1235
|
+
sentAt: parseDate(resource.attributes['sent_at']),
|
|
1236
|
+
readAt: parseDate(resource.attributes['read_at']),
|
|
1237
|
+
clickedAt: parseDate(resource.attributes['clicked_at']),
|
|
1238
|
+
status: parseStatus(resource.attributes['status']),
|
|
1239
|
+
enabled: parseBoolean(resource.attributes['enabled']),
|
|
1240
|
+
payload: resource.attributes['payload'],
|
|
1241
|
+
tags: parseStringArray(resource.attributes['tags'])
|
|
1242
|
+
})
|
|
1243
|
+
};
|
|
1244
|
+
|
|
1245
|
+
function createWebNotificationsService(transport, _config) {
|
|
1246
|
+
return {
|
|
1247
|
+
async list (params) {
|
|
1248
|
+
const queryParams = {};
|
|
1249
|
+
if (params == null ? void 0 : params.page) queryParams['page'] = String(params.page);
|
|
1250
|
+
if (params == null ? void 0 : params.perPage) queryParams['records'] = String(params.perPage);
|
|
1251
|
+
if (params == null ? void 0 : params.recipientUniqueId) queryParams['recipient_unique_id'] = params.recipientUniqueId;
|
|
1252
|
+
if (params == null ? void 0 : params.notificationType) queryParams['notification_type'] = params.notificationType;
|
|
1253
|
+
if (params == null ? void 0 : params.priority) queryParams['priority'] = params.priority;
|
|
1254
|
+
if ((params == null ? void 0 : params.isRead) !== undefined) queryParams['is_read'] = String(params.isRead);
|
|
1255
|
+
if (params == null ? void 0 : params.status) queryParams['status'] = params.status;
|
|
1256
|
+
if (params == null ? void 0 : params.sortBy) queryParams['sort'] = params.sortOrder === 'desc' ? `-${params.sortBy}` : params.sortBy;
|
|
1257
|
+
const response = await transport.get('/web_notifications', {
|
|
1258
|
+
params: queryParams
|
|
1259
|
+
});
|
|
1260
|
+
return decodePageResult(response, webNotificationMapper);
|
|
1261
|
+
},
|
|
1262
|
+
async get (uniqueId) {
|
|
1263
|
+
const response = await transport.get(`/web_notifications/${uniqueId}`);
|
|
1264
|
+
return decodeOne(response, webNotificationMapper);
|
|
1265
|
+
},
|
|
1266
|
+
async send (data) {
|
|
1267
|
+
const response = await transport.post('/web_notifications', {
|
|
1268
|
+
web_notification: {
|
|
1269
|
+
recipient_unique_id: data.recipientUniqueId,
|
|
1270
|
+
title: data.title,
|
|
1271
|
+
body: data.body,
|
|
1272
|
+
icon: data.icon,
|
|
1273
|
+
image_url: data.imageUrl,
|
|
1274
|
+
action_url: data.actionUrl,
|
|
1275
|
+
notification_type: data.notificationType,
|
|
1276
|
+
priority: data.priority,
|
|
1277
|
+
payload: data.payload,
|
|
1278
|
+
tags: data.tags
|
|
1279
|
+
}
|
|
1280
|
+
});
|
|
1281
|
+
return decodeOne(response, webNotificationMapper);
|
|
1282
|
+
},
|
|
1283
|
+
async sendBulk (data) {
|
|
1284
|
+
const response = await transport.post('/web_notifications/bulk', {
|
|
1285
|
+
web_notification: {
|
|
1286
|
+
recipient_unique_ids: data.recipientUniqueIds,
|
|
1287
|
+
title: data.title,
|
|
1288
|
+
body: data.body,
|
|
1289
|
+
icon: data.icon,
|
|
1290
|
+
image_url: data.imageUrl,
|
|
1291
|
+
action_url: data.actionUrl,
|
|
1292
|
+
notification_type: data.notificationType,
|
|
1293
|
+
priority: data.priority,
|
|
1294
|
+
payload: data.payload,
|
|
1295
|
+
tags: data.tags
|
|
1296
|
+
}
|
|
1297
|
+
});
|
|
1298
|
+
var _response_sent, _response_failed;
|
|
1299
|
+
return {
|
|
1300
|
+
sent: Number((_response_sent = response.sent) != null ? _response_sent : 0),
|
|
1301
|
+
failed: Number((_response_failed = response.failed) != null ? _response_failed : 0)
|
|
1302
|
+
};
|
|
1303
|
+
},
|
|
1304
|
+
async markAsRead (uniqueId) {
|
|
1305
|
+
const response = await transport.put(`/web_notifications/${uniqueId}/read`, {});
|
|
1306
|
+
return decodeOne(response, webNotificationMapper);
|
|
1307
|
+
},
|
|
1308
|
+
async markAsClicked (uniqueId) {
|
|
1309
|
+
const response = await transport.put(`/web_notifications/${uniqueId}/click`, {});
|
|
1310
|
+
return decodeOne(response, webNotificationMapper);
|
|
1311
|
+
},
|
|
1312
|
+
async markAllAsRead (recipientUniqueId) {
|
|
1313
|
+
const response = await transport.put('/web_notifications/read_all', {
|
|
1314
|
+
recipient_unique_id: recipientUniqueId
|
|
1315
|
+
});
|
|
1316
|
+
var _response_updated;
|
|
1317
|
+
return {
|
|
1318
|
+
updated: Number((_response_updated = response.updated) != null ? _response_updated : 0)
|
|
1319
|
+
};
|
|
1320
|
+
},
|
|
1321
|
+
async delete (uniqueId) {
|
|
1322
|
+
await transport.delete(`/web_notifications/${uniqueId}`);
|
|
1323
|
+
}
|
|
1324
|
+
};
|
|
1325
|
+
}
|
|
1326
|
+
|
|
1031
1327
|
function createConversationsBlock(transport, config) {
|
|
1032
1328
|
return {
|
|
1033
1329
|
messages: createMessagesService(transport),
|
|
1034
1330
|
draftMessages: createDraftMessagesService(transport),
|
|
1035
1331
|
groups: createGroupsService(transport),
|
|
1332
|
+
groupInvites: createGroupInvitesService(transport),
|
|
1036
1333
|
notifications: createNotificationsService(transport),
|
|
1037
1334
|
conversations: createConversationsService(transport),
|
|
1038
1335
|
websocketTokens: createWebSocketTokensService(transport),
|
|
@@ -1041,7 +1338,9 @@ function createConversationsBlock(transport, config) {
|
|
|
1041
1338
|
availabilities: createAvailabilitiesService(transport),
|
|
1042
1339
|
messageFiles: createMessageFilesService(transport),
|
|
1043
1340
|
sources: createSourcesService(transport),
|
|
1044
|
-
users: createUsersService(transport)
|
|
1341
|
+
users: createUsersService(transport),
|
|
1342
|
+
meetings: createMeetingsService(transport),
|
|
1343
|
+
webNotifications: createWebNotificationsService(transport)
|
|
1045
1344
|
};
|
|
1046
1345
|
}
|
|
1047
1346
|
const conversationsBlockMetadata = {
|
|
@@ -1052,12 +1351,15 @@ const conversationsBlockMetadata = {
|
|
|
1052
1351
|
'Message',
|
|
1053
1352
|
'DraftMessage',
|
|
1054
1353
|
'Group',
|
|
1354
|
+
'GroupInvite',
|
|
1055
1355
|
'Notification',
|
|
1056
1356
|
'Conversation',
|
|
1057
1357
|
'Context',
|
|
1058
1358
|
'MessageFile',
|
|
1059
1359
|
'Source',
|
|
1060
|
-
'User'
|
|
1360
|
+
'User',
|
|
1361
|
+
'Meeting',
|
|
1362
|
+
'WebNotification'
|
|
1061
1363
|
]
|
|
1062
1364
|
};
|
|
1063
1365
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Transport, BlockConfig, BlockMetadata } from '@23blocks/contracts';
|
|
2
|
-
import { type MessagesService, type DraftMessagesService, type GroupsService, type NotificationsService, type ConversationsService, type WebSocketTokensService, type ContextsService, type NotificationSettingsService, type AvailabilitiesService, type MessageFilesService, type SourcesService, type UsersService } from './services';
|
|
2
|
+
import { type MessagesService, type DraftMessagesService, type GroupsService, type GroupInvitesService, type NotificationsService, type ConversationsService, type WebSocketTokensService, type ContextsService, type NotificationSettingsService, type AvailabilitiesService, type MessageFilesService, type SourcesService, type UsersService, type MeetingsService, type WebNotificationsService } from './services';
|
|
3
3
|
export interface ConversationsBlockConfig extends BlockConfig {
|
|
4
4
|
appId: string;
|
|
5
5
|
tenantId?: string;
|
|
@@ -8,6 +8,7 @@ export interface ConversationsBlock {
|
|
|
8
8
|
messages: MessagesService;
|
|
9
9
|
draftMessages: DraftMessagesService;
|
|
10
10
|
groups: GroupsService;
|
|
11
|
+
groupInvites: GroupInvitesService;
|
|
11
12
|
notifications: NotificationsService;
|
|
12
13
|
conversations: ConversationsService;
|
|
13
14
|
websocketTokens: WebSocketTokensService;
|
|
@@ -17,6 +18,8 @@ export interface ConversationsBlock {
|
|
|
17
18
|
messageFiles: MessageFilesService;
|
|
18
19
|
sources: SourcesService;
|
|
19
20
|
users: UsersService;
|
|
21
|
+
meetings: MeetingsService;
|
|
22
|
+
webNotifications: WebNotificationsService;
|
|
20
23
|
}
|
|
21
24
|
export declare function createConversationsBlock(transport: Transport, config: ConversationsBlockConfig): ConversationsBlock;
|
|
22
25
|
export declare const conversationsBlockMetadata: BlockMetadata;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"conversations.block.d.ts","sourceRoot":"","sources":["../../../src/lib/conversations.block.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACjF,OAAO,
|
|
1
|
+
{"version":3,"file":"conversations.block.d.ts","sourceRoot":"","sources":["../../../src/lib/conversations.block.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EA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","sources":["../../../../src/lib/mappers/group-invite.mapper.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAgC,MAAM,yBAAyB,CAAC;AAC5F,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAGzD,eAAO,MAAM,iBAAiB,EAAE,cAAc,CAAC,WAAW,CAkBzD,CAAC"}
|
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
export * from './message.mapper';
|
|
2
2
|
export * from './draft-message.mapper';
|
|
3
3
|
export * from './group.mapper';
|
|
4
|
+
export * from './group-invite.mapper';
|
|
4
5
|
export * from './notification.mapper';
|
|
5
6
|
export * from './context.mapper';
|
|
6
7
|
export * from './message-file.mapper';
|
|
7
8
|
export * from './source.mapper';
|
|
8
9
|
export * from './user.mapper';
|
|
10
|
+
export * from './meeting.mapper';
|
|
11
|
+
export * from './web-notification.mapper';
|
|
9
12
|
export * from './utils';
|
|
10
13
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/lib/mappers/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,cAAc,wBAAwB,CAAC;AACvC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,uBAAuB,CAAC;AACtC,cAAc,kBAAkB,CAAC;AACjC,cAAc,uBAAuB,CAAC;AACtC,cAAc,iBAAiB,CAAC;AAChC,cAAc,eAAe,CAAC;AAC9B,cAAc,SAAS,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/lib/mappers/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,cAAc,wBAAwB,CAAC;AACvC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC;AACtC,cAAc,kBAAkB,CAAC;AACjC,cAAc,uBAAuB,CAAC;AACtC,cAAc,iBAAiB,CAAC;AAChC,cAAc,eAAe,CAAC;AAC9B,cAAc,kBAAkB,CAAC;AACjC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,SAAS,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"meeting.mapper.d.ts","sourceRoot":"","sources":["../../../../src/lib/mappers/meeting.mapper.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAGhD,eAAO,MAAM,aAAa,EAAE,cAAc,CAAC,OAAO,CA4BjD,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"web-notification.mapper.d.ts","sourceRoot":"","sources":["../../../../src/lib/mappers/web-notification.mapper.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAWjE,eAAO,MAAM,qBAAqB,EAAE,cAAc,CAAC,eAAe,CAwBjE,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { Transport, PageResult } from '@23blocks/contracts';
|
|
2
|
+
import type { GroupInvite, CreateGroupInviteRequest, JoinGroupRequest, QRCodeResponse, ListGroupInvitesParams } from '../types/group-invite';
|
|
3
|
+
import type { Group } from '../types/group';
|
|
4
|
+
/**
|
|
5
|
+
* Group Invites Service - manages group invitation links
|
|
6
|
+
*/
|
|
7
|
+
export interface GroupInvitesService {
|
|
8
|
+
/**
|
|
9
|
+
* List all invites for a group
|
|
10
|
+
*/
|
|
11
|
+
list(groupUniqueId: string, params?: ListGroupInvitesParams): Promise<PageResult<GroupInvite>>;
|
|
12
|
+
/**
|
|
13
|
+
* Create a new invite for a group
|
|
14
|
+
*/
|
|
15
|
+
create(groupUniqueId: string, data?: CreateGroupInviteRequest): Promise<GroupInvite>;
|
|
16
|
+
/**
|
|
17
|
+
* Revoke an invite
|
|
18
|
+
*/
|
|
19
|
+
revoke(groupUniqueId: string, code: string): Promise<void>;
|
|
20
|
+
/**
|
|
21
|
+
* Get QR code for an invite
|
|
22
|
+
*/
|
|
23
|
+
getQRCode(groupUniqueId: string, code: string): Promise<QRCodeResponse>;
|
|
24
|
+
/**
|
|
25
|
+
* Join a group using an invite code
|
|
26
|
+
*/
|
|
27
|
+
join(code: string, data?: JoinGroupRequest): Promise<Group>;
|
|
28
|
+
}
|
|
29
|
+
export declare function createGroupInvitesService(transport: Transport, _config: {
|
|
30
|
+
appId: string;
|
|
31
|
+
}): GroupInvitesService;
|
|
32
|
+
//# sourceMappingURL=group-invites.service.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"group-invites.service.d.ts","sourceRoot":"","sources":["../../../../src/lib/services/group-invites.service.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEjE,OAAO,KAAK,EACV,WAAW,EACX,wBAAwB,EACxB,gBAAgB,EAChB,cAAc,EACd,sBAAsB,EACvB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAI5C;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC;;OAEG;IACH,IAAI,CAAC,aAAa,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,sBAAsB,GAAG,OAAO,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC,CAAC;IAE/F;;OAEG;IACH,MAAM,CAAC,aAAa,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,wBAAwB,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC;IAErF;;OAEG;IACH,MAAM,CAAC,aAAa,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAE3D;;OAEG;IACH,SAAS,CAAC,aAAa,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,cAAc,CAAC,CAAC;IAExE;;OAEG;IACH,IAAI,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,gBAAgB,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC;CAC7D;AAED,wBAAgB,yBAAyB,CAAC,SAAS,EAAE,SAAS,EAAE,OAAO,EAAE;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,GAAG,mBAAmB,CA8C/G"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export * from './messages.service';
|
|
2
2
|
export * from './draft-messages.service';
|
|
3
3
|
export * from './groups.service';
|
|
4
|
+
export * from './group-invites.service';
|
|
4
5
|
export * from './notifications.service';
|
|
5
6
|
export * from './conversations.service';
|
|
6
7
|
export * from './websocket-tokens.service';
|
|
@@ -10,4 +11,6 @@ export * from './availabilities.service';
|
|
|
10
11
|
export * from './message-files.service';
|
|
11
12
|
export * from './sources.service';
|
|
12
13
|
export * from './users.service';
|
|
14
|
+
export * from './meetings.service';
|
|
15
|
+
export * from './web-notifications.service';
|
|
13
16
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/lib/services/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,0BAA0B,CAAC;AACzC,cAAc,kBAAkB,CAAC;AACjC,cAAc,yBAAyB,CAAC;AACxC,cAAc,yBAAyB,CAAC;AACxC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,oBAAoB,CAAC;AACnC,cAAc,iCAAiC,CAAC;AAChD,cAAc,0BAA0B,CAAC;AACzC,cAAc,yBAAyB,CAAC;AACxC,cAAc,mBAAmB,CAAC;AAClC,cAAc,iBAAiB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/lib/services/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,0BAA0B,CAAC;AACzC,cAAc,kBAAkB,CAAC;AACjC,cAAc,yBAAyB,CAAC;AACxC,cAAc,yBAAyB,CAAC;AACxC,cAAc,yBAAyB,CAAC;AACxC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,oBAAoB,CAAC;AACnC,cAAc,iCAAiC,CAAC;AAChD,cAAc,0BAA0B,CAAC;AACzC,cAAc,yBAAyB,CAAC;AACxC,cAAc,mBAAmB,CAAC;AAClC,cAAc,iBAAiB,CAAC;AAChC,cAAc,oBAAoB,CAAC;AACnC,cAAc,6BAA6B,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { Transport, PageResult } from '@23blocks/contracts';
|
|
2
|
+
import type { Meeting, MeetingSession, CreateMeetingRequest, UpdateMeetingRequest, ListMeetingsParams } from '../types/meeting';
|
|
3
|
+
export interface MeetingsService {
|
|
4
|
+
list(params?: ListMeetingsParams): Promise<PageResult<Meeting>>;
|
|
5
|
+
get(uniqueId: string): Promise<Meeting>;
|
|
6
|
+
create(data: CreateMeetingRequest): Promise<Meeting>;
|
|
7
|
+
update(uniqueId: string, data: UpdateMeetingRequest): Promise<Meeting>;
|
|
8
|
+
delete(uniqueId: string): Promise<void>;
|
|
9
|
+
/**
|
|
10
|
+
* Create a session for joining a meeting
|
|
11
|
+
*/
|
|
12
|
+
createSession(uniqueId: string): Promise<MeetingSession>;
|
|
13
|
+
/**
|
|
14
|
+
* Start a meeting
|
|
15
|
+
*/
|
|
16
|
+
start(uniqueId: string): Promise<Meeting>;
|
|
17
|
+
/**
|
|
18
|
+
* End a meeting
|
|
19
|
+
*/
|
|
20
|
+
end(uniqueId: string): Promise<Meeting>;
|
|
21
|
+
}
|
|
22
|
+
export declare function createMeetingsService(transport: Transport, _config: {
|
|
23
|
+
appId: string;
|
|
24
|
+
}): MeetingsService;
|
|
25
|
+
//# sourceMappingURL=meetings.service.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"meetings.service.d.ts","sourceRoot":"","sources":["../../../../src/lib/services/meetings.service.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEjE,OAAO,KAAK,EACV,OAAO,EACP,cAAc,EACd,oBAAoB,EACpB,oBAAoB,EACpB,kBAAkB,EACnB,MAAM,kBAAkB,CAAC;AAG1B,MAAM,WAAW,eAAe;IAC9B,IAAI,CAAC,MAAM,CAAC,EAAE,kBAAkB,GAAG,OAAO,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC,CAAC;IAChE,GAAG,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IACxC,MAAM,CAAC,IAAI,EAAE,oBAAoB,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IACrD,MAAM,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,oBAAoB,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IACvE,MAAM,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAExC;;OAEG;IACH,aAAa,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,cAAc,CAAC,CAAC;IAEzD;;OAEG;IACH,KAAK,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IAE1C;;OAEG;IACH,GAAG,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;CACzC;AAED,wBAAgB,qBAAqB,CAAC,SAAS,EAAE,SAAS,EAAE,OAAO,EAAE;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,GAAG,eAAe,CAkFvG"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { Transport, PageResult } from '@23blocks/contracts';
|
|
2
|
+
import type { WebNotification, CreateWebNotificationRequest, BulkWebNotificationRequest, ListWebNotificationsParams } from '../types/web-notification';
|
|
3
|
+
export interface WebNotificationsService {
|
|
4
|
+
list(params?: ListWebNotificationsParams): Promise<PageResult<WebNotification>>;
|
|
5
|
+
get(uniqueId: string): Promise<WebNotification>;
|
|
6
|
+
send(data: CreateWebNotificationRequest): Promise<WebNotification>;
|
|
7
|
+
sendBulk(data: BulkWebNotificationRequest): Promise<{
|
|
8
|
+
sent: number;
|
|
9
|
+
failed: number;
|
|
10
|
+
}>;
|
|
11
|
+
markAsRead(uniqueId: string): Promise<WebNotification>;
|
|
12
|
+
markAsClicked(uniqueId: string): Promise<WebNotification>;
|
|
13
|
+
markAllAsRead(recipientUniqueId: string): Promise<{
|
|
14
|
+
updated: number;
|
|
15
|
+
}>;
|
|
16
|
+
delete(uniqueId: string): Promise<void>;
|
|
17
|
+
}
|
|
18
|
+
export declare function createWebNotificationsService(transport: Transport, _config: {
|
|
19
|
+
appId: string;
|
|
20
|
+
}): WebNotificationsService;
|
|
21
|
+
//# sourceMappingURL=web-notifications.service.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"web-notifications.service.d.ts","sourceRoot":"","sources":["../../../../src/lib/services/web-notifications.service.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEjE,OAAO,KAAK,EACV,eAAe,EACf,4BAA4B,EAC5B,0BAA0B,EAC1B,0BAA0B,EAC3B,MAAM,2BAA2B,CAAC;AAGnC,MAAM,WAAW,uBAAuB;IACtC,IAAI,CAAC,MAAM,CAAC,EAAE,0BAA0B,GAAG,OAAO,CAAC,UAAU,CAAC,eAAe,CAAC,CAAC,CAAC;IAChF,GAAG,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,eAAe,CAAC,CAAC;IAChD,IAAI,CAAC,IAAI,EAAE,4BAA4B,GAAG,OAAO,CAAC,eAAe,CAAC,CAAC;IACnE,QAAQ,CAAC,IAAI,EAAE,0BAA0B,GAAG,OAAO,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IACtF,UAAU,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,eAAe,CAAC,CAAC;IACvD,aAAa,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,eAAe,CAAC,CAAC;IAC1D,aAAa,CAAC,iBAAiB,EAAE,MAAM,GAAG,OAAO,CAAC;QAAE,OAAO,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IACvE,MAAM,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CACzC;AAED,wBAAgB,6BAA6B,CAAC,SAAS,EAAE,SAAS,EAAE,OAAO,EAAE;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,GAAG,uBAAuB,CAoFvH"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import type { IdentityCore, EntityStatus } from '@23blocks/contracts';
|
|
2
|
+
/**
|
|
3
|
+
* Group Invite - invitation to join a group
|
|
4
|
+
*/
|
|
5
|
+
export interface GroupInvite extends IdentityCore {
|
|
6
|
+
groupUniqueId: string;
|
|
7
|
+
code: string;
|
|
8
|
+
inviterUniqueId?: string;
|
|
9
|
+
maxUses?: number;
|
|
10
|
+
usesCount?: number;
|
|
11
|
+
expiresAt?: Date;
|
|
12
|
+
status: EntityStatus;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Create group invite request
|
|
16
|
+
*/
|
|
17
|
+
export interface CreateGroupInviteRequest {
|
|
18
|
+
maxUses?: number;
|
|
19
|
+
expiresAt?: string;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Join group request (using invite code)
|
|
23
|
+
*/
|
|
24
|
+
export interface JoinGroupRequest {
|
|
25
|
+
userUniqueId?: string;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* QR code response
|
|
29
|
+
*/
|
|
30
|
+
export interface QRCodeResponse {
|
|
31
|
+
qrCode: string;
|
|
32
|
+
inviteUrl: string;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* List group invites params
|
|
36
|
+
*/
|
|
37
|
+
export interface ListGroupInvitesParams {
|
|
38
|
+
page?: number;
|
|
39
|
+
perPage?: number;
|
|
40
|
+
status?: EntityStatus;
|
|
41
|
+
}
|
|
42
|
+
//# sourceMappingURL=group-invite.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"group-invite.d.ts","sourceRoot":"","sources":["../../../../src/lib/types/group-invite.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAEtE;;GAEG;AACH,MAAM,WAAW,WAAY,SAAQ,YAAY;IAC/C,aAAa,EAAE,MAAM,CAAC;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,IAAI,CAAC;IACjB,MAAM,EAAE,YAAY,CAAC;CACtB;AAED;;GAEG;AACH,MAAM,WAAW,wBAAwB;IACvC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;CACnB;AAED;;GAEG;AACH,MAAM,WAAW,sBAAsB;IACrC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,YAAY,CAAC;CACvB"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export * from './message';
|
|
2
2
|
export * from './draft-message';
|
|
3
3
|
export * from './group';
|
|
4
|
+
export * from './group-invite';
|
|
4
5
|
export * from './notification';
|
|
5
6
|
export * from './conversation';
|
|
6
7
|
export * from './websocket-token';
|
|
@@ -10,4 +11,6 @@ export * from './availability';
|
|
|
10
11
|
export * from './message-file';
|
|
11
12
|
export * from './source';
|
|
12
13
|
export * from './user';
|
|
14
|
+
export * from './meeting';
|
|
15
|
+
export * from './web-notification';
|
|
13
16
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/lib/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,iBAAiB,CAAC;AAChC,cAAc,SAAS,CAAC;AACxB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,mBAAmB,CAAC;AAClC,cAAc,WAAW,CAAC;AAC1B,cAAc,yBAAyB,CAAC;AACxC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/lib/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,iBAAiB,CAAC;AAChC,cAAc,SAAS,CAAC;AACxB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,mBAAmB,CAAC;AAClC,cAAc,WAAW,CAAC;AAC1B,cAAc,yBAAyB,CAAC;AACxC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC;AACvB,cAAc,WAAW,CAAC;AAC1B,cAAc,oBAAoB,CAAC"}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import type { IdentityCore, EntityStatus } from '@23blocks/contracts';
|
|
2
|
+
export interface Meeting extends IdentityCore {
|
|
3
|
+
title: string;
|
|
4
|
+
description?: string;
|
|
5
|
+
hostUniqueId: string;
|
|
6
|
+
conversationUniqueId?: string;
|
|
7
|
+
groupUniqueId?: string;
|
|
8
|
+
scheduledAt?: Date;
|
|
9
|
+
startedAt?: Date;
|
|
10
|
+
endedAt?: Date;
|
|
11
|
+
duration?: number;
|
|
12
|
+
meetingType: string;
|
|
13
|
+
meetingUrl?: string;
|
|
14
|
+
externalMeetingId?: string;
|
|
15
|
+
provider?: string;
|
|
16
|
+
maxParticipants?: number;
|
|
17
|
+
isRecording: boolean;
|
|
18
|
+
recordingUrl?: string;
|
|
19
|
+
status: EntityStatus;
|
|
20
|
+
enabled: boolean;
|
|
21
|
+
payload?: Record<string, unknown>;
|
|
22
|
+
}
|
|
23
|
+
export interface MeetingSession {
|
|
24
|
+
sessionId: string;
|
|
25
|
+
meetingUniqueId: string;
|
|
26
|
+
token: string;
|
|
27
|
+
joinUrl: string;
|
|
28
|
+
expiresAt: Date;
|
|
29
|
+
}
|
|
30
|
+
export interface CreateMeetingRequest {
|
|
31
|
+
title: string;
|
|
32
|
+
description?: string;
|
|
33
|
+
conversationUniqueId?: string;
|
|
34
|
+
groupUniqueId?: string;
|
|
35
|
+
scheduledAt?: string;
|
|
36
|
+
meetingType?: string;
|
|
37
|
+
maxParticipants?: number;
|
|
38
|
+
isRecording?: boolean;
|
|
39
|
+
provider?: string;
|
|
40
|
+
payload?: Record<string, unknown>;
|
|
41
|
+
}
|
|
42
|
+
export interface UpdateMeetingRequest {
|
|
43
|
+
title?: string;
|
|
44
|
+
description?: string;
|
|
45
|
+
scheduledAt?: string;
|
|
46
|
+
maxParticipants?: number;
|
|
47
|
+
isRecording?: boolean;
|
|
48
|
+
enabled?: boolean;
|
|
49
|
+
status?: EntityStatus;
|
|
50
|
+
payload?: Record<string, unknown>;
|
|
51
|
+
}
|
|
52
|
+
export interface ListMeetingsParams {
|
|
53
|
+
page?: number;
|
|
54
|
+
perPage?: number;
|
|
55
|
+
hostUniqueId?: string;
|
|
56
|
+
conversationUniqueId?: string;
|
|
57
|
+
groupUniqueId?: string;
|
|
58
|
+
status?: EntityStatus;
|
|
59
|
+
scheduledAfter?: string;
|
|
60
|
+
scheduledBefore?: string;
|
|
61
|
+
sortBy?: string;
|
|
62
|
+
sortOrder?: 'asc' | 'desc';
|
|
63
|
+
}
|
|
64
|
+
//# sourceMappingURL=meeting.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"meeting.d.ts","sourceRoot":"","sources":["../../../../src/lib/types/meeting.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAEtE,MAAM,WAAW,OAAQ,SAAQ,YAAY;IAC3C,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,EAAE,MAAM,CAAC;IACrB,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,WAAW,CAAC,EAAE,IAAI,CAAC;IACnB,SAAS,CAAC,EAAE,IAAI,CAAC;IACjB,OAAO,CAAC,EAAE,IAAI,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,WAAW,EAAE,OAAO,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,MA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AAM,CAAC;IAC9B,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,MAAM,CAAC,EAAE,YAAY,CAAC;IACtB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,KAAK,GAAG,MAAM,CAAC;CAC5B"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import type { IdentityCore, EntityStatus } from '@23blocks/contracts';
|
|
2
|
+
export interface WebNotification extends IdentityCore {
|
|
3
|
+
recipientUniqueId: string;
|
|
4
|
+
title: string;
|
|
5
|
+
body: string;
|
|
6
|
+
icon?: string;
|
|
7
|
+
imageUrl?: string;
|
|
8
|
+
actionUrl?: string;
|
|
9
|
+
notificationType: string;
|
|
10
|
+
priority: 'low' | 'normal' | 'high' | 'urgent';
|
|
11
|
+
sentAt?: Date;
|
|
12
|
+
readAt?: Date;
|
|
13
|
+
clickedAt?: Date;
|
|
14
|
+
status: EntityStatus;
|
|
15
|
+
enabled: boolean;
|
|
16
|
+
payload?: Record<string, unknown>;
|
|
17
|
+
tags?: string[];
|
|
18
|
+
}
|
|
19
|
+
export interface CreateWebNotificationRequest {
|
|
20
|
+
recipientUniqueId: string;
|
|
21
|
+
title: string;
|
|
22
|
+
body: string;
|
|
23
|
+
icon?: string;
|
|
24
|
+
imageUrl?: string;
|
|
25
|
+
actionUrl?: string;
|
|
26
|
+
notificationType?: string;
|
|
27
|
+
priority?: 'low' | 'normal' | 'high' | 'urgent';
|
|
28
|
+
payload?: Record<string, unknown>;
|
|
29
|
+
tags?: string[];
|
|
30
|
+
}
|
|
31
|
+
export interface BulkWebNotificationRequest {
|
|
32
|
+
recipientUniqueIds: string[];
|
|
33
|
+
title: string;
|
|
34
|
+
body: string;
|
|
35
|
+
icon?: string;
|
|
36
|
+
imageUrl?: string;
|
|
37
|
+
actionUrl?: string;
|
|
38
|
+
notificationType?: string;
|
|
39
|
+
priority?: 'low' | 'normal' | 'high' | 'urgent';
|
|
40
|
+
payload?: Record<string, unknown>;
|
|
41
|
+
tags?: string[];
|
|
42
|
+
}
|
|
43
|
+
export interface ListWebNotificationsParams {
|
|
44
|
+
page?: number;
|
|
45
|
+
perPage?: number;
|
|
46
|
+
recipientUniqueId?: string;
|
|
47
|
+
notificationType?: string;
|
|
48
|
+
priority?: 'low' | 'normal' | 'high' | 'urgent';
|
|
49
|
+
isRead?: boolean;
|
|
50
|
+
status?: EntityStatus;
|
|
51
|
+
sortBy?: string;
|
|
52
|
+
sortOrder?: 'asc' | 'desc';
|
|
53
|
+
}
|
|
54
|
+
//# sourceMappingURL=web-notification.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"web-notification.d.ts","sourceRoot":"","sources":["../../../../src/lib/types/web-notification.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAEtE,MAAM,WAAW,eAAgB,SAAQ,YAAY;IACnD,iBAAiB,EAAE,MAAM,CAAC;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,gBAAgB,EAAE,MAAM,CAAC;IACzB,QAAQ,EAAE,KAAK,GAAG,QAAQ,GAAG,MAAM,GAAG,QAAQ,CAAC;IAC/C,MAAM,CAAC,EAAE,IAAI,CAAC;IACd,MAAM,CAAC,EAAE,IAAI,CAAC;IACd,SAAS,CAAC,EAAE,IAAI,CAAC;IACjB,MAAM,EAAE,YAAY,CAAC;IACrB,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAClC,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;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E,YAAY,CAAC;IACtB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,KAAK,GAAG,MAAM,CAAC;CAC5B"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@23blocks/block-conversations",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.3.0",
|
|
4
4
|
"description": "Conversations block for 23blocks SDK - messaging, groups, notifications, and conversations management",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "23blocks <hello@23blocks.com>",
|