@rokt/dcui-orchestrator 0.2.1-rc.40 → 0.2.1-rc.42
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.
- package/dist/index.cjs +19 -19
- package/dist/index.js +24 -24
- package/dist/libraries/orchestrator/src/sagas/cart-service/sagas.d.ts +3 -2
- package/dist/modules/instant-purchase/src/actions/instant-purchase.d.ts +6 -1
- package/dist/modules/instant-purchase/src/components/dismiss-instant-purchase-button/dismiss-instant-purchase-button.d.ts +1 -0
- package/dist/modules/instant-purchase/src/models/state/instant-purchase.d.ts +3 -2
- package/dist/modules/instant-purchase/src/reducers/index.d.ts +3 -1
- package/dist/modules/instant-purchase/src/reducers/instant-purchase/index.d.ts +1 -0
- package/dist/modules/instant-purchase/src/reducers/instant-purchase/offer-lifecycle-event/index.d.ts +1 -0
- package/dist/modules/instant-purchase/src/reducers/instant-purchase/offer-lifecycle-event/reducer.d.ts +4 -0
- package/dist/modules/instant-purchase/src/sagas/instant-purchase/sagas.d.ts +10 -1
- package/package.json +1 -1
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
import { ChannelTakeEffect, PutEffect, CancelledEffect } from 'redux-saga/effects';
|
|
1
2
|
import { InitiateCartItemEvent, CartItemResponse } from '../../../../domain/src/behaviors';
|
|
2
3
|
import { CartItemPayload } from '../../../../domain/src/models';
|
|
3
4
|
import { EventChannel } from 'redux-saga';
|
|
4
5
|
import { PartnerInteractionService } from '../../../../plugin-utils/src/index';
|
|
5
6
|
export declare function initializeCartService(partnerInteractionService: PartnerInteractionService): Generator<import("redux-saga/effects").ForkEffect<void>, void, unknown>;
|
|
6
|
-
export declare function processCartServiceEvent(
|
|
7
|
+
export declare function processCartServiceEvent(action: InitiateCartItemEvent): Generator<PutEffect<{
|
|
7
8
|
type: string;
|
|
8
9
|
payload: {
|
|
9
10
|
name: string;
|
|
@@ -12,4 +13,4 @@ export declare function processCartServiceEvent(partnerInteractionService: Partn
|
|
|
12
13
|
}>, void, unknown>;
|
|
13
14
|
export declare function handleCartServiceResponse(action: CartItemResponse): Generator<never, void, unknown>;
|
|
14
15
|
export declare function createCartServiceResponseChannel(partnerInteractionService: PartnerInteractionService): EventChannel<CartItemResponse['payload']>;
|
|
15
|
-
export declare function listenForCartServiceResponse(partnerInteractionService: PartnerInteractionService): Generator<
|
|
16
|
+
export declare function listenForCartServiceResponse(partnerInteractionService: PartnerInteractionService): Generator<PutEffect | CancelledEffect | ChannelTakeEffect<CartItemResponse['payload']>, void, CartItemResponse['payload']>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { PluginCatalogItem, UpsellItem } from '../../../../libraries/domain/src/models';
|
|
2
2
|
import { InstantPurchase } from '@rokt/partner-integration';
|
|
3
|
-
import { FulfillmentDetailsState } from '../models';
|
|
3
|
+
import { FulfillmentDetailsState, OfferLifecycleEventState } from '../models';
|
|
4
4
|
export type InitiateInstantPurchasePayload = {
|
|
5
5
|
catalogItem: PluginCatalogItem;
|
|
6
6
|
quantity: number;
|
|
@@ -57,4 +57,9 @@ export type SetFulfillmentDetails = {
|
|
|
57
57
|
type: typeof SET_FULFILLMENT_DETAILS;
|
|
58
58
|
payload: FulfillmentDetailsState;
|
|
59
59
|
};
|
|
60
|
+
export declare const SET_OFFER_LIFECYCLE_EVENT = "INSTANT_PURCHASE/SET_OFFER_LIFECYCLE_EVENT";
|
|
61
|
+
export type SetOfferLifecycleEvent = {
|
|
62
|
+
type: typeof SET_OFFER_LIFECYCLE_EVENT;
|
|
63
|
+
payload: OfferLifecycleEventState;
|
|
64
|
+
};
|
|
60
65
|
export type InstantPurchaseActions = InitiateInstantPurchase;
|
|
@@ -17,6 +17,7 @@ export interface DismissInstantPurchaseButtonModel<Children, Predicates> {
|
|
|
17
17
|
a11yLabel?: null | string;
|
|
18
18
|
styles?: null | LayoutStyle<DismissInstantPurchaseButtonElements, ConditionalStyleTransition<DismissInstantPurchaseButtonTransitions, Predicates>>;
|
|
19
19
|
children: Children[];
|
|
20
|
+
emitInstantPurchaseDismissalRdnEvent?: boolean;
|
|
20
21
|
}
|
|
21
22
|
export interface DismissInstantPurchaseButtonProps {
|
|
22
23
|
/**
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
import { RequestFulfillmentDetails
|
|
1
|
+
import { RequestFulfillmentDetails } from '../../../../../libraries/domain/src/models';
|
|
2
|
+
import { OfferLifecycleCompletePayload, OfferLifecycleDismissedPayload } from '../../../../../libraries/domain/src/behaviors';
|
|
2
3
|
export type FulfillmentDetailsState = Partial<RequestFulfillmentDetails> | null;
|
|
3
|
-
export type
|
|
4
|
+
export type OfferLifecycleEventState = OfferLifecycleDismissedPayload | OfferLifecycleCompletePayload | null;
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { GlobalActions } from '../../../../libraries/domain/src/behaviors';
|
|
2
2
|
import { ChildLayoutActions, childLayoutsReducer, ChildLayoutsState, StaticData, staticDataReducer, DynamicData, dynamicDataReducer } from '@rokt/module-utils';
|
|
3
|
-
import { CatalogSelectionState, FulfillmentDetailsState } from '../models';
|
|
3
|
+
import { CatalogSelectionState, FulfillmentDetailsState, OfferLifecycleEventState } from '../models';
|
|
4
4
|
export type AppState = {
|
|
5
5
|
staticData: StaticData;
|
|
6
6
|
selectedItem: CatalogSelectionState;
|
|
7
7
|
dynamicData: DynamicData;
|
|
8
8
|
childLayouts: ChildLayoutsState;
|
|
9
9
|
fulfillmentDetails: FulfillmentDetailsState;
|
|
10
|
+
offerLifecycleEvent: OfferLifecycleEventState;
|
|
10
11
|
};
|
|
11
12
|
export type StateActions = GlobalActions | ChildLayoutActions;
|
|
12
13
|
export declare const appReducers: {
|
|
@@ -15,5 +16,6 @@ export declare const appReducers: {
|
|
|
15
16
|
dynamicData: typeof dynamicDataReducer;
|
|
16
17
|
childLayouts: typeof childLayoutsReducer;
|
|
17
18
|
fulfillmentDetails: (state: FulfillmentDetailsState | undefined, action: import("redux").AnyAction) => FulfillmentDetailsState;
|
|
19
|
+
offerLifecycleEvent: (state: OfferLifecycleEventState | undefined, action: import("redux").AnyAction) => OfferLifecycleEventState;
|
|
18
20
|
};
|
|
19
21
|
export declare function makeAppInitialState(data?: Partial<AppState>): AppState;
|
package/dist/modules/instant-purchase/src/reducers/instant-purchase/offer-lifecycle-event/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './reducer';
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { AnyAction } from '@reduxjs/toolkit';
|
|
2
|
+
import { OfferLifecycleEventState } from '../../../models';
|
|
3
|
+
export declare function makeInitialOfferLifecycleEventState(): OfferLifecycleEventState;
|
|
4
|
+
export declare const offerLifecycleEventReducer: (state: OfferLifecycleEventState | undefined, action: AnyAction) => OfferLifecycleEventState;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { SelectEffect, PutEffect, CallEffect } from 'redux-saga/effects';
|
|
2
|
-
import { DismissalReason } from '../../../../../libraries/domain/src/behaviors';
|
|
2
|
+
import { DismissalReason, OfferLifecycleDismissedPayload, OfferLifecycleCompletePayload } from '../../../../../libraries/domain/src/behaviors';
|
|
3
3
|
import { InstantPurchaseWsdkPayload, Log, PluginCartItem, PluginCatalogItem } from '../../../../../libraries/domain/src/models';
|
|
4
4
|
import { GlobalGateway } from '../../../../../libraries/module-connector/src/main';
|
|
5
5
|
import { StaticData } from '@rokt/module-utils';
|
|
@@ -10,6 +10,9 @@ export declare const INSTANT_PURCHASE_RESPONSE_TTL = 60000;
|
|
|
10
10
|
export declare function processSelectOnlyCatalogItem(): Generator<SelectEffect | PutEffect, void, AppState | undefined>;
|
|
11
11
|
export declare function processSelectCatalogItem(action: TriggerSelectItemAction): Generator<PutEffect, void, PluginCatalogItem | undefined>;
|
|
12
12
|
export declare function processInstantPurchaseCartItem(gateway: GlobalGateway, logger: (log: Log) => void, action: InitiateInstantPurchase): Generator<CallEffect<void> | SelectEffect | import("redux-saga/effects").ForkEffect<void> | PutEffect<{
|
|
13
|
+
type: string;
|
|
14
|
+
payload: OfferLifecycleDismissedPayload | OfferLifecycleCompletePayload;
|
|
15
|
+
}> | PutEffect<{
|
|
13
16
|
type: string;
|
|
14
17
|
payload: {
|
|
15
18
|
key: string;
|
|
@@ -44,6 +47,9 @@ export declare function processInstantPurchaseCartItem(gateway: GlobalGateway, l
|
|
|
44
47
|
}>, void, AppState | undefined>;
|
|
45
48
|
export declare function handleInstantPurchasePartnerResponse(logger: (log: Log) => void, action: InstantPurchasePartnerResponse): Generator<SelectEffect | PutEffect | CallEffect, void, StaticData | undefined>;
|
|
46
49
|
export declare function handleInstantPurchaseWsdkResponse(action: InstantPurchaseWsdkResponse): Generator<PutEffect<{
|
|
50
|
+
type: string;
|
|
51
|
+
payload: OfferLifecycleDismissedPayload | OfferLifecycleCompletePayload;
|
|
52
|
+
}> | PutEffect<{
|
|
47
53
|
type: string;
|
|
48
54
|
payload: {
|
|
49
55
|
key: string;
|
|
@@ -68,6 +74,9 @@ export declare function initiatePartnerResponseListening(gateway: GlobalGateway,
|
|
|
68
74
|
}>;
|
|
69
75
|
/** Visible for testing */
|
|
70
76
|
export declare function initiateWsdkResponseListening(gateway: GlobalGateway, logger: (log: Log) => void): Generator<CallEffect<void> | PutEffect<{
|
|
77
|
+
type: string;
|
|
78
|
+
payload: OfferLifecycleDismissedPayload | OfferLifecycleCompletePayload;
|
|
79
|
+
}> | PutEffect<{
|
|
71
80
|
type: string;
|
|
72
81
|
payload: {
|
|
73
82
|
key: string;
|