@amityco/ts-sdk 7.4.1-b29d2b5.0 → 7.4.1-b9f48528.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@amityco/ts-sdk",
3
- "version": "7.4.1-b29d2b5.0",
3
+ "version": "7.4.1-b9f48528.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",
@@ -1,10 +1,17 @@
1
1
  import { AxiosInstance } from 'axios';
2
2
  import { Emitter } from 'mitt';
3
3
 
4
+ export const enum MembershipAcceptanceTypeEnum {
5
+ AUTOMATIC = 'automatic',
6
+ INVITATION = 'invitation',
7
+ }
8
+
4
9
  declare global {
5
10
  namespace Amity {
6
11
  type Logger = (topic: string, ...args: any[]) => void;
7
12
 
13
+ type MembershipAcceptanceType = MembershipAcceptanceTypeEnum;
14
+
8
15
  const enum TokenTerminationReason {
9
16
  GLOBAL_BAN = 'globalBan',
10
17
  USER_DELETED = 'userDeleted',
@@ -124,7 +131,12 @@ declare global {
124
131
  showMyPost: boolean;
125
132
  showOnlyMyFeed: boolean;
126
133
  };
134
+ story: {
135
+ allowAllUserToCreateStory: boolean;
136
+ expiryTimeMinutes: number;
137
+ };
127
138
  userPrivacySetting: 'public' | 'private';
139
+ membershipAcceptance: Amity.MembershipAcceptanceType;
128
140
  };
129
141
 
130
142
  type ConnectClientParams = {
@@ -95,6 +95,9 @@ declare global {
95
95
  hasFlaggedPost: boolean;
96
96
 
97
97
  allowCommentInStory?: boolean;
98
+
99
+ isDiscoverable: boolean;
100
+ requiresJoinApproval: boolean;
98
101
  } & Amity.Taggable &
99
102
  Amity.Metadata &
100
103
  Amity.Timestamps &
@@ -38,3 +38,4 @@ export * from './domains/post';
38
38
  export * from './domains/story';
39
39
  export * from './domains/ad';
40
40
  export * from './domains/notification';
41
+ export * from './domains/client';
@@ -11,7 +11,7 @@ import { prepareCommunityPayload, prepareCommunityRequest } from '../utils';
11
11
  /**
12
12
  * ```js
13
13
  * import { createCommunity } from '@amityco/ts-sdk'
14
- * const created = await createCommunity({ communityId: 'foobar', displayName: 'foobar' })
14
+ * const created = await createCommunity({ communityId: 'foobar', displayName: 'foobar', isDiscoverable: true, requiresJoinApproval: false })
15
15
  * ```
16
16
  *
17
17
  * Creates an {@link Amity.Community}
@@ -33,6 +33,8 @@ export const createCommunity = async (
33
33
  | 'postSetting'
34
34
  | 'tags'
35
35
  | 'metadata'
36
+ | 'isDiscoverable'
37
+ | 'requiresJoinApproval'
36
38
  > &
37
39
  Amity.CommunityStorySettings & {
38
40
  userIds?: string[];