ncloudchat 1.0.45 → 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 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
  *
@@ -730,7 +744,7 @@ declare module 'cloudchat/graphql/member' {
730
744
  */
731
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 }";
732
746
  export const createMemberBlockQuery: string;
733
- 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 $notications: NoticationInput\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, notications: $notications}) {\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 notications {\n token\n device\n os\n }\n }\n }\n}\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";
734
748
  export const deleteMemberBlockQuery: string;
735
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";
736
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";
@@ -805,10 +819,11 @@ declare module 'cloudchat/logger' {
805
819
  * This source code is licensed under the MIT license found in the
806
820
  * LICENSE file in the root directory of this source tree.
807
821
  */
808
- const debug: (value: any) => void;
809
- const error: (value: any) => void;
810
- const info: (value: any) => void;
811
- export { debug, error, info };
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 };
812
827
 
813
828
  }
814
829
  declare module 'cloudchat/mutations/channel' {