@rokt/dcui-orchestrator 1.2.1-rc.20 → 1.2.1-rc.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -3,6 +3,7 @@ export * from './global-state-context';
3
3
  export * from './node-mapper-context';
4
4
  export * from './root-element-context';
5
5
  export * from './offer-data-context';
6
+ export * from './lead-capture-offer-context';
6
7
  export * from './data-mapper-context';
7
8
  export * from './scoped-style-mapper-context';
8
9
  export * from './layout-schema-type-context';
@@ -0,0 +1,5 @@
1
+ import { PluginOffer } from '../../../domain/src/models';
2
+ /** Resolves the offer whose referral response a lead form belongs to. */
3
+ export type LeadCaptureOfferResolver = (offerPositionIndex?: number) => PluginOffer | undefined;
4
+ export declare const LeadCaptureOfferContext: import("react").Context<LeadCaptureOfferResolver>;
5
+ export declare const useLeadCaptureOffer: () => LeadCaptureOfferResolver;
@@ -5,3 +5,4 @@ export declare const FAILED_TEMPLATING_DATA = "FAILED_TEMPLATING_DATA";
5
5
  export declare const FAILED_TO_MAP_STATIC_DATA = "FAILED_TO_MAP_STATIC_DATA";
6
6
  export declare const FAILED_SANITISING_HTML = "FAILED_SANITISING_HTML";
7
7
  export declare const UNRESOLVED_FORM_VALIDATION_TARGET = "UNRESOLVED_FORM_VALIDATION_TARGET";
8
+ export declare const MISSING_LEAD_IDENTITY = "MISSING_LEAD_IDENTITY";
@@ -82,10 +82,20 @@ export type OutboundAbortDevicePayEventPayload = {
82
82
  export type OutboundCompleteDevicePayEventPayload = {
83
83
  name: 'COMPLETE_DEVICE_PAY_EVENT';
84
84
  };
85
- export type OutboundPartnerEventPayload<EventType extends OutboundPartnerEvent> = EventType extends 'REALTIME_OFFER_FULFILLMENT_REFERRAL' ? OutboundRealtimeOfferFulfillmentReferralEventPayload : EventType extends 'REALTIME_OFFER_FULFILLMENT_CONVERSION' ? OutboundRealtimeOfferFulfillmentConversionEventPayload : EventType extends 'REALTIME_OFFER_FULFILLMENT_SUCCESS' ? OutboundRealtimeOfferFulfillmentSuccessEventPayload : EventType extends 'V2_CART_ITEM_UPDATED' | 'UPDATE_CART_ITEM_MESSAGE' | 'CART_ITEM_INSTANT_PURCHASE' | 'UPSELL_ITEM_INSTANT_PURCHASE' | 'UPSELL_CREATIVE_SENT' | 'INITIATE_INSTANT_PURCHASE_EVENT' | 'INSTANT_PURCHASE_INITIATE_TAX_AND_SHIPPING_EVENT' | 'INITIATE_CART_ITEM_EVENT' | 'DELIVERY_DETAILS_SENT' | 'PREPARE_DEVICE_PAY_EVENT' | 'INITIATE_DEVICE_PAY_EVENT' | 'ABORT_DEVICE_PAY_EVENT' | 'COMPLETE_DEVICE_PAY_EVENT' ? never : {
85
+ export type OutboundLeadCaptureSubmittedEventPayload = {
86
+ name: 'LEAD_CAPTURE_SUBMITTED';
87
+ body: {
88
+ email?: string;
89
+ mobile_number?: string;
90
+ rclid?: string;
91
+ accountID?: string;
92
+ referralCreativeID?: string;
93
+ };
94
+ };
95
+ export type OutboundPartnerEventPayload<EventType extends OutboundPartnerEvent> = EventType extends 'LEAD_CAPTURE_SUBMITTED' ? OutboundLeadCaptureSubmittedEventPayload : EventType extends 'REALTIME_OFFER_FULFILLMENT_REFERRAL' ? OutboundRealtimeOfferFulfillmentReferralEventPayload : EventType extends 'REALTIME_OFFER_FULFILLMENT_CONVERSION' ? OutboundRealtimeOfferFulfillmentConversionEventPayload : EventType extends 'REALTIME_OFFER_FULFILLMENT_SUCCESS' ? OutboundRealtimeOfferFulfillmentSuccessEventPayload : EventType extends 'V2_CART_ITEM_UPDATED' | 'UPDATE_CART_ITEM_MESSAGE' | 'CART_ITEM_INSTANT_PURCHASE' | 'UPSELL_ITEM_INSTANT_PURCHASE' | 'UPSELL_CREATIVE_SENT' | 'INITIATE_INSTANT_PURCHASE_EVENT' | 'INSTANT_PURCHASE_INITIATE_TAX_AND_SHIPPING_EVENT' | 'INITIATE_CART_ITEM_EVENT' | 'DELIVERY_DETAILS_SENT' | 'PREPARE_DEVICE_PAY_EVENT' | 'INITIATE_DEVICE_PAY_EVENT' | 'ABORT_DEVICE_PAY_EVENT' | 'COMPLETE_DEVICE_PAY_EVENT' ? never : {
86
96
  name: EventType;
87
97
  };
88
98
  export type SendPartner<EventType extends OutboundPartnerEvent> = {
89
99
  type: typeof SEND_PARTNER;
90
- payload: OutboundPartnerEventPayload<EventType> | OutboundUpdateCartEventPayload | OutboundUpdateCartItemMessageEventPayload | OutboundInstantPurchaseEventPayload | OutboundUpsellItemInstantPurchaseEventPayload | OutboundUpsellCreativeSentEventPayload | OutboundInstantPurchaseWsdkEventPayload | OutboundInstantPurchaseTaxAndShippingEventPayload | OutboundCartItemEventPayload | OutboundDeliveryDetailsSentEventPayload | OutboundPrepareDevicePayEventPayload | OutboundDevicePayEventPayload | OutboundAbortDevicePayEventPayload | OutboundCompleteDevicePayEventPayload;
100
+ payload: OutboundPartnerEventPayload<EventType> | OutboundUpdateCartEventPayload | OutboundUpdateCartItemMessageEventPayload | OutboundInstantPurchaseEventPayload | OutboundUpsellItemInstantPurchaseEventPayload | OutboundUpsellCreativeSentEventPayload | OutboundInstantPurchaseWsdkEventPayload | OutboundInstantPurchaseTaxAndShippingEventPayload | OutboundCartItemEventPayload | OutboundDeliveryDetailsSentEventPayload | OutboundPrepareDevicePayEventPayload | OutboundDevicePayEventPayload | OutboundAbortDevicePayEventPayload | OutboundCompleteDevicePayEventPayload | OutboundLeadCaptureSubmittedEventPayload;
91
101
  };
@@ -1,5 +1,5 @@
1
1
  export type CatalogOutboundPartnerEvent = 'V2_CART_ITEM_UPDATED' | 'UPDATE_CART_ITEM_MESSAGE' | 'CART_ITEM_INSTANT_PURCHASE' | 'UPSELL_ITEM_INSTANT_PURCHASE' | 'DELIVERY_DETAILS_SENT';
2
- export type OfferOutboundPartnerEvent = CatalogOutboundPartnerEvent | 'OFFER_ENGAGEMENT' | 'POSITIVE_ENGAGEMENT' | 'UPSELL_CREATIVE_SENT' | 'REALTIME_OFFER_FULFILLMENT_REFERRAL' | 'REALTIME_OFFER_FULFILLMENT_CONVERSION' | 'REALTIME_OFFER_FULFILLMENT_SUCCESS' | 'INITIATE_INSTANT_PURCHASE_EVENT' | 'INSTANT_PURCHASE_INITIATE_TAX_AND_SHIPPING_EVENT' | 'INITIATE_CART_ITEM_EVENT' | 'PREPARE_DEVICE_PAY_EVENT' | 'INITIATE_DEVICE_PAY_EVENT' | 'ABORT_DEVICE_PAY_EVENT' | 'COMPLETE_DEVICE_PAY_EVENT';
2
+ export type OfferOutboundPartnerEvent = CatalogOutboundPartnerEvent | 'OFFER_ENGAGEMENT' | 'POSITIVE_ENGAGEMENT' | 'UPSELL_CREATIVE_SENT' | 'REALTIME_OFFER_FULFILLMENT_REFERRAL' | 'REALTIME_OFFER_FULFILLMENT_CONVERSION' | 'REALTIME_OFFER_FULFILLMENT_SUCCESS' | 'INITIATE_INSTANT_PURCHASE_EVENT' | 'INSTANT_PURCHASE_INITIATE_TAX_AND_SHIPPING_EVENT' | 'INITIATE_CART_ITEM_EVENT' | 'PREPARE_DEVICE_PAY_EVENT' | 'INITIATE_DEVICE_PAY_EVENT' | 'ABORT_DEVICE_PAY_EVENT' | 'COMPLETE_DEVICE_PAY_EVENT' | 'LEAD_CAPTURE_SUBMITTED';
3
3
  export type OutboundPartnerEvent = OfferOutboundPartnerEvent | 'PLACEMENT_CLOSED' | 'PLACEMENT_COMPLETED' | 'PLACEMENT_INTERACTIVE' | 'PLACEMENT_FAILURE';
4
4
  export declare function isOutboundPartnerEvent(value: unknown): value is OutboundPartnerEvent;
5
5
  export declare function isOfferOutboundPartnerEvent(value: unknown): value is OfferOutboundPartnerEvent;
@@ -1,10 +1,13 @@
1
1
  import { CallEffect, PutEffect, SelectEffect } from '@redux-saga/core/effects';
2
+ import { OutboundPartnerEvent } from '../../../../domain/src/models';
3
+ import { SendPartner } from '../../../../domain/src/behaviors';
2
4
  import { FrameControls, LayoutDisplayPreset } from '@rokt/dcui-layout-schema';
3
5
  import { RaceEffect } from 'redux-saga/effects';
4
- import { ContextService, DisplayService, PluginService } from '../../../../plugin-utils/src/index';
6
+ import { ContextService, DisplayService, PartnerInteractionService, PluginService } from '../../../../plugin-utils/src/index';
5
7
  import { HandleConfigAction, ReportError } from '../../actions';
6
8
  import { EventChannel } from 'redux-saga';
7
9
  export declare function closePlugin(contextService: ContextService): Generator<RaceEffect<CallEffect | Generator<SelectEffect | CallEffect, void, boolean>> | SelectEffect | CallEffect | Generator<SelectEffect | CallEffect, void, boolean> | PutEffect<ReportError>, void, boolean>;
10
+ export declare function handlePartnerSend(partnerInteractionService: PartnerInteractionService, { payload }: SendPartner<OutboundPartnerEvent>): Generator<Promise<void>, void, void>;
8
11
  export declare function listenToWsdkChannel<LayoutModelType, PluginModelType>(pluginService: PluginService<LayoutModelType>, transformRawConfig: (config: LayoutModelType) => PluginModelType | undefined): Generator<PutEffect<ReportError> | CallEffect<EventChannel<import("../../../../orchestrator/src/actions").SetAttributesAction | import("../../../../orchestrator/src/actions").SetFontsAction | HandleConfigAction<PluginModelType>>> | import("redux-saga/effects").ChannelTakeEffect<HandleConfigAction<PluginModelType>> | PutEffect<HandleConfigAction<PluginModelType>>, void, EventChannel<HandleConfigAction<PluginModelType>> & HandleConfigAction<PluginModelType>>;
9
12
  export declare function wsdkSagas<LayoutModelType, PluginModelType>(pluginService: PluginService<LayoutModelType>, transformRawConfig: (config: LayoutModelType) => PluginModelType | undefined): Generator<import("redux-saga/effects").AllEffect<import("redux-saga/effects").ForkEffect<void>>, void, unknown>;
10
13
  export declare function displayPlugin(displayService: DisplayService, preset?: LayoutDisplayPreset | null, controls?: FrameControls | null): Generator<CallEffect<void> | import("redux-saga/effects").ForkEffect<void> | PutEffect<{
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rokt/dcui-orchestrator",
3
- "version": "1.2.1-rc.20",
3
+ "version": "1.2.1-rc.21",
4
4
  "description": "Rokt's DCUI rendering process",
5
5
  "main": "dist/index.cjs",
6
6
  "module": "dist/index.js",