Skip to content

Commit f91b80b

Browse files
authored
Merge pull request #189 from sendbird/chore/deprecation
chore: add deprecation marks to hooks
2 parents 5e3c3ed + bb79bab commit f91b80b

File tree

8 files changed

+19
-4
lines changed

8 files changed

+19
-4
lines changed

packages/uikit-chat-hooks/src/channel/useGroupChannelList/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { useGroupChannelListWithCollection } from './useGroupChannelListWithColl
55
import { useGroupChannelListWithQuery } from './useGroupChannelListWithQuery';
66

77
/**
8-
* @deprecated This hook is deprecated and will be replaced by the 'uikit-tools' package.
8+
* @deprecated This hook is deprecated and will be replaced by the '@sendbird/uikit-tools' package.
99
* */
1010
export const useGroupChannelList: UseGroupChannelList = (sdk, userId, options) => {
1111
if (sdk.isCacheEnabled || options?.enableCollectionWithoutLocalCache) {

packages/uikit-chat-hooks/src/channel/useGroupChannelList/useGroupChannelListWithCollection.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@ const createGroupChannelListCollection = (
2626
});
2727
};
2828

29+
/**
30+
* @deprecated This hook is deprecated and will be replaced by the '@sendbird/uikit-tools' package.
31+
* */
2932
export const useGroupChannelListWithCollection: UseGroupChannelList = (sdk, userId, options) => {
3033
const handlerId = useUniqHandlerId('useGroupChannelListWithCollection');
3134
const { deliveryReceiptEnabled } = useAppFeatures(sdk);

packages/uikit-chat-hooks/src/channel/useGroupChannelList/useGroupChannelListWithQuery.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@ const createGroupChannelListQuery = (
2323
});
2424
};
2525

26+
/**
27+
* @deprecated This hook is deprecated and will be replaced by the '@sendbird/uikit-tools' package.
28+
* */
2629
export const useGroupChannelListWithQuery: UseGroupChannelList = (sdk, userId, options) => {
2730
const { deliveryReceiptEnabled } = useAppFeatures(sdk);
2831
const queryRef = useRef<SendbirdGroupChannelListQuery>();

packages/uikit-chat-hooks/src/channel/useGroupChannelMessages/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { useGroupChannelMessagesWithCollection } from './useGroupChannelMessages
55
import { useGroupChannelMessagesWithQuery } from './useGroupChannelMessagesWithQuery';
66

77
/**
8-
* @deprecated This hook is deprecated and will be replaced by the 'uikit-tools' package.
8+
* @deprecated This hook is deprecated and will be replaced by the '@sendbird/uikit-tools' package.
99
* */
1010
export const useGroupChannelMessages: UseGroupChannelMessages = (sdk, channel, userId, options) => {
1111
if (sdk.isCacheEnabled || options?.enableCollectionWithoutLocalCache) {

packages/uikit-chat-hooks/src/channel/useGroupChannelMessages/useGroupChannelMessagesWithCollection.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,9 @@ function shouldUseSearchLimit(startingPoint: number) {
4646
return startingPoint < Date.now();
4747
}
4848

49+
/**
50+
* @deprecated This hook is deprecated and will be replaced by the '@sendbird/uikit-tools' package.
51+
* */
4952
export const useGroupChannelMessagesWithCollection: UseGroupChannelMessages = (sdk, channel, userId, options) => {
5053
const initialStartingPoint = options?.startingPoint ?? Number.MAX_SAFE_INTEGER;
5154
const initialLimit = shouldUseSearchLimit(initialStartingPoint) ? MESSAGE_LIMIT.SEARCH : MESSAGE_LIMIT.DEFAULT;

packages/uikit-chat-hooks/src/channel/useGroupChannelMessages/useGroupChannelMessagesWithQuery.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,9 @@ const createMessageQuery = (channel: SendbirdGroupChannel, options?: UseGroupCha
3131
return channel.createPreviousMessageListQuery(params);
3232
};
3333

34+
/**
35+
* @deprecated This hook is deprecated and will be replaced by the '@sendbird/uikit-tools' package.
36+
* */
3437
export const useGroupChannelMessagesWithQuery: UseGroupChannelMessages = (sdk, channel, userId, options) => {
3538
const queryRef = useRef<SendbirdPreviousMessageListQuery>();
3639
const handlerId = useUniqHandlerId('useGroupChannelMessagesWithQuery');

packages/uikit-chat-hooks/src/handler/useChannelHandler.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ import type { SendbirdChatSDK } from '@sendbird/uikit-utils';
66

77
type ChannelType = 'open' | 'group';
88

9+
/**
10+
* @deprecated This hook is deprecated and will be replaced by the '@sendbird/uikit-tools' package.
11+
* */
912
export const useChannelHandler = <T extends ChannelType = 'group'>(
1013
sdk: SendbirdChatSDK,
1114
handlerId: string,

packages/uikit-chat-hooks/src/types.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ export interface CustomBidirectionalQueryInterface<Data> {
3333
}
3434

3535
/**
36-
* @deprecated This hook is deprecated and will be replaced by the 'uikit-tools' package.
36+
* @deprecated This hook is deprecated and will be replaced by the '@sendbird/uikit-tools' package.
3737
*
3838
* @interface UseGroupChannelList
3939
* @description interface for group channel list hook
@@ -75,7 +75,7 @@ export type UseGroupChannelListOptions = {
7575
};
7676

7777
/**
78-
* @deprecated This hook is deprecated and will be replaced by the 'uikit-tools' package.
78+
* @deprecated This hook is deprecated and will be replaced by the '@sendbird/uikit-tools' package.
7979
*
8080
* @interface UseGroupChannelMessages
8181
* @description interface for group channel messages hook

0 commit comments

Comments
 (0)