Skip to content

Commit

Permalink
botonic-core: add types for whatsapp order
Browse files Browse the repository at this point in the history
  • Loading branch information
AlbertGom committed Jan 14, 2025
1 parent 793b221 commit d1b0375
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions packages/botonic-core/src/models/legacy-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ export enum INPUT {
WHATSAPP_PRODUCT = 'whatsapp-product',
WHATSAPP_PRODUCT_LIST = 'whatsapp-product-list',
WHATSAPP_PRODUCT_CAROUSEL = 'whatsapp-product-carousel',
WHATSAPP_ORDER = 'whatsapp_order',
}

export interface Locales {
Expand Down Expand Up @@ -119,6 +120,10 @@ export type InputType =
| INPUT.WHATSAPP_CTA_URL_BUTTON
| INPUT.EVENT_AGENT_MESSAGE_CREATED
| INPUT.WHATSAPP_CATALOG
| INPUT.WHATSAPP_PRODUCT
| INPUT.WHATSAPP_PRODUCT_LIST
| INPUT.WHATSAPP_PRODUCT_CAROUSEL
| INPUT.WHATSAPP_ORDER

export interface IntentResult {
intent: string
Expand Down Expand Up @@ -162,6 +167,15 @@ export interface Input extends Partial<NluResult> {
type: string
data: string
}
catalog_id?: string
product_items?: ProductItem[]
}

interface ProductItem {
product_retailer_id: string
quantity: number
item_price: number
currency: string
}

export interface Campaign {
Expand Down

0 comments on commit d1b0375

Please sign in to comment.