@conduitplatform/grpc-sdk 0.16.26 → 0.16.29

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.
@@ -1,9 +1,12 @@
1
1
  import { ConduitModule } from '../../classes/index.js';
2
2
  import { ChatDefinition, Room, SendMessageRequest } from '../../protoUtils/chat.js';
3
+ export type SendMessageInput = Omit<SendMessageRequest, 'files'> & {
4
+ files?: SendMessageRequest['files'];
5
+ };
3
6
  export declare class Chat extends ConduitModule<typeof ChatDefinition> {
4
7
  private readonly moduleName;
5
8
  constructor(moduleName: string, url: string, grpcToken?: string);
6
- sendMessage(messageData: SendMessageRequest): Promise<any>;
9
+ sendMessage(messageData: SendMessageInput): Promise<any>;
7
10
  createRoom(name: string, participants: string[]): Promise<Room>;
8
11
  deleteRoom(id: string): Promise<Room>;
9
12
  }
@@ -8,17 +8,15 @@ export declare class PushNotifications extends ConduitModule<typeof PushNotifica
8
8
  getNotificationTokens(userId: string): Promise<any[]>;
9
9
  sendNotification(sendTo: string, title: string, body?: string, data?: string, platform?: string, doNotStore?: boolean, isSilent?: boolean): Promise<SendNotificationResponse>;
10
10
  sendNotification(sendTo: string, title: string, options?: SendNotificationOptions): Promise<SendNotificationResponse>;
11
- sendManyNotifications(notifications: [
12
- {
13
- sendTo: string;
14
- title: string;
15
- body?: string;
16
- data?: string;
17
- platform?: string;
18
- doNotStore?: boolean;
19
- isSilent?: boolean;
20
- }
21
- ]): Promise<SendNotificationResponse>;
11
+ sendManyNotifications(notifications: {
12
+ sendTo: string;
13
+ title: string;
14
+ body?: string;
15
+ data?: string;
16
+ platform?: string;
17
+ doNotStore?: boolean;
18
+ isSilent?: boolean;
19
+ }[]): Promise<SendNotificationResponse>;
22
20
  sendNotificationToManyDevices(sendTo: string[], title: string, body?: string, data?: string, platform?: string, doNotStore?: boolean, isSilent?: boolean): Promise<SendNotificationResponse>;
23
21
  sendNotificationToManyDevices(sendTo: string[], title: string, options?: SendNotificationOptions): Promise<SendNotificationResponse>;
24
22
  }
@@ -10,6 +10,7 @@ export interface SendMessageRequest {
10
10
  roomId: string;
11
11
  messageType?: string | undefined;
12
12
  persist?: boolean | undefined;
13
+ files: string[];
13
14
  }
14
15
  export interface DeleteRoomRequest {
15
16
  _id: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@conduitplatform/grpc-sdk",
3
- "version": "0.16.26",
3
+ "version": "0.16.29",
4
4
  "main": "dist/index.cjs",
5
5
  "module": "dist/index.esm.js",
6
6
  "types": "dist/index.d.ts",