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
package/esm/queries/message.js
DELETED
|
@@ -1,109 +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 { getMessageQuery, getMessagesQuery, unreadCountQuery, } from "../graphql/message";
|
|
46
|
-
/**
|
|
47
|
-
* Get data of the all messages.
|
|
48
|
-
*
|
|
49
|
-
* @async
|
|
50
|
-
* @function getMessages
|
|
51
|
-
* @param {string} filter - Field value for filter.
|
|
52
|
-
* @param {string} sort - Field value for sorting.
|
|
53
|
-
* @param {string} option - Optional option: ex) offset, per_page.
|
|
54
|
-
* @returns {Promise<any>}
|
|
55
|
-
*/
|
|
56
|
-
export var getMessages = function (filter, sort, option) { return __awaiter(void 0, void 0, void 0, function () {
|
|
57
|
-
return __generator(this, function (_a) {
|
|
58
|
-
switch (_a.label) {
|
|
59
|
-
case 0: return [4 /*yield*/, fetchData("messages", getMessagesQuery, {
|
|
60
|
-
projectId: CoreManager.get("PROJECT_ID"),
|
|
61
|
-
filter: filter,
|
|
62
|
-
sort: sort,
|
|
63
|
-
option: option
|
|
64
|
-
})];
|
|
65
|
-
case 1: return [2 /*return*/, _a.sent()];
|
|
66
|
-
}
|
|
67
|
-
});
|
|
68
|
-
}); };
|
|
69
|
-
/**
|
|
70
|
-
* Get data of a single message.
|
|
71
|
-
*
|
|
72
|
-
* @async
|
|
73
|
-
* @function getMessage
|
|
74
|
-
* @param {string} channelId - The id of a channel.
|
|
75
|
-
* @param {string} messageId - The id of a message.
|
|
76
|
-
* @returns {Promise<any>}
|
|
77
|
-
*/
|
|
78
|
-
export var getMessage = function (channelId, messageId) { return __awaiter(void 0, void 0, void 0, function () {
|
|
79
|
-
return __generator(this, function (_a) {
|
|
80
|
-
switch (_a.label) {
|
|
81
|
-
case 0: return [4 /*yield*/, fetchData("message", getMessageQuery, {
|
|
82
|
-
projectId: CoreManager.get("PROJECT_ID"),
|
|
83
|
-
channelId: channelId,
|
|
84
|
-
id: messageId
|
|
85
|
-
})];
|
|
86
|
-
case 1: return [2 /*return*/, _a.sent()];
|
|
87
|
-
}
|
|
88
|
-
});
|
|
89
|
-
}); };
|
|
90
|
-
/**
|
|
91
|
-
* Get a count of unread messages of a channel.
|
|
92
|
-
*
|
|
93
|
-
* @async
|
|
94
|
-
* @function unreadCount
|
|
95
|
-
* @param {string} channelId - The id of a channel.
|
|
96
|
-
* @returns {Promise<any>}
|
|
97
|
-
*/
|
|
98
|
-
export var unreadCount = function (channelId) { return __awaiter(void 0, void 0, void 0, function () {
|
|
99
|
-
return __generator(this, function (_a) {
|
|
100
|
-
switch (_a.label) {
|
|
101
|
-
case 0: return [4 /*yield*/, fetchData("mark", unreadCountQuery, {
|
|
102
|
-
projectId: CoreManager.get("PROJECT_ID"),
|
|
103
|
-
channelId: channelId
|
|
104
|
-
})];
|
|
105
|
-
case 1: return [2 /*return*/, _a.sent()];
|
|
106
|
-
}
|
|
107
|
-
});
|
|
108
|
-
}); };
|
|
109
|
-
//# sourceMappingURL=message.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"message.js","sourceRoot":"","sources":["../../src/queries/message.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,OAAO,WAAW,MAAM,gBAAgB,CAAC;AACzC,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AACvC,OAAO,EACH,eAAe,EACf,gBAAgB,EAChB,gBAAgB,GACnB,MAAM,oBAAoB,CAAC;AAE5B;;;;;;;;;GASG;AACH,MAAM,CAAC,IAAM,WAAW,GAAG,UACvB,MAAc,EACd,IAAY,EACZ,MAAc;;;oBAEP,qBAAM,SAAS,CAAC,UAAU,EAAE,gBAAgB,EAAE;oBACjD,SAAS,EAAE,WAAW,CAAC,GAAG,CAAC,YAAY,CAAC;oBACxC,MAAM,QAAA;oBACN,IAAI,MAAA;oBACJ,MAAM,QAAA;iBACT,CAAC,EAAA;oBALF,sBAAO,SAKL,EAAC;;;KACN,CAAC;AAEF;;;;;;;;GAQG;AACH,MAAM,CAAC,IAAM,UAAU,GAAG,UAAO,SAAiB,EAAE,SAAiB;;;oBAC1D,qBAAM,SAAS,CAAC,SAAS,EAAE,eAAe,EAAE;oBAC/C,SAAS,EAAE,WAAW,CAAC,GAAG,CAAC,YAAY,CAAC;oBACxC,SAAS,WAAA;oBACT,EAAE,EAAE,SAAS;iBAChB,CAAC,EAAA;oBAJF,sBAAO,SAIL,EAAC;;;KACN,CAAC;AAEF;;;;;;;GAOG;AACH,MAAM,CAAC,IAAM,WAAW,GAAG,UAAO,SAAiB;;;oBACxC,qBAAM,SAAS,CAAC,MAAM,EAAE,gBAAgB,EAAE;oBAC7C,SAAS,EAAE,WAAW,CAAC,GAAG,CAAC,YAAY,CAAC;oBACxC,SAAS,WAAA;iBACZ,CAAC,EAAA;oBAHF,sBAAO,SAGL,EAAC;;;KACN,CAAC"}
|
package/esm/queries/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
|
-
/**
|
|
8
|
-
* Get data of a single pin from the endpoint.
|
|
9
|
-
*
|
|
10
|
-
* @async
|
|
11
|
-
* @function getPin
|
|
12
|
-
* @param {string} channelId - An id of the channel.
|
|
13
|
-
* @param {string} id - An id of the pin.
|
|
14
|
-
* @returns {Promise<any>} The data of the pin.
|
|
15
|
-
*/
|
|
16
|
-
export declare const getPin: (channelId: string, id: string) => Promise<any>;
|
|
17
|
-
/**
|
|
18
|
-
* Get data of multiple pins.
|
|
19
|
-
*
|
|
20
|
-
* @async
|
|
21
|
-
* @function getPins
|
|
22
|
-
* @param {string} channelId - An id of the channel.
|
|
23
|
-
* @param {string} filter - Field value for filter.
|
|
24
|
-
* @param {string} sort - Field value for sorting.
|
|
25
|
-
* @param {string} option - Optional option: ex) offset, per_page.
|
|
26
|
-
* @returns {Promise<any[]>} An array of data of all pins.
|
|
27
|
-
*/
|
|
28
|
-
export declare const getPins: (channelId: string, filter: string, sort: string, option: string) => Promise<any>;
|
package/esm/queries/pin.js
DELETED
|
@@ -1,92 +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 { getPinQuery, getPinsQuery } from "../graphql/pin";
|
|
46
|
-
/**
|
|
47
|
-
* Get data of a single pin from the endpoint.
|
|
48
|
-
*
|
|
49
|
-
* @async
|
|
50
|
-
* @function getPin
|
|
51
|
-
* @param {string} channelId - An id of the channel.
|
|
52
|
-
* @param {string} id - An id of the pin.
|
|
53
|
-
* @returns {Promise<any>} The data of the pin.
|
|
54
|
-
*/
|
|
55
|
-
export var getPin = function (channelId, id) { 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("pin", getPinQuery, {
|
|
59
|
-
projectId: CoreManager.get("PROJECT_ID"),
|
|
60
|
-
channelId: channelId,
|
|
61
|
-
id: id
|
|
62
|
-
})];
|
|
63
|
-
case 1: return [2 /*return*/, _a.sent()];
|
|
64
|
-
}
|
|
65
|
-
});
|
|
66
|
-
}); };
|
|
67
|
-
/**
|
|
68
|
-
* Get data of multiple pins.
|
|
69
|
-
*
|
|
70
|
-
* @async
|
|
71
|
-
* @function getPins
|
|
72
|
-
* @param {string} channelId - An id of the channel.
|
|
73
|
-
* @param {string} filter - Field value for filter.
|
|
74
|
-
* @param {string} sort - Field value for sorting.
|
|
75
|
-
* @param {string} option - Optional option: ex) offset, per_page.
|
|
76
|
-
* @returns {Promise<any[]>} An array of data of all pins.
|
|
77
|
-
*/
|
|
78
|
-
export var getPins = function (channelId, filter, sort, option) { return __awaiter(void 0, void 0, void 0, function () {
|
|
79
|
-
return __generator(this, function (_a) {
|
|
80
|
-
switch (_a.label) {
|
|
81
|
-
case 0: return [4 /*yield*/, fetchData("pins", getPinsQuery, {
|
|
82
|
-
projectId: CoreManager.get("PROJECT_ID"),
|
|
83
|
-
channelId: channelId,
|
|
84
|
-
filter: filter,
|
|
85
|
-
sort: sort,
|
|
86
|
-
option: option
|
|
87
|
-
})];
|
|
88
|
-
case 1: return [2 /*return*/, _a.sent()];
|
|
89
|
-
}
|
|
90
|
-
});
|
|
91
|
-
}); };
|
|
92
|
-
//# sourceMappingURL=pin.js.map
|
package/esm/queries/pin.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"pin.js","sourceRoot":"","sources":["../../src/queries/pin.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEF,OAAO,WAAW,MAAM,gBAAgB,CAAC;AACzC,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AACxC,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAE3D;;;;;;;;GAQG;AACH,MAAM,CAAC,IAAM,MAAM,GAAG,UAAO,SAAiB,EAAE,EAAU;;;oBAC/C,qBAAM,SAAS,CAAC,KAAK,EAAE,WAAW,EAAE;oBACvC,SAAS,EAAE,WAAW,CAAC,GAAG,CAAC,YAAY,CAAC;oBACxC,SAAS,EAAE,SAAS;oBACpB,EAAE,EAAE,EAAE;iBACT,CAAC,EAAA;oBAJF,sBAAO,SAIL,EAAA;;;KACL,CAAC;AAEF;;;;;;;;;;GAUG;AACF,MAAM,CAAC,IAAM,OAAO,GAAG,UACpB,SAAiB,EACjB,MAAc,EACd,IAAY,EACZ,MAAc;;;oBAEP,qBAAM,SAAS,CAAC,MAAM,EAAE,YAAY,EAAE;oBACzC,SAAS,EAAE,WAAW,CAAC,GAAG,CAAC,YAAY,CAAC;oBACxC,SAAS,EAAE,SAAS;oBACpB,MAAM,QAAA;oBACN,IAAI,MAAA;oBACJ,MAAM,QAAA;iBACT,CAAC,EAAA;oBANF,sBAAO,SAML,EAAC;;;KACN,CAAC"}
|
package/esm/queries/project.d.ts
DELETED
|
@@ -1,14 +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
|
-
* Get data of a project.
|
|
9
|
-
*
|
|
10
|
-
* @async
|
|
11
|
-
* @function getProject
|
|
12
|
-
* @returns {Promise<any>}
|
|
13
|
-
*/
|
|
14
|
-
export declare const getProject: () => Promise<any>;
|
package/esm/queries/project.js
DELETED
|
@@ -1,63 +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 { getProjectQuery } from "../graphql/project";
|
|
46
|
-
/**
|
|
47
|
-
* Get data of a project.
|
|
48
|
-
*
|
|
49
|
-
* @async
|
|
50
|
-
* @function getProject
|
|
51
|
-
* @returns {Promise<any>}
|
|
52
|
-
*/
|
|
53
|
-
export var getProject = function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
54
|
-
return __generator(this, function (_a) {
|
|
55
|
-
switch (_a.label) {
|
|
56
|
-
case 0: return [4 /*yield*/, fetchData("project", getProjectQuery, {
|
|
57
|
-
id: CoreManager.get("PROJECT_ID")
|
|
58
|
-
})];
|
|
59
|
-
case 1: return [2 /*return*/, _a.sent()];
|
|
60
|
-
}
|
|
61
|
-
});
|
|
62
|
-
}); };
|
|
63
|
-
//# sourceMappingURL=project.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"project.js","sourceRoot":"","sources":["../../src/queries/project.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,OAAO,WAAW,MAAM,gBAAgB,CAAC;AACzC,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AACvC,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAErD;;;;;;GAMG;AACH,MAAM,CAAC,IAAM,UAAU,GAAG;;;oBACf,qBAAM,SAAS,CAAC,SAAS,EAAE,eAAe,EAAE;oBAC/C,EAAE,EAAE,WAAW,CAAC,GAAG,CAAC,YAAY,CAAC;iBACpC,CAAC,EAAA;oBAFF,sBAAO,SAEL,EAAC;;;KACN,CAAC"}
|
|
@@ -1,27 +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
|
-
* Get subscription data of the user.
|
|
9
|
-
*
|
|
10
|
-
* @async
|
|
11
|
-
* @function getSubscription
|
|
12
|
-
* @param {string} channelId - The id of a channel.
|
|
13
|
-
* @param {string} id
|
|
14
|
-
* @returns {Promise<any>}
|
|
15
|
-
*/
|
|
16
|
-
export declare const getSubscription: (channelId: string, id: string) => Promise<any>;
|
|
17
|
-
/**
|
|
18
|
-
* Get a list of subscibed member of the channel.
|
|
19
|
-
*
|
|
20
|
-
* @async
|
|
21
|
-
* @function getSubscriptions
|
|
22
|
-
* @param {string} filter - Field value for filter.
|
|
23
|
-
* @param {string} sort - Field value for sorting.
|
|
24
|
-
* @param {string} option - Optional option: ex) offset, per_page.
|
|
25
|
-
* @returns {Promise<any>}
|
|
26
|
-
*/
|
|
27
|
-
export declare const getSubscriptions: (filter: any, sort: any, option: any) => Promise<any>;
|
|
@@ -1,90 +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 { getSubscriptionQuery, getSubscriptionsQuery, } from "../graphql/subscription";
|
|
46
|
-
/**
|
|
47
|
-
* Get subscription data of the user.
|
|
48
|
-
*
|
|
49
|
-
* @async
|
|
50
|
-
* @function getSubscription
|
|
51
|
-
* @param {string} channelId - The id of a channel.
|
|
52
|
-
* @param {string} id
|
|
53
|
-
* @returns {Promise<any>}
|
|
54
|
-
*/
|
|
55
|
-
export var getSubscription = function (channelId, id) { 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("subscription", getSubscriptionQuery, {
|
|
59
|
-
projectId: CoreManager.get("PROJECT_ID"),
|
|
60
|
-
channelId: channelId,
|
|
61
|
-
id: id
|
|
62
|
-
})];
|
|
63
|
-
case 1: return [2 /*return*/, _a.sent()];
|
|
64
|
-
}
|
|
65
|
-
});
|
|
66
|
-
}); };
|
|
67
|
-
/**
|
|
68
|
-
* Get a list of subscibed member of the channel.
|
|
69
|
-
*
|
|
70
|
-
* @async
|
|
71
|
-
* @function getSubscriptions
|
|
72
|
-
* @param {string} filter - Field value for filter.
|
|
73
|
-
* @param {string} sort - Field value for sorting.
|
|
74
|
-
* @param {string} option - Optional option: ex) offset, per_page.
|
|
75
|
-
* @returns {Promise<any>}
|
|
76
|
-
*/
|
|
77
|
-
export var getSubscriptions = function (filter, sort, option) { return __awaiter(void 0, void 0, void 0, function () {
|
|
78
|
-
return __generator(this, function (_a) {
|
|
79
|
-
switch (_a.label) {
|
|
80
|
-
case 0: return [4 /*yield*/, fetchData("subscriptions", getSubscriptionsQuery, {
|
|
81
|
-
projectId: CoreManager.get("PROJECT_ID"),
|
|
82
|
-
option: option,
|
|
83
|
-
filter: filter,
|
|
84
|
-
sort: sort
|
|
85
|
-
})];
|
|
86
|
-
case 1: return [2 /*return*/, _a.sent()];
|
|
87
|
-
}
|
|
88
|
-
});
|
|
89
|
-
}); };
|
|
90
|
-
//# sourceMappingURL=subscription.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"subscription.js","sourceRoot":"","sources":["../../src/queries/subscription.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,OAAO,WAAW,MAAM,gBAAgB,CAAC;AACzC,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AACvC,OAAO,EACH,oBAAoB,EACpB,qBAAqB,GACxB,MAAM,yBAAyB,CAAC;AAEjC;;;;;;;;GAQG;AACH,MAAM,CAAC,IAAM,eAAe,GAAG,UAAO,SAAiB,EAAE,EAAU;;;oBACxD,qBAAM,SAAS,CAAC,cAAc,EAAE,oBAAoB,EAAE;oBACzD,SAAS,EAAE,WAAW,CAAC,GAAG,CAAC,YAAY,CAAC;oBACxC,SAAS,WAAA;oBACT,EAAE,IAAA;iBACL,CAAC,EAAA;oBAJF,sBAAO,SAIL,EAAC;;;KACN,CAAC;AAEF;;;;;;;;;GASG;AACH,MAAM,CAAC,IAAM,gBAAgB,GAAG,UAAO,MAAW,EAAE,IAAS,EAAE,MAAW;;;oBAC/D,qBAAM,SAAS,CAAC,eAAe,EAAE,qBAAqB,EAAE;oBAC3D,SAAS,EAAE,WAAW,CAAC,GAAG,CAAC,YAAY,CAAC;oBACxC,MAAM,QAAA;oBACN,MAAM,QAAA;oBACN,IAAI,MAAA;iBACP,CAAC,EAAA;oBALF,sBAAO,SAKL,EAAC;;;KACN,CAAC"}
|