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,45 +0,0 @@
1
- "use strict";
2
-
3
- var _Object$defineProperty = require("@babel/runtime-corejs2/core-js/object/define-property");
4
-
5
- _Object$defineProperty(exports, "__esModule", {
6
- value: true
7
- });
8
-
9
- exports["default"] = void 0;
10
-
11
- /**
12
- * Copyright (c) NBASE CORP. and its affiliates.
13
- *
14
- * This source code is licensed under the MIT license found in the
15
- * LICENSE file in the root directory of this source tree.
16
- */
17
- var config = {
18
- // Defaults
19
- IS_NODE: typeof process !== "undefined" && !!process.versions && !!process.versions.node,
20
- REQUEST_ATTEMPT_LIMIT: 5,
21
- REQUEST_BATCH_SIZE: 20,
22
- REQUEST_HEADERS: {},
23
- TOKEN: "",
24
- SERVER_URL: "https://ncloudchat.apigw.ntruss.com/gpapps/v1",
25
- SOCKET_URL: "https://soc.ncloudchat.ntruss.com",
26
- // jp / sg
27
- // SERVER_URL: "https://ncloudchat.apigw.ntruss.com/gpapps/jp-v1",
28
- // SOCKET_URL: "https://jp-soc.ncloudchat.ntruss.com",
29
- VERSION: "js" + require("../package.json").version,
30
- PROJECT_ID: null
31
- };
32
- var CoreManager = {
33
- get: function get(key) {
34
- if (config.hasOwnProperty(key)) {
35
- return config[key];
36
- }
37
-
38
- return "";
39
- },
40
- set: function set(key, value) {
41
- config[key] = value;
42
- }
43
- };
44
- var _default = CoreManager;
45
- exports["default"] = _default;
package/lib/Dispatcher.js DELETED
@@ -1,125 +0,0 @@
1
- "use strict";
2
-
3
- var _Object$defineProperty = require("@babel/runtime-corejs2/core-js/object/define-property");
4
-
5
- _Object$defineProperty(exports, "__esModule", {
6
- value: true
7
- });
8
-
9
- exports["default"] = void 0;
10
-
11
- require("core-js/modules/es6.string.includes.js");
12
-
13
- require("core-js/modules/es7.array.includes.js");
14
-
15
- require("core-js/modules/es6.array.index-of.js");
16
-
17
- require("core-js/modules/es6.array.for-each.js");
18
-
19
- require("core-js/modules/es6.array.slice.js");
20
-
21
- /**
22
- * Copyright (c) NBASE CORP. and its affiliates.
23
- *
24
- * This source code is licensed under the MIT license found in the
25
- * LICENSE file in the root directory of this source tree.
26
- */
27
-
28
- /**
29
- * Class DispatcherEvent holds all dispatch events functionallities with callbacks.
30
- *
31
- * @class
32
- */
33
- var DispatcherEvent =
34
- /** @class */
35
- function () {
36
- /**
37
- * Create a Dispatcher Event instance with an empty callback.
38
- *
39
- * @constructs
40
- */
41
- function DispatcherEvent() {
42
- this.callbacks = [];
43
- }
44
-
45
- DispatcherEvent.prototype.getCallbacks = function () {
46
- return this.callbacks;
47
- };
48
-
49
- DispatcherEvent.prototype.register = function (cb) {
50
- if (!this.callbacks.includes(cb)) {
51
- this.callbacks.push(cb);
52
- }
53
- };
54
-
55
- DispatcherEvent.prototype.unregister = function (cb) {
56
- var index = this.callbacks.indexOf(cb);
57
-
58
- if (index > -1) {
59
- this.callbacks.splice(index, 1);
60
- }
61
- };
62
-
63
- DispatcherEvent.prototype.execute = function (param1, param2, param3, param4, param5, param6) {
64
- if (this.callbacks.length > 0) {
65
- this.callbacks.slice(0).forEach(function (callback) {
66
- if (!param2) callback(param1);else if (!param3) callback(param1, param2);else if (!param4) callback(param1, param2, param3);else if (!param5) callback(param1, param2, param3, param4);else if (!param6) callback(param1, param2, param3, param4, param5);else callback(param1, param2, param3, param4, param5, param6);
67
- });
68
- }
69
- };
70
-
71
- return DispatcherEvent;
72
- }();
73
-
74
- var Dispatcher =
75
- /** @class */
76
- function () {
77
- function Dispatcher() {
78
- this.eventProvider = {};
79
- }
80
-
81
- Dispatcher.prototype.getProvider = function () {
82
- return this.eventProvider;
83
- };
84
-
85
- Dispatcher.prototype.dispatch = function (name, param1, param2, param3, param4, param5, param6) {
86
- var event = this.eventProvider[name];
87
-
88
- if (event) {
89
- event.execute(param1, param2, param3, param4, param5, param6);
90
- }
91
- };
92
-
93
- Dispatcher.prototype.on = function (name, callback) {
94
- var event = this.eventProvider[name];
95
-
96
- if (!event) {
97
- event = new DispatcherEvent();
98
- this.eventProvider[name] = event;
99
- }
100
-
101
- event.register(callback);
102
- };
103
-
104
- Dispatcher.prototype.off = function (name, callback) {
105
- var event = this.eventProvider[name];
106
-
107
- if (event) {
108
- if (callback) event.unregister(callback);
109
- delete this.eventProvider[name];
110
- }
111
- };
112
-
113
- Dispatcher.prototype.offall = function (name) {
114
- var event = this.eventProvider[name];
115
-
116
- if (event) {
117
- delete this.eventProvider[name];
118
- }
119
- };
120
-
121
- return Dispatcher;
122
- }();
123
-
124
- var _default = Dispatcher;
125
- exports["default"] = _default;
package/lib/Network.js DELETED
@@ -1,229 +0,0 @@
1
- "use strict";
2
-
3
- var _Object$defineProperty = require("@babel/runtime-corejs2/core-js/object/define-property");
4
-
5
- var _interopRequireDefault = require("@babel/runtime-corejs2/helpers/interopRequireDefault");
6
-
7
- _Object$defineProperty(exports, "__esModule", {
8
- value: true
9
- });
10
-
11
- exports.fetchData = void 0;
12
-
13
- var _promise = _interopRequireDefault(require("@babel/runtime-corejs2/core-js/promise"));
14
-
15
- var _symbol = _interopRequireDefault(require("@babel/runtime-corejs2/core-js/symbol"));
16
-
17
- var _iterator = _interopRequireDefault(require("@babel/runtime-corejs2/core-js/symbol/iterator"));
18
-
19
- var _stringify = _interopRequireDefault(require("@babel/runtime-corejs2/core-js/json/stringify"));
20
-
21
- var _CoreManager = _interopRequireDefault(require("./CoreManager"));
22
-
23
- /**
24
- * Copyright (c) NBASE CORP. and its affiliates.
25
- *
26
- * This source code is licensed under the MIT license found in the
27
- * LICENSE file in the root directory of this source tree.
28
- */
29
- var __awaiter = void 0 && (void 0).__awaiter || function (thisArg, _arguments, P, generator) {
30
- function adopt(value) {
31
- return value instanceof P ? value : new P(function (resolve) {
32
- resolve(value);
33
- });
34
- }
35
-
36
- return new (P || (P = _promise["default"]))(function (resolve, reject) {
37
- function fulfilled(value) {
38
- try {
39
- step(generator.next(value));
40
- } catch (e) {
41
- reject(e);
42
- }
43
- }
44
-
45
- function rejected(value) {
46
- try {
47
- step(generator["throw"](value));
48
- } catch (e) {
49
- reject(e);
50
- }
51
- }
52
-
53
- function step(result) {
54
- result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
55
- }
56
-
57
- step((generator = generator.apply(thisArg, _arguments || [])).next());
58
- });
59
- };
60
-
61
- var __generator = void 0 && (void 0).__generator || function (thisArg, body) {
62
- var _ = {
63
- label: 0,
64
- sent: function sent() {
65
- if (t[0] & 1) throw t[1];
66
- return t[1];
67
- },
68
- trys: [],
69
- ops: []
70
- },
71
- f,
72
- y,
73
- t,
74
- g;
75
- return g = {
76
- next: verb(0),
77
- "throw": verb(1),
78
- "return": verb(2)
79
- }, typeof _symbol["default"] === "function" && (g[_iterator["default"]] = function () {
80
- return this;
81
- }), g;
82
-
83
- function verb(n) {
84
- return function (v) {
85
- return step([n, v]);
86
- };
87
- }
88
-
89
- function step(op) {
90
- if (f) throw new TypeError("Generator is already executing.");
91
-
92
- while (_) {
93
- try {
94
- 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;
95
- if (y = 0, t) op = [op[0] & 2, t.value];
96
-
97
- switch (op[0]) {
98
- case 0:
99
- case 1:
100
- t = op;
101
- break;
102
-
103
- case 4:
104
- _.label++;
105
- return {
106
- value: op[1],
107
- done: false
108
- };
109
-
110
- case 5:
111
- _.label++;
112
- y = op[1];
113
- op = [0];
114
- continue;
115
-
116
- case 7:
117
- op = _.ops.pop();
118
-
119
- _.trys.pop();
120
-
121
- continue;
122
-
123
- default:
124
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
125
- _ = 0;
126
- continue;
127
- }
128
-
129
- if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
130
- _.label = op[1];
131
- break;
132
- }
133
-
134
- if (op[0] === 6 && _.label < t[1]) {
135
- _.label = t[1];
136
- t = op;
137
- break;
138
- }
139
-
140
- if (t && _.label < t[2]) {
141
- _.label = t[2];
142
-
143
- _.ops.push(op);
144
-
145
- break;
146
- }
147
-
148
- if (t[2]) _.ops.pop();
149
-
150
- _.trys.pop();
151
-
152
- continue;
153
- }
154
-
155
- op = body.call(thisArg, _);
156
- } catch (e) {
157
- op = [6, e];
158
- y = 0;
159
- } finally {
160
- f = t = 0;
161
- }
162
- }
163
-
164
- if (op[0] & 5) throw op[1];
165
- return {
166
- value: op[0] ? op[1] : void 0,
167
- done: true
168
- };
169
- }
170
- };
171
-
172
- var fetchData = function fetchData(returnKey, query, variables) {
173
- if (returnKey === void 0) {
174
- returnKey = "";
175
- }
176
-
177
- return __awaiter(void 0, void 0, void 0, function () {
178
- var token, endpoint, projectId, version, language;
179
- return __generator(this, function (_a) {
180
- switch (_a.label) {
181
- case 0:
182
- token = "Bearer ".concat(_CoreManager["default"].get("TOKEN"));
183
- if (!token) throw Error("You are not authorized.");
184
- endpoint = _CoreManager["default"].get("SERVER_URL") + "/graphql";
185
- projectId = _CoreManager["default"].get("PROJECT_ID");
186
- version = _CoreManager["default"].get("VERSION");
187
- language = _CoreManager["default"].get("LANGUAGE");
188
- if (!endpoint || !projectId) return [2
189
- /*return*/
190
- , null];
191
- return [4
192
- /*yield*/
193
- , fetch(endpoint, {
194
- method: "POST",
195
- headers: {
196
- Authorization: token,
197
- "X-PROJECT-ID": projectId,
198
- "Content-Type": "application/json",
199
- "Accept-Language": language,
200
- "Language": language,
201
- Accept: "application/json",
202
- "X-SDK-Version": version
203
- },
204
- body: (0, _stringify["default"])({
205
- query: query,
206
- variables: variables
207
- })
208
- }).then(function (res) {
209
- return res.json();
210
- }).then(function (resJson) {
211
- console.log("Fetch Data Response: ", resJson);
212
- console.log("data: ", resJson.data);
213
- if (resJson.errors) throw resJson.errors[0];
214
- if (resJson.code) throw resJson;else if (resJson.data) {
215
- console.log("JSON DATA: ", resJson.data[returnKey]);
216
- return returnKey != "" ? resJson.data[returnKey] : resJson.data;
217
- } else return false;
218
- })];
219
-
220
- case 1:
221
- return [2
222
- /*return*/
223
- , _a.sent()];
224
- }
225
- });
226
- });
227
- };
228
-
229
- exports.fetchData = fetchData;
package/lib/Type.js DELETED
@@ -1,44 +0,0 @@
1
- "use strict";
2
-
3
- var _Object$defineProperty = require("@babel/runtime-corejs2/core-js/object/define-property");
4
-
5
- _Object$defineProperty(exports, "__esModule", {
6
- value: true
7
- });
8
-
9
- exports.MessageType = exports.ChannelType = void 0;
10
-
11
- /**
12
- * Copyright (c) NBASE CORP. and its affiliates.
13
- *
14
- * This source code is licensed under the MIT license found in the
15
- * LICENSE file in the root directory of this source tree.
16
- */
17
-
18
- /**
19
- * Enum for channel types.
20
- * @readonly
21
- * @enum {string}
22
- */
23
- var ChannelType;
24
- exports.ChannelType = ChannelType;
25
-
26
- (function (ChannelType) {
27
- ChannelType["PRIVATE"] = "PRIVATE";
28
- ChannelType["PUBLIC"] = "PUBLIC";
29
- })(ChannelType || (exports.ChannelType = ChannelType = {}));
30
- /**
31
- * Enum for message types.
32
- * @readonly
33
- * @enum {string}
34
- */
35
-
36
-
37
- var MessageType;
38
- exports.MessageType = MessageType;
39
-
40
- (function (MessageType) {
41
- MessageType["text"] = "text";
42
- MessageType["photo"] = "photo";
43
- MessageType["file"] = "file";
44
- })(MessageType || (exports.MessageType = MessageType = {}));
package/lib/Util.js DELETED
@@ -1,32 +0,0 @@
1
- "use strict";
2
-
3
- var _Object$defineProperty = require("@babel/runtime-corejs2/core-js/object/define-property");
4
-
5
- _Object$defineProperty(exports, "__esModule", {
6
- value: true
7
- });
8
-
9
- exports.ObjectId = void 0;
10
-
11
- require("core-js/modules/es6.regexp.split.js");
12
-
13
- /**
14
- * Copyright (c) NBASE CORP. and its affiliates.
15
- *
16
- * This source code is licensed under the MIT license found in the
17
- * LICENSE file in the root directory of this source tree.
18
- */
19
-
20
- /**
21
- * Decodes a base-64 encoded string.
22
- *
23
- * @function ObjectId
24
- * @param {string} id - An encoded string to be decoded.
25
- * @returns {string} decoded string.
26
- */
27
- var ObjectId = function ObjectId(id) {
28
- if (!id) return "";
29
- return atob(id).split(":")[1];
30
- };
31
-
32
- exports.ObjectId = ObjectId;
@@ -1,32 +0,0 @@
1
- "use strict";
2
-
3
- var _Object$defineProperty = require("@babel/runtime-corejs2/core-js/object/define-property");
4
-
5
- _Object$defineProperty(exports, "__esModule", {
6
- value: true
7
- });
8
-
9
- exports.updateChannelQuery = exports.removeChannelMembersQuery = exports.getChannelsQuery = exports.getChannelQuery = exports.deleteChannelQuery = exports.createChannelQuery = exports.addChannelMembersQuery = void 0;
10
-
11
- /**
12
- * Copyright (c) NBASE CORP. and its affiliates.
13
- *
14
- * This source code is licensed under the MIT license found in the
15
- * LICENSE file in the root directory of this source tree.
16
- */
17
- var channelLastMessageFields = "last_message {\n message_id\n sort_id\n project_id\n channel_id\n message_type\n mentions\n mentions_everyone\n has\n sender {\n id\n name\n profile\n }\n admin {\n id\n name\n profile\n }\n content\n created_at\n }";
18
- var channelFields = "id\n project_id\n name\n user_id { \n id\n name\n profile\n device_type\n language\n }\n unique_id\n type\n translation\n members\n push\n link_url\n image_url \n created_at\n updated_at\n ";
19
- var getChannelQuery = "query channel ($projectId: String!, $id: String!) {\n channel (projectId: $projectId, id:$id) {\n ".concat(channelFields, "\n ").concat(channelLastMessageFields, "\n }\n }\n");
20
- exports.getChannelQuery = getChannelQuery;
21
- var getChannelsQuery = "query channels (\n $projectId: String!, \n $filter: String!, \n $sort: String, \n $option:String\n ) {\n channels (\n projectId: $projectId, \n filter:$filter, \n sort:$sort, \n option:$option\n ) {\n totalCount\n edges {\n node {\n ".concat(channelFields, "\n ").concat(channelLastMessageFields, "\n }\n }\n }\n }\n");
22
- exports.getChannelsQuery = getChannelsQuery;
23
- var createChannelQuery = "mutation (\n $id: String,\n $projectId: String!, \n $name: String!, \n $type: String!,\n $uniqueId: String,\n $translation: Boolean,\n $push: Boolean,\n $mutes: Boolean,\n $linkUrl: String,\n $imageUrl: String,\n $customField: String,\n $members: [String]\n ) {\n createChannel(\n input: { \n id: $id,\n projectId: $projectId, \n name: $name, \n type: $type,\n uniqueId: $uniqueId,\n translation:$translation,\n push:$push,\n mutes: $mutes,\n customField: $customField,\n linkUrl:$linkUrl,\n imageUrl:$imageUrl\n members: $members,\n }\n ) {\n channel {\n ".concat(channelFields, "\n ").concat(channelLastMessageFields, "\n }\n }\n }\n");
24
- exports.createChannelQuery = createChannelQuery;
25
- var updateChannelQuery = "mutation (\n $projectId: String!, \n $name: String, \n $type: String,\n $uniqueId: String,\n $translation: Boolean,\n $push: Boolean,\n $linkUrl: String,\n $imageUrl: String,\n $customField: String,\n $id: ID!,\n $members: [String]\n ) {\n updateChannel(\n input: { \n projectId: $projectId, \n name: $name, \n type: $type,\n id: $id,\n members: $members,\n uniqueId: $uniqueId,\n translation:$translation,\n push:$push,\n customField:$customField,\n linkUrl:$linkUrl,\n imageUrl:$imageUrl\n }\n ) {\n channel {\n ".concat(channelFields, "\n ").concat(channelLastMessageFields, "\n }\n }\n }\n");
26
- exports.updateChannelQuery = updateChannelQuery;
27
- var deleteChannelQuery = "mutation (\n $projectId: String!, \n $id: ID!\n ) {\n deleteChannel(\n input: { \n projectId: $projectId, \n id: $id,\n }\n ) {\n channel {\n ".concat(channelFields, "\n ").concat(channelLastMessageFields, "\n }\n }\n }\n");
28
- exports.deleteChannelQuery = deleteChannelQuery;
29
- var addChannelMembersQuery = "mutation (\n $projectId: String!, \n $channelId: String!, \n $memberIds: [String]!\n ) {\n addChannelMembers(\n input: {\n projectId: $projectId, \n channelId: $channelId, \n memberIds:$memberIds \n }\n ) {\n channel {\n ".concat(channelFields, "\n }\n }\n }\n");
30
- exports.addChannelMembersQuery = addChannelMembersQuery;
31
- var removeChannelMembersQuery = "mutation (\n $projectId: String!, \n $channelId: String!, \n $memberIds: [String]!\n ) {\n removeChannelMembers(\n input: {\n projectId: $projectId, \n channelId: $channelId, \n memberIds:$memberIds \n }\n ) {\n channel {\n ".concat(channelFields, "\n }\n }\n }\n");
32
- exports.removeChannelMembersQuery = removeChannelMembersQuery;
@@ -1,27 +0,0 @@
1
- "use strict";
2
-
3
- var _Object$defineProperty = require("@babel/runtime-corejs2/core-js/object/define-property");
4
-
5
- _Object$defineProperty(exports, "__esModule", {
6
- value: true
7
- });
8
-
9
- exports.requestFriendQuery = exports.removeFriendQuery = exports.rejectFriendQuery = exports.getFriendshipsQuery = exports.acceptFriendQuery = void 0;
10
-
11
- /**
12
- * Copyright (c) NBASE CORP. and its affiliates.
13
- *
14
- * This source code is licensed under the MIT license found in the
15
- * LICENSE file in the root directory of this source tree.
16
- */
17
- var friendshipFields = "project_id\n id\n status\n user {\n id\n name\n profile\n }\n friend {\n id\n name\n profile\n }\n friend_id\n created_at\n updated_at\n requested_at\n ";
18
- var requestFriendQuery = "mutation ($projectId: String!, $friendId: String!) {\n requestFriend(\n input: { \n projectId: $projectId, \n friendId: $friendId }\n ) {\n friendship {\n ".concat(friendshipFields, "\n }\n }\n }\n ");
19
- exports.requestFriendQuery = requestFriendQuery;
20
- var acceptFriendQuery = "mutation ($projectId: String!, $friendId: String!) {\n acceptFriend(\n input: { projectId: $projectId, friendId: $friendId }\n ) {\n friendship {\n ".concat(friendshipFields, "\n }\n }\n }\n ");
21
- exports.acceptFriendQuery = acceptFriendQuery;
22
- var rejectFriendQuery = "mutation ($projectId: String!, $friendId: String!) {\n rejectFriend (\n input: { projectId: $projectId, friendId: $friendId}\n ) {\n friendship {\n ".concat(friendshipFields, "\n }\n }\n }\n ");
23
- exports.rejectFriendQuery = rejectFriendQuery;
24
- var removeFriendQuery = "mutation ($projectId: String!, $friendId: String!) {\n removeFriend(\n input: { projectId: $projectId, friendId: $friendId }\n ) {\n friendship {\n ".concat(friendshipFields, "\n }\n }\n }\n ");
25
- exports.removeFriendQuery = removeFriendQuery;
26
- var getFriendshipsQuery = "query friendships (\n $projectId: String!, \n $filter: String!, \n $sort: String, \n $option: String\n ) {\n friendships (\n projectId: $projectId, \n filter:$filter, \n sort:$sort, \n option: $option\n ) {\n totalCount\n edges {\n node {\n ".concat(friendshipFields, "\n }\n }\n }\n }\n ");
27
- exports.getFriendshipsQuery = getFriendshipsQuery;
@@ -1,18 +0,0 @@
1
- "use strict";
2
-
3
- var _Object$defineProperty = require("@babel/runtime-corejs2/core-js/object/define-property");
4
-
5
- _Object$defineProperty(exports, "__esModule", {
6
- value: true
7
- });
8
-
9
- exports.createInviteQuery = void 0;
10
-
11
- /**
12
- * Copyright (c) NBASE CORP. and its affiliates.
13
- *
14
- * This source code is licensed under the MIT license found in the
15
- * LICENSE file in the root directory of this source tree.
16
- */
17
- var createInviteQuery = "mutation (\n $projectId: String!, \n $channelId: String!,\n $friendIds: String!\n ) {\n createInvite(\n input: {\n projectId: $projectId, \n channelId: $channelId,\n friendIds: $friendIds\n }\n ) {\n invite {\n id\n }\n }\n }\n";
18
- exports.createInviteQuery = createInviteQuery;
@@ -1,27 +0,0 @@
1
- "use strict";
2
-
3
- var _Object$defineProperty = require("@babel/runtime-corejs2/core-js/object/define-property");
4
-
5
- _Object$defineProperty(exports, "__esModule", {
6
- value: true
7
- });
8
-
9
- exports.loginQuery = exports.getMembersQuery = exports.getMemberBlocksQuery = exports.deleteMemberBlockQuery = exports.createMemberBlockQuery = void 0;
10
-
11
- /**
12
- * Copyright (c) NBASE CORP. and its affiliates.
13
- *
14
- * This source code is licensed under the MIT license found in the
15
- * LICENSE file in the root directory of this source tree.
16
- */
17
- var memberFields = "id\n project_id\n member_id\n type\n status\n block_type\n reason\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 ";
18
- var loginQuery = "mutation login(\n $projectId: String!\n $userId: String!\n $name: String\n $profile: String\n $customField: String\n ) {\n login(\n input: {\n projectId: $projectId\n userId: $userId\n name: $name\n profile: $profile\n customField: $customField\n }\n ) {\n token\n }\n }";
19
- exports.loginQuery = loginQuery;
20
- var createMemberBlockQuery = "mutation createMemberBlock(\n $projectId: String!\n $memberId: String!\n $channelId: String\n $options: String\n ) {\n createMemberBlock(\n input: {\n projectId: $projectId\n memberId: $memberId\n channelId: $channelId\n options: $options\n }\n ) {\n memberBlock {\n ".concat(memberFields, "\n }\n }\n }");
21
- exports.createMemberBlockQuery = createMemberBlockQuery;
22
- var deleteMemberBlockQuery = "mutation deleteMemberBlock (\n $projectId: String!\n $memberId: String!\n $channelId: String\n ) {\n deleteMemberBlock(\n input: {\n projectId: $projectId\n memberId: $memberId\n channelId: $channelId\n }\n ) {\n memberBlock {\n ".concat(memberFields, "\n }\n }\n }\n");
23
- exports.deleteMemberBlockQuery = deleteMemberBlockQuery;
24
- var getMembersQuery = "query membersForQuery (\n $projectId: String!, \n $option: String!, \n $filter: String!, \n $sort: String \n ) {\n membersForQuery (\n projectId: $projectId, \n option:$option, \n filter:$filter, \n sort:$sort\n ) {\n totalCount\n edges {\n node {\n id\n name\n }\n }\n }\n }\n";
25
- exports.getMembersQuery = getMembersQuery;
26
- var getMemberBlocksQuery = "query memberblocks (\n $projectId: String!, \n $filter: String!, \n $sort: String, \n $option:String\n ) {\n memberblocks(\n projectId: $projectId, \n filter:$filter, \n sort:$sort, \n option:$option\n ) {\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";
27
- exports.getMemberBlocksQuery = getMemberBlocksQuery;
@@ -1,27 +0,0 @@
1
- "use strict";
2
-
3
- var _Object$defineProperty = require("@babel/runtime-corejs2/core-js/object/define-property");
4
-
5
- _Object$defineProperty(exports, "__esModule", {
6
- value: true
7
- });
8
-
9
- exports.unreadCountQuery = exports.translateQuery = exports.messageQuery = exports.getMessagesQuery = exports.getMessageQuery = void 0;
10
-
11
- /**
12
- * Copyright (c) NBASE CORP. and its affiliates.
13
- *
14
- * This source code is licensed under the MIT license found in the
15
- * LICENSE file in the root directory of this source tree.
16
- */
17
- var messageFields = "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 profile\n }\n attachment_filenames {\n name\n size\n type\n url\n }\n has\n embed_providers\n embed_type\n isExpress\n link_hostnames\n mentions\n bytes\n mentions_everyone\n content\n sended_at\n created_at\n";
18
- var translateQuery = "mutation (\n $projectId: String!, \n $channelId: String!, \n $srcLang: String!, \n $text: String!, \n $targetLang:String!\n ) {\n translation(\n input: {\n projectId:$projectId, \n channelId:$channelId,\n srcLang:$srcLang,\n targetLang:$targetLang, \n text:$text \n }\n ) {\n result\n {\n status\n message\n lang\n }\n }\n }\n";
19
- exports.translateQuery = translateQuery;
20
- var getMessageQuery = "query message (\n $projectId: String!, \n $channelId: String!, \n $id: ID!\n ) { \n message(\n projectId: $projectId, \n channelId:$channelId, \n id:$id\n ) { \n ".concat(messageFields, "\n } \n }\n");
21
- exports.getMessageQuery = getMessageQuery;
22
- var getMessagesQuery = "query messages (\n $projectId: String!, \n $filter: String!, \n $option: String, \n $sort: String \n ) {\n messages(\n projectId: $projectId, \n filter: $filter, \n option:$option, \n sort:$sort\n ) {\n totalCount\n edges {\n node {\n ".concat(messageFields, "\n }\n }\n }\n }\n");
23
- exports.getMessagesQuery = getMessagesQuery;
24
- var unreadCountQuery = "query mark (\n $projectId: String!, \n $channelId: String!\n ) { \n mark (\n projectId: $projectId, \n channelId:$channelId\n ) { \n user_id,\n message_id,\n sort_id, \n unread\n } \n }\n";
25
- exports.unreadCountQuery = unreadCountQuery;
26
- var messageQuery = "mutation (\n $projectId: String!\n $channelId: String!\n $content: String!\n ) {\n createChannelMessage(\n input: {\n projectId: $projectId\n channelId: $channelId\n content: $content\n }\n ) {\n message {\n ".concat(messageFields, "\n }\n }\n }\n");
27
- exports.messageQuery = messageQuery;
@@ -1,25 +0,0 @@
1
- "use strict";
2
-
3
- var _Object$defineProperty = require("@babel/runtime-corejs2/core-js/object/define-property");
4
-
5
- _Object$defineProperty(exports, "__esModule", {
6
- value: true
7
- });
8
-
9
- exports.updatePinQuery = exports.getPinsQuery = exports.getPinQuery = exports.createPinQuery = void 0;
10
-
11
- /**
12
- * Copyright (c) NBASE CORP. and its affiliates.
13
- *
14
- * This source code is licensed under the MIT license found in the
15
- * LICENSE file in the root directory of this source tree.
16
- */
17
- var pinFields = "\n id\n project_id\n channel_id\n pinned\n pinnedAt\n user_id {\n id\n name\n profile\n }\n expiredAt\n createdAt\n";
18
- var getPinQuery = "query pin (\n $projectId: String!,\n $channelId: String!,\n $id: String!\n ) {\n pin (\n projectId: $projectId,\n channelId: $channelId,\n id:$id\n ) {\n ".concat(pinFields, "\n }\n }\n ");
19
- exports.getPinQuery = getPinQuery;
20
- var getPinsQuery = "query pins (\n $projectId: String!,\n $channelId: String!,\n $filter: String!,\n $option: String,\n $sort: String\n ) { \n pins (\n projectId: $projectId,\n channelId: $channelId,\n filter: $filter,\n option:$option,\n sort:$sort\n ) {\n totalCount \n edges { \n node { \n ".concat(pinFields, "\n } \n } \n } \n }");
21
- exports.getPinsQuery = getPinsQuery;
22
- var createPinQuery = "mutation (\n $projectId: String!, \n $channelId: String!, \n $pinned: Boolean!, \n $pinnedAt: String, \n $expiredAt: String\n ) { \n createPin(\n input: {\n projectId: $projectId, \n channelId: $channelId, \n pinned: $pinned, \n pinnedAt: $pinnedAt, \n expiredAt: $expiredAt \n }\n ) { \n pin { \n ".concat(pinFields, "\n } \n } \n }");
23
- exports.createPinQuery = createPinQuery;
24
- var updatePinQuery = "mutation updatePin(\n $id: ID!, \n $projectId: String!, \n $channelId: String!, \n $pinned: Boolean!, \n $pinnedAt: String, \n $expiredAt: String\n ) { \n updatePin(\n input: {\n id: $id, \n projectId: $projectId, \n channelId: $channelId, \n pinned: $pinned, \n pinnedAt: $pinnedAt, \n expiredAt: $expiredAt \n }) { \n pin { \n ".concat(pinFields, "\n } \n } \n }");
25
- exports.updatePinQuery = updatePinQuery;
@@ -1,7 +0,0 @@
1
- "use strict";
2
- /**
3
- * Copyright (c) NBASE CORP. and its affiliates.
4
- *
5
- * This source code is licensed under the MIT license found in the
6
- * LICENSE file in the root directory of this source tree.
7
- */