ncloudchat 1.0.46 → 1.0.47
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 +1 -0
- package/ncloudchat.d.ts +27 -3
- package/ncloudchat.min.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -35,6 +35,7 @@ npm install ncloudchat
|
|
|
35
35
|
yarn add ncloudchat
|
|
36
36
|
```
|
|
37
37
|
|
|
38
|
+
|
|
38
39
|
Ncloud Chat JavaScript SDK Link
|
|
39
40
|
|
|
40
41
|
<a target="_blank" href="https://guide.ncloud-docs.com/docs/bizapp-ncloudchat-javascriptsdk">https://guide.ncloud-docs.com/docs/bizapp-ncloudchat-javascriptsdk</a>
|
package/ncloudchat.d.ts
CHANGED
|
@@ -291,11 +291,11 @@ declare module 'cloudchat/CloudChat' {
|
|
|
291
291
|
* Get a count of unread messages of a channel.
|
|
292
292
|
*
|
|
293
293
|
* @async
|
|
294
|
-
* @function
|
|
294
|
+
* @function unreadCount
|
|
295
295
|
* @param {string} channelId - The id of a channel.
|
|
296
296
|
* @returns {Promise<any>}
|
|
297
297
|
*/
|
|
298
|
-
|
|
298
|
+
unreadCount(channelId: string): Promise<any>;
|
|
299
299
|
/**
|
|
300
300
|
* Get subscription data of the user.
|
|
301
301
|
*
|
|
@@ -516,6 +516,24 @@ declare module 'cloudchat/CloudChat' {
|
|
|
516
516
|
* @returns {Promise<any>} The data of the updated pin.
|
|
517
517
|
*/
|
|
518
518
|
sendIntegration(channelId: string, integrationId: string, to: string, message: any): Promise<any>;
|
|
519
|
+
/**
|
|
520
|
+
* set push state
|
|
521
|
+
*
|
|
522
|
+
* @async
|
|
523
|
+
* @function setPushState
|
|
524
|
+
* @param {string} channelId - An id of the channel.
|
|
525
|
+
* @param {string} integrationId - ID of the integration.
|
|
526
|
+
* @param {string} to - To of the integration.
|
|
527
|
+
* @param {string} message - Message of the integration.
|
|
528
|
+
* @returns {Promise<any>} The data of the updated pin.
|
|
529
|
+
*/
|
|
530
|
+
setPushState(push: boolean, ad: boolean, night: boolean): Promise<any>;
|
|
531
|
+
/**
|
|
532
|
+
* 비동기 방식으로 푸시 상태를 가져오는 메서드
|
|
533
|
+
* @returns {Promise<any>} 푸시 상태 정보
|
|
534
|
+
* @throws {Error} 오류가 발생한 경우 예외를 던짐
|
|
535
|
+
*/
|
|
536
|
+
getPushState(): Promise<any>;
|
|
519
537
|
}
|
|
520
538
|
|
|
521
539
|
}
|
|
@@ -682,7 +700,9 @@ declare module 'cloudchat/Util' {
|
|
|
682
700
|
* @returns {string} decoded string.
|
|
683
701
|
*/
|
|
684
702
|
const ObjectId: (id: string) => string;
|
|
685
|
-
|
|
703
|
+
const getOS: () => string;
|
|
704
|
+
const getTimeZone: () => string;
|
|
705
|
+
export { ObjectId, getOS, getTimeZone };
|
|
686
706
|
|
|
687
707
|
}
|
|
688
708
|
declare module 'cloudchat/graphql/channel' {
|
|
@@ -742,12 +762,14 @@ declare module 'cloudchat/graphql/member' {
|
|
|
742
762
|
* This source code is licensed under the MIT license found in the
|
|
743
763
|
* LICENSE file in the root directory of this source tree.
|
|
744
764
|
*/
|
|
765
|
+
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";
|
|
745
766
|
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 }";
|
|
746
767
|
export const createMemberBlockQuery: string;
|
|
747
768
|
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";
|
|
748
769
|
export const deleteMemberBlockQuery: string;
|
|
749
770
|
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";
|
|
750
771
|
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";
|
|
772
|
+
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";
|
|
751
773
|
|
|
752
774
|
}
|
|
753
775
|
declare module 'cloudchat/graphql/message' {
|
|
@@ -1027,6 +1049,7 @@ declare module 'cloudchat/mutations/member' {
|
|
|
1027
1049
|
*/
|
|
1028
1050
|
export const deleteMemberBlock: (channelId: string, memberId: string) => Promise<any>;
|
|
1029
1051
|
export const updateMember: (user_id: string, update: any) => Promise<any>;
|
|
1052
|
+
export const setPushState: (push: boolean, ad: boolean, night: boolean) => Promise<any>;
|
|
1030
1053
|
|
|
1031
1054
|
}
|
|
1032
1055
|
declare module 'cloudchat/mutations/message' {
|
|
@@ -1232,6 +1255,7 @@ declare module 'cloudchat/queries/member' {
|
|
|
1232
1255
|
* @returns {Promise<any>}
|
|
1233
1256
|
*/
|
|
1234
1257
|
export const getMembers: (filter: string, sort: string, option: string) => Promise<any>;
|
|
1258
|
+
export const getPushState: () => Promise<any>;
|
|
1235
1259
|
|
|
1236
1260
|
}
|
|
1237
1261
|
declare module 'cloudchat/queries/memberblocks' {
|