ncloudchat 1.0.31 → 1.0.35

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.
Files changed (143) hide show
  1. package/LICENSE.md +2 -2
  2. package/README.md +23 -393
  3. package/ncloudchat.d.ts +1298 -0
  4. package/ncloudchat.min.js +1 -0
  5. package/package.json +19 -39
  6. package/deploy.sh +0 -20
  7. package/esm/CloudChat.d.ts +0 -481
  8. package/esm/CloudChat.js +0 -1735
  9. package/esm/CloudChat.js.map +0 -1
  10. package/esm/CoreManager.d.ts +0 -11
  11. package/esm/CoreManager.js +0 -36
  12. package/esm/CoreManager.js.map +0 -1
  13. package/esm/Dispatcher.d.ts +0 -37
  14. package/esm/Dispatcher.js +0 -93
  15. package/esm/Dispatcher.js.map +0 -1
  16. package/esm/Network.d.ts +0 -7
  17. package/esm/Network.js +0 -93
  18. package/esm/Network.js.map +0 -1
  19. package/esm/Type.d.ts +0 -79
  20. package/esm/Type.js +0 -28
  21. package/esm/Type.js.map +0 -1
  22. package/esm/Util.d.ts +0 -15
  23. package/esm/Util.js +0 -20
  24. package/esm/Util.js.map +0 -1
  25. package/esm/graphql/channel.d.ts +0 -13
  26. package/esm/graphql/channel.js +0 -16
  27. package/esm/graphql/channel.js.map +0 -1
  28. package/esm/graphql/friend.d.ts +0 -11
  29. package/esm/graphql/friend.js +0 -13
  30. package/esm/graphql/friend.js.map +0 -1
  31. package/esm/graphql/invite.d.ts +0 -7
  32. package/esm/graphql/invite.js +0 -8
  33. package/esm/graphql/invite.js.map +0 -1
  34. package/esm/graphql/member.d.ts +0 -11
  35. package/esm/graphql/member.js +0 -13
  36. package/esm/graphql/member.js.map +0 -1
  37. package/esm/graphql/message.d.ts +0 -11
  38. package/esm/graphql/message.js +0 -13
  39. package/esm/graphql/message.js.map +0 -1
  40. package/esm/graphql/pin.d.ts +0 -10
  41. package/esm/graphql/pin.js +0 -12
  42. package/esm/graphql/pin.js.map +0 -1
  43. package/esm/graphql/project.d.ts +0 -7
  44. package/esm/graphql/project.js +0 -8
  45. package/esm/graphql/project.js.map +0 -1
  46. package/esm/graphql/subscription.d.ts +0 -11
  47. package/esm/graphql/subscription.js +0 -13
  48. package/esm/graphql/subscription.js.map +0 -1
  49. package/esm/index.d.ts +0 -8
  50. package/esm/index.js +0 -9
  51. package/esm/index.js.map +0 -1
  52. package/esm/logger.d.ts +0 -10
  53. package/esm/logger.js +0 -17
  54. package/esm/logger.js.map +0 -1
  55. package/esm/mutations/channel.d.ts +0 -56
  56. package/esm/mutations/channel.js +0 -170
  57. package/esm/mutations/channel.js.map +0 -1
  58. package/esm/mutations/friend.d.ts +0 -42
  59. package/esm/mutations/friend.js +0 -122
  60. package/esm/mutations/friend.js.map +0 -1
  61. package/esm/mutations/index.d.ts +0 -13
  62. package/esm/mutations/index.js +0 -14
  63. package/esm/mutations/index.js.map +0 -1
  64. package/esm/mutations/invite.d.ts +0 -16
  65. package/esm/mutations/invite.js +0 -67
  66. package/esm/mutations/invite.js.map +0 -1
  67. package/esm/mutations/member.d.ts +0 -41
  68. package/esm/mutations/member.js +0 -129
  69. package/esm/mutations/member.js.map +0 -1
  70. package/esm/mutations/message.d.ts +0 -37
  71. package/esm/mutations/message.js +0 -130
  72. package/esm/mutations/message.js.map +0 -1
  73. package/esm/mutations/pin.d.ts +0 -28
  74. package/esm/mutations/pin.js +0 -88
  75. package/esm/mutations/pin.js.map +0 -1
  76. package/esm/mutations/subscription.d.ts +0 -37
  77. package/esm/mutations/subscription.js +0 -115
  78. package/esm/mutations/subscription.js.map +0 -1
  79. package/esm/queries/channel.d.ts +0 -26
  80. package/esm/queries/channel.js +0 -88
  81. package/esm/queries/channel.js.map +0 -1
  82. package/esm/queries/friend.d.ts +0 -17
  83. package/esm/queries/friend.js +0 -69
  84. package/esm/queries/friend.js.map +0 -1
  85. package/esm/queries/index.d.ts +0 -14
  86. package/esm/queries/index.js +0 -15
  87. package/esm/queries/index.js.map +0 -1
  88. package/esm/queries/member.d.ts +0 -17
  89. package/esm/queries/member.js +0 -69
  90. package/esm/queries/member.js.map +0 -1
  91. package/esm/queries/memberblocks.d.ts +0 -17
  92. package/esm/queries/memberblocks.js +0 -69
  93. package/esm/queries/memberblocks.js.map +0 -1
  94. package/esm/queries/message.d.ts +0 -36
  95. package/esm/queries/message.js +0 -109
  96. package/esm/queries/message.js.map +0 -1
  97. package/esm/queries/pin.d.ts +0 -28
  98. package/esm/queries/pin.js +0 -92
  99. package/esm/queries/pin.js.map +0 -1
  100. package/esm/queries/project.d.ts +0 -14
  101. package/esm/queries/project.js +0 -63
  102. package/esm/queries/project.js.map +0 -1
  103. package/esm/queries/subscription.d.ts +0 -27
  104. package/esm/queries/subscription.js +0 -90
  105. package/esm/queries/subscription.js.map +0 -1
  106. package/lib/CloudChat.js +0 -2658
  107. package/lib/CoreManager.js +0 -45
  108. package/lib/Dispatcher.js +0 -125
  109. package/lib/Network.js +0 -226
  110. package/lib/Type.js +0 -44
  111. package/lib/Util.js +0 -32
  112. package/lib/graphql/channel.js +0 -32
  113. package/lib/graphql/friend.js +0 -27
  114. package/lib/graphql/invite.js +0 -18
  115. package/lib/graphql/member.js +0 -27
  116. package/lib/graphql/message.js +0 -27
  117. package/lib/graphql/pin.js +0 -25
  118. package/lib/graphql/project.js +0 -18
  119. package/lib/graphql/subscription.js +0 -27
  120. package/lib/index.js +0 -18
  121. package/lib/logger.js +0 -33
  122. package/lib/mutations/channel.js +0 -354
  123. package/lib/mutations/friend.js +0 -299
  124. package/lib/mutations/index.js +0 -109
  125. package/lib/mutations/invite.js +0 -205
  126. package/lib/mutations/member.js +0 -304
  127. package/lib/mutations/message.js +0 -298
  128. package/lib/mutations/pin.js +0 -229
  129. package/lib/mutations/subscription.js +0 -281
  130. package/lib/queries/channel.js +0 -239
  131. package/lib/queries/friend.js +0 -207
  132. package/lib/queries/index.js +0 -123
  133. package/lib/queries/member.js +0 -207
  134. package/lib/queries/memberblocks.js +0 -207
  135. package/lib/queries/message.js +0 -273
  136. package/lib/queries/pin.js +0 -243
  137. package/lib/queries/project.js +0 -201
  138. package/lib/queries/subscription.js +0 -241
  139. package/ncloudchat_javascript.md +0 -289
  140. package/tsconfig.json +0 -32
  141. package/types/exif.d.ts +0 -10
  142. package/types/window.d.ts +0 -5
  143. package//353/260/260/355/217/254/354/210/234/354/204/234.md +0 -8
package/package.json CHANGED
@@ -1,51 +1,31 @@
1
1
  {
2
2
  "name": "ncloudchat",
3
- "jsName": "ncloudchat",
4
- "version": "1.0.31",
5
- "private": false,
6
- "description": "",
3
+ "version" : "1.0.35",
4
+ "main" : "ncloudchat.min.js",
5
+ "description": "The JavaScript SDK for NAVER Cloud ChatPlatform",
7
6
  "keywords": [
8
7
  "cloudchat",
9
8
  "ncloudchat",
10
9
  "navercloud",
11
10
  "ncloud",
12
- "chat"
11
+ "chat",
12
+ "sdk",
13
+ "messaging",
14
+ "pro",
15
+ "naver"
13
16
  ],
14
- "homepage": "https://www.ncloud.com/product/ncloudchat",
15
- "main": "lib/index.js",
16
- "types": "esm/index.d.ts",
17
- "module": "esm/index.js",
18
- "scripts": {
19
- "clean": "rm -rf \"./(lib|dist|esm)\"",
20
- "test": "jest --coverage",
21
- "build": "npm run clean && tsc && babel esm --out-dir lib && webpack --config webpack.prod.js",
22
- "start": "webpack-dev-server --open --config webpack.dev.js",
23
- "server": "node test/server.js",
24
- "deploy": "./deploy.sh dev",
25
- "deploy-release": "./deploy.sh release"
17
+ "dependencies": {
18
+ "graphql": "^16.6.0",
19
+ "socket.io-client": "^4.5.4"
26
20
  },
21
+ "author": "NAVER Cloud",
22
+ "license": "LICENSE.md",
27
23
  "repository": {
28
- "type": "git"
24
+ "type": "git",
25
+ "url": "git+https://github.com/nbase-io/NcloudChat-SDK-JS.git"
29
26
  },
30
- "author": "NAVER Cloud",
31
- "devDependencies": {
32
- "@babel/cli": "^7.19.3",
33
- "@babel/core": "^7.19.3",
34
- "@babel/plugin-transform-runtime": "^7.19.1",
35
- "@babel/preset-env": "^7.19.3",
36
- "@babel/runtime": "^7.19.4",
37
- "@babel/runtime-corejs2": "^7.10.2",
38
- "ts-loader": "^9.4.1",
39
- "typescript": "^4.8.4",
40
- "webpack": "^5.74.0",
41
- "webpack-cli": "^4.10.0",
42
- "webpack-dev-server": "^4.11.1",
43
- "webpack-merge": "^5.8.0"
27
+ "bugs": {
28
+ "url": "https://github.com/nbase-io/NcloudChat-SDK-JS/issues"
44
29
  },
45
- "license": "MIT",
46
- "dependencies": {
47
- "core-js": "^2.6.12",
48
- "graphql": "^16.6.0",
49
- "socket.io-client": "^4.5.2"
50
- }
51
- }
30
+ "homepage": "https://guide.ncloud-docs.com/docs/bizapp-ncloudchat-javascriptsdk"
31
+ }
package/deploy.sh DELETED
@@ -1,20 +0,0 @@
1
- VERSION='';
2
- re="\"(version)\": \"([^\"]*)\"";
3
-
4
- while read -r l; do
5
- if [[ $l =~ $re ]]; then
6
- value="${BASH_REMATCH[2]}";
7
- VERSION="$value";
8
- fi
9
- done < package.json;
10
-
11
- if [ "dev" == "$1" ]; then
12
- npm run build
13
- aws --endpoint-url=https://kr.object.ncloudstorage.com s3 cp dist/ncloudchat-${VERSION}.min.js s3://ncloudchat/dev/ --acl public-read
14
- aws --endpoint-url=https://kr.object.ncloudstorage.com s3 cp dist/ncloudchat-${VERSION}.min.js s3://ncloudchat/dev/ncloudchat-lastest.min.js --acl public-read
15
-
16
- elif [ "release" = "$1" ]; then
17
- npm run build
18
- aws --endpoint-url=https://kr.object.ncloudstorage.com s3 cp dist/ncloudchat-${VERSION}.min.js s3://ncloudchat/ --acl public-read
19
- # aws --endpoint-url=https://kr.object.ncloudstorage.com s3 cp dist/ncloudchat-${VERSION}.min.js s3://ncloudchat/ncloudchat-lastest.min.js --acl public-read
20
- fi
@@ -1,481 +0,0 @@
1
- /**
2
- * Copyright (c) NBASE CORP. and its affiliates.
3
- *
4
- * This source code is licensed under the MIT license found in the
5
- * LICENSE file in the root directory of this source tree.
6
- */
7
- import type { ChannelInput, MarkInput, PinInput } from "./Type";
8
- /**
9
- * Class NCloudChat holds all the NCloudChat functionalities.
10
- *
11
- * @class
12
- */
13
- export default class NCloudChat {
14
- private dp;
15
- private socket;
16
- private connected;
17
- private connectedCount;
18
- /**
19
- * Create a `NCloudChat` instance and a Dispatcher.
20
- *
21
- * @constructs
22
- */
23
- constructor(debug?: boolean);
24
- clear(): void;
25
- /**
26
- * Initialize a new `NCloudChat` instance of project and user.
27
- *
28
- * @function initialize
29
- * @param {string} projectId - The id of a project.
30
- */
31
- initialize(projectId: string): void;
32
- getLang(): string;
33
- getUser(): any;
34
- getProjectId(): any;
35
- setServerUrl(url: string): void;
36
- setSocketUrl(url: string): void;
37
- setProjectId(projectId: string): void;
38
- setToken(token: string): void;
39
- setUser(user: any): void;
40
- private inputValidation;
41
- /**
42
- * Create a connection between a socket and a client.
43
- *
44
- * @async connect
45
- * @param {any} user
46
- * @param {string} userToken
47
- * @returns
48
- */
49
- connect(user: any, userToken?: string): Promise<any>;
50
- /**
51
- * Mute channel notifications.
52
- *
53
- * @async
54
- * @function mute
55
- * @param {string} channel
56
- * @returns {Promise<any>}
57
- */
58
- mute(channel: string): Promise<any>;
59
- /**
60
- * Unmute channel notifications.
61
- *
62
- * @async
63
- * @function unmute
64
- * @param {string} channel
65
- * @returns {Promise<any>}
66
- */
67
- unmute(channel: string): Promise<any>;
68
- /**
69
- * Subscribe a channel.
70
- *
71
- * @async
72
- * @function subscibe
73
- * @param {string} channel - The id of a channel.
74
- * @param {any} option
75
- * @returns
76
- */
77
- subscribe(channel: string, option?: any): Promise<any>;
78
- /**
79
- * Unsubscribe from a channel.
80
- *
81
- * @async
82
- * @function unsubscribe
83
- * @param {string} channel - The id of a chennel
84
- * @returns {Promise<any>}
85
- */
86
- unsubscribe(channel: string): Promise<any>;
87
- /**
88
- * Translate a message from a souce language to a target language.
89
- *
90
- * @async
91
- * @function translateMessage
92
- * @param {string} channelId - The id of a channel.
93
- * @param {string} source - A source language.
94
- * @param {string} target - A target language.
95
- * @param {string} message - An message to be translated.
96
- * @returns {Promise<any>}
97
- */
98
- translateMessage(channelId: string, source: string, target: string, message: string): Promise<any>;
99
- /**
100
- * Send a message to a channel.
101
- *
102
- * @async
103
- * @function sendMessage
104
- * @param {string} channel - The id of a channel.
105
- * @param {any} opt
106
- * @returns {Promise<any>}
107
- */
108
- sendMessage(channel: string, opt: any): Promise<any>;
109
- /**
110
- * Send an express message to a channel.
111
- *
112
- * @async
113
- * @function sendExpressMessage
114
- * @param {string} channel - The id of a channel.
115
- * @param {any} opt
116
- * @returns {Promise<any>}
117
- */
118
- sendExpressMessage(channel: string, opt: any): Promise<any>;
119
- /**
120
- * Send an image to a channel. Only supports png, jpg, jpeg file types.
121
- *
122
- * @async
123
- * @function sendImage
124
- * @param {string} channelId - The id of a channel.
125
- * @param {any} file - An image file.
126
- * @returns {Promise<any>}
127
- */
128
- sendImage(channelId: string, file: any): Promise<any>;
129
- /**
130
- * Update a message.
131
- *
132
- * @todo
133
- * @async
134
- * @function updateMessage
135
- * @param {string} channel
136
- * @param {string} message_id
137
- * @param {string} message
138
- */
139
- updateMessage(channel: string, message_id: string, message: string): Promise<void>;
140
- /**
141
- * Delete a message.
142
- * @async
143
- * @function deleteMessage
144
- * @param {string} channel
145
- * @param {string} message_id
146
- */
147
- deleteMessage(channel: string, message_id: string): Promise<void>;
148
- /**
149
- * Disconnect from a socket.
150
- *
151
- * @async
152
- * @function disconnect
153
- * @returns
154
- */
155
- disconnect(): Promise<void>;
156
- /**
157
- * Check if a client is connected to a socket.
158
- *
159
- * @function isConnected
160
- * @returns {boolean}
161
- */
162
- isConnected(): boolean;
163
- isSocketConnected(): boolean;
164
- /**
165
- * Bind fn event handlers.
166
- *
167
- * @async
168
- * @function bind
169
- * @param {string} id
170
- * @param {any} fn
171
- */
172
- bind(id: string, fn: any): Promise<void>;
173
- /**
174
- * Unbind fn event handlers.
175
- *
176
- * @async
177
- * @function unbind
178
- * @param {string} id
179
- * @param {any} fn
180
- */
181
- unbind(id: string): Promise<void>;
182
- /**
183
- * Unbind all event handlers.
184
- * @param id
185
- */
186
- unbindall(id: string): Promise<void>;
187
- /**
188
- * Decodes a base-64 encoded string.
189
- *
190
- * @function ObjectId
191
- * @param {string} id - An encoded string to be decoded.
192
- * @returns {string} decoded string.
193
- */
194
- ObjectId(id: string): string;
195
- /**
196
- * Get current friends list of all status.
197
- *
198
- * @async
199
- * @function getFriendships
200
- * @param {string} filter - Field value for filter.
201
- * @param {string} sort - Field value for sorting.
202
- * @param {string} option - Optional option: ex) offset, per_page.
203
- * @returns {Promise<any>}
204
- */
205
- getFriendships(filter: any, sort?: any, option?: any): Promise<any>;
206
- /**
207
- * Get member blocks.
208
- *
209
- * @async
210
- * @function getBannedUsers
211
- * @param {string} filter - Field value for filter.
212
- * @param {string} sort - Field value for sorting.
213
- * @param {string} option - Optional option: ex) offset, per_page.
214
- * @returns {Promise<any>}
215
- */
216
- getBannedUsers(filter: any, sort?: any, option?: any): Promise<any>;
217
- /**
218
- * Get information data of the member.
219
- *
220
- * @async
221
- * @function getUsers
222
- * @param {string} filter - Field value for filter.
223
- * @param {string} sort - Field value for sorting.
224
- * @param {string} option - Optional option: ex) offset, per_page.
225
- * @returns {Promise<any>}
226
- */
227
- getUsers(filter: any, sort?: any, option?: any): Promise<any>;
228
- /**
229
- * Request a friendship to a user.
230
- *
231
- * @async
232
- * @function requestFriend
233
- * @param {string} friendId - An id of the friend to request.
234
- * @returns {Promise<any>}
235
- */
236
- requestFriend(friendId: string): Promise<any>;
237
- /**
238
- * Accept a friends request.
239
- *
240
- * @async
241
- * @function acceptFriend
242
- * @param {string} friendId - The id of the friend to accept the request.
243
- * @returns {Promise<any>}
244
- */
245
- acceptFriend(friendId: string): Promise<any>;
246
- /**
247
- * Reject a friend request.
248
- *
249
- * @async
250
- * @function rejectFriend
251
- * @param {string} friendId - An id of the friend to be rejected.
252
- * @returns {Promise<any>}
253
- */
254
- rejectFriend(friendId: string): Promise<any>;
255
- /**
256
- * Remove a friend.
257
- *
258
- * @async
259
- * @function removeFriend
260
- * @param {string} friendId - An id of the friend to be removed.
261
- * @returns {Promise<any>}
262
- */
263
- removeFriend(friendId: string): Promise<any>;
264
- /**
265
- * Get a count of unread messages of a channel.
266
- *
267
- * @async
268
- * @function countUnread
269
- * @param {string} channelId - The id of a channel.
270
- * @returns {Promise<any>}
271
- */
272
- countUnread(channelId: string): Promise<any>;
273
- /**
274
- * Get subscription data of the user.
275
- *
276
- * @async
277
- * @function getSubscription
278
- * @param {string} channelId - The id of a channel.
279
- * @param {string} id
280
- * @returns {Promise<any>}
281
- */
282
- getSubscription(channelId: string, id: string): Promise<any>;
283
- /**
284
- * Get data of a single channel from the endpoint.
285
- *
286
- * @async
287
- * @function getChannel
288
- * @param {string} channelId - An id of the channel.
289
- * @returns {Promise<any>} The data of the channel.
290
- */
291
- getChannel(channelId: string): Promise<any>;
292
- /**
293
- * Get data of multiple channels.
294
- *
295
- * @async
296
- * @function getChannels
297
- * @param {string} filter - Field value for filter.
298
- * @param {string} sort - Field value for sorting.
299
- * @param {string} option - Optional option: ex) offset, per_page.
300
- * @returns {Promise<any[]>} An array of data of all channels.
301
- */
302
- getChannels(filter: any, sort?: any, option?: any): Promise<any>;
303
- /**
304
- * @async
305
- * @function getMessage
306
- * @param {string} channelId - The id of a channel.
307
- * @param {string} messageId - The id of a message.
308
- * @returns {Promise<any>}
309
- */
310
- getMessage(channelId: string, messageId: string): Promise<any>;
311
- /**
312
- * Get data of the all messages.
313
- *
314
- * @async
315
- * @function getMessages
316
- * @param {string} filter - Field value for filter.
317
- * @param {string} sort - Field value for sorting.
318
- * @param {string} option - Optional option: ex) offset, per_page.
319
- * @returns {Promise<any>}
320
- */
321
- getMessages(filter: any, sort: any, option: any): Promise<any>;
322
- /**
323
- * Get a list of subscibed member of the channel.
324
- * @param {string} filter - Field value for filter.
325
- * @param {string} sort - Field value for sorting.
326
- * @param {string} option - Optional option: ex) offset, per_page.
327
- * @returns {Promise<any>}
328
- */
329
- getSubscriptions(filter: any, sort: any, option: any): Promise<any>;
330
- /**
331
- * Create a new channel.
332
- *
333
- * @async
334
- * @function createChannel
335
- * @param {ChannelInput} channel - Configuration options of the new channel.
336
- * @returns {Promise<any>} The data of the newly created channel.
337
- */
338
- createChannel(channel: ChannelInput): Promise<any>;
339
- /**
340
- * Update channel options.
341
- *
342
- * @async
343
- * @function updateChannel
344
- * @param {string} channelId - An id of the channel.
345
- * @param {ChannelInput} channel - New options of the channel.
346
- * @returns {Promise<any>} The data of the updated channel.
347
- */
348
- updateChannel(channelId: string, channel: ChannelInput): Promise<any>;
349
- /**
350
- * Delete a channel.
351
- *
352
- * @async
353
- * @function deleteChannel
354
- * @param {string} channelId - An channel id.
355
- * @returns {Promise<any>}
356
- */
357
- deleteChannel(channelId: string): Promise<any>;
358
- /**
359
- * Update a subscription information, such as marking message read.
360
- *
361
- * @async
362
- * @function markRead
363
- * @param {string} channelId - The id of a channel.
364
- * @param {MarkInput} mark
365
- * @param {string} option
366
- * @returns {Promise<any>}
367
- */
368
- markRead(channelId: string, mark: MarkInput, option?: any): Promise<any>;
369
- /**
370
- * Add members to the private channel.
371
- *
372
- * @async
373
- * @function addUsers
374
- * @param {string} channelId - An private channel id.
375
- * @param {string[]} userIds - An array of member ids to be added.
376
- * @param {any} options
377
- * @returns {Promise<any>}
378
- */
379
- addUsers(channelId: string, userIds: any, options: any): Promise<any>;
380
- /**
381
- * Remove members from the private channel.
382
- *
383
- * @async
384
- * @function removeUsers
385
- * @param {string} channelId - An private channel id.
386
- * @param {string[]} userIds - An array of the member ids to be deleted.
387
- * @param {any} options
388
- * @returns {Promise<any>}
389
- */
390
- removeUsers(channelId: string, userIds: any, options: any): Promise<any>;
391
- /**
392
- * Emit "start typing" to a conneted socket.
393
- *
394
- * @async
395
- * @function startTyping
396
- * @param {string} channelId - The id of a channel that the typing is happening.
397
- * @param {string} threadId - The id of a thread that the typing is happening.
398
- * @returns {Promise<any>}
399
- */
400
- startTyping(channelId: string, threadId?: string): Promise<{
401
- channelId: string;
402
- threadId: string;
403
- }>;
404
- /**
405
- * Emit "stop typing" to a connected socket.
406
- *
407
- * @async
408
- * @function
409
- * @param {string} channelId - The id of a channel that the typing is stopped.
410
- * @param {string} threadId - The id of a thread that the typing is stopped.
411
- * @returns {Promise<any>}
412
- */
413
- stopTyping(channelId: string, threadId?: string): Promise<{
414
- channelId: string;
415
- threadId: string;
416
- }>;
417
- /**
418
- * Ban a member from a channel.
419
- *
420
- * @async
421
- * @function banUser
422
- * @param {string} channelId - The id of a channel.
423
- * @param {string} memberId - The id of a member.
424
- * @param {any} options
425
- * @returns {Promise<any>}
426
- */
427
- banUser(channelId: string, memberId: string, options?: any): Promise<any>;
428
- /**
429
- * Unban a member from a channel.
430
- *
431
- * @async
432
- * @function unbanUser
433
- * @param {string} channelId - The id of a channel.
434
- * @param {string} memberId - The id of a member.
435
- * @returns {Promise<any>}
436
- */
437
- unbanUser(channelId: string, memberId: string): Promise<any>;
438
- /**
439
- * Get data of a single pin from the endpoint.
440
- *
441
- * @async
442
- * @function getPin
443
- * @param {string} channelId - An id of the channel.
444
- * @param {string} id - An id of the pin.
445
- * @returns {Promise<any>} The data of the pin.
446
- */
447
- getPin(channelId: string, id: string): Promise<any>;
448
- /**
449
- * Get data of multiple pins.
450
- *
451
- * @async
452
- * @function getPins
453
- * @param {string} channelId - An id of the channel.
454
- * @param {string} filter - Field value for filter.
455
- * @param {string} sort - Field value for sorting.
456
- * @param {string} option - Optional option: ex) offset, per_page.
457
- * @returns {Promise<any[]>} An array of data of all channels.
458
- */
459
- getPins(channelId: string, filter: any, sort?: any, option?: any): Promise<any>;
460
- /**
461
- * Create a new pin.
462
- *
463
- * @async
464
- * @function createPin
465
- * @param {string} channelId - An id of the channel.
466
- * @param {PinInput} pin - Configuration options of the new pin.
467
- * @returns {Promise<any>} The data of the newly created pin.
468
- */
469
- createPin(channelId: string, pin: PinInput): Promise<any>;
470
- /**
471
- * Update pin options.
472
- *
473
- * @async
474
- * @function updatePin
475
- * @param {string} channelId - An id of the channel.
476
- * @param {PinInput} pin - New options of the pin.
477
- * @returns {Promise<any>} The data of the updated pin.
478
- */
479
- updatePin(pinId: string, channelId: string, pin: PinInput): Promise<any>;
480
- getServerUrl(): Promise<any>;
481
- }