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.
- package/LICENSE.md +2 -2
- package/README.md +23 -393
- package/ncloudchat.d.ts +1298 -0
- package/ncloudchat.min.js +1 -0
- package/package.json +19 -40
- package/deploy.sh +0 -20
- package/esm/CloudChat.d.ts +0 -482
- package/esm/CloudChat.js +0 -1736
- package/esm/CloudChat.js.map +0 -1
- package/esm/CoreManager.d.ts +0 -11
- package/esm/CoreManager.js +0 -36
- package/esm/CoreManager.js.map +0 -1
- package/esm/Dispatcher.d.ts +0 -37
- package/esm/Dispatcher.js +0 -93
- package/esm/Dispatcher.js.map +0 -1
- package/esm/Network.d.ts +0 -7
- package/esm/Network.js +0 -96
- package/esm/Network.js.map +0 -1
- package/esm/Type.d.ts +0 -79
- package/esm/Type.js +0 -28
- package/esm/Type.js.map +0 -1
- package/esm/Util.d.ts +0 -15
- package/esm/Util.js +0 -20
- package/esm/Util.js.map +0 -1
- package/esm/graphql/channel.d.ts +0 -13
- package/esm/graphql/channel.js +0 -16
- package/esm/graphql/channel.js.map +0 -1
- package/esm/graphql/friend.d.ts +0 -11
- package/esm/graphql/friend.js +0 -13
- package/esm/graphql/friend.js.map +0 -1
- package/esm/graphql/invite.d.ts +0 -7
- package/esm/graphql/invite.js +0 -8
- package/esm/graphql/invite.js.map +0 -1
- package/esm/graphql/member.d.ts +0 -11
- package/esm/graphql/member.js +0 -13
- package/esm/graphql/member.js.map +0 -1
- package/esm/graphql/message.d.ts +0 -11
- package/esm/graphql/message.js +0 -13
- package/esm/graphql/message.js.map +0 -1
- package/esm/graphql/pin.d.ts +0 -10
- package/esm/graphql/pin.js +0 -12
- package/esm/graphql/pin.js.map +0 -1
- package/esm/graphql/project.d.ts +0 -6
- package/esm/graphql/project.js +0 -8
- package/esm/graphql/project.js.map +0 -1
- package/esm/graphql/subscription.d.ts +0 -11
- package/esm/graphql/subscription.js +0 -13
- package/esm/graphql/subscription.js.map +0 -1
- package/esm/index.d.ts +0 -8
- package/esm/index.js +0 -9
- package/esm/index.js.map +0 -1
- package/esm/logger.d.ts +0 -10
- package/esm/logger.js +0 -17
- package/esm/logger.js.map +0 -1
- package/esm/mutations/channel.d.ts +0 -56
- package/esm/mutations/channel.js +0 -170
- package/esm/mutations/channel.js.map +0 -1
- package/esm/mutations/friend.d.ts +0 -42
- package/esm/mutations/friend.js +0 -122
- package/esm/mutations/friend.js.map +0 -1
- package/esm/mutations/index.d.ts +0 -13
- package/esm/mutations/index.js +0 -14
- package/esm/mutations/index.js.map +0 -1
- package/esm/mutations/invite.d.ts +0 -16
- package/esm/mutations/invite.js +0 -67
- package/esm/mutations/invite.js.map +0 -1
- package/esm/mutations/member.d.ts +0 -41
- package/esm/mutations/member.js +0 -129
- package/esm/mutations/member.js.map +0 -1
- package/esm/mutations/message.d.ts +0 -37
- package/esm/mutations/message.js +0 -132
- package/esm/mutations/message.js.map +0 -1
- package/esm/mutations/pin.d.ts +0 -28
- package/esm/mutations/pin.js +0 -88
- package/esm/mutations/pin.js.map +0 -1
- package/esm/mutations/subscription.d.ts +0 -37
- package/esm/mutations/subscription.js +0 -115
- package/esm/mutations/subscription.js.map +0 -1
- package/esm/queries/channel.d.ts +0 -26
- package/esm/queries/channel.js +0 -88
- package/esm/queries/channel.js.map +0 -1
- package/esm/queries/friend.d.ts +0 -17
- package/esm/queries/friend.js +0 -69
- package/esm/queries/friend.js.map +0 -1
- package/esm/queries/index.d.ts +0 -14
- package/esm/queries/index.js +0 -15
- package/esm/queries/index.js.map +0 -1
- package/esm/queries/member.d.ts +0 -17
- package/esm/queries/member.js +0 -69
- package/esm/queries/member.js.map +0 -1
- package/esm/queries/memberblocks.d.ts +0 -17
- package/esm/queries/memberblocks.js +0 -69
- package/esm/queries/memberblocks.js.map +0 -1
- package/esm/queries/message.d.ts +0 -36
- package/esm/queries/message.js +0 -109
- package/esm/queries/message.js.map +0 -1
- package/esm/queries/pin.d.ts +0 -28
- package/esm/queries/pin.js +0 -92
- package/esm/queries/pin.js.map +0 -1
- package/esm/queries/project.d.ts +0 -14
- package/esm/queries/project.js +0 -22
- package/esm/queries/project.js.map +0 -1
- package/esm/queries/subscription.d.ts +0 -27
- package/esm/queries/subscription.js +0 -90
- package/esm/queries/subscription.js.map +0 -1
- package/lib/CloudChat.js +0 -2661
- package/lib/CoreManager.js +0 -45
- package/lib/Dispatcher.js +0 -125
- package/lib/Network.js +0 -229
- package/lib/Type.js +0 -44
- package/lib/Util.js +0 -32
- package/lib/graphql/channel.js +0 -32
- package/lib/graphql/friend.js +0 -27
- package/lib/graphql/invite.js +0 -18
- package/lib/graphql/member.js +0 -27
- package/lib/graphql/message.js +0 -27
- package/lib/graphql/pin.js +0 -25
- package/lib/graphql/project.js +0 -7
- package/lib/graphql/subscription.js +0 -27
- package/lib/index.js +0 -18
- package/lib/logger.js +0 -33
- package/lib/mutations/channel.js +0 -354
- package/lib/mutations/friend.js +0 -299
- package/lib/mutations/index.js +0 -109
- package/lib/mutations/invite.js +0 -205
- package/lib/mutations/member.js +0 -304
- package/lib/mutations/message.js +0 -300
- package/lib/mutations/pin.js +0 -229
- package/lib/mutations/subscription.js +0 -281
- package/lib/queries/channel.js +0 -239
- package/lib/queries/friend.js +0 -207
- package/lib/queries/index.js +0 -123
- package/lib/queries/member.js +0 -207
- package/lib/queries/memberblocks.js +0 -207
- package/lib/queries/message.js +0 -273
- package/lib/queries/pin.js +0 -243
- package/lib/queries/project.js +0 -7
- package/lib/queries/subscription.js +0 -241
- package/ncloudchat_javascript.md +0 -289
- package/tsconfig.json +0 -32
- package/types/exif.d.ts +0 -10
- package/types/window.d.ts +0 -5
- package//353/260/260/355/217/254/354/210/234/354/204/234.md +0 -8
package/esm/graphql/member.js
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) NBASE CORP. and its affiliates.
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the MIT license found in the
|
|
5
|
-
* LICENSE file in the root directory of this source tree.
|
|
6
|
-
*/
|
|
7
|
-
var 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 ";
|
|
8
|
-
export 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 }";
|
|
9
|
-
export 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 }");
|
|
10
|
-
export 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");
|
|
11
|
-
export 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";
|
|
12
|
-
export 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";
|
|
13
|
-
//# sourceMappingURL=member.js.map
|
|
@@ -1 +0,0 @@
|
|
|
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"}
|
package/esm/graphql/message.d.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) NBASE CORP. and its affiliates.
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the MIT license found in the
|
|
5
|
-
* LICENSE file in the root directory of this source tree.
|
|
6
|
-
*/
|
|
7
|
-
export 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;
|
package/esm/graphql/message.js
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) NBASE CORP. and its affiliates.
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the MIT license found in the
|
|
5
|
-
* LICENSE file in the root directory of this source tree.
|
|
6
|
-
*/
|
|
7
|
-
var 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
|
|
@@ -1 +0,0 @@
|
|
|
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"}
|
package/esm/graphql/pin.d.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) NBASE CORP. and its affiliates.
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the MIT license found in the
|
|
5
|
-
* LICENSE file in the root directory of this source tree.
|
|
6
|
-
*/
|
|
7
|
-
export declare const getPinQuery: string;
|
|
8
|
-
export declare const getPinsQuery: string;
|
|
9
|
-
export declare const createPinQuery: string;
|
|
10
|
-
export declare const updatePinQuery: string;
|
package/esm/graphql/pin.js
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) NBASE CORP. and its affiliates.
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the MIT license found in the
|
|
5
|
-
* LICENSE file in the root directory of this source tree.
|
|
6
|
-
*/
|
|
7
|
-
var 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
|
package/esm/graphql/pin.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
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"}
|
package/esm/graphql/project.d.ts
DELETED
package/esm/graphql/project.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"project.js","sourceRoot":"","sources":["../../src/graphql/project.ts"],"names":[],"mappings":";AAAA;;;;;GAKG"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) NBASE CORP. and its affiliates.
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the MIT license found in the
|
|
5
|
-
* LICENSE file in the root directory of this source tree.
|
|
6
|
-
*/
|
|
7
|
-
export 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";
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) NBASE CORP. and its affiliates.
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the MIT license found in the
|
|
5
|
-
* LICENSE file in the root directory of this source tree.
|
|
6
|
-
*/
|
|
7
|
-
var 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
|
|
@@ -1 +0,0 @@
|
|
|
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
DELETED
package/esm/index.js
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) NBASE CORP. and its affiliates.
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the MIT license found in the
|
|
5
|
-
* LICENSE file in the root directory of this source tree.
|
|
6
|
-
*/
|
|
7
|
-
import Chat from './CloudChat';
|
|
8
|
-
export { Chat };
|
|
9
|
-
//# sourceMappingURL=index.js.map
|
package/esm/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
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
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) NBASE CORP. and its affiliates.
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the MIT license found in the
|
|
5
|
-
* LICENSE file in the root directory of this source tree.
|
|
6
|
-
*/
|
|
7
|
-
declare const debug: (value: any) => void;
|
|
8
|
-
declare const error: (value: any) => void;
|
|
9
|
-
declare const info: (value: any) => void;
|
|
10
|
-
export { debug, error, info };
|
package/esm/logger.js
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) NBASE CORP. and its affiliates.
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the MIT license found in the
|
|
5
|
-
* LICENSE file in the root directory of this source tree.
|
|
6
|
-
*/
|
|
7
|
-
var debug = function (value) {
|
|
8
|
-
return console.log(value);
|
|
9
|
-
};
|
|
10
|
-
var error = function (value) {
|
|
11
|
-
return console.error(value);
|
|
12
|
-
};
|
|
13
|
-
var info = function (value) {
|
|
14
|
-
return console.log(value);
|
|
15
|
-
};
|
|
16
|
-
export { debug, error, info };
|
|
17
|
-
//# sourceMappingURL=logger.js.map
|
package/esm/logger.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
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,56 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) NBASE CORP. and its affiliates.
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the MIT license found in the
|
|
5
|
-
* LICENSE file in the root directory of this source tree.
|
|
6
|
-
*/
|
|
7
|
-
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
|
-
*/
|
|
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
|
-
*/
|
|
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
|
-
*/
|
|
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
|
-
*/
|
|
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
|
-
*/
|
|
56
|
-
export declare const removeChannelMembers: (channelId: string, memberIds: any) => Promise<any>;
|
package/esm/mutations/channel.js
DELETED
|
@@ -1,170 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) NBASE CORP. and its affiliates.
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the MIT license found in the
|
|
5
|
-
* LICENSE file in the root directory of this source tree.
|
|
6
|
-
*/
|
|
7
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
8
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
9
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
10
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
11
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
12
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
13
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
14
|
-
});
|
|
15
|
-
};
|
|
16
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
17
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
18
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
19
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
20
|
-
function step(op) {
|
|
21
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
22
|
-
while (_) try {
|
|
23
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
24
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
25
|
-
switch (op[0]) {
|
|
26
|
-
case 0: case 1: t = op; break;
|
|
27
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
28
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
29
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
30
|
-
default:
|
|
31
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
32
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
33
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
34
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
35
|
-
if (t[2]) _.ops.pop();
|
|
36
|
-
_.trys.pop(); continue;
|
|
37
|
-
}
|
|
38
|
-
op = body.call(thisArg, _);
|
|
39
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
40
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
41
|
-
}
|
|
42
|
-
};
|
|
43
|
-
import CoreManager from "../CoreManager";
|
|
44
|
-
import { 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
|
-
*/
|
|
54
|
-
export var createChannel = function (channel) { return __awaiter(void 0, void 0, void 0, function () {
|
|
55
|
-
return __generator(this, function (_a) {
|
|
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
|
-
})];
|
|
72
|
-
});
|
|
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
|
-
*/
|
|
83
|
-
export var updateChannel = function (channelId, channel) { return __awaiter(void 0, void 0, void 0, function () {
|
|
84
|
-
return __generator(this, function (_a) {
|
|
85
|
-
switch (_a.label) {
|
|
86
|
-
case 0:
|
|
87
|
-
if (!channel.members)
|
|
88
|
-
channel.members = [];
|
|
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
|
|
102
|
-
})];
|
|
103
|
-
case 1: return [2 /*return*/, _a.sent()];
|
|
104
|
-
}
|
|
105
|
-
});
|
|
106
|
-
}); };
|
|
107
|
-
/**
|
|
108
|
-
* Delete a channel.
|
|
109
|
-
*
|
|
110
|
-
* @async
|
|
111
|
-
* @function deleteChannel
|
|
112
|
-
* @param {string} channelId - An channel id.
|
|
113
|
-
* @returns {Promise<any>}
|
|
114
|
-
*/
|
|
115
|
-
export var deleteChannel = function (channelId) { return __awaiter(void 0, void 0, void 0, function () {
|
|
116
|
-
return __generator(this, function (_a) {
|
|
117
|
-
switch (_a.label) {
|
|
118
|
-
case 0: return [4 /*yield*/, fetchData("deleteChannel", deleteChannelQuery, {
|
|
119
|
-
projectId: CoreManager.get("PROJECT_ID"),
|
|
120
|
-
id: channelId
|
|
121
|
-
})];
|
|
122
|
-
case 1: return [2 /*return*/, _a.sent()];
|
|
123
|
-
}
|
|
124
|
-
});
|
|
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
|
-
*/
|
|
136
|
-
export var addChannelMembers = function (channelId, memberIds, options) { return __awaiter(void 0, void 0, void 0, function () {
|
|
137
|
-
return __generator(this, function (_a) {
|
|
138
|
-
switch (_a.label) {
|
|
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
|
-
})];
|
|
145
|
-
case 1: return [2 /*return*/, _a.sent()];
|
|
146
|
-
}
|
|
147
|
-
});
|
|
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
|
-
*/
|
|
158
|
-
export var removeChannelMembers = function (channelId, memberIds) { return __awaiter(void 0, void 0, void 0, function () {
|
|
159
|
-
return __generator(this, function (_a) {
|
|
160
|
-
switch (_a.label) {
|
|
161
|
-
case 0: return [4 /*yield*/, fetchData("removeChannelMembers", removeChannelMembersQuery, {
|
|
162
|
-
projectId: CoreManager.get("PROJECT_ID"),
|
|
163
|
-
channelId: channelId,
|
|
164
|
-
memberIds: memberIds
|
|
165
|
-
})];
|
|
166
|
-
case 1: return [2 /*return*/, _a.sent()];
|
|
167
|
-
}
|
|
168
|
-
});
|
|
169
|
-
}); };
|
|
170
|
-
//# sourceMappingURL=channel.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"channel.js","sourceRoot":"","sources":["../../src/mutations/channel.ts"],"names":[],"mappings":"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"}
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) NBASE CORP. and its affiliates.
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the MIT license found in the
|
|
5
|
-
* LICENSE file in the root directory of this source tree.
|
|
6
|
-
*/
|
|
7
|
-
/**
|
|
8
|
-
* Request a friendship to a user.
|
|
9
|
-
*
|
|
10
|
-
* @async
|
|
11
|
-
* @function requestFriend
|
|
12
|
-
* @param {string} friendId - An id of the friend to request.
|
|
13
|
-
* @returns {Promise<any>}
|
|
14
|
-
*/
|
|
15
|
-
export declare const requestFriend: (friendId: string) => Promise<any>;
|
|
16
|
-
/**
|
|
17
|
-
* Accept a friends request.
|
|
18
|
-
*
|
|
19
|
-
* @async
|
|
20
|
-
* @function acceptFriend
|
|
21
|
-
* @param {string} friendId - The id of the friend to accept the request.
|
|
22
|
-
* @returns {Promise<any>}
|
|
23
|
-
*/
|
|
24
|
-
export declare const acceptFriend: (friendId: string) => Promise<any>;
|
|
25
|
-
/**
|
|
26
|
-
* Reject a friend request.
|
|
27
|
-
*
|
|
28
|
-
* @async
|
|
29
|
-
* @function rejectFriend
|
|
30
|
-
* @param {string} friendId - An id of the friend to be rejected.
|
|
31
|
-
* @returns {Promise<any>}
|
|
32
|
-
*/
|
|
33
|
-
export declare const rejectFriend: (friendId: string) => Promise<any>;
|
|
34
|
-
/**
|
|
35
|
-
* Remove a friend.
|
|
36
|
-
*
|
|
37
|
-
* @async
|
|
38
|
-
* @function removeFriend
|
|
39
|
-
* @param {string} friendId - An id of the friend to be removed.
|
|
40
|
-
* @returns {Promise<any>}
|
|
41
|
-
*/
|
|
42
|
-
export declare const removeFriend: (friendId: string) => Promise<any>;
|
package/esm/mutations/friend.js
DELETED
|
@@ -1,122 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) NBASE CORP. and its affiliates.
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the MIT license found in the
|
|
5
|
-
* LICENSE file in the root directory of this source tree.
|
|
6
|
-
*/
|
|
7
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
8
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
9
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
10
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
11
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
12
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
13
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
14
|
-
});
|
|
15
|
-
};
|
|
16
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
17
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
18
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
19
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
20
|
-
function step(op) {
|
|
21
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
22
|
-
while (_) try {
|
|
23
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
24
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
25
|
-
switch (op[0]) {
|
|
26
|
-
case 0: case 1: t = op; break;
|
|
27
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
28
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
29
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
30
|
-
default:
|
|
31
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
32
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
33
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
34
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
35
|
-
if (t[2]) _.ops.pop();
|
|
36
|
-
_.trys.pop(); continue;
|
|
37
|
-
}
|
|
38
|
-
op = body.call(thisArg, _);
|
|
39
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
40
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
41
|
-
}
|
|
42
|
-
};
|
|
43
|
-
import CoreManager from "../CoreManager";
|
|
44
|
-
import { acceptFriendQuery, requestFriendQuery, rejectFriendQuery, removeFriendQuery, } from "../graphql/friend";
|
|
45
|
-
import { fetchData } from "../Network";
|
|
46
|
-
/**
|
|
47
|
-
* Request a friendship to a user.
|
|
48
|
-
*
|
|
49
|
-
* @async
|
|
50
|
-
* @function requestFriend
|
|
51
|
-
* @param {string} friendId - An id of the friend to request.
|
|
52
|
-
* @returns {Promise<any>}
|
|
53
|
-
*/
|
|
54
|
-
export var requestFriend = function (friendId) { return __awaiter(void 0, void 0, void 0, function () {
|
|
55
|
-
return __generator(this, function (_a) {
|
|
56
|
-
switch (_a.label) {
|
|
57
|
-
case 0: return [4 /*yield*/, fetchData("requestFriend", requestFriendQuery, {
|
|
58
|
-
projectId: CoreManager.get("PROJECT_ID"),
|
|
59
|
-
friendId: friendId
|
|
60
|
-
})];
|
|
61
|
-
case 1: return [2 /*return*/, _a.sent()];
|
|
62
|
-
}
|
|
63
|
-
});
|
|
64
|
-
}); };
|
|
65
|
-
/**
|
|
66
|
-
* Accept a friends request.
|
|
67
|
-
*
|
|
68
|
-
* @async
|
|
69
|
-
* @function acceptFriend
|
|
70
|
-
* @param {string} friendId - The id of the friend to accept the request.
|
|
71
|
-
* @returns {Promise<any>}
|
|
72
|
-
*/
|
|
73
|
-
export var acceptFriend = function (friendId) { return __awaiter(void 0, void 0, void 0, function () {
|
|
74
|
-
return __generator(this, function (_a) {
|
|
75
|
-
switch (_a.label) {
|
|
76
|
-
case 0: return [4 /*yield*/, fetchData("acceptFriend", acceptFriendQuery, {
|
|
77
|
-
projectId: CoreManager.get("PROJECT_ID"),
|
|
78
|
-
friendId: friendId
|
|
79
|
-
})];
|
|
80
|
-
case 1: return [2 /*return*/, _a.sent()];
|
|
81
|
-
}
|
|
82
|
-
});
|
|
83
|
-
}); };
|
|
84
|
-
/**
|
|
85
|
-
* Reject a friend request.
|
|
86
|
-
*
|
|
87
|
-
* @async
|
|
88
|
-
* @function rejectFriend
|
|
89
|
-
* @param {string} friendId - An id of the friend to be rejected.
|
|
90
|
-
* @returns {Promise<any>}
|
|
91
|
-
*/
|
|
92
|
-
export var rejectFriend = function (friendId) { return __awaiter(void 0, void 0, void 0, function () {
|
|
93
|
-
return __generator(this, function (_a) {
|
|
94
|
-
switch (_a.label) {
|
|
95
|
-
case 0: return [4 /*yield*/, fetchData("rejectFriend", rejectFriendQuery, {
|
|
96
|
-
projectId: CoreManager.get("PROJECT_ID"),
|
|
97
|
-
friendId: friendId
|
|
98
|
-
})];
|
|
99
|
-
case 1: return [2 /*return*/, _a.sent()];
|
|
100
|
-
}
|
|
101
|
-
});
|
|
102
|
-
}); };
|
|
103
|
-
/**
|
|
104
|
-
* Remove a friend.
|
|
105
|
-
*
|
|
106
|
-
* @async
|
|
107
|
-
* @function removeFriend
|
|
108
|
-
* @param {string} friendId - An id of the friend to be removed.
|
|
109
|
-
* @returns {Promise<any>}
|
|
110
|
-
*/
|
|
111
|
-
export var removeFriend = function (friendId) { return __awaiter(void 0, void 0, void 0, function () {
|
|
112
|
-
return __generator(this, function (_a) {
|
|
113
|
-
switch (_a.label) {
|
|
114
|
-
case 0: return [4 /*yield*/, fetchData("removeFriend", removeFriendQuery, {
|
|
115
|
-
projectId: CoreManager.get("PROJECT_ID"),
|
|
116
|
-
friendId: friendId
|
|
117
|
-
})];
|
|
118
|
-
case 1: return [2 /*return*/, _a.sent()];
|
|
119
|
-
}
|
|
120
|
-
});
|
|
121
|
-
}); };
|
|
122
|
-
//# sourceMappingURL=friend.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"friend.js","sourceRoot":"","sources":["../../src/mutations/friend.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,OAAO,WAAW,MAAM,gBAAgB,CAAC;AACzC,OAAO,EACH,iBAAiB,EACjB,kBAAkB,EAClB,iBAAiB,EACjB,iBAAiB,GACpB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAEvC;;;;;;;GAOG;AACH,MAAM,CAAC,IAAM,aAAa,GAAG,UAAO,QAAgB;;;oBACzC,qBAAM,SAAS,CAAC,eAAe,EAAE,kBAAkB,EAAE;oBACxD,SAAS,EAAE,WAAW,CAAC,GAAG,CAAC,YAAY,CAAC;oBACxC,QAAQ,UAAA;iBACX,CAAC,EAAA;oBAHF,sBAAO,SAGL,EAAC;;;KACN,CAAC;AAEF;;;;;;;GAOG;AACH,MAAM,CAAC,IAAM,YAAY,GAAG,UAAO,QAAgB;;;oBACxC,qBAAM,SAAS,CAAC,cAAc,EAAE,iBAAiB,EAAE;oBACtD,SAAS,EAAE,WAAW,CAAC,GAAG,CAAC,YAAY,CAAC;oBACxC,QAAQ,UAAA;iBACX,CAAC,EAAA;oBAHF,sBAAO,SAGL,EAAC;;;KACN,CAAC;AAEF;;;;;;;GAOG;AACH,MAAM,CAAC,IAAM,YAAY,GAAG,UAAO,QAAgB;;;oBACxC,qBAAM,SAAS,CAAC,cAAc,EAAE,iBAAiB,EAAE;oBACtD,SAAS,EAAE,WAAW,CAAC,GAAG,CAAC,YAAY,CAAC;oBACxC,QAAQ,UAAA;iBACX,CAAC,EAAA;oBAHF,sBAAO,SAGL,EAAC;;;KACN,CAAC;AAEF;;;;;;;GAOG;AACH,MAAM,CAAC,IAAM,YAAY,GAAG,UAAO,QAAgB;;;oBACxC,qBAAM,SAAS,CAAC,cAAc,EAAE,iBAAiB,EAAE;oBACtD,SAAS,EAAE,WAAW,CAAC,GAAG,CAAC,YAAY,CAAC;oBACxC,QAAQ,UAAA;iBACX,CAAC,EAAA;oBAHF,sBAAO,SAGL,EAAC;;;KACN,CAAC"}
|
package/esm/mutations/index.d.ts
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) NBASE CORP. and its affiliates.
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the MIT license found in the
|
|
5
|
-
* LICENSE file in the root directory of this source tree.
|
|
6
|
-
*/
|
|
7
|
-
export * from './member';
|
|
8
|
-
export * from './channel';
|
|
9
|
-
export * from './message';
|
|
10
|
-
export * from './friend';
|
|
11
|
-
export * from './invite';
|
|
12
|
-
export * from './subscription';
|
|
13
|
-
export * from './pin';
|
package/esm/mutations/index.js
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) NBASE CORP. and its affiliates.
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the MIT license found in the
|
|
5
|
-
* LICENSE file in the root directory of this source tree.
|
|
6
|
-
*/
|
|
7
|
-
export * from './member';
|
|
8
|
-
export * from './channel';
|
|
9
|
-
export * from './message';
|
|
10
|
-
export * from './friend';
|
|
11
|
-
export * from './invite';
|
|
12
|
-
export * from './subscription';
|
|
13
|
-
export * from './pin';
|
|
14
|
-
//# sourceMappingURL=index.js.map
|