@amityco/ts-sdk 7.4.1-d23fab2f.0 → 7.5.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/.env +26 -26
- package/dist/@types/core/events.d.ts +0 -3
- package/dist/@types/core/events.d.ts.map +1 -1
- package/dist/@types/core/model.d.ts +1 -3
- package/dist/@types/core/model.d.ts.map +1 -1
- package/dist/@types/core/payload.d.ts +4 -8
- package/dist/@types/core/payload.d.ts.map +1 -1
- package/dist/@types/domains/client.d.ts +0 -10
- package/dist/@types/domains/client.d.ts.map +1 -1
- package/dist/@types/domains/community.d.ts +1 -7
- package/dist/@types/domains/community.d.ts.map +1 -1
- package/dist/@types/index.d.ts +0 -2
- package/dist/@types/index.d.ts.map +1 -1
- package/dist/communityRepository/api/createCommunity.d.ts +2 -2
- package/dist/communityRepository/api/createCommunity.d.ts.map +1 -1
- package/dist/communityRepository/api/getCommunities.d.ts.map +1 -1
- package/dist/communityRepository/api/getCommunity.d.ts.map +1 -1
- package/dist/communityRepository/api/getRecommendedCommunities.d.ts.map +1 -1
- package/dist/communityRepository/api/getTrendingCommunities.d.ts.map +1 -1
- package/dist/communityRepository/api/queryCommunities.d.ts.map +1 -1
- package/dist/communityRepository/api/updateCommunity.d.ts.map +1 -1
- package/dist/communityRepository/communityMembership/events/onCommunityJoined.d.ts +1 -1
- package/dist/communityRepository/communityMembership/events/onCommunityJoined.d.ts.map +1 -1
- package/dist/communityRepository/communityMembership/events/onCommunityLeft.d.ts +1 -1
- package/dist/communityRepository/communityMembership/events/onCommunityLeft.d.ts.map +1 -1
- package/dist/communityRepository/communityMembership/events/onCommunityUserAdded.d.ts +1 -1
- package/dist/communityRepository/communityMembership/events/onCommunityUserAdded.d.ts.map +1 -1
- package/dist/communityRepository/communityMembership/events/onCommunityUserBanned.d.ts +1 -1
- package/dist/communityRepository/communityMembership/events/onCommunityUserBanned.d.ts.map +1 -1
- package/dist/communityRepository/communityMembership/events/onCommunityUserChanged.d.ts +1 -1
- package/dist/communityRepository/communityMembership/events/onCommunityUserChanged.d.ts.map +1 -1
- package/dist/communityRepository/communityMembership/events/onCommunityUserRemoved.d.ts +1 -1
- package/dist/communityRepository/communityMembership/events/onCommunityUserRemoved.d.ts.map +1 -1
- package/dist/communityRepository/communityMembership/events/onCommunityUserRoleAdded.d.ts +1 -1
- package/dist/communityRepository/communityMembership/events/onCommunityUserRoleAdded.d.ts.map +1 -1
- package/dist/communityRepository/communityMembership/events/onCommunityUserRoleRemoved.d.ts +1 -1
- package/dist/communityRepository/communityMembership/events/onCommunityUserRoleRemoved.d.ts.map +1 -1
- package/dist/communityRepository/communityMembership/events/onCommunityUserUnbanned.d.ts +1 -1
- package/dist/communityRepository/communityMembership/events/onCommunityUserUnbanned.d.ts.map +1 -1
- package/dist/communityRepository/communityMembership/events/onLocalCommunityJoined.d.ts +1 -1
- package/dist/communityRepository/communityMembership/events/onLocalCommunityJoined.d.ts.map +1 -1
- package/dist/communityRepository/communityMembership/events/onLocalCommunityLeft.d.ts +1 -1
- package/dist/communityRepository/communityMembership/events/onLocalCommunityLeft.d.ts.map +1 -1
- package/dist/communityRepository/communityMembership/events/onLocalCommunityUserAdded.d.ts +1 -1
- package/dist/communityRepository/communityMembership/events/onLocalCommunityUserAdded.d.ts.map +1 -1
- package/dist/communityRepository/communityMembership/events/onLocalCommunityUserRemoved.d.ts +1 -1
- package/dist/communityRepository/communityMembership/events/onLocalCommunityUserRemoved.d.ts.map +1 -1
- package/dist/communityRepository/communityMembership/events/onUserDeleted.d.ts +1 -1
- package/dist/communityRepository/communityMembership/events/onUserDeleted.d.ts.map +1 -1
- package/dist/communityRepository/communityMembership/events/utils.d.ts +2 -2
- package/dist/communityRepository/communityMembership/events/utils.d.ts.map +1 -1
- package/dist/communityRepository/communityMembership/observers/getMembers/CommunityMembersQueryStreamController.d.ts +2 -2
- package/dist/communityRepository/communityMembership/observers/getMembers/CommunityMembersQueryStreamController.d.ts.map +1 -1
- package/dist/communityRepository/communityMembership/observers/searchMembers/SearchCommunityMembersQueryStreamController.d.ts +2 -2
- package/dist/communityRepository/communityMembership/observers/searchMembers/SearchCommunityMembersQueryStreamController.d.ts.map +1 -1
- package/dist/communityRepository/communityModeration/events/onLocalCommunityRoleAdded.d.ts +1 -1
- package/dist/communityRepository/communityModeration/events/onLocalCommunityRoleAdded.d.ts.map +1 -1
- package/dist/communityRepository/communityModeration/events/onLocalCommunityRoleRemoved.d.ts +1 -1
- package/dist/communityRepository/communityModeration/events/onLocalCommunityRoleRemoved.d.ts.map +1 -1
- package/dist/communityRepository/events/onCommunityCreated.d.ts +1 -1
- package/dist/communityRepository/events/onCommunityCreated.d.ts.map +1 -1
- package/dist/communityRepository/events/onCommunityDeleted.d.ts +1 -1
- package/dist/communityRepository/events/onCommunityDeleted.d.ts.map +1 -1
- package/dist/communityRepository/events/onCommunityUpdated.d.ts +1 -1
- package/dist/communityRepository/events/onCommunityUpdated.d.ts.map +1 -1
- package/dist/communityRepository/events/utils.d.ts +1 -1
- package/dist/communityRepository/events/utils.d.ts.map +1 -1
- package/dist/communityRepository/observers/getCommunities/CommunitiesQueryStreamController.d.ts +2 -2
- package/dist/communityRepository/observers/getCommunities/CommunitiesQueryStreamController.d.ts.map +1 -1
- package/dist/communityRepository/observers/getRecommendedCommunities/RecommendedCommunitiesQueryStreamController.d.ts +2 -2
- package/dist/communityRepository/observers/getRecommendedCommunities/RecommendedCommunitiesQueryStreamController.d.ts.map +1 -1
- package/dist/communityRepository/observers/getTrendingCommunities/TrendingCommunitiesQueryStreamController.d.ts +2 -2
- package/dist/communityRepository/observers/getTrendingCommunities/TrendingCommunitiesQueryStreamController.d.ts.map +1 -1
- package/dist/communityRepository/observers/searchCommunities/SearchCommunitiesQueryStreamController.d.ts +2 -2
- package/dist/communityRepository/observers/searchCommunities/SearchCommunitiesQueryStreamController.d.ts.map +1 -1
- package/dist/communityRepository/observers/semanticSearch/SemanticSearchCommunityQueryStreamController.d.ts +2 -2
- package/dist/communityRepository/observers/semanticSearch/SemanticSearchCommunityQueryStreamController.d.ts.map +1 -1
- package/dist/communityRepository/utils/communityWithMembership.d.ts +1 -1
- package/dist/communityRepository/utils/communityWithMembership.d.ts.map +1 -1
- package/dist/communityRepository/utils/payload.d.ts +1 -1
- package/dist/communityRepository/utils/payload.d.ts.map +1 -1
- package/dist/core/events.d.ts +3 -3
- package/dist/core/events.d.ts.map +1 -1
- package/dist/core/model/idResolvers.d.ts.map +1 -1
- package/dist/core/model/index.d.ts.map +1 -1
- package/dist/index.cjs.js +55 -276
- package/dist/index.d.ts +0 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.esm.js +38 -258
- package/dist/index.umd.js +4 -4
- package/dist/utils/linkedObject/index.d.ts +0 -2
- package/dist/utils/linkedObject/index.d.ts.map +1 -1
- package/dist/utils/tests/dummy/post.d.ts +3 -3
- package/package.json +1 -1
- package/src/@types/core/events.ts +0 -4
- package/src/@types/core/model.ts +1 -5
- package/src/@types/core/payload.ts +4 -9
- package/src/@types/domains/client.ts +0 -12
- package/src/@types/domains/community.ts +1 -13
- package/src/@types/index.ts +0 -2
- package/src/communityRepository/api/createCommunity.ts +2 -5
- package/src/communityRepository/api/getCommunities.ts +1 -2
- package/src/communityRepository/api/getCommunity.ts +1 -4
- package/src/communityRepository/api/getRecommendedCommunities.ts +1 -2
- package/src/communityRepository/api/getTrendingCommunities.ts +1 -2
- package/src/communityRepository/api/queryCommunities.ts +1 -6
- package/src/communityRepository/api/updateCommunity.ts +1 -4
- package/src/communityRepository/communityMembership/events/onCommunityJoined.ts +1 -1
- package/src/communityRepository/communityMembership/events/onCommunityLeft.ts +1 -1
- package/src/communityRepository/communityMembership/events/onCommunityUserAdded.ts +1 -1
- package/src/communityRepository/communityMembership/events/onCommunityUserBanned.ts +1 -1
- package/src/communityRepository/communityMembership/events/onCommunityUserChanged.ts +1 -1
- package/src/communityRepository/communityMembership/events/onCommunityUserRemoved.ts +1 -1
- package/src/communityRepository/communityMembership/events/onCommunityUserRoleAdded.ts +1 -1
- package/src/communityRepository/communityMembership/events/onCommunityUserRoleRemoved.ts +1 -1
- package/src/communityRepository/communityMembership/events/onCommunityUserUnbanned.ts +1 -1
- package/src/communityRepository/communityMembership/events/onLocalCommunityJoined.ts +1 -1
- package/src/communityRepository/communityMembership/events/onLocalCommunityLeft.ts +1 -1
- package/src/communityRepository/communityMembership/events/onLocalCommunityUserAdded.ts +1 -1
- package/src/communityRepository/communityMembership/events/onLocalCommunityUserRemoved.ts +1 -1
- package/src/communityRepository/communityMembership/events/onUserDeleted.ts +1 -3
- package/src/communityRepository/communityMembership/events/utils.ts +2 -2
- package/src/communityRepository/communityMembership/observers/getMembers/CommunityMembersQueryStreamController.ts +2 -8
- package/src/communityRepository/communityMembership/observers/searchMembers/SearchCommunityMembersQueryStreamController.ts +2 -8
- package/src/communityRepository/communityModeration/events/onLocalCommunityRoleAdded.ts +1 -1
- package/src/communityRepository/communityModeration/events/onLocalCommunityRoleRemoved.ts +1 -1
- package/src/communityRepository/events/onCommunityCreated.ts +1 -1
- package/src/communityRepository/events/onCommunityDeleted.ts +1 -1
- package/src/communityRepository/events/onCommunityUpdated.ts +1 -1
- package/src/communityRepository/events/utils.ts +1 -1
- package/src/communityRepository/observers/getCommunities/CommunitiesQueryStreamController.ts +2 -2
- package/src/communityRepository/observers/getRecommendedCommunities/RecommendedCommunitiesQueryStreamController.ts +2 -2
- package/src/communityRepository/observers/getTrendingCommunities/TrendingCommunitiesQueryStreamController.ts +2 -2
- package/src/communityRepository/observers/searchCommunities/SearchCommunitiesQueryStreamController.ts +2 -2
- package/src/communityRepository/observers/semanticSearch/SemanticSearchCommunityQueryStreamController.ts +2 -2
- package/src/communityRepository/utils/communityWithMembership.ts +4 -8
- package/src/communityRepository/utils/payload.ts +1 -1
- package/src/core/model/idResolvers.ts +0 -2
- package/src/core/model/index.ts +0 -2
- package/src/index.ts +0 -2
- package/src/utils/linkedObject/index.ts +0 -4
- package/dist/@types/domains/invitation.d.ts +0 -43
- package/dist/@types/domains/invitation.d.ts.map +0 -1
- package/dist/invitationRepository/events/index.d.ts +0 -2
- package/dist/invitationRepository/events/index.d.ts.map +0 -1
- package/dist/invitationRepository/events/onLocalInvitationCreated.d.ts +0 -17
- package/dist/invitationRepository/events/onLocalInvitationCreated.d.ts.map +0 -1
- package/dist/invitationRepository/events/onLocalInvitationDeleted.d.ts +0 -17
- package/dist/invitationRepository/events/onLocalInvitationDeleted.d.ts.map +0 -1
- package/dist/invitationRepository/events/onLocalInvitationUpdated.d.ts +0 -17
- package/dist/invitationRepository/events/onLocalInvitationUpdated.d.ts.map +0 -1
- package/dist/invitationRepository/index.d.ts +0 -2
- package/dist/invitationRepository/index.d.ts.map +0 -1
- package/dist/invitationRepository/internalApi/acceptInvitation.d.ts +0 -16
- package/dist/invitationRepository/internalApi/acceptInvitation.d.ts.map +0 -1
- package/dist/invitationRepository/internalApi/cancelInvitation.d.ts +0 -16
- package/dist/invitationRepository/internalApi/cancelInvitation.d.ts.map +0 -1
- package/dist/invitationRepository/internalApi/createInvitations.d.ts +0 -21
- package/dist/invitationRepository/internalApi/createInvitations.d.ts.map +0 -1
- package/dist/invitationRepository/internalApi/index.d.ts +0 -5
- package/dist/invitationRepository/internalApi/index.d.ts.map +0 -1
- package/dist/invitationRepository/internalApi/rejectInvitation.d.ts +0 -16
- package/dist/invitationRepository/internalApi/rejectInvitation.d.ts.map +0 -1
- package/dist/utils/linkedObject/communityLinkedObject.d.ts +0 -2
- package/dist/utils/linkedObject/communityLinkedObject.d.ts.map +0 -1
- package/dist/utils/linkedObject/invitationLinkedObject.d.ts +0 -2
- package/dist/utils/linkedObject/invitationLinkedObject.d.ts.map +0 -1
- package/src/@types/domains/invitation.ts +0 -52
- package/src/invitationRepository/events/index.ts +0 -1
- package/src/invitationRepository/events/onLocalInvitationCreated.ts +0 -33
- package/src/invitationRepository/events/onLocalInvitationDeleted.ts +0 -33
- package/src/invitationRepository/events/onLocalInvitationUpdated.ts +0 -33
- package/src/invitationRepository/index.ts +0 -1
- package/src/invitationRepository/internalApi/acceptInvitation.ts +0 -45
- package/src/invitationRepository/internalApi/cancelInvitation.ts +0 -44
- package/src/invitationRepository/internalApi/createInvitations.ts +0 -46
- package/src/invitationRepository/internalApi/index.ts +0 -4
- package/src/invitationRepository/internalApi/rejectInvitation.ts +0 -45
- package/src/utils/linkedObject/communityLinkedObject.ts +0 -16
- package/src/utils/linkedObject/invitationLinkedObject.ts +0 -20
package/dist/index.esm.js
CHANGED
|
@@ -8,12 +8,6 @@ import uuid$1 from 'react-native-uuid';
|
|
|
8
8
|
import hash from 'object-hash';
|
|
9
9
|
import Hls from 'hls.js';
|
|
10
10
|
|
|
11
|
-
var MembershipAcceptanceTypeEnum;
|
|
12
|
-
(function (MembershipAcceptanceTypeEnum) {
|
|
13
|
-
MembershipAcceptanceTypeEnum["AUTOMATIC"] = "automatic";
|
|
14
|
-
MembershipAcceptanceTypeEnum["INVITATION"] = "invitation";
|
|
15
|
-
})(MembershipAcceptanceTypeEnum || (MembershipAcceptanceTypeEnum = {}));
|
|
16
|
-
|
|
17
11
|
const FileType = Object.freeze({
|
|
18
12
|
FILE: 'file',
|
|
19
13
|
IMAGE: 'image',
|
|
@@ -103,23 +97,10 @@ const PostContentType = Object.freeze({
|
|
|
103
97
|
POLL: 'poll',
|
|
104
98
|
});
|
|
105
99
|
|
|
106
|
-
var InvitationTypeEnum;
|
|
107
|
-
(function (InvitationTypeEnum) {
|
|
108
|
-
InvitationTypeEnum["CommunityMemberInvite"] = "communityMemberInvite";
|
|
109
|
-
InvitationTypeEnum["LivestreamInvite"] = "livestreamInvite";
|
|
110
|
-
})(InvitationTypeEnum || (InvitationTypeEnum = {}));
|
|
111
|
-
var InvitationStatusEnum;
|
|
112
|
-
(function (InvitationStatusEnum) {
|
|
113
|
-
InvitationStatusEnum["Pending"] = "pending";
|
|
114
|
-
InvitationStatusEnum["Approved"] = "approved";
|
|
115
|
-
InvitationStatusEnum["Rejected"] = "rejected";
|
|
116
|
-
InvitationStatusEnum["Cancelled"] = "cancelled";
|
|
117
|
-
})(InvitationStatusEnum || (InvitationStatusEnum = {}));
|
|
118
|
-
|
|
119
100
|
function getVersion() {
|
|
120
101
|
try {
|
|
121
|
-
// the string ''v7.
|
|
122
|
-
return 'v7.
|
|
102
|
+
// the string ''v7.5.0-esm'' should be replaced by actual value by @rollup/plugin-replace
|
|
103
|
+
return 'v7.5.0-esm';
|
|
123
104
|
}
|
|
124
105
|
catch (error) {
|
|
125
106
|
return '__dev__';
|
|
@@ -562,7 +543,6 @@ const idResolvers = {
|
|
|
562
543
|
pinTarget: ({ targetId }) => targetId,
|
|
563
544
|
notificationTrayItem: ({ _id }) => _id,
|
|
564
545
|
notificationTraySeen: ({ userId }) => userId,
|
|
565
|
-
invitation: ({ _id }) => _id,
|
|
566
546
|
};
|
|
567
547
|
/**
|
|
568
548
|
* Retrieve the id resolver matching a domain name
|
|
@@ -615,7 +595,6 @@ const PAYLOAD2MODEL = {
|
|
|
615
595
|
pinTargets: 'pinTarget',
|
|
616
596
|
pins: 'pin',
|
|
617
597
|
notificationTrayItems: 'notificationTrayItem',
|
|
618
|
-
invitations: 'invitation',
|
|
619
598
|
};
|
|
620
599
|
/** hidden */
|
|
621
600
|
const isOutdated = (prevData, nextData) => {
|
|
@@ -22402,169 +22381,6 @@ const notificationTrayLinkedObject = (noti) => {
|
|
|
22402
22381
|
.map(user => userLinkedObject(user)) });
|
|
22403
22382
|
};
|
|
22404
22383
|
|
|
22405
|
-
/* begin_public_function
|
|
22406
|
-
id: invitation.createInvitations
|
|
22407
|
-
*/
|
|
22408
|
-
/**
|
|
22409
|
-
* ```js
|
|
22410
|
-
* import { createInvitations } from '@amityco/ts-sdk'
|
|
22411
|
-
* const created = await createInvitations({
|
|
22412
|
-
* type: string,
|
|
22413
|
-
* targetType: string,
|
|
22414
|
-
* targetId: string,
|
|
22415
|
-
* userIds: string[]
|
|
22416
|
-
* }))
|
|
22417
|
-
* ```
|
|
22418
|
-
*
|
|
22419
|
-
* Creates an {@link Amity.Invitation}
|
|
22420
|
-
*
|
|
22421
|
-
* @param bundle The data necessary to create a new {@link Amity.Invitation}
|
|
22422
|
-
* @returns The newly created {@link Amity.Invitation}
|
|
22423
|
-
*
|
|
22424
|
-
* @category Invitation API
|
|
22425
|
-
* @async
|
|
22426
|
-
*/
|
|
22427
|
-
const createInvitations = async (bundle) => {
|
|
22428
|
-
const client = getActiveClient();
|
|
22429
|
-
client.log('invitation/createInvitations', bundle);
|
|
22430
|
-
const { data } = await client.http.post('/api/v1/invitations', bundle);
|
|
22431
|
-
const cachedAt = client.cache && Date.now();
|
|
22432
|
-
if (client.cache)
|
|
22433
|
-
ingestInCache(data, { cachedAt });
|
|
22434
|
-
fireEvent('local.invitation.created', data);
|
|
22435
|
-
return {
|
|
22436
|
-
data: data.invitations,
|
|
22437
|
-
cachedAt,
|
|
22438
|
-
};
|
|
22439
|
-
};
|
|
22440
|
-
/* end_public_function */
|
|
22441
|
-
|
|
22442
|
-
/* begin_public_function
|
|
22443
|
-
id: invitation.accept
|
|
22444
|
-
*/
|
|
22445
|
-
/**
|
|
22446
|
-
* ```js
|
|
22447
|
-
* import { acceptInvitation } from '@amityco/ts-sdk'
|
|
22448
|
-
* const isAccepted = await acceptInvitation(invitationId)
|
|
22449
|
-
* ```
|
|
22450
|
-
*
|
|
22451
|
-
* Accepts a {@link Amity.Invitation} object
|
|
22452
|
-
*
|
|
22453
|
-
* @param invitationId the {@link Amity.Invitation} to accept
|
|
22454
|
-
* @returns A success boolean if the {@link Amity.Invitation} was accepted
|
|
22455
|
-
*
|
|
22456
|
-
* @category Invitation API
|
|
22457
|
-
* @async
|
|
22458
|
-
*/
|
|
22459
|
-
const acceptInvitation = async (invitationId) => {
|
|
22460
|
-
var _a;
|
|
22461
|
-
const client = getActiveClient();
|
|
22462
|
-
client.log('invitation/acceptInvitation', invitationId);
|
|
22463
|
-
const { data } = await client.http.post(`/api/v1/invitations/${invitationId}/accept`);
|
|
22464
|
-
const invitation = (_a = pullFromCache([
|
|
22465
|
-
'invitation',
|
|
22466
|
-
'get',
|
|
22467
|
-
invitationId,
|
|
22468
|
-
])) === null || _a === void 0 ? void 0 : _a.data;
|
|
22469
|
-
if (invitation) {
|
|
22470
|
-
upsertInCache(['invitation', 'get', invitationId], { status: "approved" /* InvitationStatusEnum.Approved */ });
|
|
22471
|
-
fireEvent('local.invitation.updated', { invitations: [invitation] });
|
|
22472
|
-
}
|
|
22473
|
-
return data.success;
|
|
22474
|
-
};
|
|
22475
|
-
/* end_public_function */
|
|
22476
|
-
|
|
22477
|
-
/* begin_public_function
|
|
22478
|
-
id: invitation.reject
|
|
22479
|
-
*/
|
|
22480
|
-
/**
|
|
22481
|
-
* ```js
|
|
22482
|
-
* import { rejectInvitation } from '@amityco/ts-sdk'
|
|
22483
|
-
* const isRejected = await rejectInvitation(invitationId)
|
|
22484
|
-
* ```
|
|
22485
|
-
*
|
|
22486
|
-
* Rejects a {@link Amity.Invitation} object
|
|
22487
|
-
*
|
|
22488
|
-
* @param invitationId the {@link Amity.Invitation} to reject
|
|
22489
|
-
* @returns A success boolean if the {@link Amity.Invitation} was rejected
|
|
22490
|
-
*
|
|
22491
|
-
* @category Invitation API
|
|
22492
|
-
* @async
|
|
22493
|
-
*/
|
|
22494
|
-
const rejectInvitation = async (invitationId) => {
|
|
22495
|
-
var _a;
|
|
22496
|
-
const client = getActiveClient();
|
|
22497
|
-
client.log('invitation/rejectInvitation', invitationId);
|
|
22498
|
-
const { data } = await client.http.post(`/api/v1/invitations/${invitationId}/reject`);
|
|
22499
|
-
const invitation = (_a = pullFromCache([
|
|
22500
|
-
'invitation',
|
|
22501
|
-
'get',
|
|
22502
|
-
invitationId,
|
|
22503
|
-
])) === null || _a === void 0 ? void 0 : _a.data;
|
|
22504
|
-
if (invitation) {
|
|
22505
|
-
upsertInCache(['invitation', 'get', invitationId], { status: "rejected" /* InvitationStatusEnum.Rejected */ });
|
|
22506
|
-
fireEvent('local.invitation.updated', { invitations: [invitation] });
|
|
22507
|
-
}
|
|
22508
|
-
return data.success;
|
|
22509
|
-
};
|
|
22510
|
-
/* end_public_function */
|
|
22511
|
-
|
|
22512
|
-
/* begin_public_function
|
|
22513
|
-
id: invitation.cancel
|
|
22514
|
-
*/
|
|
22515
|
-
/**
|
|
22516
|
-
* ```js
|
|
22517
|
-
* import { cancelInvitation } from '@amityco/ts-sdk'
|
|
22518
|
-
* const isCanceled = await cancelInvitation(invitationId)
|
|
22519
|
-
* ```
|
|
22520
|
-
*
|
|
22521
|
-
* Cancels a {@link Amity.Invitation} object
|
|
22522
|
-
*
|
|
22523
|
-
* @param invitationId the {@link Amity.Invitation} to cancel
|
|
22524
|
-
* @returns A success boolean if the {@link Amity.Invitation} was canceled
|
|
22525
|
-
*
|
|
22526
|
-
* @category Invitation API
|
|
22527
|
-
* @async
|
|
22528
|
-
*/
|
|
22529
|
-
const cancelInvitation = async (invitationId) => {
|
|
22530
|
-
var _a;
|
|
22531
|
-
const client = getActiveClient();
|
|
22532
|
-
client.log('invitation/cancelInvitation', invitationId);
|
|
22533
|
-
const { data } = await client.http.delete(`/api/v1/invitations/${invitationId}`);
|
|
22534
|
-
const invitation = (_a = pullFromCache([
|
|
22535
|
-
'invitation',
|
|
22536
|
-
'get',
|
|
22537
|
-
invitationId,
|
|
22538
|
-
])) === null || _a === void 0 ? void 0 : _a.data;
|
|
22539
|
-
if (invitation) {
|
|
22540
|
-
dropFromCache(['invitation', 'get', invitationId]);
|
|
22541
|
-
fireEvent('local.invitation.deleted', { invitations: [invitation] });
|
|
22542
|
-
}
|
|
22543
|
-
return data.success;
|
|
22544
|
-
};
|
|
22545
|
-
/* end_public_function */
|
|
22546
|
-
|
|
22547
|
-
const communityLinkedObject = (community) => {
|
|
22548
|
-
return Object.assign(Object.assign({}, community), { createInvitations: async (userIds) => {
|
|
22549
|
-
await createInvitations({
|
|
22550
|
-
type: "communityMemberInvite" /* InvitationTypeEnum.CommunityMemberInvite */,
|
|
22551
|
-
targetType: 'community',
|
|
22552
|
-
targetId: community.communityId,
|
|
22553
|
-
userIds,
|
|
22554
|
-
});
|
|
22555
|
-
} });
|
|
22556
|
-
};
|
|
22557
|
-
|
|
22558
|
-
const invitationLinkedObject = (invitation) => {
|
|
22559
|
-
return Object.assign(Object.assign({}, invitation), { accept: async () => {
|
|
22560
|
-
await acceptInvitation(invitation._id);
|
|
22561
|
-
}, reject: async () => {
|
|
22562
|
-
await rejectInvitation(invitation._id);
|
|
22563
|
-
}, cancel: async () => {
|
|
22564
|
-
await cancelInvitation(invitation._id);
|
|
22565
|
-
} });
|
|
22566
|
-
};
|
|
22567
|
-
|
|
22568
22384
|
const LinkedObject = {
|
|
22569
22385
|
ad: adLinkedObject,
|
|
22570
22386
|
comment: commentLinkedObject,
|
|
@@ -22579,8 +22395,6 @@ const LinkedObject = {
|
|
|
22579
22395
|
channel: channelLinkedObject,
|
|
22580
22396
|
pinnedPost: pinnedPostLinkedObject,
|
|
22581
22397
|
notificationTray: notificationTrayLinkedObject,
|
|
22582
|
-
community: communityLinkedObject,
|
|
22583
|
-
invitation: invitationLinkedObject,
|
|
22584
22398
|
};
|
|
22585
22399
|
|
|
22586
22400
|
const getChannelMessagePreviewWithUser = (channel) => {
|
|
@@ -26482,7 +26296,7 @@ const getUserUnread = (callback) => {
|
|
|
26482
26296
|
};
|
|
26483
26297
|
};
|
|
26484
26298
|
|
|
26485
|
-
var index$
|
|
26299
|
+
var index$m = /*#__PURE__*/Object.freeze({
|
|
26486
26300
|
__proto__: null,
|
|
26487
26301
|
getActiveClient: getActiveClient,
|
|
26488
26302
|
getActiveUser: getActiveUser,
|
|
@@ -27689,7 +27503,7 @@ const getMyFollowInfo = (callback) => {
|
|
|
27689
27503
|
};
|
|
27690
27504
|
/* end_public_function */
|
|
27691
27505
|
|
|
27692
|
-
var index$
|
|
27506
|
+
var index$l = /*#__PURE__*/Object.freeze({
|
|
27693
27507
|
__proto__: null,
|
|
27694
27508
|
blockUser: blockUser,
|
|
27695
27509
|
unBlockUser: unBlockUser,
|
|
@@ -28704,9 +28518,9 @@ var AmityUserSearchMatchType;
|
|
|
28704
28518
|
AmityUserSearchMatchType["PARTIAL"] = "partial";
|
|
28705
28519
|
})(AmityUserSearchMatchType || (AmityUserSearchMatchType = {}));
|
|
28706
28520
|
|
|
28707
|
-
var index$
|
|
28521
|
+
var index$k = /*#__PURE__*/Object.freeze({
|
|
28708
28522
|
__proto__: null,
|
|
28709
|
-
Relationship: index$
|
|
28523
|
+
Relationship: index$l,
|
|
28710
28524
|
getUserByIds: getUserByIds,
|
|
28711
28525
|
updateUser: updateUser,
|
|
28712
28526
|
flagUser: flagUser,
|
|
@@ -29014,7 +28828,7 @@ const updateAltText = async (fileId, altText) => {
|
|
|
29014
28828
|
};
|
|
29015
28829
|
/* end_public_function */
|
|
29016
28830
|
|
|
29017
|
-
var index$
|
|
28831
|
+
var index$j = /*#__PURE__*/Object.freeze({
|
|
29018
28832
|
__proto__: null,
|
|
29019
28833
|
getFile: getFile,
|
|
29020
28834
|
uploadFile: uploadFile,
|
|
@@ -29385,11 +29199,7 @@ function isCurrentUserPartOfCommunity(c, m) {
|
|
|
29385
29199
|
*/
|
|
29386
29200
|
function updateMembershipStatus(communities, communityUsers) {
|
|
29387
29201
|
return communities.map(c => {
|
|
29388
|
-
const cachedCommunity = pullFromCache([
|
|
29389
|
-
'community',
|
|
29390
|
-
'get',
|
|
29391
|
-
c.communityId,
|
|
29392
|
-
]);
|
|
29202
|
+
const cachedCommunity = pullFromCache(['community', 'get', c.communityId]);
|
|
29393
29203
|
if ((cachedCommunity === null || cachedCommunity === void 0 ? void 0 : cachedCommunity.data) && (cachedCommunity === null || cachedCommunity === void 0 ? void 0 : cachedCommunity.data.hasOwnProperty('isJoined'))) {
|
|
29394
29204
|
return Object.assign(Object.assign({}, cachedCommunity.data), c);
|
|
29395
29205
|
}
|
|
@@ -30886,7 +30696,7 @@ const getReactions = (params, callback, config) => {
|
|
|
30886
30696
|
};
|
|
30887
30697
|
/* end_public_function */
|
|
30888
30698
|
|
|
30889
|
-
var index$
|
|
30699
|
+
var index$i = /*#__PURE__*/Object.freeze({
|
|
30890
30700
|
__proto__: null,
|
|
30891
30701
|
addReaction: addReaction,
|
|
30892
30702
|
removeReaction: removeReaction,
|
|
@@ -32709,7 +32519,7 @@ const getMessages = (params, callback, config) => {
|
|
|
32709
32519
|
};
|
|
32710
32520
|
/* end_public_function */
|
|
32711
32521
|
|
|
32712
|
-
var index$
|
|
32522
|
+
var index$h = /*#__PURE__*/Object.freeze({
|
|
32713
32523
|
__proto__: null,
|
|
32714
32524
|
createMessage: createMessage,
|
|
32715
32525
|
updateMessage: updateMessage,
|
|
@@ -33235,7 +33045,7 @@ const stopMessageReceiptSync = (subChannelId) => {
|
|
|
33235
33045
|
};
|
|
33236
33046
|
/* end_public_function */
|
|
33237
33047
|
|
|
33238
|
-
var index$
|
|
33048
|
+
var index$g = /*#__PURE__*/Object.freeze({
|
|
33239
33049
|
__proto__: null,
|
|
33240
33050
|
getSubChannelByIds: getSubChannels$1,
|
|
33241
33051
|
createSubChannel: createSubChannel,
|
|
@@ -34549,7 +34359,7 @@ const searchMembers$1 = (params, callback, config) => {
|
|
|
34549
34359
|
};
|
|
34550
34360
|
/* end_public_function */
|
|
34551
34361
|
|
|
34552
|
-
var index$
|
|
34362
|
+
var index$f = /*#__PURE__*/Object.freeze({
|
|
34553
34363
|
__proto__: null,
|
|
34554
34364
|
addMembers: addMembers$1,
|
|
34555
34365
|
removeMembers: removeMembers$1,
|
|
@@ -34752,7 +34562,7 @@ const unmuteMembers = async (channelId, userIds) => {
|
|
|
34752
34562
|
};
|
|
34753
34563
|
/* end_public_function */
|
|
34754
34564
|
|
|
34755
|
-
var index$
|
|
34565
|
+
var index$e = /*#__PURE__*/Object.freeze({
|
|
34756
34566
|
__proto__: null,
|
|
34757
34567
|
addRole: addRole,
|
|
34758
34568
|
removeRole: removeRole,
|
|
@@ -34762,10 +34572,10 @@ var index$f = /*#__PURE__*/Object.freeze({
|
|
|
34762
34572
|
unmuteMembers: unmuteMembers
|
|
34763
34573
|
});
|
|
34764
34574
|
|
|
34765
|
-
var index$
|
|
34575
|
+
var index$d = /*#__PURE__*/Object.freeze({
|
|
34766
34576
|
__proto__: null,
|
|
34767
|
-
Membership: index$
|
|
34768
|
-
Moderation: index$
|
|
34577
|
+
Membership: index$f,
|
|
34578
|
+
Moderation: index$e,
|
|
34769
34579
|
getChannelByIds: getChannelByIds$1,
|
|
34770
34580
|
createChannel: createChannel,
|
|
34771
34581
|
updateChannel: updateChannel,
|
|
@@ -34833,7 +34643,7 @@ const getCommunities$1 = async (communityIds) => {
|
|
|
34833
34643
|
saveCommunityUsers(data.communities, data.communityUsers);
|
|
34834
34644
|
}
|
|
34835
34645
|
return {
|
|
34836
|
-
data: data.communities
|
|
34646
|
+
data: data.communities,
|
|
34837
34647
|
cachedAt,
|
|
34838
34648
|
};
|
|
34839
34649
|
};
|
|
@@ -34875,7 +34685,7 @@ getCommunities$1.locally = (communityIds) => {
|
|
|
34875
34685
|
/**
|
|
34876
34686
|
* ```js
|
|
34877
34687
|
* import { createCommunity } from '@amityco/ts-sdk'
|
|
34878
|
-
* const created = await createCommunity({ communityId: 'foobar', displayName: 'foobar'
|
|
34688
|
+
* const created = await createCommunity({ communityId: 'foobar', displayName: 'foobar' })
|
|
34879
34689
|
* ```
|
|
34880
34690
|
*
|
|
34881
34691
|
* Creates an {@link Amity.Community}
|
|
@@ -34899,7 +34709,7 @@ const createCommunity = async (bundle) => {
|
|
|
34899
34709
|
}
|
|
34900
34710
|
const { communities } = data;
|
|
34901
34711
|
return {
|
|
34902
|
-
data:
|
|
34712
|
+
data: communities[0],
|
|
34903
34713
|
cachedAt,
|
|
34904
34714
|
};
|
|
34905
34715
|
};
|
|
@@ -34936,7 +34746,7 @@ const updateCommunity = async (communityId, patch) => {
|
|
|
34936
34746
|
}
|
|
34937
34747
|
const { communities } = data;
|
|
34938
34748
|
return {
|
|
34939
|
-
data:
|
|
34749
|
+
data: communities.find(community => community.communityId === communityId),
|
|
34940
34750
|
cachedAt,
|
|
34941
34751
|
};
|
|
34942
34752
|
};
|
|
@@ -34969,7 +34779,7 @@ const getCommunity$1 = async (communityId) => {
|
|
|
34969
34779
|
}
|
|
34970
34780
|
const { communities } = data;
|
|
34971
34781
|
return {
|
|
34972
|
-
data:
|
|
34782
|
+
data: communities.find(community => community.communityId === communityId),
|
|
34973
34783
|
cachedAt,
|
|
34974
34784
|
};
|
|
34975
34785
|
};
|
|
@@ -36145,7 +35955,7 @@ const searchMembers = (params, callback, config) => {
|
|
|
36145
35955
|
};
|
|
36146
35956
|
/* end_public_function */
|
|
36147
35957
|
|
|
36148
|
-
var index$
|
|
35958
|
+
var index$c = /*#__PURE__*/Object.freeze({
|
|
36149
35959
|
__proto__: null,
|
|
36150
35960
|
addMembers: addMembers,
|
|
36151
35961
|
removeMembers: removeMembers,
|
|
@@ -37170,7 +36980,7 @@ const unbanMembers = async (communityId, userIds) => {
|
|
|
37170
36980
|
};
|
|
37171
36981
|
/* end_public_function */
|
|
37172
36982
|
|
|
37173
|
-
var index$
|
|
36983
|
+
var index$b = /*#__PURE__*/Object.freeze({
|
|
37174
36984
|
__proto__: null,
|
|
37175
36985
|
addRoles: addRoles,
|
|
37176
36986
|
removeRoles: removeRoles,
|
|
@@ -37178,10 +36988,10 @@ var index$c = /*#__PURE__*/Object.freeze({
|
|
|
37178
36988
|
unbanMembers: unbanMembers
|
|
37179
36989
|
});
|
|
37180
36990
|
|
|
37181
|
-
var index$
|
|
36991
|
+
var index$a = /*#__PURE__*/Object.freeze({
|
|
37182
36992
|
__proto__: null,
|
|
37183
|
-
Moderation: index$
|
|
37184
|
-
Membership: index$
|
|
36993
|
+
Moderation: index$b,
|
|
36994
|
+
Membership: index$c,
|
|
37185
36995
|
getCommunityByIds: getCommunities$1,
|
|
37186
36996
|
createCommunity: createCommunity,
|
|
37187
36997
|
updateCommunity: updateCommunity,
|
|
@@ -37414,7 +37224,7 @@ const getCategories = (params, callback, config) => {
|
|
|
37414
37224
|
};
|
|
37415
37225
|
/* end_public_function */
|
|
37416
37226
|
|
|
37417
|
-
var index$
|
|
37227
|
+
var index$9 = /*#__PURE__*/Object.freeze({
|
|
37418
37228
|
__proto__: null,
|
|
37419
37229
|
getCategory: getCategory,
|
|
37420
37230
|
getCategories: getCategories
|
|
@@ -37582,7 +37392,7 @@ getCustomRankingGlobalFeed.locally = (query) => {
|
|
|
37582
37392
|
: undefined;
|
|
37583
37393
|
};
|
|
37584
37394
|
|
|
37585
|
-
var index$
|
|
37395
|
+
var index$8 = /*#__PURE__*/Object.freeze({
|
|
37586
37396
|
__proto__: null,
|
|
37587
37397
|
queryGlobalFeed: queryGlobalFeed,
|
|
37588
37398
|
getCustomRankingGlobalFeed: getCustomRankingGlobalFeed
|
|
@@ -38911,7 +38721,7 @@ const getComments = (params, callback, config) => {
|
|
|
38911
38721
|
};
|
|
38912
38722
|
/* end_public_function */
|
|
38913
38723
|
|
|
38914
|
-
var index$
|
|
38724
|
+
var index$7 = /*#__PURE__*/Object.freeze({
|
|
38915
38725
|
__proto__: null,
|
|
38916
38726
|
getCommentByIds: getCommentByIds,
|
|
38917
38727
|
createComment: createComment,
|
|
@@ -39918,7 +39728,7 @@ const semanticSearchPosts = (params, callback, config) => {
|
|
|
39918
39728
|
};
|
|
39919
39729
|
};
|
|
39920
39730
|
|
|
39921
|
-
var index$
|
|
39731
|
+
var index$6 = /*#__PURE__*/Object.freeze({
|
|
39922
39732
|
__proto__: null,
|
|
39923
39733
|
getPostByIds: getPostByIds,
|
|
39924
39734
|
createPost: createPost,
|
|
@@ -40452,7 +40262,7 @@ const getStreams = (params, callback, config) => {
|
|
|
40452
40262
|
};
|
|
40453
40263
|
};
|
|
40454
40264
|
|
|
40455
|
-
var index$
|
|
40265
|
+
var index$5 = /*#__PURE__*/Object.freeze({
|
|
40456
40266
|
__proto__: null,
|
|
40457
40267
|
createStream: createStream,
|
|
40458
40268
|
updateStream: updateStream,
|
|
@@ -40739,7 +40549,7 @@ const getPoll = (pollId, callback) => {
|
|
|
40739
40549
|
};
|
|
40740
40550
|
/* end_public_function */
|
|
40741
40551
|
|
|
40742
|
-
var index$
|
|
40552
|
+
var index$4 = /*#__PURE__*/Object.freeze({
|
|
40743
40553
|
__proto__: null,
|
|
40744
40554
|
createPoll: createPoll,
|
|
40745
40555
|
closePoll: closePoll,
|
|
@@ -40750,7 +40560,7 @@ var index$5 = /*#__PURE__*/Object.freeze({
|
|
|
40750
40560
|
getPoll: getPoll
|
|
40751
40561
|
});
|
|
40752
40562
|
|
|
40753
|
-
const privateKey = "-----BEGIN PRIVATE KEY-----\
|
|
40563
|
+
const privateKey = "-----BEGIN PRIVATE KEY-----\nMIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQDHo80SecH7FuF2\nhFYnb+l26/VN8UMLXAQFLnxciNTEwkGVFMpdezlH8rU2HtUJL4RETogbAOLVY0XM\njs6sPn8G1nALmh9qeDpUtVqFOVtBHxEZ910TLOtQiunjqJKO5nWdqZ71EC3OFluR\niGQkO84BiIFbv37ub7xl3S8XarbtKoLcyVpkDHi+1wx1pgCAn6gtBUgckPL5NR8j\nLseabl3HAXQfhTCKo4tmOFM2Dxwl1IUMmIJrJg/aIU/U0tj/1Eoo7mG0JcNWX19l\nW3EecCbi0ncCJOrkUdwlBrcjaMayaX/ubEwyUeTGiLdyc4L3GRLHjyK8xgVNXRMH\nbZWJ2a5NAgMBAAECggEASxuE+35zTFO/XydKgmvIGcWL9FbgMlXb7Vcf0nBoG945\nbiz0NVc2paraIhJXc608xbYF3qLmtAE1MVBI0ORyRdBHNxY024l/6H6SH60Ed+uI\nM4ysp5ourY6Vj+DLwpdRiI9YDjqYAQDIUmhNxJP7XPhOMoZI6st+xZQBM34ic/bv\nAMSJm9OZphSp3+qXVkFZztr2mxD2EZSJJLYxi8BCdgM2qhazalbcJ6zDKHCZWVWm\n8RRxDGldyMb/237JxETzP40tAlzOZDmBAbUgEnurDJ93RVDIE3rbZUshwgeQd18a\nem096mWgvB1AIKYgsTAR3pw+V19YWAjq/glP6fz8wQKBgQD/oQq+ukKF0PRgBeM5\ngeTjSwsdGppQLmf5ndujvoiz/TpdjDEPu6R8kigQr1rG2t4K/yfdZoI8RdmJD1al\n3Q7N9hofooSy4rj6E3txzWZCHJjHad2cnCp/O26HiReGAl7wTcfTmNdiFHhZQzm5\nJBkvWAiwuvQMNfEbnXxw6/vIDwKBgQDH7fX8gsc77JLvAWgp1MaQN/sbqVb6JeT1\nFQfR8E/WFCSmzQBtNzd5KgYuCeelwr/8DyYytvN2BzCYZXp73gI1jF3YlW5jVn74\nOY6TwQ095digwo6Z0yuxopdIOApKgAkL9PRKgNrqAf3NAyMua6lOGifzjDojC3KU\nfylQmxMn4wKBgHp2B9O/H0dEBw5JQ8W0+JX6yWQz7mEjGiR2/1W+XXb8hQ1zr709\nw1r6Gb+EghRpnZ3fBpYGGbYOMFx8wKHM+N6qW3F0ReX8v2juFGE8aRSa5oYBrWzt\nU16Idjbv8hj84cZ1PJmdyvDtpYn9rpWHOZl4rxEbPvbqkIsOMyNVqdT5AoGAOSge\nmwIIU2le2FVeohbibXiToWTYKMuMmURZ5/r72AgKMmWJKbAPe+Q3wBG01/7FRBpQ\noU8Ma0HC8s6QJbliiEyIx9JwrJWd1vkdecBHONrtA4ibm/5zD2WcOllLF+FitLhi\n3qnX6+6F0IaFGFBPJrTzlv0P4dTz/OAdv52V7GECgYEA2TttOKBAqWllgOaZOkql\nLVMJVmgR7s6tLi1+cEP8ZcapV9aRbRzTAKXm4f8AEhtlG9F9kCOvHYCYGi6JaiWJ\nZkHjeex3T+eE6Di6y5Bm/Ift5jtVhJ4jCVwHOKTMej79NPUFTJfv8hCo29haBDv6\nRXFrv+T21KCcw8k3sJeJWWQ=\n-----END PRIVATE KEY-----";
|
|
40754
40564
|
/*
|
|
40755
40565
|
* The crypto algorithm used for importing key and signing string
|
|
40756
40566
|
*/
|
|
@@ -41110,7 +40920,7 @@ const getPlayer = async (parameters) => {
|
|
|
41110
40920
|
return video;
|
|
41111
40921
|
};
|
|
41112
40922
|
|
|
41113
|
-
var index$
|
|
40923
|
+
var index$3 = /*#__PURE__*/Object.freeze({
|
|
41114
40924
|
__proto__: null,
|
|
41115
40925
|
getPlayer: getPlayer
|
|
41116
40926
|
});
|
|
@@ -42283,7 +42093,7 @@ const getGlobalStoryTargets = (params, callback, config) => {
|
|
|
42283
42093
|
};
|
|
42284
42094
|
};
|
|
42285
42095
|
|
|
42286
|
-
var index$
|
|
42096
|
+
var index$2 = /*#__PURE__*/Object.freeze({
|
|
42287
42097
|
__proto__: null,
|
|
42288
42098
|
createImageStory: createImageStory,
|
|
42289
42099
|
createVideoStory: createVideoStory,
|
|
@@ -42320,7 +42130,7 @@ const getNetworkAds = async () => {
|
|
|
42320
42130
|
};
|
|
42321
42131
|
};
|
|
42322
42132
|
|
|
42323
|
-
var index$
|
|
42133
|
+
var index$1 = /*#__PURE__*/Object.freeze({
|
|
42324
42134
|
__proto__: null,
|
|
42325
42135
|
getNetworkAds: getNetworkAds
|
|
42326
42136
|
});
|
|
@@ -42711,7 +42521,7 @@ const markTraySeen = async (lastSeenAt) => {
|
|
|
42711
42521
|
};
|
|
42712
42522
|
/* end_public_function */
|
|
42713
42523
|
|
|
42714
|
-
var index
|
|
42524
|
+
var index = /*#__PURE__*/Object.freeze({
|
|
42715
42525
|
__proto__: null,
|
|
42716
42526
|
getNotificationTraySeen: getNotificationTraySeen,
|
|
42717
42527
|
getNotificationTrayItems: getNotificationTrayItems,
|
|
@@ -42720,34 +42530,4 @@ var index$1 = /*#__PURE__*/Object.freeze({
|
|
|
42720
42530
|
onNotificationTraySeenUpdated: onNotificationTraySeenUpdated
|
|
42721
42531
|
});
|
|
42722
42532
|
|
|
42723
|
-
|
|
42724
|
-
* ```js
|
|
42725
|
-
* import { onLocalInvitationCreated } from '@amityco/ts-sdk'
|
|
42726
|
-
* const dispose = onLocalInvitationCreated(data => {
|
|
42727
|
-
* // ...
|
|
42728
|
-
* })
|
|
42729
|
-
* ```
|
|
42730
|
-
*
|
|
42731
|
-
* Fired when an {@link Amity.InvitationPayload} has been created
|
|
42732
|
-
*
|
|
42733
|
-
* @param callback The function to call when the event was fired
|
|
42734
|
-
* @returns an {@link Amity.Unsubscriber} function to stop listening
|
|
42735
|
-
*
|
|
42736
|
-
* @category Invitation Events
|
|
42737
|
-
*/
|
|
42738
|
-
const onLocalInvitationCreated = (callback) => {
|
|
42739
|
-
const client = getActiveClient();
|
|
42740
|
-
const disposers = [
|
|
42741
|
-
createEventSubscriber(client, 'onLocalInvitationCreated', 'local.invitation.created', payload => callback(payload)),
|
|
42742
|
-
];
|
|
42743
|
-
return () => {
|
|
42744
|
-
disposers.forEach(fn => fn());
|
|
42745
|
-
};
|
|
42746
|
-
};
|
|
42747
|
-
|
|
42748
|
-
var index = /*#__PURE__*/Object.freeze({
|
|
42749
|
-
__proto__: null,
|
|
42750
|
-
onLocalInvitationCreated: onLocalInvitationCreated
|
|
42751
|
-
});
|
|
42752
|
-
|
|
42753
|
-
export { API_REGIONS, index$2 as AdRepository, index$a as CategoryRepository, index$e as ChannelRepository, index$n as Client, index$8 as CommentRepository, CommunityPostSettingMaps, CommunityPostSettings, index$b as CommunityRepository, ContentFeedType, ContentFlagReasonEnum, DefaultCommunityPostSetting, index$9 as FeedRepository, FileAccessTypeEnum, index$k as FileRepository, FileType, index as InvitationRepository, InvitationStatusEnum, InvitationTypeEnum, index$4 as LiveStreamPlayer, MembershipAcceptanceTypeEnum, MessageContentType, index$i as MessageRepository, index$5 as PollRepository, PostContentType, index$7 as PostRepository, index$j as ReactionRepository, index$3 as StoryRepository, index$6 as StreamRepository, index$h as SubChannelRepository, SubscriptionLevels, index$l as UserRepository, VERSION, VideoResolution, VideoSize, VideoTranscodingStatus, backupCache, createQuery, createReport, createUserToken, deleteReport, disableCache, dropFromCache, enableCache, filterByChannelMembership, filterByCommunityMembership, filterByFeedType, filterByPostDataTypes, filterByPropEquality, filterByPropInclusion, filterByPropIntersection, filterBySearchTerm, filterByStringComparePartially, getChannelTopic, getCommentTopic, getCommunityStoriesTopic, getCommunityTopic, getLiveStreamTopic, getMarkedMessageTopic, getMarkerUserFeedTopic, getMessageTopic, getMyFollowersTopic, getMyFollowingsTopic, getNetworkTopic, getPostTopic, getRole, getSmartFeedChannelTopic, getSmartFeedMessageTopic, getSmartFeedSubChannelTopic, getStoryTopic, getSubChannelTopic, getUserTopic, isAfterBefore, isAfterBeforeRaw, isCachable, isFetcher, isFresh, isLocal, isMutator, isOffline, isPaged, isReportedByMe, isSkip, mergeInCache, index$1 as notificationTray, onChannelMarkerFetched, onFeedMarkerFetched, onFeedMarkerUpdated, onMessageMarked, onMessageMarkerFetched, onSubChannelMarkerFetched, onSubChannelMarkerUpdated, onUserMarkerFetched, onUserMarkerFetchedLegacy, pullFromCache, pushToCache, queryCache, queryOptions, queryRoles, restoreCache, runQuery, sortByChannelSegment, sortByDisplayName, sortByFirstCreated, sortByFirstUpdated, sortByLastActivity, sortByLastCreated, sortByLastUpdated, sortByLocalSortingDate, sortByName, sortBySegmentNumber, subscribeTopic, toPage, toPageRaw, toToken, upsertInCache, wipeCache };
|
|
42533
|
+
export { API_REGIONS, index$1 as AdRepository, index$9 as CategoryRepository, index$d as ChannelRepository, index$m as Client, index$7 as CommentRepository, CommunityPostSettingMaps, CommunityPostSettings, index$a as CommunityRepository, ContentFeedType, ContentFlagReasonEnum, DefaultCommunityPostSetting, index$8 as FeedRepository, FileAccessTypeEnum, index$j as FileRepository, FileType, index$3 as LiveStreamPlayer, MessageContentType, index$h as MessageRepository, index$4 as PollRepository, PostContentType, index$6 as PostRepository, index$i as ReactionRepository, index$2 as StoryRepository, index$5 as StreamRepository, index$g as SubChannelRepository, SubscriptionLevels, index$k as UserRepository, VERSION, VideoResolution, VideoSize, VideoTranscodingStatus, backupCache, createQuery, createReport, createUserToken, deleteReport, disableCache, dropFromCache, enableCache, filterByChannelMembership, filterByCommunityMembership, filterByFeedType, filterByPostDataTypes, filterByPropEquality, filterByPropInclusion, filterByPropIntersection, filterBySearchTerm, filterByStringComparePartially, getChannelTopic, getCommentTopic, getCommunityStoriesTopic, getCommunityTopic, getLiveStreamTopic, getMarkedMessageTopic, getMarkerUserFeedTopic, getMessageTopic, getMyFollowersTopic, getMyFollowingsTopic, getNetworkTopic, getPostTopic, getRole, getSmartFeedChannelTopic, getSmartFeedMessageTopic, getSmartFeedSubChannelTopic, getStoryTopic, getSubChannelTopic, getUserTopic, isAfterBefore, isAfterBeforeRaw, isCachable, isFetcher, isFresh, isLocal, isMutator, isOffline, isPaged, isReportedByMe, isSkip, mergeInCache, index as notificationTray, onChannelMarkerFetched, onFeedMarkerFetched, onFeedMarkerUpdated, onMessageMarked, onMessageMarkerFetched, onSubChannelMarkerFetched, onSubChannelMarkerUpdated, onUserMarkerFetched, onUserMarkerFetchedLegacy, pullFromCache, pushToCache, queryCache, queryOptions, queryRoles, restoreCache, runQuery, sortByChannelSegment, sortByDisplayName, sortByFirstCreated, sortByFirstUpdated, sortByLastActivity, sortByLastCreated, sortByLastUpdated, sortByLocalSortingDate, sortByName, sortBySegmentNumber, subscribeTopic, toPage, toPageRaw, toToken, upsertInCache, wipeCache };
|