@amityco/ts-sdk 0.0.1-beta.15 → 0.0.1-beta.16
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/core/cache.d.ts +1 -1
- package/dist/@types/core/cache.d.ts.map +1 -1
- package/dist/@types/core/events.d.ts +10 -1
- package/dist/@types/core/events.d.ts.map +1 -1
- package/dist/@types/core/model.d.ts +4 -0
- package/dist/@types/core/model.d.ts.map +1 -1
- package/dist/@types/core/paging.d.ts +10 -10
- package/dist/@types/core/paging.d.ts.map +1 -1
- package/dist/@types/core/payload.d.ts +10 -0
- package/dist/@types/core/payload.d.ts.map +1 -1
- package/dist/@types/core/query.d.ts +5 -4
- package/dist/@types/core/query.d.ts.map +1 -1
- package/dist/@types/domains/client.d.ts +0 -1
- package/dist/@types/domains/client.d.ts.map +1 -1
- package/dist/@types/domains/follow.d.ts +20 -0
- package/dist/@types/domains/follow.d.ts.map +1 -0
- package/dist/@types/index.d.ts +1 -0
- package/dist/@types/index.d.ts.map +1 -1
- package/dist/category/api/queryCategories.d.ts +3 -3
- package/dist/channel/api/createChannel.d.ts +1 -1
- package/dist/channel/api/queryChannels.d.ts +1 -1
- package/dist/client/api/activeUser.d.ts +6 -0
- package/dist/client/api/activeUser.d.ts.map +1 -0
- package/dist/client/api/connectClient.d.ts.map +1 -1
- package/dist/community/api/getRecommendedCommunities.d.ts +32 -0
- package/dist/community/api/getRecommendedCommunities.d.ts.map +1 -0
- package/dist/community/api/getTopTrendingCommunities.d.ts +32 -0
- package/dist/community/api/getTopTrendingCommunities.d.ts.map +1 -0
- package/dist/community/api/index.d.ts +2 -0
- package/dist/community/api/index.d.ts.map +1 -1
- package/dist/community/api/queryCommunities.d.ts +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/identifyModel.d.ts.map +1 -1
- package/dist/core/model/index.d.ts.map +1 -1
- package/dist/core/query/paging.d.ts +3 -3
- package/dist/core/query/paging.d.ts.map +1 -1
- package/dist/core/subscription.d.ts +2 -0
- package/dist/core/subscription.d.ts.map +1 -1
- package/dist/feed/api/queryGlobalFeed.d.ts +1 -1
- package/dist/follow/api/acceptFollower.d.ts +16 -0
- package/dist/follow/api/acceptFollower.d.ts.map +1 -0
- package/dist/follow/api/declineFollower.d.ts +16 -0
- package/dist/follow/api/declineFollower.d.ts.map +1 -0
- package/dist/follow/api/follow.d.ts +16 -0
- package/dist/follow/api/follow.d.ts.map +1 -0
- package/dist/follow/api/getFollowInfo.d.ts +32 -0
- package/dist/follow/api/getFollowInfo.d.ts.map +1 -0
- package/dist/follow/api/index.d.ts +8 -0
- package/dist/follow/api/index.d.ts.map +1 -0
- package/dist/follow/api/queryFollowers.d.ts +36 -0
- package/dist/follow/api/queryFollowers.d.ts.map +1 -0
- package/dist/follow/api/queryFollowings.d.ts +36 -0
- package/dist/follow/api/queryFollowings.d.ts.map +1 -0
- package/dist/follow/api/unfollow.d.ts +16 -0
- package/dist/follow/api/unfollow.d.ts.map +1 -0
- package/dist/follow/api/utils.d.ts +9 -0
- package/dist/follow/api/utils.d.ts.map +1 -0
- package/dist/follow/events/index.d.ts +9 -0
- package/dist/follow/events/index.d.ts.map +1 -0
- package/dist/follow/events/onFollowInfoUpdated.d.ts +17 -0
- package/dist/follow/events/onFollowInfoUpdated.d.ts.map +1 -0
- package/dist/follow/events/onFollowRequestAccepted.d.ts +17 -0
- package/dist/follow/events/onFollowRequestAccepted.d.ts.map +1 -0
- package/dist/follow/events/onFollowRequestCanceled.d.ts +17 -0
- package/dist/follow/events/onFollowRequestCanceled.d.ts.map +1 -0
- package/dist/follow/events/onFollowRequestDeclined.d.ts +17 -0
- package/dist/follow/events/onFollowRequestDeclined.d.ts.map +1 -0
- package/dist/follow/events/onFollowerDeleted.d.ts +17 -0
- package/dist/follow/events/onFollowerDeleted.d.ts.map +1 -0
- package/dist/follow/events/onFollowerRequested.d.ts +17 -0
- package/dist/follow/events/onFollowerRequested.d.ts.map +1 -0
- package/dist/follow/events/onUserFollowed.d.ts +17 -0
- package/dist/follow/events/onUserFollowed.d.ts.map +1 -0
- package/dist/follow/events/onUserUnfollowed.d.ts +17 -0
- package/dist/follow/events/onUserUnfollowed.d.ts.map +1 -0
- package/dist/follow/events/utils.d.ts +2 -0
- package/dist/follow/events/utils.d.ts.map +1 -0
- package/dist/follow/observers/index.d.ts +4 -0
- package/dist/follow/observers/index.d.ts.map +1 -0
- package/dist/follow/observers/observeFollowInfo.d.ts +18 -0
- package/dist/follow/observers/observeFollowInfo.d.ts.map +1 -0
- package/dist/follow/observers/observeFollowers.d.ts +18 -0
- package/dist/follow/observers/observeFollowers.d.ts.map +1 -0
- package/dist/follow/observers/observeFollowings.d.ts +18 -0
- package/dist/follow/observers/observeFollowings.d.ts.map +1 -0
- package/dist/index.cjs.js +752 -8
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.esm.js +731 -9
- package/dist/index.umd.js +5 -5
- package/dist/post/api/queryPosts.d.ts +2 -2
- package/dist/post/api/queryPosts.d.ts.map +1 -1
- package/dist/role/api/queryRoles.d.ts +1 -1
- package/dist/stream/api/queryStreams.d.ts +1 -1
- package/package.json +1 -1
- package/src/@types/core/cache.ts +1 -1
- package/src/@types/core/events.ts +11 -0
- package/src/@types/core/model.ts +6 -0
- package/src/@types/core/paging.ts +9 -9
- package/src/@types/core/payload.ts +14 -0
- package/src/@types/core/query.ts +8 -4
- package/src/@types/domains/client.ts +0 -1
- package/src/@types/domains/follow.ts +25 -0
- package/src/@types/index.ts +1 -0
- package/src/channel/api/createChannel.ts +1 -1
- package/src/client/api/activeUser.ts +26 -0
- package/src/client/api/connectClient.ts +3 -1
- package/src/community/api/getRecommendedCommunities.ts +86 -0
- package/src/community/api/getTopTrendingCommunities.ts +86 -0
- package/src/community/api/index.ts +3 -0
- package/src/core/model/idResolvers.ts +3 -0
- package/src/core/model/identifyModel.ts +2 -0
- package/src/core/model/index.ts +3 -0
- package/src/core/query/paging.ts +10 -10
- package/src/core/subscription.ts +21 -3
- package/src/follow/api/acceptFollower.ts +32 -0
- package/src/follow/api/declineFollower.ts +32 -0
- package/src/follow/api/follow.ts +40 -0
- package/src/follow/api/getFollowInfo.ts +75 -0
- package/src/follow/api/index.ts +8 -0
- package/src/follow/api/queryFollowers.ts +42 -0
- package/src/follow/api/queryFollowings.ts +42 -0
- package/src/follow/api/unfollow.ts +32 -0
- package/src/follow/api/utils.ts +77 -0
- package/src/follow/events/index.ts +10 -0
- package/src/follow/events/onFollowInfoUpdated.ts +43 -0
- package/src/follow/events/onFollowRequestAccepted.ts +19 -0
- package/src/follow/events/onFollowRequestCanceled.ts +19 -0
- package/src/follow/events/onFollowRequestDeclined.ts +19 -0
- package/src/follow/events/onFollowerDeleted.ts +19 -0
- package/src/follow/events/onFollowerRequested.ts +19 -0
- package/src/follow/events/onUserFollowed.ts +19 -0
- package/src/follow/events/onUserUnfollowed.ts +19 -0
- package/src/follow/events/utils.ts +38 -0
- package/src/follow/observers/index.ts +3 -0
- package/src/follow/observers/observeFollowInfo.ts +68 -0
- package/src/follow/observers/observeFollowers.ts +78 -0
- package/src/follow/observers/observeFollowings.ts +78 -0
- package/src/index.ts +4 -0
- package/src/post/api/queryPosts.ts +2 -2
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ```js
|
|
3
|
+
* import { follow } from '@amityco/ts-sdk'
|
|
4
|
+
* const status = await follow('foobar')
|
|
5
|
+
* ```
|
|
6
|
+
*
|
|
7
|
+
* Follow the user
|
|
8
|
+
*
|
|
9
|
+
* @param userId the ID of the {@link Amity.User}
|
|
10
|
+
* @returns the status {@link Amity.FollowStatus}
|
|
11
|
+
*
|
|
12
|
+
* @category Follow API
|
|
13
|
+
* @async
|
|
14
|
+
*/
|
|
15
|
+
export declare const follow: (userId: Amity.User['userId']) => Promise<Amity.Cached<Amity.FollowStatus>>;
|
|
16
|
+
//# sourceMappingURL=follow.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"follow.d.ts","sourceRoot":"","sources":["../../../src/follow/api/follow.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,MAAM,WAAkB,MAAM,IAAI,CAAC,QAAQ,CAAC,KAAG,QAAQ,MAAM,MAAM,CAAC,MAAM,YAAY,CAAC,CAqBnG,CAAA"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ```js
|
|
3
|
+
* import { getFollowInfo } from '@amityco/ts-sdk'
|
|
4
|
+
* const { data: followInfo } = await getFollowInfo('foobar')
|
|
5
|
+
* ```
|
|
6
|
+
*
|
|
7
|
+
* Fetches the number of followers, followings, pending requests and the follow status for current user
|
|
8
|
+
*
|
|
9
|
+
* @param userId the ID of the {@link Amity.User}
|
|
10
|
+
* @returns the associated {@link Amity.FollowInfo} object
|
|
11
|
+
*
|
|
12
|
+
* @category Follow API
|
|
13
|
+
* @async
|
|
14
|
+
*/
|
|
15
|
+
export declare const getFollowInfo: {
|
|
16
|
+
(userId: Amity.User['userId']): Promise<Amity.Cached<Amity.FollowInfo>>;
|
|
17
|
+
/**
|
|
18
|
+
* ```js
|
|
19
|
+
* import { getFollowInfo } from '@amityco/ts-sdk'
|
|
20
|
+
* const { data: followInfo } = getFollowInfo.locally('foobar')
|
|
21
|
+
* ```
|
|
22
|
+
*
|
|
23
|
+
* Fetches the number of followers, followings, pending requests and the follow status for current user from cache
|
|
24
|
+
*
|
|
25
|
+
* @param userId the ID of the {@link Amity.User}
|
|
26
|
+
* @returns the associated {@link Amity.FollowInfo} object
|
|
27
|
+
*
|
|
28
|
+
* @category Follow API
|
|
29
|
+
*/
|
|
30
|
+
locally(userId: Amity.User['userId']): Amity.Cached<Amity.FollowInfo> | undefined;
|
|
31
|
+
};
|
|
32
|
+
//# sourceMappingURL=getFollowInfo.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getFollowInfo.d.ts","sourceRoot":"","sources":["../../../src/follow/api/getFollowInfo.ts"],"names":[],"mappings":"AAKA;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,aAAa;aAAkB,MAAM,IAAI,CAAC,QAAQ,CAAC,GAAG,QAAQ,MAAM,MAAM,CAAC,MAAM,UAAU,CAAC,CAAC;IAwB1G;;;;;;;;;;;;OAYG;oBAC8B,MAAM,IAAI,CAAC,QAAQ,CAAC,GAAG,MAAM,MAAM,CAAC,MAAM,UAAU,CAAC,GAAG,SAAS;CAfjG,CAAA"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export * from './queryFollowers';
|
|
2
|
+
export * from './queryFollowings';
|
|
3
|
+
export * from './getFollowInfo';
|
|
4
|
+
export * from './follow';
|
|
5
|
+
export * from './unfollow';
|
|
6
|
+
export * from './acceptFollower';
|
|
7
|
+
export * from './declineFollower';
|
|
8
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/follow/api/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAA;AAChC,cAAc,mBAAmB,CAAA;AACjC,cAAc,iBAAiB,CAAA;AAE/B,cAAc,UAAU,CAAA;AACxB,cAAc,YAAY,CAAA;AAC1B,cAAc,kBAAkB,CAAA;AAChC,cAAc,mBAAmB,CAAA"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ```js
|
|
3
|
+
* import { queryFollowers } from '@amityco/ts-sdk'
|
|
4
|
+
* const { data: followers, prevPage, nextPage } = await queryFollowers({ userId })
|
|
5
|
+
* ```
|
|
6
|
+
*
|
|
7
|
+
* Queries a paginable list of {@link Amity.FollowStatus}
|
|
8
|
+
*
|
|
9
|
+
* @param query The query parameters
|
|
10
|
+
* @returns followers
|
|
11
|
+
*
|
|
12
|
+
* @category Follow API
|
|
13
|
+
* @async
|
|
14
|
+
*/
|
|
15
|
+
export declare const queryFollowers: {
|
|
16
|
+
(query: {
|
|
17
|
+
userId: Amity.User['userId'];
|
|
18
|
+
status?: 'all' | Exclude<Amity.FollowStatus['status'], 'none'>;
|
|
19
|
+
page?: Amity.Page;
|
|
20
|
+
}): Promise<Amity.Cached<Amity.Paged<Amity.FollowStatus>>>;
|
|
21
|
+
/**
|
|
22
|
+
* ```js
|
|
23
|
+
* import { queryFollowers } from '@amityco/ts-sdk'
|
|
24
|
+
* const { data: followers, prevPage, nextPage } = queryFollowers.locally({ userId })
|
|
25
|
+
* ```
|
|
26
|
+
*
|
|
27
|
+
* Queries a paginable list of {@link Amity.FollowStatus} objects from cache
|
|
28
|
+
*
|
|
29
|
+
* @param query The query parameters
|
|
30
|
+
* @returns followers
|
|
31
|
+
*
|
|
32
|
+
* @category Post API
|
|
33
|
+
*/
|
|
34
|
+
locally(query: Parameters<typeof queryFollowers>[0]): Amity.Cached<Amity.Paged<Amity.FollowStatus>> | undefined;
|
|
35
|
+
};
|
|
36
|
+
//# sourceMappingURL=queryFollowers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"queryFollowers.d.ts","sourceRoot":"","sources":["../../../src/follow/api/queryFollowers.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,cAAc;YAClB;QACL,MAAM,EAAE,MAAM,IAAI,CAAC,QAAQ,CAAC,CAAA;QAC5B,MAAM,CAAC,EAAE,KAAK,GAAG,QAAQ,MAAM,YAAY,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC,CAAC;QAC/D,IAAI,CAAC,EAAE,MAAM,IAAI,CAAA;KAClB,GACA,QAAQ,MAAM,MAAM,CAAC,MAAM,KAAK,CAAC,MAAM,YAAY,CAAC,CAAC,CAAC;IAGzD;;;;;;;;;;;;OAYG;mBAEM,WAAW,qBAAqB,CAAC,CAAC,CAAC,CAAC,GAC1C,MAAM,MAAM,CAAC,MAAM,KAAK,CAAC,MAAM,YAAY,CAAC,CAAC,GAAG,SAAS;CAjB1B,CAAA"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ```js
|
|
3
|
+
* import { queryFollowings } from '@amityco/ts-sdk'
|
|
4
|
+
* const { data: followings, prevPage, nextPage } = await queryFollowings({ userId })
|
|
5
|
+
* ```
|
|
6
|
+
*
|
|
7
|
+
* Queries a paginable list of {@link Amity.FollowStatus}
|
|
8
|
+
*
|
|
9
|
+
* @param query The query parameters
|
|
10
|
+
* @returns followings
|
|
11
|
+
*
|
|
12
|
+
* @category Follow API
|
|
13
|
+
* @async
|
|
14
|
+
*/
|
|
15
|
+
export declare const queryFollowings: {
|
|
16
|
+
(query: {
|
|
17
|
+
userId: Amity.User['userId'];
|
|
18
|
+
status?: Exclude<Amity.FollowStatus['status'], 'none'>;
|
|
19
|
+
page?: Amity.Page;
|
|
20
|
+
}): Promise<Amity.Cached<Amity.Paged<Amity.FollowStatus>>>;
|
|
21
|
+
/**
|
|
22
|
+
* ```js
|
|
23
|
+
* import { queryFollowings } from '@amityco/ts-sdk'
|
|
24
|
+
* const { data: followings, prevPage, nextPage } = queryFollowings.locally({ userId })
|
|
25
|
+
* ```
|
|
26
|
+
*
|
|
27
|
+
* Queries a paginable list of {@link Amity.FollowStatus} objects from cache
|
|
28
|
+
*
|
|
29
|
+
* @param query The query parameters
|
|
30
|
+
* @returns followings
|
|
31
|
+
*
|
|
32
|
+
* @category Post API
|
|
33
|
+
*/
|
|
34
|
+
locally(query: Parameters<typeof queryFollowings>[0]): Amity.Cached<Amity.Paged<Amity.FollowStatus>> | undefined;
|
|
35
|
+
};
|
|
36
|
+
//# sourceMappingURL=queryFollowings.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"queryFollowings.d.ts","sourceRoot":"","sources":["../../../src/follow/api/queryFollowings.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,eAAe;YACnB;QACL,MAAM,EAAE,MAAM,IAAI,CAAC,QAAQ,CAAC,CAAA;QAC5B,MAAM,CAAC,EAAE,QAAQ,MAAM,YAAY,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC,CAAC;QACvD,IAAI,CAAC,EAAE,MAAM,IAAI,CAAA;KAClB,GACA,QAAQ,MAAM,MAAM,CAAC,MAAM,KAAK,CAAC,MAAM,YAAY,CAAC,CAAC,CAAC;IAGzD;;;;;;;;;;;;OAYG;mBAEM,WAAW,sBAAsB,CAAC,CAAC,CAAC,CAAC,GAC3C,MAAM,MAAM,CAAC,MAAM,KAAK,CAAC,MAAM,YAAY,CAAC,CAAC,GAAG,SAAS;CAjB1B,CAAA"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ```js
|
|
3
|
+
* import { unfollow } from '@amityco/ts-sdk'
|
|
4
|
+
* await unfollow('foobar')
|
|
5
|
+
* ```
|
|
6
|
+
*
|
|
7
|
+
* Cancel the follow request or unfollow the user
|
|
8
|
+
*
|
|
9
|
+
* @param userId the ID of the {@link Amity.User}
|
|
10
|
+
* @returns A success boolean if the user {@link Amity.User} was unfollowed
|
|
11
|
+
*
|
|
12
|
+
* @category Follow API
|
|
13
|
+
* @async
|
|
14
|
+
*/
|
|
15
|
+
export declare const unfollow: (userId: Amity.User['userId']) => Promise<boolean>;
|
|
16
|
+
//# sourceMappingURL=unfollow.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"unfollow.d.ts","sourceRoot":"","sources":["../../../src/follow/api/unfollow.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,QAAQ,WAAkB,MAAM,IAAI,CAAC,QAAQ,CAAC,KAAG,QAAQ,OAAO,CAa5E,CAAA"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare const queryFollows: {
|
|
2
|
+
(key: 'followers' | 'following', query: {
|
|
3
|
+
userId: Amity.User['userId'];
|
|
4
|
+
status?: 'all' | Exclude<Amity.FollowStatus['status'], 'none'>;
|
|
5
|
+
page?: Amity.Page;
|
|
6
|
+
}): Promise<Amity.Cached<Amity.Paged<Amity.FollowStatus>>>;
|
|
7
|
+
locally(key: Parameters<typeof queryFollows>[0], query: Parameters<typeof queryFollows>[1]): Amity.Cached<Amity.Paged<Amity.FollowStatus>> | undefined;
|
|
8
|
+
};
|
|
9
|
+
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/follow/api/utils.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,YAAY;UAClB,WAAW,GAAG,WAAW,SACvB;QACL,MAAM,EAAE,MAAM,IAAI,CAAC,QAAQ,CAAC,CAAA;QAC5B,MAAM,CAAC,EAAE,KAAK,GAAG,QAAQ,MAAM,YAAY,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC,CAAC;QAC/D,IAAI,CAAC,EAAE,MAAM,IAAI,CAAA;KAClB,GACA,QAAQ,MAAM,MAAM,CAAC,MAAM,KAAK,CAAC,MAAM,YAAY,CAAC,CAAC,CAAC;iBAmClD,WAAW,mBAAmB,CAAC,CAAC,CAAC,CAAC,SAChC,WAAW,mBAAmB,CAAC,CAAC,CAAC,CAAC,GACxC,MAAM,MAAM,CAAC,MAAM,KAAK,CAAC,MAAM,YAAY,CAAC,CAAC,GAAG,SAAS;CAL3D,CAAA"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export * from './onUserFollowed';
|
|
2
|
+
export * from './onUserUnfollowed';
|
|
3
|
+
export * from './onFollowerDeleted';
|
|
4
|
+
export * from './onFollowerRequested';
|
|
5
|
+
export * from './onFollowRequestCanceled';
|
|
6
|
+
export * from './onFollowRequestAccepted';
|
|
7
|
+
export * from './onFollowRequestDeclined';
|
|
8
|
+
export * from './onFollowInfoUpdated';
|
|
9
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/follow/events/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAA;AAChC,cAAc,oBAAoB,CAAA;AAClC,cAAc,qBAAqB,CAAA;AAEnC,cAAc,uBAAuB,CAAA;AACrC,cAAc,2BAA2B,CAAA;AACzC,cAAc,2BAA2B,CAAA;AACzC,cAAc,2BAA2B,CAAA;AAEzC,cAAc,uBAAuB,CAAA"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ```js
|
|
3
|
+
* import { onFollowInfoUpdated } from '@amityco/ts-sdk'
|
|
4
|
+
* const dispose = onFollowInfoUpdated(followInfo => {
|
|
5
|
+
* // ...
|
|
6
|
+
* })
|
|
7
|
+
* ```
|
|
8
|
+
*
|
|
9
|
+
* Fired when a {@link Amity.FollowInfo} has been updated
|
|
10
|
+
*
|
|
11
|
+
* @param callback The function to call when the event was fired
|
|
12
|
+
* @returns an {@link Amity.Unsubscriber} function to stop listening
|
|
13
|
+
*
|
|
14
|
+
* @category Follow Events
|
|
15
|
+
*/
|
|
16
|
+
export declare const onFollowInfoUpdated: (callback: Amity.Listener<Amity.FollowInfo>) => Amity.Unsubscriber;
|
|
17
|
+
//# sourceMappingURL=onFollowInfoUpdated.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"onFollowInfoUpdated.d.ts","sourceRoot":"","sources":["../../../src/follow/events/onFollowInfoUpdated.ts"],"names":[],"mappings":"AAGA;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,mBAAmB,aAAc,MAAM,QAAQ,CAAC,MAAM,UAAU,CAAC,KAAG,MAAM,YAwBtF,CAAA"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ```js
|
|
3
|
+
* import { onFollowRequestAccepted } from '@amityco/ts-sdk'
|
|
4
|
+
* const dispose = onFollowRequestAccepted(status => {
|
|
5
|
+
* // ...
|
|
6
|
+
* })
|
|
7
|
+
* ```
|
|
8
|
+
*
|
|
9
|
+
* Fired when a follow request has been accepted
|
|
10
|
+
*
|
|
11
|
+
* @param callback The function to call when the event was fired
|
|
12
|
+
* @returns an {@link Amity.Unsubscriber} function to stop listening
|
|
13
|
+
*
|
|
14
|
+
* @category Follow Events
|
|
15
|
+
*/
|
|
16
|
+
export declare const onFollowRequestAccepted: (callback: Amity.Listener<Amity.FollowStatus>) => Amity.Unsubscriber;
|
|
17
|
+
//# sourceMappingURL=onFollowRequestAccepted.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"onFollowRequestAccepted.d.ts","sourceRoot":"","sources":["../../../src/follow/events/onFollowRequestAccepted.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,uBAAuB,aAAc,MAAM,QAAQ,CAAC,MAAM,YAAY,CAAC,KAAG,MAAM,YACnC,CAAA"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ```js
|
|
3
|
+
* import { onFollowRequestCanceled } from '@amityco/ts-sdk'
|
|
4
|
+
* const dispose = onFollowRequestCanceled(status => {
|
|
5
|
+
* // ...
|
|
6
|
+
* })
|
|
7
|
+
* ```
|
|
8
|
+
*
|
|
9
|
+
* Fired when a follow request has been canceled
|
|
10
|
+
*
|
|
11
|
+
* @param callback The function to call when the event was fired
|
|
12
|
+
* @returns an {@link Amity.Unsubscriber} function to stop listening
|
|
13
|
+
*
|
|
14
|
+
* @category Follow Events
|
|
15
|
+
*/
|
|
16
|
+
export declare const onFollowRequestCanceled: (callback: Amity.Listener<Amity.FollowStatus>) => Amity.Unsubscriber;
|
|
17
|
+
//# sourceMappingURL=onFollowRequestCanceled.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"onFollowRequestCanceled.d.ts","sourceRoot":"","sources":["../../../src/follow/events/onFollowRequestCanceled.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,uBAAuB,aAAc,MAAM,QAAQ,CAAC,MAAM,YAAY,CAAC,KAAG,MAAM,YAC5B,CAAA"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ```js
|
|
3
|
+
* import { onFollowRequestDeclined } from '@amityco/ts-sdk'
|
|
4
|
+
* const dispose = onFollowRequestDeclined(status => {
|
|
5
|
+
* // ...
|
|
6
|
+
* })
|
|
7
|
+
* ```
|
|
8
|
+
*
|
|
9
|
+
* Fired when a follow request has been declined
|
|
10
|
+
*
|
|
11
|
+
* @param callback The function to call when the event was fired
|
|
12
|
+
* @returns an {@link Amity.Unsubscriber} function to stop listening
|
|
13
|
+
*
|
|
14
|
+
* @category Follow Events
|
|
15
|
+
*/
|
|
16
|
+
export declare const onFollowRequestDeclined: (callback: Amity.Listener<Amity.FollowStatus>) => Amity.Unsubscriber;
|
|
17
|
+
//# sourceMappingURL=onFollowRequestDeclined.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"onFollowRequestDeclined.d.ts","sourceRoot":"","sources":["../../../src/follow/events/onFollowRequestDeclined.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,uBAAuB,aAAc,MAAM,QAAQ,CAAC,MAAM,YAAY,CAAC,KAAG,MAAM,YAC5B,CAAA"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ```js
|
|
3
|
+
* import { onFollowerDeleted } from '@amityco/ts-sdk'
|
|
4
|
+
* const dispose = onFollowerDeleted(status => {
|
|
5
|
+
* // ...
|
|
6
|
+
* })
|
|
7
|
+
* ```
|
|
8
|
+
*
|
|
9
|
+
* Fired when a follower has been deleted
|
|
10
|
+
*
|
|
11
|
+
* @param callback The function to call when the event was fired
|
|
12
|
+
* @returns an {@link Amity.Unsubscriber} function to stop listening
|
|
13
|
+
*
|
|
14
|
+
* @category Follow Events
|
|
15
|
+
*/
|
|
16
|
+
export declare const onFollowerDeleted: (callback: Amity.Listener<Amity.FollowStatus>) => Amity.Unsubscriber;
|
|
17
|
+
//# sourceMappingURL=onFollowerDeleted.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"onFollowerDeleted.d.ts","sourceRoot":"","sources":["../../../src/follow/events/onFollowerDeleted.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,iBAAiB,aAAc,MAAM,QAAQ,CAAC,MAAM,YAAY,CAAC,KAAG,MAAM,YACtB,CAAA"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ```js
|
|
3
|
+
* import { onFollowerRequested } from '@amityco/ts-sdk'
|
|
4
|
+
* const dispose = onFollowerRequested(status => {
|
|
5
|
+
* // ...
|
|
6
|
+
* })
|
|
7
|
+
* ```
|
|
8
|
+
*
|
|
9
|
+
* Fired when a user follows another users and confirmation is required
|
|
10
|
+
*
|
|
11
|
+
* @param callback The function to call when the event was fired
|
|
12
|
+
* @returns an {@link Amity.Unsubscriber} function to stop listening
|
|
13
|
+
*
|
|
14
|
+
* @category Follow Events
|
|
15
|
+
*/
|
|
16
|
+
export declare const onFollowerRequested: (callback: Amity.Listener<Amity.FollowStatus>) => Amity.Unsubscriber;
|
|
17
|
+
//# sourceMappingURL=onFollowerRequested.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"onFollowerRequested.d.ts","sourceRoot":"","sources":["../../../src/follow/events/onFollowerRequested.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,mBAAmB,aAAc,MAAM,QAAQ,CAAC,MAAM,YAAY,CAAC,KAAG,MAAM,YAC9B,CAAA"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ```js
|
|
3
|
+
* import { onUserFollowed } from '@amityco/ts-sdk'
|
|
4
|
+
* const dispose = onUserFollowed(status => {
|
|
5
|
+
* // ...
|
|
6
|
+
* })
|
|
7
|
+
* ```
|
|
8
|
+
*
|
|
9
|
+
* Fired when a user follows another users and confirmation is not required
|
|
10
|
+
*
|
|
11
|
+
* @param callback The function to call when the event was fired
|
|
12
|
+
* @returns an {@link Amity.Unsubscriber} function to stop listening
|
|
13
|
+
*
|
|
14
|
+
* @category Follow Events
|
|
15
|
+
*/
|
|
16
|
+
export declare const onUserFollowed: (callback: Amity.Listener<Amity.FollowStatus>) => Amity.Unsubscriber;
|
|
17
|
+
//# sourceMappingURL=onUserFollowed.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"onUserFollowed.d.ts","sourceRoot":"","sources":["../../../src/follow/events/onUserFollowed.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,cAAc,aAAc,MAAM,QAAQ,CAAC,MAAM,YAAY,CAAC,KAAG,MAAM,YAC3B,CAAA"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ```js
|
|
3
|
+
* import { onUserUnfollowed } from '@amityco/ts-sdk'
|
|
4
|
+
* const dispose = onUserFollowed(status => {
|
|
5
|
+
* // ...
|
|
6
|
+
* })
|
|
7
|
+
* ```
|
|
8
|
+
*
|
|
9
|
+
* Fired when a user unfollows
|
|
10
|
+
*
|
|
11
|
+
* @param callback The function to call when the event was fired
|
|
12
|
+
* @returns an {@link Amity.Unsubscriber} function to stop listening
|
|
13
|
+
*
|
|
14
|
+
* @category Follow Events
|
|
15
|
+
*/
|
|
16
|
+
export declare const onUserUnfollowed: (callback: Amity.Listener<Amity.FollowStatus>) => Amity.Unsubscriber;
|
|
17
|
+
//# sourceMappingURL=onUserUnfollowed.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"onUserUnfollowed.d.ts","sourceRoot":"","sources":["../../../src/follow/events/onUserUnfollowed.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,gBAAgB,aAAc,MAAM,QAAQ,CAAC,MAAM,YAAY,CAAC,KAAG,MAAM,YAC1B,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/follow/events/utils.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,2BAA2B,UAC/B,MAAM,MAAM,uBAAuB,YAChC,MAAM,QAAQ,CAAC,MAAM,YAAY,CAAC,uBA8B7C,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/follow/observers/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAA;AACnC,cAAc,oBAAoB,CAAA;AAClC,cAAc,qBAAqB,CAAA"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ```js
|
|
3
|
+
* import { observeFollowInfo } from '@amityco/ts-sdk'
|
|
4
|
+
*
|
|
5
|
+
* let followInfo = {}
|
|
6
|
+
* const dispose = observeFollowInfo(userId, updated => followInfo = updated)
|
|
7
|
+
* ```
|
|
8
|
+
*
|
|
9
|
+
* Observe all mutation on a given {@link Amity.FollowInfo}
|
|
10
|
+
*
|
|
11
|
+
* @param userId the ID of the user to observe
|
|
12
|
+
* @param callback the function to call when new data are available
|
|
13
|
+
* @returns An {@link Amity.Unsubscriber} function to run when willing to stop observing the post
|
|
14
|
+
*
|
|
15
|
+
* @category Follow Observer
|
|
16
|
+
*/
|
|
17
|
+
export declare const observeFollowInfo: <Events extends ["onFetch", "onUpdate"]>(userId: Amity.User['userId'], callback: Amity.ObjectListener<Amity.Snapshot<Amity.FollowInfo>, Events>, policy?: Amity.QueryPolicy) => Amity.Unsubscriber;
|
|
18
|
+
//# sourceMappingURL=observeFollowInfo.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"observeFollowInfo.d.ts","sourceRoot":"","sources":["../../../src/follow/observers/observeFollowInfo.ts"],"names":[],"mappings":"AAKA;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,iBAAiB,mDACpB,MAAM,IAAI,CAAC,QAAQ,CAAC,qFAEpB,MAAM,WAAW,KACxB,MAAM,YA0CR,CAAA"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ```js
|
|
3
|
+
* import { observeFollowers } from '@amityco/ts-sdk'
|
|
4
|
+
*
|
|
5
|
+
* let followers = []
|
|
6
|
+
* const unsub = observeFollowers('userId', follower => merge(followers, follower))
|
|
7
|
+
* ```
|
|
8
|
+
*
|
|
9
|
+
* Observe all mutations on a list of followers {@link Amity.FollowStatus} for a given user
|
|
10
|
+
*
|
|
11
|
+
* @param userId the ID of the {@link Amity.User}
|
|
12
|
+
* @param callback the function to call when new data are available
|
|
13
|
+
* @returns An {@link Amity.Unsubscriber} function to run when willing to stop observing the messages
|
|
14
|
+
*
|
|
15
|
+
* @category Follow Observer
|
|
16
|
+
*/
|
|
17
|
+
export declare const observeFollowers: <Events extends ["onRequested", "onAccepted", "onDeclined", "onCanceled", "onFollowed", "onUnfollowed", "onDeleted"]>(userId: Amity.User['userId'], callback: Amity.ObjectListener<Amity.FollowStatus, Events>) => Amity.Unsubscriber;
|
|
18
|
+
//# sourceMappingURL=observeFollowers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"observeFollowers.d.ts","sourceRoot":"","sources":["../../../src/follow/observers/observeFollowers.ts"],"names":[],"mappings":"AAYA;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,gBAAgB,gIASnB,MAAM,IAAI,CAAC,QAAQ,CAAC,iEAE3B,MAAM,YAsCR,CAAA"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ```js
|
|
3
|
+
* import { observeFollowings } from '@amityco/ts-sdk'
|
|
4
|
+
*
|
|
5
|
+
* let followings = []
|
|
6
|
+
* const unsub = observeFollowers('userId', follower => merge(followings, following))
|
|
7
|
+
* ```
|
|
8
|
+
*
|
|
9
|
+
* Observe all mutations on a list of followings {@link Amity.FollowStatus} for a given user
|
|
10
|
+
*
|
|
11
|
+
* @param userId the ID of the {@link Amity.User}
|
|
12
|
+
* @param callback the function to call when new data are available
|
|
13
|
+
* @returns An {@link Amity.Unsubscriber} function to run when willing to stop observing the messages
|
|
14
|
+
*
|
|
15
|
+
* @category Follow Observer
|
|
16
|
+
*/
|
|
17
|
+
export declare const observeFollowings: <Events extends ["onRequested", "onAccepted", "onDeclined", "onCanceled", "onFollowed", "onUnfollowed", "onDeleted"]>(userId: Amity.User['userId'], callback: Amity.ObjectListener<Amity.FollowStatus, Events>) => Amity.Unsubscriber;
|
|
18
|
+
//# sourceMappingURL=observeFollowings.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"observeFollowings.d.ts","sourceRoot":"","sources":["../../../src/follow/observers/observeFollowings.ts"],"names":[],"mappings":"AAYA;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,iBAAiB,gIASpB,MAAM,IAAI,CAAC,QAAQ,CAAC,iEAE3B,MAAM,YAsCR,CAAA"}
|