@amityco/ts-sdk 7.5.4-54f750e3.0 → 7.5.4-6dc7299.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.
@@ -1 +1 @@
1
- {"version":3,"file":"invitationLinkedObject.d.ts","sourceRoot":"","sources":["../../../src/utils/linkedObject/invitationLinkedObject.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,sBAAsB,eAAgB,MAAM,kBAAkB,KAAG,MAAM,UAkCnF,CAAC"}
1
+ {"version":3,"file":"invitationLinkedObject.d.ts","sourceRoot":"","sources":["../../../src/utils/linkedObject/invitationLinkedObject.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,sBAAsB,eAAgB,MAAM,kBAAkB,KAAG,MAAM,UAgCnF,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@amityco/ts-sdk",
3
- "version": "7.5.4-54f750e3.0",
3
+ "version": "7.5.4-6dc7299.0",
4
4
  "license": "CC-BY-ND-4.0",
5
5
  "author": "amity.co <developers@amity.co> (https://amity.co)",
6
6
  "description": "Amity Social Cloud Typescript SDK",
@@ -29,15 +29,13 @@ declare global {
29
29
  community: Amity.InternalCommunity;
30
30
  };
31
31
 
32
+ type InvitationTarget<T extends InvitationTargetType> = InvitationTargetMap[T];
33
+
32
34
  type InvitationSortBy = InvitationSortByEnum;
33
35
 
34
36
  type InvitationDomain<T extends Amity.InvitationTargetType = Amity.InvitationTargetType> =
35
37
  T extends 'community' ? { communityId: string } : { communityId?: string };
36
38
 
37
- type InvitationTarget<T extends InvitationTargetType = InvitationTargetType> = {
38
- [K in T]?: InvitationTargetMap[K];
39
- } & Amity.InvitationDomain<T>;
40
-
41
39
  type RawInvitation = {
42
40
  _id: string;
43
41
  networkId: string;
@@ -62,10 +60,7 @@ declare global {
62
60
  createdById: string;
63
61
  };
64
62
 
65
- type Invitation = Omit<
66
- Amity.InternalInvitation,
67
- 'createdBy' | keyof Amity.InvitationDomain<Amity.InvitationTargetType>
68
- > &
63
+ type Invitation = Omit<Amity.InternalInvitation, 'createdBy'> &
69
64
  Amity.InvitationLinkedObject & {
70
65
  user?: Amity.User;
71
66
  createdById: string;
@@ -22,10 +22,8 @@ export const invitationLinkedObject = (invitation: Amity.InternalInvitation): Am
22
22
  'get',
23
23
  invitation.targetId,
24
24
  ]);
25
- return {
26
- community: cacheData?.data,
27
- communityId: invitation.communityId,
28
- };
25
+ if (cacheData?.data) return cacheData.data;
26
+ return undefined;
29
27
  }
30
28
  return undefined;
31
29
  },