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.
- package/LICENSE.md +2 -2
- package/README.md +23 -393
- package/ncloudchat.d.ts +1298 -0
- package/ncloudchat.min.js +1 -0
- package/package.json +19 -39
- package/deploy.sh +0 -20
- package/esm/CloudChat.d.ts +0 -481
- package/esm/CloudChat.js +0 -1735
- package/esm/CloudChat.js.map +0 -1
- package/esm/CoreManager.d.ts +0 -11
- package/esm/CoreManager.js +0 -36
- package/esm/CoreManager.js.map +0 -1
- package/esm/Dispatcher.d.ts +0 -37
- package/esm/Dispatcher.js +0 -93
- package/esm/Dispatcher.js.map +0 -1
- package/esm/Network.d.ts +0 -7
- package/esm/Network.js +0 -93
- package/esm/Network.js.map +0 -1
- package/esm/Type.d.ts +0 -79
- package/esm/Type.js +0 -28
- package/esm/Type.js.map +0 -1
- package/esm/Util.d.ts +0 -15
- package/esm/Util.js +0 -20
- package/esm/Util.js.map +0 -1
- package/esm/graphql/channel.d.ts +0 -13
- package/esm/graphql/channel.js +0 -16
- package/esm/graphql/channel.js.map +0 -1
- package/esm/graphql/friend.d.ts +0 -11
- package/esm/graphql/friend.js +0 -13
- package/esm/graphql/friend.js.map +0 -1
- package/esm/graphql/invite.d.ts +0 -7
- package/esm/graphql/invite.js +0 -8
- package/esm/graphql/invite.js.map +0 -1
- package/esm/graphql/member.d.ts +0 -11
- package/esm/graphql/member.js +0 -13
- package/esm/graphql/member.js.map +0 -1
- package/esm/graphql/message.d.ts +0 -11
- package/esm/graphql/message.js +0 -13
- package/esm/graphql/message.js.map +0 -1
- package/esm/graphql/pin.d.ts +0 -10
- package/esm/graphql/pin.js +0 -12
- package/esm/graphql/pin.js.map +0 -1
- package/esm/graphql/project.d.ts +0 -7
- package/esm/graphql/project.js +0 -8
- package/esm/graphql/project.js.map +0 -1
- package/esm/graphql/subscription.d.ts +0 -11
- package/esm/graphql/subscription.js +0 -13
- package/esm/graphql/subscription.js.map +0 -1
- package/esm/index.d.ts +0 -8
- package/esm/index.js +0 -9
- package/esm/index.js.map +0 -1
- package/esm/logger.d.ts +0 -10
- package/esm/logger.js +0 -17
- package/esm/logger.js.map +0 -1
- package/esm/mutations/channel.d.ts +0 -56
- package/esm/mutations/channel.js +0 -170
- package/esm/mutations/channel.js.map +0 -1
- package/esm/mutations/friend.d.ts +0 -42
- package/esm/mutations/friend.js +0 -122
- package/esm/mutations/friend.js.map +0 -1
- package/esm/mutations/index.d.ts +0 -13
- package/esm/mutations/index.js +0 -14
- package/esm/mutations/index.js.map +0 -1
- package/esm/mutations/invite.d.ts +0 -16
- package/esm/mutations/invite.js +0 -67
- package/esm/mutations/invite.js.map +0 -1
- package/esm/mutations/member.d.ts +0 -41
- package/esm/mutations/member.js +0 -129
- package/esm/mutations/member.js.map +0 -1
- package/esm/mutations/message.d.ts +0 -37
- package/esm/mutations/message.js +0 -130
- package/esm/mutations/message.js.map +0 -1
- package/esm/mutations/pin.d.ts +0 -28
- package/esm/mutations/pin.js +0 -88
- package/esm/mutations/pin.js.map +0 -1
- package/esm/mutations/subscription.d.ts +0 -37
- package/esm/mutations/subscription.js +0 -115
- package/esm/mutations/subscription.js.map +0 -1
- package/esm/queries/channel.d.ts +0 -26
- package/esm/queries/channel.js +0 -88
- package/esm/queries/channel.js.map +0 -1
- package/esm/queries/friend.d.ts +0 -17
- package/esm/queries/friend.js +0 -69
- package/esm/queries/friend.js.map +0 -1
- package/esm/queries/index.d.ts +0 -14
- package/esm/queries/index.js +0 -15
- package/esm/queries/index.js.map +0 -1
- package/esm/queries/member.d.ts +0 -17
- package/esm/queries/member.js +0 -69
- package/esm/queries/member.js.map +0 -1
- package/esm/queries/memberblocks.d.ts +0 -17
- package/esm/queries/memberblocks.js +0 -69
- package/esm/queries/memberblocks.js.map +0 -1
- package/esm/queries/message.d.ts +0 -36
- package/esm/queries/message.js +0 -109
- package/esm/queries/message.js.map +0 -1
- package/esm/queries/pin.d.ts +0 -28
- package/esm/queries/pin.js +0 -92
- package/esm/queries/pin.js.map +0 -1
- package/esm/queries/project.d.ts +0 -14
- package/esm/queries/project.js +0 -63
- package/esm/queries/project.js.map +0 -1
- package/esm/queries/subscription.d.ts +0 -27
- package/esm/queries/subscription.js +0 -90
- package/esm/queries/subscription.js.map +0 -1
- package/lib/CloudChat.js +0 -2658
- package/lib/CoreManager.js +0 -45
- package/lib/Dispatcher.js +0 -125
- package/lib/Network.js +0 -226
- package/lib/Type.js +0 -44
- package/lib/Util.js +0 -32
- package/lib/graphql/channel.js +0 -32
- package/lib/graphql/friend.js +0 -27
- package/lib/graphql/invite.js +0 -18
- package/lib/graphql/member.js +0 -27
- package/lib/graphql/message.js +0 -27
- package/lib/graphql/pin.js +0 -25
- package/lib/graphql/project.js +0 -18
- package/lib/graphql/subscription.js +0 -27
- package/lib/index.js +0 -18
- package/lib/logger.js +0 -33
- package/lib/mutations/channel.js +0 -354
- package/lib/mutations/friend.js +0 -299
- package/lib/mutations/index.js +0 -109
- package/lib/mutations/invite.js +0 -205
- package/lib/mutations/member.js +0 -304
- package/lib/mutations/message.js +0 -298
- package/lib/mutations/pin.js +0 -229
- package/lib/mutations/subscription.js +0 -281
- package/lib/queries/channel.js +0 -239
- package/lib/queries/friend.js +0 -207
- package/lib/queries/index.js +0 -123
- package/lib/queries/member.js +0 -207
- package/lib/queries/memberblocks.js +0 -207
- package/lib/queries/message.js +0 -273
- package/lib/queries/pin.js +0 -243
- package/lib/queries/project.js +0 -201
- package/lib/queries/subscription.js +0 -241
- package/ncloudchat_javascript.md +0 -289
- package/tsconfig.json +0 -32
- package/types/exif.d.ts +0 -10
- package/types/window.d.ts +0 -5
- package//353/260/260/355/217/254/354/210/234/354/204/234.md +0 -8
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _Object$defineProperty = require("@babel/runtime-corejs2/core-js/object/define-property");
|
|
4
|
-
|
|
5
|
-
_Object$defineProperty(exports, "__esModule", {
|
|
6
|
-
value: true
|
|
7
|
-
});
|
|
8
|
-
|
|
9
|
-
exports.updateSubscriptionQuery = exports.getSubscriptionsQuery = exports.getSubscriptionQuery = exports.deleteSubscriptionQuery = exports.createSubscriptionQuery = void 0;
|
|
10
|
-
|
|
11
|
-
/**
|
|
12
|
-
* Copyright (c) NBASE CORP. and its affiliates.
|
|
13
|
-
*
|
|
14
|
-
* This source code is licensed under the MIT license found in the
|
|
15
|
-
* LICENSE file in the root directory of this source tree.
|
|
16
|
-
*/
|
|
17
|
-
var subscriptionFields = "id\n channel_id\n user_id\n language\n push\n mute\n online\n channel {\n name\n type\n image_url\n push\n disabled\n }\n mark {\n user_id\n message_id\n sort_id\n unread\n }\n uniquekey\n created_at\n updated_at\n";
|
|
18
|
-
var createSubscriptionQuery = "mutation (\n $projectId: String!, \n $channelId: String!,\n $option: String,\n ) {\n createSubscription (\n input: {\n projectId: $projectId, \n channelId: $channelId,\n option: $option\n }\n ) {\n subscription {\n ".concat(subscriptionFields, "\n }\n }\n }\n");
|
|
19
|
-
exports.createSubscriptionQuery = createSubscriptionQuery;
|
|
20
|
-
var deleteSubscriptionQuery = "mutation (\n $projectId: String!, \n $channelId: String!\n ) {\n deleteSubscription (\n input: {\n projectId: $projectId, \n channelId: $channelId\n }\n ) {\n subscription {\n ".concat(subscriptionFields, "\n }\n }\n }\n");
|
|
21
|
-
exports.deleteSubscriptionQuery = deleteSubscriptionQuery;
|
|
22
|
-
var updateSubscriptionQuery = "mutation (\n $projectId: String!, \n $channelId: String!, \n $mark: MarkInput, \n $option: String!\n ) {\n updateSubscription(\n input: {\n projectId: \n $projectId, \n channelId: \n $channelId, \n mark: $mark, \n option: $option\n }\n ) {\n subscription {\n ".concat(subscriptionFields, "\n }\n }\n }\n");
|
|
23
|
-
exports.updateSubscriptionQuery = updateSubscriptionQuery;
|
|
24
|
-
var getSubscriptionQuery = "query subscription (\n $projectId: String!,\n $channelId: String!, \n $id: String!\n ) {\n subscription (\n projectId: $projectId, \n channelId: $channelId, \n id:$id\n ) {\n id\n user {\n name\n profile\n country\n }\n mark {\n user_id\n message_id\n sort_id\n }\n channel_id\n user_id\n online\n push\n created_at\n }\n }\n";
|
|
25
|
-
exports.getSubscriptionQuery = getSubscriptionQuery;
|
|
26
|
-
var getSubscriptionsQuery = "query subscriptions (\n $projectId: String!, \n $option: String!, \n $filter: String!, \n $sort: String \n ) {\n subscriptions (\n projectId: $projectId, \n option:$option, \n filter:$filter, \n sort:$sort\n ) {\n totalCount\n edges {\n node {\n id\n user {\n name\n profile\n country\n }\n channel_id\n user_id\n online\n push\n created_at\n }\n }\n }\n }\n";
|
|
27
|
-
exports.getSubscriptionsQuery = getSubscriptionsQuery;
|
package/lib/index.js
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _Object$defineProperty = require("@babel/runtime-corejs2/core-js/object/define-property");
|
|
4
|
-
|
|
5
|
-
var _interopRequireDefault = require("@babel/runtime-corejs2/helpers/interopRequireDefault");
|
|
6
|
-
|
|
7
|
-
_Object$defineProperty(exports, "__esModule", {
|
|
8
|
-
value: true
|
|
9
|
-
});
|
|
10
|
-
|
|
11
|
-
_Object$defineProperty(exports, "Chat", {
|
|
12
|
-
enumerable: true,
|
|
13
|
-
get: function get() {
|
|
14
|
-
return _CloudChat["default"];
|
|
15
|
-
}
|
|
16
|
-
});
|
|
17
|
-
|
|
18
|
-
var _CloudChat = _interopRequireDefault(require("./CloudChat"));
|
package/lib/logger.js
DELETED
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _Object$defineProperty = require("@babel/runtime-corejs2/core-js/object/define-property");
|
|
4
|
-
|
|
5
|
-
_Object$defineProperty(exports, "__esModule", {
|
|
6
|
-
value: true
|
|
7
|
-
});
|
|
8
|
-
|
|
9
|
-
exports.info = exports.error = exports.debug = void 0;
|
|
10
|
-
|
|
11
|
-
/**
|
|
12
|
-
* Copyright (c) NBASE CORP. and its affiliates.
|
|
13
|
-
*
|
|
14
|
-
* This source code is licensed under the MIT license found in the
|
|
15
|
-
* LICENSE file in the root directory of this source tree.
|
|
16
|
-
*/
|
|
17
|
-
var debug = function debug(value) {
|
|
18
|
-
return console.log(value);
|
|
19
|
-
};
|
|
20
|
-
|
|
21
|
-
exports.debug = debug;
|
|
22
|
-
|
|
23
|
-
var error = function error(value) {
|
|
24
|
-
return console.error(value);
|
|
25
|
-
};
|
|
26
|
-
|
|
27
|
-
exports.error = error;
|
|
28
|
-
|
|
29
|
-
var info = function info(value) {
|
|
30
|
-
return console.log(value);
|
|
31
|
-
};
|
|
32
|
-
|
|
33
|
-
exports.info = info;
|
package/lib/mutations/channel.js
DELETED
|
@@ -1,354 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _Object$defineProperty = require("@babel/runtime-corejs2/core-js/object/define-property");
|
|
4
|
-
|
|
5
|
-
var _interopRequireDefault = require("@babel/runtime-corejs2/helpers/interopRequireDefault");
|
|
6
|
-
|
|
7
|
-
_Object$defineProperty(exports, "__esModule", {
|
|
8
|
-
value: true
|
|
9
|
-
});
|
|
10
|
-
|
|
11
|
-
exports.updateChannel = exports.removeChannelMembers = exports.deleteChannel = exports.createChannel = exports.addChannelMembers = void 0;
|
|
12
|
-
|
|
13
|
-
require("core-js/modules/es6.function.name.js");
|
|
14
|
-
|
|
15
|
-
var _promise = _interopRequireDefault(require("@babel/runtime-corejs2/core-js/promise"));
|
|
16
|
-
|
|
17
|
-
var _symbol = _interopRequireDefault(require("@babel/runtime-corejs2/core-js/symbol"));
|
|
18
|
-
|
|
19
|
-
var _iterator = _interopRequireDefault(require("@babel/runtime-corejs2/core-js/symbol/iterator"));
|
|
20
|
-
|
|
21
|
-
var _CoreManager = _interopRequireDefault(require("../CoreManager"));
|
|
22
|
-
|
|
23
|
-
var _channel = require("../graphql/channel");
|
|
24
|
-
|
|
25
|
-
var _Network = require("../Network");
|
|
26
|
-
|
|
27
|
-
/**
|
|
28
|
-
* Copyright (c) NBASE CORP. and its affiliates.
|
|
29
|
-
*
|
|
30
|
-
* This source code is licensed under the MIT license found in the
|
|
31
|
-
* LICENSE file in the root directory of this source tree.
|
|
32
|
-
*/
|
|
33
|
-
var __awaiter = void 0 && (void 0).__awaiter || function (thisArg, _arguments, P, generator) {
|
|
34
|
-
function adopt(value) {
|
|
35
|
-
return value instanceof P ? value : new P(function (resolve) {
|
|
36
|
-
resolve(value);
|
|
37
|
-
});
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
return new (P || (P = _promise["default"]))(function (resolve, reject) {
|
|
41
|
-
function fulfilled(value) {
|
|
42
|
-
try {
|
|
43
|
-
step(generator.next(value));
|
|
44
|
-
} catch (e) {
|
|
45
|
-
reject(e);
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
function rejected(value) {
|
|
50
|
-
try {
|
|
51
|
-
step(generator["throw"](value));
|
|
52
|
-
} catch (e) {
|
|
53
|
-
reject(e);
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
function step(result) {
|
|
58
|
-
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
62
|
-
});
|
|
63
|
-
};
|
|
64
|
-
|
|
65
|
-
var __generator = void 0 && (void 0).__generator || function (thisArg, body) {
|
|
66
|
-
var _ = {
|
|
67
|
-
label: 0,
|
|
68
|
-
sent: function sent() {
|
|
69
|
-
if (t[0] & 1) throw t[1];
|
|
70
|
-
return t[1];
|
|
71
|
-
},
|
|
72
|
-
trys: [],
|
|
73
|
-
ops: []
|
|
74
|
-
},
|
|
75
|
-
f,
|
|
76
|
-
y,
|
|
77
|
-
t,
|
|
78
|
-
g;
|
|
79
|
-
return g = {
|
|
80
|
-
next: verb(0),
|
|
81
|
-
"throw": verb(1),
|
|
82
|
-
"return": verb(2)
|
|
83
|
-
}, typeof _symbol["default"] === "function" && (g[_iterator["default"]] = function () {
|
|
84
|
-
return this;
|
|
85
|
-
}), g;
|
|
86
|
-
|
|
87
|
-
function verb(n) {
|
|
88
|
-
return function (v) {
|
|
89
|
-
return step([n, v]);
|
|
90
|
-
};
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
function step(op) {
|
|
94
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
95
|
-
|
|
96
|
-
while (_) {
|
|
97
|
-
try {
|
|
98
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
99
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
100
|
-
|
|
101
|
-
switch (op[0]) {
|
|
102
|
-
case 0:
|
|
103
|
-
case 1:
|
|
104
|
-
t = op;
|
|
105
|
-
break;
|
|
106
|
-
|
|
107
|
-
case 4:
|
|
108
|
-
_.label++;
|
|
109
|
-
return {
|
|
110
|
-
value: op[1],
|
|
111
|
-
done: false
|
|
112
|
-
};
|
|
113
|
-
|
|
114
|
-
case 5:
|
|
115
|
-
_.label++;
|
|
116
|
-
y = op[1];
|
|
117
|
-
op = [0];
|
|
118
|
-
continue;
|
|
119
|
-
|
|
120
|
-
case 7:
|
|
121
|
-
op = _.ops.pop();
|
|
122
|
-
|
|
123
|
-
_.trys.pop();
|
|
124
|
-
|
|
125
|
-
continue;
|
|
126
|
-
|
|
127
|
-
default:
|
|
128
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
|
|
129
|
-
_ = 0;
|
|
130
|
-
continue;
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
|
|
134
|
-
_.label = op[1];
|
|
135
|
-
break;
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
if (op[0] === 6 && _.label < t[1]) {
|
|
139
|
-
_.label = t[1];
|
|
140
|
-
t = op;
|
|
141
|
-
break;
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
if (t && _.label < t[2]) {
|
|
145
|
-
_.label = t[2];
|
|
146
|
-
|
|
147
|
-
_.ops.push(op);
|
|
148
|
-
|
|
149
|
-
break;
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
if (t[2]) _.ops.pop();
|
|
153
|
-
|
|
154
|
-
_.trys.pop();
|
|
155
|
-
|
|
156
|
-
continue;
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
op = body.call(thisArg, _);
|
|
160
|
-
} catch (e) {
|
|
161
|
-
op = [6, e];
|
|
162
|
-
y = 0;
|
|
163
|
-
} finally {
|
|
164
|
-
f = t = 0;
|
|
165
|
-
}
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
if (op[0] & 5) throw op[1];
|
|
169
|
-
return {
|
|
170
|
-
value: op[0] ? op[1] : void 0,
|
|
171
|
-
done: true
|
|
172
|
-
};
|
|
173
|
-
}
|
|
174
|
-
};
|
|
175
|
-
|
|
176
|
-
/**
|
|
177
|
-
* Create a new channel.
|
|
178
|
-
*
|
|
179
|
-
* @async
|
|
180
|
-
* @function createChannel
|
|
181
|
-
* @param {ChannelInput} channel - Configuration options of the new channel.
|
|
182
|
-
* @returns {Promise<any>} The data of the newly created channel.
|
|
183
|
-
*/
|
|
184
|
-
var createChannel = function createChannel(channel) {
|
|
185
|
-
return __awaiter(void 0, void 0, void 0, function () {
|
|
186
|
-
return __generator(this, function (_a) {
|
|
187
|
-
if (!channel.members) channel.members = [];
|
|
188
|
-
return [2
|
|
189
|
-
/*return*/
|
|
190
|
-
, (0, _Network.fetchData)("createChannel", _channel.createChannelQuery, {
|
|
191
|
-
projectId: _CoreManager["default"].get("PROJECT_ID"),
|
|
192
|
-
name: channel.name,
|
|
193
|
-
type: channel.type,
|
|
194
|
-
uniqueId: channel.uniqueId,
|
|
195
|
-
translation: channel.translation,
|
|
196
|
-
push: channel.push,
|
|
197
|
-
mutes: channel.mutes,
|
|
198
|
-
customField: channel.customField,
|
|
199
|
-
linkUrl: channel.linkUrl,
|
|
200
|
-
imageUrl: channel.imageUrl,
|
|
201
|
-
disabled: channel.disabled,
|
|
202
|
-
members: channel.members
|
|
203
|
-
})];
|
|
204
|
-
});
|
|
205
|
-
});
|
|
206
|
-
};
|
|
207
|
-
/**
|
|
208
|
-
* Update channel options.
|
|
209
|
-
*
|
|
210
|
-
* @async
|
|
211
|
-
* @function updateChannel
|
|
212
|
-
* @param {string} channelId - An id of the channel.
|
|
213
|
-
* @param {ChannelInput} channel - New options of the channel.
|
|
214
|
-
* @returns {Promise<any>} The data of the updated channel.
|
|
215
|
-
*/
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
exports.createChannel = createChannel;
|
|
219
|
-
|
|
220
|
-
var updateChannel = function updateChannel(channelId, channel) {
|
|
221
|
-
return __awaiter(void 0, void 0, void 0, function () {
|
|
222
|
-
return __generator(this, function (_a) {
|
|
223
|
-
switch (_a.label) {
|
|
224
|
-
case 0:
|
|
225
|
-
if (!channel.members) channel.members = [];
|
|
226
|
-
return [4
|
|
227
|
-
/*yield*/
|
|
228
|
-
, (0, _Network.fetchData)("updateChannel", _channel.updateChannelQuery, {
|
|
229
|
-
projectId: _CoreManager["default"].get("PROJECT_ID"),
|
|
230
|
-
id: channelId,
|
|
231
|
-
name: channel.name,
|
|
232
|
-
type: channel.type,
|
|
233
|
-
uniqueId: channel.uniqueId,
|
|
234
|
-
translation: channel.translation,
|
|
235
|
-
push: channel.push,
|
|
236
|
-
mutes: channel.mutes,
|
|
237
|
-
linkUrl: channel.linkUrl,
|
|
238
|
-
imageUrl: channel.imageUrl,
|
|
239
|
-
disabled: channel.disabled,
|
|
240
|
-
members: channel.members
|
|
241
|
-
})];
|
|
242
|
-
|
|
243
|
-
case 1:
|
|
244
|
-
return [2
|
|
245
|
-
/*return*/
|
|
246
|
-
, _a.sent()];
|
|
247
|
-
}
|
|
248
|
-
});
|
|
249
|
-
});
|
|
250
|
-
};
|
|
251
|
-
/**
|
|
252
|
-
* Delete a channel.
|
|
253
|
-
*
|
|
254
|
-
* @async
|
|
255
|
-
* @function deleteChannel
|
|
256
|
-
* @param {string} channelId - An channel id.
|
|
257
|
-
* @returns {Promise<any>}
|
|
258
|
-
*/
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
exports.updateChannel = updateChannel;
|
|
262
|
-
|
|
263
|
-
var deleteChannel = function deleteChannel(channelId) {
|
|
264
|
-
return __awaiter(void 0, void 0, void 0, function () {
|
|
265
|
-
return __generator(this, function (_a) {
|
|
266
|
-
switch (_a.label) {
|
|
267
|
-
case 0:
|
|
268
|
-
return [4
|
|
269
|
-
/*yield*/
|
|
270
|
-
, (0, _Network.fetchData)("deleteChannel", _channel.deleteChannelQuery, {
|
|
271
|
-
projectId: _CoreManager["default"].get("PROJECT_ID"),
|
|
272
|
-
id: channelId
|
|
273
|
-
})];
|
|
274
|
-
|
|
275
|
-
case 1:
|
|
276
|
-
return [2
|
|
277
|
-
/*return*/
|
|
278
|
-
, _a.sent()];
|
|
279
|
-
}
|
|
280
|
-
});
|
|
281
|
-
});
|
|
282
|
-
};
|
|
283
|
-
/**
|
|
284
|
-
* Add members to the private channel.
|
|
285
|
-
*
|
|
286
|
-
* @async
|
|
287
|
-
* @function addChannelMembers
|
|
288
|
-
* @param {string} channelId - An private channel id.
|
|
289
|
-
* @param {string[]} memberIds - An array of member ids to be added.
|
|
290
|
-
* @param {any} options
|
|
291
|
-
* @returns {Promise<any>}
|
|
292
|
-
*/
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
exports.deleteChannel = deleteChannel;
|
|
296
|
-
|
|
297
|
-
var addChannelMembers = function addChannelMembers(channelId, memberIds, options) {
|
|
298
|
-
return __awaiter(void 0, void 0, void 0, function () {
|
|
299
|
-
return __generator(this, function (_a) {
|
|
300
|
-
switch (_a.label) {
|
|
301
|
-
case 0:
|
|
302
|
-
return [4
|
|
303
|
-
/*yield*/
|
|
304
|
-
, (0, _Network.fetchData)("addChannelMembers", _channel.addChannelMembersQuery, {
|
|
305
|
-
projectId: _CoreManager["default"].get("PROJECT_ID"),
|
|
306
|
-
channelId: channelId,
|
|
307
|
-
memberIds: memberIds,
|
|
308
|
-
options: options
|
|
309
|
-
})];
|
|
310
|
-
|
|
311
|
-
case 1:
|
|
312
|
-
return [2
|
|
313
|
-
/*return*/
|
|
314
|
-
, _a.sent()];
|
|
315
|
-
}
|
|
316
|
-
});
|
|
317
|
-
});
|
|
318
|
-
};
|
|
319
|
-
/**
|
|
320
|
-
* Remove members from the private channel.
|
|
321
|
-
*
|
|
322
|
-
* @async
|
|
323
|
-
* @function removeChannelMembers
|
|
324
|
-
* @param {string} channelId - An private channel id.
|
|
325
|
-
* @param {string[]} memberIds - An array of the member ids to be deleted.
|
|
326
|
-
* @returns {Promise<any>}
|
|
327
|
-
*/
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
exports.addChannelMembers = addChannelMembers;
|
|
331
|
-
|
|
332
|
-
var removeChannelMembers = function removeChannelMembers(channelId, memberIds) {
|
|
333
|
-
return __awaiter(void 0, void 0, void 0, function () {
|
|
334
|
-
return __generator(this, function (_a) {
|
|
335
|
-
switch (_a.label) {
|
|
336
|
-
case 0:
|
|
337
|
-
return [4
|
|
338
|
-
/*yield*/
|
|
339
|
-
, (0, _Network.fetchData)("removeChannelMembers", _channel.removeChannelMembersQuery, {
|
|
340
|
-
projectId: _CoreManager["default"].get("PROJECT_ID"),
|
|
341
|
-
channelId: channelId,
|
|
342
|
-
memberIds: memberIds
|
|
343
|
-
})];
|
|
344
|
-
|
|
345
|
-
case 1:
|
|
346
|
-
return [2
|
|
347
|
-
/*return*/
|
|
348
|
-
, _a.sent()];
|
|
349
|
-
}
|
|
350
|
-
});
|
|
351
|
-
});
|
|
352
|
-
};
|
|
353
|
-
|
|
354
|
-
exports.removeChannelMembers = removeChannelMembers;
|