@rokt/dcui-orchestrator 0.0.4-rc.3 → 0.0.4-rc.30

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.
Files changed (90) hide show
  1. package/dist/index.cjs +23 -23
  2. package/dist/index.js +23 -23
  3. package/dist/libraries/dcui-components/src/components/button-state-trigger/button-state-trigger.d.ts +6 -0
  4. package/dist/libraries/dcui-components/src/components/button-state-trigger/factory.d.ts +2 -0
  5. package/dist/libraries/dcui-components/src/components/button-state-trigger/index.d.ts +2 -0
  6. package/dist/libraries/dcui-components/src/contexts/browser-support-context.d.ts +7 -0
  7. package/dist/libraries/dcui-components/src/contexts/index.d.ts +1 -0
  8. package/dist/libraries/dcui-components/src/contexts/root-element-context.d.ts +2 -2
  9. package/dist/libraries/domain/src/behaviors/offer-engagement.d.ts +6 -0
  10. package/dist/libraries/domain/src/behaviors/send-partner.d.ts +16 -3
  11. package/dist/libraries/domain/src/models/index.d.ts +1 -0
  12. package/dist/libraries/domain/src/models/layout/layout-conversion-type.d.ts +2 -1
  13. package/dist/libraries/domain/src/models/layout/layout-creative-response-action-type.d.ts +1 -1
  14. package/dist/libraries/domain/src/models/layout/layout-creative-response-option.d.ts +3 -1
  15. package/dist/libraries/domain/src/models/partner-event.d.ts +1 -1
  16. package/dist/libraries/domain/src/models/plugin/plugin-conversion-type.d.ts +2 -1
  17. package/dist/libraries/domain/src/models/plugin/plugin-creative-response-action-type.d.ts +1 -1
  18. package/dist/libraries/domain/src/models/plugin/plugin-creative-response-option.d.ts +7 -1
  19. package/dist/libraries/domain/src/models/purchase.d.ts +37 -0
  20. package/dist/libraries/domain/src/models/signals.d.ts +8 -2
  21. package/dist/libraries/module-connector/src/models/module-attributes.d.ts +1 -0
  22. package/dist/libraries/module-connector/src/models/module-connector-builder.d.ts +1 -0
  23. package/dist/libraries/orchestrator/src/components/slot/slot.d.ts +1 -0
  24. package/dist/libraries/orchestrator/src/models/state/global-offer-data-state.d.ts +1 -6
  25. package/dist/libraries/orchestrator/src/selectors/global-offer-data-state/selectors.d.ts +3 -0
  26. package/dist/libraries/plugin-utils/src/error-codes.d.ts +1 -0
  27. package/dist/libraries/plugin-utils/src/translate-config.d.ts +2 -1
  28. package/dist/modules/add-to-cart/src/models/state/appSettingsOfferState.d.ts +8 -0
  29. package/dist/modules/add-to-cart/src/models/state/index.d.ts +1 -0
  30. package/dist/modules/add-to-cart/src/reducers/cart/index.d.ts +1 -0
  31. package/dist/modules/add-to-cart/src/reducers/cart/reducer.d.ts +2 -2
  32. package/dist/modules/add-to-cart/src/reducers/index.d.ts +1 -0
  33. package/dist/modules/instant-purchase/src/actions/catalog-selection.d.ts +7 -2
  34. package/dist/modules/instant-purchase/src/actions/checkout-lifecycle.d.ts +11 -0
  35. package/dist/modules/instant-purchase/src/actions/index.d.ts +1 -0
  36. package/dist/modules/instant-purchase/src/actions/instant-purchase.d.ts +34 -1
  37. package/dist/modules/instant-purchase/src/channels/channel.d.ts +7 -1
  38. package/dist/modules/instant-purchase/src/components/catalog-combined-collection/catalog-combined-collection.d.ts +1 -19
  39. package/dist/modules/instant-purchase/src/components/catalog-combined-collection/factory.d.ts +2 -0
  40. package/dist/modules/instant-purchase/src/components/catalog-combined-collection/index.d.ts +2 -0
  41. package/dist/modules/instant-purchase/src/components/checkout-state-button-trigger/checkout-state-button-trigger.d.ts +66 -0
  42. package/dist/modules/instant-purchase/src/components/color-swatch/color-swatch.d.ts +25 -0
  43. package/dist/modules/instant-purchase/src/components/loading-spinner/loading-spinner.d.ts +36 -0
  44. package/dist/modules/instant-purchase/src/reducers/index.d.ts +3 -1
  45. package/dist/modules/instant-purchase/src/sagas/checkout-lifecycle/index.d.ts +1 -0
  46. package/dist/modules/instant-purchase/src/sagas/checkout-lifecycle/sagas.d.ts +3 -0
  47. package/dist/modules/instant-purchase/src/sagas/error-codes.d.ts +6 -3
  48. package/dist/modules/instant-purchase/src/sagas/index.d.ts +2 -1
  49. package/dist/modules/instant-purchase/src/sagas/instant-purchase/sagas.d.ts +44 -5
  50. package/dist/modules/instant-purchase/src/selectors/catalogItems/index.d.ts +1 -0
  51. package/dist/modules/instant-purchase/src/selectors/catalogItems/selectors.d.ts +4 -0
  52. package/dist/modules/instant-purchase/src/selectors/index.d.ts +1 -0
  53. package/dist/modules/standard-marketing/src/sagas/offer-engagement/sagas.d.ts +6 -3
  54. package/node_modules/@rokt/dcui-layout-schema/dist/schema.d.ts +190 -7
  55. package/node_modules/@rokt/dcui-layout-schema/dist/schema.js +1 -1
  56. package/node_modules/@rokt/dcui-layout-schema/dist/tsconfig.tsbuildinfo +1 -1
  57. package/node_modules/@rokt/dcui-layout-schema/package.json +1 -1
  58. package/node_modules/@rokt/dcui-layout-schema/v0.1/index.js +1 -1
  59. package/node_modules/@rokt/dcui-layout-schema/v0.10/index.js +1 -1
  60. package/node_modules/@rokt/dcui-layout-schema/v0.11/index.js +1 -1
  61. package/node_modules/@rokt/dcui-layout-schema/v0.12/index.js +1 -1
  62. package/node_modules/@rokt/dcui-layout-schema/v0.13/index.js +1 -1
  63. package/node_modules/@rokt/dcui-layout-schema/v0.14/index.js +1 -1
  64. package/node_modules/@rokt/dcui-layout-schema/v0.15/index.js +1 -1
  65. package/node_modules/@rokt/dcui-layout-schema/v0.16/index.js +1 -1
  66. package/node_modules/@rokt/dcui-layout-schema/v0.17/index.js +1 -1
  67. package/node_modules/@rokt/dcui-layout-schema/v0.18/index.js +1 -1
  68. package/node_modules/@rokt/dcui-layout-schema/v0.19/index.js +1 -1
  69. package/node_modules/@rokt/dcui-layout-schema/v0.2/index.js +1 -1
  70. package/node_modules/@rokt/dcui-layout-schema/v0.20/index.js +1 -1
  71. package/node_modules/@rokt/dcui-layout-schema/v0.21/index.js +1 -1
  72. package/node_modules/@rokt/dcui-layout-schema/v0.22/index.js +1 -1
  73. package/node_modules/@rokt/dcui-layout-schema/v0.23/index.js +1 -1
  74. package/node_modules/@rokt/dcui-layout-schema/v0.3/index.js +1 -1
  75. package/node_modules/@rokt/dcui-layout-schema/v0.4/index.js +1 -1
  76. package/node_modules/@rokt/dcui-layout-schema/v0.5/index.js +1 -1
  77. package/node_modules/@rokt/dcui-layout-schema/v0.6/index.js +1 -1
  78. package/node_modules/@rokt/dcui-layout-schema/v0.7/index.js +1 -1
  79. package/node_modules/@rokt/dcui-layout-schema/v0.8/index.js +1 -1
  80. package/node_modules/@rokt/dcui-layout-schema/v0.9/index.js +1 -1
  81. package/node_modules/@rokt/dcui-layout-schema/v1.0/index.js +1 -1
  82. package/node_modules/@rokt/dcui-layout-schema/v1.1/index.js +1 -1
  83. package/node_modules/@rokt/dcui-layout-schema/v1.2/index.js +1 -1
  84. package/node_modules/@rokt/dcui-layout-schema/v1.3/index.js +1 -1
  85. package/node_modules/@rokt/dcui-layout-schema/v1.4/index.js +1 -1
  86. package/node_modules/@rokt/dcui-layout-schema/v1.5/index.js +1 -1
  87. package/node_modules/@rokt/dcui-layout-schema/v1.6/index.js +1 -1
  88. package/node_modules/@rokt/dcui-layout-schema/v1.7/index.d.ts +2218 -0
  89. package/node_modules/@rokt/dcui-layout-schema/v1.7/index.js +4 -0
  90. package/package.json +2 -2
@@ -0,0 +1,6 @@
1
+ import { ButtonStateTriggerModel, LayoutSchemaModel, WhenPredicate } from '@rokt/dcui-layout-schema';
2
+ export interface ButtonStateTriggerProps {
3
+ schema: ButtonStateTriggerModel<LayoutSchemaModel, WhenPredicate>;
4
+ testId?: string;
5
+ }
6
+ export declare function ButtonStateTrigger(props: ButtonStateTriggerProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,2 @@
1
+ import { LayoutSchemaModel } from '@rokt/dcui-layout-schema';
2
+ export declare function tryMakeButtonStateTrigger(schema: LayoutSchemaModel, testId?: string): JSX.Element | void;
@@ -0,0 +1,2 @@
1
+ export * from './button-state-trigger';
2
+ export * from './factory';
@@ -0,0 +1,7 @@
1
+ import React, { PropsWithChildren } from 'react';
2
+ export type BrowserSupport = {
3
+ inert: boolean;
4
+ };
5
+ export declare const BrowserSupportContext: React.Context<BrowserSupport | undefined>;
6
+ export declare function BrowserSupportProvider({ children }: PropsWithChildren): import("react/jsx-runtime").JSX.Element;
7
+ export declare const useBrowserSupport: () => BrowserSupport | undefined;
@@ -15,3 +15,4 @@ export * from './log-additional-information';
15
15
  export * from './catalog-item-context';
16
16
  export * from './plugin-id-context';
17
17
  export * from './schema-version-context';
18
+ export * from './browser-support-context';
@@ -1,2 +1,2 @@
1
- export declare const RootElementContext: import("react").Context<Node | null>;
2
- export declare const useRootElementContext: () => Node | null;
1
+ export declare const RootElementContext: import("react").Context<HTMLElement | null>;
2
+ export declare const useRootElementContext: () => HTMLElement | null;
@@ -32,5 +32,11 @@ export declare function isRealTimeFulfillmentReferral(response: OfferEngagementP
32
32
  accountID: string;
33
33
  referralCreativeID: string;
34
34
  };
35
+ export declare function isRealTimeReferralOnly(response: OfferEngagementPayload | (OfferEngagementPayload & {
36
+ offerPositionIndex: number;
37
+ })): response is OfferEngagementPayload & {
38
+ accountID: string;
39
+ referralCreativeID: string;
40
+ };
35
41
  export declare function makeCaptureOnlyOfferEngagementPayload(offerPayload?: Partial<OfferEngagementCaptureOnlyPayload>): OfferEngagementCaptureOnlyPayload;
36
42
  export declare function makeUrlOfferEngagementPayload(offerPayload?: Partial<OfferEngagementUrlPayload>): OfferEngagementUrlPayload;
@@ -1,4 +1,4 @@
1
- import { OutboundPartnerEvent, PluginCartItem } from '../models';
1
+ import { OutboundPartnerEvent, PluginCartItem, InstantPurchaseWsdkPayload } from '../models';
2
2
  export declare const SEND_PARTNER = "GLOBAL/SEND_PARTNER";
3
3
  export type OutboundInstantPurchaseEventPayload = {
4
4
  name: 'CART_ITEM_INSTANT_PURCHASE';
@@ -6,6 +6,15 @@ export type OutboundInstantPurchaseEventPayload = {
6
6
  };
7
7
  export type OutboundRealtimeOfferFulfillmentReferralEventPayload = {
8
8
  name: 'REALTIME_OFFER_FULFILLMENT_REFERRAL';
9
+ body: {
10
+ rclid: string;
11
+ accountID: string;
12
+ referralCreativeID: string;
13
+ referralOnly?: boolean;
14
+ };
15
+ };
16
+ export type OutboundRealtimeOfferFulfillmentConversionEventPayload = {
17
+ name: 'REALTIME_OFFER_FULFILLMENT_CONVERSION';
9
18
  body: {
10
19
  rclid: string;
11
20
  accountID: string;
@@ -28,10 +37,14 @@ export type OutboundUpsellCreativeSentEventPayload = {
28
37
  description: string;
29
38
  };
30
39
  };
31
- export type OutboundPartnerEventPayload<EventType extends OutboundPartnerEvent> = EventType extends 'REALTIME_OFFER_FULFILLMENT_REFERRAL' ? OutboundRealtimeOfferFulfillmentReferralEventPayload : EventType extends 'REALTIME_OFFER_FULFILLMENT_SUCCESS' ? OutboundRealtimeOfferFulfillmentSuccessEventPayload : EventType extends 'V2_CART_ITEM_UPDATED' | 'CART_ITEM_INSTANT_PURCHASE' | 'UPSELL_CREATIVE_SENT' ? never : {
40
+ export type OutboundInstantPurchaseWsdkEventPayload = {
41
+ name: 'INITIATE_INSTANT_PURCHASE_EVENT';
42
+ body: InstantPurchaseWsdkPayload;
43
+ };
44
+ 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' | 'CART_ITEM_INSTANT_PURCHASE' | 'UPSELL_CREATIVE_SENT' | 'INITIATE_INSTANT_PURCHASE_EVENT' ? never : {
32
45
  name: EventType;
33
46
  };
34
47
  export type SendPartner<EventType extends OutboundPartnerEvent> = {
35
48
  type: typeof SEND_PARTNER;
36
- payload: OutboundPartnerEventPayload<EventType> | OutboundUpdateCartEventPayload | OutboundInstantPurchaseEventPayload | OutboundUpsellCreativeSentEventPayload;
49
+ payload: OutboundPartnerEventPayload<EventType> | OutboundUpdateCartEventPayload | OutboundInstantPurchaseEventPayload | OutboundUpsellCreativeSentEventPayload | OutboundInstantPurchaseWsdkEventPayload;
37
50
  };
@@ -10,3 +10,4 @@ export * from './fulfillment';
10
10
  export * from './partner-event';
11
11
  export * from './interactivity';
12
12
  export * from './child-plugin';
13
+ export * from './purchase';
@@ -1,4 +1,5 @@
1
1
  export declare const enum LayoutConversionType {
2
2
  Default = "Default",
3
- RealTime = "RealTime"
3
+ RealTime = "RealTime",
4
+ RealTimeReferral = "RealTimeReferral"
4
5
  }
@@ -2,5 +2,5 @@ export declare const enum LayoutCreativeResponseActionType {
2
2
  CaptureOnly = "CaptureOnly",
3
3
  Url = "Url",
4
4
  Fulfillment = "Fulfillment",
5
- External = "External"
5
+ External = "ExternalPaymentTrigger"
6
6
  }
@@ -13,7 +13,9 @@ export interface LayoutCreativeResponseOption {
13
13
  isPositive: boolean;
14
14
  url?: string;
15
15
  urlBehavior?: LayoutUrlBehavior;
16
- externalKey?: string;
16
+ paymentTriggerConfig?: {
17
+ externalKey: string;
18
+ };
17
19
  conversionType?: LayoutConversionType;
18
20
  rclid?: string;
19
21
  }
@@ -1,5 +1,5 @@
1
1
  export type CatalogOutboundPartnerEvent = 'V2_CART_ITEM_UPDATED' | 'CART_ITEM_INSTANT_PURCHASE';
2
- export type OfferOutboundPartnerEvent = CatalogOutboundPartnerEvent | 'OFFER_ENGAGEMENT' | 'POSITIVE_ENGAGEMENT' | 'UPSELL_CREATIVE_SENT' | 'REALTIME_OFFER_FULFILLMENT_REFERRAL' | 'REALTIME_OFFER_FULFILLMENT_SUCCESS';
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';
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,4 +1,5 @@
1
1
  export declare const enum PluginConversionType {
2
2
  Default = "Default",
3
- RealTime = "RealTime"
3
+ RealTime = "RealTime",
4
+ RealTimeReferral = "RealTimeReferral"
4
5
  }
@@ -2,5 +2,5 @@ export declare const enum PluginCreativeResponseActionType {
2
2
  CaptureOnly = "CaptureOnly",
3
3
  Url = "Url",
4
4
  Fulfillment = "Fulfillment",
5
- External = "External"
5
+ External = "ExternalPaymentTrigger"
6
6
  }
@@ -52,7 +52,9 @@ export interface PluginCreativeExternalResponseOption {
52
52
  instanceGuid: string;
53
53
  signalType: PluginSignalType;
54
54
  isPositive: boolean;
55
- externalKey?: string;
55
+ paymentTriggerConfig?: {
56
+ externalKey: string;
57
+ };
56
58
  creativeInstanceGuid?: string;
57
59
  }
58
60
  export declare function makePluginResponseOption(data?: Partial<PluginCreativeResponseOption>): PluginCreativeResponseOption;
@@ -69,3 +71,7 @@ export declare function isRealtimeConversionResponseOption(value: unknown): valu
69
71
  conversionType: PluginConversionType.RealTime;
70
72
  rclid: string;
71
73
  };
74
+ export declare function isRealtimeReferralOnlyResponseOption(value: unknown): value is (PluginCreativeFulfillmentResponseOption | PluginCreativeUrlResponseOption) & {
75
+ conversionType: PluginConversionType.RealTimeReferral;
76
+ rclid: string;
77
+ };
@@ -0,0 +1,37 @@
1
+ export interface UpsellItem {
2
+ cartItemId: string;
3
+ catalogItemId: string;
4
+ quantity: number;
5
+ unitPrice: number;
6
+ totalPrice: number;
7
+ currency: string;
8
+ }
9
+ export interface InstantPurchaseWsdkPayload {
10
+ totalUpsellPrice: number;
11
+ currency: string;
12
+ upsellItems: UpsellItem[];
13
+ paymentDetails?: PaymentRequestDetails;
14
+ fulfillmentDetails?: RequestFullfillmentDetails;
15
+ [key: string]: unknown;
16
+ }
17
+ export interface PaymentRequestDetails {
18
+ token: string;
19
+ partnerOrderId: string;
20
+ }
21
+ export interface RequestFullfillmentDetails {
22
+ token: string;
23
+ shippingAttributes: ShippingAttributes;
24
+ }
25
+ export interface ShippingAttributes {
26
+ id: string;
27
+ firstName: string;
28
+ lastName: string;
29
+ companyName: string;
30
+ address1: string;
31
+ address2: string;
32
+ city: string;
33
+ state: string;
34
+ country: string;
35
+ countryCode: string;
36
+ postalCode: string;
37
+ }
@@ -2,10 +2,10 @@ import { PluginCreativeResponseActionType } from './plugin';
2
2
  export type Signals = (CoreSignals | CartSignals) & {
3
3
  creativeInstanceGuid?: string;
4
4
  };
5
- export type CoreSignals = LoadStart | LoadComplete | Activation | Impression | Response | Dismissal | UserInteraction | InstantPurchaseDismissal;
5
+ export type CoreSignals = LoadStart | LoadComplete | Activation | Impression | Viewed | Response | Dismissal | UserInteraction | InstantPurchaseDismissal;
6
6
  export type ResponseActionPayload = CaptureOnlyAction | UrlAction | ExternalAction | FulfillmentAction;
7
7
  export type CartSignals = CartItemInstantPurchaseInitiated | CartItemInstantPurchase | CartItemInstantPurchaseFailure | CartItemQuantitySelected;
8
- export type UniqueSignal = LoadStart | LoadComplete | Activation | Impression | Response | Dismissal | UserInteraction | InstantPurchaseDismissal | CartItemInstantPurchaseInitiated | CartItemInstantPurchase | CartItemInstantPurchaseFailure;
8
+ export type UniqueSignal = LoadStart | LoadComplete | Activation | Impression | Viewed | Response | Dismissal | UserInteraction | InstantPurchaseDismissal | CartItemInstantPurchaseInitiated | CartItemInstantPurchase | CartItemInstantPurchaseFailure;
9
9
  export declare enum InitiatedBy {
10
10
  DCUI = "DCUI",
11
11
  Partner = "partner"
@@ -23,6 +23,12 @@ export interface Impression {
23
23
  name: 'SignalImpression';
24
24
  parentGuid: string;
25
25
  }
26
+ export interface Viewed {
27
+ name: 'SignalViewed';
28
+ parentGuid: string;
29
+ supportedByBrowser: boolean;
30
+ inferred: boolean;
31
+ }
26
32
  export interface Dismissal {
27
33
  name: 'SignalDismissal';
28
34
  parentGuid: string;
@@ -9,4 +9,5 @@ export interface ModuleAttributes {
9
9
  visible: boolean;
10
10
  container: 'row' | 'column';
11
11
  interactivity: Interactivity;
12
+ offerState: string;
12
13
  }
@@ -11,6 +11,7 @@ export interface AppSettings {
11
11
  childLayouts: PluginLayoutChild[];
12
12
  offerData: PluginOffer;
13
13
  pluginId: string;
14
+ offerState: unknown;
14
15
  }
15
16
  export interface IModuleConnector extends HTMLElement {
16
17
  getOfferPositionAttr(): number;
@@ -7,6 +7,7 @@ declare global {
7
7
  interface IntrinsicElements {
8
8
  'module-component': ModuleAttributes & {
9
9
  style: React.CSSProperties;
10
+ inert?: '';
10
11
  };
11
12
  }
12
13
  }
@@ -1,8 +1,3 @@
1
1
  export type GlobalOfferDataState = {
2
- [key: string]: {
3
- cart: Array<{
4
- cartItemId: string;
5
- quantity: number;
6
- }>;
7
- };
2
+ [key: string]: unknown;
8
3
  };
@@ -2,3 +2,6 @@ import { GlobalOfferDataState } from '../../models';
2
2
  export declare function getTotalCartQty(state: {
3
3
  globalOfferDataState: GlobalOfferDataState;
4
4
  }): number;
5
+ export declare function getOfferState(state: {
6
+ globalOfferDataState: GlobalOfferDataState;
7
+ }, position: number): unknown;
@@ -1 +1,2 @@
1
1
  export declare const NO_CREATIVE_RESPONSE_OPTIONS_MAP = "NO_CREATIVE_RESPONSE_OPTIONS_MAP";
2
+ export declare const LEGACY_EXTERNAL_ACTION_TYPE = "LEGACY_EXTERNAL_ACTION_TYPE";
@@ -4,7 +4,7 @@ export declare const CREATIVE_RESPONSE_ENUM_MAP: {
4
4
  CaptureOnly: PluginCreativeResponseActionType;
5
5
  Url: PluginCreativeResponseActionType;
6
6
  Fulfillment: PluginCreativeResponseActionType;
7
- External: PluginCreativeResponseActionType;
7
+ ExternalPaymentTrigger: PluginCreativeResponseActionType;
8
8
  };
9
9
  urlBehavior: {
10
10
  newTab: PluginUrlBehavior;
@@ -19,6 +19,7 @@ export declare const CREATIVE_RESPONSE_ENUM_MAP: {
19
19
  conversionType: {
20
20
  Default: PluginConversionType;
21
21
  RealTime: PluginConversionType;
22
+ RealTimeReferral: PluginConversionType;
22
23
  };
23
24
  };
24
25
  export declare function makeTranslateErrorLogs(configurationName: string, instanceGuid: string, isChildLayout?: boolean): Error;
@@ -0,0 +1,8 @@
1
+ export type AppSettingsOfferState = {
2
+ cart: Array<AppSettingsCartItemState>;
3
+ };
4
+ export type AppSettingsCartItemState = {
5
+ cartItemId: string;
6
+ quantity: number;
7
+ };
8
+ export declare function isAppSettingsOfferState(offerState: unknown): offerState is AppSettingsOfferState;
@@ -1,2 +1,3 @@
1
1
  export * from './cart';
2
+ export * from './appSettingsOfferState';
2
3
  export * from './user-creative-response-history';
@@ -0,0 +1 @@
1
+ export * from './reducer';
@@ -1,4 +1,4 @@
1
1
  import { AnyAction } from '@reduxjs/toolkit';
2
- import { CartState } from '../../models';
3
- export declare function makeInitialCartState(): CartState;
2
+ import { CartState, AppSettingsCartItemState } from '../../models';
3
+ export declare function makeInitialCartState(cart: Array<AppSettingsCartItemState>): CartState;
4
4
  export declare function cartReducer(state: CartState | undefined, action: AnyAction): CartState;
@@ -18,3 +18,4 @@ export declare const appReducers: {
18
18
  childLayouts: typeof childLayoutsReducer;
19
19
  };
20
20
  export declare function makeAppInitialState(data?: Partial<AppState>): AppState;
21
+ export * from './cart';
@@ -2,9 +2,14 @@ import { PluginCatalogItem } from '../../../../libraries/domain/src/models';
2
2
  export type SetSelectedItemPayload = {
3
3
  catalogItem: PluginCatalogItem;
4
4
  };
5
+ export declare const TRIGGER_SELECT_ITEM = "CATALOG/TRIGGER_SELECT_ITEM";
6
+ export type TriggerSelectItemAction = {
7
+ type: typeof TRIGGER_SELECT_ITEM;
8
+ payload: SetSelectedItemPayload;
9
+ };
5
10
  export declare const SET_SELECTED_ITEM = "CATALOG/SET_SELECTED_ITEM";
6
- export type SetSelectedItem = {
11
+ export type SetSelectedItemAction = {
7
12
  type: typeof SET_SELECTED_ITEM;
8
13
  payload: SetSelectedItemPayload;
9
14
  };
10
- export type CatalogSelectionActions = SetSelectedItem;
15
+ export type CatalogSelectionActions = SetSelectedItemAction | TriggerSelectItemAction;
@@ -0,0 +1,11 @@
1
+ export declare const CHECKOUT_LIFECYCLE = "CHECKOUT_LIFECYCLE";
2
+ export interface CheckoutLifecycle {
3
+ type: typeof CHECKOUT_LIFECYCLE;
4
+ payload: CheckoutLifecyclePayload;
5
+ }
6
+ export type CheckoutLifecyclePayload = {
7
+ event: 'Checkout';
8
+ targetStep: CheckoutStep;
9
+ offerPositionIndex: number;
10
+ };
11
+ export type CheckoutStep = 'ViewOffer' | 'ViewTransactionDetails' | 'EditPayment' | 'EditShipping' | 'EditPaymentAndShipping' | 'CostBreakdown' | 'Confirmation' | 'CloseOffer';
@@ -1,2 +1,3 @@
1
1
  export * from './catalog-selection';
2
+ export * from './checkout-lifecycle';
2
3
  export * from './instant-purchase';
@@ -1,9 +1,37 @@
1
- import { PluginCatalogItem } from '../../../../libraries/domain/src/models';
1
+ import { PluginCatalogItem, UpsellItem } from '../../../../libraries/domain/src/models';
2
2
  import { InstantPurchase } from '@rokt/partner-integration';
3
3
  export type InitiateInstantPurchasePayload = {
4
4
  catalogItem: PluginCatalogItem;
5
5
  quantity: number;
6
+ useInstantPurchaseExtension?: boolean;
6
7
  };
8
+ export type InstantPurchaseWsdkResponsePayload = {
9
+ timestamp: string;
10
+ sessionId: string;
11
+ response?: PurchaseApiResponse;
12
+ errorMessage?: string;
13
+ [key: string]: unknown;
14
+ };
15
+ export interface PurchaseApiResponse {
16
+ success: boolean;
17
+ reason?: string;
18
+ totalUpsellPrice?: number;
19
+ currency?: string;
20
+ identifiers?: Record<string, string>;
21
+ upsellItems?: UpsellItem[];
22
+ paid?: boolean;
23
+ paymentDetails?: PaymentDetails;
24
+ shippingInitiated?: boolean;
25
+ shippingDetails?: ShippingDetails;
26
+ }
27
+ export interface PaymentDetails {
28
+ method: string;
29
+ message: string;
30
+ }
31
+ export interface ShippingDetails {
32
+ method: string;
33
+ message: string;
34
+ }
7
35
  export declare const INITIATE_INSTANT_PURCHASE = "INSTANT_PURCHASE/INITIATE";
8
36
  export type InitiateInstantPurchase = {
9
37
  type: typeof INITIATE_INSTANT_PURCHASE;
@@ -14,4 +42,9 @@ export type InstantPurchasePartnerResponse = {
14
42
  type: typeof INSTANT_PURCHASE_PARTNER_RESPONSE;
15
43
  payload: InstantPurchase.CartItemInstantPurchaseResponseMessageBody;
16
44
  };
45
+ export declare const INSTANT_PURCHASE_WSDK_RESPONSE = "INSTANT_PURCAHSE/WSDK_RESPONSE";
46
+ export type InstantPurchaseWsdkResponse = {
47
+ type: typeof INSTANT_PURCHASE_WSDK_RESPONSE;
48
+ payload: InstantPurchaseWsdkResponsePayload;
49
+ };
17
50
  export type InstantPurchaseActions = InitiateInstantPurchase;
@@ -2,7 +2,13 @@ import { InstantPurchase } from '@rokt/partner-integration';
2
2
  import { PutEffect, CallEffect, ChannelTakeEffect } from 'redux-saga/effects';
3
3
  import { EventChannel } from 'redux-saga';
4
4
  import { GlobalGateway } from '../../../../libraries/module-connector/src/main';
5
+ import { InstantPurchaseWsdkResponsePayload } from '../actions/instant-purchase';
5
6
  import { InstantPurchasePartnerResponse } from '../actions/instant-purchase';
6
7
  import { Log } from '../../../../libraries/domain/src/models';
7
8
  export declare function makeInstantPurchasePartnerResponseChannel(gateway: GlobalGateway, logger: (log: Log) => void): EventChannel<InstantPurchase.CartItemInstantPurchaseResponseMessageBody>;
8
- export declare function handleInstantPurchaseResponse(channel: EventChannel<InstantPurchase.CartItemInstantPurchaseResponseMessageBody>, logger: (log: Log) => void): Generator<CallEffect<EventChannel<InstantPurchase.CartItemInstantPurchaseResponseMessageBody>> | ChannelTakeEffect<InstantPurchase.CartItemInstantPurchaseResponseMessageBody> | CallEffect<void> | PutEffect<InstantPurchasePartnerResponse>, void, InstantPurchase.CartItemInstantPurchaseResponseMessageBody>;
9
+ export declare function makeInstantPurchaseWsdkResponseChannel(gateway: GlobalGateway, logger: (log: Log) => void): EventChannel<InstantPurchaseWsdkResponsePayload>;
10
+ export declare function listenForInstantPurchasePartnerResponse(channel: EventChannel<InstantPurchase.CartItemInstantPurchaseResponseMessageBody>, logger: (log: Log) => void): Generator<CallEffect<EventChannel<InstantPurchase.CartItemInstantPurchaseResponseMessageBody>> | ChannelTakeEffect<InstantPurchase.CartItemInstantPurchaseResponseMessageBody> | CallEffect<void> | PutEffect<InstantPurchasePartnerResponse>, void, InstantPurchase.CartItemInstantPurchaseResponseMessageBody>;
11
+ export declare function listenForInstantPurchaseWsdkResponse(channel: EventChannel<InstantPurchaseWsdkResponsePayload>, logger: (log: Log) => void): Generator<CallEffect<void> | ChannelTakeEffect<InstantPurchaseWsdkResponsePayload> | PutEffect<{
12
+ type: string;
13
+ payload: InstantPurchaseWsdkResponsePayload;
14
+ }>, void, InstantPurchaseWsdkResponsePayload>;
@@ -1,22 +1,4 @@
1
- import { BackgroundStylingProperties, BorderStylingProperties, ConditionalStyleTransition, ContainerStylingProperties, DimensionStylingProperties, FlexChildStylingProperties, LayoutSchemaModel, LayoutStyle, SpacingStylingProperties, StatelessStylingBlock, WhenPredicate } from '@rokt/dcui-layout-schema';
2
- export interface CatalogCombinedCollectionStyles {
3
- container?: null | ContainerStylingProperties;
4
- background?: null | BackgroundStylingProperties;
5
- border?: null | BorderStylingProperties;
6
- dimension?: null | DimensionStylingProperties;
7
- flexChild?: null | FlexChildStylingProperties;
8
- spacing?: null | SpacingStylingProperties;
9
- }
10
- export interface CatalogCombinedCollectionTransitions {
11
- own?: null | CatalogCombinedCollectionStyles;
12
- }
13
- export interface CatalogCombinedCollectionElements {
14
- own: StatelessStylingBlock<CatalogCombinedCollectionStyles>[];
15
- }
16
- export interface CatalogCombinedCollectionModel<NodeTemplate, Predicates> {
17
- styles?: null | LayoutStyle<CatalogCombinedCollectionElements, ConditionalStyleTransition<CatalogCombinedCollectionTransitions, Predicates>>;
18
- template: NodeTemplate;
19
- }
1
+ import { CatalogCombinedCollectionModel, LayoutSchemaModel, WhenPredicate } from '@rokt/dcui-layout-schema';
20
2
  export interface CatalogCombinedCollectionProps<Template extends LayoutSchemaModel> {
21
3
  /**
22
4
  * - `styles`:
@@ -0,0 +1,2 @@
1
+ import { LayoutSchemaModel } from '@rokt/dcui-layout-schema';
2
+ export declare function tryMakeCatalogCombinedCollection(schema: LayoutSchemaModel, testId?: string): JSX.Element | void;
@@ -0,0 +1,2 @@
1
+ export * from './catalog-combined-collection';
2
+ export * from './factory';
@@ -0,0 +1,66 @@
1
+ import { BackgroundStylingProperties, BorderStylingProperties, ConditionalStyleTransition, ContainerStylingProperties, DimensionStylingProperties, FlexChildStylingProperties, LayoutStyle, NonInteractableChildren, SpacingStylingProperties, StatelessStylingBlock, WhenPredicate } from '@rokt/dcui-layout-schema';
2
+ import { CheckoutStep } from '../../actions/checkout-lifecycle';
3
+ export interface CheckoutStateButtonTriggerStyles {
4
+ background?: null | BackgroundStylingProperties;
5
+ border?: null | BorderStylingProperties;
6
+ container?: null | ContainerStylingProperties;
7
+ dimension?: null | DimensionStylingProperties;
8
+ flexChild?: null | FlexChildStylingProperties;
9
+ spacing?: null | SpacingStylingProperties;
10
+ }
11
+ export interface CheckoutStateButtonTriggerTransitions {
12
+ own?: null | CheckoutStateButtonTriggerStyles;
13
+ }
14
+ export interface CheckoutStateButtonTriggerElements {
15
+ own: StatelessStylingBlock<CheckoutStateButtonTriggerStyles>[];
16
+ }
17
+ export interface CheckoutStateButtonTriggerModel<Children, Predicates> {
18
+ a11yLabel?: null | string;
19
+ targetStep: CheckoutStep;
20
+ styles?: null | LayoutStyle<CheckoutStateButtonTriggerElements, ConditionalStyleTransition<CheckoutStateButtonTriggerTransitions, Predicates>>;
21
+ children: Children[];
22
+ }
23
+ export interface CheckoutStateButtonTriggerProps {
24
+ /**
25
+ * - `a11yLabel`: define a custom accessibility label for a screen reader
26
+ * - `targetStep`: Checkout transaction step to transition to when element is clicked
27
+ * - `children`: it can accept below nodes,
28
+ * * `Row`
29
+ * * `Column`
30
+ * * `ZStack`
31
+ * * `FlowRow`
32
+ * * `BasicText`
33
+ * * `StaticImage`
34
+ * * `StaticIcon`
35
+ * * `DataImage`
36
+ * * `DataIcon`
37
+ * * `When`
38
+ * * `InlineContainer`
39
+ * * `EscapeHatch`
40
+ * - `styles`:
41
+ * * `elements`:
42
+ * - `own`:
43
+ * * `background`
44
+ * * `border`
45
+ * * `container`
46
+ * * `dimension`
47
+ * * `flexChild`
48
+ * * `spacing`
49
+ * * `transitions`:
50
+ * - `type`: 'Conditional'
51
+ * - `transition`:
52
+ * * `predicates`: WhenPredicate[]
53
+ * * `duration`: number
54
+ * * `value`:
55
+ * - `own`:
56
+ * * `container`
57
+ * * `dimension`
58
+ * * `flexChild`
59
+ * * `spacing`
60
+ * * `background`
61
+ * * `border`
62
+ */
63
+ schema: CheckoutStateButtonTriggerModel<NonInteractableChildren, WhenPredicate>;
64
+ testId?: string;
65
+ }
66
+ export declare function CheckoutStateButtonTrigger(props: CheckoutStateButtonTriggerProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,25 @@
1
+ import { BackgroundStylingProperties, BasicStateStylingBlock, BorderStylingProperties, ConditionalStyleTransition, ContainerStylingProperties, DimensionStylingProperties, FlexChildStylingProperties, LayoutStyle, SpacingStylingProperties, WhenPredicate } from '@rokt/dcui-layout-schema';
2
+ interface ColorSwatchStyles {
3
+ container?: null | ContainerStylingProperties;
4
+ background?: null | BackgroundStylingProperties;
5
+ border?: null | BorderStylingProperties;
6
+ dimension?: null | DimensionStylingProperties;
7
+ flexChild?: null | FlexChildStylingProperties;
8
+ spacing?: null | SpacingStylingProperties;
9
+ }
10
+ interface ColorSwatchElements {
11
+ own: BasicStateStylingBlock<ColorSwatchStyles>[];
12
+ }
13
+ interface ColorSwatchTransitions {
14
+ own: null | ColorSwatchStyles;
15
+ }
16
+ export interface ColorSwatchModel<Predicates> {
17
+ styles?: null | LayoutStyle<ColorSwatchElements, ConditionalStyleTransition<ColorSwatchTransitions, Predicates>>;
18
+ value: string;
19
+ }
20
+ export interface ColorSwatchProps {
21
+ schema: ColorSwatchModel<WhenPredicate>;
22
+ testId?: string;
23
+ }
24
+ export declare function ColorSwatch(props: ColorSwatchProps): import("react/jsx-runtime").JSX.Element | null;
25
+ export {};
@@ -0,0 +1,36 @@
1
+ import { BackgroundStylingProperties, BorderStylingProperties, ConditionalStyleTransition, ContainerStylingProperties, DimensionStylingProperties, FlexChildStylingProperties, LayoutStyle, SpacingStylingProperties, StatelessStylingBlock, WhenPredicate } from '@rokt/dcui-layout-schema';
2
+ export interface LoadingSpinnerStyles {
3
+ background?: null | BackgroundStylingProperties;
4
+ border?: null | BorderStylingProperties;
5
+ container?: null | ContainerStylingProperties;
6
+ dimension?: null | DimensionStylingProperties;
7
+ flexChild?: null | FlexChildStylingProperties;
8
+ spacing?: null | SpacingStylingProperties;
9
+ }
10
+ export interface LoadingSpinnerTransitions {
11
+ own?: null | LoadingSpinnerStyles;
12
+ }
13
+ export interface LoadingSpinnerElements {
14
+ own: StatelessStylingBlock<LoadingSpinnerStyles>[];
15
+ spinner: StatelessStylingBlock<LoadingSpinnerStyles>[];
16
+ }
17
+ export interface LoadingSpinnerConfig {
18
+ size?: number;
19
+ radius?: number;
20
+ stroke?: number;
21
+ primaryColor?: string;
22
+ secondaryColor?: string | null;
23
+ primaryRotation?: number;
24
+ secondaryRotation?: number;
25
+ duration?: number;
26
+ arcFraction?: number;
27
+ }
28
+ export interface LoadingSpinnerModel<Predicates> {
29
+ config?: null | LoadingSpinnerConfig;
30
+ styles?: null | LayoutStyle<LoadingSpinnerElements, ConditionalStyleTransition<LoadingSpinnerTransitions, Predicates>>;
31
+ }
32
+ export interface LoadingSpinnerProps {
33
+ schema: LoadingSpinnerModel<WhenPredicate>;
34
+ testId?: string;
35
+ }
36
+ export declare function LoadingSpinner(props: LoadingSpinnerProps): import("react/jsx-runtime").JSX.Element;
@@ -1,15 +1,17 @@
1
1
  import { GlobalActions } from '../../../../libraries/domain/src/behaviors';
2
- import { ChildLayoutActions, childLayoutsReducer, ChildLayoutsState, StaticData, staticDataReducer } from '@rokt/module-utils';
2
+ import { ChildLayoutActions, childLayoutsReducer, ChildLayoutsState, StaticData, staticDataReducer, DynamicData, dynamicDataReducer } from '@rokt/module-utils';
3
3
  import { CatalogSelectionState } from '../models/state/catalog-selection';
4
4
  export type AppState = {
5
5
  staticData: StaticData;
6
6
  selectedItem: CatalogSelectionState;
7
+ dynamicData: DynamicData;
7
8
  childLayouts: ChildLayoutsState;
8
9
  };
9
10
  export type StateActions = GlobalActions | ChildLayoutActions;
10
11
  export declare const appReducers: {
11
12
  staticData: typeof staticDataReducer;
12
13
  selectedItem: (state: CatalogSelectionState | undefined, action: import("redux").AnyAction) => CatalogSelectionState;
14
+ dynamicData: typeof dynamicDataReducer;
13
15
  childLayouts: typeof childLayoutsReducer;
14
16
  };
15
17
  export declare function makeAppInitialState(data?: Partial<AppState>): AppState;
@@ -0,0 +1 @@
1
+ export * from './sagas';
@@ -0,0 +1,3 @@
1
+ import { PutEffect } from 'redux-saga/effects';
2
+ import { CheckoutLifecycle } from '../../actions';
3
+ export declare function handleCheckoutLifecycle(action: CheckoutLifecycle): Generator<PutEffect, void, never>;