@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/dist/@types/domains/client.d.ts +10 -0
- package/dist/@types/domains/client.d.ts.map +1 -1
- package/dist/@types/domains/community.d.ts +2 -0
- package/dist/@types/domains/community.d.ts.map +1 -1
- package/dist/@types/index.d.ts +1 -0
- 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/index.cjs.js +7 -1
- package/dist/index.esm.js +8 -2
- package/dist/index.umd.js +4 -4
- package/package.json +1 -1
- package/src/@types/domains/client.ts +12 -0
- package/src/@types/domains/community.ts +3 -0
- package/src/@types/index.ts +1 -0
- package/src/communityRepository/api/createCommunity.ts +3 -1
package/package.json
CHANGED
|
@@ -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 = {
|
package/src/@types/index.ts
CHANGED
|
@@ -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[];
|