Skip to content

Commit 5648e67

Browse files
[Chore] update kakaoButton, sendManyDetailResponse
1 parent e935c85 commit 5648e67

2 files changed

Lines changed: 27 additions & 7 deletions

File tree

src/models/kakao/kakaoButton.ts

Lines changed: 25 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,31 @@ export type KakaoButtonType =
1111
| 'BT'
1212
| 'AC';
1313

14-
export type KakaoButton = {
14+
export type KakaoWebButton = {
1515
buttonName: string;
16-
buttonType: KakaoButtonType;
17-
linkMo?: string;
16+
buttonType: Extract<KakaoButtonType, 'WL'>;
17+
linkMo: string;
1818
linkPc?: string;
19-
linkAnd?: string;
20-
linkIos?: string;
19+
linkAnd?: never;
20+
linkIos?: never;
2121
};
22+
23+
export type KakaoAppButton = {
24+
buttonName: string;
25+
buttonType: Extract<KakaoButtonType, 'AL'>;
26+
linkMo?: never;
27+
linkPc?: never;
28+
linkAnd: string;
29+
linkIos: string;
30+
};
31+
32+
export type KakaoDefaultButton = {
33+
buttonName: string;
34+
buttonType: Exclude<KakaoButtonType, 'WL' | 'AL'>;
35+
linkMo?: never;
36+
linkPc?: never;
37+
linkAnd?: never;
38+
linkIos?: never;
39+
};
40+
41+
export type KakaoButton = KakaoWebButton | KakaoAppButton | KakaoDefaultButton;

src/responses/sendManyDetailResponse.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export type FailedMessage = {
1212
messageId: string;
1313
statusCode: string;
1414
accountId: string;
15-
customFields?: Map<string, string>;
15+
customFields?: Record<string, string>;
1616
};
1717

1818
/**
@@ -21,7 +21,7 @@ export type FailedMessage = {
2121
export type MessageListResponse = {
2222
messageId: string;
2323
statusCode: string;
24-
customFields?: Map<string, string>;
24+
customFields?: Record<string, string>;
2525
statusMessage: string;
2626
};
2727

0 commit comments

Comments
 (0)