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.
Files changed (143) hide show
  1. package/LICENSE.md +2 -2
  2. package/README.md +23 -393
  3. package/ncloudchat.d.ts +1298 -0
  4. package/ncloudchat.min.js +1 -0
  5. package/package.json +19 -40
  6. package/deploy.sh +0 -20
  7. package/esm/CloudChat.d.ts +0 -482
  8. package/esm/CloudChat.js +0 -1736
  9. package/esm/CloudChat.js.map +0 -1
  10. package/esm/CoreManager.d.ts +0 -11
  11. package/esm/CoreManager.js +0 -36
  12. package/esm/CoreManager.js.map +0 -1
  13. package/esm/Dispatcher.d.ts +0 -37
  14. package/esm/Dispatcher.js +0 -93
  15. package/esm/Dispatcher.js.map +0 -1
  16. package/esm/Network.d.ts +0 -7
  17. package/esm/Network.js +0 -96
  18. package/esm/Network.js.map +0 -1
  19. package/esm/Type.d.ts +0 -79
  20. package/esm/Type.js +0 -28
  21. package/esm/Type.js.map +0 -1
  22. package/esm/Util.d.ts +0 -15
  23. package/esm/Util.js +0 -20
  24. package/esm/Util.js.map +0 -1
  25. package/esm/graphql/channel.d.ts +0 -13
  26. package/esm/graphql/channel.js +0 -16
  27. package/esm/graphql/channel.js.map +0 -1
  28. package/esm/graphql/friend.d.ts +0 -11
  29. package/esm/graphql/friend.js +0 -13
  30. package/esm/graphql/friend.js.map +0 -1
  31. package/esm/graphql/invite.d.ts +0 -7
  32. package/esm/graphql/invite.js +0 -8
  33. package/esm/graphql/invite.js.map +0 -1
  34. package/esm/graphql/member.d.ts +0 -11
  35. package/esm/graphql/member.js +0 -13
  36. package/esm/graphql/member.js.map +0 -1
  37. package/esm/graphql/message.d.ts +0 -11
  38. package/esm/graphql/message.js +0 -13
  39. package/esm/graphql/message.js.map +0 -1
  40. package/esm/graphql/pin.d.ts +0 -10
  41. package/esm/graphql/pin.js +0 -12
  42. package/esm/graphql/pin.js.map +0 -1
  43. package/esm/graphql/project.d.ts +0 -6
  44. package/esm/graphql/project.js +0 -8
  45. package/esm/graphql/project.js.map +0 -1
  46. package/esm/graphql/subscription.d.ts +0 -11
  47. package/esm/graphql/subscription.js +0 -13
  48. package/esm/graphql/subscription.js.map +0 -1
  49. package/esm/index.d.ts +0 -8
  50. package/esm/index.js +0 -9
  51. package/esm/index.js.map +0 -1
  52. package/esm/logger.d.ts +0 -10
  53. package/esm/logger.js +0 -17
  54. package/esm/logger.js.map +0 -1
  55. package/esm/mutations/channel.d.ts +0 -56
  56. package/esm/mutations/channel.js +0 -170
  57. package/esm/mutations/channel.js.map +0 -1
  58. package/esm/mutations/friend.d.ts +0 -42
  59. package/esm/mutations/friend.js +0 -122
  60. package/esm/mutations/friend.js.map +0 -1
  61. package/esm/mutations/index.d.ts +0 -13
  62. package/esm/mutations/index.js +0 -14
  63. package/esm/mutations/index.js.map +0 -1
  64. package/esm/mutations/invite.d.ts +0 -16
  65. package/esm/mutations/invite.js +0 -67
  66. package/esm/mutations/invite.js.map +0 -1
  67. package/esm/mutations/member.d.ts +0 -41
  68. package/esm/mutations/member.js +0 -129
  69. package/esm/mutations/member.js.map +0 -1
  70. package/esm/mutations/message.d.ts +0 -37
  71. package/esm/mutations/message.js +0 -132
  72. package/esm/mutations/message.js.map +0 -1
  73. package/esm/mutations/pin.d.ts +0 -28
  74. package/esm/mutations/pin.js +0 -88
  75. package/esm/mutations/pin.js.map +0 -1
  76. package/esm/mutations/subscription.d.ts +0 -37
  77. package/esm/mutations/subscription.js +0 -115
  78. package/esm/mutations/subscription.js.map +0 -1
  79. package/esm/queries/channel.d.ts +0 -26
  80. package/esm/queries/channel.js +0 -88
  81. package/esm/queries/channel.js.map +0 -1
  82. package/esm/queries/friend.d.ts +0 -17
  83. package/esm/queries/friend.js +0 -69
  84. package/esm/queries/friend.js.map +0 -1
  85. package/esm/queries/index.d.ts +0 -14
  86. package/esm/queries/index.js +0 -15
  87. package/esm/queries/index.js.map +0 -1
  88. package/esm/queries/member.d.ts +0 -17
  89. package/esm/queries/member.js +0 -69
  90. package/esm/queries/member.js.map +0 -1
  91. package/esm/queries/memberblocks.d.ts +0 -17
  92. package/esm/queries/memberblocks.js +0 -69
  93. package/esm/queries/memberblocks.js.map +0 -1
  94. package/esm/queries/message.d.ts +0 -36
  95. package/esm/queries/message.js +0 -109
  96. package/esm/queries/message.js.map +0 -1
  97. package/esm/queries/pin.d.ts +0 -28
  98. package/esm/queries/pin.js +0 -92
  99. package/esm/queries/pin.js.map +0 -1
  100. package/esm/queries/project.d.ts +0 -14
  101. package/esm/queries/project.js +0 -22
  102. package/esm/queries/project.js.map +0 -1
  103. package/esm/queries/subscription.d.ts +0 -27
  104. package/esm/queries/subscription.js +0 -90
  105. package/esm/queries/subscription.js.map +0 -1
  106. package/lib/CloudChat.js +0 -2661
  107. package/lib/CoreManager.js +0 -45
  108. package/lib/Dispatcher.js +0 -125
  109. package/lib/Network.js +0 -229
  110. package/lib/Type.js +0 -44
  111. package/lib/Util.js +0 -32
  112. package/lib/graphql/channel.js +0 -32
  113. package/lib/graphql/friend.js +0 -27
  114. package/lib/graphql/invite.js +0 -18
  115. package/lib/graphql/member.js +0 -27
  116. package/lib/graphql/message.js +0 -27
  117. package/lib/graphql/pin.js +0 -25
  118. package/lib/graphql/project.js +0 -7
  119. package/lib/graphql/subscription.js +0 -27
  120. package/lib/index.js +0 -18
  121. package/lib/logger.js +0 -33
  122. package/lib/mutations/channel.js +0 -354
  123. package/lib/mutations/friend.js +0 -299
  124. package/lib/mutations/index.js +0 -109
  125. package/lib/mutations/invite.js +0 -205
  126. package/lib/mutations/member.js +0 -304
  127. package/lib/mutations/message.js +0 -300
  128. package/lib/mutations/pin.js +0 -229
  129. package/lib/mutations/subscription.js +0 -281
  130. package/lib/queries/channel.js +0 -239
  131. package/lib/queries/friend.js +0 -207
  132. package/lib/queries/index.js +0 -123
  133. package/lib/queries/member.js +0 -207
  134. package/lib/queries/memberblocks.js +0 -207
  135. package/lib/queries/message.js +0 -273
  136. package/lib/queries/pin.js +0 -243
  137. package/lib/queries/project.js +0 -7
  138. package/lib/queries/subscription.js +0 -241
  139. package/ncloudchat_javascript.md +0 -289
  140. package/tsconfig.json +0 -32
  141. package/types/exif.d.ts +0 -10
  142. package/types/window.d.ts +0 -5
  143. package//353/260/260/355/217/254/354/210/234/354/204/234.md +0 -8
@@ -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"}
@@ -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>;
@@ -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
@@ -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"}
@@ -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
- export {};
8
- /**
9
- * Get data of a project.
10
- *
11
- * @async
12
- * @function getProject
13
- * @returns {Promise<any>}
14
- */
@@ -1,22 +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
- export {};
8
- // import { getProjectQuery } from "../graphql/project";
9
- /**
10
- * Get data of a project.
11
- *
12
- * @async
13
- * @function getProject
14
- * @returns {Promise<any>}
15
- */
16
- // export const getProject = async () => {
17
- // return await fetchData("project", getProjectQuery, {
18
- // ncpId: CoreManager.get("COMPANY_ID");
19
- // id: CoreManager.get("PROJECT_ID")
20
- // });
21
- // };
22
- //# sourceMappingURL=project.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"project.js","sourceRoot":"","sources":["../../src/queries/project.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;AAIH,wDAAwD;AAExD;;;;;;GAMG;AACH,0CAA0C;AAC1C,2DAA2D;AAC3D,gDAAgD;AAChD,4CAA4C;AAC5C,UAAU;AACV,KAAK"}
@@ -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"}