@23blocks/block-conversations 3.3.5 → 3.4.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 +9 -1
- package/dist/src/lib/conversations.block.d.ts +32 -0
- package/dist/src/lib/conversations.block.d.ts.map +1 -1
- package/dist/src/lib/services/availabilities.service.d.ts +15 -0
- package/dist/src/lib/services/availabilities.service.d.ts.map +1 -1
- package/dist/src/lib/services/contexts.service.d.ts +26 -0
- package/dist/src/lib/services/contexts.service.d.ts.map +1 -1
- package/dist/src/lib/services/conversations.service.d.ts +14 -0
- package/dist/src/lib/services/conversations.service.d.ts.map +1 -1
- package/dist/src/lib/services/draft-messages.service.d.ts +37 -0
- package/dist/src/lib/services/draft-messages.service.d.ts.map +1 -1
- package/dist/src/lib/services/group-invites.service.d.ts +15 -0
- package/dist/src/lib/services/group-invites.service.d.ts.map +1 -1
- package/dist/src/lib/services/groups.service.d.ts +54 -0
- package/dist/src/lib/services/groups.service.d.ts.map +1 -1
- package/dist/src/lib/services/meetings.service.d.ts +32 -0
- package/dist/src/lib/services/meetings.service.d.ts.map +1 -1
- package/dist/src/lib/services/message-files.service.d.ts +25 -0
- package/dist/src/lib/services/message-files.service.d.ts.map +1 -1
- package/dist/src/lib/services/messages.service.d.ts +48 -0
- package/dist/src/lib/services/messages.service.d.ts.map +1 -1
- package/dist/src/lib/services/notification-settings.service.d.ts +11 -0
- package/dist/src/lib/services/notification-settings.service.d.ts.map +1 -1
- package/dist/src/lib/services/notifications.service.d.ts +48 -0
- package/dist/src/lib/services/notifications.service.d.ts.map +1 -1
- package/dist/src/lib/services/sources.service.d.ts +5 -0
- package/dist/src/lib/services/sources.service.d.ts.map +1 -1
- package/dist/src/lib/services/users.service.d.ts +47 -0
- package/dist/src/lib/services/users.service.d.ts.map +1 -1
- package/dist/src/lib/services/web-notifications.service.d.ts +40 -0
- package/dist/src/lib/services/web-notifications.service.d.ts.map +1 -1
- package/dist/src/lib/services/websocket-tokens.service.d.ts +5 -0
- package/dist/src/lib/services/websocket-tokens.service.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -1324,7 +1324,15 @@ function createWebNotificationsService(transport, _config) {
|
|
|
1324
1324
|
};
|
|
1325
1325
|
}
|
|
1326
1326
|
|
|
1327
|
-
|
|
1327
|
+
/**
|
|
1328
|
+
* Create the Conversations block.
|
|
1329
|
+
*
|
|
1330
|
+
* @example
|
|
1331
|
+
* ```typescript
|
|
1332
|
+
* const block = createConversationsBlock(transport, { appId: 'xxx' });
|
|
1333
|
+
* const messages = await block.messages.list({ page: 1 });
|
|
1334
|
+
* ```
|
|
1335
|
+
*/ function createConversationsBlock(transport, config) {
|
|
1328
1336
|
return {
|
|
1329
1337
|
messages: createMessagesService(transport),
|
|
1330
1338
|
draftMessages: createDraftMessagesService(transport),
|
|
@@ -1,26 +1,58 @@
|
|
|
1
1
|
import type { Transport, BlockConfig, BlockMetadata } from '@23blocks/contracts';
|
|
2
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/index.js';
|
|
3
|
+
/**
|
|
4
|
+
* Configuration for the Conversations block.
|
|
5
|
+
*/
|
|
3
6
|
export interface ConversationsBlockConfig extends BlockConfig {
|
|
7
|
+
/** Application ID */
|
|
4
8
|
appId: string;
|
|
9
|
+
/** Tenant ID (optional, for multi-tenant setups) */
|
|
5
10
|
tenantId?: string;
|
|
6
11
|
}
|
|
12
|
+
/**
|
|
13
|
+
* Messaging and conversations block interface.
|
|
14
|
+
*/
|
|
7
15
|
export interface ConversationsBlock {
|
|
16
|
+
/** Message CRUD operations */
|
|
8
17
|
messages: MessagesService;
|
|
18
|
+
/** Draft message management */
|
|
9
19
|
draftMessages: DraftMessagesService;
|
|
20
|
+
/** Group chat management */
|
|
10
21
|
groups: GroupsService;
|
|
22
|
+
/** Group invitation management */
|
|
11
23
|
groupInvites: GroupInvitesService;
|
|
24
|
+
/** In-app notification management */
|
|
12
25
|
notifications: NotificationsService;
|
|
26
|
+
/** Conversation thread management */
|
|
13
27
|
conversations: ConversationsService;
|
|
28
|
+
/** WebSocket token generation */
|
|
14
29
|
websocketTokens: WebSocketTokensService;
|
|
30
|
+
/** Conversation context management */
|
|
15
31
|
contexts: ContextsService;
|
|
32
|
+
/** Notification preference management */
|
|
16
33
|
notificationSettings: NotificationSettingsService;
|
|
34
|
+
/** User availability status management */
|
|
17
35
|
availabilities: AvailabilitiesService;
|
|
36
|
+
/** Message file attachment management */
|
|
18
37
|
messageFiles: MessageFilesService;
|
|
38
|
+
/** Message source management */
|
|
19
39
|
sources: SourcesService;
|
|
40
|
+
/** Conversation user management */
|
|
20
41
|
users: UsersService;
|
|
42
|
+
/** Meeting management */
|
|
21
43
|
meetings: MeetingsService;
|
|
44
|
+
/** Web push notification management */
|
|
22
45
|
webNotifications: WebNotificationsService;
|
|
23
46
|
}
|
|
47
|
+
/**
|
|
48
|
+
* Create the Conversations block.
|
|
49
|
+
*
|
|
50
|
+
* @example
|
|
51
|
+
* ```typescript
|
|
52
|
+
* const block = createConversationsBlock(transport, { appId: 'xxx' });
|
|
53
|
+
* const messages = await block.messages.list({ page: 1 });
|
|
54
|
+
* ```
|
|
55
|
+
*/
|
|
24
56
|
export declare function createConversationsBlock(transport: Transport, config: ConversationsBlockConfig): ConversationsBlock;
|
|
25
57
|
export declare const conversationsBlockMetadata: BlockMetadata;
|
|
26
58
|
//# sourceMappingURL=conversations.block.d.ts.map
|
|
@@ -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,EAgBL,KAAK,eAAe,EACpB,KAAK,oBAAoB,EACzB,KAAK,aAAa,EAClB,KAAK,mBAAmB,EACxB,KAAK,oBAAoB,EACzB,KAAK,oBAAoB,EACzB,KAAK,sBAAsB,EAC3B,KAAK,eAAe,EACpB,KAAK,2BAA2B,EAChC,KAAK,qBAAqB,EAC1B,KAAK,mBAAmB,EACxB,KAAK,cAAc,EACnB,KAAK,YAAY,EACjB,KAAK,eAAe,EACpB,KAAK,uBAAuB,EAC7B,MAAM,qBAAqB,CAAC;AAE7B,MAAM,WAAW,wBAAyB,SAAQ,WAAW;IAC3D,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,kBAAkB;IACjC,QAAQ,EAAE,eAAe,CAAC;IAC1B,aAAa,EAAE,oBAAoB,CAAC;IACpC,MAAM,EAAE,aAAa,CAAC;IACtB,YAAY,EAAE,mBAAmB,CAAC;IAClC,aAAa,EAAE,oBAAoB,CAAC;IACpC,aAAa,EAAE,oBAAoB,CAAC;IACpC,eAAe,EAAE,sBAAsB,CAAC;IACxC,QAAQ,EAAE,eAAe,CAAC;IAC1B,oBAAoB,EAAE,2BAA2B,CAAC;IAClD,cAAc,EAAE,qBAAqB,CAAC;IACtC,YAAY,EAAE,mBAAmB,CAAC;IAClC,OAAO,EAAE,cAAc,CAAC;IACxB,KAAK,EAAE,YAAY,CAAC;IACpB,QAAQ,EAAE,eAAe,CAAC;IAC1B,gBAAgB,EAAE,uBAAuB,CAAC;CAC3C;AAED,wBAAgB,wBAAwB,CACtC,SAAS,EAAE,SAAS,EACpB,MAAM,EAAE,wBAAwB,GAC/B,kBAAkB,CAkBpB;AAED,eAAO,MAAM,0BAA0B,EAAE,aAkBxC,CAAC"}
|
|
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,EAgBL,KAAK,eAAe,EACpB,KAAK,oBAAoB,EACzB,KAAK,aAAa,EAClB,KAAK,mBAAmB,EACxB,KAAK,oBAAoB,EACzB,KAAK,oBAAoB,EACzB,KAAK,sBAAsB,EAC3B,KAAK,eAAe,EACpB,KAAK,2BAA2B,EAChC,KAAK,qBAAqB,EAC1B,KAAK,mBAAmB,EACxB,KAAK,cAAc,EACnB,KAAK,YAAY,EACjB,KAAK,eAAe,EACpB,KAAK,uBAAuB,EAC7B,MAAM,qBAAqB,CAAC;AAE7B;;GAEG;AACH,MAAM,WAAW,wBAAyB,SAAQ,WAAW;IAC3D,qBAAqB;IACrB,KAAK,EAAE,MAAM,CAAC;IACd,oDAAoD;IACpD,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC,8BAA8B;IAC9B,QAAQ,EAAE,eAAe,CAAC;IAC1B,+BAA+B;IAC/B,aAAa,EAAE,oBAAoB,CAAC;IACpC,4BAA4B;IAC5B,MAAM,EAAE,aAAa,CAAC;IACtB,kCAAkC;IAClC,YAAY,EAAE,mBAAmB,CAAC;IAClC,qCAAqC;IACrC,aAAa,EAAE,oBAAoB,CAAC;IACpC,qCAAqC;IACrC,aAAa,EAAE,oBAAoB,CAAC;IACpC,iCAAiC;IACjC,eAAe,EAAE,sBAAsB,CAAC;IACxC,sCAAsC;IACtC,QAAQ,EAAE,eAAe,CAAC;IAC1B,yCAAyC;IACzC,oBAAoB,EAAE,2BAA2B,CAAC;IAClD,0CAA0C;IAC1C,cAAc,EAAE,qBAAqB,CAAC;IACtC,yCAAyC;IACzC,YAAY,EAAE,mBAAmB,CAAC;IAClC,gCAAgC;IAChC,OAAO,EAAE,cAAc,CAAC;IACxB,mCAAmC;IACnC,KAAK,EAAE,YAAY,CAAC;IACpB,yBAAyB;IACzB,QAAQ,EAAE,eAAe,CAAC;IAC1B,uCAAuC;IACvC,gBAAgB,EAAE,uBAAuB,CAAC;CAC3C;AAED;;;;;;;;GAQG;AACH,wBAAgB,wBAAwB,CACtC,SAAS,EAAE,SAAS,EACpB,MAAM,EAAE,wBAAwB,GAC/B,kBAAkB,CAkBpB;AAED,eAAO,MAAM,0BAA0B,EAAE,aAkBxC,CAAC"}
|
|
@@ -1,8 +1,23 @@
|
|
|
1
1
|
import type { Transport } from '@23blocks/contracts';
|
|
2
2
|
import type { UserAvailability, SetAvailabilityRequest } from '../types/availability.js';
|
|
3
3
|
export interface AvailabilitiesService {
|
|
4
|
+
/**
|
|
5
|
+
* Get the availability status of a user
|
|
6
|
+
* @param userUniqueId - Unique ID of the user to check
|
|
7
|
+
* @returns UserAvailability with status, last seen timestamp, and optional custom status
|
|
8
|
+
*/
|
|
4
9
|
get(userUniqueId: string): Promise<UserAvailability>;
|
|
10
|
+
/**
|
|
11
|
+
* Set the current user's status to online
|
|
12
|
+
* @param data - Optional availability settings including custom status and payload
|
|
13
|
+
* @returns Updated UserAvailability reflecting the online state
|
|
14
|
+
* @note Defaults to status "online" if no specific status is provided in the request
|
|
15
|
+
*/
|
|
5
16
|
goOnline(data?: SetAvailabilityRequest): Promise<UserAvailability>;
|
|
17
|
+
/**
|
|
18
|
+
* Set the current user's status to offline
|
|
19
|
+
* @returns void on successful status change
|
|
20
|
+
*/
|
|
6
21
|
goOffline(): Promise<void>;
|
|
7
22
|
}
|
|
8
23
|
export declare function createAvailabilitiesService(transport: Transport, _config: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"availabilities.service.d.ts","sourceRoot":"","sources":["../../../../src/lib/services/availabilities.service.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,KAAK,EACV,gBAAgB,EAChB,sBAAsB,EACvB,MAAM,0BAA0B,CAAC;AAElC,MAAM,WAAW,qBAAqB;IACpC,GAAG,CAAC,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"availabilities.service.d.ts","sourceRoot":"","sources":["../../../../src/lib/services/availabilities.service.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,KAAK,EACV,gBAAgB,EAChB,sBAAsB,EACvB,MAAM,0BAA0B,CAAC;AAElC,MAAM,WAAW,qBAAqB;IACpC;;;;OAIG;IACH,GAAG,CAAC,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAAC;IAErD;;;;;OAKG;IACH,QAAQ,CAAC,IAAI,CAAC,EAAE,sBAAsB,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAAC;IAEnE;;;OAGG;IACH,SAAS,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;CAC5B;AAED,wBAAgB,2BAA2B,CAAC,SAAS,EAAE,SAAS,EAAE,OAAO,EAAE;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,GAAG,qBAAqB,CAuCnH"}
|
|
@@ -2,10 +2,36 @@ import type { Transport, PageResult } from '@23blocks/contracts';
|
|
|
2
2
|
import type { Context, CreateContextRequest, UpdateContextRequest, ListContextsParams } from '../types/context.js';
|
|
3
3
|
import type { Group } from '../types/group.js';
|
|
4
4
|
export interface ContextsService {
|
|
5
|
+
/**
|
|
6
|
+
* List all contexts
|
|
7
|
+
* @param params - Optional filtering, sorting, and pagination parameters
|
|
8
|
+
* @returns Paginated list of Context records with pagination metadata
|
|
9
|
+
*/
|
|
5
10
|
list(params?: ListContextsParams): Promise<PageResult<Context>>;
|
|
11
|
+
/**
|
|
12
|
+
* Get a context by unique ID
|
|
13
|
+
* @param uniqueId - Unique ID of the context to retrieve
|
|
14
|
+
* @returns The matching Context record
|
|
15
|
+
*/
|
|
6
16
|
get(uniqueId: string): Promise<Context>;
|
|
17
|
+
/**
|
|
18
|
+
* Create a new context
|
|
19
|
+
* @param data - Context creation payload including name, type, and metadata
|
|
20
|
+
* @returns The newly created Context record
|
|
21
|
+
*/
|
|
7
22
|
create(data: CreateContextRequest): Promise<Context>;
|
|
23
|
+
/**
|
|
24
|
+
* Update a context
|
|
25
|
+
* @param uniqueId - Unique ID of the context to update
|
|
26
|
+
* @param data - Fields to update on the context
|
|
27
|
+
* @returns The updated Context record
|
|
28
|
+
*/
|
|
8
29
|
update(uniqueId: string, data: UpdateContextRequest): Promise<Context>;
|
|
30
|
+
/**
|
|
31
|
+
* List groups belonging to a context
|
|
32
|
+
* @param contextUniqueId - Unique ID of the context
|
|
33
|
+
* @returns Paginated list of Group records within the context
|
|
34
|
+
*/
|
|
9
35
|
listGroups(contextUniqueId: string): Promise<PageResult<Group>>;
|
|
10
36
|
}
|
|
11
37
|
export declare function createContextsService(transport: Transport, _config: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contexts.service.d.ts","sourceRoot":"","sources":["../../../../src/lib/services/contexts.service.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEjE,OAAO,KAAK,EACV,OAAO,EACP,oBAAoB,EACpB,oBAAoB,EACpB,kBAAkB,EACnB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAI/C,MAAM,WAAW,eAAe;IAC9B,IAAI,CAAC,MAAM,CAAC,EAAE,kBAAkB,GAAG,OAAO,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"contexts.service.d.ts","sourceRoot":"","sources":["../../../../src/lib/services/contexts.service.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEjE,OAAO,KAAK,EACV,OAAO,EACP,oBAAoB,EACpB,oBAAoB,EACpB,kBAAkB,EACnB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAI/C,MAAM,WAAW,eAAe;IAC9B;;;;OAIG;IACH,IAAI,CAAC,MAAM,CAAC,EAAE,kBAAkB,GAAG,OAAO,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC,CAAC;IAEhE;;;;OAIG;IACH,GAAG,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IAExC;;;;OAIG;IACH,MAAM,CAAC,IAAI,EAAE,oBAAoB,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IAErD;;;;;OAKG;IACH,MAAM,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,oBAAoB,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IAEvE;;;;OAIG;IACH,UAAU,CAAC,eAAe,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC;CACjE;AAED,wBAAgB,qBAAqB,CAAC,SAAS,EAAE,SAAS,EAAE,OAAO,EAAE;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,GAAG,eAAe,CAoDvG"}
|
|
@@ -1,8 +1,22 @@
|
|
|
1
1
|
import type { Transport } from '@23blocks/contracts';
|
|
2
2
|
import type { Conversation, GetConversationParams } from '../types/conversation.js';
|
|
3
3
|
export interface ConversationsService {
|
|
4
|
+
/**
|
|
5
|
+
* Get a conversation by context identifier
|
|
6
|
+
* @param params - Parameters including context ID, pagination, and optional file inclusion
|
|
7
|
+
* @returns Conversation object containing messages, files, and metadata
|
|
8
|
+
*/
|
|
4
9
|
get(params: GetConversationParams): Promise<Conversation>;
|
|
10
|
+
/**
|
|
11
|
+
* List all available conversation context identifiers
|
|
12
|
+
* @returns Array of context identifier strings
|
|
13
|
+
*/
|
|
5
14
|
listContexts(): Promise<string[]>;
|
|
15
|
+
/**
|
|
16
|
+
* Delete a conversation context and its associated messages
|
|
17
|
+
* @param context - Context identifier of the conversation to delete
|
|
18
|
+
* @returns void on successful deletion
|
|
19
|
+
*/
|
|
6
20
|
deleteContext(context: string): Promise<void>;
|
|
7
21
|
}
|
|
8
22
|
export declare function createConversationsService(transport: Transport, _config: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"conversations.service.d.ts","sourceRoot":"","sources":["../../../../src/lib/services/conversations.service.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAErD,OAAO,KAAK,EACV,YAAY,EACZ,qBAAqB,EACtB,MAAM,0BAA0B,CAAC;AAGlC,MAAM,WAAW,oBAAoB;IACnC,GAAG,CAAC,MAAM,EAAE,qBAAqB,GAAG,OAAO,CAAC,YAAY,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"conversations.service.d.ts","sourceRoot":"","sources":["../../../../src/lib/services/conversations.service.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAErD,OAAO,KAAK,EACV,YAAY,EACZ,qBAAqB,EACtB,MAAM,0BAA0B,CAAC;AAGlC,MAAM,WAAW,oBAAoB;IACnC;;;;OAIG;IACH,GAAG,CAAC,MAAM,EAAE,qBAAqB,GAAG,OAAO,CAAC,YAAY,CAAC,CAAC;IAE1D;;;OAGG;IACH,YAAY,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC;IAElC;;;;OAIG;IACH,aAAa,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CAC/C;AAED,wBAAgB,0BAA0B,CAAC,SAAS,EAAE,SAAS,EAAE,OAAO,EAAE;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,GAAG,oBAAoB,CAoCjH"}
|
|
@@ -1,12 +1,49 @@
|
|
|
1
1
|
import type { Transport, PageResult } from '@23blocks/contracts';
|
|
2
2
|
import type { DraftMessage, CreateDraftMessageRequest, UpdateDraftMessageRequest, ListDraftMessagesParams } from '../types/draft-message.js';
|
|
3
3
|
export interface DraftMessagesService {
|
|
4
|
+
/**
|
|
5
|
+
* List all draft messages
|
|
6
|
+
* @param params - Optional filtering, sorting, and pagination parameters
|
|
7
|
+
* @returns Paginated list of DraftMessage records with pagination metadata
|
|
8
|
+
*/
|
|
4
9
|
list(params?: ListDraftMessagesParams): Promise<PageResult<DraftMessage>>;
|
|
10
|
+
/**
|
|
11
|
+
* Get a draft message by unique ID
|
|
12
|
+
* @param uniqueId - Unique ID of the draft message to retrieve
|
|
13
|
+
* @returns The matching DraftMessage record
|
|
14
|
+
*/
|
|
5
15
|
get(uniqueId: string): Promise<DraftMessage>;
|
|
16
|
+
/**
|
|
17
|
+
* Create a new draft message
|
|
18
|
+
* @param data - Draft message creation payload including content, source, target, and routing fields
|
|
19
|
+
* @returns The newly created DraftMessage record
|
|
20
|
+
*/
|
|
6
21
|
create(data: CreateDraftMessageRequest): Promise<DraftMessage>;
|
|
22
|
+
/**
|
|
23
|
+
* Update a draft message
|
|
24
|
+
* @param uniqueId - Unique ID of the draft message to update
|
|
25
|
+
* @param data - Fields to update (content, status, enabled, payload)
|
|
26
|
+
* @returns The updated DraftMessage record
|
|
27
|
+
*/
|
|
7
28
|
update(uniqueId: string, data: UpdateDraftMessageRequest): Promise<DraftMessage>;
|
|
29
|
+
/**
|
|
30
|
+
* Delete a draft message
|
|
31
|
+
* @param uniqueId - Unique ID of the draft message to delete
|
|
32
|
+
* @returns void on successful deletion
|
|
33
|
+
*/
|
|
8
34
|
delete(uniqueId: string): Promise<void>;
|
|
35
|
+
/**
|
|
36
|
+
* List draft messages filtered by context
|
|
37
|
+
* @param contextId - Context identifier to filter by
|
|
38
|
+
* @param params - Optional sorting and pagination parameters
|
|
39
|
+
* @returns Paginated list of DraftMessage records for the given context
|
|
40
|
+
*/
|
|
9
41
|
listByContext(contextId: string, params?: ListDraftMessagesParams): Promise<PageResult<DraftMessage>>;
|
|
42
|
+
/**
|
|
43
|
+
* Publish a draft message, converting it into a sent message
|
|
44
|
+
* @param uniqueId - Unique ID of the draft message to publish
|
|
45
|
+
* @returns The published DraftMessage record with updated status
|
|
46
|
+
*/
|
|
10
47
|
publish(uniqueId: string): Promise<DraftMessage>;
|
|
11
48
|
}
|
|
12
49
|
export declare function createDraftMessagesService(transport: Transport, _config: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"draft-messages.service.d.ts","sourceRoot":"","sources":["../../../../src/lib/services/draft-messages.service.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEjE,OAAO,KAAK,EACV,YAAY,EACZ,yBAAyB,EACzB,yBAAyB,EACzB,uBAAuB,EACxB,MAAM,2BAA2B,CAAC;AAGnC,MAAM,WAAW,oBAAoB;IACnC,IAAI,CAAC,MAAM,CAAC,EAAE,uBAAuB,GAAG,OAAO,CAAC,UAAU,CAAC,YAAY,CAAC,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"draft-messages.service.d.ts","sourceRoot":"","sources":["../../../../src/lib/services/draft-messages.service.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEjE,OAAO,KAAK,EACV,YAAY,EACZ,yBAAyB,EACzB,yBAAyB,EACzB,uBAAuB,EACxB,MAAM,2BAA2B,CAAC;AAGnC,MAAM,WAAW,oBAAoB;IACnC;;;;OAIG;IACH,IAAI,CAAC,MAAM,CAAC,EAAE,uBAAuB,GAAG,OAAO,CAAC,UAAU,CAAC,YAAY,CAAC,CAAC,CAAC;IAE1E;;;;OAIG;IACH,GAAG,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,CAAC,CAAC;IAE7C;;;;OAIG;IACH,MAAM,CAAC,IAAI,EAAE,yBAAyB,GAAG,OAAO,CAAC,YAAY,CAAC,CAAC;IAE/D;;;;;OAKG;IACH,MAAM,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,yBAAyB,GAAG,OAAO,CAAC,YAAY,CAAC,CAAC;IAEjF;;;;OAIG;IACH,MAAM,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAExC;;;;;OAKG;IACH,aAAa,CAAC,SAAS,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,uBAAuB,GAAG,OAAO,CAAC,UAAU,CAAC,YAAY,CAAC,CAAC,CAAC;IAEtG;;;;OAIG;IACH,OAAO,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,CAAC,CAAC;CAClD;AAED,wBAAgB,0BAA0B,CAAC,SAAS,EAAE,SAAS,EAAE,OAAO,EAAE;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,GAAG,oBAAoB,CAuFjH"}
|
|
@@ -7,22 +7,37 @@ import type { Group } from '../types/group.js';
|
|
|
7
7
|
export interface GroupInvitesService {
|
|
8
8
|
/**
|
|
9
9
|
* List all invites for a group
|
|
10
|
+
* @param groupUniqueId - Unique ID of the group
|
|
11
|
+
* @param params - Optional filtering and pagination parameters
|
|
12
|
+
* @returns Paginated list of GroupInvite records with pagination metadata
|
|
10
13
|
*/
|
|
11
14
|
list(groupUniqueId: string, params?: ListGroupInvitesParams): Promise<PageResult<GroupInvite>>;
|
|
12
15
|
/**
|
|
13
16
|
* Create a new invite for a group
|
|
17
|
+
* @param groupUniqueId - Unique ID of the group to create an invite for
|
|
18
|
+
* @param data - Optional invite configuration including max uses and expiration
|
|
19
|
+
* @returns The newly created GroupInvite record containing the invite code
|
|
14
20
|
*/
|
|
15
21
|
create(groupUniqueId: string, data?: CreateGroupInviteRequest): Promise<GroupInvite>;
|
|
16
22
|
/**
|
|
17
23
|
* Revoke an invite
|
|
24
|
+
* @param groupUniqueId - Unique ID of the group the invite belongs to
|
|
25
|
+
* @param code - Invite code to revoke
|
|
26
|
+
* @returns void on successful revocation
|
|
18
27
|
*/
|
|
19
28
|
revoke(groupUniqueId: string, code: string): Promise<void>;
|
|
20
29
|
/**
|
|
21
30
|
* Get QR code for an invite
|
|
31
|
+
* @param groupUniqueId - Unique ID of the group the invite belongs to
|
|
32
|
+
* @param code - Invite code to generate a QR code for
|
|
33
|
+
* @returns QRCodeResponse containing the QR code data and invite URL
|
|
22
34
|
*/
|
|
23
35
|
getQRCode(groupUniqueId: string, code: string): Promise<QRCodeResponse>;
|
|
24
36
|
/**
|
|
25
37
|
* Join a group using an invite code
|
|
38
|
+
* @param code - Invite code to use for joining
|
|
39
|
+
* @param data - Optional request body with the joining user's unique ID
|
|
40
|
+
* @returns The Group record that was joined
|
|
26
41
|
*/
|
|
27
42
|
join(code: string, data?: JoinGroupRequest): Promise<Group>;
|
|
28
43
|
}
|
|
@@ -1 +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,0BAA0B,CAAC;AAClC,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAI/C;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC
|
|
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,0BAA0B,CAAC;AAClC,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAI/C;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC;;;;;OAKG;IACH,IAAI,CAAC,aAAa,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,sBAAsB,GAAG,OAAO,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC,CAAC;IAE/F;;;;;OAKG;IACH,MAAM,CAAC,aAAa,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,wBAAwB,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC;IAErF;;;;;OAKG;IACH,MAAM,CAAC,aAAa,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAE3D;;;;;OAKG;IACH,SAAS,CAAC,aAAa,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,cAAc,CAAC,CAAC;IAExE;;;;;OAKG;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,15 +1,69 @@
|
|
|
1
1
|
import type { Transport, PageResult } from '@23blocks/contracts';
|
|
2
2
|
import type { Group, CreateGroupRequest, UpdateGroupRequest, ListGroupsParams } from '../types/group.js';
|
|
3
3
|
export interface GroupsService {
|
|
4
|
+
/**
|
|
5
|
+
* List all groups
|
|
6
|
+
* @param params - Optional filtering, sorting, and pagination parameters
|
|
7
|
+
* @returns Paginated list of Group records with pagination metadata
|
|
8
|
+
*/
|
|
4
9
|
list(params?: ListGroupsParams): Promise<PageResult<Group>>;
|
|
10
|
+
/**
|
|
11
|
+
* Get a group by unique ID
|
|
12
|
+
* @param uniqueId - Unique ID of the group to retrieve
|
|
13
|
+
* @returns The matching Group record
|
|
14
|
+
*/
|
|
5
15
|
get(uniqueId: string): Promise<Group>;
|
|
16
|
+
/**
|
|
17
|
+
* Create a new group
|
|
18
|
+
* @param data - Group creation payload including name, type, and initial members
|
|
19
|
+
* @returns The newly created Group record
|
|
20
|
+
*/
|
|
6
21
|
create(data: CreateGroupRequest): Promise<Group>;
|
|
22
|
+
/**
|
|
23
|
+
* Update a group
|
|
24
|
+
* @param uniqueId - Unique ID of the group to update
|
|
25
|
+
* @param data - Fields to update on the group
|
|
26
|
+
* @returns The updated Group record
|
|
27
|
+
*/
|
|
7
28
|
update(uniqueId: string, data: UpdateGroupRequest): Promise<Group>;
|
|
29
|
+
/**
|
|
30
|
+
* Delete a group (soft delete)
|
|
31
|
+
* @param uniqueId - Unique ID of the group to delete
|
|
32
|
+
* @returns void on successful deletion
|
|
33
|
+
*/
|
|
8
34
|
delete(uniqueId: string): Promise<void>;
|
|
35
|
+
/**
|
|
36
|
+
* Recover a previously deleted group
|
|
37
|
+
* @param uniqueId - Unique ID of the deleted group to recover
|
|
38
|
+
* @returns The recovered Group record
|
|
39
|
+
*/
|
|
9
40
|
recover(uniqueId: string): Promise<Group>;
|
|
41
|
+
/**
|
|
42
|
+
* Search groups by query string
|
|
43
|
+
* @param query - Search query text
|
|
44
|
+
* @param params - Optional pagination parameters
|
|
45
|
+
* @returns Paginated list of matching Group records with pagination metadata
|
|
46
|
+
*/
|
|
10
47
|
search(query: string, params?: ListGroupsParams): Promise<PageResult<Group>>;
|
|
48
|
+
/**
|
|
49
|
+
* List soft-deleted groups
|
|
50
|
+
* @param params - Optional pagination parameters
|
|
51
|
+
* @returns Paginated list of deleted Group records with pagination metadata
|
|
52
|
+
*/
|
|
11
53
|
listDeleted(params?: ListGroupsParams): Promise<PageResult<Group>>;
|
|
54
|
+
/**
|
|
55
|
+
* Add a member to a group
|
|
56
|
+
* @param uniqueId - Unique ID of the group
|
|
57
|
+
* @param memberId - ID of the member to add
|
|
58
|
+
* @returns The updated Group record
|
|
59
|
+
*/
|
|
12
60
|
addMember(uniqueId: string, memberId: string): Promise<Group>;
|
|
61
|
+
/**
|
|
62
|
+
* Remove a member from a group
|
|
63
|
+
* @param uniqueId - Unique ID of the group
|
|
64
|
+
* @param memberId - ID of the member to remove
|
|
65
|
+
* @returns The updated Group record
|
|
66
|
+
*/
|
|
13
67
|
removeMember(uniqueId: string, memberId: string): Promise<Group>;
|
|
14
68
|
}
|
|
15
69
|
export declare function createGroupsService(transport: Transport, _config: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"groups.service.d.ts","sourceRoot":"","sources":["../../../../src/lib/services/groups.service.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEjE,OAAO,KAAK,EACV,KAAK,EACL,kBAAkB,EAClB,kBAAkB,EAClB,gBAAgB,EACjB,MAAM,mBAAmB,CAAC;AAG3B,MAAM,WAAW,aAAa;IAC5B,IAAI,CAAC,MAAM,CAAC,EAAE,gBAAgB,GAAG,OAAO,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"groups.service.d.ts","sourceRoot":"","sources":["../../../../src/lib/services/groups.service.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEjE,OAAO,KAAK,EACV,KAAK,EACL,kBAAkB,EAClB,kBAAkB,EAClB,gBAAgB,EACjB,MAAM,mBAAmB,CAAC;AAG3B,MAAM,WAAW,aAAa;IAC5B;;;;OAIG;IACH,IAAI,CAAC,MAAM,CAAC,EAAE,gBAAgB,GAAG,OAAO,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC;IAE5D;;;;OAIG;IACH,GAAG,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC;IAEtC;;;;OAIG;IACH,MAAM,CAAC,IAAI,EAAE,kBAAkB,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC;IAEjD;;;;;OAKG;IACH,MAAM,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,kBAAkB,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC;IAEnE;;;;OAIG;IACH,MAAM,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAExC;;;;OAIG;IACH,OAAO,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC;IAE1C;;;;;OAKG;IACH,MAAM,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,gBAAgB,GAAG,OAAO,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC;IAE7E;;;;OAIG;IACH,WAAW,CAAC,MAAM,CAAC,EAAE,gBAAgB,GAAG,OAAO,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC;IAEnE;;;;;OAKG;IACH,SAAS,CAAC,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC;IAE9D;;;;;OAKG;IACH,YAAY,CAAC,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC;CAClE;AAED,wBAAgB,mBAAmB,CAAC,SAAS,EAAE,SAAS,EAAE,OAAO,EAAE;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,GAAG,aAAa,CAiGnG"}
|
|
@@ -1,21 +1,53 @@
|
|
|
1
1
|
import type { Transport, PageResult } from '@23blocks/contracts';
|
|
2
2
|
import type { Meeting, MeetingSession, CreateMeetingRequest, UpdateMeetingRequest, ListMeetingsParams } from '../types/meeting.js';
|
|
3
3
|
export interface MeetingsService {
|
|
4
|
+
/**
|
|
5
|
+
* List all meetings
|
|
6
|
+
* @param params - Optional filtering, sorting, and pagination parameters
|
|
7
|
+
* @returns Paginated list of Meeting records with pagination metadata
|
|
8
|
+
*/
|
|
4
9
|
list(params?: ListMeetingsParams): Promise<PageResult<Meeting>>;
|
|
10
|
+
/**
|
|
11
|
+
* Get a meeting by unique ID
|
|
12
|
+
* @param uniqueId - Unique ID of the meeting to retrieve
|
|
13
|
+
* @returns The matching Meeting record
|
|
14
|
+
*/
|
|
5
15
|
get(uniqueId: string): Promise<Meeting>;
|
|
16
|
+
/**
|
|
17
|
+
* Create a new meeting
|
|
18
|
+
* @param data - Meeting creation payload including title, schedule, and provider details
|
|
19
|
+
* @returns The newly created Meeting record
|
|
20
|
+
*/
|
|
6
21
|
create(data: CreateMeetingRequest): Promise<Meeting>;
|
|
22
|
+
/**
|
|
23
|
+
* Update a meeting
|
|
24
|
+
* @param uniqueId - Unique ID of the meeting to update
|
|
25
|
+
* @param data - Fields to update on the meeting
|
|
26
|
+
* @returns The updated Meeting record
|
|
27
|
+
*/
|
|
7
28
|
update(uniqueId: string, data: UpdateMeetingRequest): Promise<Meeting>;
|
|
29
|
+
/**
|
|
30
|
+
* Delete a meeting
|
|
31
|
+
* @param uniqueId - Unique ID of the meeting to delete
|
|
32
|
+
* @returns void on successful deletion
|
|
33
|
+
*/
|
|
8
34
|
delete(uniqueId: string): Promise<void>;
|
|
9
35
|
/**
|
|
10
36
|
* Create a session for joining a meeting
|
|
37
|
+
* @param uniqueId - Unique ID of the meeting to join
|
|
38
|
+
* @returns MeetingSession with session ID, token, join URL, and expiration
|
|
11
39
|
*/
|
|
12
40
|
createSession(uniqueId: string): Promise<MeetingSession>;
|
|
13
41
|
/**
|
|
14
42
|
* Start a meeting
|
|
43
|
+
* @param uniqueId - Unique ID of the meeting to start
|
|
44
|
+
* @returns The updated Meeting record with active status
|
|
15
45
|
*/
|
|
16
46
|
start(uniqueId: string): Promise<Meeting>;
|
|
17
47
|
/**
|
|
18
48
|
* End a meeting
|
|
49
|
+
* @param uniqueId - Unique ID of the meeting to end
|
|
50
|
+
* @returns The updated Meeting record with ended status
|
|
19
51
|
*/
|
|
20
52
|
end(uniqueId: string): Promise<Meeting>;
|
|
21
53
|
}
|
|
@@ -1 +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,qBAAqB,CAAC;AAG7B,MAAM,WAAW,eAAe;IAC9B,IAAI,CAAC,MAAM,CAAC,EAAE,kBAAkB,GAAG,OAAO,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC,CAAC;
|
|
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,qBAAqB,CAAC;AAG7B,MAAM,WAAW,eAAe;IAC9B;;;;OAIG;IACH,IAAI,CAAC,MAAM,CAAC,EAAE,kBAAkB,GAAG,OAAO,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC,CAAC;IAEhE;;;;OAIG;IACH,GAAG,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IAExC;;;;OAIG;IACH,MAAM,CAAC,IAAI,EAAE,oBAAoB,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IAErD;;;;;OAKG;IACH,MAAM,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,oBAAoB,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IAEvE;;;;OAIG;IACH,MAAM,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAExC;;;;OAIG;IACH,aAAa,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,cAAc,CAAC,CAAC;IAEzD;;;;OAIG;IACH,KAAK,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IAE1C;;;;OAIG;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"}
|
|
@@ -1,9 +1,34 @@
|
|
|
1
1
|
import type { Transport } from '@23blocks/contracts';
|
|
2
2
|
import type { MessageFile, CreateMessageFileRequest, PresignMessageFileRequest, PresignMessageFileResponse } from '../types/message-file.js';
|
|
3
3
|
export interface MessageFilesService {
|
|
4
|
+
/**
|
|
5
|
+
* Get a message file by unique ID
|
|
6
|
+
* @param conversationUniqueId - Unique ID of the conversation the file belongs to
|
|
7
|
+
* @param fileUniqueId - Unique ID of the file to retrieve
|
|
8
|
+
* @returns The matching MessageFile record
|
|
9
|
+
*/
|
|
4
10
|
get(conversationUniqueId: string, fileUniqueId: string): Promise<MessageFile>;
|
|
11
|
+
/**
|
|
12
|
+
* Create a new message file record
|
|
13
|
+
* @param conversationUniqueId - Unique ID of the conversation to attach the file to
|
|
14
|
+
* @param data - File metadata including name, content type, size, and URL
|
|
15
|
+
* @returns The newly created MessageFile record
|
|
16
|
+
*/
|
|
5
17
|
create(conversationUniqueId: string, data: CreateMessageFileRequest): Promise<MessageFile>;
|
|
18
|
+
/**
|
|
19
|
+
* Delete a message file
|
|
20
|
+
* @param conversationUniqueId - Unique ID of the conversation the file belongs to
|
|
21
|
+
* @param fileUniqueId - Unique ID of the file to delete
|
|
22
|
+
* @returns void on successful deletion
|
|
23
|
+
*/
|
|
6
24
|
delete(conversationUniqueId: string, fileUniqueId: string): Promise<void>;
|
|
25
|
+
/**
|
|
26
|
+
* Get a presigned URL for direct file upload
|
|
27
|
+
* @param conversationUniqueId - Unique ID of the conversation to upload the file to
|
|
28
|
+
* @param data - File details including filename, content type, and size
|
|
29
|
+
* @returns PresignMessageFileResponse with upload URL, final file URL, form fields, and expiration
|
|
30
|
+
* @note Use the returned uploadUrl and fields to perform a direct upload to storage
|
|
31
|
+
*/
|
|
7
32
|
presign(conversationUniqueId: string, data: PresignMessageFileRequest): Promise<PresignMessageFileResponse>;
|
|
8
33
|
}
|
|
9
34
|
export declare function createMessageFilesService(transport: Transport, _config: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"message-files.service.d.ts","sourceRoot":"","sources":["../../../../src/lib/services/message-files.service.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAErD,OAAO,KAAK,EACV,WAAW,EACX,wBAAwB,EACxB,yBAAyB,EACzB,0BAA0B,EAC3B,MAAM,0BAA0B,CAAC;AAGlC,MAAM,WAAW,mBAAmB;IAClC,GAAG,CAAC,oBAAoB,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"message-files.service.d.ts","sourceRoot":"","sources":["../../../../src/lib/services/message-files.service.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAErD,OAAO,KAAK,EACV,WAAW,EACX,wBAAwB,EACxB,yBAAyB,EACzB,0BAA0B,EAC3B,MAAM,0BAA0B,CAAC;AAGlC,MAAM,WAAW,mBAAmB;IAClC;;;;;OAKG;IACH,GAAG,CAAC,oBAAoB,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC;IAE9E;;;;;OAKG;IACH,MAAM,CAAC,oBAAoB,EAAE,MAAM,EAAE,IAAI,EAAE,wBAAwB,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC;IAE3F;;;;;OAKG;IACH,MAAM,CAAC,oBAAoB,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAE1E;;;;;;OAMG;IACH,OAAO,CAAC,oBAAoB,EAAE,MAAM,EAAE,IAAI,EAAE,yBAAyB,GAAG,OAAO,CAAC,0BAA0B,CAAC,CAAC;CAC7G;AAED,wBAAgB,yBAAyB,CAAC,SAAS,EAAE,SAAS,EAAE,OAAO,EAAE;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,GAAG,mBAAmB,CA2C/G"}
|
|
@@ -1,14 +1,62 @@
|
|
|
1
1
|
import type { Transport, PageResult } from '@23blocks/contracts';
|
|
2
2
|
import type { Message, CreateMessageRequest, UpdateMessageRequest, ListMessagesParams } from '../types/message.js';
|
|
3
3
|
export interface MessagesService {
|
|
4
|
+
/**
|
|
5
|
+
* List all messages
|
|
6
|
+
* @param params - Optional filtering, sorting, and pagination parameters
|
|
7
|
+
* @returns Paginated list of Message records with pagination metadata
|
|
8
|
+
*/
|
|
4
9
|
list(params?: ListMessagesParams): Promise<PageResult<Message>>;
|
|
10
|
+
/**
|
|
11
|
+
* Get a message by unique ID
|
|
12
|
+
* @param uniqueId - Unique ID of the message to retrieve
|
|
13
|
+
* @returns The matching Message record
|
|
14
|
+
*/
|
|
5
15
|
get(uniqueId: string): Promise<Message>;
|
|
16
|
+
/**
|
|
17
|
+
* Create a new message
|
|
18
|
+
* @param data - Message creation payload including content, source, target, and routing fields
|
|
19
|
+
* @returns The newly created Message record
|
|
20
|
+
*/
|
|
6
21
|
create(data: CreateMessageRequest): Promise<Message>;
|
|
22
|
+
/**
|
|
23
|
+
* Update a message
|
|
24
|
+
* @param uniqueId - Unique ID of the message to update
|
|
25
|
+
* @param data - Fields to update (content, status, enabled, payload)
|
|
26
|
+
* @returns The updated Message record
|
|
27
|
+
*/
|
|
7
28
|
update(uniqueId: string, data: UpdateMessageRequest): Promise<Message>;
|
|
29
|
+
/**
|
|
30
|
+
* Delete a message (soft delete)
|
|
31
|
+
* @param uniqueId - Unique ID of the message to delete
|
|
32
|
+
* @returns void on successful deletion
|
|
33
|
+
*/
|
|
8
34
|
delete(uniqueId: string): Promise<void>;
|
|
35
|
+
/**
|
|
36
|
+
* Recover a previously deleted message
|
|
37
|
+
* @param uniqueId - Unique ID of the deleted message to recover
|
|
38
|
+
* @returns The recovered Message record
|
|
39
|
+
*/
|
|
9
40
|
recover(uniqueId: string): Promise<Message>;
|
|
41
|
+
/**
|
|
42
|
+
* List messages filtered by context
|
|
43
|
+
* @param contextId - Context identifier to filter by
|
|
44
|
+
* @param params - Optional sorting and pagination parameters
|
|
45
|
+
* @returns Paginated list of Message records for the given context
|
|
46
|
+
*/
|
|
10
47
|
listByContext(contextId: string, params?: ListMessagesParams): Promise<PageResult<Message>>;
|
|
48
|
+
/**
|
|
49
|
+
* List messages filtered by parent message
|
|
50
|
+
* @param parentId - Parent message ID to filter replies
|
|
51
|
+
* @param params - Optional sorting and pagination parameters
|
|
52
|
+
* @returns Paginated list of child Message records for the given parent
|
|
53
|
+
*/
|
|
11
54
|
listByParent(parentId: string, params?: ListMessagesParams): Promise<PageResult<Message>>;
|
|
55
|
+
/**
|
|
56
|
+
* List soft-deleted messages
|
|
57
|
+
* @param params - Optional pagination parameters
|
|
58
|
+
* @returns Paginated list of deleted Message records with pagination metadata
|
|
59
|
+
*/
|
|
12
60
|
listDeleted(params?: ListMessagesParams): Promise<PageResult<Message>>;
|
|
13
61
|
}
|
|
14
62
|
export declare function createMessagesService(transport: Transport, _config: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"messages.service.d.ts","sourceRoot":"","sources":["../../../../src/lib/services/messages.service.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEjE,OAAO,KAAK,EACV,OAAO,EACP,oBAAoB,EACpB,oBAAoB,EACpB,kBAAkB,EACnB,MAAM,qBAAqB,CAAC;AAG7B,MAAM,WAAW,eAAe;IAC9B,IAAI,CAAC,MAAM,CAAC,EAAE,kBAAkB,GAAG,OAAO,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"messages.service.d.ts","sourceRoot":"","sources":["../../../../src/lib/services/messages.service.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEjE,OAAO,KAAK,EACV,OAAO,EACP,oBAAoB,EACpB,oBAAoB,EACpB,kBAAkB,EACnB,MAAM,qBAAqB,CAAC;AAG7B,MAAM,WAAW,eAAe;IAC9B;;;;OAIG;IACH,IAAI,CAAC,MAAM,CAAC,EAAE,kBAAkB,GAAG,OAAO,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC,CAAC;IAEhE;;;;OAIG;IACH,GAAG,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IAExC;;;;OAIG;IACH,MAAM,CAAC,IAAI,EAAE,oBAAoB,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IAErD;;;;;OAKG;IACH,MAAM,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,oBAAoB,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IAEvE;;;;OAIG;IACH,MAAM,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAExC;;;;OAIG;IACH,OAAO,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IAE5C;;;;;OAKG;IACH,aAAa,CAAC,SAAS,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,kBAAkB,GAAG,OAAO,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC,CAAC;IAE5F;;;;;OAKG;IACH,YAAY,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,kBAAkB,GAAG,OAAO,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC,CAAC;IAE1F;;;;OAIG;IACH,WAAW,CAAC,MAAM,CAAC,EAAE,kBAAkB,GAAG,OAAO,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC,CAAC;CACxE;AAED,wBAAgB,qBAAqB,CAAC,SAAS,EAAE,SAAS,EAAE,OAAO,EAAE;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,GAAG,eAAe,CA6GvG"}
|
|
@@ -1,7 +1,18 @@
|
|
|
1
1
|
import type { Transport } from '@23blocks/contracts';
|
|
2
2
|
import type { NotificationSettings, UpdateNotificationSettingsRequest } from '../types/notification-settings.js';
|
|
3
3
|
export interface NotificationSettingsService {
|
|
4
|
+
/**
|
|
5
|
+
* Get notification settings for a user
|
|
6
|
+
* @param userUniqueId - Unique ID of the user
|
|
7
|
+
* @returns NotificationSettings with channel toggles, quiet hours, timezone, and preferences
|
|
8
|
+
*/
|
|
4
9
|
get(userUniqueId: string): Promise<NotificationSettings>;
|
|
10
|
+
/**
|
|
11
|
+
* Update notification settings for a user
|
|
12
|
+
* @param userUniqueId - Unique ID of the user
|
|
13
|
+
* @param data - Settings fields to update (channel toggles, quiet hours, timezone, preferences)
|
|
14
|
+
* @returns The updated NotificationSettings record
|
|
15
|
+
*/
|
|
5
16
|
update(userUniqueId: string, data: UpdateNotificationSettingsRequest): Promise<NotificationSettings>;
|
|
6
17
|
}
|
|
7
18
|
export declare function createNotificationSettingsService(transport: Transport, _config: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"notification-settings.service.d.ts","sourceRoot":"","sources":["../../../../src/lib/services/notification-settings.service.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,KAAK,EACV,oBAAoB,EACpB,iCAAiC,EAClC,MAAM,mCAAmC,CAAC;AAE3C,MAAM,WAAW,2BAA2B;IAC1C,GAAG,CAAC,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"notification-settings.service.d.ts","sourceRoot":"","sources":["../../../../src/lib/services/notification-settings.service.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,KAAK,EACV,oBAAoB,EACpB,iCAAiC,EAClC,MAAM,mCAAmC,CAAC;AAE3C,MAAM,WAAW,2BAA2B;IAC1C;;;;OAIG;IACH,GAAG,CAAC,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAAC;IAEzD;;;;;OAKG;IACH,MAAM,CAAC,YAAY,EAAE,MAAM,EAAE,IAAI,EAAE,iCAAiC,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAAC;CACtG;AAED,wBAAgB,iCAAiC,CAAC,SAAS,EAAE,SAAS,EAAE,OAAO,EAAE;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,GAAG,2BAA2B,CAmD/H"}
|
|
@@ -1,14 +1,62 @@
|
|
|
1
1
|
import type { Transport, PageResult } from '@23blocks/contracts';
|
|
2
2
|
import type { Notification, CreateNotificationRequest, UpdateNotificationRequest, ListNotificationsParams } from '../types/notification.js';
|
|
3
3
|
export interface NotificationsService {
|
|
4
|
+
/**
|
|
5
|
+
* List all notifications
|
|
6
|
+
* @param params - Optional filtering, sorting, and pagination parameters
|
|
7
|
+
* @returns Paginated list of Notification records with pagination metadata
|
|
8
|
+
*/
|
|
4
9
|
list(params?: ListNotificationsParams): Promise<PageResult<Notification>>;
|
|
10
|
+
/**
|
|
11
|
+
* Get a notification by unique ID
|
|
12
|
+
* @param uniqueId - Unique ID of the notification to retrieve
|
|
13
|
+
* @returns The matching Notification record
|
|
14
|
+
*/
|
|
5
15
|
get(uniqueId: string): Promise<Notification>;
|
|
16
|
+
/**
|
|
17
|
+
* Create a new notification
|
|
18
|
+
* @param data - Notification creation payload including content, source, target, and delivery options
|
|
19
|
+
* @returns The newly created Notification record
|
|
20
|
+
*/
|
|
6
21
|
create(data: CreateNotificationRequest): Promise<Notification>;
|
|
22
|
+
/**
|
|
23
|
+
* Update a notification
|
|
24
|
+
* @param uniqueId - Unique ID of the notification to update
|
|
25
|
+
* @param data - Fields to update (content, url, status, payload)
|
|
26
|
+
* @returns The updated Notification record
|
|
27
|
+
*/
|
|
7
28
|
update(uniqueId: string, data: UpdateNotificationRequest): Promise<Notification>;
|
|
29
|
+
/**
|
|
30
|
+
* Delete a notification
|
|
31
|
+
* @param uniqueId - Unique ID of the notification to delete
|
|
32
|
+
* @returns void on successful deletion
|
|
33
|
+
*/
|
|
8
34
|
delete(uniqueId: string): Promise<void>;
|
|
35
|
+
/**
|
|
36
|
+
* Mark a notification as read
|
|
37
|
+
* @param uniqueId - Unique ID of the notification to mark as read
|
|
38
|
+
* @returns The updated Notification record with read status
|
|
39
|
+
*/
|
|
9
40
|
markAsRead(uniqueId: string): Promise<Notification>;
|
|
41
|
+
/**
|
|
42
|
+
* Mark a notification as unread
|
|
43
|
+
* @param uniqueId - Unique ID of the notification to mark as unread
|
|
44
|
+
* @returns The updated Notification record with unread status
|
|
45
|
+
*/
|
|
10
46
|
markAsUnread(uniqueId: string): Promise<Notification>;
|
|
47
|
+
/**
|
|
48
|
+
* List notifications filtered by target
|
|
49
|
+
* @param targetId - Target ID to filter notifications for
|
|
50
|
+
* @param params - Optional sorting and pagination parameters
|
|
51
|
+
* @returns Paginated list of Notification records for the given target
|
|
52
|
+
*/
|
|
11
53
|
listByTarget(targetId: string, params?: ListNotificationsParams): Promise<PageResult<Notification>>;
|
|
54
|
+
/**
|
|
55
|
+
* List unread notifications
|
|
56
|
+
* @param params - Optional filtering and pagination parameters
|
|
57
|
+
* @returns Paginated list of unread Notification records
|
|
58
|
+
* @note Automatically filters by status "pending"
|
|
59
|
+
*/
|
|
12
60
|
listUnread(params?: ListNotificationsParams): Promise<PageResult<Notification>>;
|
|
13
61
|
}
|
|
14
62
|
export declare function createNotificationsService(transport: Transport, _config: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"notifications.service.d.ts","sourceRoot":"","sources":["../../../../src/lib/services/notifications.service.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEjE,OAAO,KAAK,EACV,YAAY,EACZ,yBAAyB,EACzB,yBAAyB,EACzB,uBAAuB,EACxB,MAAM,0BAA0B,CAAC;AAGlC,MAAM,WAAW,oBAAoB;IACnC,IAAI,CAAC,MAAM,CAAC,EAAE,uBAAuB,GAAG,OAAO,CAAC,UAAU,CAAC,YAAY,CAAC,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"notifications.service.d.ts","sourceRoot":"","sources":["../../../../src/lib/services/notifications.service.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEjE,OAAO,KAAK,EACV,YAAY,EACZ,yBAAyB,EACzB,yBAAyB,EACzB,uBAAuB,EACxB,MAAM,0BAA0B,CAAC;AAGlC,MAAM,WAAW,oBAAoB;IACnC;;;;OAIG;IACH,IAAI,CAAC,MAAM,CAAC,EAAE,uBAAuB,GAAG,OAAO,CAAC,UAAU,CAAC,YAAY,CAAC,CAAC,CAAC;IAE1E;;;;OAIG;IACH,GAAG,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,CAAC,CAAC;IAE7C;;;;OAIG;IACH,MAAM,CAAC,IAAI,EAAE,yBAAyB,GAAG,OAAO,CAAC,YAAY,CAAC,CAAC;IAE/D;;;;;OAKG;IACH,MAAM,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,yBAAyB,GAAG,OAAO,CAAC,YAAY,CAAC,CAAC;IAEjF;;;;OAIG;IACH,MAAM,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAExC;;;;OAIG;IACH,UAAU,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,CAAC,CAAC;IAEpD;;;;OAIG;IACH,YAAY,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,CAAC,CAAC;IAEtD;;;;;OAKG;IACH,YAAY,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,uBAAuB,GAAG,OAAO,CAAC,UAAU,CAAC,YAAY,CAAC,CAAC,CAAC;IAEpG;;;;;OAKG;IACH,UAAU,CAAC,MAAM,CAAC,EAAE,uBAAuB,GAAG,OAAO,CAAC,UAAU,CAAC,YAAY,CAAC,CAAC,CAAC;CACjF;AAED,wBAAgB,0BAA0B,CAAC,SAAS,EAAE,SAAS,EAAE,OAAO,EAAE;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,GAAG,oBAAoB,CA4FjH"}
|
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
import type { Transport } from '@23blocks/contracts';
|
|
2
2
|
import type { Source } from '../types/source.js';
|
|
3
3
|
export interface SourcesService {
|
|
4
|
+
/**
|
|
5
|
+
* Get a source by unique ID
|
|
6
|
+
* @param uniqueId - Unique ID of the source to retrieve
|
|
7
|
+
* @returns The matching Source record
|
|
8
|
+
*/
|
|
4
9
|
get(uniqueId: string): Promise<Source>;
|
|
5
10
|
}
|
|
6
11
|
export declare function createSourcesService(transport: Transport, _config: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sources.service.d.ts","sourceRoot":"","sources":["../../../../src/lib/services/sources.service.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAErD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAGjD,MAAM,WAAW,cAAc;IAC7B,GAAG,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;CACxC;AAED,wBAAgB,oBAAoB,CAAC,SAAS,EAAE,SAAS,EAAE,OAAO,EAAE;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,GAAG,cAAc,CAOrG"}
|
|
1
|
+
{"version":3,"file":"sources.service.d.ts","sourceRoot":"","sources":["../../../../src/lib/services/sources.service.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAErD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAGjD,MAAM,WAAW,cAAc;IAC7B;;;;OAIG;IACH,GAAG,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;CACxC;AAED,wBAAgB,oBAAoB,CAAC,SAAS,EAAE,SAAS,EAAE,OAAO,EAAE;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,GAAG,cAAc,CAOrG"}
|
|
@@ -3,19 +3,66 @@ import type { ConversationsUser, RegisterUserRequest, UpdateUserRequest, ListUse
|
|
|
3
3
|
import type { Group } from '../types/group.js';
|
|
4
4
|
import type { Conversation } from '../types/conversation.js';
|
|
5
5
|
export interface UsersService {
|
|
6
|
+
/**
|
|
7
|
+
* List all conversations users
|
|
8
|
+
* @param params - Optional filtering, sorting, and pagination parameters
|
|
9
|
+
* @returns Paginated list of ConversationsUser records with pagination metadata
|
|
10
|
+
*/
|
|
6
11
|
list(params?: ListUsersParams): Promise<PageResult<ConversationsUser>>;
|
|
12
|
+
/**
|
|
13
|
+
* Get a conversations user by unique ID
|
|
14
|
+
* @param uniqueId - Unique ID of the user to retrieve
|
|
15
|
+
* @returns The matching ConversationsUser record
|
|
16
|
+
*/
|
|
7
17
|
get(uniqueId: string): Promise<ConversationsUser>;
|
|
18
|
+
/**
|
|
19
|
+
* Register a user in the conversations system
|
|
20
|
+
* @param uniqueId - Unique ID of the user to register
|
|
21
|
+
* @param data - Optional registration payload with profile details
|
|
22
|
+
* @returns The newly registered ConversationsUser record
|
|
23
|
+
*/
|
|
8
24
|
register(uniqueId: string, data?: RegisterUserRequest): Promise<ConversationsUser>;
|
|
25
|
+
/**
|
|
26
|
+
* Update a conversations user's profile
|
|
27
|
+
* @param uniqueId - Unique ID of the user to update
|
|
28
|
+
* @param data - Fields to update on the user profile
|
|
29
|
+
* @returns The updated ConversationsUser record
|
|
30
|
+
*/
|
|
9
31
|
update(uniqueId: string, data: UpdateUserRequest): Promise<ConversationsUser>;
|
|
32
|
+
/**
|
|
33
|
+
* List groups that a user belongs to
|
|
34
|
+
* @param uniqueId - Unique ID of the user
|
|
35
|
+
* @returns Paginated list of Group records the user is a member of
|
|
36
|
+
*/
|
|
10
37
|
listGroups(uniqueId: string): Promise<PageResult<Group>>;
|
|
38
|
+
/**
|
|
39
|
+
* List conversations for a user
|
|
40
|
+
* @param uniqueId - Unique ID of the user
|
|
41
|
+
* @param params - Optional pagination parameters
|
|
42
|
+
* @returns Paginated list of Conversation records (messages and files are empty; use conversations.get for full data)
|
|
43
|
+
* @note Returned conversations contain empty messages and files arrays; fetch individual conversations for full content
|
|
44
|
+
*/
|
|
11
45
|
listConversations(uniqueId: string, params?: {
|
|
12
46
|
page?: number;
|
|
13
47
|
perPage?: number;
|
|
14
48
|
}): Promise<PageResult<Conversation>>;
|
|
49
|
+
/**
|
|
50
|
+
* List group conversations for a user
|
|
51
|
+
* @param uniqueId - Unique ID of the user
|
|
52
|
+
* @param params - Optional pagination parameters
|
|
53
|
+
* @returns Paginated list of group Conversation records (messages and files are empty)
|
|
54
|
+
* @note Returned conversations contain empty messages and files arrays; fetch individual conversations for full content
|
|
55
|
+
*/
|
|
15
56
|
listGroupConversations(uniqueId: string, params?: {
|
|
16
57
|
page?: number;
|
|
17
58
|
perPage?: number;
|
|
18
59
|
}): Promise<PageResult<Conversation>>;
|
|
60
|
+
/**
|
|
61
|
+
* List groups for a user within a specific context
|
|
62
|
+
* @param uniqueId - Unique ID of the user
|
|
63
|
+
* @param contextUniqueId - Unique ID of the context to filter groups by
|
|
64
|
+
* @returns Paginated list of Group records within the specified context
|
|
65
|
+
*/
|
|
19
66
|
listContextGroups(uniqueId: string, contextUniqueId: string): Promise<PageResult<Group>>;
|
|
20
67
|
}
|
|
21
68
|
export declare function createUsersService(transport: Transport, _config: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"users.service.d.ts","sourceRoot":"","sources":["../../../../src/lib/services/users.service.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEjE,OAAO,KAAK,EACV,iBAAiB,EACjB,mBAAmB,EACnB,iBAAiB,EACjB,eAAe,EAChB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAK7D,MAAM,WAAW,YAAY;IAC3B,IAAI,CAAC,MAAM,CAAC,EAAE,eAAe,GAAG,OAAO,CAAC,UAAU,CAAC,iBAAiB,CAAC,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"users.service.d.ts","sourceRoot":"","sources":["../../../../src/lib/services/users.service.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEjE,OAAO,KAAK,EACV,iBAAiB,EACjB,mBAAmB,EACnB,iBAAiB,EACjB,eAAe,EAChB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAK7D,MAAM,WAAW,YAAY;IAC3B;;;;OAIG;IACH,IAAI,CAAC,MAAM,CAAC,EAAE,eAAe,GAAG,OAAO,CAAC,UAAU,CAAC,iBAAiB,CAAC,CAAC,CAAC;IAEvE;;;;OAIG;IACH,GAAG,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAAC;IAElD;;;;;OAKG;IACH,QAAQ,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,mBAAmB,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAAC;IAEnF;;;;;OAKG;IACH,MAAM,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,iBAAiB,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAAC;IAE9E;;;;OAIG;IACH,UAAU,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC;IAEzD;;;;;;OAMG;IACH,iBAAiB,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE;QAAE,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,OAAO,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,UAAU,CAAC,YAAY,CAAC,CAAC,CAAC;IAErH;;;;;;OAMG;IACH,sBAAsB,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE;QAAE,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,OAAO,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,UAAU,CAAC,YAAY,CAAC,CAAC,CAAC;IAE1H;;;;;OAKG;IACH,iBAAiB,CAAC,QAAQ,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC;CAC1F;AAED,wBAAgB,kBAAkB,CAAC,SAAS,EAAE,SAAS,EAAE,OAAO,EAAE;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,GAAG,YAAY,CA8GjG"}
|
|
@@ -1,18 +1,58 @@
|
|
|
1
1
|
import type { Transport, PageResult } from '@23blocks/contracts';
|
|
2
2
|
import type { WebNotification, CreateWebNotificationRequest, BulkWebNotificationRequest, ListWebNotificationsParams } from '../types/web-notification.js';
|
|
3
3
|
export interface WebNotificationsService {
|
|
4
|
+
/**
|
|
5
|
+
* List all web notifications
|
|
6
|
+
* @param params - Optional filtering, sorting, and pagination parameters
|
|
7
|
+
* @returns Paginated list of WebNotification records with pagination metadata
|
|
8
|
+
*/
|
|
4
9
|
list(params?: ListWebNotificationsParams): Promise<PageResult<WebNotification>>;
|
|
10
|
+
/**
|
|
11
|
+
* Get a web notification by unique ID
|
|
12
|
+
* @param uniqueId - Unique ID of the web notification to retrieve
|
|
13
|
+
* @returns The matching WebNotification record
|
|
14
|
+
*/
|
|
5
15
|
get(uniqueId: string): Promise<WebNotification>;
|
|
16
|
+
/**
|
|
17
|
+
* Send a web notification to a single recipient
|
|
18
|
+
* @param data - Notification payload including recipient, title, body, and optional action URL
|
|
19
|
+
* @returns The newly created WebNotification record
|
|
20
|
+
*/
|
|
6
21
|
send(data: CreateWebNotificationRequest): Promise<WebNotification>;
|
|
22
|
+
/**
|
|
23
|
+
* Send a web notification to multiple recipients
|
|
24
|
+
* @param data - Bulk notification payload including recipient IDs, title, body, and optional action URL
|
|
25
|
+
* @returns Object with sent and failed counts indicating delivery results
|
|
26
|
+
*/
|
|
7
27
|
sendBulk(data: BulkWebNotificationRequest): Promise<{
|
|
8
28
|
sent: number;
|
|
9
29
|
failed: number;
|
|
10
30
|
}>;
|
|
31
|
+
/**
|
|
32
|
+
* Mark a web notification as read
|
|
33
|
+
* @param uniqueId - Unique ID of the web notification to mark as read
|
|
34
|
+
* @returns The updated WebNotification record with read status
|
|
35
|
+
*/
|
|
11
36
|
markAsRead(uniqueId: string): Promise<WebNotification>;
|
|
37
|
+
/**
|
|
38
|
+
* Mark a web notification as clicked
|
|
39
|
+
* @param uniqueId - Unique ID of the web notification to mark as clicked
|
|
40
|
+
* @returns The updated WebNotification record with clicked status
|
|
41
|
+
*/
|
|
12
42
|
markAsClicked(uniqueId: string): Promise<WebNotification>;
|
|
43
|
+
/**
|
|
44
|
+
* Mark all web notifications as read for a recipient
|
|
45
|
+
* @param recipientUniqueId - Unique ID of the recipient whose notifications should be marked as read
|
|
46
|
+
* @returns Object with the count of updated notifications
|
|
47
|
+
*/
|
|
13
48
|
markAllAsRead(recipientUniqueId: string): Promise<{
|
|
14
49
|
updated: number;
|
|
15
50
|
}>;
|
|
51
|
+
/**
|
|
52
|
+
* Delete a web notification
|
|
53
|
+
* @param uniqueId - Unique ID of the web notification to delete
|
|
54
|
+
* @returns void on successful deletion
|
|
55
|
+
*/
|
|
16
56
|
delete(uniqueId: string): Promise<void>;
|
|
17
57
|
}
|
|
18
58
|
export declare function createWebNotificationsService(transport: Transport, _config: {
|
|
@@ -1 +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,8BAA8B,CAAC;AAGtC,MAAM,WAAW,uBAAuB;IACtC,IAAI,CAAC,MAAM,CAAC,EAAE,0BAA0B,GAAG,OAAO,CAAC,UAAU,CAAC,eAAe,CAAC,CAAC,CAAC;
|
|
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,8BAA8B,CAAC;AAGtC,MAAM,WAAW,uBAAuB;IACtC;;;;OAIG;IACH,IAAI,CAAC,MAAM,CAAC,EAAE,0BAA0B,GAAG,OAAO,CAAC,UAAU,CAAC,eAAe,CAAC,CAAC,CAAC;IAEhF;;;;OAIG;IACH,GAAG,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,eAAe,CAAC,CAAC;IAEhD;;;;OAIG;IACH,IAAI,CAAC,IAAI,EAAE,4BAA4B,GAAG,OAAO,CAAC,eAAe,CAAC,CAAC;IAEnE;;;;OAIG;IACH,QAAQ,CAAC,IAAI,EAAE,0BAA0B,GAAG,OAAO,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAEtF;;;;OAIG;IACH,UAAU,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,eAAe,CAAC,CAAC;IAEvD;;;;OAIG;IACH,aAAa,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,eAAe,CAAC,CAAC;IAE1D;;;;OAIG;IACH,aAAa,CAAC,iBAAiB,EAAE,MAAM,GAAG,OAAO,CAAC;QAAE,OAAO,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAEvE;;;;OAIG;IACH,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"}
|
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
import type { Transport } from '@23blocks/contracts';
|
|
2
2
|
import type { CreateWebSocketTokenRequest, CreateWebSocketTokenResponse } from '../types/websocket-token.js';
|
|
3
3
|
export interface WebSocketTokensService {
|
|
4
|
+
/**
|
|
5
|
+
* Create a WebSocket authentication token
|
|
6
|
+
* @param data - Optional request with channel and user ID
|
|
7
|
+
* @returns CreateWebSocketTokenResponse with token, channel, URL, and optional expiration
|
|
8
|
+
*/
|
|
4
9
|
create(data?: CreateWebSocketTokenRequest): Promise<CreateWebSocketTokenResponse>;
|
|
5
10
|
}
|
|
6
11
|
export declare function createWebSocketTokensService(transport: Transport, _config: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"websocket-tokens.service.d.ts","sourceRoot":"","sources":["../../../../src/lib/services/websocket-tokens.service.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,KAAK,EACV,2BAA2B,EAC3B,4BAA4B,EAC7B,MAAM,6BAA6B,CAAC;AAErC,MAAM,WAAW,sBAAsB;IACrC,MAAM,CAAC,IAAI,CAAC,EAAE,2BAA2B,GAAG,OAAO,CAAC,4BAA4B,CAAC,CAAC;CACnF;AAED,wBAAgB,4BAA4B,CAAC,SAAS,EAAE,SAAS,EAAE,OAAO,EAAE;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,GAAG,sBAAsB,CAmBrH"}
|
|
1
|
+
{"version":3,"file":"websocket-tokens.service.d.ts","sourceRoot":"","sources":["../../../../src/lib/services/websocket-tokens.service.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,KAAK,EACV,2BAA2B,EAC3B,4BAA4B,EAC7B,MAAM,6BAA6B,CAAC;AAErC,MAAM,WAAW,sBAAsB;IACrC;;;;OAIG;IACH,MAAM,CAAC,IAAI,CAAC,EAAE,2BAA2B,GAAG,OAAO,CAAC,4BAA4B,CAAC,CAAC;CACnF;AAED,wBAAgB,4BAA4B,CAAC,SAAS,EAAE,SAAS,EAAE,OAAO,EAAE;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,GAAG,sBAAsB,CAmBrH"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@23blocks/block-conversations",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.4.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>",
|