Skip to content

Commit 7e90e88

Browse files
committed
Adjust types
1 parent 41f01eb commit 7e90e88

File tree

4 files changed

+447
-83
lines changed

4 files changed

+447
-83
lines changed

apps/meteor/client/omnichannel/priorities/PriorityEditForm.tsx

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,8 @@ import StringSettingInput from '../../views/admin/settings/Setting/inputs/String
1212

1313
export type PriorityFormData = { name: string; reset: boolean };
1414

15-
type ILivechatClientPriority = Serialized<ILivechatPriority> & {
16-
i18n: TranslationKey;
17-
};
18-
1915
export type PriorityEditFormProps = {
20-
data: ILivechatClientPriority;
16+
data: Serialized<ILivechatPriority>;
2117
onCancel: () => void;
2218
onSave: (values: PriorityFormData) => Promise<void>;
2319
};

apps/meteor/client/views/omnichannel/directory/hooks/usePriorityInfo.tsx

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,14 @@
1-
import type { ILivechatPriority, Serialized } from '@rocket.chat/core-typings';
2-
import type { TranslationKey } from '@rocket.chat/ui-contexts';
31
import { useEndpoint } from '@rocket.chat/ui-contexts';
42
import { useQuery } from '@tanstack/react-query';
53

64
import { useOmnichannelPriorities } from '../../../../omnichannel/hooks/useOmnichannelPriorities';
75

8-
type ILivechatClientPriority = Serialized<ILivechatPriority> & {
9-
i18n: TranslationKey;
10-
};
11-
126
export const usePriorityInfo = (priorityId: string) => {
137
const { enabled } = useOmnichannelPriorities();
148
const getPriority = useEndpoint('GET', `/v1/livechat/priorities/:priorityId`, { priorityId });
159
return useQuery({
1610
queryKey: ['/v1/livechat/priorities', priorityId],
17-
queryFn: () => getPriority() as Promise<ILivechatClientPriority>,
11+
queryFn: () => getPriority(),
1812
gcTime: 0,
1913
enabled,
2014
});

packages/rest-typings/src/v1/omnichannel.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4082,7 +4082,7 @@ export type OmnichannelEndpoints = {
40824082
};
40834083

40844084
'/v1/livechat/priorities/:priorityId': {
4085-
GET: () => ILivechatPriority | void;
4085+
GET: () => ILivechatPriority;
40864086
PUT: (params: PUTLivechatPriority) => void;
40874087
};
40884088

0 commit comments

Comments
 (0)