ncloudchat 1.0.43 → 1.0.46
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/ncloudchat.d.ts +64 -7
- package/ncloudchat.min.js +1 -1
- package/package.json +3 -3
package/ncloudchat.d.ts
CHANGED
|
@@ -29,9 +29,13 @@ declare module 'cloudchat/CloudChat' {
|
|
|
29
29
|
* @function initialize
|
|
30
30
|
* @param {string} projectId - The id of a project.
|
|
31
31
|
*/
|
|
32
|
-
initialize(projectId: string): void;
|
|
32
|
+
initialize(projectId: string, region?: string): void;
|
|
33
|
+
getDebug(): any;
|
|
34
|
+
setDebug(debug: boolean): void;
|
|
33
35
|
getLang(): any;
|
|
34
36
|
setLang(lang: string): void;
|
|
37
|
+
getRegion(): any;
|
|
38
|
+
setRegion(region: string): void;
|
|
35
39
|
getUser(): any;
|
|
36
40
|
getProjectId(): any;
|
|
37
41
|
setServerUrl(url: string): void;
|
|
@@ -146,6 +150,16 @@ declare module 'cloudchat/CloudChat' {
|
|
|
146
150
|
* @returns {Promise<any>}
|
|
147
151
|
*/
|
|
148
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>;
|
|
149
163
|
/**
|
|
150
164
|
* Update a message.
|
|
151
165
|
*
|
|
@@ -490,6 +504,18 @@ declare module 'cloudchat/CloudChat' {
|
|
|
490
504
|
*/
|
|
491
505
|
updatePin(pinId: string, channelId: string, pin: PinInput): Promise<any>;
|
|
492
506
|
getServerUrl(): Promise<any>;
|
|
507
|
+
/**
|
|
508
|
+
* send integration.
|
|
509
|
+
*
|
|
510
|
+
* @async
|
|
511
|
+
* @function sendIntegration
|
|
512
|
+
* @param {string} channelId - An id of the channel.
|
|
513
|
+
* @param {string} integrationId - ID of the integration.
|
|
514
|
+
* @param {string} to - To of the integration.
|
|
515
|
+
* @param {string} message - Message of the integration.
|
|
516
|
+
* @returns {Promise<any>} The data of the updated pin.
|
|
517
|
+
*/
|
|
518
|
+
sendIntegration(channelId: string, integrationId: string, to: string, message: any): Promise<any>;
|
|
493
519
|
}
|
|
494
520
|
|
|
495
521
|
}
|
|
@@ -600,6 +626,7 @@ declare module 'cloudchat/Type' {
|
|
|
600
626
|
linkUrl: string;
|
|
601
627
|
customField: string;
|
|
602
628
|
imageUrl: string;
|
|
629
|
+
integrationId: string;
|
|
603
630
|
members: string[];
|
|
604
631
|
}
|
|
605
632
|
/**
|
|
@@ -687,6 +714,16 @@ declare module 'cloudchat/graphql/friend' {
|
|
|
687
714
|
export const removeFriendQuery: string;
|
|
688
715
|
export const getFriendshipsQuery: string;
|
|
689
716
|
|
|
717
|
+
}
|
|
718
|
+
declare module 'cloudchat/graphql/integration' {
|
|
719
|
+
/**
|
|
720
|
+
* Copyright (c) NBASE CORP. and its affiliates.
|
|
721
|
+
*
|
|
722
|
+
* This source code is licensed under the MIT license found in the
|
|
723
|
+
* LICENSE file in the root directory of this source tree.
|
|
724
|
+
*/
|
|
725
|
+
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";
|
|
726
|
+
|
|
690
727
|
}
|
|
691
728
|
declare module 'cloudchat/graphql/invite' {
|
|
692
729
|
/**
|
|
@@ -705,9 +742,9 @@ declare module 'cloudchat/graphql/member' {
|
|
|
705
742
|
* This source code is licensed under the MIT license found in the
|
|
706
743
|
* LICENSE file in the root directory of this source tree.
|
|
707
744
|
*/
|
|
708
|
-
export const loginQuery = "mutation login(\n $projectId: String!\n $userId: String!\n $name: String\n $profile: String\n $customField: String\n ) {\n login(\n input: {\n projectId: $projectId\n userId: $userId\n name: $name\n profile: $profile\n customField: $customField\n }\n ) {\n token\n }\n }";
|
|
745
|
+
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 }";
|
|
709
746
|
export const createMemberBlockQuery: string;
|
|
710
|
-
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 $
|
|
747
|
+
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";
|
|
711
748
|
export const deleteMemberBlockQuery: string;
|
|
712
749
|
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";
|
|
713
750
|
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";
|
|
@@ -782,10 +819,11 @@ declare module 'cloudchat/logger' {
|
|
|
782
819
|
* This source code is licensed under the MIT license found in the
|
|
783
820
|
* LICENSE file in the root directory of this source tree.
|
|
784
821
|
*/
|
|
785
|
-
const debug: (value: any) => void;
|
|
786
|
-
const
|
|
787
|
-
const
|
|
788
|
-
|
|
822
|
+
const debug: (value: any, metadata?: any) => void;
|
|
823
|
+
const info: (value: any, metadata?: any) => void;
|
|
824
|
+
const warn: (value: any, metadata?: any) => void;
|
|
825
|
+
const error: (value: any, metadata?: any) => void;
|
|
826
|
+
export { debug, error, info, warn };
|
|
789
827
|
|
|
790
828
|
}
|
|
791
829
|
declare module 'cloudchat/mutations/channel' {
|
|
@@ -906,6 +944,25 @@ declare module 'cloudchat/mutations/index' {
|
|
|
906
944
|
export * from 'cloudchat/mutations/invite';
|
|
907
945
|
export * from 'cloudchat/mutations/subscription';
|
|
908
946
|
export * from 'cloudchat/mutations/pin';
|
|
947
|
+
export * from 'cloudchat/mutations/integration';
|
|
948
|
+
|
|
949
|
+
}
|
|
950
|
+
declare module 'cloudchat/mutations/integration' {
|
|
951
|
+
/**
|
|
952
|
+
* Copyright (c) NBASE CORP. and its affiliates.
|
|
953
|
+
*
|
|
954
|
+
* This source code is licensed under the MIT license found in the
|
|
955
|
+
* LICENSE file in the root directory of this source tree.
|
|
956
|
+
*/
|
|
957
|
+
/**
|
|
958
|
+
* Request a friendship to a user.
|
|
959
|
+
*
|
|
960
|
+
* @async
|
|
961
|
+
* @function requestFriend
|
|
962
|
+
* @param {string} friendId - An id of the friend to request.
|
|
963
|
+
* @returns {Promise<any>}
|
|
964
|
+
*/
|
|
965
|
+
export const sendIntegration: (channelId: string, integrationId: string, to: string, message: string) => Promise<any>;
|
|
909
966
|
|
|
910
967
|
}
|
|
911
968
|
declare module 'cloudchat/mutations/invite' {
|