ncloudchat 1.0.33 → 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 -40
- package/deploy.sh +0 -20
- package/esm/CloudChat.d.ts +0 -482
- package/esm/CloudChat.js +0 -1736
- 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 -96
- 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 -6
- 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 -132
- 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 -22
- 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 -2661
- package/lib/CoreManager.js +0 -45
- package/lib/Dispatcher.js +0 -125
- package/lib/Network.js +0 -229
- 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 -7
- 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 -300
- 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 -7
- 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 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/mutations/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,OAAO,CAAC"}
|
|
@@ -1,16 +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
|
-
/**
|
|
8
|
-
* Create an invite to a friend users to a channel.
|
|
9
|
-
*
|
|
10
|
-
* @async
|
|
11
|
-
* @function createInvite
|
|
12
|
-
* @param {string} channelId - An id of the channel to be invited.
|
|
13
|
-
* @param {string} friendIds - Id of friends to be invited to the channel.
|
|
14
|
-
* @returns {Promise<any>}
|
|
15
|
-
*/
|
|
16
|
-
export declare const createInvite: (channelId: string, friendIds: any) => Promise<any>;
|
package/esm/mutations/invite.js
DELETED
|
@@ -1,67 +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
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
8
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
9
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
10
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
11
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
12
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
13
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
14
|
-
});
|
|
15
|
-
};
|
|
16
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
17
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
18
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
19
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
20
|
-
function step(op) {
|
|
21
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
22
|
-
while (_) try {
|
|
23
|
-
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;
|
|
24
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
25
|
-
switch (op[0]) {
|
|
26
|
-
case 0: case 1: t = op; break;
|
|
27
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
28
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
29
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
30
|
-
default:
|
|
31
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
32
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
33
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
34
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
35
|
-
if (t[2]) _.ops.pop();
|
|
36
|
-
_.trys.pop(); continue;
|
|
37
|
-
}
|
|
38
|
-
op = body.call(thisArg, _);
|
|
39
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
40
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
41
|
-
}
|
|
42
|
-
};
|
|
43
|
-
import CoreManager from "../CoreManager";
|
|
44
|
-
import { createInviteQuery } from "../graphql/invite";
|
|
45
|
-
import { fetchData } from "../Network";
|
|
46
|
-
/**
|
|
47
|
-
* Create an invite to a friend users to a channel.
|
|
48
|
-
*
|
|
49
|
-
* @async
|
|
50
|
-
* @function createInvite
|
|
51
|
-
* @param {string} channelId - An id of the channel to be invited.
|
|
52
|
-
* @param {string} friendIds - Id of friends to be invited to the channel.
|
|
53
|
-
* @returns {Promise<any>}
|
|
54
|
-
*/
|
|
55
|
-
export var createInvite = function (channelId, friendIds) { return __awaiter(void 0, void 0, void 0, function () {
|
|
56
|
-
return __generator(this, function (_a) {
|
|
57
|
-
switch (_a.label) {
|
|
58
|
-
case 0: return [4 /*yield*/, fetchData("createFriend", createInviteQuery, {
|
|
59
|
-
projectId: CoreManager.get("PROJECT_ID"),
|
|
60
|
-
channelId: channelId,
|
|
61
|
-
friendIds: friendIds
|
|
62
|
-
})];
|
|
63
|
-
case 1: return [2 /*return*/, _a.sent()];
|
|
64
|
-
}
|
|
65
|
-
});
|
|
66
|
-
}); };
|
|
67
|
-
//# sourceMappingURL=invite.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"invite.js","sourceRoot":"","sources":["../../src/mutations/invite.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,OAAO,WAAW,MAAM,gBAAgB,CAAC;AACzC,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAEvC;;;;;;;;GAQG;AACH,MAAM,CAAC,IAAM,YAAY,GAAG,UAAO,SAAiB,EAAE,SAAc;;;oBACzD,qBAAM,SAAS,CAAC,cAAc,EAAE,iBAAiB,EAAE;oBACtD,SAAS,EAAE,WAAW,CAAC,GAAG,CAAC,YAAY,CAAC;oBACxC,SAAS,WAAA;oBACT,SAAS,WAAA;iBACZ,CAAC,EAAA;oBAJF,sBAAO,SAIL,EAAC;;;KACN,CAAC"}
|
|
@@ -1,41 +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
|
-
/**
|
|
8
|
-
* Login a user
|
|
9
|
-
*
|
|
10
|
-
* @async
|
|
11
|
-
* @function login
|
|
12
|
-
* @param {string} user_id - The id of a user loggin in.
|
|
13
|
-
* @param {string} name
|
|
14
|
-
* @param {string} profile
|
|
15
|
-
* @param {string} token
|
|
16
|
-
* @returns {Promise<any>}
|
|
17
|
-
*/
|
|
18
|
-
export declare const login: (user_id: string, name?: string, profile?: string, token?: string, customField?: string) => Promise<any>;
|
|
19
|
-
/**
|
|
20
|
-
* Create a member block followed by the getMemberBlockSchema.
|
|
21
|
-
* The member block is to used to ban a member.
|
|
22
|
-
*
|
|
23
|
-
* @async
|
|
24
|
-
* @function createMemberBlock
|
|
25
|
-
* @param {string} channelId - The id of a channel.
|
|
26
|
-
* @param {string} memberId - The id of a member.
|
|
27
|
-
* @param {string} options
|
|
28
|
-
* @returns {Promise<any>}
|
|
29
|
-
*/
|
|
30
|
-
export declare const createMemberBlock: (channelId: string, memberId: string, options?: string) => Promise<any>;
|
|
31
|
-
/**
|
|
32
|
-
* Delete a member block.
|
|
33
|
-
* This is used to unban a member from a channel.
|
|
34
|
-
*
|
|
35
|
-
* @async
|
|
36
|
-
* @function deleteMemberBlock
|
|
37
|
-
* @param {string} channelId - The id of a channel that the member is in.
|
|
38
|
-
* @param {string} memberId - The id of a member to be deleted.
|
|
39
|
-
* @returns {Promise<any>}
|
|
40
|
-
*/
|
|
41
|
-
export declare const deleteMemberBlock: (channelId: string, memberId: string) => Promise<any>;
|
package/esm/mutations/member.js
DELETED
|
@@ -1,129 +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
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
8
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
9
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
10
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
11
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
12
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
13
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
14
|
-
});
|
|
15
|
-
};
|
|
16
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
17
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
18
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
19
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
20
|
-
function step(op) {
|
|
21
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
22
|
-
while (_) try {
|
|
23
|
-
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;
|
|
24
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
25
|
-
switch (op[0]) {
|
|
26
|
-
case 0: case 1: t = op; break;
|
|
27
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
28
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
29
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
30
|
-
default:
|
|
31
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
32
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
33
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
34
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
35
|
-
if (t[2]) _.ops.pop();
|
|
36
|
-
_.trys.pop(); continue;
|
|
37
|
-
}
|
|
38
|
-
op = body.call(thisArg, _);
|
|
39
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
40
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
41
|
-
}
|
|
42
|
-
};
|
|
43
|
-
import CoreManager from "../CoreManager";
|
|
44
|
-
import { fetchData } from "../Network";
|
|
45
|
-
import { loginQuery, createMemberBlockQuery, deleteMemberBlockQuery, } from "../graphql/member";
|
|
46
|
-
/**
|
|
47
|
-
* Login a user
|
|
48
|
-
*
|
|
49
|
-
* @async
|
|
50
|
-
* @function login
|
|
51
|
-
* @param {string} user_id - The id of a user loggin in.
|
|
52
|
-
* @param {string} name
|
|
53
|
-
* @param {string} profile
|
|
54
|
-
* @param {string} token
|
|
55
|
-
* @returns {Promise<any>}
|
|
56
|
-
*/
|
|
57
|
-
export var login = function (user_id, name, profile, token, customField) {
|
|
58
|
-
if (name === void 0) { name = ""; }
|
|
59
|
-
if (profile === void 0) { profile = ""; }
|
|
60
|
-
if (token === void 0) { token = ""; }
|
|
61
|
-
if (customField === void 0) { customField = ""; }
|
|
62
|
-
return __awaiter(void 0, void 0, void 0, function () {
|
|
63
|
-
return __generator(this, function (_a) {
|
|
64
|
-
switch (_a.label) {
|
|
65
|
-
case 0:
|
|
66
|
-
CoreManager.set("TOKEN", token);
|
|
67
|
-
return [4 /*yield*/, fetchData("login", loginQuery, {
|
|
68
|
-
projectId: CoreManager.get("PROJECT_ID"),
|
|
69
|
-
userId: user_id,
|
|
70
|
-
name: name,
|
|
71
|
-
profile: profile,
|
|
72
|
-
token: token,
|
|
73
|
-
customField: customField
|
|
74
|
-
})];
|
|
75
|
-
case 1: return [2 /*return*/, _a.sent()];
|
|
76
|
-
}
|
|
77
|
-
});
|
|
78
|
-
});
|
|
79
|
-
};
|
|
80
|
-
/**
|
|
81
|
-
* Create a member block followed by the getMemberBlockSchema.
|
|
82
|
-
* The member block is to used to ban a member.
|
|
83
|
-
*
|
|
84
|
-
* @async
|
|
85
|
-
* @function createMemberBlock
|
|
86
|
-
* @param {string} channelId - The id of a channel.
|
|
87
|
-
* @param {string} memberId - The id of a member.
|
|
88
|
-
* @param {string} options
|
|
89
|
-
* @returns {Promise<any>}
|
|
90
|
-
*/
|
|
91
|
-
export var createMemberBlock = function (channelId, memberId, options) {
|
|
92
|
-
if (options === void 0) { options = ""; }
|
|
93
|
-
return __awaiter(void 0, void 0, void 0, function () {
|
|
94
|
-
return __generator(this, function (_a) {
|
|
95
|
-
switch (_a.label) {
|
|
96
|
-
case 0: return [4 /*yield*/, fetchData("createMemberBlock", createMemberBlockQuery, {
|
|
97
|
-
projectId: CoreManager.get("PROJECT_ID"),
|
|
98
|
-
channelId: channelId,
|
|
99
|
-
memberId: memberId,
|
|
100
|
-
options: options
|
|
101
|
-
})];
|
|
102
|
-
case 1: return [2 /*return*/, _a.sent()];
|
|
103
|
-
}
|
|
104
|
-
});
|
|
105
|
-
});
|
|
106
|
-
};
|
|
107
|
-
/**
|
|
108
|
-
* Delete a member block.
|
|
109
|
-
* This is used to unban a member from a channel.
|
|
110
|
-
*
|
|
111
|
-
* @async
|
|
112
|
-
* @function deleteMemberBlock
|
|
113
|
-
* @param {string} channelId - The id of a channel that the member is in.
|
|
114
|
-
* @param {string} memberId - The id of a member to be deleted.
|
|
115
|
-
* @returns {Promise<any>}
|
|
116
|
-
*/
|
|
117
|
-
export var deleteMemberBlock = function (channelId, memberId) { return __awaiter(void 0, void 0, void 0, function () {
|
|
118
|
-
return __generator(this, function (_a) {
|
|
119
|
-
switch (_a.label) {
|
|
120
|
-
case 0: return [4 /*yield*/, fetchData("deleteMemberBlock", deleteMemberBlockQuery, {
|
|
121
|
-
projectId: CoreManager.get("PROJECT_ID"),
|
|
122
|
-
channelId: channelId,
|
|
123
|
-
memberId: memberId
|
|
124
|
-
})];
|
|
125
|
-
case 1: return [2 /*return*/, _a.sent()];
|
|
126
|
-
}
|
|
127
|
-
});
|
|
128
|
-
}); };
|
|
129
|
-
//# sourceMappingURL=member.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"member.js","sourceRoot":"","sources":["../../src/mutations/member.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,OAAO,WAAW,MAAM,gBAAgB,CAAC;AACzC,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AACvC,OAAO,EACH,UAAU,EACV,sBAAsB,EACtB,sBAAsB,GACzB,MAAM,mBAAmB,CAAC;AAE3B;;;;;;;;;;GAUG;AACH,MAAM,CAAC,IAAM,KAAK,GAAG,UACjB,OAAe,EACf,IAAiB,EACjB,OAAoB,EACpB,KAAkB,EAClB,WAAwB;IAHxB,qBAAA,EAAA,SAAiB;IACjB,wBAAA,EAAA,YAAoB;IACpB,sBAAA,EAAA,UAAkB;IAClB,4BAAA,EAAA,gBAAwB;;;;;oBAExB,WAAW,CAAC,GAAG,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;oBACzB,qBAAM,SAAS,CAAC,OAAO,EAAC,UAAU,EAAE;4BACvC,SAAS,EAAE,WAAW,CAAC,GAAG,CAAC,YAAY,CAAC;4BACxC,MAAM,EAAE,OAAO;4BACf,IAAI,MAAA;4BACJ,OAAO,SAAA;4BACP,KAAK,OAAA;4BACL,WAAW,aAAA;yBACd,CAAC,EAAA;wBAPF,sBAAO,SAOL,EAAC;;;;CACN,CAAC;AAEF;;;;;;;;;;GAUG;AACH,MAAM,CAAC,IAAM,iBAAiB,GAAG,UAC7B,SAAiB,EACjB,QAAgB,EAChB,OAAoB;IAApB,wBAAA,EAAA,YAAoB;;;;wBAEb,qBAAM,SAAS,CAAC,mBAAmB,EAAE,sBAAsB,EAAE;wBAChE,SAAS,EAAE,WAAW,CAAC,GAAG,CAAC,YAAY,CAAC;wBACxC,SAAS,WAAA;wBACT,QAAQ,UAAA;wBACR,OAAO,SAAA;qBACV,CAAC,EAAA;wBALF,sBAAO,SAKL,EAAC;;;;CACN,CAAC;AAEF;;;;;;;;;GASG;AACH,MAAM,CAAC,IAAM,iBAAiB,GAAG,UAC7B,SAAiB,EACjB,QAAgB;;;oBAET,qBAAM,SAAS,CAAC,mBAAmB,EAAE,sBAAsB,EAAE;oBAChE,SAAS,EAAE,WAAW,CAAC,GAAG,CAAC,YAAY,CAAC;oBACxC,SAAS,WAAA;oBACT,QAAQ,UAAA;iBACX,CAAC,EAAA;oBAJF,sBAAO,SAIL,EAAC;;;KACN,CAAC"}
|
|
@@ -1,37 +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
|
-
/**
|
|
8
|
-
* Trasnslate a text block to the target language from the source language.
|
|
9
|
-
*
|
|
10
|
-
* @async
|
|
11
|
-
* @function translate
|
|
12
|
-
* @param {string} channelId - The id of a channel.
|
|
13
|
-
* @param {string} srcLang - The source language.
|
|
14
|
-
* @param {string} targetLang - The target language.
|
|
15
|
-
* @param {string} text - The text block to be translated.
|
|
16
|
-
* @returns {Promise<any>}
|
|
17
|
-
*/
|
|
18
|
-
export declare const translate: (channelId: string, srcLang: string, targetLang: string, text: string) => Promise<any>;
|
|
19
|
-
/**
|
|
20
|
-
* Upload a file to a channel. Only supports png, jpg, jpeg file types.
|
|
21
|
-
*
|
|
22
|
-
* @async
|
|
23
|
-
* @function upload
|
|
24
|
-
* @param {string} channelId - The id of a channel.
|
|
25
|
-
* @param {any} file - An image file.
|
|
26
|
-
* @returns {Promise<any>}
|
|
27
|
-
*/
|
|
28
|
-
export declare const upload: (channelId: string, file: any) => Promise<any>;
|
|
29
|
-
/**
|
|
30
|
-
* Send a Message
|
|
31
|
-
*
|
|
32
|
-
* @async
|
|
33
|
-
* @function translate
|
|
34
|
-
* @param {string} data - The id of a message.
|
|
35
|
-
* @returns {Promise<any>}
|
|
36
|
-
*/
|
|
37
|
-
export declare const message: (data: any) => Promise<any>;
|
package/esm/mutations/message.js
DELETED
|
@@ -1,132 +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
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
8
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
9
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
10
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
11
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
12
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
13
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
14
|
-
});
|
|
15
|
-
};
|
|
16
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
17
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
18
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
19
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
20
|
-
function step(op) {
|
|
21
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
22
|
-
while (_) try {
|
|
23
|
-
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;
|
|
24
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
25
|
-
switch (op[0]) {
|
|
26
|
-
case 0: case 1: t = op; break;
|
|
27
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
28
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
29
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
30
|
-
default:
|
|
31
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
32
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
33
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
34
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
35
|
-
if (t[2]) _.ops.pop();
|
|
36
|
-
_.trys.pop(); continue;
|
|
37
|
-
}
|
|
38
|
-
op = body.call(thisArg, _);
|
|
39
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
40
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
41
|
-
}
|
|
42
|
-
};
|
|
43
|
-
import CoreManager from "../CoreManager";
|
|
44
|
-
import { fetchData } from "../Network";
|
|
45
|
-
import { translateQuery, messageQuery } from "../graphql/message";
|
|
46
|
-
/**
|
|
47
|
-
* Trasnslate a text block to the target language from the source language.
|
|
48
|
-
*
|
|
49
|
-
* @async
|
|
50
|
-
* @function translate
|
|
51
|
-
* @param {string} channelId - The id of a channel.
|
|
52
|
-
* @param {string} srcLang - The source language.
|
|
53
|
-
* @param {string} targetLang - The target language.
|
|
54
|
-
* @param {string} text - The text block to be translated.
|
|
55
|
-
* @returns {Promise<any>}
|
|
56
|
-
*/
|
|
57
|
-
export var translate = function (channelId, srcLang, targetLang, text) { return __awaiter(void 0, void 0, void 0, function () {
|
|
58
|
-
return __generator(this, function (_a) {
|
|
59
|
-
switch (_a.label) {
|
|
60
|
-
case 0: return [4 /*yield*/, fetchData("", translateQuery, {
|
|
61
|
-
projectId: CoreManager.get("PROJECT_ID"),
|
|
62
|
-
channelId: channelId,
|
|
63
|
-
srcLang: srcLang,
|
|
64
|
-
targetLang: targetLang,
|
|
65
|
-
text: text
|
|
66
|
-
})];
|
|
67
|
-
case 1: return [2 /*return*/, _a.sent()];
|
|
68
|
-
}
|
|
69
|
-
});
|
|
70
|
-
}); };
|
|
71
|
-
/**
|
|
72
|
-
* Upload a file to a channel. Only supports png, jpg, jpeg file types.
|
|
73
|
-
*
|
|
74
|
-
* @async
|
|
75
|
-
* @function upload
|
|
76
|
-
* @param {string} channelId - The id of a channel.
|
|
77
|
-
* @param {any} file - An image file.
|
|
78
|
-
* @returns {Promise<any>}
|
|
79
|
-
*/
|
|
80
|
-
export var upload = function (channelId, file) { return __awaiter(void 0, void 0, void 0, function () {
|
|
81
|
-
var token, language, endpoint, form, result;
|
|
82
|
-
return __generator(this, function (_a) {
|
|
83
|
-
switch (_a.label) {
|
|
84
|
-
case 0:
|
|
85
|
-
token = CoreManager.get("TOKEN");
|
|
86
|
-
if (!token) {
|
|
87
|
-
console.error("Token is not found");
|
|
88
|
-
return [2 /*return*/];
|
|
89
|
-
}
|
|
90
|
-
language = CoreManager.get("LANGUAGE");
|
|
91
|
-
endpoint = CoreManager.get("SERVER_URL") + "/upload/" + channelId;
|
|
92
|
-
form = new FormData();
|
|
93
|
-
form.append("channelId", channelId);
|
|
94
|
-
form.append("upload", "1");
|
|
95
|
-
form.append("file", file);
|
|
96
|
-
return [4 /*yield*/, fetch(endpoint, {
|
|
97
|
-
method: "POST",
|
|
98
|
-
headers: {
|
|
99
|
-
Authorization: "Bearer " + token,
|
|
100
|
-
"Language": language,
|
|
101
|
-
"X-PROJECT-ID": CoreManager.get("PROJECT_ID"),
|
|
102
|
-
projectId: CoreManager.get("PROJECT_ID")
|
|
103
|
-
},
|
|
104
|
-
body: form
|
|
105
|
-
}).then(function (res) { return res.json(); })];
|
|
106
|
-
case 1:
|
|
107
|
-
result = _a.sent();
|
|
108
|
-
return [2 /*return*/, result];
|
|
109
|
-
}
|
|
110
|
-
});
|
|
111
|
-
}); };
|
|
112
|
-
/**
|
|
113
|
-
* Send a Message
|
|
114
|
-
*
|
|
115
|
-
* @async
|
|
116
|
-
* @function translate
|
|
117
|
-
* @param {string} data - The id of a message.
|
|
118
|
-
* @returns {Promise<any>}
|
|
119
|
-
*/
|
|
120
|
-
export var message = function (data) { return __awaiter(void 0, void 0, void 0, function () {
|
|
121
|
-
return __generator(this, function (_a) {
|
|
122
|
-
switch (_a.label) {
|
|
123
|
-
case 0: return [4 /*yield*/, fetchData("createChannelMessage", messageQuery, {
|
|
124
|
-
projectId: CoreManager.get("PROJECT_ID"),
|
|
125
|
-
channelId: data.channelId,
|
|
126
|
-
content: data.message
|
|
127
|
-
})];
|
|
128
|
-
case 1: return [2 /*return*/, _a.sent()];
|
|
129
|
-
}
|
|
130
|
-
});
|
|
131
|
-
}); };
|
|
132
|
-
//# sourceMappingURL=message.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"message.js","sourceRoot":"","sources":["../../src/mutations/message.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,OAAO,WAAW,MAAM,gBAAgB,CAAC;AACzC,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AACvC,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAElE;;;;;;;;;;GAUG;AACH,MAAM,CAAC,IAAM,SAAS,GAAG,UACrB,SAAiB,EACjB,OAAe,EACf,UAAkB,EAClB,IAAY;;;oBAEL,qBAAM,SAAS,CAAC,EAAE,EAAE,cAAc,EAAE;oBACvC,SAAS,EAAE,WAAW,CAAC,GAAG,CAAC,YAAY,CAAC;oBACxC,SAAS,WAAA;oBACT,OAAO,SAAA;oBACP,UAAU,YAAA;oBACV,IAAI,MAAA;iBACP,CAAC,EAAA;oBANF,sBAAO,SAML,EAAC;;;KACN,CAAC;AAEF;;;;;;;;GAQG;AACH,MAAM,CAAC,IAAM,MAAM,GAAG,UAAO,SAAiB,EAAE,IAAS;;;;;gBAC/C,KAAK,GAAG,WAAW,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;gBACvC,IAAI,CAAC,KAAK,EAAE;oBACR,OAAO,CAAC,KAAK,CAAC,oBAAoB,CAAC,CAAC;oBACpC,sBAAO;iBACV;gBACK,QAAQ,GAAG,WAAW,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;gBACvC,QAAQ,GAAG,WAAW,CAAC,GAAG,CAAC,YAAY,CAAC,GAAG,UAAU,GAAG,SAAS,CAAC;gBACpE,IAAI,GAAG,IAAI,QAAQ,EAAE,CAAC;gBAC1B,IAAI,CAAC,MAAM,CAAC,WAAW,EAAE,SAAS,CAAC,CAAC;gBACpC,IAAI,CAAC,MAAM,CAAC,QAAQ,EAAE,GAAG,CAAC,CAAC;gBAC3B,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;gBACX,qBAAM,KAAK,CAAC,QAAQ,EAAE;wBACjC,MAAM,EAAE,MAAM;wBACd,OAAO,EAAE;4BACL,aAAa,EAAE,SAAS,GAAG,KAAK;4BAChC,UAAU,EAAE,QAAQ;4BACpB,cAAc,EAAE,WAAW,CAAC,GAAG,CAAC,YAAY,CAAC;4BAC7C,SAAS,EAAE,WAAW,CAAC,GAAG,CAAC,YAAY,CAAC;yBAC3C;wBACD,IAAI,EAAE,IAAI;qBACb,CAAC,CAAC,IAAI,CAAC,UAAC,GAAG,IAAK,OAAA,GAAG,CAAC,IAAI,EAAE,EAAV,CAAU,CAAC,EAAA;;gBATtB,MAAM,GAAG,SASa;gBAC5B,sBAAO,MAAM,EAAC;;;KACjB,CAAC;AAGF;;;;;;;GAOG;AACF,MAAM,CAAC,IAAM,OAAO,GAAG,UAAO,IAAS;;;oBAE7B,qBAAM,SAAS,CAAC,sBAAsB,EAAE,YAAY,EAAE;oBACzD,SAAS,EAAE,WAAW,CAAC,GAAG,CAAC,YAAY,CAAC;oBACxC,SAAS,EAAE,IAAI,CAAC,SAAS;oBACzB,OAAO,EAAE,IAAI,CAAC,OAAO;iBACxB,CAAC,EAAA;oBAJF,sBAAO,SAIL,EAAC;;;KACN,CAAC"}
|
package/esm/mutations/pin.d.ts
DELETED
|
@@ -1,28 +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 { PinInput } from "../Type";
|
|
8
|
-
/**
|
|
9
|
-
* Create a new pin.
|
|
10
|
-
*
|
|
11
|
-
* @async
|
|
12
|
-
* @function createPin
|
|
13
|
-
* @param {string} channelId - An id of the channel.
|
|
14
|
-
* @param {PinInput} pin - Configuration options of the new pin.
|
|
15
|
-
* @returns {Promise<any>} The data of the newly created pin.
|
|
16
|
-
*/
|
|
17
|
-
export declare const createPin: (channelId: string, pin: PinInput) => Promise<any>;
|
|
18
|
-
/**
|
|
19
|
-
* Update pin options.
|
|
20
|
-
*
|
|
21
|
-
* @async
|
|
22
|
-
* @function updatePin
|
|
23
|
-
* @param {string} id - An id of the pin.
|
|
24
|
-
* @param {string} channelId - An id of the channel.
|
|
25
|
-
* @param {PinInput} pin - New options of the pin.
|
|
26
|
-
* @returns {Promise<any>} The data of the updated created pin.
|
|
27
|
-
*/
|
|
28
|
-
export declare const updatePin: (id: string, channelId: string, pin: PinInput) => Promise<any>;
|
package/esm/mutations/pin.js
DELETED
|
@@ -1,88 +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
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
8
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
9
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
10
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
11
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
12
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
13
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
14
|
-
});
|
|
15
|
-
};
|
|
16
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
17
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
18
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
19
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
20
|
-
function step(op) {
|
|
21
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
22
|
-
while (_) try {
|
|
23
|
-
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;
|
|
24
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
25
|
-
switch (op[0]) {
|
|
26
|
-
case 0: case 1: t = op; break;
|
|
27
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
28
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
29
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
30
|
-
default:
|
|
31
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
32
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
33
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
34
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
35
|
-
if (t[2]) _.ops.pop();
|
|
36
|
-
_.trys.pop(); continue;
|
|
37
|
-
}
|
|
38
|
-
op = body.call(thisArg, _);
|
|
39
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
40
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
41
|
-
}
|
|
42
|
-
};
|
|
43
|
-
import CoreManager from "../CoreManager";
|
|
44
|
-
import { fetchData } from "../Network";
|
|
45
|
-
import { createPinQuery, updatePinQuery } from "../graphql/pin";
|
|
46
|
-
/**
|
|
47
|
-
* Create a new pin.
|
|
48
|
-
*
|
|
49
|
-
* @async
|
|
50
|
-
* @function createPin
|
|
51
|
-
* @param {string} channelId - An id of the channel.
|
|
52
|
-
* @param {PinInput} pin - Configuration options of the new pin.
|
|
53
|
-
* @returns {Promise<any>} The data of the newly created pin.
|
|
54
|
-
*/
|
|
55
|
-
export var createPin = function (channelId, pin) { return __awaiter(void 0, void 0, void 0, function () {
|
|
56
|
-
return __generator(this, function (_a) {
|
|
57
|
-
return [2 /*return*/, fetchData("createPin", createPinQuery, {
|
|
58
|
-
projectId: CoreManager.get("PROJECT_ID"),
|
|
59
|
-
channelId: channelId,
|
|
60
|
-
pinned: pin.pinned,
|
|
61
|
-
pinnedAt: pin.pinnedAt,
|
|
62
|
-
expiredAt: pin.expiredAt
|
|
63
|
-
})];
|
|
64
|
-
});
|
|
65
|
-
}); };
|
|
66
|
-
/**
|
|
67
|
-
* Update pin options.
|
|
68
|
-
*
|
|
69
|
-
* @async
|
|
70
|
-
* @function updatePin
|
|
71
|
-
* @param {string} id - An id of the pin.
|
|
72
|
-
* @param {string} channelId - An id of the channel.
|
|
73
|
-
* @param {PinInput} pin - New options of the pin.
|
|
74
|
-
* @returns {Promise<any>} The data of the updated created pin.
|
|
75
|
-
*/
|
|
76
|
-
export var updatePin = function (id, channelId, pin) { return __awaiter(void 0, void 0, void 0, function () {
|
|
77
|
-
return __generator(this, function (_a) {
|
|
78
|
-
return [2 /*return*/, fetchData("updatePin", updatePinQuery, {
|
|
79
|
-
id: id,
|
|
80
|
-
projectId: CoreManager.get("PROJECT_ID"),
|
|
81
|
-
channelId: channelId,
|
|
82
|
-
pinned: pin.pinned,
|
|
83
|
-
pinnedAt: pin.pinnedAt,
|
|
84
|
-
expiredAt: pin.expiredAt
|
|
85
|
-
})];
|
|
86
|
-
});
|
|
87
|
-
}); };
|
|
88
|
-
//# sourceMappingURL=pin.js.map
|
package/esm/mutations/pin.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"pin.js","sourceRoot":"","sources":["../../src/mutations/pin.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEF,OAAO,WAAW,MAAM,gBAAgB,CAAC;AACzC,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AACvC,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAGhE;;;;;;;;EAQE;AACH,MAAM,CAAC,IAAM,SAAS,GAAG,UAAO,SAAiB,EAAE,GAAa;;QAC5D,sBAAO,SAAS,CAAC,WAAW,EAAE,cAAc,EAAE;gBAC1C,SAAS,EAAE,WAAW,CAAC,GAAG,CAAC,YAAY,CAAC;gBACxC,SAAS,EAAE,SAAS;gBACpB,MAAM,EAAE,GAAG,CAAC,MAAM;gBAClB,QAAQ,EAAE,GAAG,CAAC,QAAQ;gBACtB,SAAS,EAAE,GAAG,CAAC,SAAS;aAC3B,CAAC,EAAC;;KACN,CAAC;AAEF;;;;;;;;;GASG;AACF,MAAM,CAAC,IAAM,SAAS,GAAG,UACtB,EAAU,EACV,SAAiB,EACjB,GAAa;;QAEb,sBAAO,SAAS,CAAC,WAAW,EAAE,cAAc,EAAE;gBAC1C,EAAE,EAAE,EAAE;gBACN,SAAS,EAAE,WAAW,CAAC,GAAG,CAAC,YAAY,CAAC;gBACxC,SAAS,EAAE,SAAS;gBACpB,MAAM,EAAE,GAAG,CAAC,MAAM;gBAClB,QAAQ,EAAE,GAAG,CAAC,QAAQ;gBACtB,SAAS,EAAE,GAAG,CAAC,SAAS;aAC3B,CAAC,EAAC;;KACN,CAAC"}
|
|
@@ -1,37 +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 { MarkInput } from "../Type";
|
|
8
|
-
/**
|
|
9
|
-
* Create a subscription.
|
|
10
|
-
*
|
|
11
|
-
* @async
|
|
12
|
-
* @function createSubscription
|
|
13
|
-
* @param {string} channelId - The id of a channel.
|
|
14
|
-
* @param {string} option
|
|
15
|
-
* @returns {Promise<any>}
|
|
16
|
-
*/
|
|
17
|
-
export declare const createSubscription: (channelId: string, option?: string) => Promise<any>;
|
|
18
|
-
/**
|
|
19
|
-
* Delete a subscription.
|
|
20
|
-
*
|
|
21
|
-
* @async
|
|
22
|
-
* @function deleteSubscription
|
|
23
|
-
* @param {string} channelId - The id of a channel.
|
|
24
|
-
* @returns {Promise<any>}
|
|
25
|
-
*/
|
|
26
|
-
export declare const deleteSubscription: (channelId: string) => Promise<any>;
|
|
27
|
-
/**
|
|
28
|
-
* Update a subscription information, such as marking message read.
|
|
29
|
-
*
|
|
30
|
-
* @async
|
|
31
|
-
* @function updateSubscription
|
|
32
|
-
* @param {string} channelId - The id of a channel.
|
|
33
|
-
* @param {MarkInput} mark
|
|
34
|
-
* @param {string} option
|
|
35
|
-
* @returns {Promise<any>}
|
|
36
|
-
*/
|
|
37
|
-
export declare const updateSubscription: (channelId: string, mark: MarkInput, option?: string) => Promise<any>;
|