@salla.sa/twilight-components
Version:
Salla Web Component
138 lines (137 loc) • 3.16 kB
TypeScript
export interface LoyaltyProgram {
loyalty_program_id?: number;
name?: string;
description?: string;
image?: string;
customer?: Customer;
points?: Point[];
prizes?: PrizeGroup[];
prizes_count?: number;
promotion_title?: string;
promotion_description?: string;
prize_promotion_title?: string;
prize_promotion_description?: string;
status?: boolean;
points_validity_by?: null;
points_validity_value?: null;
prize_promotion_logo?: string;
id?: number;
}
export interface LoyaltyItem {
id: number;
order_id: number;
type: string;
name: string;
status: string;
points: number;
created_at: number;
points_expire_date: number;
key: string;
status_key: string;
}
export interface Customer {
id?: number;
currency?: string;
language?: string;
first_name?: string;
last_name?: string;
phone?: Phone;
email?: string;
avatar?: string;
gender?: string;
birthday?: Date;
notifications?: number;
loyalty_program_points?: number;
pending_orders?: string;
}
export interface Phone {
code?: string;
number?: number;
country?: string;
}
export interface Point {
type?: string;
name?: string;
description?: string;
points?: number;
icon?: string;
color?: string;
url?: string;
id?: number;
key?: string;
status?: boolean;
is_completed?: boolean;
target_url?: string;
share_store_url?: string;
conditions?: Condition[];
steps?: Record<string, Step>;
branches?: Branch[];
sort: number;
}
export interface Condition {
name?: string;
key?: string;
points?: number;
condition?: string;
value?: null;
op?: string;
}
export interface PrizeGroup {
type?: string;
title?: string;
items?: Prize[];
}
export interface Prize {
id?: number;
name?: string;
description?: string;
url?: null;
image?: string;
cost_points?: number;
prize_url?: null;
coupon_type?: null;
coupon_amount?: string;
coupon_maximum_amount?: string;
included_category_ids?: number[];
included_brand_ids?: number[];
included_product_ids?: number[];
excluded_category_ids?: number[];
excluded_brand_ids?: number[];
excluded_product_ids?: number[];
order_minimum_amount?: string;
product_id?: null;
use_product_image?: number;
free_shipping_maximum_amount?: string;
free_shipping_terms_apply?: boolean;
status?: number;
key?: string;
is_product_available?: boolean;
group_title?: string;
group_type?: string;
categories?: any[];
excludedCategories?: any[];
brands?: any[];
excludedBrands?: any[];
products?: any[];
excludedProducts?: any[];
}
export declare enum LoyaltyPointTypes {
Share = "share",
Profile = "profile"
}
export interface Step {
name: string;
title?: string;
key: string;
}
export interface Location {
lat?: number;
lon?: number;
address?: null;
}
export interface Branch {
id?: number;
name?: string;
address_description?: string;
location?: Location;
}