@benshi.ai/js-sdk
Version:
Benshi SDK
258 lines • 9.03 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.RateProperties = exports.RateType = exports.TrackPropertiesInternal = exports.TrackProperties = exports.TrackActions = exports.TrackTypes = exports.InternalUserProperties = exports.UserProperties = exports.EducationLevel = exports.InternalSearchProperties = exports.SearchProperties = exports.NudgeResponseProperties = exports.NudgeResponseType = exports.NudgeAction = exports.PageProperties = exports.PageType = exports.InternalMediaData = exports.MediaData = exports.InternalMediaProperties = exports.MediaProperties = exports.AudioVideoProperties = exports.AudioVideoType = exports.ImageType = exports.ImageProperties = exports.UserInfo = exports.IdentifyProperties = exports.AppProperties = exports.MediaActionForImage = exports.MediaActionForVideo = exports.IdentifyAction = exports.AppAction = exports.ContentBlock = exports.NavigationTypes = 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.NavigationTypes = t.enumtype({
"App": "app",
"Identify": "identify",
"Media": "media",
"NudgeResponse": "nudge_response",
"Page": "page",
"Promo": "promo",
"Rate": "rate",
"Scroll": "scroll",
"Search": "search",
"Track": "track",
});
exports.ContentBlock = t.enumtype({
"Core": "core",
"ELearning": "e-learning",
"ECommerce": "e-commerce",
"Social": "social",
"Payment": "payment",
"Loyalty": "loyalty",
});
exports.AppAction = t.enumtype({
"Background": "background",
"Close": "close",
"Open": "open",
"Resume": "resume",
});
exports.IdentifyAction = t.enumtype({
"Login": "login",
"Logout": "logout",
"Register": "register",
});
exports.MediaActionForVideo = t.enumtype({
"Play": "play",
"Pause": "pause",
"Seek": "seek",
"Finish": "finish",
});
exports.MediaActionForImage = t.enumtype({
"Play": "play",
});
exports.AppProperties = t.iface([], {
"action": "AppAction",
});
exports.IdentifyProperties = t.iface([], {
"action": "IdentifyAction",
});
exports.UserInfo = t.iface(["IdentifyProperties"], {
"user_props": "UserProperties",
});
exports.ImageProperties = t.iface([], {
"contentBlock": t.opt("ContentBlock"),
"type": "ImageType",
"id": "string",
"action": "MediaActionForImage",
"time": "number",
"meta": t.opt("any"),
});
exports.ImageType = t.enumtype({
"Image": "image",
});
exports.AudioVideoType = t.enumtype({
"Audio": "audio",
"Video": "video",
});
exports.AudioVideoProperties = t.iface([], {
"contentBlock": t.opt("ContentBlock"),
"type": "AudioVideoType",
"id": "string",
"action": "MediaActionForVideo",
"time": "number",
"meta": t.opt("any"),
});
exports.MediaProperties = t.union("ImageProperties", "AudioVideoProperties");
exports.InternalMediaProperties = t.intersection("MediaProperties", t.iface([], {
"id_source": "string",
}));
exports.MediaData = t.iface([], {
"name": t.opt("string"),
"length": "string",
"description": t.opt("string"),
"resolution": t.opt("string"),
"language": t.opt("Language"),
});
exports.InternalMediaData = t.intersection("MediaData", t.iface([], {
"id_source": "string",
"id": "string",
"type": "AudioVideoType",
}));
exports.PageType = t.enumtype({
"View": "view",
"Completed": "completed",
});
exports.PageProperties = t.iface([], {
"path": "string",
"title": t.opt("string"),
"duration": t.opt("number"),
"meta": t.opt("any"),
});
exports.NudgeAction = t.enumtype({
"Block": "block",
"Discard": "discard",
"Open": "open",
});
exports.NudgeResponseType = t.enumtype({
"Push": "push_notification",
"InApp": "in_app_message",
});
exports.NudgeResponseProperties = t.iface([], {
"nudge_id": "number",
"type": "NudgeResponseType",
"response": t.iface([], {
"action": "NudgeAction",
}),
"resolved_action": "any",
});
exports.SearchProperties = t.iface([], {
"contentBlock": t.opt("ContentBlock"),
"query": "string",
"page": "number",
"results_ids": t.opt(t.array(t.union("string", "TypedItem"))),
"filter": t.opt("SearchFilter"),
"meta": t.opt("any"),
});
exports.InternalSearchProperties = t.iface([], {
"id": "string",
"results_list": t.array("TypedItem"),
"contentBlock": t.opt("ContentBlock"),
"query": "string",
"page": "number",
"filter": t.opt("SearchFilter"),
"meta": t.opt("any"),
});
exports.EducationLevel = t.enumtype({
"Primary": "primary",
"LowerSecondary": "lower_secondary",
"UpperSecondary": "upper_secondary",
"NonTertiary": "non_tertiary",
"Tertiary": "tertiary",
"Bachelors": "bachelors",
"Masters": "masters",
"Doctorate": "doctorate",
});
exports.UserProperties = t.iface([], {
"name": t.opt("string"),
"organization_id": t.opt("string"),
"organization_name": t.opt("string"),
"experience": t.opt("string"),
"region_state": t.opt("string"),
"city": t.opt("string"),
"workplace": t.opt("string"),
"profession": t.opt("string"),
"zipcode": t.opt("string"),
"timezone": t.opt("string"),
"country": t.opt("Country"),
"language": t.opt("Language"),
"education_level": t.opt("EducationLevel"),
});
exports.InternalUserProperties = t.iface(["UserProperties"], {
"id": "string",
});
exports.TrackTypes = t.enumtype({
"ReferenceGuide": "reference_guide",
});
exports.TrackActions = t.enumtype({
"ViewList": "view_list",
"ViewItem": "view_item",
"ExternalLink": "external_link",
});
exports.TrackProperties = t.union(t.iface([], {
"action": t.union(t.enumlit("TrackActions", "ViewList"), t.enumlit("TrackActions", "ExternalLink")),
"meta": t.opt("any"),
}), t.iface([], {
"action": t.enumlit("TrackActions", "ViewItem"),
"item_id": "string",
"meta": t.opt("any"),
}));
exports.TrackPropertiesInternal = t.intersection("TrackProperties", t.iface([], {
"type": "TrackTypes",
}));
exports.RateType = t.enumtype({
"App": "app",
"Exam": "exam",
"Media": "media",
"Order": "order",
});
exports.RateProperties = t.iface([], {
"rate_value": "number",
"type": "RateType",
"subject_id": "string",
});
var exportedTypeSuite = {
NavigationTypes: exports.NavigationTypes,
ContentBlock: exports.ContentBlock,
AppAction: exports.AppAction,
IdentifyAction: exports.IdentifyAction,
MediaActionForVideo: exports.MediaActionForVideo,
MediaActionForImage: exports.MediaActionForImage,
AppProperties: exports.AppProperties,
IdentifyProperties: exports.IdentifyProperties,
UserInfo: exports.UserInfo,
ImageProperties: exports.ImageProperties,
ImageType: exports.ImageType,
AudioVideoType: exports.AudioVideoType,
AudioVideoProperties: exports.AudioVideoProperties,
MediaProperties: exports.MediaProperties,
InternalMediaProperties: exports.InternalMediaProperties,
MediaData: exports.MediaData,
InternalMediaData: exports.InternalMediaData,
PageType: exports.PageType,
PageProperties: exports.PageProperties,
NudgeAction: exports.NudgeAction,
NudgeResponseType: exports.NudgeResponseType,
NudgeResponseProperties: exports.NudgeResponseProperties,
SearchProperties: exports.SearchProperties,
InternalSearchProperties: exports.InternalSearchProperties,
EducationLevel: exports.EducationLevel,
UserProperties: exports.UserProperties,
InternalUserProperties: exports.InternalUserProperties,
TrackTypes: exports.TrackTypes,
TrackActions: exports.TrackActions,
TrackProperties: exports.TrackProperties,
TrackPropertiesInternal: exports.TrackPropertiesInternal,
RateType: exports.RateType,
RateProperties: exports.RateProperties,
};
exports.default = exportedTypeSuite;
//# sourceMappingURL=typings-ti.js.map