import { AlloyResponseDecision, AlloyResponsePropositions } from '@repobit/dex-data-layer'; export type MboxProfileParameters = { [key: `profile.${string}`]: string; }; export type MboxParameters = { [key: string]: string; }; export type URLParameters = { [key: string]: string; }; export type SendEventCall = [ 'sendEvent', { type?: string; decisionScopes?: string[]; data?: { '__adobe': { 'target': { [key: string]: string; }; }; }; xdm?: { _experience?: { decisioning?: { propositions?: object[]; }; }; }; renderDecisions?: boolean; } ]; export type DisplayPropositionsCall = [ 'sendEvent', Partial<{ type: string; personalization: { decisionScopes: string[]; }; "xdm": { "_experience": { "decisioning": { "propositions": { "id": string; "scope": string; "scopeDetails": object; }[]; "propositionEventType": { "display": number; }; }; }; }; }> ]; export type AppendIdentityToUrlCall = [ 'appendIdentityToUrl', { url: string; } ]; export type ApplyPropositionsCall = [ 'applyPropositions', { propositions: AlloyResponsePropositions[]; viewName: string; } ]; export type GetIdentityCall = [ 'getIdentity' ]; export type AlloySendEventResponse = { decisions: AlloyResponseDecision[]; propositions: AlloyResponsePropositions[]; destinations: object[]; }; export type DisplayPropositionsResponse = { propositions: AlloyResponsePropositions[]; destinations: object[]; }; export type AlloyAppendIdentityToUrlResponse = { url: string; }; export type AlloyApplyPropositionsResponse = { propositions: AlloyResponsePropositions[]; }; export type GetIdentityResponse = Partial<{ edge: { regionId?: number; }; identity: { ECID: string; }; }>; export type AlloyFunction = { (...args: DisplayPropositionsCall): Promise; (...args: SendEventCall): Promise; (...args: AppendIdentityToUrlCall): Promise; (...args: ApplyPropositionsCall): Promise; (...args: GetIdentityCall): Promise; q: Array<[ resolve: Function, reject: Function, args: SendEventCall | AppendIdentityToUrlCall | ApplyPropositionsCall | GetIdentityCall | DisplayPropositionsCall ]>; }; export type ConfigMbox = Partial<{ promotion: string; provider: 'init' | 'vlaicu'; products: { [key: string]: { [key: `${number}-${number}`]: Partial<{ extraParameters: { key: string; value: string; }[]; price: number; discountedPrice: number; buyLink: string; }>; }; }; useGeoIpPricing: boolean; }>; export type CdpData = { auds?: string; [key: string]: string | undefined; }; export type CdpDataJson = { auds: string[]; mdl: { key: string; value: string; }[]; ub: { key: string; value: string; }[]; vid: string; };