Skip to content

Commit 2554042

Browse files
authored
DEVEXP-1147-1157: (Conversation) OAS sync - Week 49 & 50 (#220)
1 parent c8ae799 commit 2554042

27 files changed

Lines changed: 274 additions & 142 deletions

File tree

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
export interface CalendarMessage {
2+
/** The title is shown close to the button that leads to open a user calendar. */
3+
title: string;
4+
/** The timestamp defines start of a calendar event. */
5+
event_start: Date;
6+
/** The timestamp defines end of a calendar event. */
7+
event_end: Date;
8+
/** Title of a calendar event. */
9+
event_title: string;
10+
/** Description of a calendar event. */
11+
event_description?: string;
12+
/** The URL that is opened when the user cannot open a calendar event directly or channel does not have support for this type. */
13+
fallback_url: string;
14+
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export type { CalendarMessage } from './calendar-message';

packages/conversation/src/models/v1/channel-specific-message/channel-specific-message.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import { WhatsAppFlow } from '../whatsapp-flow';
22
import { WhatsAppPaymentOrderDetails } from '../whatsapp-payment-order-details';
33
import { WhatsAppPaymentOrderStatus } from '../whatsapp-payment-order-status';
4-
import { KakaoTalkCommerceMessageContent } from '../kakaotalk-commerce-message-content';
5-
import { KakaoTalkCarouselCommerceMessageContent } from '../kakaotalk-carousel-commerce-message-content';
4+
import { KakaoTalkCommerce } from '../kakaotalk-commerce';
5+
import { KakaoTalkCarouselCommerce } from '../kakaotalk-carousel-commerce';
66

77
/**
88
* A message containing a channel specific message (not supported by OMNI types).
@@ -37,13 +37,13 @@ export interface WhatsAppPaymentOrderStatusMessage {
3737
export interface KakaoTalkCommerceMessage {
3838
/** The type of the channel specific message. */
3939
message_type: 'COMMERCE';
40-
/** @see KakaoTalkCommerceMessageContent */
41-
message: KakaoTalkCommerceMessageContent;
40+
/** @see KakaoTalkCommerce */
41+
message: KakaoTalkCommerce;
4242
}
4343

4444
export interface KakaoTalkCarouselCommerceMessage {
4545
/** The type of the channel specific message. */
4646
message_type: 'CAROUSEL_COMMERCE';
47-
/** @see KakaoTalkCarouselCommerceMessageContent */
48-
message: KakaoTalkCarouselCommerceMessageContent;
47+
/** @see KakaoTalkCarouselCommerce */
48+
message: KakaoTalkCarouselCommerce;
4949
}

packages/conversation/src/models/v1/choice/choice.ts

Lines changed: 53 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ import { CallMessage } from '../call-message';
22
import { LocationMessageItem } from '../location-message';
33
import { TextMessageItem } from '../text-message';
44
import { UrlMessage } from '../url-message';
5+
import { CalendarMessage } from '../calendar-message';
6+
import { ShareLocationMessage } from '../share-location-message';
57

68
/**
79
* A choice is an action the user can take such as buttons for quick replies or other call to actions.
@@ -10,45 +12,95 @@ export type Choice =
1012
CallMessageChoice
1113
| LocationMessageChoice
1214
| TextMessageChoice
13-
| UrlMessageChoice;
15+
| UrlMessageChoice
16+
| CalendarMessageChoice
17+
| ShareLocationMessageChoice;
1418

1519
export interface ChoiceBase {
1620
/** An optional field. This data will be returned in the ChoiceResponseMessage. The default is message_id_{text, title}. */
1721
postback_data?: string;
1822
}
1923

24+
/**
25+
* Message for triggering a call.
26+
*/
2027
export interface CallMessageChoice extends ChoiceBase {
2128
/** @see CallMessage */
2229
call_message: CallMessage;
2330
// Exclude other choice types
2431
location_message?: never;
2532
text_message?: never;
2633
url_message?: never;
34+
calendar_message?: never;
35+
share_location_message?: never;
2736
}
2837

38+
/**
39+
* Message containing geographic location.
40+
*/
2941
export interface LocationMessageChoice extends ChoiceBase {
3042
/** @see LocationMessageItem */
3143
location_message: LocationMessageItem;
3244
// Exclude other choice types
3345
call_message?: never;
3446
text_message?: never;
3547
url_message?: never;
48+
calendar_message?: never;
49+
share_location_message?: never;
3650
}
3751

52+
/**
53+
* A message containing only text.
54+
*/
3855
export interface TextMessageChoice extends ChoiceBase {
3956
/** @see TextMessageItem */
4057
text_message: TextMessageItem;
4158
// Exclude other choice types
4259
call_message?: never;
4360
location_message?: never;
4461
url_message?: never;
62+
calendar_message?: never;
63+
share_location_message?: never;
4564
}
4665

66+
/**
67+
* A generic URL message.
68+
*/
4769
export interface UrlMessageChoice extends ChoiceBase {
4870
/** @see UrlMessage */
4971
url_message: UrlMessage;
5072
// Exclude other choice types
5173
call_message?: never;
5274
location_message?: never;
5375
text_message?: never;
76+
calendar_message?: never;
77+
share_location_message?: never;
78+
}
79+
80+
/**
81+
* Message containing details about a calendar event.
82+
*/
83+
export interface CalendarMessageChoice extends ChoiceBase {
84+
/** @see CalendarMessage */
85+
calendar_message?: CalendarMessage;
86+
// Exclude other choice types
87+
call_message?: never;
88+
location_message?: never;
89+
text_message?: never;
90+
url_message?: never;
91+
share_location_message?: never;
92+
}
93+
94+
/**
95+
* Message requesting location from a user.
96+
*/
97+
export interface ShareLocationMessageChoice extends ChoiceBase {
98+
/** @see ShareLocationMessage */
99+
share_location_message?: ShareLocationMessage;
100+
// Exclude other choice types
101+
call_message?: never;
102+
location_message?: never;
103+
text_message?: never;
104+
url_message?: never;
105+
calendar_message?: never;
54106
}

packages/conversation/src/models/v1/index.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ export * from './app-response';
88
export * from './app-update-request';
99
export * from './audit-record';
1010
export * from './audit-records-list';
11+
export * from './calendar-message';
1112
export * from './call-message';
1213
export * from './callback-settings';
1314
export * from './card-message';
@@ -60,11 +61,12 @@ export * from './inject-event-response';
6061
export * from './inject-message-request';
6162
export * from './kakaotalk-button';
6263
export * from './kakaotalk-carousel';
63-
export * from './kakaotalk-carousel-commerce-message-content';
64+
export * from './kakaotalk-carousel-commerce';
6465
export * from './kakaotalk-commerce';
65-
export * from './kakaotalk-commerce-message-content';
6666
export * from './kakaotalk-coupon';
6767
export * from './kakaotalk-image';
68+
export * from './kakaotalk-message';
69+
export * from './kakaotalk-pricing';
6870
export * from './list-apps-response';
6971
export * from './list-message';
7072
export * from './list-section';
@@ -91,6 +93,7 @@ export * from './send-event-request';
9193
export * from './send-event-response';
9294
export * from './send-message-request';
9395
export * from './send-message-response';
96+
export * from './share-location-message';
9497
export * from './smart-conversation';
9598
export * from './template-message';
9699
export * from './template-reference';

packages/conversation/src/models/v1/kakaotalk-carousel-commerce-message-content/index.ts

Lines changed: 0 additions & 1 deletion
This file was deleted.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export type { KakaoTalkCarouselCommerce } from './kakaotalk-carousel-commerce';

packages/conversation/src/models/v1/kakaotalk-carousel-commerce-message-content/kakaotalk-carousel-commerce-message-content.ts renamed to packages/conversation/src/models/v1/kakaotalk-carousel-commerce/kakaotalk-carousel-commerce.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { KakaoTalkCarousel } from '../kakaotalk-carousel';
33
/**
44
* Carousel content
55
*/
6-
export interface KakaoTalkCarouselCommerceMessageContent {
6+
export interface KakaoTalkCarouselCommerce {
77
/** Set to `true` if a push alarm should be sent to a device. */
88
push_alarm?: boolean;
99
/** Set to `true` if a message contains adult content. Set to `false` by default. */
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
export type {
22
KakaoTalkCarousel,
33
KakaoTalkCarouselHead,
4-
KakaoTalkCarouselList,
54
KakaoTalkCarouselTail,
65
} from './kakaotalk-carousel';

packages/conversation/src/models/v1/kakaotalk-carousel/kakaotalk-carousel.ts

Lines changed: 2 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
import { KakaoTalkCommerce } from '../kakaotalk-commerce';
2-
import { KakaoTalkButton } from '../kakaotalk-button';
3-
import { KakaoTalkCoupon } from '../kakaotalk-coupon';
1+
import { KakaoTalkMessage } from '../kakaotalk-message';
42

53
/**
64
* Carousel content
@@ -9,7 +7,7 @@ export interface KakaoTalkCarousel {
97
/** Carousel introduction */
108
head?: KakaoTalkCarouselHead;
119
/** List of carousel cards */
12-
list: KakaoTalkCarouselList[];
10+
list: KakaoTalkMessage[];
1311
/** "More" button */
1412
tail?: KakaoTalkCarouselTail;
1513
}
@@ -41,18 +39,3 @@ export interface KakaoTalkCarouselTail {
4139
/** App link opened on an Android device (e.g. `tel://PHONE_NUMBER`) */
4240
scheme_android?: string;
4341
}
44-
45-
export interface KakaoTalkCarouselList {
46-
/** Additional information */
47-
additional_content?: string;
48-
/** URL to the product image */
49-
image_url: string;
50-
/** URL opened when a user clicks on the image */
51-
image_link?: string;
52-
/** Product information */
53-
commerce?: KakaoTalkCommerce;
54-
/** Buttons list */
55-
buttons: KakaoTalkButton[];
56-
/** Discount coupon */
57-
coupon?: KakaoTalkCoupon;
58-
}

0 commit comments

Comments
 (0)