@benshi.ai/js-sdk
Version:
Benshi SDK
74 lines (63 loc) • 1.49 kB
text/typescript
/**
* This module was automatically generated by `ts-interface-builder`
*/
import * as t from "ts-interface-checker";
// tslint:disable:object-literal-key-quotes
export const LoyaltyTypes = t.enumtype({
"Level": "level",
"Milestone": "milestone",
"Promo": "promo",
});
export const PromoAction = t.enumtype({
"Apply": "apply",
"View": "view",
});
export const PromoType = t.enumtype({
"AddToCart": "add_to_cart",
"Coupon": "coupon",
});
export const PromoItemType = t.enumtype({
"Blood": "blood",
"Book": "book",
"Clothing": "clothing",
"Drug": "drug",
"Electronics": "electronics",
"Misc": "misc",
"Oxygen": "oxygen",
});
export const PromoItem = t.iface([], {
"id": "string",
"type": "PromoItemType",
});
export const PromoProperties = t.iface([], {
"id": "string",
"action": "PromoAction",
"items": t.array("PromoItem"),
"title": "string",
"type": "PromoType",
});
export const LevelProperties = t.iface([], {
"prev_level": "number",
"new_level": "number",
"module_id": t.opt("string"),
"meta": t.opt("any"),
});
export const MilestoneAction = t.enumtype({
"Achieved": "achieved",
});
export const MilestoneProperties = t.iface([], {
"id": "string",
"action": "MilestoneAction",
});
const exportedTypeSuite: t.ITypeSuite = {
LoyaltyTypes,
PromoAction,
PromoType,
PromoItemType,
PromoItem,
PromoProperties,
LevelProperties,
MilestoneAction,
MilestoneProperties,
};
export default exportedTypeSuite;