@rokt/dcui-orchestrator 0.3.1-rc.4 → 0.3.1-rc.6

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.
@@ -15,6 +15,7 @@ export type OutboundRealtimeOfferFulfillmentReferralEventPayload = {
15
15
  accountID: string;
16
16
  referralCreativeID: string;
17
17
  referralOnly?: boolean;
18
+ rewardHandoff?: boolean;
18
19
  };
19
20
  };
20
21
  export type OutboundRealtimeOfferFulfillmentConversionEventPayload = {
@@ -23,6 +24,7 @@ export type OutboundRealtimeOfferFulfillmentConversionEventPayload = {
23
24
  rclid: string;
24
25
  accountID: string;
25
26
  referralCreativeID: string;
27
+ rewardHandoff?: boolean;
26
28
  };
27
29
  };
28
30
  export type OutboundRealtimeOfferFulfillmentSuccessEventPayload = {
@@ -18,5 +18,6 @@ export interface LayoutCreativeResponseOption {
18
18
  };
19
19
  conversionType?: LayoutConversionType;
20
20
  rclid?: string;
21
+ rewardHandoff?: boolean;
21
22
  }
22
23
  export declare function makeLayoutResponseOption(data?: Partial<LayoutCreativeResponseOption>): LayoutCreativeResponseOption;
@@ -17,6 +17,7 @@ export interface PluginCreativeFulfillmentResponseOption {
17
17
  creativeInstanceGuid?: string;
18
18
  conversionType?: PluginConversionType;
19
19
  rclid?: string;
20
+ rewardHandoff?: boolean;
20
21
  }
21
22
  export interface PluginCreativeUrlResponseOption {
22
23
  id: string;
@@ -31,6 +32,7 @@ export interface PluginCreativeUrlResponseOption {
31
32
  urlBehavior?: PluginUrlBehavior;
32
33
  conversionType?: PluginConversionType;
33
34
  rclid?: string;
35
+ rewardHandoff?: boolean;
34
36
  creativeInstanceGuid?: string;
35
37
  }
36
38
  export interface PluginCreativeCaptureOnlyResponseOption {
@@ -67,6 +67,7 @@ export interface CartItemInstantPurchase {
67
67
  catalogItemId: string;
68
68
  quantity: number;
69
69
  initiatedBy: InitiatedBy;
70
+ purchaseId?: string;
70
71
  };
71
72
  }
72
73
  export interface CartItemInstantPurchaseFailure {
@@ -77,6 +78,7 @@ export interface CartItemInstantPurchaseFailure {
77
78
  quantity: number;
78
79
  failureReason: string;
79
80
  providerId: string;
81
+ purchaseId?: string;
80
82
  };
81
83
  }
82
84
  export interface CartItemQuantitySelected {
@@ -24,6 +24,14 @@ export type DevicePayResponsePayload = {
24
24
  };
25
25
  cancelled?: boolean;
26
26
  retryable?: boolean;
27
+ purchaseId?: string;
28
+ [key: string]: unknown;
29
+ };
30
+ export type DevicePayInteractionPayload = {
31
+ success: true;
32
+ interaction: string;
33
+ timestamp: string;
34
+ sessionId: string;
27
35
  [key: string]: unknown;
28
36
  };
29
37
  /**
@@ -36,6 +44,7 @@ export type DevicePayPurchaseContext = {
36
44
  catalogItem: PluginCatalogItem;
37
45
  quantity: number;
38
46
  providerId: string;
47
+ paymentProvider: PaymentProvider;
39
48
  };
40
49
  export type DevicePayResponse = {
41
50
  type: typeof DEVICE_PAY_RESPONSE;
@@ -3,10 +3,20 @@ import { EventChannel } from 'redux-saga';
3
3
  import { Log, PaymentMethodType, PluginCatalogItem, ShippingAttributes } from '../../../../../libraries/domain/src/models';
4
4
  import { GlobalGateway } from '../../../../../libraries/module-connector/src/main';
5
5
  import { OfferLifecycle } from '../../../../../libraries/domain/src/behaviors';
6
- import { DevicePayPurchaseContext, InitiateDevicePayAction, DevicePayResponsePayload, DevicePayResponse, DevicePayAvailableAction, DevicePayAvailablePayload } from '../../actions';
6
+ import { DevicePayPurchaseContext, DevicePayInteractionPayload, InitiateDevicePayAction, DevicePayResponsePayload, DevicePayResponse, DevicePayAvailableAction, DevicePayAvailablePayload } from '../../actions';
7
7
  import { AppState } from '../../reducers';
8
8
  import { OfferLifecycleEventState } from '../../models';
9
9
  import { PrepareDevicePayEventPayload } from '../../../../../libraries/domain/src/models';
10
+ export declare function isDevicePayInteraction(data: unknown): data is DevicePayInteractionPayload;
11
+ export declare function listenForDevicePayInteraction(channel: EventChannel<DevicePayInteractionPayload>, context: DevicePayPurchaseContext): Generator<PutEffect<{
12
+ type: string;
13
+ payload: {
14
+ name: string;
15
+ parentGuid: string;
16
+ action: string;
17
+ context: string;
18
+ };
19
+ }> | ChannelTakeEffect<DevicePayInteractionPayload>, void, DevicePayInteractionPayload>;
10
20
  export declare function isDevicePayResponse(obj: unknown): obj is DevicePayResponsePayload;
11
21
  /**
12
22
  * Strict guard: requires at least one known provider key in `response`, AND
@@ -32,7 +42,27 @@ export declare function processDevicePayAvailable(logger: (log: Log) => void, ac
32
42
  }>, void, (boolean & ({
33
43
  type: PaymentMethodType;
34
44
  }[] & OfferLifecycleEventState)) | undefined>;
35
- export declare function listenForDevicePayResponse(channel: EventChannel<DevicePayResponsePayload>, logger: (log: Log) => void, context: DevicePayPurchaseContext): Generator<ChannelTakeEffect<DevicePayResponsePayload> | CallEffect<void> | PutEffect, void, DevicePayResponsePayload>;
45
+ export declare function listenForDevicePayResponse(channel: EventChannel<DevicePayResponsePayload>, logger: (log: Log) => void, context: DevicePayPurchaseContext, interactionChannel?: EventChannel<DevicePayInteractionPayload>): Generator<CallEffect<void> | import("redux-saga/effects").ForkEffect<void> | import("redux-saga/effects").RaceEffect<import("redux-saga/effects").TakeEffect | CallEffect<true> | ChannelTakeEffect<DevicePayResponsePayload>> | PutEffect<{
46
+ type: string;
47
+ payload: DevicePayResponsePayload;
48
+ context: DevicePayPurchaseContext;
49
+ }> | PutEffect<{
50
+ type: string;
51
+ payload: {
52
+ success: boolean;
53
+ timestamp: string;
54
+ sessionId: string;
55
+ error: {
56
+ code: string;
57
+ message: string;
58
+ };
59
+ };
60
+ context: DevicePayPurchaseContext;
61
+ }>, void, {
62
+ response?: DevicePayResponsePayload;
63
+ timeout?: true;
64
+ dismissal?: OfferLifecycle;
65
+ }>;
36
66
  export declare function processDevicePayCartItem(gateway: GlobalGateway, logger: (log: Log) => void, action: InitiateDevicePayAction): Generator<CallEffect<void> | import("redux-saga/effects").SelectEffect | import("redux-saga/effects").ForkEffect<void> | PutEffect<{
37
67
  type: string;
38
68
  payload: {
@@ -95,6 +125,14 @@ export declare function prepareDevicePay(gateway: GlobalGateway, logger: (log: L
95
125
  };
96
126
  }>, void, AppState | undefined>;
97
127
  export declare function processDevicePayResponse(logger: (log: Log) => void, action: DevicePayResponse): Generator<CallEffect<void> | PutEffect<{
128
+ type: string;
129
+ payload: {
130
+ name: string;
131
+ parentGuid: string;
132
+ action: string;
133
+ context: string;
134
+ };
135
+ }> | PutEffect<{
98
136
  type: string;
99
137
  payload: import("../../../../../libraries/domain/src/models").CartItemInstantPurchaseFailure;
100
138
  }> | PutEffect<{
@@ -12,6 +12,11 @@ export declare const INSTANT_PURCHASE_WSDK_CHANNEL_ERROR = "INSTANT_PURCHASE_WSD
12
12
  export declare const CHECKOUT_BUTTON_INVALID_OFFERLIFECYCLE = "CHECKOUT_BUTTON_INVALID_OFFERLIFECYCLE";
13
13
  export declare const CHECKOUT_BUTTON_UNKNOWN_EVENT = "CHECKOUT_BUTTON_UNKNOWN_EVENT";
14
14
  export declare const DEVICE_PAY_CHANNEL_ERROR = "DEVICE_PAY_CHANNEL_ERROR";
15
+ export declare const DEVICE_PAY_RESPONSE_TIMEOUT = "DEVICE_PAY_RESPONSE_TIMEOUT";
16
+ export declare const DEVICE_PAY_CANCELLED = "DEVICE_PAY_CANCELLED";
17
+ export declare const DEVICE_PAY_RETRYABLE_DECLINE = "DEVICE_PAY_RETRYABLE_DECLINE";
18
+ export declare const DEVICE_PAY_UNKNOWN_FAILURE = "DEVICE_PAY_UNKNOWN_FAILURE";
19
+ export declare const DEVICE_PAY_INVALID_CART_ITEM_MAPPING = "DEVICE_PAY_INVALID_CART_ITEM_MAPPING";
15
20
  export declare const MALFORMED_DEVICE_PAY_DATA = "MALFORMED_DEVICE_PAY_DATA";
16
21
  export declare const MISSING_DEVICE_PAY_PROVIDER_DATA = "MISSING_DEVICE_PAY_PROVIDER_DATA";
17
22
  export declare const DEVICE_PAY_NOT_AVAILABLE = "DEVICE_PAY_NOT_AVAILABLE";
@@ -1,4 +1,4 @@
1
1
  import { CartItemInstantPurchase, CartItemInstantPurchaseFailure, PluginCatalogItem } from '../../../../libraries/domain/src/models';
2
2
  export declare const UNKNOWN_FAILURE_REASON = "Unknown failure reason";
3
- export declare function createInstantPurchaseSuccessSignal(catalogItem: PluginCatalogItem, quantity: number): CartItemInstantPurchase;
4
- export declare function createInstantPurchaseFailureSignal(catalogItem: PluginCatalogItem, quantity: number, providerId: string, failureReason: string): CartItemInstantPurchaseFailure;
3
+ export declare function createInstantPurchaseSuccessSignal(catalogItem: PluginCatalogItem, quantity: number, purchaseId?: string): CartItemInstantPurchase;
4
+ export declare function createInstantPurchaseFailureSignal(catalogItem: PluginCatalogItem, quantity: number, providerId: string, failureReason: string, purchaseId?: string): CartItemInstantPurchaseFailure;
@@ -15,6 +15,7 @@ export declare function getRealtimeFulfillmentSuccessCallback(gateway: GlobalGat
15
15
  rclid: string | undefined;
16
16
  accountID: string;
17
17
  referralCreativeID: string | undefined;
18
+ rewardHandoff: boolean | undefined;
18
19
  };
19
20
  };
20
21
  }>, void, unknown>) | undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rokt/dcui-orchestrator",
3
- "version": "0.3.1-rc.4",
3
+ "version": "0.3.1-rc.6",
4
4
  "description": "Rokt's DCUI rendering process",
5
5
  "main": "dist/index.cjs",
6
6
  "module": "dist/index.js",