@messenger-box/platform-server 0.0.1-alpha.0
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 +21 -0
- package/README.md +9 -0
- package/lib/constants/index.d.ts +2 -0
- package/lib/constants/query.constants.d.ts +7 -0
- package/lib/constants/types.d.ts +6 -0
- package/lib/graphql/index.d.ts +1 -0
- package/lib/graphql/schema/index.d.ts +2 -0
- package/lib/index.d.ts +4 -0
- package/lib/index.js +335 -0
- package/lib/index.js.map +1 -0
- package/lib/module.d.ts +3 -0
- package/package.json +51 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
The MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2017 CDMBase LLC.
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
|
13
|
+
all copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
21
|
+
THE SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './schema';
|
package/lib/index.d.ts
ADDED
package/lib/index.js
ADDED
|
@@ -0,0 +1,335 @@
|
|
|
1
|
+
module.exports =
|
|
2
|
+
/******/ (function(modules) { // webpackBootstrap
|
|
3
|
+
/******/ // The module cache
|
|
4
|
+
/******/ var installedModules = {};
|
|
5
|
+
/******/
|
|
6
|
+
/******/ // The require function
|
|
7
|
+
/******/ function __webpack_require__(moduleId) {
|
|
8
|
+
/******/
|
|
9
|
+
/******/ // Check if module is in cache
|
|
10
|
+
/******/ if(installedModules[moduleId]) {
|
|
11
|
+
/******/ return installedModules[moduleId].exports;
|
|
12
|
+
/******/ }
|
|
13
|
+
/******/ // Create a new module (and put it into the cache)
|
|
14
|
+
/******/ var module = installedModules[moduleId] = {
|
|
15
|
+
/******/ i: moduleId,
|
|
16
|
+
/******/ l: false,
|
|
17
|
+
/******/ exports: {}
|
|
18
|
+
/******/ };
|
|
19
|
+
/******/
|
|
20
|
+
/******/ // Execute the module function
|
|
21
|
+
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
|
22
|
+
/******/
|
|
23
|
+
/******/ // Flag the module as loaded
|
|
24
|
+
/******/ module.l = true;
|
|
25
|
+
/******/
|
|
26
|
+
/******/ // Return the exports of the module
|
|
27
|
+
/******/ return module.exports;
|
|
28
|
+
/******/ }
|
|
29
|
+
/******/
|
|
30
|
+
/******/
|
|
31
|
+
/******/ // expose the modules object (__webpack_modules__)
|
|
32
|
+
/******/ __webpack_require__.m = modules;
|
|
33
|
+
/******/
|
|
34
|
+
/******/ // expose the module cache
|
|
35
|
+
/******/ __webpack_require__.c = installedModules;
|
|
36
|
+
/******/
|
|
37
|
+
/******/ // define getter function for harmony exports
|
|
38
|
+
/******/ __webpack_require__.d = function(exports, name, getter) {
|
|
39
|
+
/******/ if(!__webpack_require__.o(exports, name)) {
|
|
40
|
+
/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
|
|
41
|
+
/******/ }
|
|
42
|
+
/******/ };
|
|
43
|
+
/******/
|
|
44
|
+
/******/ // define __esModule on exports
|
|
45
|
+
/******/ __webpack_require__.r = function(exports) {
|
|
46
|
+
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
|
47
|
+
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
48
|
+
/******/ }
|
|
49
|
+
/******/ Object.defineProperty(exports, '__esModule', { value: true });
|
|
50
|
+
/******/ };
|
|
51
|
+
/******/
|
|
52
|
+
/******/ // create a fake namespace object
|
|
53
|
+
/******/ // mode & 1: value is a module id, require it
|
|
54
|
+
/******/ // mode & 2: merge all properties of value into the ns
|
|
55
|
+
/******/ // mode & 4: return value when already ns object
|
|
56
|
+
/******/ // mode & 8|1: behave like require
|
|
57
|
+
/******/ __webpack_require__.t = function(value, mode) {
|
|
58
|
+
/******/ if(mode & 1) value = __webpack_require__(value);
|
|
59
|
+
/******/ if(mode & 8) return value;
|
|
60
|
+
/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
|
|
61
|
+
/******/ var ns = Object.create(null);
|
|
62
|
+
/******/ __webpack_require__.r(ns);
|
|
63
|
+
/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
|
|
64
|
+
/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
|
|
65
|
+
/******/ return ns;
|
|
66
|
+
/******/ };
|
|
67
|
+
/******/
|
|
68
|
+
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
|
69
|
+
/******/ __webpack_require__.n = function(module) {
|
|
70
|
+
/******/ var getter = module && module.__esModule ?
|
|
71
|
+
/******/ function getDefault() { return module['default']; } :
|
|
72
|
+
/******/ function getModuleExports() { return module; };
|
|
73
|
+
/******/ __webpack_require__.d(getter, 'a', getter);
|
|
74
|
+
/******/ return getter;
|
|
75
|
+
/******/ };
|
|
76
|
+
/******/
|
|
77
|
+
/******/ // Object.prototype.hasOwnProperty.call
|
|
78
|
+
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
|
|
79
|
+
/******/
|
|
80
|
+
/******/ // __webpack_public_path__
|
|
81
|
+
/******/ __webpack_require__.p = "";
|
|
82
|
+
/******/
|
|
83
|
+
/******/
|
|
84
|
+
/******/ // Load entry module and return exports
|
|
85
|
+
/******/ return __webpack_require__(__webpack_require__.s = "./src/index.ts");
|
|
86
|
+
/******/ })
|
|
87
|
+
/************************************************************************/
|
|
88
|
+
/******/ ({
|
|
89
|
+
|
|
90
|
+
/***/ "./src/constants/index.ts":
|
|
91
|
+
/*!********************************!*\
|
|
92
|
+
!*** ./src/constants/index.ts ***!
|
|
93
|
+
\********************************/
|
|
94
|
+
/*! no static exports found */
|
|
95
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
96
|
+
|
|
97
|
+
"use strict";
|
|
98
|
+
|
|
99
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
100
|
+
if (k2 === undefined) k2 = k;
|
|
101
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
102
|
+
}) : (function(o, m, k, k2) {
|
|
103
|
+
if (k2 === undefined) k2 = k;
|
|
104
|
+
o[k2] = m[k];
|
|
105
|
+
}));
|
|
106
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
107
|
+
for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) __createBinding(exports, m, p);
|
|
108
|
+
};
|
|
109
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
110
|
+
__exportStar(__webpack_require__(/*! ./types */ "./src/constants/types.ts"), exports);
|
|
111
|
+
__exportStar(__webpack_require__(/*! ./query.constants */ "./src/constants/query.constants.ts"), exports);
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
/***/ }),
|
|
115
|
+
|
|
116
|
+
/***/ "./src/constants/query.constants.ts":
|
|
117
|
+
/*!******************************************!*\
|
|
118
|
+
!*** ./src/constants/query.constants.ts ***!
|
|
119
|
+
\******************************************/
|
|
120
|
+
/*! no static exports found */
|
|
121
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
122
|
+
|
|
123
|
+
"use strict";
|
|
124
|
+
|
|
125
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
126
|
+
exports.DEFAULT_SORTING = exports.PAGINATION_OPTIONS = void 0;
|
|
127
|
+
var PAGINATION_OPTIONS;
|
|
128
|
+
(function (PAGINATION_OPTIONS) {
|
|
129
|
+
PAGINATION_OPTIONS[PAGINATION_OPTIONS["limit"] = 10] = "limit";
|
|
130
|
+
PAGINATION_OPTIONS[PAGINATION_OPTIONS["skip"] = 0] = "skip";
|
|
131
|
+
})(PAGINATION_OPTIONS = exports.PAGINATION_OPTIONS || (exports.PAGINATION_OPTIONS = {}));
|
|
132
|
+
exports.DEFAULT_SORTING = {
|
|
133
|
+
id: 'asc',
|
|
134
|
+
};
|
|
135
|
+
|
|
136
|
+
|
|
137
|
+
/***/ }),
|
|
138
|
+
|
|
139
|
+
/***/ "./src/constants/types.ts":
|
|
140
|
+
/*!********************************!*\
|
|
141
|
+
!*** ./src/constants/types.ts ***!
|
|
142
|
+
\********************************/
|
|
143
|
+
/*! no static exports found */
|
|
144
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
145
|
+
|
|
146
|
+
"use strict";
|
|
147
|
+
|
|
148
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
149
|
+
exports.TYPES = void 0;
|
|
150
|
+
exports.TYPES = {
|
|
151
|
+
BaseRepository: Symbol('BaseRepository'),
|
|
152
|
+
ChannelRepository: Symbol('ChannelRepository'),
|
|
153
|
+
PostRepository: Symbol('PostRepository'),
|
|
154
|
+
PostThreadRepository: Symbol('PostThreadRepository'),
|
|
155
|
+
};
|
|
156
|
+
|
|
157
|
+
|
|
158
|
+
/***/ }),
|
|
159
|
+
|
|
160
|
+
/***/ "./src/graphql/index.ts":
|
|
161
|
+
/*!******************************!*\
|
|
162
|
+
!*** ./src/graphql/index.ts ***!
|
|
163
|
+
\******************************/
|
|
164
|
+
/*! no static exports found */
|
|
165
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
166
|
+
|
|
167
|
+
"use strict";
|
|
168
|
+
|
|
169
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
170
|
+
if (k2 === undefined) k2 = k;
|
|
171
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
172
|
+
}) : (function(o, m, k, k2) {
|
|
173
|
+
if (k2 === undefined) k2 = k;
|
|
174
|
+
o[k2] = m[k];
|
|
175
|
+
}));
|
|
176
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
177
|
+
for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) __createBinding(exports, m, p);
|
|
178
|
+
};
|
|
179
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
180
|
+
__exportStar(__webpack_require__(/*! ./schema */ "./src/graphql/schema/index.ts"), exports);
|
|
181
|
+
|
|
182
|
+
|
|
183
|
+
/***/ }),
|
|
184
|
+
|
|
185
|
+
/***/ "./src/graphql/schema/base.graphql":
|
|
186
|
+
/*!*****************************************!*\
|
|
187
|
+
!*** ./src/graphql/schema/base.graphql ***!
|
|
188
|
+
\*****************************************/
|
|
189
|
+
/*! exports provided: default */
|
|
190
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
191
|
+
|
|
192
|
+
"use strict";
|
|
193
|
+
__webpack_require__.r(__webpack_exports__);
|
|
194
|
+
/* harmony default export */ __webpack_exports__["default"] = ("interface IBaseRepo {\n createdAt: DateTime\n updatedAt: DateTime\n deletedAt: DateTime\n}\n\ninput Sort{\n key: String!,\n value: SortEnum!,\n}\n\nenum SortEnum{\n ASC,\n DESC\n}");
|
|
195
|
+
|
|
196
|
+
/***/ }),
|
|
197
|
+
|
|
198
|
+
/***/ "./src/graphql/schema/channel.graphql":
|
|
199
|
+
/*!********************************************!*\
|
|
200
|
+
!*** ./src/graphql/schema/channel.graphql ***!
|
|
201
|
+
\********************************************/
|
|
202
|
+
/*! exports provided: default */
|
|
203
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
204
|
+
|
|
205
|
+
"use strict";
|
|
206
|
+
__webpack_require__.r(__webpack_exports__);
|
|
207
|
+
/* harmony default export */ __webpack_exports__["default"] = ("\n\n\ntype Channel implements IBaseRepo {\n id: String!\n title: String\n topic: String\n purpose: String\n team: AccountTeam\n lastPostAt: DateTime\n totalMsgCount: Int\n creator: UserAccount\n\n createdAt: DateTime\n updatedAt: DateTime\n deletedAt: DateTime\n}\n\ninput ChannelFilterInput {\n nameFilter: String\n privacy: ChannelPrivacy\n joinedChannels: Boolean\n storyBy: ChannelSort\n}\n\ninput ChannelNameAndDirect {\n name: String!\n direct: Boolean!\n}\n\nenum ChannelSort {\n NAME\n NUMBER_OF_MESSAGES\n}\n\nenum ChannelPrivacy {\n PRIVATE\n PUBLIC \n ALL\n}\n\nenum RoomType {\n CHANNEL\n DIRECT\n GROUP\n VISITOR\n}\n\nextend type Query {\n channelByName(name: String!): Channel\n\n channels(filter: ChannelFilterInput = {\n privacy: ALL,\n joinedChannels: false,\n sortyBy: NAME\n }): [Channel]\n channelsByUser(userId: String!): [Channel]\n\n directChannel(username: String, channelId: String): Channel\n}\n\nextend type Mutation {\n createChannel(\n name: String!,\n teamId: String\n ): Channel\n\n hideChannel(channelId: String!): Boolean\n\n leaveChannel(channelId: String!): Boolean\n}");
|
|
208
|
+
|
|
209
|
+
/***/ }),
|
|
210
|
+
|
|
211
|
+
/***/ "./src/graphql/schema/index.ts":
|
|
212
|
+
/*!*************************************!*\
|
|
213
|
+
!*** ./src/graphql/schema/index.ts ***!
|
|
214
|
+
\*************************************/
|
|
215
|
+
/*! no static exports found */
|
|
216
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
217
|
+
|
|
218
|
+
"use strict";
|
|
219
|
+
|
|
220
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
221
|
+
exports.schema = void 0;
|
|
222
|
+
const base_graphql_1 = __webpack_require__(/*! ./base.graphql */ "./src/graphql/schema/base.graphql");
|
|
223
|
+
const channel_graphql_1 = __webpack_require__(/*! ./channel.graphql */ "./src/graphql/schema/channel.graphql");
|
|
224
|
+
const post_graphql_1 = __webpack_require__(/*! ./post.graphql */ "./src/graphql/schema/post.graphql");
|
|
225
|
+
const preferences_graphql_1 = __webpack_require__(/*! ./preferences.graphql */ "./src/graphql/schema/preferences.graphql");
|
|
226
|
+
const users_graphql_1 = __webpack_require__(/*! ./users.graphql */ "./src/graphql/schema/users.graphql");
|
|
227
|
+
const schema = [base_graphql_1.default, channel_graphql_1.default, post_graphql_1.default, preferences_graphql_1.default, users_graphql_1.default].join('\n');
|
|
228
|
+
exports.schema = schema;
|
|
229
|
+
|
|
230
|
+
|
|
231
|
+
/***/ }),
|
|
232
|
+
|
|
233
|
+
/***/ "./src/graphql/schema/post.graphql":
|
|
234
|
+
/*!*****************************************!*\
|
|
235
|
+
!*** ./src/graphql/schema/post.graphql ***!
|
|
236
|
+
\*****************************************/
|
|
237
|
+
/*! exports provided: default */
|
|
238
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
239
|
+
|
|
240
|
+
"use strict";
|
|
241
|
+
__webpack_require__.r(__webpack_exports__);
|
|
242
|
+
/* harmony default export */ __webpack_exports__["default"] = ("\ntype Post implements IBaseRepo {\n id: String\n author: UserAccount\n channel: Channel\n\n rootId: String\n parentId: String\n originalId: String\n\n \"\"\" Post sent by server e.g. User joined channel \"\"\"\n fromServer: Boolean\n\n message: String \n type: String\n props: AnyObject\n hashTags: String\n\n filenames: [String]\n fields: [String]\n reactions: [Reaction]\n \n editedBy: UserAccount\n createdAt: DateTime\n updatedAt: DateTime\n deletedAt: DateTime\n}\n\ninput MessageInput {\n content: String!\n userRef: [String] #userId\n channelRef: [String] #channelId\n}\n\ninput MessageIdentifier {\n channelId: String!\n messageId: String!\n}\n\ntype PostsWithCursor {\n cursor: String\n channel: Channel\n posts: [Post]\n}\n\ntype Reaction {\n username: String\n icon: String\n}\n\nextend type Query {\n posts(\n channelId: String, \n channelName: String,\n directTo: String,\n cursor: String,\n count: Int,\n searchRegex: String,\n excludeServer: Boolean\n ): PostsWithCursor\n}\n\nextend type Mutation {\n addReacitonToMassage(messageId: MessageIdentifier!, icon: String!): Post\n\n deleteMessage(messageId: MessageIdentifier!): Boolean\n\n editMessage(messageId: MessageIdentifier!, messageInput: MessageInput!): Post\n\n sendMessage(channelId: String!, messageInput: MessageInput!): Post\n}\n\nextend type Subscription {\n chatMessageAdded(channelId: String, directTo: String): Post\n}");
|
|
243
|
+
|
|
244
|
+
/***/ }),
|
|
245
|
+
|
|
246
|
+
/***/ "./src/graphql/schema/preferences.graphql":
|
|
247
|
+
/*!************************************************!*\
|
|
248
|
+
!*** ./src/graphql/schema/preferences.graphql ***!
|
|
249
|
+
\************************************************/
|
|
250
|
+
/*! exports provided: default */
|
|
251
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
252
|
+
|
|
253
|
+
"use strict";
|
|
254
|
+
__webpack_require__.r(__webpack_exports__);
|
|
255
|
+
/* harmony default export */ __webpack_exports__["default"] = ("\n\ntype ChannelSettings {\n disableNotification: Boolean\n audio: String\n desktop: String\n duration: Int\n mobile: String\n mail: String\n hideUnreadRoomStatus : Boolean\n unreadTrayIconAlret: String\n}\n\nextend type Preference_Account {\n language: String\n notificationDuration: Float\n unreadTrayIconAlert: Boolean\n useEmojis: Boolean\n convertAsciiToEmoji: Boolean\n autoLoadImages: Boolean\n saveMobileBandwith: Boolean\n collapseEmbeddedMeida: Boolean\n unreadRoomsMode: Boolean\n hideUserName: Boolean\n hideRoles: Boolean\n hideRightSideBarWithClick: Boolean\n hideAvatars: Boolean\n mergePrivateGroupsWithChannels: Boolean\n enterKeyBehaviour: String\n viewMode: String\n offlineEmailNotifications: String\n highlights: String\n newRoomNotificationSound: String\n newMessageNotificationSound: String\n email: String\n avatar: String\n name: String\n}\n\nextend type Preferences {\n channel: ChannelSettings\n}\n");
|
|
256
|
+
|
|
257
|
+
/***/ }),
|
|
258
|
+
|
|
259
|
+
/***/ "./src/graphql/schema/users.graphql":
|
|
260
|
+
/*!******************************************!*\
|
|
261
|
+
!*** ./src/graphql/schema/users.graphql ***!
|
|
262
|
+
\******************************************/
|
|
263
|
+
/*! exports provided: default */
|
|
264
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
265
|
+
|
|
266
|
+
"use strict";
|
|
267
|
+
__webpack_require__.r(__webpack_exports__);
|
|
268
|
+
/* harmony default export */ __webpack_exports__["default"] = ("\nenum MessengerUserStatus {\n ONLINE\n AWAY\n BUSY\n INVISIBLE\n}\n\ntype MessengerUser implements IUser {\n id: ID!\n username: String\n email: String\n status: MessengerUserStatus\n avatar: String\n name: String\n lastLogin: String\n channels: [Channel]\n directMessages: [Channel]\n}");
|
|
269
|
+
|
|
270
|
+
/***/ }),
|
|
271
|
+
|
|
272
|
+
/***/ "./src/index.ts":
|
|
273
|
+
/*!**********************!*\
|
|
274
|
+
!*** ./src/index.ts ***!
|
|
275
|
+
\**********************/
|
|
276
|
+
/*! no static exports found */
|
|
277
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
278
|
+
|
|
279
|
+
"use strict";
|
|
280
|
+
|
|
281
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
282
|
+
if (k2 === undefined) k2 = k;
|
|
283
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
284
|
+
}) : (function(o, m, k, k2) {
|
|
285
|
+
if (k2 === undefined) k2 = k;
|
|
286
|
+
o[k2] = m[k];
|
|
287
|
+
}));
|
|
288
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
289
|
+
for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) __createBinding(exports, m, p);
|
|
290
|
+
};
|
|
291
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
292
|
+
/* eslint-disable import/no-extraneous-dependencies */
|
|
293
|
+
const server_core_1 = __webpack_require__(/*! @common-stack/server-core */ "@common-stack/server-core");
|
|
294
|
+
const module_1 = __webpack_require__(/*! ./module */ "./src/module.ts");
|
|
295
|
+
__exportStar(__webpack_require__(/*! ./constants */ "./src/constants/index.ts"), exports);
|
|
296
|
+
exports.default = new server_core_1.Feature(module_1.default);
|
|
297
|
+
|
|
298
|
+
|
|
299
|
+
/***/ }),
|
|
300
|
+
|
|
301
|
+
/***/ "./src/module.ts":
|
|
302
|
+
/*!***********************!*\
|
|
303
|
+
!*** ./src/module.ts ***!
|
|
304
|
+
\***********************/
|
|
305
|
+
/*! no static exports found */
|
|
306
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
307
|
+
|
|
308
|
+
"use strict";
|
|
309
|
+
|
|
310
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
311
|
+
/* eslint-disable import/no-extraneous-dependencies */
|
|
312
|
+
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
313
|
+
const server_core_1 = __webpack_require__(/*! @common-stack/server-core */ "@common-stack/server-core");
|
|
314
|
+
const graphql_1 = __webpack_require__(/*! ./graphql */ "./src/graphql/index.ts");
|
|
315
|
+
exports.default = new server_core_1.Feature({
|
|
316
|
+
schema: graphql_1.schema,
|
|
317
|
+
addBrokerMainServiceClass: [],
|
|
318
|
+
});
|
|
319
|
+
|
|
320
|
+
|
|
321
|
+
/***/ }),
|
|
322
|
+
|
|
323
|
+
/***/ "@common-stack/server-core":
|
|
324
|
+
/*!********************************************!*\
|
|
325
|
+
!*** external "@common-stack/server-core" ***!
|
|
326
|
+
\********************************************/
|
|
327
|
+
/*! no static exports found */
|
|
328
|
+
/***/ (function(module, exports) {
|
|
329
|
+
|
|
330
|
+
module.exports = require("@common-stack/server-core");
|
|
331
|
+
|
|
332
|
+
/***/ })
|
|
333
|
+
|
|
334
|
+
/******/ });
|
|
335
|
+
//# sourceMappingURL=index.js.map
|
package/lib/index.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./src/constants/index.ts","webpack:///./src/constants/query.constants.ts","webpack:///./src/constants/types.ts","webpack:///./src/graphql/index.ts","webpack:///./src/graphql/schema/base.graphql","webpack:///./src/graphql/schema/channel.graphql","webpack:///./src/graphql/schema/index.ts","webpack:///./src/graphql/schema/post.graphql","webpack:///./src/graphql/schema/preferences.graphql","webpack:///./src/graphql/schema/users.graphql","webpack:///./src/index.ts","webpack:///./src/module.ts","webpack:///external \"@common-stack/server-core\""],"names":[],"mappings":";;QAAA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;;;QAGA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA,0CAA0C,gCAAgC;QAC1E;QACA;;QAEA;QACA;QACA;QACA,wDAAwD,kBAAkB;QAC1E;QACA,iDAAiD,cAAc;QAC/D;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA,yCAAyC,iCAAiC;QAC1E,gHAAgH,mBAAmB,EAAE;QACrI;QACA;;QAEA;QACA;QACA;QACA,2BAA2B,0BAA0B,EAAE;QACvD,iCAAiC,eAAe;QAChD;QACA;QACA;;QAEA;QACA,sDAAsD,+DAA+D;;QAErH;QACA;;;QAGA;QACA;;;;;;;;;;;;;;;;;;;;;;;;;AClFA,sFAAwB;AACxB,0GAAkC;;;;;;;;;;;;;;;;ACDlC,IAAY,kBAGX;AAHD,WAAY,kBAAkB;IAC1B,8DAAU;IACV,2DAAQ;AACZ,CAAC,EAHW,kBAAkB,GAAlB,0BAAkB,KAAlB,0BAAkB,QAG7B;AAEY,uBAAe,GAAG;IAC3B,EAAE,EAAE,KAAK;CACZ,CAAC;;;;;;;;;;;;;;;;ACPW,aAAK,GAAG;IACjB,cAAc,EAAE,MAAM,CAAC,gBAAgB,CAAC;IAExC,iBAAiB,EAAE,MAAM,CAAC,mBAAmB,CAAC;IAC9C,cAAc,EAAE,MAAM,CAAC,gBAAgB,CAAC;IACxC,oBAAoB,EAAE,MAAM,CAAC,sBAAsB,CAAC;CACvD,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;ACNF,4FAAyB;;;;;;;;;;;;;ACAzB;AAAe,qFAAsB,8EAA8E,eAAe,6CAA6C,kBAAkB,uBAAuB,CAAC,E;;;;;;;;;;;;ACAzN;AAAe,yGAA0C,+PAA+P,8BAA8B,+GAA+G,gCAAgC,4CAA4C,sBAAsB,qCAAqC,yBAAyB,sCAAsC,mBAAmB,oDAAoD,uBAAuB,0FAA0F,qFAAqF,kIAAkI,0BAA0B,wLAAwL,CAAC,E;;;;;;;;;;;;;;;ACA7uC,sGAAwC;AACxC,+GAA8C;AAC9C,sGAAwC;AACxC,2HAAsD;AACtD,yGAA0C;AAE1C,MAAM,MAAM,GAAG,CAAC,sBAAU,EAAE,yBAAa,EAAE,sBAAU,EAAE,6BAAiB,EAAE,uBAAW,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAEzF,wBAAM;;;;;;;;;;;;;ACRf;AAAe,kGAAmC,+eAA+e,wBAAwB,6FAA6F,6BAA6B,mDAAmD,0BAA0B,gEAAgE,mBAAmB,2CAA2C,uBAAuB,yOAAyO,0BAA0B,6SAA6S,8BAA8B,oEAAoE,CAAC,E;;;;;;;;;;;;ACAxiD;AAAe,0FAA2B,2MAA2M,oCAAoC,orBAAorB,6BAA6B,+BAA+B,GAAG,E;;;;;;;;;;;;ACA5gC;AAAe,4FAA6B,kDAAkD,yCAAyC,+MAA+M,CAAC,E;;;;;;;;;;;;;;;;;;;;;;;;ACAvV,sDAAsD;AACtD,wGAAoD;AACpD,wEAAuC;AAEvC,0FAA4B;AAC5B,kBAAe,IAAI,qBAAO,CAAC,gBAAe,CAAC,CAAC;;;;;;;;;;;;;;;ACL5C,sDAAsD;AACtD,sDAAsD;AACtD,wGAAoD;AAEpD,iFAAmC;AAEnC,kBAAe,IAAI,qBAAO,CAAC;IACvB,MAAM,EAAN,gBAAM;IACN,yBAAyB,EAAE,EAAE;CAChC,CAAC,CAAC;;;;;;;;;;;;ACTH,sD","file":"index.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = \"./src/index.ts\");\n","export * from './types';\nexport * from './query.constants';\n","export enum PAGINATION_OPTIONS {\n limit = 10,\n skip = 0,\n}\n\nexport const DEFAULT_SORTING = {\n id: 'asc',\n};\n","export const TYPES = {\n BaseRepository: Symbol('BaseRepository'),\n\n ChannelRepository: Symbol('ChannelRepository'),\n PostRepository: Symbol('PostRepository'),\n PostThreadRepository: Symbol('PostThreadRepository'),\n};\n","export * from './schema';\n","export default \"interface IBaseRepo {\\n createdAt: DateTime\\n updatedAt: DateTime\\n deletedAt: DateTime\\n}\\n\\ninput Sort{\\n key: String!,\\n value: SortEnum!,\\n}\\n\\nenum SortEnum{\\n ASC,\\n DESC\\n}\";","export default \"\\n\\n\\ntype Channel implements IBaseRepo {\\n id: String!\\n title: String\\n topic: String\\n purpose: String\\n team: AccountTeam\\n lastPostAt: DateTime\\n totalMsgCount: Int\\n creator: UserAccount\\n\\n createdAt: DateTime\\n updatedAt: DateTime\\n deletedAt: DateTime\\n}\\n\\ninput ChannelFilterInput {\\n nameFilter: String\\n privacy: ChannelPrivacy\\n joinedChannels: Boolean\\n storyBy: ChannelSort\\n}\\n\\ninput ChannelNameAndDirect {\\n name: String!\\n direct: Boolean!\\n}\\n\\nenum ChannelSort {\\n NAME\\n NUMBER_OF_MESSAGES\\n}\\n\\nenum ChannelPrivacy {\\n PRIVATE\\n PUBLIC \\n ALL\\n}\\n\\nenum RoomType {\\n CHANNEL\\n DIRECT\\n GROUP\\n VISITOR\\n}\\n\\nextend type Query {\\n channelByName(name: String!): Channel\\n\\n channels(filter: ChannelFilterInput = {\\n privacy: ALL,\\n joinedChannels: false,\\n sortyBy: NAME\\n }): [Channel]\\n channelsByUser(userId: String!): [Channel]\\n\\n directChannel(username: String, channelId: String): Channel\\n}\\n\\nextend type Mutation {\\n createChannel(\\n name: String!,\\n teamId: String\\n ): Channel\\n\\n hideChannel(channelId: String!): Boolean\\n\\n leaveChannel(channelId: String!): Boolean\\n}\";","import baseSchema from './base.graphql';\nimport channelSchema from './channel.graphql';\nimport postSchema from './post.graphql';\nimport preferencesSchema from './preferences.graphql';\nimport usersSchema from './users.graphql';\n\nconst schema = [baseSchema, channelSchema, postSchema, preferencesSchema, usersSchema].join('\\n');\n\nexport { schema };\n","export default \"\\ntype Post implements IBaseRepo {\\n id: String\\n author: UserAccount\\n channel: Channel\\n\\n rootId: String\\n parentId: String\\n originalId: String\\n\\n \\\"\\\"\\\" Post sent by server e.g. User joined channel \\\"\\\"\\\"\\n fromServer: Boolean\\n\\n message: String \\n type: String\\n props: AnyObject\\n hashTags: String\\n\\n filenames: [String]\\n fields: [String]\\n reactions: [Reaction]\\n \\n editedBy: UserAccount\\n createdAt: DateTime\\n updatedAt: DateTime\\n deletedAt: DateTime\\n}\\n\\ninput MessageInput {\\n content: String!\\n userRef: [String] #userId\\n channelRef: [String] #channelId\\n}\\n\\ninput MessageIdentifier {\\n channelId: String!\\n messageId: String!\\n}\\n\\ntype PostsWithCursor {\\n cursor: String\\n channel: Channel\\n posts: [Post]\\n}\\n\\ntype Reaction {\\n username: String\\n icon: String\\n}\\n\\nextend type Query {\\n posts(\\n channelId: String, \\n channelName: String,\\n directTo: String,\\n cursor: String,\\n count: Int,\\n searchRegex: String,\\n excludeServer: Boolean\\n ): PostsWithCursor\\n}\\n\\nextend type Mutation {\\n addReacitonToMassage(messageId: MessageIdentifier!, icon: String!): Post\\n\\n deleteMessage(messageId: MessageIdentifier!): Boolean\\n\\n editMessage(messageId: MessageIdentifier!, messageInput: MessageInput!): Post\\n\\n sendMessage(channelId: String!, messageInput: MessageInput!): Post\\n}\\n\\nextend type Subscription {\\n chatMessageAdded(channelId: String, directTo: String): Post\\n}\";","export default \"\\n\\ntype ChannelSettings {\\n disableNotification: Boolean\\n audio: String\\n desktop: String\\n duration: Int\\n mobile: String\\n mail: String\\n hideUnreadRoomStatus : Boolean\\n unreadTrayIconAlret: String\\n}\\n\\nextend type Preference_Account {\\n language: String\\n notificationDuration: Float\\n unreadTrayIconAlert: Boolean\\n useEmojis: Boolean\\n convertAsciiToEmoji: Boolean\\n autoLoadImages: Boolean\\n saveMobileBandwith: Boolean\\n collapseEmbeddedMeida: Boolean\\n unreadRoomsMode: Boolean\\n hideUserName: Boolean\\n hideRoles: Boolean\\n hideRightSideBarWithClick: Boolean\\n hideAvatars: Boolean\\n mergePrivateGroupsWithChannels: Boolean\\n enterKeyBehaviour: String\\n viewMode: String\\n offlineEmailNotifications: String\\n highlights: String\\n newRoomNotificationSound: String\\n newMessageNotificationSound: String\\n email: String\\n avatar: String\\n name: String\\n}\\n\\nextend type Preferences {\\n channel: ChannelSettings\\n}\\n\";","export default \"\\nenum MessengerUserStatus {\\n ONLINE\\n AWAY\\n BUSY\\n INVISIBLE\\n}\\n\\ntype MessengerUser implements IUser {\\n id: ID!\\n username: String\\n email: String\\n status: MessengerUserStatus\\n avatar: String\\n name: String\\n lastLogin: String\\n channels: [Channel]\\n directMessages: [Channel]\\n}\";","/* eslint-disable import/no-extraneous-dependencies */\nimport { Feature } from '@common-stack/server-core';\nimport MessengerModule from './module';\n\nexport * from './constants';\nexport default new Feature(MessengerModule);\n","/* eslint-disable import/no-extraneous-dependencies */\n/* eslint-disable @typescript-eslint/no-unused-vars */\nimport { Feature } from '@common-stack/server-core';\nimport { interfaces } from 'inversify';\nimport { schema } from './graphql';\n\nexport default new Feature({\n schema,\n addBrokerMainServiceClass: [],\n});\n","module.exports = require(\"@common-stack/server-core\");"],"sourceRoot":""}
|
package/lib/module.d.ts
ADDED
package/package.json
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@messenger-box/platform-server",
|
|
3
|
+
"version": "0.0.1-alpha.0",
|
|
4
|
+
"description": "Sample core for higher packages to depend on",
|
|
5
|
+
"license": "ISC",
|
|
6
|
+
"author": "CDMBase LLC",
|
|
7
|
+
"main": "lib/index.js",
|
|
8
|
+
"typings": "lib/index.d.ts",
|
|
9
|
+
"scripts": {
|
|
10
|
+
"build": "yarn build:clean && yarn build:lib",
|
|
11
|
+
"build:clean": "rimraf lib",
|
|
12
|
+
"build:lib": "webpack",
|
|
13
|
+
"build:lib:watch": "yarn build:lib -- --watch",
|
|
14
|
+
"jest": "./node_modules/.bin/jest",
|
|
15
|
+
"prepublish": "yarn build",
|
|
16
|
+
"test": "jest",
|
|
17
|
+
"test:debug": "npm test -- --runInBand",
|
|
18
|
+
"test:watch": "npm test -- --watch",
|
|
19
|
+
"watch": "yarn build:lib:watch"
|
|
20
|
+
},
|
|
21
|
+
"jest": {
|
|
22
|
+
"moduleFileExtensions": [
|
|
23
|
+
"ts",
|
|
24
|
+
"tsx",
|
|
25
|
+
"js",
|
|
26
|
+
"json"
|
|
27
|
+
],
|
|
28
|
+
"modulePaths": [
|
|
29
|
+
"node_modules"
|
|
30
|
+
],
|
|
31
|
+
"roots": [
|
|
32
|
+
"src"
|
|
33
|
+
],
|
|
34
|
+
"testEnvironment": "node",
|
|
35
|
+
"testRegex": "/__tests__/.*test*\\.(ts|tsx|js)$",
|
|
36
|
+
"transform": {
|
|
37
|
+
"\\.(ts|tsx)$": "<rootDir>/../../node_modules/ts-jest/preprocessor.js"
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
"dependencies": {
|
|
41
|
+
"@messenger-box/core": "0.0.1-alpha.0",
|
|
42
|
+
"aws-sdk": "^2.978.0"
|
|
43
|
+
},
|
|
44
|
+
"publishConfig": {
|
|
45
|
+
"access": "public"
|
|
46
|
+
},
|
|
47
|
+
"typescript": {
|
|
48
|
+
"definition": "lib/index.d.ts"
|
|
49
|
+
},
|
|
50
|
+
"gitHead": "7a348d83c2a0ef424645aee3f64b9e4b9f7edd65"
|
|
51
|
+
}
|