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
@@ -0,0 +1 @@
1
+ {"version":3,"file":"member.js","sourceRoot":"","sources":["../../src/graphql/member.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,IAAM,YAAY,GACd,kPAiBC,CAAC;AAEN,MAAM,CAAC,IAAM,UAAU,GAAG,8bAkBpB,CAAC;AAEP,MAAM,CAAC,IAAM,sBAAsB,GAC/B,8aAec,YAAY,sCAGxB,CAAC;AAEP,MAAM,CAAC,IAAM,sBAAsB,GAC/B,kXAac,YAAY,wCAI7B,CAAC;AAEF,MAAM,CAAC,IAAM,eAAe,GAC5B,+dAqBC,CAAC;AAEF,MAAM,CAAC,IAAM,oBAAoB,GACjC,u4BAmCC,CAAC"}
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Copyright (c) NBASE CORP. and its affiliates.
3
+ *
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ */
7
+ export declare const 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";
8
+ export declare const getMessageQuery: string;
9
+ export declare const getMessagesQuery: string;
10
+ export declare const 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";
11
+ export declare const messageQuery: string;
@@ -0,0 +1,13 @@
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 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";
8
+ export 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";
9
+ export 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");
10
+ export 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");
11
+ export 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";
12
+ export 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");
13
+ //# sourceMappingURL=message.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"message.js","sourceRoot":"","sources":["../../src/graphql/message.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,IAAM,aAAa,GAAG,mbAgCrB,CAAC;AAEF,MAAM,CAAC,IAAM,cAAc,GAAG,qjBAwB7B,CAAC;AAEF,MAAM,CAAC,IAAM,eAAe,GAAG,iQAUjB,aAAa,0BAG1B,CAAC;AAEF,MAAM,CAAC,IAAM,gBAAgB,GAAG,sYAeV,aAAa,2DAKlC,CAAC;AAEF,MAAM,CAAC,IAAM,gBAAgB,GAAG,0SAc/B,CAAC;AAEF,MAAM,CAAC,IAAM,YAAY,GAAG,iVAaV,aAAa,wCAI9B,CAAC"}
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Copyright (c) NBASE CORP. and its affiliates.
3
+ *
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ */
7
+ export declare const getPinQuery: string;
8
+ export declare const getPinsQuery: string;
9
+ export declare const createPinQuery: string;
10
+ export declare const updatePinQuery: string;
@@ -0,0 +1,12 @@
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 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";
8
+ export 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 ");
9
+ export 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 }");
10
+ export 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 }");
11
+ export 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 }");
12
+ //# sourceMappingURL=pin.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pin.js","sourceRoot":"","sources":["../../src/graphql/pin.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,IAAM,SAAS,GAAG,qKAajB,CAAC;AAEF,MAAM,CAAC,IAAM,WAAW,GAAG,8RAUT,SAAS,qCAGtB,CAAC;AAEN,MAAM,CAAC,IAAM,YAAY,GAAG,kgBAiBF,SAAS,4EAIzB,CAAC;AAEX,MAAM,CAAC,IAAM,cAAc,GAAG,uiBAiBR,SAAS,oDAGrB,CAAC;AAEX,MAAM,CAAC,IAAM,cAAc,GAAG,imBAkBJ,SAAS,gEAGrB,CAAC"}
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Copyright (c) NBASE CORP. and its affiliates.
3
+ *
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ */
7
+ export declare const getProjectQuery = "query project($id: ID!) {\n project(id:$id) { \n ncp_project_id\n name\n }\n }\n";
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Copyright (c) NBASE CORP. and its affiliates.
3
+ *
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ */
7
+ export var getProjectQuery = "query project($id: ID!) {\n project(id:$id) { \n ncp_project_id\n name\n }\n }\n";
8
+ //# sourceMappingURL=project.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"project.js","sourceRoot":"","sources":["../../src/graphql/project.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,MAAM,CAAC,IAAM,eAAe,GAC5B,4HAMC,CAAC"}
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Copyright (c) NBASE CORP. and its affiliates.
3
+ *
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ */
7
+ export declare const createSubscriptionQuery: string;
8
+ export declare const deleteSubscriptionQuery: string;
9
+ export declare const updateSubscriptionQuery: string;
10
+ export declare const getSubscriptionQuery = "query subscription (\n $projectId: String!,\n $channelId: String!, \n $id: String!\n ) {\n subscription (\n projectId: $projectId, \n channelId: $channelId, \n id:$id\n ) {\n id\n user {\n name\n profile\n country\n }\n mark {\n user_id\n message_id\n sort_id\n }\n channel_id\n user_id\n online\n push\n created_at\n }\n }\n";
11
+ export declare const getSubscriptionsQuery = "query subscriptions (\n $projectId: String!, \n $option: String!, \n $filter: String!, \n $sort: String \n ) {\n subscriptions (\n projectId: $projectId, \n option:$option, \n filter:$filter, \n sort:$sort\n ) {\n totalCount\n edges {\n node {\n id\n user {\n name\n profile\n country\n }\n channel_id\n user_id\n online\n push\n created_at\n }\n }\n }\n }\n";
@@ -0,0 +1,13 @@
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 subscriptionFields = "id\n channel_id\n user_id\n language\n push\n mute\n online\n channel {\n name\n type\n image_url\n push\n disabled\n }\n mark {\n user_id\n message_id\n sort_id\n unread\n }\n uniquekey\n created_at\n updated_at\n";
8
+ export var createSubscriptionQuery = "mutation (\n $projectId: String!, \n $channelId: String!,\n $option: String,\n ) {\n createSubscription (\n input: {\n projectId: $projectId, \n channelId: $channelId,\n option: $option\n }\n ) {\n subscription {\n ".concat(subscriptionFields, "\n }\n }\n }\n");
9
+ export var deleteSubscriptionQuery = "mutation (\n $projectId: String!, \n $channelId: String!\n ) {\n deleteSubscription (\n input: {\n projectId: $projectId, \n channelId: $channelId\n }\n ) {\n subscription {\n ".concat(subscriptionFields, "\n }\n }\n }\n");
10
+ export var updateSubscriptionQuery = "mutation (\n $projectId: String!, \n $channelId: String!, \n $mark: MarkInput, \n $option: String!\n ) {\n updateSubscription(\n input: {\n projectId: \n $projectId, \n channelId: \n $channelId, \n mark: $mark, \n option: $option\n }\n ) {\n subscription {\n ".concat(subscriptionFields, "\n }\n }\n }\n");
11
+ export var getSubscriptionQuery = "query subscription (\n $projectId: String!,\n $channelId: String!, \n $id: String!\n ) {\n subscription (\n projectId: $projectId, \n channelId: $channelId, \n id:$id\n ) {\n id\n user {\n name\n profile\n country\n }\n mark {\n user_id\n message_id\n sort_id\n }\n channel_id\n user_id\n online\n push\n created_at\n }\n }\n";
12
+ export var getSubscriptionsQuery = "query subscriptions (\n $projectId: String!, \n $option: String!, \n $filter: String!, \n $sort: String \n ) {\n subscriptions (\n projectId: $projectId, \n option:$option, \n filter:$filter, \n sort:$sort\n ) {\n totalCount\n edges {\n node {\n id\n user {\n name\n profile\n country\n }\n channel_id\n user_id\n online\n push\n created_at\n }\n }\n }\n }\n";
13
+ //# sourceMappingURL=subscription.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"subscription.js","sourceRoot":"","sources":["../../src/graphql/subscription.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,IAAM,kBAAkB,GACpB,8TAuBH,CAAA;AAED,MAAM,CAAC,IAAM,uBAAuB,GAAG,oWAarB,kBAAkB,wCAInC,CAAC;AAEF,MAAM,CAAC,IAAM,uBAAuB,GAAG,uSAWrB,kBAAkB,wCAInC,CAAC;AAEF,MAAM,CAAC,IAAM,uBAAuB,GAAG,ocAiBrB,kBAAkB,wCAInC,CAAC;AAEF,MAAM,CAAC,IAAM,oBAAoB,GAAG,gmBA4BnC,CAAC;AAEF,MAAM,CAAC,IAAM,qBAAqB,GAAG,uuBA8BpC,CAAC"}
package/esm/index.d.ts CHANGED
@@ -1,2 +1,8 @@
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
  import Chat from './CloudChat';
2
8
  export { Chat };
package/esm/index.js CHANGED
@@ -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
  import Chat from './CloudChat';
2
8
  export { Chat };
3
9
  //# sourceMappingURL=index.js.map
package/esm/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA,OAAO,IAAI,MAAM,aAAa,CAAC;AAG/B,OAAO,EAAE,IAAI,EAAE,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,IAAI,MAAM,aAAa,CAAC;AAC/B,OAAO,EAAE,IAAI,EAAE,CAAC"}
package/esm/logger.d.ts CHANGED
@@ -1,4 +1,10 @@
1
- declare const debug: (value: string) => void;
2
- declare const error: (value: string) => void;
3
- declare const info: (value: string) => void;
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
+ declare const debug: (value: any) => void;
8
+ declare const error: (value: any) => void;
9
+ declare const info: (value: any) => void;
4
10
  export { debug, error, info };
package/esm/logger.js CHANGED
@@ -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 debug = function (value) {
2
8
  return console.log(value);
3
9
  };
package/esm/logger.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"logger.js","sourceRoot":"","sources":["../src/logger.ts"],"names":[],"mappings":"AAAA,IAAM,KAAK,GAAG,UAAS,KAAa;IAChC,OAAO,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;AAC9B,CAAC,CAAA;AACD,IAAM,KAAK,GAAG,UAAS,KAAa;IAChC,OAAO,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;AAChC,CAAC,CAAA;AACD,IAAM,IAAI,GAAG,UAAS,KAAa;IAC/B,OAAO,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;AAC9B,CAAC,CAAA;AACD,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,CAAA"}
1
+ {"version":3,"file":"logger.js","sourceRoot":"","sources":["../src/logger.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,IAAM,KAAK,GAAG,UAAS,KAAU;IAC7B,OAAO,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;AAC9B,CAAC,CAAA;AACD,IAAM,KAAK,GAAG,UAAS,KAAU;IAC7B,OAAO,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;AAChC,CAAC,CAAA;AACD,IAAM,IAAI,GAAG,UAAS,KAAU;IAC5B,OAAO,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;AAC9B,CAAC,CAAA;AACD,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,CAAA"}
@@ -1,6 +1,56 @@
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
  import type { ChannelInput } from "../Type";
8
+ /**
9
+ * Create a new channel.
10
+ *
11
+ * @async
12
+ * @function createChannel
13
+ * @param {ChannelInput} channel - Configuration options of the new channel.
14
+ * @returns {Promise<any>} The data of the newly created channel.
15
+ */
2
16
  export declare const createChannel: (channel: ChannelInput) => Promise<any>;
17
+ /**
18
+ * Update channel options.
19
+ *
20
+ * @async
21
+ * @function updateChannel
22
+ * @param {string} channelId - An id of the channel.
23
+ * @param {ChannelInput} channel - New options of the channel.
24
+ * @returns {Promise<any>} The data of the updated channel.
25
+ */
3
26
  export declare const updateChannel: (channelId: string, channel: ChannelInput) => Promise<any>;
27
+ /**
28
+ * Delete a channel.
29
+ *
30
+ * @async
31
+ * @function deleteChannel
32
+ * @param {string} channelId - An channel id.
33
+ * @returns {Promise<any>}
34
+ */
4
35
  export declare const deleteChannel: (channelId: string) => Promise<any>;
36
+ /**
37
+ * Add members to the private channel.
38
+ *
39
+ * @async
40
+ * @function addChannelMembers
41
+ * @param {string} channelId - An private channel id.
42
+ * @param {string[]} memberIds - An array of member ids to be added.
43
+ * @param {any} options
44
+ * @returns {Promise<any>}
45
+ */
5
46
  export declare const addChannelMembers: (channelId: string, memberIds: any, options: any) => Promise<any>;
47
+ /**
48
+ * Remove members from the private channel.
49
+ *
50
+ * @async
51
+ * @function removeChannelMembers
52
+ * @param {string} channelId - An private channel id.
53
+ * @param {string[]} memberIds - An array of the member ids to be deleted.
54
+ * @returns {Promise<any>}
55
+ */
6
56
  export declare const removeChannelMembers: (channelId: string, memberIds: any) => 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,225 +40,129 @@ 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';
38
- import { ObjectId } from "../Util";
43
+ import CoreManager from "../CoreManager";
44
+ import { addChannelMembersQuery, createChannelQuery, deleteChannelQuery, removeChannelMembersQuery, updateChannelQuery, } from "../graphql/channel";
45
+ import { fetchData } from "../Network";
46
+ /**
47
+ * Create a new channel.
48
+ *
49
+ * @async
50
+ * @function createChannel
51
+ * @param {ChannelInput} channel - Configuration options of the new channel.
52
+ * @returns {Promise<any>} The data of the newly created channel.
53
+ */
39
54
  export var createChannel = function (channel) { return __awaiter(void 0, void 0, void 0, function () {
40
- var token, projectId, endpoint, query;
41
55
  return __generator(this, function (_a) {
42
- switch (_a.label) {
43
- case 0:
44
- token = CoreManager.get("TOKEN");
45
- projectId = CoreManager.get("PROJECT_ID");
46
- endpoint = CoreManager.get('SERVER_URL') + '/graphql';
47
- if (!channel.members)
48
- channel.members = [];
49
- query = "\n 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 $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 linkUrl:$linkUrl,\n imageUrl:$imageUrl\n members: $members,\n }\n ) {\n channel {\n id\n project_id\n name\n user_id { \n id\n name\n profile\n device_type\n language\n }\n 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 }\n unique_id\n type\n translation\n members\n push\n link_url\n image_url \n created_at\n updated_at\n }\n }\n } \n ";
50
- return [4 /*yield*/, fetch(endpoint, {
51
- method: 'POST',
52
- headers: {
53
- 'Authorization': 'Bearer ' + token,
54
- 'X-PROJECT-ID': projectId,
55
- 'Content-Type': 'application/json',
56
- 'Accept': 'application/json'
57
- },
58
- body: JSON.stringify({
59
- query: query,
60
- variables: {
61
- projectId: projectId,
62
- name: channel.name,
63
- type: channel.type,
64
- uniqueId: channel.uniqueId,
65
- translation: channel.translation,
66
- push: channel.push,
67
- mutes: channel.mutes,
68
- linkUrl: channel.linkUrl,
69
- imageUrl: channel.imageUrl,
70
- disabled: channel.disabled,
71
- members: channel.members
72
- }
73
- })
74
- })
75
- .then(function (res) { return res.json(); })
76
- .then(function (data) {
77
- if (data.errors)
78
- throw data.errors[0];
79
- if (data.code)
80
- throw data;
81
- if (data.data.createChannel.channel)
82
- data.data.createChannel.channel.id = ObjectId(data.data.createChannel.channel.id);
83
- return data.data.createChannel.channel;
84
- })];
85
- case 1: return [2 /*return*/, _a.sent()];
86
- }
56
+ if (!channel.members)
57
+ channel.members = [];
58
+ return [2 /*return*/, fetchData("createChannel", createChannelQuery, {
59
+ projectId: CoreManager.get("PROJECT_ID"),
60
+ name: channel.name,
61
+ type: channel.type,
62
+ uniqueId: channel.uniqueId,
63
+ translation: channel.translation,
64
+ push: channel.push,
65
+ mutes: channel.mutes,
66
+ customField: channel.customField,
67
+ linkUrl: channel.linkUrl,
68
+ imageUrl: channel.imageUrl,
69
+ disabled: channel.disabled,
70
+ members: channel.members
71
+ })];
87
72
  });
88
73
  }); };
74
+ /**
75
+ * Update channel options.
76
+ *
77
+ * @async
78
+ * @function updateChannel
79
+ * @param {string} channelId - An id of the channel.
80
+ * @param {ChannelInput} channel - New options of the channel.
81
+ * @returns {Promise<any>} The data of the updated channel.
82
+ */
89
83
  export var updateChannel = function (channelId, channel) { return __awaiter(void 0, void 0, void 0, function () {
90
- var token, projectId, endpoint, query;
91
84
  return __generator(this, function (_a) {
92
85
  switch (_a.label) {
93
86
  case 0:
94
- token = CoreManager.get("TOKEN");
95
- projectId = CoreManager.get("PROJECT_ID");
96
- endpoint = CoreManager.get('SERVER_URL') + '/graphql';
97
87
  if (!channel.members)
98
88
  channel.members = [];
99
- query = "\n 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 $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 linkUrl:$linkUrl,\n imageUrl:$imageUrl\n }\n ) {\n channel {\n id\n project_id\n name\n user_id { \n id\n name\n profile\n device_type\n language\n }\n 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 }\n unique_id\n type\n translation\n members\n push\n link_url\n image_url \n created_at\n updated_at\n }\n }\n } \n ";
100
- return [4 /*yield*/, fetch(endpoint, {
101
- method: 'POST',
102
- headers: {
103
- 'Authorization': 'Bearer ' + token,
104
- 'X-PROJECT-ID': projectId,
105
- 'Content-Type': 'application/json',
106
- 'Accept': 'application/json'
107
- },
108
- body: JSON.stringify({
109
- query: query,
110
- variables: {
111
- projectId: projectId,
112
- id: channelId,
113
- name: channel.name,
114
- type: channel.type,
115
- uniqueId: channel.uniqueId,
116
- translation: channel.translation,
117
- push: channel.push,
118
- mutes: channel.mutes,
119
- linkUrl: channel.linkUrl,
120
- imageUrl: channel.imageUrl,
121
- disabled: channel.disabled,
122
- members: channel.members
123
- }
124
- })
125
- })
126
- .then(function (res) { return res.json(); })
127
- .then(function (data) {
128
- if (data.errors)
129
- throw data.errors[0];
130
- if (data.code)
131
- throw data;
132
- if (data.data.updateChannel.channel)
133
- data.data.updateChannel.channel.id = ObjectId(data.data.updateChannel.channel.id);
134
- return data.data.updateChannel.channel;
89
+ return [4 /*yield*/, fetchData("updateChannel", updateChannelQuery, {
90
+ projectId: CoreManager.get("PROJECT_ID"),
91
+ id: channelId,
92
+ name: channel.name,
93
+ type: channel.type,
94
+ uniqueId: channel.uniqueId,
95
+ translation: channel.translation,
96
+ push: channel.push,
97
+ mutes: channel.mutes,
98
+ linkUrl: channel.linkUrl,
99
+ imageUrl: channel.imageUrl,
100
+ disabled: channel.disabled,
101
+ members: channel.members
135
102
  })];
136
103
  case 1: return [2 /*return*/, _a.sent()];
137
104
  }
138
105
  });
139
106
  }); };
107
+ /**
108
+ * Delete a channel.
109
+ *
110
+ * @async
111
+ * @function deleteChannel
112
+ * @param {string} channelId - An channel id.
113
+ * @returns {Promise<any>}
114
+ */
140
115
  export var deleteChannel = function (channelId) { return __awaiter(void 0, void 0, void 0, function () {
141
- var token, projectId, endpoint, query;
142
116
  return __generator(this, function (_a) {
143
117
  switch (_a.label) {
144
- case 0:
145
- token = CoreManager.get("TOKEN");
146
- projectId = CoreManager.get("PROJECT_ID");
147
- endpoint = CoreManager.get('SERVER_URL') + '/graphql';
148
- query = "\n mutation (\n $projectId: String!, \n $id: ID!\n ) {\n deleteChannel(\n input: { \n projectId: $projectId, \n id: $id,\n }\n ) {\n channel {\n id\n project_id\n name\n user_id { \n id\n name\n profile\n device_type\n language\n }\n 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 }\n unique_id\n type\n translation\n members\n push\n link_url\n image_url \n created_at\n updated_at\n }\n }\n } \n ";
149
- return [4 /*yield*/, fetch(endpoint, {
150
- method: 'POST',
151
- headers: {
152
- 'Authorization': 'Bearer ' + token,
153
- 'X-PROJECT-ID': projectId,
154
- 'Content-Type': 'application/json',
155
- 'Accept': 'application/json'
156
- },
157
- body: JSON.stringify({
158
- query: query,
159
- variables: {
160
- projectId: projectId,
161
- id: channelId
162
- }
163
- })
164
- })
165
- .then(function (res) { return res.json(); })
166
- .then(function (data) {
167
- if (data.errors)
168
- throw data.errors[0];
169
- if (data.code)
170
- throw data;
171
- if (data.data.deleteChannel.channel)
172
- data.data.deleteChannel.channel.id = ObjectId(data.data.deleteChannel.channel.id);
173
- return data.data.deleteChannel.channel;
174
- })];
118
+ case 0: return [4 /*yield*/, fetchData("deleteChannel", deleteChannelQuery, {
119
+ projectId: CoreManager.get("PROJECT_ID"),
120
+ id: channelId
121
+ })];
175
122
  case 1: return [2 /*return*/, _a.sent()];
176
123
  }
177
124
  });
178
125
  }); };
126
+ /**
127
+ * Add members to the private channel.
128
+ *
129
+ * @async
130
+ * @function addChannelMembers
131
+ * @param {string} channelId - An private channel id.
132
+ * @param {string[]} memberIds - An array of member ids to be added.
133
+ * @param {any} options
134
+ * @returns {Promise<any>}
135
+ */
179
136
  export var addChannelMembers = function (channelId, memberIds, options) { return __awaiter(void 0, void 0, void 0, function () {
180
- var token, projectId, endpoint, query;
181
137
  return __generator(this, function (_a) {
182
138
  switch (_a.label) {
183
- case 0:
184
- token = CoreManager.get("TOKEN");
185
- projectId = CoreManager.get("PROJECT_ID");
186
- endpoint = CoreManager.get('SERVER_URL') + '/graphql';
187
- query = "\n mutation ($projectId: String!, $channelId: String!, $memberIds: [String]!) {\n addChannelMembers(input: {projectId: $projectId, channelId: $channelId, memberIds:$memberIds }) {\n channel {\n 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 }\n }\n }\n ";
188
- return [4 /*yield*/, fetch(endpoint, {
189
- method: 'POST',
190
- headers: {
191
- 'Authorization': 'Bearer ' + token,
192
- 'X-PROJECT-ID': projectId,
193
- 'Content-Type': 'application/json',
194
- 'Accept': 'application/json'
195
- },
196
- body: JSON.stringify({
197
- query: query,
198
- variables: {
199
- projectId: projectId,
200
- channelId: channelId,
201
- memberIds: memberIds,
202
- options: options
203
- }
204
- })
205
- })
206
- .then(function (res) { return res.json(); })
207
- .then(function (data) {
208
- if (data.errors)
209
- throw data.errors[0];
210
- if (data.code)
211
- throw data;
212
- if (data.data.addChannelMembers.channel)
213
- data.data.addChannelMembers.channel.id = ObjectId(data.data.addChannelMembers.channel.id);
214
- return data.data.addChannelMembers.channel;
215
- })];
139
+ case 0: return [4 /*yield*/, fetchData("addChannelMembers", addChannelMembersQuery, {
140
+ projectId: CoreManager.get("PROJECT_ID"),
141
+ channelId: channelId,
142
+ memberIds: memberIds,
143
+ options: options
144
+ })];
216
145
  case 1: return [2 /*return*/, _a.sent()];
217
146
  }
218
147
  });
219
148
  }); };
149
+ /**
150
+ * Remove members from the private channel.
151
+ *
152
+ * @async
153
+ * @function removeChannelMembers
154
+ * @param {string} channelId - An private channel id.
155
+ * @param {string[]} memberIds - An array of the member ids to be deleted.
156
+ * @returns {Promise<any>}
157
+ */
220
158
  export var removeChannelMembers = function (channelId, memberIds) { return __awaiter(void 0, void 0, void 0, function () {
221
- var token, projectId, endpoint, query;
222
159
  return __generator(this, function (_a) {
223
160
  switch (_a.label) {
224
- case 0:
225
- token = CoreManager.get("TOKEN");
226
- projectId = CoreManager.get("PROJECT_ID");
227
- endpoint = CoreManager.get('SERVER_URL') + '/graphql';
228
- query = "\n mutation ($projectId: String!, $channelId: String!, $memberIds: [String]!) {\n removeChannelMembers(input: {projectId: $projectId, channelId: $channelId, memberIds:$memberIds }) {\n channel {\n 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 }\n }\n }\n ";
229
- return [4 /*yield*/, fetch(endpoint, {
230
- method: 'POST',
231
- headers: {
232
- 'Authorization': 'Bearer ' + token,
233
- 'X-PROJECT-ID': projectId,
234
- 'Content-Type': 'application/json',
235
- 'Accept': 'application/json'
236
- },
237
- body: JSON.stringify({
238
- query: query,
239
- variables: {
240
- projectId: projectId,
241
- channelId: channelId,
242
- memberIds: memberIds
243
- }
244
- })
245
- })
246
- .then(function (res) { return res.json(); })
247
- .then(function (data) {
248
- if (data.errors)
249
- throw data.errors[0];
250
- if (data.code)
251
- throw data;
252
- if (data.data.removeChannelMembers.channel)
253
- data.data.removeChannelMembers.channel.id = ObjectId(data.data.removeChannelMembers.channel.id);
254
- return data.data.removeChannelMembers.channel;
255
- })];
161
+ case 0: return [4 /*yield*/, fetchData("removeChannelMembers", removeChannelMembersQuery, {
162
+ projectId: CoreManager.get("PROJECT_ID"),
163
+ channelId: channelId,
164
+ memberIds: memberIds
165
+ })];
256
166
  case 1: return [2 /*return*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