@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.cjs.js
CHANGED
|
@@ -23,12 +23,6 @@ var uuid__default = /*#__PURE__*/_interopDefaultLegacy(uuid$1);
|
|
|
23
23
|
var hash__default = /*#__PURE__*/_interopDefaultLegacy(hash);
|
|
24
24
|
var Hls__default = /*#__PURE__*/_interopDefaultLegacy(Hls);
|
|
25
25
|
|
|
26
|
-
exports.MembershipAcceptanceTypeEnum = void 0;
|
|
27
|
-
(function (MembershipAcceptanceTypeEnum) {
|
|
28
|
-
MembershipAcceptanceTypeEnum["AUTOMATIC"] = "automatic";
|
|
29
|
-
MembershipAcceptanceTypeEnum["INVITATION"] = "invitation";
|
|
30
|
-
})(exports.MembershipAcceptanceTypeEnum || (exports.MembershipAcceptanceTypeEnum = {}));
|
|
31
|
-
|
|
32
26
|
const FileType = Object.freeze({
|
|
33
27
|
FILE: 'file',
|
|
34
28
|
IMAGE: 'image',
|
|
@@ -118,23 +112,10 @@ const PostContentType = Object.freeze({
|
|
|
118
112
|
POLL: 'poll',
|
|
119
113
|
});
|
|
120
114
|
|
|
121
|
-
exports.InvitationTypeEnum = void 0;
|
|
122
|
-
(function (InvitationTypeEnum) {
|
|
123
|
-
InvitationTypeEnum["CommunityMemberInvite"] = "communityMemberInvite";
|
|
124
|
-
InvitationTypeEnum["LivestreamInvite"] = "livestreamInvite";
|
|
125
|
-
})(exports.InvitationTypeEnum || (exports.InvitationTypeEnum = {}));
|
|
126
|
-
exports.InvitationStatusEnum = void 0;
|
|
127
|
-
(function (InvitationStatusEnum) {
|
|
128
|
-
InvitationStatusEnum["Pending"] = "pending";
|
|
129
|
-
InvitationStatusEnum["Approved"] = "approved";
|
|
130
|
-
InvitationStatusEnum["Rejected"] = "rejected";
|
|
131
|
-
InvitationStatusEnum["Cancelled"] = "cancelled";
|
|
132
|
-
})(exports.InvitationStatusEnum || (exports.InvitationStatusEnum = {}));
|
|
133
|
-
|
|
134
115
|
function getVersion() {
|
|
135
116
|
try {
|
|
136
|
-
// the string ''v7.
|
|
137
|
-
return 'v7.
|
|
117
|
+
// the string ''v7.5.0-cjs'' should be replaced by actual value by @rollup/plugin-replace
|
|
118
|
+
return 'v7.5.0-cjs';
|
|
138
119
|
}
|
|
139
120
|
catch (error) {
|
|
140
121
|
return '__dev__';
|
|
@@ -577,7 +558,6 @@ const idResolvers = {
|
|
|
577
558
|
pinTarget: ({ targetId }) => targetId,
|
|
578
559
|
notificationTrayItem: ({ _id }) => _id,
|
|
579
560
|
notificationTraySeen: ({ userId }) => userId,
|
|
580
|
-
invitation: ({ _id }) => _id,
|
|
581
561
|
};
|
|
582
562
|
/**
|
|
583
563
|
* Retrieve the id resolver matching a domain name
|
|
@@ -630,7 +610,6 @@ const PAYLOAD2MODEL = {
|
|
|
630
610
|
pinTargets: 'pinTarget',
|
|
631
611
|
pins: 'pin',
|
|
632
612
|
notificationTrayItems: 'notificationTrayItem',
|
|
633
|
-
invitations: 'invitation',
|
|
634
613
|
};
|
|
635
614
|
/** hidden */
|
|
636
615
|
const isOutdated = (prevData, nextData) => {
|
|
@@ -6310,169 +6289,6 @@ const notificationTrayLinkedObject = (noti) => {
|
|
|
6310
6289
|
.map(user => userLinkedObject(user)) });
|
|
6311
6290
|
};
|
|
6312
6291
|
|
|
6313
|
-
/* begin_public_function
|
|
6314
|
-
id: invitation.createInvitations
|
|
6315
|
-
*/
|
|
6316
|
-
/**
|
|
6317
|
-
* ```js
|
|
6318
|
-
* import { createInvitations } from '@amityco/ts-sdk'
|
|
6319
|
-
* const created = await createInvitations({
|
|
6320
|
-
* type: string,
|
|
6321
|
-
* targetType: string,
|
|
6322
|
-
* targetId: string,
|
|
6323
|
-
* userIds: string[]
|
|
6324
|
-
* }))
|
|
6325
|
-
* ```
|
|
6326
|
-
*
|
|
6327
|
-
* Creates an {@link Amity.Invitation}
|
|
6328
|
-
*
|
|
6329
|
-
* @param bundle The data necessary to create a new {@link Amity.Invitation}
|
|
6330
|
-
* @returns The newly created {@link Amity.Invitation}
|
|
6331
|
-
*
|
|
6332
|
-
* @category Invitation API
|
|
6333
|
-
* @async
|
|
6334
|
-
*/
|
|
6335
|
-
const createInvitations = async (bundle) => {
|
|
6336
|
-
const client = getActiveClient();
|
|
6337
|
-
client.log('invitation/createInvitations', bundle);
|
|
6338
|
-
const { data } = await client.http.post('/api/v1/invitations', bundle);
|
|
6339
|
-
const cachedAt = client.cache && Date.now();
|
|
6340
|
-
if (client.cache)
|
|
6341
|
-
ingestInCache(data, { cachedAt });
|
|
6342
|
-
fireEvent('local.invitation.created', data);
|
|
6343
|
-
return {
|
|
6344
|
-
data: data.invitations,
|
|
6345
|
-
cachedAt,
|
|
6346
|
-
};
|
|
6347
|
-
};
|
|
6348
|
-
/* end_public_function */
|
|
6349
|
-
|
|
6350
|
-
/* begin_public_function
|
|
6351
|
-
id: invitation.accept
|
|
6352
|
-
*/
|
|
6353
|
-
/**
|
|
6354
|
-
* ```js
|
|
6355
|
-
* import { acceptInvitation } from '@amityco/ts-sdk'
|
|
6356
|
-
* const isAccepted = await acceptInvitation(invitationId)
|
|
6357
|
-
* ```
|
|
6358
|
-
*
|
|
6359
|
-
* Accepts a {@link Amity.Invitation} object
|
|
6360
|
-
*
|
|
6361
|
-
* @param invitationId the {@link Amity.Invitation} to accept
|
|
6362
|
-
* @returns A success boolean if the {@link Amity.Invitation} was accepted
|
|
6363
|
-
*
|
|
6364
|
-
* @category Invitation API
|
|
6365
|
-
* @async
|
|
6366
|
-
*/
|
|
6367
|
-
const acceptInvitation = async (invitationId) => {
|
|
6368
|
-
var _a;
|
|
6369
|
-
const client = getActiveClient();
|
|
6370
|
-
client.log('invitation/acceptInvitation', invitationId);
|
|
6371
|
-
const { data } = await client.http.post(`/api/v1/invitations/${invitationId}/accept`);
|
|
6372
|
-
const invitation = (_a = pullFromCache([
|
|
6373
|
-
'invitation',
|
|
6374
|
-
'get',
|
|
6375
|
-
invitationId,
|
|
6376
|
-
])) === null || _a === void 0 ? void 0 : _a.data;
|
|
6377
|
-
if (invitation) {
|
|
6378
|
-
upsertInCache(['invitation', 'get', invitationId], { status: "approved" /* InvitationStatusEnum.Approved */ });
|
|
6379
|
-
fireEvent('local.invitation.updated', { invitations: [invitation] });
|
|
6380
|
-
}
|
|
6381
|
-
return data.success;
|
|
6382
|
-
};
|
|
6383
|
-
/* end_public_function */
|
|
6384
|
-
|
|
6385
|
-
/* begin_public_function
|
|
6386
|
-
id: invitation.reject
|
|
6387
|
-
*/
|
|
6388
|
-
/**
|
|
6389
|
-
* ```js
|
|
6390
|
-
* import { rejectInvitation } from '@amityco/ts-sdk'
|
|
6391
|
-
* const isRejected = await rejectInvitation(invitationId)
|
|
6392
|
-
* ```
|
|
6393
|
-
*
|
|
6394
|
-
* Rejects a {@link Amity.Invitation} object
|
|
6395
|
-
*
|
|
6396
|
-
* @param invitationId the {@link Amity.Invitation} to reject
|
|
6397
|
-
* @returns A success boolean if the {@link Amity.Invitation} was rejected
|
|
6398
|
-
*
|
|
6399
|
-
* @category Invitation API
|
|
6400
|
-
* @async
|
|
6401
|
-
*/
|
|
6402
|
-
const rejectInvitation = async (invitationId) => {
|
|
6403
|
-
var _a;
|
|
6404
|
-
const client = getActiveClient();
|
|
6405
|
-
client.log('invitation/rejectInvitation', invitationId);
|
|
6406
|
-
const { data } = await client.http.post(`/api/v1/invitations/${invitationId}/reject`);
|
|
6407
|
-
const invitation = (_a = pullFromCache([
|
|
6408
|
-
'invitation',
|
|
6409
|
-
'get',
|
|
6410
|
-
invitationId,
|
|
6411
|
-
])) === null || _a === void 0 ? void 0 : _a.data;
|
|
6412
|
-
if (invitation) {
|
|
6413
|
-
upsertInCache(['invitation', 'get', invitationId], { status: "rejected" /* InvitationStatusEnum.Rejected */ });
|
|
6414
|
-
fireEvent('local.invitation.updated', { invitations: [invitation] });
|
|
6415
|
-
}
|
|
6416
|
-
return data.success;
|
|
6417
|
-
};
|
|
6418
|
-
/* end_public_function */
|
|
6419
|
-
|
|
6420
|
-
/* begin_public_function
|
|
6421
|
-
id: invitation.cancel
|
|
6422
|
-
*/
|
|
6423
|
-
/**
|
|
6424
|
-
* ```js
|
|
6425
|
-
* import { cancelInvitation } from '@amityco/ts-sdk'
|
|
6426
|
-
* const isCanceled = await cancelInvitation(invitationId)
|
|
6427
|
-
* ```
|
|
6428
|
-
*
|
|
6429
|
-
* Cancels a {@link Amity.Invitation} object
|
|
6430
|
-
*
|
|
6431
|
-
* @param invitationId the {@link Amity.Invitation} to cancel
|
|
6432
|
-
* @returns A success boolean if the {@link Amity.Invitation} was canceled
|
|
6433
|
-
*
|
|
6434
|
-
* @category Invitation API
|
|
6435
|
-
* @async
|
|
6436
|
-
*/
|
|
6437
|
-
const cancelInvitation = async (invitationId) => {
|
|
6438
|
-
var _a;
|
|
6439
|
-
const client = getActiveClient();
|
|
6440
|
-
client.log('invitation/cancelInvitation', invitationId);
|
|
6441
|
-
const { data } = await client.http.delete(`/api/v1/invitations/${invitationId}`);
|
|
6442
|
-
const invitation = (_a = pullFromCache([
|
|
6443
|
-
'invitation',
|
|
6444
|
-
'get',
|
|
6445
|
-
invitationId,
|
|
6446
|
-
])) === null || _a === void 0 ? void 0 : _a.data;
|
|
6447
|
-
if (invitation) {
|
|
6448
|
-
dropFromCache(['invitation', 'get', invitationId]);
|
|
6449
|
-
fireEvent('local.invitation.deleted', { invitations: [invitation] });
|
|
6450
|
-
}
|
|
6451
|
-
return data.success;
|
|
6452
|
-
};
|
|
6453
|
-
/* end_public_function */
|
|
6454
|
-
|
|
6455
|
-
const communityLinkedObject = (community) => {
|
|
6456
|
-
return Object.assign(Object.assign({}, community), { createInvitations: async (userIds) => {
|
|
6457
|
-
await createInvitations({
|
|
6458
|
-
type: "communityMemberInvite" /* InvitationTypeEnum.CommunityMemberInvite */,
|
|
6459
|
-
targetType: 'community',
|
|
6460
|
-
targetId: community.communityId,
|
|
6461
|
-
userIds,
|
|
6462
|
-
});
|
|
6463
|
-
} });
|
|
6464
|
-
};
|
|
6465
|
-
|
|
6466
|
-
const invitationLinkedObject = (invitation) => {
|
|
6467
|
-
return Object.assign(Object.assign({}, invitation), { accept: async () => {
|
|
6468
|
-
await acceptInvitation(invitation._id);
|
|
6469
|
-
}, reject: async () => {
|
|
6470
|
-
await rejectInvitation(invitation._id);
|
|
6471
|
-
}, cancel: async () => {
|
|
6472
|
-
await cancelInvitation(invitation._id);
|
|
6473
|
-
} });
|
|
6474
|
-
};
|
|
6475
|
-
|
|
6476
6292
|
const LinkedObject = {
|
|
6477
6293
|
ad: adLinkedObject,
|
|
6478
6294
|
comment: commentLinkedObject,
|
|
@@ -6487,8 +6303,6 @@ const LinkedObject = {
|
|
|
6487
6303
|
channel: channelLinkedObject,
|
|
6488
6304
|
pinnedPost: pinnedPostLinkedObject,
|
|
6489
6305
|
notificationTray: notificationTrayLinkedObject,
|
|
6490
|
-
community: communityLinkedObject,
|
|
6491
|
-
invitation: invitationLinkedObject,
|
|
6492
6306
|
};
|
|
6493
6307
|
|
|
6494
6308
|
const getChannelMessagePreviewWithUser = (channel) => {
|
|
@@ -10390,7 +10204,7 @@ const getUserUnread = (callback) => {
|
|
|
10390
10204
|
};
|
|
10391
10205
|
};
|
|
10392
10206
|
|
|
10393
|
-
var index$
|
|
10207
|
+
var index$m = /*#__PURE__*/Object.freeze({
|
|
10394
10208
|
__proto__: null,
|
|
10395
10209
|
getActiveClient: getActiveClient,
|
|
10396
10210
|
getActiveUser: getActiveUser,
|
|
@@ -11597,7 +11411,7 @@ const getMyFollowInfo = (callback) => {
|
|
|
11597
11411
|
};
|
|
11598
11412
|
/* end_public_function */
|
|
11599
11413
|
|
|
11600
|
-
var index$
|
|
11414
|
+
var index$l = /*#__PURE__*/Object.freeze({
|
|
11601
11415
|
__proto__: null,
|
|
11602
11416
|
blockUser: blockUser,
|
|
11603
11417
|
unBlockUser: unBlockUser,
|
|
@@ -12612,9 +12426,9 @@ var AmityUserSearchMatchType;
|
|
|
12612
12426
|
AmityUserSearchMatchType["PARTIAL"] = "partial";
|
|
12613
12427
|
})(AmityUserSearchMatchType || (AmityUserSearchMatchType = {}));
|
|
12614
12428
|
|
|
12615
|
-
var index$
|
|
12429
|
+
var index$k = /*#__PURE__*/Object.freeze({
|
|
12616
12430
|
__proto__: null,
|
|
12617
|
-
Relationship: index$
|
|
12431
|
+
Relationship: index$l,
|
|
12618
12432
|
getUserByIds: getUserByIds,
|
|
12619
12433
|
updateUser: updateUser,
|
|
12620
12434
|
flagUser: flagUser,
|
|
@@ -12922,7 +12736,7 @@ const updateAltText = async (fileId, altText) => {
|
|
|
12922
12736
|
};
|
|
12923
12737
|
/* end_public_function */
|
|
12924
12738
|
|
|
12925
|
-
var index$
|
|
12739
|
+
var index$j = /*#__PURE__*/Object.freeze({
|
|
12926
12740
|
__proto__: null,
|
|
12927
12741
|
getFile: getFile,
|
|
12928
12742
|
uploadFile: uploadFile,
|
|
@@ -13293,11 +13107,7 @@ function isCurrentUserPartOfCommunity(c, m) {
|
|
|
13293
13107
|
*/
|
|
13294
13108
|
function updateMembershipStatus(communities, communityUsers) {
|
|
13295
13109
|
return communities.map(c => {
|
|
13296
|
-
const cachedCommunity = pullFromCache([
|
|
13297
|
-
'community',
|
|
13298
|
-
'get',
|
|
13299
|
-
c.communityId,
|
|
13300
|
-
]);
|
|
13110
|
+
const cachedCommunity = pullFromCache(['community', 'get', c.communityId]);
|
|
13301
13111
|
if ((cachedCommunity === null || cachedCommunity === void 0 ? void 0 : cachedCommunity.data) && (cachedCommunity === null || cachedCommunity === void 0 ? void 0 : cachedCommunity.data.hasOwnProperty('isJoined'))) {
|
|
13302
13112
|
return Object.assign(Object.assign({}, cachedCommunity.data), c);
|
|
13303
13113
|
}
|
|
@@ -14794,7 +14604,7 @@ const getReactions = (params, callback, config) => {
|
|
|
14794
14604
|
};
|
|
14795
14605
|
/* end_public_function */
|
|
14796
14606
|
|
|
14797
|
-
var index$
|
|
14607
|
+
var index$i = /*#__PURE__*/Object.freeze({
|
|
14798
14608
|
__proto__: null,
|
|
14799
14609
|
addReaction: addReaction,
|
|
14800
14610
|
removeReaction: removeReaction,
|
|
@@ -16617,7 +16427,7 @@ const getMessages = (params, callback, config) => {
|
|
|
16617
16427
|
};
|
|
16618
16428
|
/* end_public_function */
|
|
16619
16429
|
|
|
16620
|
-
var index$
|
|
16430
|
+
var index$h = /*#__PURE__*/Object.freeze({
|
|
16621
16431
|
__proto__: null,
|
|
16622
16432
|
createMessage: createMessage,
|
|
16623
16433
|
updateMessage: updateMessage,
|
|
@@ -17143,7 +16953,7 @@ const stopMessageReceiptSync = (subChannelId) => {
|
|
|
17143
16953
|
};
|
|
17144
16954
|
/* end_public_function */
|
|
17145
16955
|
|
|
17146
|
-
var index$
|
|
16956
|
+
var index$g = /*#__PURE__*/Object.freeze({
|
|
17147
16957
|
__proto__: null,
|
|
17148
16958
|
getSubChannelByIds: getSubChannels$1,
|
|
17149
16959
|
createSubChannel: createSubChannel,
|
|
@@ -18457,7 +18267,7 @@ const searchMembers$1 = (params, callback, config) => {
|
|
|
18457
18267
|
};
|
|
18458
18268
|
/* end_public_function */
|
|
18459
18269
|
|
|
18460
|
-
var index$
|
|
18270
|
+
var index$f = /*#__PURE__*/Object.freeze({
|
|
18461
18271
|
__proto__: null,
|
|
18462
18272
|
addMembers: addMembers$1,
|
|
18463
18273
|
removeMembers: removeMembers$1,
|
|
@@ -18660,7 +18470,7 @@ const unmuteMembers = async (channelId, userIds) => {
|
|
|
18660
18470
|
};
|
|
18661
18471
|
/* end_public_function */
|
|
18662
18472
|
|
|
18663
|
-
var index$
|
|
18473
|
+
var index$e = /*#__PURE__*/Object.freeze({
|
|
18664
18474
|
__proto__: null,
|
|
18665
18475
|
addRole: addRole,
|
|
18666
18476
|
removeRole: removeRole,
|
|
@@ -18670,10 +18480,10 @@ var index$f = /*#__PURE__*/Object.freeze({
|
|
|
18670
18480
|
unmuteMembers: unmuteMembers
|
|
18671
18481
|
});
|
|
18672
18482
|
|
|
18673
|
-
var index$
|
|
18483
|
+
var index$d = /*#__PURE__*/Object.freeze({
|
|
18674
18484
|
__proto__: null,
|
|
18675
|
-
Membership: index$
|
|
18676
|
-
Moderation: index$
|
|
18485
|
+
Membership: index$f,
|
|
18486
|
+
Moderation: index$e,
|
|
18677
18487
|
getChannelByIds: getChannelByIds$1,
|
|
18678
18488
|
createChannel: createChannel,
|
|
18679
18489
|
updateChannel: updateChannel,
|
|
@@ -18741,7 +18551,7 @@ const getCommunities$1 = async (communityIds) => {
|
|
|
18741
18551
|
saveCommunityUsers(data.communities, data.communityUsers);
|
|
18742
18552
|
}
|
|
18743
18553
|
return {
|
|
18744
|
-
data: data.communities
|
|
18554
|
+
data: data.communities,
|
|
18745
18555
|
cachedAt,
|
|
18746
18556
|
};
|
|
18747
18557
|
};
|
|
@@ -18783,7 +18593,7 @@ getCommunities$1.locally = (communityIds) => {
|
|
|
18783
18593
|
/**
|
|
18784
18594
|
* ```js
|
|
18785
18595
|
* import { createCommunity } from '@amityco/ts-sdk'
|
|
18786
|
-
* const created = await createCommunity({ communityId: 'foobar', displayName: 'foobar'
|
|
18596
|
+
* const created = await createCommunity({ communityId: 'foobar', displayName: 'foobar' })
|
|
18787
18597
|
* ```
|
|
18788
18598
|
*
|
|
18789
18599
|
* Creates an {@link Amity.Community}
|
|
@@ -18807,7 +18617,7 @@ const createCommunity = async (bundle) => {
|
|
|
18807
18617
|
}
|
|
18808
18618
|
const { communities } = data;
|
|
18809
18619
|
return {
|
|
18810
|
-
data:
|
|
18620
|
+
data: communities[0],
|
|
18811
18621
|
cachedAt,
|
|
18812
18622
|
};
|
|
18813
18623
|
};
|
|
@@ -18844,7 +18654,7 @@ const updateCommunity = async (communityId, patch) => {
|
|
|
18844
18654
|
}
|
|
18845
18655
|
const { communities } = data;
|
|
18846
18656
|
return {
|
|
18847
|
-
data:
|
|
18657
|
+
data: communities.find(community => community.communityId === communityId),
|
|
18848
18658
|
cachedAt,
|
|
18849
18659
|
};
|
|
18850
18660
|
};
|
|
@@ -18877,7 +18687,7 @@ const getCommunity$1 = async (communityId) => {
|
|
|
18877
18687
|
}
|
|
18878
18688
|
const { communities } = data;
|
|
18879
18689
|
return {
|
|
18880
|
-
data:
|
|
18690
|
+
data: communities.find(community => community.communityId === communityId),
|
|
18881
18691
|
cachedAt,
|
|
18882
18692
|
};
|
|
18883
18693
|
};
|
|
@@ -20053,7 +19863,7 @@ const searchMembers = (params, callback, config) => {
|
|
|
20053
19863
|
};
|
|
20054
19864
|
/* end_public_function */
|
|
20055
19865
|
|
|
20056
|
-
var index$
|
|
19866
|
+
var index$c = /*#__PURE__*/Object.freeze({
|
|
20057
19867
|
__proto__: null,
|
|
20058
19868
|
addMembers: addMembers,
|
|
20059
19869
|
removeMembers: removeMembers,
|
|
@@ -21078,7 +20888,7 @@ const unbanMembers = async (communityId, userIds) => {
|
|
|
21078
20888
|
};
|
|
21079
20889
|
/* end_public_function */
|
|
21080
20890
|
|
|
21081
|
-
var index$
|
|
20891
|
+
var index$b = /*#__PURE__*/Object.freeze({
|
|
21082
20892
|
__proto__: null,
|
|
21083
20893
|
addRoles: addRoles,
|
|
21084
20894
|
removeRoles: removeRoles,
|
|
@@ -21086,10 +20896,10 @@ var index$c = /*#__PURE__*/Object.freeze({
|
|
|
21086
20896
|
unbanMembers: unbanMembers
|
|
21087
20897
|
});
|
|
21088
20898
|
|
|
21089
|
-
var index$
|
|
20899
|
+
var index$a = /*#__PURE__*/Object.freeze({
|
|
21090
20900
|
__proto__: null,
|
|
21091
|
-
Moderation: index$
|
|
21092
|
-
Membership: index$
|
|
20901
|
+
Moderation: index$b,
|
|
20902
|
+
Membership: index$c,
|
|
21093
20903
|
getCommunityByIds: getCommunities$1,
|
|
21094
20904
|
createCommunity: createCommunity,
|
|
21095
20905
|
updateCommunity: updateCommunity,
|
|
@@ -21322,7 +21132,7 @@ const getCategories = (params, callback, config) => {
|
|
|
21322
21132
|
};
|
|
21323
21133
|
/* end_public_function */
|
|
21324
21134
|
|
|
21325
|
-
var index$
|
|
21135
|
+
var index$9 = /*#__PURE__*/Object.freeze({
|
|
21326
21136
|
__proto__: null,
|
|
21327
21137
|
getCategory: getCategory,
|
|
21328
21138
|
getCategories: getCategories
|
|
@@ -21490,7 +21300,7 @@ getCustomRankingGlobalFeed.locally = (query) => {
|
|
|
21490
21300
|
: undefined;
|
|
21491
21301
|
};
|
|
21492
21302
|
|
|
21493
|
-
var index$
|
|
21303
|
+
var index$8 = /*#__PURE__*/Object.freeze({
|
|
21494
21304
|
__proto__: null,
|
|
21495
21305
|
queryGlobalFeed: queryGlobalFeed,
|
|
21496
21306
|
getCustomRankingGlobalFeed: getCustomRankingGlobalFeed
|
|
@@ -22819,7 +22629,7 @@ const getComments = (params, callback, config) => {
|
|
|
22819
22629
|
};
|
|
22820
22630
|
/* end_public_function */
|
|
22821
22631
|
|
|
22822
|
-
var index$
|
|
22632
|
+
var index$7 = /*#__PURE__*/Object.freeze({
|
|
22823
22633
|
__proto__: null,
|
|
22824
22634
|
getCommentByIds: getCommentByIds,
|
|
22825
22635
|
createComment: createComment,
|
|
@@ -23826,7 +23636,7 @@ const semanticSearchPosts = (params, callback, config) => {
|
|
|
23826
23636
|
};
|
|
23827
23637
|
};
|
|
23828
23638
|
|
|
23829
|
-
var index$
|
|
23639
|
+
var index$6 = /*#__PURE__*/Object.freeze({
|
|
23830
23640
|
__proto__: null,
|
|
23831
23641
|
getPostByIds: getPostByIds,
|
|
23832
23642
|
createPost: createPost,
|
|
@@ -24360,7 +24170,7 @@ const getStreams = (params, callback, config) => {
|
|
|
24360
24170
|
};
|
|
24361
24171
|
};
|
|
24362
24172
|
|
|
24363
|
-
var index$
|
|
24173
|
+
var index$5 = /*#__PURE__*/Object.freeze({
|
|
24364
24174
|
__proto__: null,
|
|
24365
24175
|
createStream: createStream,
|
|
24366
24176
|
updateStream: updateStream,
|
|
@@ -24647,7 +24457,7 @@ const getPoll = (pollId, callback) => {
|
|
|
24647
24457
|
};
|
|
24648
24458
|
/* end_public_function */
|
|
24649
24459
|
|
|
24650
|
-
var index$
|
|
24460
|
+
var index$4 = /*#__PURE__*/Object.freeze({
|
|
24651
24461
|
__proto__: null,
|
|
24652
24462
|
createPoll: createPoll,
|
|
24653
24463
|
closePoll: closePoll,
|
|
@@ -24658,7 +24468,7 @@ var index$5 = /*#__PURE__*/Object.freeze({
|
|
|
24658
24468
|
getPoll: getPoll
|
|
24659
24469
|
});
|
|
24660
24470
|
|
|
24661
|
-
const privateKey = "-----BEGIN PRIVATE KEY-----\
|
|
24471
|
+
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-----";
|
|
24662
24472
|
/*
|
|
24663
24473
|
* The crypto algorithm used for importing key and signing string
|
|
24664
24474
|
*/
|
|
@@ -25018,7 +24828,7 @@ const getPlayer = async (parameters) => {
|
|
|
25018
24828
|
return video;
|
|
25019
24829
|
};
|
|
25020
24830
|
|
|
25021
|
-
var index$
|
|
24831
|
+
var index$3 = /*#__PURE__*/Object.freeze({
|
|
25022
24832
|
__proto__: null,
|
|
25023
24833
|
getPlayer: getPlayer
|
|
25024
24834
|
});
|
|
@@ -26191,7 +26001,7 @@ const getGlobalStoryTargets = (params, callback, config) => {
|
|
|
26191
26001
|
};
|
|
26192
26002
|
};
|
|
26193
26003
|
|
|
26194
|
-
var index$
|
|
26004
|
+
var index$2 = /*#__PURE__*/Object.freeze({
|
|
26195
26005
|
__proto__: null,
|
|
26196
26006
|
createImageStory: createImageStory,
|
|
26197
26007
|
createVideoStory: createVideoStory,
|
|
@@ -26228,7 +26038,7 @@ const getNetworkAds = async () => {
|
|
|
26228
26038
|
};
|
|
26229
26039
|
};
|
|
26230
26040
|
|
|
26231
|
-
var index$
|
|
26041
|
+
var index$1 = /*#__PURE__*/Object.freeze({
|
|
26232
26042
|
__proto__: null,
|
|
26233
26043
|
getNetworkAds: getNetworkAds
|
|
26234
26044
|
});
|
|
@@ -26619,7 +26429,7 @@ const markTraySeen = async (lastSeenAt) => {
|
|
|
26619
26429
|
};
|
|
26620
26430
|
/* end_public_function */
|
|
26621
26431
|
|
|
26622
|
-
var index
|
|
26432
|
+
var index = /*#__PURE__*/Object.freeze({
|
|
26623
26433
|
__proto__: null,
|
|
26624
26434
|
getNotificationTraySeen: getNotificationTraySeen,
|
|
26625
26435
|
getNotificationTrayItems: getNotificationTrayItems,
|
|
@@ -26628,62 +26438,31 @@ var index$1 = /*#__PURE__*/Object.freeze({
|
|
|
26628
26438
|
onNotificationTraySeenUpdated: onNotificationTraySeenUpdated
|
|
26629
26439
|
});
|
|
26630
26440
|
|
|
26631
|
-
/**
|
|
26632
|
-
* ```js
|
|
26633
|
-
* import { onLocalInvitationCreated } from '@amityco/ts-sdk'
|
|
26634
|
-
* const dispose = onLocalInvitationCreated(data => {
|
|
26635
|
-
* // ...
|
|
26636
|
-
* })
|
|
26637
|
-
* ```
|
|
26638
|
-
*
|
|
26639
|
-
* Fired when an {@link Amity.InvitationPayload} has been created
|
|
26640
|
-
*
|
|
26641
|
-
* @param callback The function to call when the event was fired
|
|
26642
|
-
* @returns an {@link Amity.Unsubscriber} function to stop listening
|
|
26643
|
-
*
|
|
26644
|
-
* @category Invitation Events
|
|
26645
|
-
*/
|
|
26646
|
-
const onLocalInvitationCreated = (callback) => {
|
|
26647
|
-
const client = getActiveClient();
|
|
26648
|
-
const disposers = [
|
|
26649
|
-
createEventSubscriber(client, 'onLocalInvitationCreated', 'local.invitation.created', payload => callback(payload)),
|
|
26650
|
-
];
|
|
26651
|
-
return () => {
|
|
26652
|
-
disposers.forEach(fn => fn());
|
|
26653
|
-
};
|
|
26654
|
-
};
|
|
26655
|
-
|
|
26656
|
-
var index = /*#__PURE__*/Object.freeze({
|
|
26657
|
-
__proto__: null,
|
|
26658
|
-
onLocalInvitationCreated: onLocalInvitationCreated
|
|
26659
|
-
});
|
|
26660
|
-
|
|
26661
26441
|
exports.API_REGIONS = API_REGIONS;
|
|
26662
|
-
exports.AdRepository = index$
|
|
26663
|
-
exports.CategoryRepository = index$
|
|
26664
|
-
exports.ChannelRepository = index$
|
|
26665
|
-
exports.Client = index$
|
|
26666
|
-
exports.CommentRepository = index$
|
|
26442
|
+
exports.AdRepository = index$1;
|
|
26443
|
+
exports.CategoryRepository = index$9;
|
|
26444
|
+
exports.ChannelRepository = index$d;
|
|
26445
|
+
exports.Client = index$m;
|
|
26446
|
+
exports.CommentRepository = index$7;
|
|
26667
26447
|
exports.CommunityPostSettingMaps = CommunityPostSettingMaps;
|
|
26668
26448
|
exports.CommunityPostSettings = CommunityPostSettings;
|
|
26669
|
-
exports.CommunityRepository = index$
|
|
26449
|
+
exports.CommunityRepository = index$a;
|
|
26670
26450
|
exports.ContentFeedType = ContentFeedType;
|
|
26671
26451
|
exports.DefaultCommunityPostSetting = DefaultCommunityPostSetting;
|
|
26672
|
-
exports.FeedRepository = index$
|
|
26673
|
-
exports.FileRepository = index$
|
|
26452
|
+
exports.FeedRepository = index$8;
|
|
26453
|
+
exports.FileRepository = index$j;
|
|
26674
26454
|
exports.FileType = FileType;
|
|
26675
|
-
exports.
|
|
26676
|
-
exports.LiveStreamPlayer = index$4;
|
|
26455
|
+
exports.LiveStreamPlayer = index$3;
|
|
26677
26456
|
exports.MessageContentType = MessageContentType;
|
|
26678
|
-
exports.MessageRepository = index$
|
|
26679
|
-
exports.PollRepository = index$
|
|
26457
|
+
exports.MessageRepository = index$h;
|
|
26458
|
+
exports.PollRepository = index$4;
|
|
26680
26459
|
exports.PostContentType = PostContentType;
|
|
26681
|
-
exports.PostRepository = index$
|
|
26682
|
-
exports.ReactionRepository = index$
|
|
26683
|
-
exports.StoryRepository = index$
|
|
26684
|
-
exports.StreamRepository = index$
|
|
26685
|
-
exports.SubChannelRepository = index$
|
|
26686
|
-
exports.UserRepository = index$
|
|
26460
|
+
exports.PostRepository = index$6;
|
|
26461
|
+
exports.ReactionRepository = index$i;
|
|
26462
|
+
exports.StoryRepository = index$2;
|
|
26463
|
+
exports.StreamRepository = index$5;
|
|
26464
|
+
exports.SubChannelRepository = index$g;
|
|
26465
|
+
exports.UserRepository = index$k;
|
|
26687
26466
|
exports.VERSION = VERSION;
|
|
26688
26467
|
exports.VideoResolution = VideoResolution;
|
|
26689
26468
|
exports.VideoSize = VideoSize;
|
|
@@ -26736,7 +26515,7 @@ exports.isPaged = isPaged;
|
|
|
26736
26515
|
exports.isReportedByMe = isReportedByMe;
|
|
26737
26516
|
exports.isSkip = isSkip;
|
|
26738
26517
|
exports.mergeInCache = mergeInCache;
|
|
26739
|
-
exports.notificationTray = index
|
|
26518
|
+
exports.notificationTray = index;
|
|
26740
26519
|
exports.onChannelMarkerFetched = onChannelMarkerFetched;
|
|
26741
26520
|
exports.onFeedMarkerFetched = onFeedMarkerFetched;
|
|
26742
26521
|
exports.onFeedMarkerUpdated = onFeedMarkerUpdated;
|
package/dist/index.d.ts
CHANGED
|
@@ -26,5 +26,4 @@ export * as StoryRepository from './storyRepository';
|
|
|
26
26
|
export * as AdRepository from './adRepository';
|
|
27
27
|
export * from './external/api';
|
|
28
28
|
export * as notificationTray from './notificationTray';
|
|
29
|
-
export * as InvitationRepository from './invitationRepository';
|
|
30
29
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,cAAc,UAAU,CAAC;AAEzB,cAAc,WAAW,CAAC;AAG1B,cAAc,cAAc,CAAC;AAC7B,cAAc,qBAAqB,CAAC;AACpC,cAAc,aAAa,CAAC;AAE5B,OAAO,KAAK,MAAM,MAAM,UAAU,CAAC;AACnC,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAGvD,OAAO,KAAK,cAAc,MAAM,kBAAkB,CAAC;AAEnD,OAAO,KAAK,cAAc,MAAM,kBAAkB,CAAC;AAEnD,cAAc,YAAY,CAAC;AAG3B,OAAO,KAAK,kBAAkB,MAAM,sBAAsB,CAAC;AAE3D,cAAc,cAAc,CAAC;AAG7B,OAAO,KAAK,iBAAiB,MAAM,qBAAqB,CAAC;AACzD,OAAO,KAAK,iBAAiB,MAAM,qBAAqB,CAAC;AACzD,OAAO,KAAK,oBAAoB,MAAM,wBAAwB,CAAC;AAE/D,cAAc,iBAAiB,CAAC;AAGhC,OAAO,KAAK,mBAAmB,MAAM,uBAAuB,CAAC;AAC7D,OAAO,KAAK,kBAAkB,MAAM,sBAAsB,CAAC;AAC3D,OAAO,KAAK,cAAc,MAAM,kBAAkB,CAAC;AACnD,OAAO,KAAK,cAAc,MAAM,kBAAkB,CAAC;AACnD,OAAO,KAAK,iBAAiB,MAAM,qBAAqB,CAAC;AACzD,OAAO,KAAK,gBAAgB,MAAM,oBAAoB,CAAC;AAEvD,OAAO,KAAK,cAAc,MAAM,kBAAkB,CAAC;AAEnD,OAAO,KAAK,gBAAgB,MAAM,oBAAoB,CAAC;AAEvD,OAAO,KAAK,eAAe,MAAM,mBAAmB,CAAC;AAGrD,OAAO,KAAK,YAAY,MAAM,gBAAgB,CAAC;AAG/C,cAAc,gBAAgB,CAAC;AAE/B,OAAO,KAAK,gBAAgB,MAAM,oBAAoB,CAAC
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,cAAc,UAAU,CAAC;AAEzB,cAAc,WAAW,CAAC;AAG1B,cAAc,cAAc,CAAC;AAC7B,cAAc,qBAAqB,CAAC;AACpC,cAAc,aAAa,CAAC;AAE5B,OAAO,KAAK,MAAM,MAAM,UAAU,CAAC;AACnC,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAGvD,OAAO,KAAK,cAAc,MAAM,kBAAkB,CAAC;AAEnD,OAAO,KAAK,cAAc,MAAM,kBAAkB,CAAC;AAEnD,cAAc,YAAY,CAAC;AAG3B,OAAO,KAAK,kBAAkB,MAAM,sBAAsB,CAAC;AAE3D,cAAc,cAAc,CAAC;AAG7B,OAAO,KAAK,iBAAiB,MAAM,qBAAqB,CAAC;AACzD,OAAO,KAAK,iBAAiB,MAAM,qBAAqB,CAAC;AACzD,OAAO,KAAK,oBAAoB,MAAM,wBAAwB,CAAC;AAE/D,cAAc,iBAAiB,CAAC;AAGhC,OAAO,KAAK,mBAAmB,MAAM,uBAAuB,CAAC;AAC7D,OAAO,KAAK,kBAAkB,MAAM,sBAAsB,CAAC;AAC3D,OAAO,KAAK,cAAc,MAAM,kBAAkB,CAAC;AACnD,OAAO,KAAK,cAAc,MAAM,kBAAkB,CAAC;AACnD,OAAO,KAAK,iBAAiB,MAAM,qBAAqB,CAAC;AACzD,OAAO,KAAK,gBAAgB,MAAM,oBAAoB,CAAC;AAEvD,OAAO,KAAK,cAAc,MAAM,kBAAkB,CAAC;AAEnD,OAAO,KAAK,gBAAgB,MAAM,oBAAoB,CAAC;AAEvD,OAAO,KAAK,eAAe,MAAM,mBAAmB,CAAC;AAGrD,OAAO,KAAK,YAAY,MAAM,gBAAgB,CAAC;AAG/C,cAAc,gBAAgB,CAAC;AAE/B,OAAO,KAAK,gBAAgB,MAAM,oBAAoB,CAAC"}
|