@rokt/dcui-orchestrator 1.2.1-rc.3 → 1.2.1-rc.31

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 (96) hide show
  1. package/dist/index.cjs +43 -37
  2. package/dist/index.js +54 -48
  3. package/dist/libraries/dcui-components/src/components/data-mapper/data-mapper.d.ts +4 -0
  4. package/dist/libraries/dcui-components/src/components/index.d.ts +3 -0
  5. package/dist/libraries/dcui-components/src/components/paypal-button/index.d.ts +1 -0
  6. package/dist/libraries/dcui-components/src/components/paypal-button/paypal-button.d.ts +78 -0
  7. package/dist/libraries/dcui-components/src/components/paypal-button/paypal-wordmark.d.ts +8 -0
  8. package/dist/libraries/dcui-components/src/components/progress-control/index.d.ts +1 -0
  9. package/dist/libraries/dcui-components/src/components/progress-control/progress-control.d.ts +49 -0
  10. package/dist/libraries/dcui-components/src/components/progress-indicator/get-progress-indicator-state.d.ts +3 -0
  11. package/dist/libraries/dcui-components/src/components/progress-indicator/index.d.ts +3 -0
  12. package/dist/libraries/dcui-components/src/components/progress-indicator/progress-indicator.d.ts +8 -0
  13. package/dist/libraries/dcui-components/src/components/progress-indicator/types.d.ts +88 -0
  14. package/dist/libraries/dcui-components/src/contexts/data-mapper-context.d.ts +4 -0
  15. package/dist/libraries/dcui-components/src/contexts/index.d.ts +1 -0
  16. package/dist/libraries/dcui-components/src/contexts/lead-capture-offer-context.d.ts +5 -0
  17. package/dist/libraries/dcui-components/src/contexts/validators/validator-provider.d.ts +5 -3
  18. package/dist/libraries/dcui-components/src/failure-codes.d.ts +1 -0
  19. package/dist/libraries/domain/src/behaviors/continuous-child.d.ts +62 -0
  20. package/dist/libraries/domain/src/behaviors/custom-states.d.ts +1 -1
  21. package/dist/libraries/domain/src/behaviors/index.d.ts +1 -0
  22. package/dist/libraries/domain/src/behaviors/offer-engagement.d.ts +11 -0
  23. package/dist/libraries/domain/src/behaviors/send-partner.d.ts +14 -2
  24. package/dist/libraries/domain/src/behaviors/trigger-action.d.ts +3 -3
  25. package/dist/libraries/domain/src/models/child-layout-response.d.ts +6 -0
  26. package/dist/libraries/domain/src/models/index.d.ts +1 -0
  27. package/dist/libraries/domain/src/models/layout/layout-offer.d.ts +2 -0
  28. package/dist/libraries/domain/src/models/partner-event.d.ts +1 -1
  29. package/dist/libraries/domain/src/models/plugin/plugin-child-layout-model.d.ts +1 -0
  30. package/dist/libraries/domain/src/models/plugin/plugin-offer.d.ts +2 -0
  31. package/dist/libraries/layout-renderer-utils/src/actions/attributes.d.ts +7 -0
  32. package/dist/libraries/layout-renderer-utils/src/actions/index.d.ts +4 -1
  33. package/dist/libraries/layout-renderer-utils/src/models/state/attributes.d.ts +2 -0
  34. package/dist/libraries/layout-renderer-utils/src/models/state/index.d.ts +3 -0
  35. package/dist/libraries/layout-renderer-utils/src/reducers/attributes/index.d.ts +1 -0
  36. package/dist/libraries/layout-renderer-utils/src/reducers/attributes/reducer.d.ts +4 -0
  37. package/dist/libraries/layout-renderer-utils/src/reducers/index.d.ts +3 -0
  38. package/dist/libraries/layout-renderer-utils/src/sagas/plugin/channels.d.ts +3 -3
  39. package/dist/libraries/layout-renderer-utils/src/sagas/plugin/display.d.ts +3 -0
  40. package/dist/libraries/layout-renderer-utils/src/sagas/plugin/sagas.d.ts +5 -2
  41. package/dist/libraries/module-connector/src/main.d.ts +1 -1
  42. package/dist/libraries/module-connector/src/models/gateway.d.ts +14 -3
  43. package/dist/libraries/module-connector/src/models/module-attributes.d.ts +3 -0
  44. package/dist/libraries/module-connector/src/models/module-connector-builder.d.ts +1 -0
  45. package/dist/libraries/module-utils/src/sagas/child-layouts/sagas.d.ts +2 -0
  46. package/dist/libraries/orchestrator/src/actions/index.d.ts +1 -0
  47. package/dist/libraries/orchestrator/src/components/progress-control/progress-control.d.ts +2 -45
  48. package/dist/libraries/orchestrator/src/components/progress-indicator/progress-indicator.d.ts +1 -9
  49. package/dist/libraries/orchestrator/src/components/progress-indicator/types.d.ts +1 -87
  50. package/dist/libraries/orchestrator/src/measurement/creative-measurement.d.ts +54 -0
  51. package/dist/libraries/orchestrator/src/reducers/index.d.ts +1 -0
  52. package/dist/libraries/orchestrator/src/sagas/child-layouts/continuous-child-host.d.ts +15 -0
  53. package/dist/libraries/orchestrator/src/sagas/child-layouts/continuous-child.d.ts +52 -0
  54. package/dist/libraries/orchestrator/src/sagas/index.d.ts +1 -1
  55. package/dist/libraries/plugin-utils/src/plugin-service/attributes.d.ts +7 -0
  56. package/dist/libraries/plugin-utils/src/plugin-service/display.d.ts +1 -0
  57. package/dist/libraries/plugin-utils/src/plugin-service/index.d.ts +3 -1
  58. package/dist/modules/instant-purchase/src/actions/catalog-selection.d.ts +8 -1
  59. package/dist/modules/instant-purchase/src/actions/instant-purchase.d.ts +4 -0
  60. package/dist/modules/instant-purchase/src/components/catalog-device-pay-button/catalog-device-pay-button.d.ts +8 -0
  61. package/dist/modules/instant-purchase/src/components/catalog-selectors-stacked/catalog-selectors-stacked.d.ts +30 -0
  62. package/dist/modules/instant-purchase/src/models/state/device-pay-availability.d.ts +1 -0
  63. package/dist/modules/instant-purchase/src/models/state/instant-purchase.d.ts +4 -0
  64. package/dist/modules/instant-purchase/src/reducers/catalog-selection/reducer.d.ts +2 -0
  65. package/dist/modules/instant-purchase/src/reducers/index.d.ts +3 -0
  66. package/dist/modules/instant-purchase/src/sagas/instant-purchase/sagas.d.ts +17 -3
  67. package/dist/modules/instant-purchase/src/sagas/paypal/sagas.d.ts +2 -0
  68. package/dist/modules/instant-purchase/src/sagas/tax-and-shipping/sagas.d.ts +10 -20
  69. package/dist/modules/instant-purchase/src/selectors/device-pay-availability/selectors.d.ts +1 -0
  70. package/dist/modules/instant-purchase/src/selectors/tax-and-shipping/selectors.d.ts +8 -0
  71. package/dist/modules/instant-purchase/src/utils/create-tax-and-shipping-cache-key.d.ts +4 -0
  72. package/dist/modules/instant-purchase/src/utils/parse-non-negative-monetary-amount.d.ts +1 -0
  73. package/dist/modules/instant-purchase/src/utils/requires-tax-and-shipping-initialization.d.ts +2 -0
  74. package/dist/modules/standard-marketing/src/sagas/offer-engagement/sagas.d.ts +2 -1
  75. package/node_modules/@rokt/dcui-layout-schema/dist/schema.d.ts +575 -21
  76. package/node_modules/@rokt/dcui-layout-schema/dist/tsconfig.tsbuildinfo +1 -1
  77. package/node_modules/@rokt/dcui-layout-schema/package.json +1 -1
  78. package/node_modules/@rokt/dcui-layout-schema/v1.21/index.d.ts +7105 -0
  79. package/node_modules/@rokt/dcui-layout-schema/v1.21/index.js +4 -0
  80. package/node_modules/@rokt/dcui-layout-schema/v1.22/index.d.ts +7121 -0
  81. package/node_modules/@rokt/dcui-layout-schema/v1.22/index.js +4 -0
  82. package/node_modules/@rokt/dcui-layout-schema/v1.23/index.d.ts +7126 -0
  83. package/node_modules/@rokt/dcui-layout-schema/v1.23/index.js +4 -0
  84. package/node_modules/@rokt/dcui-layout-schema/v1.24/index.d.ts +7492 -0
  85. package/node_modules/@rokt/dcui-layout-schema/v1.24/index.js +4 -0
  86. package/node_modules/@rokt/dcui-layout-schema/v1.25/index.d.ts +7510 -0
  87. package/node_modules/@rokt/dcui-layout-schema/v1.25/index.js +4 -0
  88. package/node_modules/@rokt/dcui-layout-schema/v1.26/index.d.ts +7516 -0
  89. package/node_modules/@rokt/dcui-layout-schema/v1.26/index.js +4 -0
  90. package/node_modules/@rokt/dcui-layout-schema/v1.27/index.d.ts +7577 -0
  91. package/node_modules/@rokt/dcui-layout-schema/v1.27/index.js +4 -0
  92. package/node_modules/@rokt/dcui-layout-schema/v1.28/index.d.ts +7628 -0
  93. package/node_modules/@rokt/dcui-layout-schema/v1.28/index.js +4 -0
  94. package/node_modules/@rokt/dcui-layout-schema/v1.29/index.d.ts +7643 -0
  95. package/node_modules/@rokt/dcui-layout-schema/v1.29/index.js +4 -0
  96. package/package.json +2 -2
@@ -1,6 +1,7 @@
1
1
  import { GlobalActions } from '../../../../libraries/domain/src/behaviors';
2
2
  import { ChildLayoutActions, childLayoutsReducer, ChildLayoutsState, StaticData, staticDataReducer, DynamicData, dynamicDataReducer } from '../../../../libraries/module-utils/src/index';
3
3
  import { CatalogSelectionState, DevicePayAvailabilityState, FulfillmentDetailsState, OfferLifecycleEventState, TaxAndShippingState } from '../models';
4
+ import { CatalogAttributeSelectionsState } from './catalog-selection/reducer';
4
5
  import { DevicePayRequestsState } from './device-pay-requests';
5
6
  import { PurchaseIdState } from './instant-purchase';
6
7
  import { PayPalTransactionDetailsState } from './paypal-transaction-details';
@@ -8,6 +9,7 @@ import { PayPalPurchaseContextState } from './paypal-purchase-context';
8
9
  export type AppState = {
9
10
  staticData: StaticData;
10
11
  selectedItem: CatalogSelectionState;
12
+ catalogAttributeSelections: CatalogAttributeSelectionsState;
11
13
  dynamicData: DynamicData;
12
14
  childLayouts: ChildLayoutsState;
13
15
  fulfillmentDetails: FulfillmentDetailsState;
@@ -23,6 +25,7 @@ export type StateActions = GlobalActions | ChildLayoutActions;
23
25
  export declare const appReducers: {
24
26
  staticData: typeof staticDataReducer;
25
27
  selectedItem: (state: CatalogSelectionState | undefined, action: import("redux").AnyAction) => CatalogSelectionState;
28
+ catalogAttributeSelections: (state: CatalogAttributeSelectionsState | undefined, action: import("redux").AnyAction) => CatalogAttributeSelectionsState;
26
29
  dynamicData: typeof dynamicDataReducer;
27
30
  childLayouts: typeof childLayoutsReducer;
28
31
  fulfillmentDetails: (state: FulfillmentDetailsState | undefined, action: import("redux").AnyAction) => FulfillmentDetailsState;
@@ -1,14 +1,28 @@
1
1
  import { CallEffect, ForkEffect, PutEffect, RaceEffect, SelectEffect } from 'redux-saga/effects';
2
- import { Log } from '../../../../../libraries/domain/src/models';
2
+ import { Log, PluginCatalogItem, ShippingAttributes } from '../../../../../libraries/domain/src/models';
3
3
  import { GlobalGateway } from '../../../../../libraries/module-connector/src/main';
4
4
  import { StaticData } from '../../../../../libraries/module-utils/src/index';
5
- import { InitiateInstantPurchase, InstantPurchasePartnerResponse } from '../../actions/instant-purchase';
5
+ import { InitiateInstantPurchase, InstantPurchasePartnerResponse, PushTaxAndShipping } from '../../actions/instant-purchase';
6
6
  import { AppState } from '../../reducers';
7
7
  import { TriggerSelectItemAction, InstantPurchaseWsdkResponse, UpsellItemInstantPurchasePartnerResponse } from '../../actions';
8
8
  export declare const INSTANT_PURCHASE_RESPONSE_TTL = 60000;
9
9
  export declare function processSelectDefaultOrOnlyCatalogItem(): Generator<SelectEffect | PutEffect | CallEffect, void, AppState | undefined>;
10
10
  export declare function processSelectCatalogItem(action: TriggerSelectItemAction): Generator<SelectEffect | PutEffect | CallEffect, void, never>;
11
- export declare function processInstantPurchaseCartItem(gateway: GlobalGateway, logger: (log: Log) => void, action: InitiateInstantPurchase): Generator<SelectEffect | CallEffect | PutEffect | ForkEffect, void, AppState | undefined>;
11
+ export declare function processInstantPurchaseCartItem(gateway: GlobalGateway, logger: (log: Log) => void, action: InitiateInstantPurchase): Generator<SelectEffect | CallEffect | PutEffect | ForkEffect, void, AppState | undefined | {
12
+ result?: PushTaxAndShipping;
13
+ selectionChanged?: unknown;
14
+ offerEnd?: unknown;
15
+ }>;
16
+ /** Visible for testing the cancellation conditions while a quote is pending. */
17
+ export declare function waitForPurchaseTaxRetry(cacheKey: string, requestId: string, catalogItem: PluginCatalogItem, shippingAttributes: Partial<ShippingAttributes>): Generator<RaceEffect<import("redux-saga/effects").TakeEffect>, {
18
+ result?: PushTaxAndShipping;
19
+ selectionChanged?: unknown;
20
+ offerEnd?: unknown;
21
+ }, {
22
+ result?: PushTaxAndShipping;
23
+ selectionChanged?: unknown;
24
+ offerEnd?: unknown;
25
+ }>;
12
26
  export declare function handleInstantPurchasePartnerResponse(logger: (log: Log) => void, action: InstantPurchasePartnerResponse): Generator<SelectEffect | CallEffect | PutEffect, void, StaticData | undefined>;
13
27
  export declare function handleUpsellItemInstantPurchasePartnerResponse(logger: (log: Log) => void, action: UpsellItemInstantPurchasePartnerResponse): Generator<SelectEffect | CallEffect | PutEffect, void, StaticData | undefined>;
14
28
  export declare function handleInstantPurchaseWsdkResponse(action: InstantPurchaseWsdkResponse): Generator<PutEffect, void, never>;
@@ -14,9 +14,11 @@ type PayPalEventPayload = {
14
14
  } | {
15
15
  type: 'DEVICE_PAY_FAILURE';
16
16
  reason?: string;
17
+ retryable?: boolean;
17
18
  } | {
18
19
  type: 'DEVICE_PAY_CANCEL';
19
20
  };
21
+ export declare function createPayPalEventChannel(gateway: GlobalGateway, logger: (log: Log) => void): EventChannel<PayPalEventPayload>;
20
22
  export declare function listenForPayPalEvents(channel: EventChannel<PayPalEventPayload>, logger: (log: Log) => void, offerPositionIndex: number): Generator<ChannelTakeEffect<PayPalEventPayload> | CallEffect<void> | PutEffect | SelectEffect, void, PayPalEventPayload | (PayPalPurchaseContext | null)>;
21
23
  export declare function preparePayPal(gateway: GlobalGateway, logger: (log: Log) => void): Generator<CallEffect<void> | SelectEffect | PutEffect<{
22
24
  type: string;
@@ -1,24 +1,28 @@
1
1
  import { CallEffect, PutEffect, RaceEffect, SelectEffect, ForkEffect } from 'redux-saga/effects';
2
- import { InstantPurchaseTaxAndShippingResponsePayload, TaxAndShippingErrors, TaxAndShippingPricing } from '../../models';
2
+ import { InstantPurchaseTaxAndShippingResponsePayload, TaxAndShippingState, TaxAndShippingErrors } from '../../models';
3
3
  import { GlobalGateway } from '../../../../../libraries/module-connector/src/main';
4
4
  import { Log } from '../../../../../libraries/domain/src/models';
5
5
  import { AppState } from '../../reducers';
6
6
  import { InitiateTaxAndShipping } from '../../actions';
7
7
  export declare const pendingRequestKeys: Set<string>;
8
+ export declare function resetTaxAndShippingRequestTrackingForTest(): void;
9
+ export declare function createTaxAndShippingRequestId(): string;
8
10
  export declare function watchTaxAndShippingChannel(gateway: GlobalGateway, logger: (log: Log) => void): Generator<RaceEffect<unknown> | CallEffect, void, {
9
11
  response: InstantPurchaseTaxAndShippingResponsePayload | undefined;
10
12
  offerEnd: unknown;
11
13
  } | undefined>;
12
- export declare function initiateTaxAndShippingRequest(_gateway: GlobalGateway, logger: (log: Log) => void, action: InitiateTaxAndShipping): Generator<SelectEffect | CallEffect | PutEffect | ForkEffect, void, AppState['fulfillmentDetails'] | boolean>;
13
- export declare function processTaxAndShippingResponse(payload: InstantPurchaseTaxAndShippingResponsePayload): Generator<PutEffect<{
14
+ export declare function initiateTaxAndShippingRequest(_gateway: GlobalGateway, logger: (log: Log) => void, action: InitiateTaxAndShipping): Generator<SelectEffect | CallEffect | PutEffect | ForkEffect, void, AppState['fulfillmentDetails'] | boolean | string | null>;
15
+ export declare function processTaxAndShippingResponse(payload: InstantPurchaseTaxAndShippingResponsePayload): Generator<SelectEffect | PutEffect, void, unknown>;
16
+ export declare function timeoutPendingCacheEntry(cacheKey: string, requestId: string, logger: (log: Log) => void): Generator<CallEffect<void> | SelectEffect | CallEffect<true> | PutEffect<{
14
17
  type: string;
15
18
  payload: {
16
19
  cacheKey: string;
17
20
  taxAndShippingEntry: {
18
- isPending: false;
19
21
  taxAndShippingData: {
20
- error: TaxAndShippingErrors.REQUEST_FAILED;
22
+ error: TaxAndShippingErrors;
21
23
  };
24
+ requestId?: string | undefined;
25
+ isPending: false;
22
26
  };
23
27
  };
24
28
  }> | PutEffect<{
@@ -33,18 +37,4 @@ export declare function processTaxAndShippingResponse(payload: InstantPurchaseTa
33
37
  key: "offerComplete";
34
38
  value: number;
35
39
  };
36
- }> | PutEffect<{
37
- type: string;
38
- payload: {
39
- cacheKey: string;
40
- taxAndShippingEntry: {
41
- isPending: false;
42
- taxAndShippingData: {
43
- taxAndShippingPricing: TaxAndShippingPricing;
44
- };
45
- };
46
- };
47
- }> | PutEffect<{
48
- type: string;
49
- payload: string | null;
50
- }>, void, unknown>;
40
+ }>, void, TaxAndShippingState>;
@@ -3,6 +3,7 @@ import { AppState } from '../../reducers';
3
3
  export declare function getDevicePayAvailability(state: AppState): DevicePayAvailabilityState;
4
4
  export declare function isApplePayAvailable(state: AppState): boolean;
5
5
  export declare function isAfterpayAvailable(state: AppState): boolean;
6
+ export declare function isPayPalAvailable(state: AppState): boolean;
6
7
  /**
7
8
  * Gate for the "no remaining usable payment option" branch in
8
9
  * processDevicePayAvailable. True when every entry in supportedPaymentMethods
@@ -1,3 +1,11 @@
1
+ import { PluginCatalogItem } from '../../../../../libraries/domain/src/models';
1
2
  import { TaxAndShippingEntry } from '../../models';
2
3
  import { AppState } from '../../reducers';
4
+ export type TaxAndShippingDisplayState = 'waitingForSelection' | 'idle' | 'loading' | 'ready' | 'error';
5
+ /** A stacked selector can set a preview item before all visible choices are made. */
6
+ export declare function isCatalogSelectionIncomplete(state: AppState): boolean;
7
+ export declare function getTaxAndShippingDisplayState(state: AppState): TaxAndShippingDisplayState;
3
8
  export declare function getActiveTaxAndShipping(state: AppState): TaxAndShippingEntry;
9
+ export declare function isTaxAndShippingDisplayPending(entry: TaxAndShippingEntry): boolean;
10
+ export declare function getTaxAndShippingForCatalogItem(state: AppState, catalogItem: Pick<PluginCatalogItem, 'catalogItemId'> & Partial<Pick<PluginCatalogItem, 'copy'>> & Partial<Pick<PluginCatalogItem, 'price' | 'preSelectedQuantity' | 'currency'>>): TaxAndShippingEntry | undefined;
11
+ export declare function isCatalogItemTaxAndShippingReady(state: AppState, catalogItem: Pick<PluginCatalogItem, 'catalogItemId' | 'copy'> & Partial<Pick<PluginCatalogItem, 'price' | 'preSelectedQuantity' | 'currency'>>): boolean;
@@ -1,4 +1,8 @@
1
1
  import { ShippingAttributes } from '../../../../libraries/domain/src/models';
2
2
  export declare function createTaxAndShippingCacheKey(shippingAttributes: Partial<ShippingAttributes>, catalogItems: {
3
3
  catalogItemId: string;
4
+ price?: number;
5
+ preSelectedQuantity?: number;
6
+ currency?: string;
7
+ copy?: Record<string, string>;
4
8
  }[]): string;
@@ -0,0 +1 @@
1
+ export declare function parseNonNegativeMonetaryAmount(value: unknown): number | null;
@@ -0,0 +1,2 @@
1
+ import { PluginCatalogItem } from '../../../../libraries/domain/src/models';
2
+ export declare function requiresTaxAndShippingInitialization(catalogItem: Pick<PluginCatalogItem, 'copy'>): boolean;
@@ -12,10 +12,11 @@ export declare function getRealtimeFulfillmentSuccessCallback(gateway: GlobalGat
12
12
  payload: {
13
13
  name: string;
14
14
  body: {
15
+ rewardHandoff: boolean | undefined;
16
+ adID?: string;
15
17
  rclid: string | undefined;
16
18
  accountID: string;
17
19
  referralCreativeID: string | undefined;
18
- rewardHandoff: boolean | undefined;
19
20
  };
20
21
  };
21
22
  }>, void, unknown>) | undefined;