ncloudchat 1.0.47 → 1.0.48-beta2

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/README.md CHANGED
@@ -39,3 +39,8 @@ yarn add ncloudchat
39
39
  Ncloud Chat JavaScript SDK Link
40
40
 
41
41
  <a target="_blank" href="https://guide.ncloud-docs.com/docs/bizapp-ncloudchat-javascriptsdk">https://guide.ncloud-docs.com/docs/bizapp-ncloudchat-javascriptsdk</a>
42
+
43
+
44
+
45
+ ## 배포 방법
46
+ npm publish --tag beta
package/ncloudchat.d.ts CHANGED
@@ -1,11 +1,11 @@
1
- declare module 'cloudchat/CloudChat' {
1
+ declare module 'ncloudchat/CloudChat' {
2
2
  /**
3
3
  * Copyright (c) NBASE CORP. and its affiliates.
4
4
  *
5
5
  * This source code is licensed under the MIT license found in the
6
6
  * LICENSE file in the root directory of this source tree.
7
7
  */
8
- import type { ChannelInput, MarkInput, PinInput } from "cloudchat/Type";
8
+ import type { ChannelInput, MarkInput, PinInput } from "ncloudchat/Type";
9
9
  /**
10
10
  * Class NCloudChat holds all the NCloudChat functionalities.
11
11
  *
@@ -296,6 +296,15 @@ declare module 'cloudchat/CloudChat' {
296
296
  * @returns {Promise<any>}
297
297
  */
298
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>;
299
308
  /**
300
309
  * Get subscription data of the user.
301
310
  *
@@ -537,7 +546,7 @@ declare module 'cloudchat/CloudChat' {
537
546
  }
538
547
 
539
548
  }
540
- declare module 'cloudchat/CoreManager' {
549
+ declare module 'ncloudchat/CoreManager' {
541
550
  /**
542
551
  * Copyright (c) NBASE CORP. and its affiliates.
543
552
  *
@@ -551,7 +560,7 @@ declare module 'cloudchat/CoreManager' {
551
560
  export default CoreManager;
552
561
 
553
562
  }
554
- declare module 'cloudchat/Dispatcher' {
563
+ declare module 'ncloudchat/Dispatcher' {
555
564
  /**
556
565
  * Copyright (c) NBASE CORP. and its affiliates.
557
566
  *
@@ -591,7 +600,7 @@ declare module 'cloudchat/Dispatcher' {
591
600
  export {};
592
601
 
593
602
  }
594
- declare module 'cloudchat/Network' {
603
+ declare module 'ncloudchat/Network' {
595
604
  /**
596
605
  * Copyright (c) NBASE CORP. and its affiliates.
597
606
  *
@@ -601,7 +610,7 @@ declare module 'cloudchat/Network' {
601
610
  export const fetchData: (returnKey: string | undefined, query: string, variables: object) => Promise<any>;
602
611
 
603
612
  }
604
- declare module 'cloudchat/Type' {
613
+ declare module 'ncloudchat/Type' {
605
614
  /**
606
615
  * Copyright (c) NBASE CORP. and its affiliates.
607
616
  *
@@ -614,8 +623,8 @@ declare module 'cloudchat/Type' {
614
623
  * @enum {string}
615
624
  */
616
625
  export enum ChannelType {
617
- PRIVATE = "PRIVATE",
618
- PUBLIC = "PUBLIC"
626
+ "PRIVATE" = 0,
627
+ "PUBLIC" = 1
619
628
  }
620
629
  /**
621
630
  * Interface for mark input.
@@ -685,7 +694,7 @@ declare module 'cloudchat/Type' {
685
694
  }
686
695
 
687
696
  }
688
- declare module 'cloudchat/Util' {
697
+ declare module 'ncloudchat/Util' {
689
698
  /**
690
699
  * Copyright (c) NBASE CORP. and its affiliates.
691
700
  *
@@ -705,7 +714,7 @@ declare module 'cloudchat/Util' {
705
714
  export { ObjectId, getOS, getTimeZone };
706
715
 
707
716
  }
708
- declare module 'cloudchat/graphql/channel' {
717
+ declare module 'ncloudchat/graphql/channel' {
709
718
  /**
710
719
  * Copyright (c) NBASE CORP. and its affiliates.
711
720
  *
@@ -721,7 +730,7 @@ declare module 'cloudchat/graphql/channel' {
721
730
  export const removeChannelMembersQuery: string;
722
731
 
723
732
  }
724
- declare module 'cloudchat/graphql/friend' {
733
+ declare module 'ncloudchat/graphql/friend' {
725
734
  /**
726
735
  * Copyright (c) NBASE CORP. and its affiliates.
727
736
  *
@@ -735,7 +744,7 @@ declare module 'cloudchat/graphql/friend' {
735
744
  export const getFriendshipsQuery: string;
736
745
 
737
746
  }
738
- declare module 'cloudchat/graphql/integration' {
747
+ declare module 'ncloudchat/graphql/integration' {
739
748
  /**
740
749
  * Copyright (c) NBASE CORP. and its affiliates.
741
750
  *
@@ -745,7 +754,7 @@ declare module 'cloudchat/graphql/integration' {
745
754
  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";
746
755
 
747
756
  }
748
- declare module 'cloudchat/graphql/invite' {
757
+ declare module 'ncloudchat/graphql/invite' {
749
758
  /**
750
759
  * Copyright (c) NBASE CORP. and its affiliates.
751
760
  *
@@ -755,7 +764,7 @@ declare module 'cloudchat/graphql/invite' {
755
764
  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";
756
765
 
757
766
  }
758
- declare module 'cloudchat/graphql/member' {
767
+ declare module 'ncloudchat/graphql/member' {
759
768
  /**
760
769
  * Copyright (c) NBASE CORP. and its affiliates.
761
770
  *
@@ -772,7 +781,7 @@ declare module 'cloudchat/graphql/member' {
772
781
  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";
773
782
 
774
783
  }
775
- declare module 'cloudchat/graphql/message' {
784
+ declare module 'ncloudchat/graphql/message' {
776
785
  /**
777
786
  * Copyright (c) NBASE CORP. and its affiliates.
778
787
  *
@@ -787,7 +796,7 @@ declare module 'cloudchat/graphql/message' {
787
796
  export const deleteMessageQuery: string;
788
797
 
789
798
  }
790
- declare module 'cloudchat/graphql/pin' {
799
+ declare module 'ncloudchat/graphql/pin' {
791
800
  /**
792
801
  * Copyright (c) NBASE CORP. and its affiliates.
793
802
  *
@@ -800,7 +809,7 @@ declare module 'cloudchat/graphql/pin' {
800
809
  export const updatePinQuery: string;
801
810
 
802
811
  }
803
- declare module 'cloudchat/graphql/project' {
812
+ declare module 'ncloudchat/graphql/project' {
804
813
  /**
805
814
  * Copyright (c) NBASE CORP. and its affiliates.
806
815
  *
@@ -809,7 +818,7 @@ declare module 'cloudchat/graphql/project' {
809
818
  */
810
819
 
811
820
  }
812
- declare module 'cloudchat/graphql/subscription' {
821
+ declare module 'ncloudchat/graphql/subscription' {
813
822
  /**
814
823
  * Copyright (c) NBASE CORP. and its affiliates.
815
824
  *
@@ -823,18 +832,18 @@ declare module 'cloudchat/graphql/subscription' {
823
832
  export const getSubscriptionsQuery: string;
824
833
 
825
834
  }
826
- declare module 'cloudchat/index' {
835
+ declare module 'ncloudchat/index' {
827
836
  /**
828
837
  * Copyright (c) NBASE CORP. and its affiliates.
829
838
  *
830
839
  * This source code is licensed under the MIT license found in the
831
840
  * LICENSE file in the root directory of this source tree.
832
841
  */
833
- import Chat from 'cloudchat/CloudChat';
842
+ import Chat from 'ncloudchat/CloudChat';
834
843
  export { Chat };
835
844
 
836
845
  }
837
- declare module 'cloudchat/logger' {
846
+ declare module 'ncloudchat/logger' {
838
847
  /**
839
848
  * Copyright (c) NBASE CORP. and its affiliates.
840
849
  *
@@ -848,14 +857,14 @@ declare module 'cloudchat/logger' {
848
857
  export { debug, error, info, warn };
849
858
 
850
859
  }
851
- declare module 'cloudchat/mutations/channel' {
860
+ declare module 'ncloudchat/mutations/channel' {
852
861
  /**
853
862
  * Copyright (c) NBASE CORP. and its affiliates.
854
863
  *
855
864
  * This source code is licensed under the MIT license found in the
856
865
  * LICENSE file in the root directory of this source tree.
857
866
  */
858
- import type { ChannelInput } from "cloudchat/Type";
867
+ import type { ChannelInput } from "ncloudchat/Type";
859
868
  /**
860
869
  * Create a new channel.
861
870
  *
@@ -907,7 +916,7 @@ declare module 'cloudchat/mutations/channel' {
907
916
  export const removeChannelMembers: (channelId: string, memberIds: any, options?: any) => Promise<any>;
908
917
 
909
918
  }
910
- declare module 'cloudchat/mutations/friend' {
919
+ declare module 'ncloudchat/mutations/friend' {
911
920
  /**
912
921
  * Copyright (c) NBASE CORP. and its affiliates.
913
922
  *
@@ -952,24 +961,24 @@ declare module 'cloudchat/mutations/friend' {
952
961
  export const removeFriend: (friendId: string) => Promise<any>;
953
962
 
954
963
  }
955
- declare module 'cloudchat/mutations/index' {
964
+ declare module 'ncloudchat/mutations/index' {
956
965
  /**
957
966
  * Copyright (c) NBASE CORP. and its affiliates.
958
967
  *
959
968
  * This source code is licensed under the MIT license found in the
960
969
  * LICENSE file in the root directory of this source tree.
961
970
  */
962
- export * from 'cloudchat/mutations/member';
963
- export * from 'cloudchat/mutations/channel';
964
- export * from 'cloudchat/mutations/message';
965
- export * from 'cloudchat/mutations/friend';
966
- export * from 'cloudchat/mutations/invite';
967
- export * from 'cloudchat/mutations/subscription';
968
- export * from 'cloudchat/mutations/pin';
969
- export * from 'cloudchat/mutations/integration';
971
+ export * from 'ncloudchat/mutations/member';
972
+ export * from 'ncloudchat/mutations/channel';
973
+ export * from 'ncloudchat/mutations/message';
974
+ export * from 'ncloudchat/mutations/friend';
975
+ export * from 'ncloudchat/mutations/invite';
976
+ export * from 'ncloudchat/mutations/subscription';
977
+ export * from 'ncloudchat/mutations/pin';
978
+ export * from 'ncloudchat/mutations/integration';
970
979
 
971
980
  }
972
- declare module 'cloudchat/mutations/integration' {
981
+ declare module 'ncloudchat/mutations/integration' {
973
982
  /**
974
983
  * Copyright (c) NBASE CORP. and its affiliates.
975
984
  *
@@ -987,7 +996,7 @@ declare module 'cloudchat/mutations/integration' {
987
996
  export const sendIntegration: (channelId: string, integrationId: string, to: string, message: string) => Promise<any>;
988
997
 
989
998
  }
990
- declare module 'cloudchat/mutations/invite' {
999
+ declare module 'ncloudchat/mutations/invite' {
991
1000
  /**
992
1001
  * Copyright (c) NBASE CORP. and its affiliates.
993
1002
  *
@@ -1006,7 +1015,7 @@ declare module 'cloudchat/mutations/invite' {
1006
1015
  export const createInvite: (channelId: string, friendIds: any) => Promise<any>;
1007
1016
 
1008
1017
  }
1009
- declare module 'cloudchat/mutations/member' {
1018
+ declare module 'ncloudchat/mutations/member' {
1010
1019
  /**
1011
1020
  * Copyright (c) NBASE CORP. and its affiliates.
1012
1021
  *
@@ -1049,10 +1058,10 @@ declare module 'cloudchat/mutations/member' {
1049
1058
  */
1050
1059
  export const deleteMemberBlock: (channelId: string, memberId: string) => Promise<any>;
1051
1060
  export const updateMember: (user_id: string, update: any) => Promise<any>;
1052
- export const setPushState: (push: boolean, ad: boolean, night: boolean) => Promise<any>;
1061
+ export const setPushState: (device: string, push: boolean, ad: boolean, night: boolean) => Promise<any>;
1053
1062
 
1054
1063
  }
1055
- declare module 'cloudchat/mutations/message' {
1064
+ declare module 'ncloudchat/mutations/message' {
1056
1065
  /**
1057
1066
  * Copyright (c) NBASE CORP. and its affiliates.
1058
1067
  *
@@ -1100,14 +1109,14 @@ declare module 'cloudchat/mutations/message' {
1100
1109
  export const deleteMessage: (channelId: string, messageId: string) => Promise<any>;
1101
1110
 
1102
1111
  }
1103
- declare module 'cloudchat/mutations/pin' {
1112
+ declare module 'ncloudchat/mutations/pin' {
1104
1113
  /**
1105
1114
  * Copyright (c) NBASE CORP. and its affiliates.
1106
1115
  *
1107
1116
  * This source code is licensed under the MIT license found in the
1108
1117
  * LICENSE file in the root directory of this source tree.
1109
1118
  */
1110
- import type { PinInput } from "cloudchat/Type";
1119
+ import type { PinInput } from "ncloudchat/Type";
1111
1120
  /**
1112
1121
  * Create a new pin.
1113
1122
  *
@@ -1131,14 +1140,14 @@ declare module 'cloudchat/mutations/pin' {
1131
1140
  export const updatePin: (id: string, channelId: string, pin: PinInput) => Promise<any>;
1132
1141
 
1133
1142
  }
1134
- declare module 'cloudchat/mutations/subscription' {
1143
+ declare module 'ncloudchat/mutations/subscription' {
1135
1144
  /**
1136
1145
  * Copyright (c) NBASE CORP. and its affiliates.
1137
1146
  *
1138
1147
  * This source code is licensed under the MIT license found in the
1139
1148
  * LICENSE file in the root directory of this source tree.
1140
1149
  */
1141
- import type { MarkInput } from "cloudchat/Type";
1150
+ import type { MarkInput } from "ncloudchat/Type";
1142
1151
  /**
1143
1152
  * Create a subscription.
1144
1153
  *
@@ -1171,7 +1180,7 @@ declare module 'cloudchat/mutations/subscription' {
1171
1180
  export const updateSubscription: (channelId: string, mark: MarkInput, option?: string) => Promise<any>;
1172
1181
 
1173
1182
  }
1174
- declare module 'cloudchat/queries/channel' {
1183
+ declare module 'ncloudchat/queries/channel' {
1175
1184
  /**
1176
1185
  * Copyright (c) NBASE CORP. and its affiliates.
1177
1186
  *
@@ -1200,7 +1209,7 @@ declare module 'cloudchat/queries/channel' {
1200
1209
  export const getChannels: (filter: string, sort: string, option: string) => Promise<any>;
1201
1210
 
1202
1211
  }
1203
- declare module 'cloudchat/queries/friend' {
1212
+ declare module 'ncloudchat/queries/friend' {
1204
1213
  /**
1205
1214
  * Copyright (c) NBASE CORP. and its affiliates.
1206
1215
  *
@@ -1220,24 +1229,24 @@ declare module 'cloudchat/queries/friend' {
1220
1229
  export const getFriendships: (filter: string, sort: string, option: string) => Promise<any>;
1221
1230
 
1222
1231
  }
1223
- declare module 'cloudchat/queries/index' {
1232
+ declare module 'ncloudchat/queries/index' {
1224
1233
  /**
1225
1234
  * Copyright (c) NBASE CORP. and its affiliates.
1226
1235
  *
1227
1236
  * This source code is licensed under the MIT license found in the
1228
1237
  * LICENSE file in the root directory of this source tree.
1229
1238
  */
1230
- export * from 'cloudchat/queries/project';
1231
- export * from 'cloudchat/queries/channel';
1232
- export * from 'cloudchat/queries/message';
1233
- export * from 'cloudchat/queries/subscription';
1234
- export * from 'cloudchat/queries/friend';
1235
- export * from 'cloudchat/queries/member';
1236
- export * from 'cloudchat/queries/memberblocks';
1237
- export * from 'cloudchat/queries/pin';
1239
+ export * from 'ncloudchat/queries/project';
1240
+ export * from 'ncloudchat/queries/channel';
1241
+ export * from 'ncloudchat/queries/message';
1242
+ export * from 'ncloudchat/queries/subscription';
1243
+ export * from 'ncloudchat/queries/friend';
1244
+ export * from 'ncloudchat/queries/member';
1245
+ export * from 'ncloudchat/queries/memberblocks';
1246
+ export * from 'ncloudchat/queries/pin';
1238
1247
 
1239
1248
  }
1240
- declare module 'cloudchat/queries/member' {
1249
+ declare module 'ncloudchat/queries/member' {
1241
1250
  /**
1242
1251
  * Copyright (c) NBASE CORP. and its affiliates.
1243
1252
  *
@@ -1258,7 +1267,7 @@ declare module 'cloudchat/queries/member' {
1258
1267
  export const getPushState: () => Promise<any>;
1259
1268
 
1260
1269
  }
1261
- declare module 'cloudchat/queries/memberblocks' {
1270
+ declare module 'ncloudchat/queries/memberblocks' {
1262
1271
  /**
1263
1272
  * Copyright (c) NBASE CORP. and its affiliates.
1264
1273
  *
@@ -1278,7 +1287,7 @@ declare module 'cloudchat/queries/memberblocks' {
1278
1287
  export const getMemberBlocks: (filter: string, sort: string, option: string) => Promise<any>;
1279
1288
 
1280
1289
  }
1281
- declare module 'cloudchat/queries/message' {
1290
+ declare module 'ncloudchat/queries/message' {
1282
1291
  /**
1283
1292
  * Copyright (c) NBASE CORP. and its affiliates.
1284
1293
  *
@@ -1317,7 +1326,7 @@ declare module 'cloudchat/queries/message' {
1317
1326
  export const unreadCount: (channelId: string) => Promise<any>;
1318
1327
 
1319
1328
  }
1320
- declare module 'cloudchat/queries/pin' {
1329
+ declare module 'ncloudchat/queries/pin' {
1321
1330
  /**
1322
1331
  * Copyright (c) NBASE CORP. and its affiliates.
1323
1332
  *
@@ -1348,7 +1357,7 @@ declare module 'cloudchat/queries/pin' {
1348
1357
  export const getPins: (channelId: string, filter: string, sort: string, option: string) => Promise<any>;
1349
1358
 
1350
1359
  }
1351
- declare module 'cloudchat/queries/project' {
1360
+ declare module 'ncloudchat/queries/project' {
1352
1361
  /**
1353
1362
  * Copyright (c) NBASE CORP. and its affiliates.
1354
1363
  *
@@ -1365,7 +1374,7 @@ declare module 'cloudchat/queries/project' {
1365
1374
  */
1366
1375
 
1367
1376
  }
1368
- declare module 'cloudchat/queries/subscription' {
1377
+ declare module 'ncloudchat/queries/subscription' {
1369
1378
  /**
1370
1379
  * Copyright (c) NBASE CORP. and its affiliates.
1371
1380
  *
@@ -1395,7 +1404,7 @@ declare module 'cloudchat/queries/subscription' {
1395
1404
  export const getSubscriptions: (filter: any, sort: any, option: any) => Promise<any>;
1396
1405
 
1397
1406
  }
1398
- declare module 'cloudchat' {
1399
- import main = require('cloudchat/index');
1407
+ declare module 'ncloudchat' {
1408
+ import main = require('ncloudchat/index');
1400
1409
  export = main;
1401
1410
  }