Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Core: added types for whatsapp order #2958

Open
wants to merge 1 commit into
base: feature/blt-1263-product-carousel
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading