ncloudchat 1.0.63 → 1.0.65

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.
@@ -0,0 +1,1446 @@
1
+ declare module 'ncloudchat/CloudChat' {
2
+ /**
3
+ * Copyright (c) NBASE CORP. and its affiliates.
4
+ *
5
+ * This source code is licensed under the MIT license found in the
6
+ * LICENSE file in the root directory of this source tree.
7
+ */
8
+ import type { ChannelInput, MarkInput, PinInput } from "ncloudchat/Type";
9
+ /**
10
+ * Class NCloudChat holds all the NCloudChat functionalities.
11
+ *
12
+ * @class
13
+ */
14
+ export default class NCloudChat {
15
+ private dp;
16
+ private socket;
17
+ private connected;
18
+ private connectedCount;
19
+ /**
20
+ * Create a `NCloudChat` instance and a Dispatcher.
21
+ *
22
+ * @constructs
23
+ */
24
+ constructor(debug?: boolean);
25
+ clear(): void;
26
+ /**
27
+ * Initialize a new `NCloudChat` instance of project and user.
28
+ *
29
+ * @function initialize
30
+ * @param {string} projectId - The id of a project.
31
+ */
32
+ initialize(projectId: string, region?: string): void;
33
+ getDebug(): any;
34
+ setDebug(debug: boolean): void;
35
+ getLang(): any;
36
+ setLang(lang: string): void;
37
+ getRegion(): any;
38
+ setRegion(region: string): void;
39
+ getUser(): any;
40
+ getProjectId(): any;
41
+ setServerUrl(url: string): void;
42
+ setSocketUrl(url: string): void;
43
+ setProjectId(projectId: string): void;
44
+ setToken(token: string): void;
45
+ getToken(): any;
46
+ setUser(user: any): void;
47
+ /**
48
+ * Decodes a base-64 encoded string.
49
+ *
50
+ * @function ObjectId
51
+ * @param {string} id - An encoded string to be decoded.
52
+ * @returns {string} decoded string.
53
+ */
54
+ ObjectId(id: string): string;
55
+ private handleBase64Ids;
56
+ private inputValidation;
57
+ /**
58
+ * Create a connection between a socket and a client.
59
+ *
60
+ * @async connect
61
+ * @param {any} user
62
+ * @param {string} userToken
63
+ * @returns
64
+ */
65
+ connect(user: any, userToken?: string): Promise<any>;
66
+ /**
67
+ * update user
68
+ * @async
69
+ * @function updateUser
70
+ * @param {any} update
71
+ * @returns {Promise<any>}
72
+ */
73
+ updateUser(update: any): Promise<any>;
74
+ /**
75
+ * Mute channel notifications.
76
+ *
77
+ * @async
78
+ * @function mute
79
+ * @param {string} channel
80
+ * @returns {Promise<any>}
81
+ */
82
+ mute(channel: string): Promise<any>;
83
+ /**
84
+ * Unmute channel notifications.
85
+ *
86
+ * @async
87
+ * @function unmute
88
+ * @param {string} channel
89
+ * @returns {Promise<any>}
90
+ */
91
+ unmute(channel: string): Promise<any>;
92
+ /**
93
+ * Subscribe a channel.
94
+ *
95
+ * @async
96
+ * @function subscibe
97
+ * @param {string} channel - The id of a channel.
98
+ * @param {any} option
99
+ * @returns
100
+ */
101
+ subscribe(channel: string, option?: any): Promise<any>;
102
+ /**
103
+ * Unsubscribe from a channel.
104
+ *
105
+ * @async
106
+ * @function unsubscribe
107
+ * @param {string} channel - The id of a chennel
108
+ * @returns {Promise<any>}
109
+ */
110
+ unsubscribe(channel: string): Promise<any>;
111
+ /**
112
+ * Translate and send a message.
113
+ *
114
+ * @async
115
+ * @function translateMessage
116
+ * @param {string} source - The source language of the message.
117
+ * @param {string} target - The target language for translation.
118
+ * @param {string} content - The content of the message to be translated.
119
+ * @returns {Promise<Message?>} - Returns a Promise of the translated message or null.
120
+ * @throws {Exception} - Throws an exception if any of the required parameters are missing.
121
+ */
122
+ translateMessage(channelId: string, source: string, target: string, message: string): Promise<any>;
123
+ /**
124
+ * Send a message to a channel.
125
+ *
126
+ * @async
127
+ * @function sendMessage
128
+ * @param {string} channel - The id of a channel.
129
+ * @param {any} opt
130
+ * @returns {Promise<any>}
131
+ */
132
+ sendMessage(channel: string, opt: any): Promise<any>;
133
+ /**
134
+ * Send an express message to a channel.
135
+ *
136
+ * @async
137
+ * @function sendExpressMessage
138
+ * @param {string} channel - The id of a channel.
139
+ * @param {any} opt
140
+ * @returns {Promise<any>}
141
+ */
142
+ sendExpressMessage(channel: string, opt: any): Promise<any>;
143
+ /**
144
+ * Send an image to a channel. Only supports png, jpg, jpeg file types.
145
+ *
146
+ * @async
147
+ * @function sendImage
148
+ * @param {string} channelId - The id of a channel.
149
+ * @param {any} file - An image file.
150
+ * @returns {Promise<any>}
151
+ */
152
+ sendImage(channelId: string, file: any): Promise<any>;
153
+ /**
154
+ * Send an file to a channel.
155
+ *
156
+ * @async
157
+ * @function sendFile
158
+ * @param {string} channelId - The id of a channel.
159
+ * @param {any} file - An image file.
160
+ * @returns {Promise<any>}
161
+ */
162
+ sendFile(channelId: string, file: any): Promise<any>;
163
+ /**
164
+ * Update a message.
165
+ *
166
+ * @todo
167
+ * @async
168
+ * @function updateMessage
169
+ * @param {string} channel
170
+ * @param {string} message_id
171
+ * @param {string} message
172
+ */
173
+ updateMessage(channel: string, message_id: string, message: string): Promise<void>;
174
+ /**
175
+ * Delete a message.
176
+ * @async
177
+ * @function deleteMessage
178
+ * @param {string} channel
179
+ * @param {string} message_id
180
+ */
181
+ deleteMessage(channel: string, message_id: string): Promise<any>;
182
+ /**
183
+ * Disconnect from a socket.
184
+ *
185
+ * @async
186
+ * @function disconnect
187
+ * @returns
188
+ */
189
+ disconnect(): Promise<void>;
190
+ /**
191
+ * Check if a client is connected to a socket.
192
+ *
193
+ * @function isConnected
194
+ * @returns {boolean}
195
+ */
196
+ isConnected(): boolean;
197
+ isSocketConnected(): boolean;
198
+ /**
199
+ * Bind fn event handlers.
200
+ *
201
+ * @async
202
+ * @function bind
203
+ * @param {string} id
204
+ * @param {any} fn
205
+ */
206
+ bind(id: string, fn: any): Promise<void>;
207
+ /**
208
+ * Unbind fn event handlers.
209
+ *
210
+ * @async
211
+ * @function unbind
212
+ * @param {string} id
213
+ * @param {any} fn
214
+ */
215
+ unbind(id: string): Promise<void>;
216
+ /**
217
+ * Unbind all event handlers.
218
+ * @param id
219
+ */
220
+ unbindall(id: string): Promise<void>;
221
+ /**
222
+ * Get current friends list of all status.
223
+ *
224
+ * @async
225
+ * @function getFriendships
226
+ * @param {string} filter - Field value for filter.
227
+ * @param {string} sort - Field value for sorting.
228
+ * @param {string} option - Optional option: ex) offset, per_page.
229
+ * @returns {Promise<any>}
230
+ */
231
+ getFriendships(filter: any, sort?: any, option?: any): Promise<any>;
232
+ /**
233
+ * Get member blocks.
234
+ *
235
+ * @async
236
+ * @function getBannedUsers
237
+ * @param {string} filter - Field value for filter.
238
+ * @param {string} sort - Field value for sorting.
239
+ * @param {string} option - Optional option: ex) offset, per_page.
240
+ * @returns {Promise<any>}
241
+ */
242
+ getBannedUsers(filter: any, sort?: any, option?: any): Promise<any>;
243
+ /**
244
+ * Get information data of the member.
245
+ *
246
+ * @async
247
+ * @function getUsers
248
+ * @param {string} filter - Field value for filter.
249
+ * @param {string} sort - Field value for sorting.
250
+ * @param {string} option - Optional option: ex) offset, per_page.
251
+ * @returns {Promise<any>}
252
+ */
253
+ getUsers(filter: any, sort?: any, option?: any): Promise<any>;
254
+ /**
255
+ * Request a friendship to a user.
256
+ *
257
+ * @async
258
+ * @function requestFriend
259
+ * @param {string} friendId - An id of the friend to request.
260
+ * @returns {Promise<any>}
261
+ */
262
+ requestFriend(friendId: string): Promise<any>;
263
+ /**
264
+ * Accept a friends request.
265
+ *
266
+ * @async
267
+ * @function acceptFriend
268
+ * @param {string} friendId - The id of the friend to accept the request.
269
+ * @returns {Promise<any>}
270
+ */
271
+ acceptFriend(friendId: string): Promise<any>;
272
+ /**
273
+ * Reject a friend request.
274
+ *
275
+ * @async
276
+ * @function rejectFriend
277
+ * @param {string} friendId - An id of the friend to be rejected.
278
+ * @returns {Promise<any>}
279
+ */
280
+ rejectFriend(friendId: string): Promise<any>;
281
+ /**
282
+ * Remove a friend.
283
+ *
284
+ * @async
285
+ * @function removeFriend
286
+ * @param {string} friendId - An id of the friend to be removed.
287
+ * @returns {Promise<any>}
288
+ */
289
+ removeFriend(friendId: string): Promise<any>;
290
+ /**
291
+ * Get a count of unread messages of a channel.
292
+ *
293
+ * @async
294
+ * @function unreadCount
295
+ * @param {string} channelId - The id of a channel.
296
+ * @returns {Promise<any>}
297
+ */
298
+ unreadCount(channelId: string): Promise<any>;
299
+ /**
300
+ * Get a count of unread messages of a channel.
301
+ *
302
+ * @async
303
+ * @function unreadCount
304
+ * @param {string} channelId - The id of a channel.
305
+ * @returns {Promise<any>}
306
+ */
307
+ countUnread(channelId: string): Promise<any>;
308
+ /**
309
+ * Get subscription data of the user.
310
+ *
311
+ * @async
312
+ * @function getSubscription
313
+ * @param {string} channelId - The id of a channel.
314
+ * @param {string} id
315
+ * @returns {Promise<any>}
316
+ */
317
+ getSubscription(channelId: string, id: string): Promise<any>;
318
+ /**
319
+ * Get data of a single channel from the endpoint.
320
+ *
321
+ * @async
322
+ * @function getChannel
323
+ * @param {string} channelId - An id of the channel.
324
+ * @returns {Promise<any>} The data of the channel.
325
+ */
326
+ getChannel(channelId: string): Promise<any>;
327
+ /**
328
+ * Get data of multiple channels.
329
+ *
330
+ * @async
331
+ * @function getChannels
332
+ * @param {string} filter - Field value for filter.
333
+ * @param {string} sort - Field value for sorting.
334
+ * @param {string} option - Optional option: ex) offset, per_page.
335
+ * @returns {Promise<any[]>} An array of data of all channels.
336
+ */
337
+ getChannels(filter: any, sort?: any, option?: any): Promise<any>;
338
+ /**
339
+ * @async
340
+ * @function getMessage
341
+ * @param {string} channelId - The id of a channel.
342
+ * @param {string} messageId - The id of a message.
343
+ * @returns {Promise<any>}
344
+ */
345
+ getMessage(channelId: string, messageId: string): Promise<any>;
346
+ /**
347
+ * Get data of the all messages.
348
+ *
349
+ * @async
350
+ * @function getMessages
351
+ * @param {string} filter - Field value for filter.
352
+ * @param {string} sort - Field value for sorting.
353
+ * @param {string} option - Optional option: ex) offset, per_page.
354
+ * @returns {Promise<any>}
355
+ */
356
+ getMessages(filter: any, sort: any, option: any): Promise<any>;
357
+ /**
358
+ * Get messages with their replies nested per message (preview + total count).
359
+ * 메시지 목록과 각 메시지에 달린 답글(미리보기 + 총개수)을 한 번에 조회.
360
+ *
361
+ * @async
362
+ * @function getMessagesWithReplies
363
+ * @param {any} filter - Field value for filter (e.g. { channel_id, 'sender.id' }).
364
+ * @param {any} sort - Field value for sorting.
365
+ * @param {any} option - Optional: offset, per_page, reply_per_page (답글 미리보기 개수, 기본 20).
366
+ * @returns {Promise<any>}
367
+ */
368
+ getMessagesWithReplies(filter: any, sort: any, option: any): Promise<any>;
369
+ /**
370
+ * Get a list of subscibed member of the channel.
371
+ * @param {string} filter - Field value for filter.
372
+ * @param {string} sort - Field value for sorting.
373
+ * @param {string} option - Optional option: ex) offset, per_page.
374
+ * @returns {Promise<any>}
375
+ */
376
+ getSubscriptions(filter: any, sort: any, option: any): Promise<any>;
377
+ /**
378
+ * Create a new channel.
379
+ *
380
+ * @async
381
+ * @function createChannel
382
+ * @param {ChannelInput} channel - Configuration options of the new channel.
383
+ * @returns {Promise<any>} The data of the newly created channel.
384
+ */
385
+ createChannel(channel: ChannelInput): Promise<any>;
386
+ /**
387
+ * Update channel options.
388
+ *
389
+ * @async
390
+ * @function updateChannel
391
+ * @param {string} channelId - An id of the channel.
392
+ * @param {ChannelInput} channel - New options of the channel.
393
+ * @returns {Promise<any>} The data of the updated channel.
394
+ */
395
+ updateChannel(channelId: string, channel: ChannelInput): Promise<any>;
396
+ /**
397
+ * Delete a channel.
398
+ *
399
+ * @async
400
+ * @function deleteChannel
401
+ * @param {string} channelId - An channel id.
402
+ * @returns {Promise<any>}
403
+ */
404
+ deleteChannel(channelId: string): Promise<any>;
405
+ /**
406
+ * Update a subscription information, such as marking message read.
407
+ *
408
+ * @async
409
+ * @function markRead
410
+ * @param {string} channelId - The id of a channel.
411
+ * @param {MarkInput} mark
412
+ * @param {string} option
413
+ * @returns {Promise<any>}
414
+ */
415
+ markRead(channelId: string, mark: MarkInput, option?: any): Promise<any>;
416
+ /**
417
+ * Add members to the private channel.
418
+ *
419
+ * @async
420
+ * @function addUsers
421
+ * @param {string} channelId - An private channel id.
422
+ * @param {string[]} userIds - An array of member ids to be added.
423
+ * @param {any} options
424
+ * @returns {Promise<any>}
425
+ */
426
+ addUsers(channelId: string, userIds: any, options: any): Promise<any>;
427
+ /**
428
+ * Remove members from the private channel.
429
+ *
430
+ * @async
431
+ * @function removeUsers
432
+ * @param {string} channelId - An private channel id.
433
+ * @param {string[]} userIds - An array of the member ids to be deleted.
434
+ * @param {any} options
435
+ * @returns {Promise<any>}
436
+ */
437
+ removeUsers(channelId: string, userIds: any, options: any): Promise<any>;
438
+ /**
439
+ * Emit "start typing" to a conneted socket.
440
+ *
441
+ * @async
442
+ * @function startTyping
443
+ * @param {string} channelId - The id of a channel that the typing is happening.
444
+ * @param {string} threadId - The id of a thread that the typing is happening.
445
+ * @returns {Promise<any>}
446
+ */
447
+ startTyping(channelId: string, threadId?: string): Promise<{
448
+ channelId: string;
449
+ threadId: string;
450
+ }>;
451
+ /**
452
+ * Emit "stop typing" to a connected socket.
453
+ *
454
+ * @async
455
+ * @function
456
+ * @param {string} channelId - The id of a channel that the typing is stopped.
457
+ * @param {string} threadId - The id of a thread that the typing is stopped.
458
+ * @returns {Promise<any>}
459
+ */
460
+ stopTyping(channelId: string, threadId?: string): Promise<{
461
+ channelId: string;
462
+ threadId: string;
463
+ }>;
464
+ /**
465
+ * Ban a member from a channel.
466
+ *
467
+ * @async
468
+ * @function banUser
469
+ * @param {string} channelId - The id of a channel.
470
+ * @param {string} memberId - The id of a member.
471
+ * @param {any} options
472
+ * @returns {Promise<any>}
473
+ */
474
+ banUser(channelId: string, memberId: string, options?: any): Promise<any>;
475
+ /**
476
+ * Unban a member from a channel.
477
+ *
478
+ * @async
479
+ * @function unbanUser
480
+ * @param {string} channelId - The id of a channel.
481
+ * @param {string} memberId - The id of a member.
482
+ * @returns {Promise<any>}
483
+ */
484
+ unbanUser(channelId: string, memberId: string): Promise<any>;
485
+ /**
486
+ * Get data of a single pin from the endpoint.
487
+ *
488
+ * @async
489
+ * @function getPin
490
+ * @param {string} channelId - An id of the channel.
491
+ * @param {string} id - An id of the pin.
492
+ * @returns {Promise<any>} The data of the pin.
493
+ */
494
+ getPin(channelId: string, id: string): Promise<any>;
495
+ /**
496
+ * Get data of multiple pins.
497
+ *
498
+ * @async
499
+ * @function getPins
500
+ * @param {string} channelId - An id of the channel.
501
+ * @param {string} filter - Field value for filter.
502
+ * @param {string} sort - Field value for sorting.
503
+ * @param {string} option - Optional option: ex) offset, per_page.
504
+ * @returns {Promise<any[]>} An array of data of all channels.
505
+ */
506
+ getPins(channelId: string, filter: any, sort?: any, option?: any): Promise<any>;
507
+ /**
508
+ * Create a new pin.
509
+ *
510
+ * @async
511
+ * @function createPin
512
+ * @param {string} channelId - An id of the channel.
513
+ * @param {PinInput} pin - Configuration options of the new pin.
514
+ * @returns {Promise<any>} The data of the newly created pin.
515
+ */
516
+ createPin(channelId: string, pin: PinInput): Promise<any>;
517
+ /**
518
+ * Update pin options.
519
+ *
520
+ * @async
521
+ * @function updatePin
522
+ * @param {string} channelId - An id of the channel.
523
+ * @param {PinInput} pin - New options of the pin.
524
+ * @returns {Promise<any>} The data of the updated pin.
525
+ */
526
+ updatePin(pinId: string, channelId: string, pin: PinInput): Promise<any>;
527
+ getServerUrl(): Promise<any>;
528
+ /**
529
+ * send integration.
530
+ *
531
+ * @async
532
+ * @function sendIntegration
533
+ * @param {string} channelId - An id of the channel.
534
+ * @param {string} integrationId - ID of the integration.
535
+ * @param {string} to - To of the integration.
536
+ * @param {string} message - Message of the integration.
537
+ * @returns {Promise<any>} The data of the updated pin.
538
+ */
539
+ sendIntegration(channelId: string, integrationId: string, to: string, message: any): Promise<any>;
540
+ /**
541
+ * set push state
542
+ *
543
+ * @async
544
+ * @function setPushState
545
+ * @param {string} channelId - An id of the channel.
546
+ * @param {string} integrationId - ID of the integration.
547
+ * @param {string} to - To of the integration.
548
+ * @param {string} message - Message of the integration.
549
+ * @returns {Promise<any>} The data of the updated pin.
550
+ */
551
+ setPushState(push: boolean, ad: boolean, night: boolean): Promise<any>;
552
+ /**
553
+ * 비동기 방식으로 푸시 상태를 가져오는 메서드
554
+ * @returns {Promise<any>} 푸시 상태 정보
555
+ * @throws {Error} 오류가 발생한 경우 예외를 던짐
556
+ */
557
+ getPushState(): Promise<any>;
558
+ getMessageUnreadCount(channelId: string, messageId: string): Promise<any>;
559
+ }
560
+
561
+ }
562
+ declare module 'ncloudchat/CoreManager' {
563
+ /**
564
+ * Copyright (c) NBASE CORP. and its affiliates.
565
+ *
566
+ * This source code is licensed under the MIT license found in the
567
+ * LICENSE file in the root directory of this source tree.
568
+ */
569
+ const CoreManager: {
570
+ get: (key: string) => any;
571
+ set: (key: string, value: any) => void;
572
+ };
573
+ export default CoreManager;
574
+
575
+ }
576
+ declare module 'ncloudchat/Dispatcher' {
577
+ /**
578
+ * Copyright (c) NBASE CORP. and its affiliates.
579
+ *
580
+ * This source code is licensed under the MIT license found in the
581
+ * LICENSE file in the root directory of this source tree.
582
+ */
583
+ /**
584
+ * Class DispatcherEvent holds all dispatch events functionallities with callbacks.
585
+ *
586
+ * @class
587
+ */
588
+ class DispatcherEvent {
589
+ private callbacks;
590
+ /**
591
+ * Create a Dispatcher Event instance with an empty callback.
592
+ *
593
+ * @constructs
594
+ */
595
+ constructor();
596
+ getCallbacks(): any[];
597
+ register(cb: any): void;
598
+ unregister(cb: any): void;
599
+ execute(param1: any, param2: any, param3: any, param4: any, param5: any, param6: any): void;
600
+ }
601
+ type DispatcherProperty = {
602
+ [key: string]: DispatcherEvent;
603
+ };
604
+ export default class Dispatcher {
605
+ private eventProvider;
606
+ constructor();
607
+ getProvider(): DispatcherProperty;
608
+ dispatch(name: string, param1: any, param2?: any, param3?: any, param4?: any, param5?: any, param6?: any): void;
609
+ on(name: string, callback: any): void;
610
+ off(name: string, callback: any): void;
611
+ offall(name: string): void;
612
+ }
613
+ export {};
614
+
615
+ }
616
+ declare module 'ncloudchat/Network' {
617
+ /**
618
+ * Copyright (c) NBASE CORP. and its affiliates.
619
+ *
620
+ * This source code is licensed under the MIT license found in the
621
+ * LICENSE file in the root directory of this source tree.
622
+ */
623
+ export const fetchData: (returnKey: string | undefined, query: string, variables: object) => Promise<any>;
624
+
625
+ }
626
+ declare module 'ncloudchat/Type' {
627
+ /**
628
+ * Copyright (c) NBASE CORP. and its affiliates.
629
+ *
630
+ * This source code is licensed under the MIT license found in the
631
+ * LICENSE file in the root directory of this source tree.
632
+ */
633
+ /**
634
+ * Enum for channel types.
635
+ * @readonly
636
+ * @enum {string}
637
+ */
638
+ export enum ChannelType {
639
+ PRIVATE = "PRIVATE",
640
+ PUBLIC = "PUBLIC"
641
+ }
642
+ /**
643
+ * Interface for mark input.
644
+ *
645
+ * @interface
646
+ */
647
+ export interface MarkInput {
648
+ user_id: string;
649
+ message_id: string;
650
+ sort_id: string;
651
+ }
652
+ /**
653
+ * Interface for channel input.
654
+ *
655
+ * @interface
656
+ */
657
+ export interface ChannelInput {
658
+ id: string;
659
+ type: ChannelType;
660
+ name: string;
661
+ uniqueId: string;
662
+ translation: boolean;
663
+ disabled: boolean;
664
+ push: boolean;
665
+ mutes: boolean;
666
+ linkUrl: string;
667
+ customField: string;
668
+ imageUrl: string;
669
+ integrationId: string;
670
+ members: string[];
671
+ }
672
+ /**
673
+ * Enum for message types.
674
+ * @readonly
675
+ * @enum {string}
676
+ */
677
+ export enum MessageType {
678
+ text = "text",
679
+ photo = "photo",
680
+ file = "file"
681
+ }
682
+ /**
683
+ * Interface for message input.
684
+ *
685
+ * @interface
686
+ */
687
+ export interface MessageInput {
688
+ messageType: MessageType;
689
+ text: string;
690
+ imageUrls: string;
691
+ fileUrls: string;
692
+ thumbUrls: string;
693
+ mentiones: string;
694
+ customData: string[];
695
+ }
696
+ /**
697
+ *
698
+ * Interface for pin input.
699
+ *
700
+ * @interface
701
+ */
702
+ export interface PinInput {
703
+ pinned: boolean;
704
+ messageId: string;
705
+ pinnedAt: string;
706
+ expiredAt: string;
707
+ }
708
+
709
+ }
710
+ declare module 'ncloudchat/Util' {
711
+ /**
712
+ * Copyright (c) NBASE CORP. and its affiliates.
713
+ *
714
+ * This source code is licensed under the MIT license found in the
715
+ * LICENSE file in the root directory of this source tree.
716
+ */
717
+ /**
718
+ * Decodes a base-64 encoded string.
719
+ *
720
+ * @function ObjectId
721
+ * @param {string} id - An encoded string to be decoded.
722
+ * @returns {string} decoded string.
723
+ */
724
+ const ObjectId: (id: string) => string;
725
+ const getOS: () => string;
726
+ const getTimeZone: () => string;
727
+ export { ObjectId, getOS, getTimeZone };
728
+
729
+ }
730
+ declare module 'ncloudchat/graphql/channel' {
731
+ /**
732
+ * Copyright (c) NBASE CORP. and its affiliates.
733
+ *
734
+ * This source code is licensed under the MIT license found in the
735
+ * LICENSE file in the root directory of this source tree.
736
+ */
737
+ export const getChannelQuery: string;
738
+ export const getChannelsQuery: string;
739
+ export const createChannelQuery: string;
740
+ export const updateChannelQuery: string;
741
+ export const deleteChannelQuery: string;
742
+ export const addChannelMembersQuery: string;
743
+ export const removeChannelMembersQuery: string;
744
+
745
+ }
746
+ declare module 'ncloudchat/graphql/friend' {
747
+ /**
748
+ * Copyright (c) NBASE CORP. and its affiliates.
749
+ *
750
+ * This source code is licensed under the MIT license found in the
751
+ * LICENSE file in the root directory of this source tree.
752
+ */
753
+ export const requestFriendQuery: string;
754
+ export const acceptFriendQuery: string;
755
+ export const rejectFriendQuery: string;
756
+ export const removeFriendQuery: string;
757
+ export const getFriendshipsQuery: string;
758
+
759
+ }
760
+ declare module 'ncloudchat/graphql/integration' {
761
+ /**
762
+ * Copyright (c) NBASE CORP. and its affiliates.
763
+ *
764
+ * This source code is licensed under the MIT license found in the
765
+ * LICENSE file in the root directory of this source tree.
766
+ */
767
+ export const sendIntergrationQuery = "mutation sendIntegration (\n $projectId: String!,\n $channelId: String!, \n $integrationId: String!,\n $to: String,\n $message: String!\n ) {\n sendIntegration (\n input: { projectId: $projectId, \n channelId: $channelId, \n integrationId: $integrationId,\n to: $to,\n message:$message }\n ) {\n status\n message\n }\n }\n";
768
+
769
+ }
770
+ declare module 'ncloudchat/graphql/invite' {
771
+ /**
772
+ * Copyright (c) NBASE CORP. and its affiliates.
773
+ *
774
+ * This source code is licensed under the MIT license found in the
775
+ * LICENSE file in the root directory of this source tree.
776
+ */
777
+ export const createInviteQuery = "mutation (\n $projectId: String!, \n $channelId: String!,\n $friendIds: String!\n ) {\n createInvite(\n input: {\n projectId: $projectId, \n channelId: $channelId,\n friendIds: $friendIds\n }\n ) {\n invite {\n id\n }\n }\n }\n";
778
+
779
+ }
780
+ declare module 'ncloudchat/graphql/member' {
781
+ /**
782
+ * Copyright (c) NBASE CORP. and its affiliates.
783
+ *
784
+ * This source code is licensed under the MIT license found in the
785
+ * LICENSE file in the root directory of this source tree.
786
+ */
787
+ export const getMeQuery = "query memberForQuery (\n $projectId: String!\n ) {\n memberForQuery (\n projectId: $projectId\n ) { \n id\n project_id\n name\n profile\n country\n memo\n remoteip\n adid\n device\n network\n push\n version\n model\n logined_at\n created_at\n updated_at\n notifications {\n token\n device\n os\n push\n ad\n night\n }\n }\n }\n";
788
+ export const loginQuery = "mutation login(\n $projectId: String!\n $userId: String!\n $name: String\n $profile: String\n $token: String\n $customField: String\n ) {\n login(\n input: {\n projectId: $projectId\n userId: $userId\n name: $name\n token: $token\n profile: $profile\n customField: $customField\n }\n ) {\n token\n }\n }";
789
+ export const createMemberBlockQuery: string;
790
+ export const updateMemberQuery = "mutation updateMember(\n $id: String!\n $projectId: String!\n $name: String\n $profile: String\n $remoteip: String\n $memo: String\n $adid: String\n $device: String\n $deviceType: [String]\n $network: String\n $version: String\n $model: String\n $notifications: NotificationInput\n )\n {\n updateMember(input: {id: $id, projectId: $projectId, profile: $profile, memo: $memo, name: $name, remoteip: $remoteip, adid: $adid, device: $device, deviceType: $deviceType, network: $network, version: $version, model: $model, notifications: $notifications}) {\n member {\n id\n project_id\n name\n profile\n country\n memo\n remoteip\n adid\n device\n network\n push\n version\n model\n logined_at\n created_at\n updated_at\n notifications {\n token\n device\n os\n }\n }\n }\n}\n";
791
+ export const deleteMemberBlockQuery: string;
792
+ export const getMembersQuery = "query membersForQuery (\n $projectId: String!, \n $option: String!, \n $filter: String!, \n $sort: String \n ) {\n membersForQuery (\n projectId: $projectId, \n option:$option, \n filter:$filter, \n sort:$sort\n ) {\n totalCount\n edges {\n node {\n id\n name\n }\n }\n }\n }\n";
793
+ export const getMemberBlocksQuery = "query memberblocks (\n $projectId: String!, \n $filter: String!, \n $sort: String, \n $option:String\n ) {\n memberblocks(\n projectId: $projectId, \n filter:$filter, \n sort:$sort, \n option:$option\n ) {\n totalCount\n edges {\n node {\n id\n project_id\n member_id\n type\n status\n block_type\n messageMulti {\n lang\n value\n default\n }\n started_at\n ended_at\n created_at\n updated_at\n deleted_at\n }\n }\n }\n }\n";
794
+ export const addNotificationTokenQuery = "mutation addNotificationToken (\n $projectId: String!,\n $token: String,\n $device: String,\n $os: String,\n $ad: Boolean,\n $push: Boolean,\n $night: Boolean,\n $timezone: String,\n $channel: String,\n) {\n addNotificationToken(\n input: {\n projectId: $projectId,\n token: $token,\n device: $device,\n os: $os,\n ad: $ad,\n push: $push,\n night: $night,\n timezone: $timezone,\n channel: $channel\n }\n ) {\n member {\n id\n notifications {\n token\n device\n os\n push\n ad\n night\n timezone\n }\n }\n }\n}\n";
795
+
796
+ }
797
+ declare module 'ncloudchat/graphql/message' {
798
+ /**
799
+ * Copyright (c) NBASE CORP. and its affiliates.
800
+ *
801
+ * This source code is licensed under the MIT license found in the
802
+ * LICENSE file in the root directory of this source tree.
803
+ */
804
+ export const translateQuery = "mutation (\n $projectId: String!, \n $channelId: String!, \n $srcLang: String!, \n $text: String!, \n $targetLang:String!\n ) {\n translation(\n input: {\n projectId:$projectId, \n channelId:$channelId,\n srcLang:$srcLang,\n targetLang:$targetLang, \n text:$text \n }\n ) {\n result\n {\n status\n message\n lang\n }\n }\n }\n";
805
+ export const getMessageQuery: string;
806
+ export const getMessagesQuery: string;
807
+ export const getMessagesWithRepliesQuery: string;
808
+ export const unreadCountQuery = "query mark (\n $projectId: String!, \n $channelId: String!\n ) { \n mark (\n projectId: $projectId, \n channelId:$channelId\n ) { \n user_id,\n message_id,\n sort_id, \n unread\n } \n }\n";
809
+ export const messageQuery: string;
810
+ export const deleteMessageQuery: string;
811
+ export const messageUnreadCountQuery = "query messageUnreadCount(\n $projectId: String!\n $channelId: String!,\n $messageId: String!,\n ) {\n messageUnreadCount(\n projectId: $projectId\n channelId: $channelId\n messageId: $messageId\n ) {\n totalCount\n count\n }\n }";
812
+
813
+ }
814
+ declare module 'ncloudchat/graphql/pin' {
815
+ /**
816
+ * Copyright (c) NBASE CORP. and its affiliates.
817
+ *
818
+ * This source code is licensed under the MIT license found in the
819
+ * LICENSE file in the root directory of this source tree.
820
+ */
821
+ export const getPinQuery: string;
822
+ export const getPinsQuery: string;
823
+ export const createPinQuery: string;
824
+ export const updatePinQuery: string;
825
+
826
+ }
827
+ declare module 'ncloudchat/graphql/project' {
828
+ /**
829
+ * Copyright (c) NBASE CORP. and its affiliates.
830
+ *
831
+ * This source code is licensed under the MIT license found in the
832
+ * LICENSE file in the root directory of this source tree.
833
+ */
834
+
835
+ }
836
+ declare module 'ncloudchat/graphql/subscription' {
837
+ /**
838
+ * Copyright (c) NBASE CORP. and its affiliates.
839
+ *
840
+ * This source code is licensed under the MIT license found in the
841
+ * LICENSE file in the root directory of this source tree.
842
+ */
843
+ export const createSubscriptionQuery: string;
844
+ export const deleteSubscriptionQuery: string;
845
+ export const updateSubscriptionQuery: string;
846
+ export const getSubscriptionQuery: string;
847
+ export const getSubscriptionsQuery: string;
848
+
849
+ }
850
+ declare module 'ncloudchat/index' {
851
+ /**
852
+ * Copyright (c) NBASE CORP. and its affiliates.
853
+ *
854
+ * This source code is licensed under the MIT license found in the
855
+ * LICENSE file in the root directory of this source tree.
856
+ */
857
+ import Chat from 'ncloudchat/CloudChat';
858
+ export { Chat };
859
+
860
+ }
861
+ declare module 'ncloudchat/logger' {
862
+ /**
863
+ * Copyright (c) NBASE CORP. and its affiliates.
864
+ *
865
+ * This source code is licensed under the MIT license found in the
866
+ * LICENSE file in the root directory of this source tree.
867
+ */
868
+ const debug: (value: any, metadata?: any) => void;
869
+ const info: (value: any, metadata?: any) => void;
870
+ const warn: (value: any, metadata?: any) => void;
871
+ const error: (value: any, metadata?: any) => void;
872
+ export { debug, error, info, warn };
873
+
874
+ }
875
+ declare module 'ncloudchat/mutations/channel' {
876
+ /**
877
+ * Copyright (c) NBASE CORP. and its affiliates.
878
+ *
879
+ * This source code is licensed under the MIT license found in the
880
+ * LICENSE file in the root directory of this source tree.
881
+ */
882
+ import type { ChannelInput } from "ncloudchat/Type";
883
+ /**
884
+ * Create a new channel.
885
+ *
886
+ * @async
887
+ * @function createChannel
888
+ * @param {ChannelInput} channel - Configuration options of the new channel.
889
+ * @returns {Promise<any>} The data of the newly created channel.
890
+ */
891
+ export const createChannel: (channel: ChannelInput) => Promise<any>;
892
+ /**
893
+ * Update channel options.
894
+ *
895
+ * @async
896
+ * @function updateChannel
897
+ * @param {string} channelId - An id of the channel.
898
+ * @param {ChannelInput} channel - New options of the channel.
899
+ * @returns {Promise<any>} The data of the updated channel.
900
+ */
901
+ export const updateChannel: (channelId: string, channel: ChannelInput) => Promise<any>;
902
+ /**
903
+ * Delete a channel.
904
+ *
905
+ * @async
906
+ * @function deleteChannel
907
+ * @param {string} channelId - An channel id.
908
+ * @returns {Promise<any>}
909
+ */
910
+ export const deleteChannel: (channelId: string) => Promise<any>;
911
+ /**
912
+ * Add members to the private channel.
913
+ *
914
+ * @async
915
+ * @function addChannelMembers
916
+ * @param {string} channelId - An private channel id.
917
+ * @param {string[]} memberIds - An array of member ids to be added.
918
+ * @param {any} options
919
+ * @returns {Promise<any>}
920
+ */
921
+ export const addChannelMembers: (channelId: string, memberIds: any, options?: any) => Promise<any>;
922
+ /**
923
+ * Remove members from the private channel.
924
+ *
925
+ * @async
926
+ * @function removeChannelMembers
927
+ * @param {string} channelId - An private channel id.
928
+ * @param {string[]} memberIds - An array of the member ids to be deleted.
929
+ * @returns {Promise<any>}
930
+ */
931
+ export const removeChannelMembers: (channelId: string, memberIds: any, options?: any) => Promise<any>;
932
+
933
+ }
934
+ declare module 'ncloudchat/mutations/friend' {
935
+ /**
936
+ * Copyright (c) NBASE CORP. and its affiliates.
937
+ *
938
+ * This source code is licensed under the MIT license found in the
939
+ * LICENSE file in the root directory of this source tree.
940
+ */
941
+ /**
942
+ * Request a friendship to a user.
943
+ *
944
+ * @async
945
+ * @function requestFriend
946
+ * @param {string} friendId - An id of the friend to request.
947
+ * @returns {Promise<any>}
948
+ */
949
+ export const requestFriend: (friendId: string) => Promise<any>;
950
+ /**
951
+ * Accept a friends request.
952
+ *
953
+ * @async
954
+ * @function acceptFriend
955
+ * @param {string} friendId - The id of the friend to accept the request.
956
+ * @returns {Promise<any>}
957
+ */
958
+ export const acceptFriend: (friendId: string) => Promise<any>;
959
+ /**
960
+ * Reject a friend request.
961
+ *
962
+ * @async
963
+ * @function rejectFriend
964
+ * @param {string} friendId - An id of the friend to be rejected.
965
+ * @returns {Promise<any>}
966
+ */
967
+ export const rejectFriend: (friendId: string) => Promise<any>;
968
+ /**
969
+ * Remove a friend.
970
+ *
971
+ * @async
972
+ * @function removeFriend
973
+ * @param {string} friendId - An id of the friend to be removed.
974
+ * @returns {Promise<any>}
975
+ */
976
+ export const removeFriend: (friendId: string) => Promise<any>;
977
+
978
+ }
979
+ declare module 'ncloudchat/mutations/index' {
980
+ /**
981
+ * Copyright (c) NBASE CORP. and its affiliates.
982
+ *
983
+ * This source code is licensed under the MIT license found in the
984
+ * LICENSE file in the root directory of this source tree.
985
+ */
986
+ export * from 'ncloudchat/mutations/member';
987
+ export * from 'ncloudchat/mutations/channel';
988
+ export * from 'ncloudchat/mutations/message';
989
+ export * from 'ncloudchat/mutations/friend';
990
+ export * from 'ncloudchat/mutations/invite';
991
+ export * from 'ncloudchat/mutations/subscription';
992
+ export * from 'ncloudchat/mutations/pin';
993
+ export * from 'ncloudchat/mutations/integration';
994
+
995
+ }
996
+ declare module 'ncloudchat/mutations/integration' {
997
+ /**
998
+ * Copyright (c) NBASE CORP. and its affiliates.
999
+ *
1000
+ * This source code is licensed under the MIT license found in the
1001
+ * LICENSE file in the root directory of this source tree.
1002
+ */
1003
+ /**
1004
+ * Request a friendship to a user.
1005
+ *
1006
+ * @async
1007
+ * @function requestFriend
1008
+ * @param {string} friendId - An id of the friend to request.
1009
+ * @returns {Promise<any>}
1010
+ */
1011
+ export const sendIntegration: (channelId: string, integrationId: string, to: string, message: string) => Promise<any>;
1012
+
1013
+ }
1014
+ declare module 'ncloudchat/mutations/invite' {
1015
+ /**
1016
+ * Copyright (c) NBASE CORP. and its affiliates.
1017
+ *
1018
+ * This source code is licensed under the MIT license found in the
1019
+ * LICENSE file in the root directory of this source tree.
1020
+ */
1021
+ /**
1022
+ * Create an invite to a friend users to a channel.
1023
+ *
1024
+ * @async
1025
+ * @function createInvite
1026
+ * @param {string} channelId - An id of the channel to be invited.
1027
+ * @param {string} friendIds - Id of friends to be invited to the channel.
1028
+ * @returns {Promise<any>}
1029
+ */
1030
+ export const createInvite: (channelId: string, friendIds: any) => Promise<any>;
1031
+
1032
+ }
1033
+ declare module 'ncloudchat/mutations/member' {
1034
+ /**
1035
+ * Copyright (c) NBASE CORP. and its affiliates.
1036
+ *
1037
+ * This source code is licensed under the MIT license found in the
1038
+ * LICENSE file in the root directory of this source tree.
1039
+ */
1040
+ /**
1041
+ * Login a user
1042
+ *
1043
+ * @async
1044
+ * @function login
1045
+ * @param {string} user_id - The id of a user loggin in.
1046
+ * @param {string} name
1047
+ * @param {string} profile
1048
+ * @param {string} token
1049
+ * @returns {Promise<any>}
1050
+ */
1051
+ export const login: (user_id: string, name?: string, profile?: string, token?: string, customField?: string) => Promise<any>;
1052
+ /**
1053
+ * Create a member block followed by the getMemberBlockSchema.
1054
+ * The member block is to used to ban a member.
1055
+ *
1056
+ * @async
1057
+ * @function createMemberBlock
1058
+ * @param {string} channelId - The id of a channel.
1059
+ * @param {string} memberId - The id of a member.
1060
+ * @param {string} options
1061
+ * @returns {Promise<any>}
1062
+ */
1063
+ export const createMemberBlock: (channelId: string, memberId: string, options?: string) => Promise<any>;
1064
+ /**
1065
+ * Delete a member block.
1066
+ * This is used to unban a member from a channel.
1067
+ *
1068
+ * @async
1069
+ * @function deleteMemberBlock
1070
+ * @param {string} channelId - The id of a channel that the member is in.
1071
+ * @param {string} memberId - The id of a member to be deleted.
1072
+ * @returns {Promise<any>}
1073
+ */
1074
+ export const deleteMemberBlock: (channelId: string, memberId: string) => Promise<any>;
1075
+ export const updateMember: (user_id: string, update: any) => Promise<any>;
1076
+ export const setPushState: (device: string, push: boolean, ad: boolean, night: boolean) => Promise<any>;
1077
+
1078
+ }
1079
+ declare module 'ncloudchat/mutations/message' {
1080
+ /**
1081
+ * Copyright (c) NBASE CORP. and its affiliates.
1082
+ *
1083
+ * This source code is licensed under the MIT license found in the
1084
+ * LICENSE file in the root directory of this source tree.
1085
+ */
1086
+ /**
1087
+ * Trasnslate a text block to the target language from the source language.
1088
+ *
1089
+ * @async
1090
+ * @function translate
1091
+ * @param {string} channelId - The id of a channel.
1092
+ * @param {string} srcLang - The source language.
1093
+ * @param {string} targetLang - The target language.
1094
+ * @param {string} text - The text block to be translated.
1095
+ * @returns {Promise<any>}
1096
+ */
1097
+ export const translate: (channelId: string, srcLang: string, targetLang: string, text: string) => Promise<any>;
1098
+ /**
1099
+ * Upload a file to a channel. Only supports png, jpg, jpeg file types.
1100
+ *
1101
+ * @async
1102
+ * @function upload
1103
+ * @param {string} channelId - The id of a channel.
1104
+ * @param {any} file - An image file.
1105
+ * @returns {Promise<any>}
1106
+ */
1107
+ export const upload: (channelId: string, file: any) => Promise<any>;
1108
+ /**
1109
+ * Send a Message
1110
+ *
1111
+ * @async
1112
+ * @function message
1113
+ * @param {string} data - The id of a message.
1114
+ * @returns {Promise<any>}
1115
+ */
1116
+ export const message: (data: any) => Promise<any>;
1117
+ /**
1118
+ *
1119
+ * @sync
1120
+ * @function deleteMessage
1121
+ * @param {string} data - The id of a message.
1122
+ * @returns {Promise<any>}
1123
+ */
1124
+ export const deleteMessage: (channelId: string, messageId: string) => Promise<any>;
1125
+
1126
+ }
1127
+ declare module 'ncloudchat/mutations/pin' {
1128
+ /**
1129
+ * Copyright (c) NBASE CORP. and its affiliates.
1130
+ *
1131
+ * This source code is licensed under the MIT license found in the
1132
+ * LICENSE file in the root directory of this source tree.
1133
+ */
1134
+ import type { PinInput } from "ncloudchat/Type";
1135
+ /**
1136
+ * Create a new pin.
1137
+ *
1138
+ * @async
1139
+ * @function createPin
1140
+ * @param {string} channelId - An id of the channel.
1141
+ * @param {PinInput} pin - Configuration options of the new pin.
1142
+ * @returns {Promise<any>} The data of the newly created pin.
1143
+ */
1144
+ export const createPin: (channelId: string, pin: PinInput) => Promise<any>;
1145
+ /**
1146
+ * Update pin options.
1147
+ *
1148
+ * @async
1149
+ * @function updatePin
1150
+ * @param {string} id - An id of the pin.
1151
+ * @param {string} channelId - An id of the channel.
1152
+ * @param {PinInput} pin - New options of the pin.
1153
+ * @returns {Promise<any>} The data of the updated created pin.
1154
+ */
1155
+ export const updatePin: (id: string, channelId: string, pin: PinInput) => Promise<any>;
1156
+
1157
+ }
1158
+ declare module 'ncloudchat/mutations/subscription' {
1159
+ /**
1160
+ * Copyright (c) NBASE CORP. and its affiliates.
1161
+ *
1162
+ * This source code is licensed under the MIT license found in the
1163
+ * LICENSE file in the root directory of this source tree.
1164
+ */
1165
+ import type { MarkInput } from "ncloudchat/Type";
1166
+ /**
1167
+ * Create a subscription.
1168
+ *
1169
+ * @async
1170
+ * @function createSubscription
1171
+ * @param {string} channelId - The id of a channel.
1172
+ * @param {string} option
1173
+ * @returns {Promise<any>}
1174
+ */
1175
+ export const createSubscription: (channelId: string, option?: string) => Promise<any>;
1176
+ /**
1177
+ * Delete a subscription.
1178
+ *
1179
+ * @async
1180
+ * @function deleteSubscription
1181
+ * @param {string} channelId - The id of a channel.
1182
+ * @returns {Promise<any>}
1183
+ */
1184
+ export const deleteSubscription: (channelId: string) => Promise<any>;
1185
+ /**
1186
+ * Update a subscription information, such as marking message read.
1187
+ *
1188
+ * @async
1189
+ * @function updateSubscription
1190
+ * @param {string} channelId - The id of a channel.
1191
+ * @param {MarkInput} mark
1192
+ * @param {string} option
1193
+ * @returns {Promise<any>}
1194
+ */
1195
+ export const updateSubscription: (channelId: string, mark: MarkInput, option?: string) => Promise<any>;
1196
+
1197
+ }
1198
+ declare module 'ncloudchat/queries/channel' {
1199
+ /**
1200
+ * Copyright (c) NBASE CORP. and its affiliates.
1201
+ *
1202
+ * This source code is licensed under the MIT license found in the
1203
+ * LICENSE file in the root directory of this source tree.
1204
+ */
1205
+ /**
1206
+ * Get data of a single channel from the endpoint.
1207
+ *
1208
+ * @async
1209
+ * @function getChannel
1210
+ * @param {string} id - An id of the channel.
1211
+ * @returns {Promise<any>} The data of the channel.
1212
+ */
1213
+ export const getChannel: (id: string) => Promise<any>;
1214
+ /**
1215
+ * Get data of multiple channels.
1216
+ *
1217
+ * @async
1218
+ * @function getChannels
1219
+ * @param {string} filter - Field value for filter.
1220
+ * @param {string} sort - Field value for sorting.
1221
+ * @param {string} option - Optional option: ex) offset, per_page.
1222
+ * @returns {Promise<any[]>} An array of data of all channels.
1223
+ */
1224
+ export const getChannels: (filter: string, sort: string, option: string) => Promise<any>;
1225
+
1226
+ }
1227
+ declare module 'ncloudchat/queries/friend' {
1228
+ /**
1229
+ * Copyright (c) NBASE CORP. and its affiliates.
1230
+ *
1231
+ * This source code is licensed under the MIT license found in the
1232
+ * LICENSE file in the root directory of this source tree.
1233
+ */
1234
+ /**
1235
+ * Get current friends list of all status.
1236
+ *
1237
+ * @async
1238
+ * @function getFriendships
1239
+ * @param {string} filter - Field value for filter.
1240
+ * @param {string} sort - Field value for sorting.
1241
+ * @param {string} option - Optional option: ex) offset, per_page.
1242
+ * @returns {Promise<any>}
1243
+ */
1244
+ export const getFriendships: (filter: string, sort: string, option: string) => Promise<any>;
1245
+
1246
+ }
1247
+ declare module 'ncloudchat/queries/index' {
1248
+ /**
1249
+ * Copyright (c) NBASE CORP. and its affiliates.
1250
+ *
1251
+ * This source code is licensed under the MIT license found in the
1252
+ * LICENSE file in the root directory of this source tree.
1253
+ */
1254
+ export * from 'ncloudchat/queries/project';
1255
+ export * from 'ncloudchat/queries/channel';
1256
+ export * from 'ncloudchat/queries/message';
1257
+ export * from 'ncloudchat/queries/subscription';
1258
+ export * from 'ncloudchat/queries/friend';
1259
+ export * from 'ncloudchat/queries/member';
1260
+ export * from 'ncloudchat/queries/memberblocks';
1261
+ export * from 'ncloudchat/queries/pin';
1262
+
1263
+ }
1264
+ declare module 'ncloudchat/queries/member' {
1265
+ /**
1266
+ * Copyright (c) NBASE CORP. and its affiliates.
1267
+ *
1268
+ * This source code is licensed under the MIT license found in the
1269
+ * LICENSE file in the root directory of this source tree.
1270
+ */
1271
+ /**
1272
+ * Get information data of the member.
1273
+ *
1274
+ * @async
1275
+ * @function getMembers
1276
+ * @param {string} filter - Field value for filter.
1277
+ * @param {string} sort - Field value for sorting.
1278
+ * @param {string} option - Optional option: ex) offset, per_page.
1279
+ * @returns {Promise<any>}
1280
+ */
1281
+ export const getMembers: (filter: string, sort: string, option: string) => Promise<any>;
1282
+ export const getPushState: () => Promise<any>;
1283
+
1284
+ }
1285
+ declare module 'ncloudchat/queries/memberblocks' {
1286
+ /**
1287
+ * Copyright (c) NBASE CORP. and its affiliates.
1288
+ *
1289
+ * This source code is licensed under the MIT license found in the
1290
+ * LICENSE file in the root directory of this source tree.
1291
+ */
1292
+ /**
1293
+ * Get member blocks.
1294
+ *
1295
+ * @async
1296
+ * @function getMemberBlocks
1297
+ * @param {string} filter - Field value for filter.
1298
+ * @param {string} sort - Field value for sorting.
1299
+ * @param {string} option - Optional option: ex) offset, per_page.
1300
+ * @returns {Promise<any>}
1301
+ */
1302
+ export const getMemberBlocks: (filter: string, sort: string, option: string) => Promise<any>;
1303
+
1304
+ }
1305
+ declare module 'ncloudchat/queries/message' {
1306
+ /**
1307
+ * Copyright (c) NBASE CORP. and its affiliates.
1308
+ *
1309
+ * This source code is licensed under the MIT license found in the
1310
+ * LICENSE file in the root directory of this source tree.
1311
+ */
1312
+ /**
1313
+ * Get data of the all messages.
1314
+ *
1315
+ * @async
1316
+ * @function getMessages
1317
+ * @param {string} filter - Field value for filter.
1318
+ * @param {string} sort - Field value for sorting.
1319
+ * @param {string} option - Optional option: ex) offset, per_page.
1320
+ * @returns {Promise<any>}
1321
+ */
1322
+ export const getMessages: (filter: string, sort: string, option: string) => Promise<any>;
1323
+ /**
1324
+ * Get messages with their replies (preview + count) nested per message.
1325
+ *
1326
+ * @async
1327
+ * @function getMessagesWithReplies
1328
+ * @param {string} filter - Field value for filter (e.g. sender.id, channel_id).
1329
+ * @param {string} sort - Field value for sorting.
1330
+ * @param {string} option - Optional option: ex) offset, per_page, reply_per_page.
1331
+ * @returns {Promise<any>}
1332
+ */
1333
+ export const getMessagesWithReplies: (filter: string, sort: string, option: string) => Promise<any>;
1334
+ /**
1335
+ * Get data of a single message.
1336
+ *
1337
+ * @async
1338
+ * @function getMessage
1339
+ * @param {string} channelId - The id of a channel.
1340
+ * @param {string} messageId - The id of a message.
1341
+ * @returns {Promise<any>}
1342
+ */
1343
+ export const getMessage: (channelId: string, messageId: string) => Promise<any>;
1344
+ /**
1345
+ * Get a count of unread messages of a channel.
1346
+ *
1347
+ * @async
1348
+ * @function unreadCount
1349
+ * @param {string} channelId - The id of a channel.
1350
+ * @returns {Promise<any>}
1351
+ */
1352
+ export const unreadCount: (channelId: string) => Promise<any>;
1353
+ /**
1354
+ * Retrieves the count of unread users for a specific message in a channel.
1355
+ *
1356
+ * @async
1357
+ * @function getMessageUnreadCount
1358
+ * @param {string} channelId - The ID of the channel.
1359
+ * @param {string} messageId - The ID of the message.
1360
+ * @returns {Promise<any>} A Promise that resolves to the count of unread users.
1361
+ */
1362
+ export const getMessageUnreadCount: (channelId: string, messageId: string) => Promise<any>;
1363
+
1364
+ }
1365
+ declare module 'ncloudchat/queries/pin' {
1366
+ /**
1367
+ * Copyright (c) NBASE CORP. and its affiliates.
1368
+ *
1369
+ * This source code is licensed under the MIT license found in the
1370
+ * LICENSE file in the root directory of this source tree.
1371
+ */
1372
+ /**
1373
+ * Get data of a single pin from the endpoint.
1374
+ *
1375
+ * @async
1376
+ * @function getPin
1377
+ * @param {string} channelId - An id of the channel.
1378
+ * @param {string} id - An id of the pin.
1379
+ * @returns {Promise<any>} The data of the pin.
1380
+ */
1381
+ export const getPin: (channelId: string, id: string) => Promise<any>;
1382
+ /**
1383
+ * Get data of multiple pins.
1384
+ *
1385
+ * @async
1386
+ * @function getPins
1387
+ * @param {string} channelId - An id of the channel.
1388
+ * @param {string} filter - Field value for filter.
1389
+ * @param {string} sort - Field value for sorting.
1390
+ * @param {string} option - Optional option: ex) offset, per_page.
1391
+ * @returns {Promise<any[]>} An array of data of all pins.
1392
+ */
1393
+ export const getPins: (channelId: string, filter: string, sort: string, option: string) => Promise<any>;
1394
+
1395
+ }
1396
+ declare module 'ncloudchat/queries/project' {
1397
+ /**
1398
+ * Copyright (c) NBASE CORP. and its affiliates.
1399
+ *
1400
+ * This source code is licensed under the MIT license found in the
1401
+ * LICENSE file in the root directory of this source tree.
1402
+ */
1403
+ export {};
1404
+ /**
1405
+ * Get data of a project.
1406
+ *
1407
+ * @async
1408
+ * @function getProject
1409
+ * @returns {Promise<any>}
1410
+ */
1411
+
1412
+ }
1413
+ declare module 'ncloudchat/queries/subscription' {
1414
+ /**
1415
+ * Copyright (c) NBASE CORP. and its affiliates.
1416
+ *
1417
+ * This source code is licensed under the MIT license found in the
1418
+ * LICENSE file in the root directory of this source tree.
1419
+ */
1420
+ /**
1421
+ * Get subscription data of the user.
1422
+ *
1423
+ * @async
1424
+ * @function getSubscription
1425
+ * @param {string} channelId - The id of a channel.
1426
+ * @param {string} id
1427
+ * @returns {Promise<any>}
1428
+ */
1429
+ export const getSubscription: (channelId: string, id: string) => Promise<any>;
1430
+ /**
1431
+ * Get a list of subscibed member of the channel.
1432
+ *
1433
+ * @async
1434
+ * @function getSubscriptions
1435
+ * @param {string} filter - Field value for filter.
1436
+ * @param {string} sort - Field value for sorting.
1437
+ * @param {string} option - Optional option: ex) offset, per_page.
1438
+ * @returns {Promise<any>}
1439
+ */
1440
+ export const getSubscriptions: (filter: any, sort: any, option: any) => Promise<any>;
1441
+
1442
+ }
1443
+ declare module 'ncloudchat' {
1444
+ import main = require('ncloudchat/index');
1445
+ export = main;
1446
+ }