@benshi.ai/js-sdk
Version:
Benshi SDK
236 lines • 8.87 kB
JavaScript
;
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.InternalScheduleDeliveryProperties = exports.ScheduleDeliveryProperties = exports.ScheduleDeliveryAction = exports.CancelCheckoutProperties = exports.CancelType = exports.InternalDrugProperties = exports.DrugProperties = exports.DeliveryProperties = exports.DeliveryAction = exports.InternalCheckoutProperties = exports.CheckoutProperties = exports.ListType = exports.ListAction = exports.InternalCartProperties = exports.CartProperties = exports.CartAction = exports.InternalItemProperties = exports.ItemProperties = exports.ItemDetail = exports.MetaItemDetail = exports.MedicalEquipmentDetail = exports.OxygenItemDetail = exports.BloodItemDetail = exports.DrugItemDetail = exports.MetaOxygenItemDetail = exports.MetaBloodItemDetail = exports.BaseItemDetail = exports.TypedItem = exports.StockStatus = exports.ItemType = exports.ItemAction = exports.ECommerceTypes = void 0;
/**
* This module was automatically generated by `ts-interface-builder`
*/
var t = __importStar(require("ts-interface-checker"));
// tslint:disable:object-literal-key-quotes
exports.ECommerceTypes = t.enumtype({
"Cancel": "cancel_checkout",
"Cart": "cart",
"Checkout": "checkout",
"Delivery": "delivery",
"Item": "item",
"List": "list",
"Rate": "rate",
"ScheduleDelivery": "schedule_delivery",
});
exports.ItemAction = t.enumtype({
"View": "view",
"Detail": "detail",
"Impression": "impression",
"AddFavorite": "add_favorite",
"RemoveFavorite": "remove_favorite",
"AddReminder": "add_reminder",
"RemoveReminder": "remove_reminder",
"RemoveReminderAuto": "remove_reminder_auto",
});
exports.ItemType = t.enumtype({
"Blood": "blood",
"Book": "book",
"Clothing": "clothing",
"Drug": "drug",
"Electronics": "electronics",
"MedicalEquipment": "medical_equipment",
"Misc": "misc",
"Oxygen": "oxygen",
});
exports.StockStatus = t.enumtype({
"InStock": "in_stock",
"LowStock": "low_stock",
"OutOfStock": "out_of_stock",
});
exports.TypedItem = t.iface([], {
"id": "string",
"type": "ItemType",
});
exports.BaseItemDetail = t.iface([], {
"id": "string",
"quantity": "number",
"price": "number",
"currency": "CurrencyCode",
"stock_status": t.opt("StockStatus"),
"promo_id": t.opt("string"),
});
exports.MetaBloodItemDetail = t.intersection("BaseItemDetail", t.iface([], {
"type": t.enumlit("ItemType", "Blood"),
"meta": "BloodMeta",
}));
exports.MetaOxygenItemDetail = t.intersection("BaseItemDetail", t.iface([], {
"type": t.enumlit("ItemType", "Oxygen"),
"meta": "OxygenMeta",
}));
exports.DrugItemDetail = t.intersection("BaseItemDetail", t.iface([], {
"type": t.enumlit("ItemType", "Drug"),
}));
exports.BloodItemDetail = t.intersection("BaseItemDetail", t.iface([], {
"type": t.enumlit("ItemType", "Blood"),
}));
exports.OxygenItemDetail = t.intersection("BaseItemDetail", t.iface([], {
"type": t.enumlit("ItemType", "Oxygen"),
}));
exports.MedicalEquipmentDetail = t.intersection("BaseItemDetail", t.iface([], {
"type": t.enumlit("ItemType", "MedicalEquipment"),
}));
exports.MetaItemDetail = t.union("MetaBloodItemDetail", "MetaOxygenItemDetail", "DrugItemDetail", "MedicalEquipmentDetail");
exports.ItemDetail = t.union("BloodItemDetail", "OxygenItemDetail", "DrugItemDetail", "MedicalEquipmentDetail");
exports.ItemProperties = t.iface([], {
"action": "ItemAction",
"item": "ItemDetail",
"search_id": t.opt("string"),
"meta": t.opt("any"),
});
exports.InternalItemProperties = t.iface(["ItemProperties"], {
"usd_rate": "number",
});
exports.CartAction = t.enumtype({
"AddItem": "add_item",
"RemoveItem": "remove_item",
});
exports.CartProperties = t.iface([], {
"id": "string",
"action": "CartAction",
"item": "ItemDetail",
"cart_price": "number",
"currency": "CurrencyCode",
"meta": t.opt("any"),
});
exports.InternalCartProperties = t.iface(["CartProperties"], {
"usd_rate": "number",
});
exports.ListAction = t.enumtype({
"Add": "add_item",
"Discard": "discard",
"Edit": "edit_item",
"Remove": "remove_item",
"View": "view",
});
exports.ListType = t.enumtype({
"Cart": "cart",
"Favourite": "favourite",
"Order": "order",
"Reminder": "reminder",
});
exports.CheckoutProperties = t.iface([], {
"id": "string",
"is_successful": "boolean",
"cart_price": "number",
"currency": "CurrencyCode",
"items": t.array("MetaItemDetail"),
"cart_id": "string",
"meta": t.opt("any"),
});
exports.InternalCheckoutProperties = t.iface(["CheckoutProperties"], {
"usd_rate": "number",
});
exports.DeliveryAction = t.enumtype({
"Delivered": "delivered",
});
exports.DeliveryProperties = t.iface([], {
"id": "string",
"action": "DeliveryAction",
"order_id": "string",
"meta": t.opt("any"),
});
exports.DrugProperties = t.iface([], {
"market_id": "string",
"name": "string",
"description": t.opt("string"),
"supplier_id": "string",
"supplier_name": "string",
"producer": t.opt("string"),
"packaging": t.opt("string"),
"active_ingredients": t.array("string"),
"drug_form": t.opt("string"),
"drug_strength": t.opt("string"),
"atc_anatomical_group": t.opt("string"),
"otc_or_ethical": t.opt("string"),
});
exports.InternalDrugProperties = t.iface(["DrugProperties"], {
"id": "string",
});
exports.CancelType = t.enumtype({
"Cart": "cart",
"Order": "order",
});
exports.CancelCheckoutProperties = t.iface([], {
"id": "string",
"type": "CancelType",
"items": t.array("TypedItem"),
"reason": "string",
"meta": t.opt("any"),
});
exports.ScheduleDeliveryAction = t.enumtype({
"Schedule": "schedule",
"Update": "update",
});
exports.ScheduleDeliveryProperties = t.iface([], {
"order_id": "string",
"is_urgent": "boolean",
"action": "ScheduleDeliveryAction",
"ts": t.opt("string"),
"meta": t.opt("any"),
});
exports.InternalScheduleDeliveryProperties = t.iface(["ScheduleDeliveryProperties"], {
"ts": "string",
});
var exportedTypeSuite = {
ECommerceTypes: exports.ECommerceTypes,
ItemAction: exports.ItemAction,
ItemType: exports.ItemType,
StockStatus: exports.StockStatus,
TypedItem: exports.TypedItem,
BaseItemDetail: exports.BaseItemDetail,
MetaBloodItemDetail: exports.MetaBloodItemDetail,
MetaOxygenItemDetail: exports.MetaOxygenItemDetail,
DrugItemDetail: exports.DrugItemDetail,
BloodItemDetail: exports.BloodItemDetail,
OxygenItemDetail: exports.OxygenItemDetail,
MedicalEquipmentDetail: exports.MedicalEquipmentDetail,
MetaItemDetail: exports.MetaItemDetail,
ItemDetail: exports.ItemDetail,
ItemProperties: exports.ItemProperties,
InternalItemProperties: exports.InternalItemProperties,
CartAction: exports.CartAction,
CartProperties: exports.CartProperties,
InternalCartProperties: exports.InternalCartProperties,
ListAction: exports.ListAction,
ListType: exports.ListType,
CheckoutProperties: exports.CheckoutProperties,
InternalCheckoutProperties: exports.InternalCheckoutProperties,
DeliveryAction: exports.DeliveryAction,
DeliveryProperties: exports.DeliveryProperties,
DrugProperties: exports.DrugProperties,
InternalDrugProperties: exports.InternalDrugProperties,
CancelType: exports.CancelType,
CancelCheckoutProperties: exports.CancelCheckoutProperties,
ScheduleDeliveryAction: exports.ScheduleDeliveryAction,
ScheduleDeliveryProperties: exports.ScheduleDeliveryProperties,
InternalScheduleDeliveryProperties: exports.InternalScheduleDeliveryProperties,
};
exports.default = exportedTypeSuite;
//# sourceMappingURL=typings-ti.js.map