UNPKG

@nosto/types

Version:
824 lines (823 loc) 22 kB
export declare class AbTestPreviewSettingsBase<T> { id: TestId; method: Method; name: string; segment: string; variations: T[]; } export declare class AbTestDraftPreviewSettingsDTO extends AbTestPreviewSettingsBase<AbTestVariationDTO> { variations: AbTestVariationDTO[]; } export declare class AbTestPreviewSettingsDTO extends AbTestPreviewSettingsBase<AbTestVariationDTO> { variations: AbTestVariationDTO[]; } export interface AbTestVariation { base: boolean; id: string; name: string; } export declare class AbTestVariationDTO implements AbTestVariation { base: boolean; id: string; name: string; } export declare class AbstractFacebookPixelEvent<D> { d: D; n: string; } export declare class AbstractStacklaPixelEvent<D> { d: D; n: string; } export declare class JacksonBean { } export declare class PublicJacksonBean extends JacksonBean { } export declare class ActiveVisitDTO extends PublicJacksonBean { customer: CustomerDTO; visit: VisitDTO; } export interface AnalyticEvent { } export declare class BigcommerceCustomerInfo extends PublicJacksonBean { customer_reference: string; email: string; first_name: string; group_id: string; last_name: string; marketing_permission: boolean; } export declare class NostoIdentifierObjectId<T> implements Comparable<T> { id: string; } export declare class CampaignId<T> extends NostoIdentifierObjectId<T> { feature: OnsiteFeature; } export declare class CartItem implements Serializable, CartItemFields { name: string; price_currency_code: string; product_id: string; quantity: number; sku_id: string; unit_price: number; } export interface CartItemFields { name: string; price_currency_code: string; product_id: string; quantity: number; sku_id: string; unit_price: number; } export declare class ClientScriptSettingsDTO extends PublicJacksonBean { account: string; addToCartPopup: boolean; anyDomain: boolean; browserQueueActive: boolean; cmpMode: string; collectEmailFromURL: boolean; cookieTime: number; debugRedirectUrl: string; defaultCurrencyCode: string; defaultVariantId: string; disablePlacementAntiFlickering: boolean; discountPopupTriggers: { [index: string]: PopupTriggerSettingsDTO[]; }; discountPopupVisible: boolean; emailAddressUrlParamName: string; exchangeRates: boolean; externalIdentifier: string; extraHosts: string[]; fullTaggingRequired: boolean; intersectionObserved: string[]; jsErrorUrl: string; measurePerformance: boolean; mutationObserved: string[]; nostoRefParam: string; obfuscateCustomerCookie: boolean; pageTypeFiltersForUntaggedPages: boolean; parameterlessAttribution: boolean; placements: { [index: string]: DynamicPlacementDTO; }; popupRibbonUrlFilter: boolean; recoveryPopupEnabled: boolean; searchApiUrl: string; searchDeploymentId: string; searchEnabled: boolean; searchQueryParam: string; searchTemplateHost: string; secureCookie: boolean; segmentUrlParameters: string[]; sendTaggingOnlyIfNeeded: boolean; server: string; serverProductPlacementFiltering: boolean; shopifyCmpRedirect: boolean; shopifySkuSelectionListener: boolean; site: string; sourceParameterName: string; stacklaEmbedCodeEndpoint: string; stacklaWidgetAssetPath: string; stacklaWidgetDomain: string; subDomain: string; trackingTypes: string[]; triggerAddToCartPopupWithCookie: boolean; } export interface Comparable<T> { } export declare class ConditionDTO { advanced: boolean; brands: string[]; categories: string[]; exc_brands: string[]; exc_categories: string[]; exc_locations: string[][]; exc_page_types: PageType[]; exc_referer_urls: string[]; exc_tags: string[]; exc_url_parameters: string[]; exc_urls: string[]; hide_on_desktop: boolean; hide_on_mobile: boolean; locations: string[][]; max_cart_size: number; max_cart_value: number; max_page_views: number; min_cart_size: number; min_cart_value: number; min_page_views: number; page_types: PageType[]; referer_urls: string[]; tags: string[]; treat_url_conditions_as_filters: boolean; url_parameters: string[]; urls: string[]; } export declare class ContentDebugDTO { divIds: string[]; enabled: boolean; id: ContentId; name: string; rendered: boolean; } export declare class ContentId extends CampaignId<ContentId> { } export declare class ConversionItem extends JacksonBean implements CartItemFields { name: string; price_currency_code: string; product_id: string; quantity: number; sku_id: string; unit_price: number; } export declare class CrawlResponse extends PublicJacksonBean { message: string; product_id: string; } export declare class CustomerAffinityResponse extends PublicJacksonBean { top_brands: CustomerAffinityResponseItem[]; top_categories: CustomerAffinityResponseItem[]; top_skus: { [index: string]: CustomerAffinityResponseItem[]; }; } export declare class CustomerAffinityResponseItem extends JacksonBean { name: string; score: number; } export declare class CustomerDTO extends PublicJacksonBean { id: string; marketing_permission: boolean; ref: string; } export interface CustomerData { customer_reference?: string; discontinued?: boolean; email?: string; first_name?: string; last_name?: string; newsletter?: boolean; } export declare class CustomerToken extends PublicJacksonBean { token: string; } export declare class DebugRequestParamsDTO { at?: Date; ep: boolean; fs: string[]; tp?: TestPreviewsDTO; } export declare class Record { } export declare class DebugToolbarDataDTO extends Record { contentCampaigns: ContentDebugDTO[]; dev: boolean; draftTests: AbTestDraftPreviewSettingsDTO[]; loggedIn: boolean; placements: PlacementDebugDTO[]; placementsTab: boolean; popupPreviewSettings: PopupCampaignPreviewSettingsDTO[]; recommendationCampaigns: RecommendationDebugDTO[]; richSegmentsTab: boolean; runningTests: AbTestPreviewSettingsDTO[]; segments: SegmentDebugDTO[]; showImprovedCampaignOverlayData: boolean; showStacklaTab: boolean; showTestsTab: boolean; stacklaWidgets: StacklaWidgetDebugDTO[]; } export declare class DynamicPlacementDTO { cssSelector: string; enabled: boolean; filters: FilterRule[]; id: string; intersection: boolean; mode: InsertMode; mutation: boolean; wrapper: WrapMode; } export declare class Effect { delay_min: number; re_entry_tolerance: number; scroll_min: number; } export declare class EventAttributionMetadata extends PublicJacksonBean { customer_reference: string; event_date: Date; referrer: string; url: string; } export declare class EventAttributionParams extends PublicJacksonBean { events: EventFields[]; metadata: EventAttributionMetadata; } export interface EventFields { event_ref_type: string; event_type: string; ref: string; ref_src: string; target: string; target_fragment: string; } export interface EventRequest extends RawEvents { cart_product_ids: string[]; categories: string[]; category_ids: string[]; customer_reference: string; date: Date; mail_ref: string; mail_type: string; page_type: PageType; reference: string; referrer: string; sort_order: string; url: string; } export declare class EventRequestMessage extends PublicJacksonBean implements EventRequest { cart_cookie_hash: string; cart_product_ids: string[]; cart_total_price?: number; cart_total_size: number; categories: string[]; category_ids: string[]; current_variant: string; custom_fields: { [index: string]: string[]; }; customer_reference: string; date: Date; debug?: DebugRequestParamsDTO; debug_code: string; elements: string[]; events: EventFields[]; mail_ref: string; mail_type: string; page_type: PageType; preview: boolean; recotrace: string; reference: string; referrer: string; render_mode?: RenderMode; segment_codes: string[]; show_cart_popup_recommendations: boolean; sort_order: string; tags: string[]; url: string; } export declare class EventRequestMessageV1 extends EventRequestMessage { cart: CartItem[]; cart_hash: string; cart_popup: boolean; coupon_campaign: string; coupon_code: string; coupon_used: boolean; current_variant_id: string; customer: PushedCustomer; debug_token: string; event_date: Date; experiments: Experiment[]; external_identifier: string; ref: string; response_mode?: RenderMode; restore_link: string; skipcache: boolean; } export declare class EventResponseMessage extends PublicJacksonBean { af: CustomerAffinityResponse; cdc: string; cmpid: string; cpr: string; cs: number; ct: number; customer: string; debug: DebugToolbarDataDTO; ed: Date; errors: string[]; fb: FacebookData; ga: GoogleAnalyticsData; gl: string[]; he: boolean; hiic: boolean; js: string; nc: boolean; pv: number; recommendations: { [index: string]: any; }; se: SegmentsResponseBean; sp: StacklaTrackingData; visit: string; } export declare class Events { } export declare class Experiment extends PublicJacksonBean { id: string; id_stamp: string; name: string; variation: string; variation_name: string; } export declare class FacebookData { a: string; e: AbstractFacebookPixelEvent<any>[]; p: string; s: string[]; } export declare class FilterRule { field: string; negate: boolean; operator: FilterOperator; values: any[]; } export declare class ForcedTestDTO extends Record { t: TestId; v: string; } export declare class GoogleAnalyticsData extends PublicJacksonBean { s: string[]; } export interface NostoProduct<SKU> extends NostoVariant, TaggedProduct<SKU> { inventory_level: number; real_variant_ids: string[]; saleable: boolean; supplier_cost: number; } export interface NostoSku extends Validated, Sku { inventory_level: number; } export interface NostoVariant extends Validated { availability: string; available: boolean; discounted: boolean; list_price: number; price: number; price_currency_code: string; price_text: string; } export declare class OrderCustomer extends PublicJacksonBean implements OrderInfoFields { country: string; country_code: string; customer_reference?: string; discontinued?: boolean; email?: string; first_name?: string; last_name?: string; order_number: string; phone: string; phone_number: string; post_code: string; type: string; zip_code: string; } export interface OrderInfoFields extends CustomerData { country_code: string; order_number: string; phone_number: string; type: string; zip_code: string; } export interface OrderStatus extends Comparable<OrderStatus> { date: Date; order_status: string; payment_provider: string; } export declare class PlacementDebugDTO extends Record { activeRule: SegmentRuleDebugDTO; divId: string; enabled: boolean; id: string; name: string; rules: PlacementRuleDTO[]; } export interface PlacementRule<T> { feature: OnsiteFeature; segment: string; to: T; } export declare class PlacementRuleDTO extends Record { feature: OnsiteFeature; segment: string; to: CampaignId<any>; } export declare class PopupCampaignPreviewSettingsDTO { campaign_id: string; campaign_title: string; condition: ConditionDTO; enabled: boolean; popup_id: string; type: string; } export declare class PopupCouponGiven extends PublicJacksonBean implements PopupEvent { campaignId: string; campaign_id: string; } export declare class PopupEmailCollected extends PublicJacksonBean implements PopupEvent { campaignId: string; campaign_id: string; } export interface PopupEvent extends AnalyticEvent { campaign_id: string; } export declare class PopupTriggerSettingsDTO { condition: ConditionDTO; effect: Effect; enabled: boolean; id: string; name: string; ordinal: number; popup_id: string; } export declare class PopupTriggered extends PublicJacksonBean implements PopupEvent { campaignId: string; campaign_id: string; } export declare class ProductPushResponse extends PublicJacksonBean { messages: string[]; } export declare class PushedCustomer extends PublicJacksonBean { customer_reference: string; email: string; first_name: string; hcid: string; last_name: string; newsletter: boolean; order_number: string; source: string; source_id: string; type: string; } export declare class PushedProduct extends PublicJacksonBean implements NostoProduct<PushedProductSKU> { age_group: string; alternate_image_urls: string[]; availability: string; available: boolean; brand: string; categories: string[]; category: string[]; category_id: string[]; category_ids: string[]; condition: string; custom_fields: { [index: string]: string; }; date_published: Date; description: string; discounted: boolean; gender: string; google_category: string; gtin: string; image_url: string; inventory_level: number; list_price: number; name: string; partial_variants: { [index: string]: NostoVariant; }; price: number; price_currency_code: string; price_text: string; product_id: string; rating_value: number; real_variant_ids: string[]; review_count: number; saleable: boolean; skus: PushedProductSKU[]; supplier_cost: number; tags1: string[]; tags2: string[]; tags3: string[]; thumb_url: string; unit_pricing_base_measure: number; unit_pricing_measure: number; unit_pricing_unit: string; url: string; variant_id: string; variation_id: string; variations: { [index: string]: PushedVariation; }; } export declare class PushedProductSKU extends JacksonBean implements NostoSku { availability: string; custom_fields: { [index: string]: string; }; gtin: string; id: string; image_url: string; inventory_level: number; list_price: number; name: string; price: number; url: string; } export declare class PushedVariation extends PublicJacksonBean implements NostoVariant { availability: string; available: boolean; discounted: boolean; list_price: number; price: number; price_currency_code: string; price_text: string; } export interface RawEvents { events: EventFields[]; } export declare class RecommendationDebugDTO extends Record { divId: string; divIds: string[]; enabled: boolean; fbLink: string; fbTitle: string; fbType: string; filtered: boolean; id: RecommendationId; ittt: boolean; link: string; productIds: { [index: string]: string; }; recoId: string; rendered: boolean; resultType: string; title: string; type: string; variant: boolean; } export declare class RecommendationId extends CampaignId<RecommendationId> { } export declare class SearchClick extends PublicJacksonBean implements SearchEvent { metadata: SearchEventMetadata; productId: string; } export interface SearchEvent extends AnalyticEvent { metadata: SearchEventMetadata; } export declare class SearchEventMetadata extends PublicJacksonBean { hasResults: boolean; isAutoComplete: boolean; isAutoCorrect: boolean; isOrganic: boolean; isRefined: boolean; isSorted: boolean; query: string; refinedQuery: string; resultId: string; } export declare class SearchImpression extends PublicJacksonBean implements SearchEvent { metadata: SearchEventMetadata; page: number; productIds: string[]; } export declare class SegmentDebugDTO { active: boolean; forced: boolean; id: string; name: string; } export declare class SegmentInfoBean extends JacksonBean { id: string; } export declare class SegmentRuleDebugDTO extends Record { draft: TestDebugDTO; segment: string; test: TestDebugDTO; to: CampaignId<any>; type: TargetType; } export declare class SegmentsResponseBean extends PublicJacksonBean { active_segments: SegmentInfoBean[]; } export interface Serializable { } export interface Sku { availability: string; custom_fields: { [index: string]: string; }; gtin: string; id: string; image_url: string; list_price: number; name: string; price: number; url: string; } export declare class StacklaTrackingData { e: AbstractStacklaPixelEvent<any>[]; } export declare class StacklaWidgetDebugDTO { divIds: string[]; enabled: boolean; filterType: StacklaWidgetFilterType; id: StacklaWidgetEmbedId; name: string; rendered: boolean; usedInTest: boolean; } export declare class StacklaWidgetEmbedId extends CampaignId<StacklaWidgetEmbedId> { } export interface TaggedProduct<SKU> extends NostoVariant { age_group: string; alternate_image_urls: string[]; brand: string; categories: string[]; category_ids: string[]; condition: string; custom_fields: { [index: string]: string; }; date_published: Date; description: string; gender: string; google_category: string; gtin: string; image_url: string; name: string; partial_variants: { [index: string]: NostoVariant; }; product_id: string; rating_value: number; review_count: number; skus: SKU[]; tags1: string[]; tags2: string[]; tags3: string[]; thumb_url: string; unit_pricing_base_measure: number; unit_pricing_measure: number; unit_pricing_unit: string; url: string; variant_id: string; } export declare class TestDebugDTO extends Record { id: TestId; variation: string; } export declare class TestId extends CampaignId<TestId> { } export interface TestPlacementRule extends PlacementRule<any> { placement: string; } export declare class TestPlacementRuleDTO implements TestPlacementRule { feature: OnsiteFeature; placement: string; segment: string; to: CampaignId<any>; } export declare class TestPreviewsDTO { d?: ForcedTestDTO; t: ForcedTestDTO[]; u?: UnsavedDraftPreviewSettingsDTO; } export declare class UnsavedDraftPreviewSettingsDTO extends AbTestPreviewSettingsBase<VariationWithRulesDTO> { variations: VariationWithRulesDTO[]; } export interface Validated { } export declare class ValidationError extends PublicJacksonBean { key: string; message: string; } export declare class VariationWithRulesDTO extends AbTestVariationDTO { rules: TestPlacementRuleDTO[]; } export declare class VisitDTO extends PublicJacksonBean { cart_items: CartItem[]; customer_id: string; email: string; events: Events; id: string; } export declare class WebsiteOrder extends PublicJacksonBean implements OrderStatus { created_at: Date; date: Date; external_order_ref: string; info: OrderCustomer; items: ConversionItem[]; order_status: string; order_status_label: string; payment_provider: string; } export declare const enum FilterOperator { INCLUDES = "INCLUDES", IS = "IS", CONTAINS = "CONTAINS", MATCHES_REGEXP_PATTERN = "MATCHES_REGEXP_PATTERN", LT = "LT", GT = "GT", GTE = "GTE", LTE = "LTE", BETWEEN = "BETWEEN", AND = "AND", OR = "OR" } export declare const enum InsertMode { REPLACE = "REPLACE", APPEND = "APPEND", PREPEND = "PREPEND", INSERT_INTO = "INSERT_INTO", INSERT_AFTER_BEGIN = "INSERT_AFTER_BEGIN" } export declare const enum Method { SPLIT_TEST = "SPLIT_TEST", MVT = "MVT" } export declare const enum OnsiteFeature { RECOMMENDATION = "RECOMMENDATION", CONTENT_DELIVERY = "CONTENT_DELIVERY", POPUP = "POPUP", SPLIT_TESTING = "SPLIT_TESTING", SCHEDULING = "SCHEDULING", STACKLA_WIDGET = "STACKLA_WIDGET" } export declare const enum PageType { FRONT = "front", CATEGORY = "category", PRODUCT = "product", CART = "cart", SEARCH = "search", NOTFOUND = "notfound", ORDER = "order", OTHER = "other", CHECKOUT = "checkout" } export declare const enum RenderMode { HTML = "HTML", SIMPLE = "SIMPLE", JSON_170x170 = "JSON_170x170", JSON_100_X_100 = "JSON_100_X_100", JSON_90x70 = "JSON_90x70", JSON_50x50 = "JSON_50x50", JSON_30x30 = "JSON_30x30", JSON_100x140 = "JSON_100x140", JSON_200x200 = "JSON_200x200", JSON_400x400 = "JSON_400x400", JSON_750x750 = "JSON_750x750", JSON_10_MAX_SQUARE = "JSON_10_MAX_SQUARE", JSON_200x200_SQUARE = "JSON_200x200_SQUARE", JSON_400x400_SQUARE = "JSON_400x400_SQUARE", JSON_750x750_SQUARE = "JSON_750x750_SQUARE", JSON_ORIGINAL = "JSON_ORIGINAL", VERSION_SOURCE = "VERSION_SOURCE" } export declare const enum StacklaWidgetFilterType { LATEST = "LATEST", CATEGORY_OR_BRAND = "CATEGORY_OR_BRAND", PRODUCT = "PRODUCT" } export declare const enum TargetType { RECOMMENDATION = "RECOMMENDATION", ONSITE_CONTENT = "ONSITE_CONTENT", AB_TEST = "AB_TEST", HIDE_CONTENT = "HIDE_CONTENT", STACKLA_WIDGET = "STACKLA_WIDGET" } export declare const enum WrapMode { SIMPLE = "SIMPLE", PRESERVE_CLASS = "PRESERVE_CLASS", CLONED = "CLONED", UNWRAPPED = "UNWRAPPED" }