ncloudchat 1.0.23 → 1.0.31

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 (138) hide show
  1. package/LICENSE.md +1 -1
  2. package/deploy.sh +1 -1
  3. package/esm/CloudChat.d.ts +434 -10
  4. package/esm/CloudChat.js +975 -302
  5. package/esm/CloudChat.js.map +1 -1
  6. package/esm/CoreManager.d.ts +6 -0
  7. package/esm/CoreManager.js +13 -4
  8. package/esm/CoreManager.js.map +1 -1
  9. package/esm/Dispatcher.d.ts +16 -0
  10. package/esm/Dispatcher.js +19 -4
  11. package/esm/Dispatcher.js.map +1 -1
  12. package/esm/Network.d.ts +7 -0
  13. package/esm/Network.js +93 -0
  14. package/esm/Network.js.map +1 -0
  15. package/esm/Type.d.ts +43 -0
  16. package/esm/Type.js +16 -0
  17. package/esm/Type.js.map +1 -1
  18. package/esm/Util.d.ts +13 -0
  19. package/esm/Util.js +13 -0
  20. package/esm/Util.js.map +1 -1
  21. package/esm/graphql/channel.d.ts +13 -0
  22. package/esm/graphql/channel.js +16 -0
  23. package/esm/graphql/channel.js.map +1 -0
  24. package/esm/graphql/friend.d.ts +11 -0
  25. package/esm/graphql/friend.js +13 -0
  26. package/esm/graphql/friend.js.map +1 -0
  27. package/esm/graphql/invite.d.ts +7 -0
  28. package/esm/graphql/invite.js +8 -0
  29. package/esm/graphql/invite.js.map +1 -0
  30. package/esm/graphql/member.d.ts +11 -0
  31. package/esm/graphql/member.js +13 -0
  32. package/esm/graphql/member.js.map +1 -0
  33. package/esm/graphql/message.d.ts +11 -0
  34. package/esm/graphql/message.js +13 -0
  35. package/esm/graphql/message.js.map +1 -0
  36. package/esm/graphql/pin.d.ts +10 -0
  37. package/esm/graphql/pin.js +12 -0
  38. package/esm/graphql/pin.js.map +1 -0
  39. package/esm/graphql/project.d.ts +7 -0
  40. package/esm/graphql/project.js +8 -0
  41. package/esm/graphql/project.js.map +1 -0
  42. package/esm/graphql/subscription.d.ts +11 -0
  43. package/esm/graphql/subscription.js +13 -0
  44. package/esm/graphql/subscription.js.map +1 -0
  45. package/esm/index.d.ts +6 -0
  46. package/esm/index.js +6 -0
  47. package/esm/index.js.map +1 -1
  48. package/esm/logger.d.ts +9 -3
  49. package/esm/logger.js +6 -0
  50. package/esm/logger.js.map +1 -1
  51. package/esm/mutations/channel.d.ts +50 -0
  52. package/esm/mutations/channel.js +97 -187
  53. package/esm/mutations/channel.js.map +1 -1
  54. package/esm/mutations/friend.d.ts +38 -0
  55. package/esm/mutations/friend.js +57 -119
  56. package/esm/mutations/friend.js.map +1 -1
  57. package/esm/mutations/index.d.ts +5 -3
  58. package/esm/mutations/index.js +5 -3
  59. package/esm/mutations/index.js.map +1 -1
  60. package/esm/mutations/invite.d.ts +15 -0
  61. package/esm/mutations/invite.js +23 -32
  62. package/esm/mutations/invite.js.map +1 -1
  63. package/esm/mutations/member.d.ts +39 -2
  64. package/esm/mutations/member.js +64 -111
  65. package/esm/mutations/member.js.map +1 -1
  66. package/esm/mutations/message.d.ts +35 -0
  67. package/esm/mutations/message.js +66 -45
  68. package/esm/mutations/message.js.map +1 -1
  69. package/esm/mutations/pin.d.ts +28 -0
  70. package/esm/mutations/pin.js +88 -0
  71. package/esm/mutations/pin.js.map +1 -0
  72. package/esm/mutations/subscription.d.ts +33 -1
  73. package/esm/mutations/subscription.js +51 -93
  74. package/esm/mutations/subscription.js.map +1 -1
  75. package/esm/queries/channel.d.ts +24 -0
  76. package/esm/queries/channel.js +37 -79
  77. package/esm/queries/channel.js.map +1 -1
  78. package/esm/queries/friend.d.ts +16 -0
  79. package/esm/queries/friend.js +25 -40
  80. package/esm/queries/friend.js.map +1 -1
  81. package/esm/queries/index.d.ts +7 -0
  82. package/esm/queries/index.js +7 -0
  83. package/esm/queries/index.js.map +1 -1
  84. package/esm/queries/member.d.ts +16 -0
  85. package/esm/queries/member.js +25 -40
  86. package/esm/queries/member.js.map +1 -1
  87. package/esm/queries/memberblocks.d.ts +16 -0
  88. package/esm/queries/memberblocks.js +25 -40
  89. package/esm/queries/memberblocks.js.map +1 -1
  90. package/esm/queries/message.d.ts +33 -0
  91. package/esm/queries/message.js +50 -111
  92. package/esm/queries/message.js.map +1 -1
  93. package/esm/queries/pin.d.ts +28 -0
  94. package/esm/queries/pin.js +92 -0
  95. package/esm/queries/pin.js.map +1 -0
  96. package/esm/queries/project.d.ts +13 -0
  97. package/esm/queries/project.js +20 -32
  98. package/esm/queries/project.js.map +1 -1
  99. package/esm/queries/subscription.d.ts +25 -0
  100. package/esm/queries/subscription.js +39 -76
  101. package/esm/queries/subscription.js.map +1 -1
  102. package/lib/CloudChat.js +1211 -363
  103. package/lib/CoreManager.js +13 -3
  104. package/lib/Dispatcher.js +25 -9
  105. package/lib/Network.js +226 -0
  106. package/lib/Type.js +19 -0
  107. package/lib/Util.js +15 -1
  108. package/lib/graphql/channel.js +32 -0
  109. package/lib/graphql/friend.js +27 -0
  110. package/lib/graphql/invite.js +18 -0
  111. package/lib/graphql/member.js +27 -0
  112. package/lib/graphql/message.js +27 -0
  113. package/lib/graphql/pin.js +25 -0
  114. package/lib/graphql/project.js +18 -0
  115. package/lib/graphql/subscription.js +27 -0
  116. package/lib/index.js +2 -2
  117. package/lib/logger.js +6 -0
  118. package/lib/mutations/channel.js +105 -178
  119. package/lib/mutations/friend.js +62 -115
  120. package/lib/mutations/index.js +23 -3
  121. package/lib/mutations/invite.js +27 -33
  122. package/lib/mutations/member.js +73 -100
  123. package/lib/mutations/message.js +86 -48
  124. package/lib/mutations/pin.js +229 -0
  125. package/lib/mutations/subscription.js +56 -95
  126. package/lib/queries/channel.js +40 -84
  127. package/lib/queries/friend.js +29 -45
  128. package/lib/queries/index.js +24 -3
  129. package/lib/queries/member.js +29 -45
  130. package/lib/queries/memberblocks.js +28 -44
  131. package/lib/queries/message.js +56 -109
  132. package/lib/queries/pin.js +243 -0
  133. package/lib/queries/project.js +24 -41
  134. package/lib/queries/subscription.js +42 -78
  135. package/package.json +19 -45
  136. package/tsconfig.json +1 -0
  137. package//353/260/260/355/217/254/354/210/234/354/204/234.md +8 -0
  138. package/package copy.json +0 -74
@@ -1,3 +1,9 @@
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
+ */
1
7
  var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
2
8
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3
9
  return new (P || (P = Promise))(function (resolve, reject) {
@@ -34,49 +40,28 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
34
40
  if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
35
41
  }
36
42
  };
37
- import CoreManager from '../CoreManager';
43
+ import { getMemberBlocksQuery } from "../graphql/member";
44
+ import { fetchData } from "../Network";
45
+ import CoreManager from "../CoreManager";
46
+ /**
47
+ * Get member blocks.
48
+ *
49
+ * @async
50
+ * @function getMemberBlocks
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
+ */
38
56
  export var getMemberBlocks = function (filter, sort, option) { return __awaiter(void 0, void 0, void 0, function () {
39
- var token, projectId, endpoint, lquery;
40
57
  return __generator(this, function (_a) {
41
58
  switch (_a.label) {
42
- case 0:
43
- token = CoreManager.get('TOKEN');
44
- if (!token)
45
- return [2 /*return*/, null];
46
- projectId = CoreManager.get('PROJECT_ID');
47
- if (!projectId)
48
- return [2 /*return*/, null];
49
- endpoint = CoreManager.get('SERVER_URL') + '/graphql';
50
- lquery = "\n query memberblocks ($projectId: String!, $filter: String!, $sort: String, $option:String) {\n memberblocks(projectId: $projectId, filter:$filter, sort:$sort, option:$option) {\n totalCount\n edges {\n node {\n id\n project_id\n member_id\n type\n status\n block_type\n messageMulti {\n lang\n value\n default\n }\n started_at\n ended_at\n created_at\n updated_at\n deleted_at\n }\n }\n }\n }\n \n ";
51
- return [4 /*yield*/, fetch(endpoint, {
52
- method: 'POST',
53
- headers: {
54
- Authorization: 'Bearer ' + token,
55
- 'X-PROJECT-ID': projectId,
56
- 'Content-Type': 'application/json',
57
- Accept: 'application/json'
58
- },
59
- body: JSON.stringify({
60
- query: lquery,
61
- variables: {
62
- projectId: projectId,
63
- filter: filter,
64
- sort: sort,
65
- option: option
66
- }
67
- })
68
- })
69
- .then(function (res) { return res.json(); })
70
- .then(function (data) {
71
- if (data.errors)
72
- throw data.errors[0];
73
- if (data.code)
74
- throw data;
75
- if (data.data.memberblocks) {
76
- return data.data.memberblocks.edges;
77
- }
78
- return [];
79
- })];
59
+ case 0: return [4 /*yield*/, fetchData("memberblocks", getMemberBlocksQuery, {
60
+ projectId: CoreManager.get("PROJECT_ID"),
61
+ filter: filter,
62
+ sort: sort,
63
+ option: option
64
+ })];
80
65
  case 1: return [2 /*return*/, _a.sent()];
81
66
  }
82
67
  });
@@ -1 +1 @@
1
- {"version":3,"file":"memberblocks.js","sourceRoot":"","sources":["../../src/queries/memberblocks.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,WAAW,MAAM,gBAAgB,CAAC;AACzC,MAAM,CAAC,IAAM,eAAe,GAAG,UAAO,MAAc,EAAE,IAAY,EAAE,MAAc;;;;;gBAC1E,KAAK,GAAG,WAAW,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;gBACvC,IAAI,CAAC,KAAK;oBAAE,sBAAO,IAAI,EAAC;gBAClB,SAAS,GAAG,WAAW,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC;gBAChD,IAAI,CAAC,SAAS;oBAAE,sBAAO,IAAI,EAAC;gBACtB,QAAQ,GAAG,WAAW,CAAC,GAAG,CAAC,YAAY,CAAC,GAAG,UAAU,CAAC;gBACtD,MAAM,GAAG,klBA2Bd,CAAC;gBAEK,qBAAM,KAAK,CAAC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AAS,CAAC,cAAc,EAAE,oBAAoB,EAAE;oBACzD,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"}
@@ -1,3 +1,36 @@
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 the all messages.
9
+ *
10
+ * @async
11
+ * @function getMessages
12
+ * @param {string} filter - Field value for filter.
13
+ * @param {string} sort - Field value for sorting.
14
+ * @param {string} option - Optional option: ex) offset, per_page.
15
+ * @returns {Promise<any>}
16
+ */
1
17
  export declare const getMessages: (filter: string, sort: string, option: string) => Promise<any>;
18
+ /**
19
+ * Get data of a single message.
20
+ *
21
+ * @async
22
+ * @function getMessage
23
+ * @param {string} channelId - The id of a channel.
24
+ * @param {string} messageId - The id of a message.
25
+ * @returns {Promise<any>}
26
+ */
2
27
  export declare const getMessage: (channelId: string, messageId: string) => Promise<any>;
28
+ /**
29
+ * Get a count of unread messages of a channel.
30
+ *
31
+ * @async
32
+ * @function unreadCount
33
+ * @param {string} channelId - The id of a channel.
34
+ * @returns {Promise<any>}
35
+ */
3
36
  export declare const unreadCount: (channelId: string) => Promise<any>;
@@ -1,3 +1,9 @@
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
+ */
1
7
  var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
2
8
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3
9
  return new (P || (P = Promise))(function (resolve, reject) {
@@ -35,134 +41,67 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
35
41
  }
36
42
  };
37
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
+ */
38
56
  export var getMessages = function (filter, sort, option) { return __awaiter(void 0, void 0, void 0, function () {
39
- var token, projectId, endpoint, queries;
40
57
  return __generator(this, function (_a) {
41
58
  switch (_a.label) {
42
- case 0:
43
- token = CoreManager.get("TOKEN");
44
- if (!token)
45
- return [2 /*return*/, null];
46
- projectId = CoreManager.get("PROJECT_ID");
47
- if (!projectId)
48
- return [2 /*return*/, null];
49
- endpoint = CoreManager.get("SERVER_URL") + "/graphql";
50
- queries = "\n query messages ($projectId: String!, $filter: String!, $option: String, $sort: String ) {\n messages(projectId: $projectId, filter: $filter, option:$option, sort:$sort) {\n totalCount\n edges {\n node {\n id\n message_id\n channel_id\n sort_id\n message_type\n sender {\n id\n name\n profile\n }\n admin {\n id\n name\n }\n mentions\n mentions_everyone\n content\n sended_at\n created_at\n }\n }\n }\n }\n ";
51
- return [4 /*yield*/, fetch(endpoint, {
52
- method: "POST",
53
- headers: {
54
- Authorization: "Bearer " + token,
55
- 'X-PROJECT-ID': projectId,
56
- "Content-Type": "application/json",
57
- Accept: "application/json"
58
- },
59
- body: JSON.stringify({
60
- query: queries,
61
- variables: {
62
- projectId: projectId,
63
- filter: filter,
64
- sort: sort,
65
- option: option
66
- }
67
- })
68
- })
69
- .then(function (res) { return res.json(); })
70
- .then(function (data) {
71
- if (data.errors)
72
- throw data.errors[0];
73
- if (data.code)
74
- throw data;
75
- if (!data || !data.data.messages)
76
- return [];
77
- return data.data.messages.edges;
78
- })];
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
+ })];
79
65
  case 1: return [2 /*return*/, _a.sent()];
80
66
  }
81
67
  });
82
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
+ */
83
78
  export var getMessage = function (channelId, messageId) { return __awaiter(void 0, void 0, void 0, function () {
84
- var token, projectId, endpoint, queries;
85
79
  return __generator(this, function (_a) {
86
80
  switch (_a.label) {
87
- case 0:
88
- token = CoreManager.get("TOKEN");
89
- if (!token)
90
- return [2 /*return*/, null];
91
- projectId = CoreManager.get("PROJECT_ID");
92
- if (!projectId)
93
- return [2 /*return*/, null];
94
- endpoint = CoreManager.get("SERVER_URL") + "/graphql";
95
- queries = "\n query message ($projectId: String!, $channelId: String!, $id: ID!) { \n message(projectId: $projectId, channelId:$channelId, id:$id) { \n id\n message_id\n channel_id\n sort_id\n message_type\n sender {\n id\n name\n profile\n }\n admin {\n id\n name\n }\n mentions\n mentions_everyone\n content\n sended_at\n created_at\n } \n }\n ";
96
- return [4 /*yield*/, fetch(endpoint, {
97
- method: "POST",
98
- headers: {
99
- Authorization: "Bearer " + token,
100
- 'X-PROJECT-ID': projectId,
101
- "Content-Type": "application/json",
102
- Accept: "application/json"
103
- },
104
- body: JSON.stringify({
105
- query: queries,
106
- variables: {
107
- projectId: projectId,
108
- channelId: channelId,
109
- id: messageId
110
- }
111
- })
112
- })
113
- .then(function (res) { return res.json(); })
114
- .then(function (data) {
115
- if (data.errors)
116
- throw data.errors[0];
117
- if (data.code)
118
- throw data;
119
- if (!data || !data.data.message)
120
- return false;
121
- return data.data.message;
122
- })];
81
+ case 0: return [4 /*yield*/, fetchData("message", getMessageQuery, {
82
+ projectId: CoreManager.get("PROJECT_ID"),
83
+ channelId: channelId,
84
+ id: messageId
85
+ })];
123
86
  case 1: return [2 /*return*/, _a.sent()];
124
87
  }
125
88
  });
126
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
+ */
127
98
  export var unreadCount = function (channelId) { return __awaiter(void 0, void 0, void 0, function () {
128
- var token, projectId, endpoint, queries;
129
99
  return __generator(this, function (_a) {
130
100
  switch (_a.label) {
131
- case 0:
132
- token = CoreManager.get("TOKEN");
133
- if (!token)
134
- return [2 /*return*/, null];
135
- projectId = CoreManager.get("PROJECT_ID");
136
- if (!projectId)
137
- return [2 /*return*/, null];
138
- endpoint = CoreManager.get("SERVER_URL") + "/graphql";
139
- queries = "\n query mark ($projectId: String!, $channelId: String!) { \n mark (projectId: $projectId, channelId:$channelId) { \n user_id,\n message_id,\n sort_id, \n unread\n } \n }\n ";
140
- return [4 /*yield*/, fetch(endpoint, {
141
- method: "POST",
142
- headers: {
143
- Authorization: "Bearer " + token,
144
- 'X-PROJECT-ID': projectId,
145
- "Content-Type": "application/json",
146
- Accept: "application/json"
147
- },
148
- body: JSON.stringify({
149
- query: queries,
150
- variables: {
151
- projectId: projectId,
152
- channelId: channelId
153
- }
154
- })
155
- })
156
- .then(function (res) { return res.json(); })
157
- .then(function (data) {
158
- if (data.errors)
159
- throw data.errors[0];
160
- if (data.code)
161
- throw data;
162
- if (!data || !data.data.mark)
163
- return false;
164
- return data.data.mark;
165
- })];
101
+ case 0: return [4 /*yield*/, fetchData("mark", unreadCountQuery, {
102
+ projectId: CoreManager.get("PROJECT_ID"),
103
+ channelId: channelId
104
+ })];
166
105
  case 1: return [2 /*return*/, _a.sent()];
167
106
  }
168
107
  });
@@ -1 +1 @@
1
- {"version":3,"file":"message.js","sourceRoot":"","sources":["../../src/queries/message.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,WAAW,MAAM,gBAAgB,CAAC;AAEzC,MAAM,CAAC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 +1,28 @@
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>;
@@ -0,0 +1,92 @@
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
@@ -0,0 +1 @@
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 +1,14 @@
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
+ */
1
14
  export declare const getProject: () => Promise<any>;
@@ -1,3 +1,9 @@
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
+ */
1
7
  var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
2
8
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3
9
  return new (P || (P = Promise))(function (resolve, reject) {
@@ -34,41 +40,23 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
34
40
  if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
35
41
  }
36
42
  };
37
- import CoreManager from '../CoreManager';
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
+ */
38
53
  export var getProject = function () { return __awaiter(void 0, void 0, void 0, function () {
39
- var token, projectId, url, endpoint, query, CONTENT_TYPE, response, json;
40
54
  return __generator(this, function (_a) {
41
55
  switch (_a.label) {
42
- case 0:
43
- token = CoreManager.get("TOKEN");
44
- if (!token)
45
- return [2 /*return*/, null];
46
- projectId = CoreManager.get("PROJECT_ID");
47
- if (!projectId)
48
- return [2 /*return*/, null];
49
- url = CoreManager.get('SERVER_URL');
50
- endpoint = url + "/graphql";
51
- query = "\n query project($id: ID!) {\n project(id:$id) { \n ncp_project_id\n name\n }\n }\n ";
52
- CONTENT_TYPE = 'application/json';
53
- return [4 /*yield*/, fetch(endpoint, {
54
- method: 'POST',
55
- headers: {
56
- 'Authorization': "Bearer " + token,
57
- 'X-PROJECT-ID': projectId,
58
- 'Content-Type': CONTENT_TYPE,
59
- 'Accept': CONTENT_TYPE
60
- },
61
- body: JSON.stringify({
62
- query: query,
63
- variables: { id: projectId }
64
- })
65
- })];
66
- case 1:
67
- response = _a.sent();
68
- return [4 /*yield*/, response.json()];
69
- case 2:
70
- json = _a.sent();
71
- return [2 /*return*/, json.data.project];
56
+ case 0: return [4 /*yield*/, fetchData("project", getProjectQuery, {
57
+ id: CoreManager.get("PROJECT_ID")
58
+ })];
59
+ case 1: return [2 /*return*/, _a.sent()];
72
60
  }
73
61
  });
74
62
  }); };
@@ -1 +1 @@
1
- {"version":3,"file":"project.js","sourceRoot":"","sources":["../../src/queries/project.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,WAAW,MAAM,gBAAgB,CAAC;AAGzC,MAAM,CAAC,IAAM,UAAU,GAAG;;;;;gBAClB,KAAK,GAAG,WAAW,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;gBACvC,IAAI,CAAC,KAAK;oBAAE,sBAAO,IAAI,EAAC;gBAElB,SAAS,GAAG,WAAW,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC;gBAChD,IAAI,CAAC,SAAS;oBAAE,sBAAO,IAAI,EAAC;gBAEtB,GAAG,GAAG,WAAW,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC;gBACpC,QAAQ,GAAM,GAAG,aAAU,CAAC;gBAC5B,KAAK,GAAG,wHAOb,CAAC;gBAEI,YAAY,GAAG,kBAAkB,CAAC;gBACvB,qBAAM,KAAK,CAAC,QAAQ,EAAE;wBACrC,MAAM,EAAE,MAAM;wBACd,OAAO,EAAE;4BACP,eAAe,EAAE,YAAU,KAAO;4BAClC,cAAc,EAAG,SAAS;4BAC1B,cAAc,EAAE,YAAY;4BAC5B,QAAQ,EAAE,YAAY;yBACvB;wBACD,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC;4BACnB,KAAK,OAAA;4BACL,SAAS,EAAE,EAAE,EAAE,EAAE,SAAS,EAAE;yBAC7B,CAAC;qBACH,CAAC,EAAA;;gBAZI,QAAQ,GAAG,SAYf;gBACW,qBAAM,QAAQ,CAAC,IAAI,EAAE,EAAA;;gBAA5B,IAAI,GAAG,SAAqB;gBAClC,sBAAO,IAAI,CAAC,IAAI,CAAC,OAAO,EAAC;;;KAC1B,CAAC"}
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,2 +1,27 @@
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
+ */
1
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
+ */
2
27
  export declare const getSubscriptions: (filter: any, sort: any, option: any) => Promise<any>;