@rokt/dcui-orchestrator 0.0.4-rc.9 → 0.1.0
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 +23 -23
- package/dist/index.js +23 -23
- package/dist/libraries/dcui-components/src/components/button-state-trigger/button-state-trigger.d.ts +6 -0
- package/dist/libraries/dcui-components/src/components/button-state-trigger/factory.d.ts +2 -0
- package/dist/libraries/dcui-components/src/components/button-state-trigger/index.d.ts +2 -0
- package/dist/libraries/dcui-components/src/contexts/browser-support-context.d.ts +7 -0
- package/dist/libraries/dcui-components/src/contexts/index.d.ts +1 -0
- package/dist/libraries/dcui-components/src/contexts/root-element-context.d.ts +2 -2
- package/dist/libraries/domain/src/behaviors/offer-engagement.d.ts +6 -0
- package/dist/libraries/domain/src/behaviors/send-partner.d.ts +8 -3
- package/dist/libraries/domain/src/models/index.d.ts +1 -0
- package/dist/libraries/domain/src/models/layout/layout-conversion-type.d.ts +2 -1
- package/dist/libraries/domain/src/models/layout/layout-creative-response-action-type.d.ts +1 -1
- package/dist/libraries/domain/src/models/layout/layout-creative-response-option.d.ts +3 -1
- package/dist/libraries/domain/src/models/partner-event.d.ts +1 -1
- package/dist/libraries/domain/src/models/plugin/plugin-conversion-type.d.ts +2 -1
- package/dist/libraries/domain/src/models/plugin/plugin-creative-response-action-type.d.ts +1 -1
- package/dist/libraries/domain/src/models/plugin/plugin-creative-response-option.d.ts +7 -1
- package/dist/libraries/domain/src/models/purchase.d.ts +37 -0
- package/dist/libraries/domain/src/models/signals.d.ts +8 -2
- package/dist/libraries/module-connector/src/models/module-attributes.d.ts +1 -0
- package/dist/libraries/module-connector/src/models/module-connector-builder.d.ts +1 -0
- package/dist/libraries/orchestrator/src/components/slot/slot.d.ts +1 -0
- package/dist/libraries/orchestrator/src/models/state/global-offer-data-state.d.ts +1 -6
- package/dist/libraries/orchestrator/src/selectors/global-offer-data-state/selectors.d.ts +3 -0
- package/dist/libraries/plugin-utils/src/error-codes.d.ts +1 -0
- package/dist/libraries/plugin-utils/src/translate-config.d.ts +2 -1
- package/dist/modules/add-to-cart/src/models/state/appSettingsOfferState.d.ts +8 -0
- package/dist/modules/add-to-cart/src/models/state/index.d.ts +1 -0
- package/dist/modules/add-to-cart/src/reducers/cart/index.d.ts +1 -0
- package/dist/modules/add-to-cart/src/reducers/cart/reducer.d.ts +2 -2
- package/dist/modules/add-to-cart/src/reducers/index.d.ts +1 -0
- package/dist/modules/instant-purchase/src/actions/catalog-selection.d.ts +7 -2
- package/dist/modules/instant-purchase/src/actions/checkout-lifecycle.d.ts +21 -0
- package/dist/modules/instant-purchase/src/actions/index.d.ts +1 -0
- package/dist/modules/instant-purchase/src/actions/instant-purchase.d.ts +34 -1
- package/dist/modules/instant-purchase/src/channels/channel.d.ts +7 -1
- package/dist/modules/instant-purchase/src/components/catalog-combined-collection/catalog-combined-collection.d.ts +1 -19
- package/dist/modules/instant-purchase/src/components/catalog-combined-collection/factory.d.ts +2 -0
- package/dist/modules/instant-purchase/src/components/catalog-combined-collection/index.d.ts +2 -0
- package/dist/modules/instant-purchase/src/components/{image-gallery/image-gallery.d.ts → catalog-image-gallery/catalog-image-gallery.d.ts} +10 -11
- package/dist/modules/instant-purchase/src/components/checkout-state-button-trigger/checkout-state-button-trigger.d.ts +68 -0
- package/dist/modules/instant-purchase/src/components/loading-spinner/loading-spinner.d.ts +36 -0
- package/dist/modules/instant-purchase/src/components/offer-lifecycle-timer/offer-lifecycle-timer.d.ts +24 -0
- package/dist/modules/instant-purchase/src/reducers/index.d.ts +3 -1
- package/dist/modules/instant-purchase/src/sagas/checkout-lifecycle/index.d.ts +1 -0
- package/dist/modules/instant-purchase/src/sagas/checkout-lifecycle/sagas.d.ts +4 -0
- package/dist/modules/instant-purchase/src/sagas/error-codes.d.ts +8 -3
- package/dist/modules/instant-purchase/src/sagas/index.d.ts +2 -1
- package/dist/modules/instant-purchase/src/sagas/instant-purchase/sagas.d.ts +44 -5
- package/dist/modules/instant-purchase/src/selectors/catalogItems/index.d.ts +1 -0
- package/dist/modules/instant-purchase/src/selectors/catalogItems/selectors.d.ts +4 -0
- package/dist/modules/instant-purchase/src/selectors/index.d.ts +1 -0
- package/dist/modules/standard-marketing/src/sagas/offer-engagement/sagas.d.ts +1 -1
- package/node_modules/@rokt/dcui-layout-schema/dist/schema.d.ts +190 -7
- package/node_modules/@rokt/dcui-layout-schema/dist/schema.js +1 -1
- package/node_modules/@rokt/dcui-layout-schema/dist/tsconfig.tsbuildinfo +1 -1
- package/node_modules/@rokt/dcui-layout-schema/package.json +1 -1
- package/node_modules/@rokt/dcui-layout-schema/v0.1/index.js +1 -1
- package/node_modules/@rokt/dcui-layout-schema/v0.10/index.js +1 -1
- package/node_modules/@rokt/dcui-layout-schema/v0.11/index.js +1 -1
- package/node_modules/@rokt/dcui-layout-schema/v0.12/index.js +1 -1
- package/node_modules/@rokt/dcui-layout-schema/v0.13/index.js +1 -1
- package/node_modules/@rokt/dcui-layout-schema/v0.14/index.js +1 -1
- package/node_modules/@rokt/dcui-layout-schema/v0.15/index.js +1 -1
- package/node_modules/@rokt/dcui-layout-schema/v0.16/index.js +1 -1
- package/node_modules/@rokt/dcui-layout-schema/v0.17/index.js +1 -1
- package/node_modules/@rokt/dcui-layout-schema/v0.18/index.js +1 -1
- package/node_modules/@rokt/dcui-layout-schema/v0.19/index.js +1 -1
- package/node_modules/@rokt/dcui-layout-schema/v0.2/index.js +1 -1
- package/node_modules/@rokt/dcui-layout-schema/v0.20/index.js +1 -1
- package/node_modules/@rokt/dcui-layout-schema/v0.21/index.js +1 -1
- package/node_modules/@rokt/dcui-layout-schema/v0.22/index.js +1 -1
- package/node_modules/@rokt/dcui-layout-schema/v0.23/index.js +1 -1
- package/node_modules/@rokt/dcui-layout-schema/v0.3/index.js +1 -1
- package/node_modules/@rokt/dcui-layout-schema/v0.4/index.js +1 -1
- package/node_modules/@rokt/dcui-layout-schema/v0.5/index.js +1 -1
- package/node_modules/@rokt/dcui-layout-schema/v0.6/index.js +1 -1
- package/node_modules/@rokt/dcui-layout-schema/v0.7/index.js +1 -1
- package/node_modules/@rokt/dcui-layout-schema/v0.8/index.js +1 -1
- package/node_modules/@rokt/dcui-layout-schema/v0.9/index.js +1 -1
- package/node_modules/@rokt/dcui-layout-schema/v1.0/index.js +1 -1
- package/node_modules/@rokt/dcui-layout-schema/v1.1/index.js +1 -1
- package/node_modules/@rokt/dcui-layout-schema/v1.2/index.js +1 -1
- package/node_modules/@rokt/dcui-layout-schema/v1.3/index.js +1 -1
- package/node_modules/@rokt/dcui-layout-schema/v1.4/index.js +1 -1
- package/node_modules/@rokt/dcui-layout-schema/v1.5/index.js +1 -1
- package/node_modules/@rokt/dcui-layout-schema/v1.6/index.js +1 -1
- package/node_modules/@rokt/dcui-layout-schema/v1.7/index.d.ts +2218 -0
- package/node_modules/@rokt/dcui-layout-schema/v1.7/index.js +4 -0
- package/package.json +2 -2
- package/dist/modules/instant-purchase/src/components/button-state-trigger/button-state-trigger.d.ts +0 -9
- package/dist/modules/instant-purchase/src/hooks/index.d.ts +0 -1
- package/dist/modules/instant-purchase/src/hooks/use-image-mapper.d.ts +0 -2
package/dist/libraries/dcui-components/src/components/button-state-trigger/button-state-trigger.d.ts
ADDED
|
@@ -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,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;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const RootElementContext: import("react").Context<
|
|
2
|
-
export declare const useRootElementContext: () =>
|
|
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';
|
|
@@ -10,6 +10,7 @@ export type OutboundRealtimeOfferFulfillmentReferralEventPayload = {
|
|
|
10
10
|
rclid: string;
|
|
11
11
|
accountID: string;
|
|
12
12
|
referralCreativeID: string;
|
|
13
|
+
referralOnly?: boolean;
|
|
13
14
|
};
|
|
14
15
|
};
|
|
15
16
|
export type OutboundRealtimeOfferFulfillmentConversionEventPayload = {
|
|
@@ -36,10 +37,14 @@ export type OutboundUpsellCreativeSentEventPayload = {
|
|
|
36
37
|
description: string;
|
|
37
38
|
};
|
|
38
39
|
};
|
|
39
|
-
export type
|
|
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 : {
|
|
40
45
|
name: EventType;
|
|
41
46
|
};
|
|
42
47
|
export type SendPartner<EventType extends OutboundPartnerEvent> = {
|
|
43
48
|
type: typeof SEND_PARTNER;
|
|
44
|
-
payload: OutboundPartnerEventPayload<EventType> | OutboundUpdateCartEventPayload | OutboundInstantPurchaseEventPayload | OutboundUpsellCreativeSentEventPayload;
|
|
49
|
+
payload: OutboundPartnerEventPayload<EventType> | OutboundUpdateCartEventPayload | OutboundInstantPurchaseEventPayload | OutboundUpsellCreativeSentEventPayload | OutboundInstantPurchaseWsdkEventPayload;
|
|
45
50
|
};
|
|
@@ -13,7 +13,9 @@ export interface LayoutCreativeResponseOption {
|
|
|
13
13
|
isPositive: boolean;
|
|
14
14
|
url?: string;
|
|
15
15
|
urlBehavior?: LayoutUrlBehavior;
|
|
16
|
-
|
|
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_CONVERSION' | '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;
|
|
@@ -52,7 +52,9 @@ export interface PluginCreativeExternalResponseOption {
|
|
|
52
52
|
instanceGuid: string;
|
|
53
53
|
signalType: PluginSignalType;
|
|
54
54
|
isPositive: boolean;
|
|
55
|
-
|
|
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;
|
|
@@ -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;
|
|
@@ -4,7 +4,7 @@ export declare const CREATIVE_RESPONSE_ENUM_MAP: {
|
|
|
4
4
|
CaptureOnly: PluginCreativeResponseActionType;
|
|
5
5
|
Url: PluginCreativeResponseActionType;
|
|
6
6
|
Fulfillment: PluginCreativeResponseActionType;
|
|
7
|
-
|
|
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;
|
|
@@ -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;
|
|
@@ -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
|
|
11
|
+
export type SetSelectedItemAction = {
|
|
7
12
|
type: typeof SET_SELECTED_ITEM;
|
|
8
13
|
payload: SetSelectedItemPayload;
|
|
9
14
|
};
|
|
10
|
-
export type CatalogSelectionActions =
|
|
15
|
+
export type CatalogSelectionActions = SetSelectedItemAction | TriggerSelectItemAction;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { CompletionReason, DismissalReason } from '../../../../libraries/domain/src/behaviors';
|
|
2
|
+
export declare const CHECKOUT_LIFECYCLE = "CHECKOUT_LIFECYCLE";
|
|
3
|
+
export interface CheckoutLifecycle {
|
|
4
|
+
type: typeof CHECKOUT_LIFECYCLE;
|
|
5
|
+
payload: CheckoutLifecyclePayload;
|
|
6
|
+
}
|
|
7
|
+
export type CloseOfferData = {
|
|
8
|
+
event: 'Completed';
|
|
9
|
+
reason: CompletionReason;
|
|
10
|
+
} | {
|
|
11
|
+
event: 'Dismissed';
|
|
12
|
+
reason: DismissalReason;
|
|
13
|
+
};
|
|
14
|
+
export type CheckoutStateData = CloseOfferData;
|
|
15
|
+
export type CheckoutLifecyclePayload = {
|
|
16
|
+
event: 'Checkout';
|
|
17
|
+
targetStep: CheckoutStep;
|
|
18
|
+
offerPositionIndex: number;
|
|
19
|
+
data?: CheckoutStateData;
|
|
20
|
+
};
|
|
21
|
+
export type CheckoutStep = 'ViewOffer' | 'ViewTransactionDetails' | 'EditPayment' | 'EditShipping' | 'EditPaymentAndShipping' | 'CostBreakdown' | 'Confirmation' | 'CloseOffer';
|
|
@@ -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
|
|
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 {
|
|
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`:
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BackgroundStylingProperties, BasicStateStylingBlock, BorderStylingProperties, ConditionalStyleTransition, ContainerStylingProperties, DataImageStyles, DimensionStylingProperties, FlexChildStylingProperties, LayoutStyle, RowStyle, SpacingStylingProperties, WhenPredicate } from '@rokt/dcui-layout-schema';
|
|
2
|
-
interface
|
|
2
|
+
interface CatalogImageGalleryStyles {
|
|
3
3
|
container?: null | ContainerStylingProperties;
|
|
4
4
|
background?: null | BackgroundStylingProperties;
|
|
5
5
|
border?: null | BorderStylingProperties;
|
|
@@ -7,22 +7,21 @@ interface ImageGalleryStyles {
|
|
|
7
7
|
flexChild?: null | FlexChildStylingProperties;
|
|
8
8
|
spacing?: null | SpacingStylingProperties;
|
|
9
9
|
}
|
|
10
|
-
interface
|
|
11
|
-
own: BasicStateStylingBlock<
|
|
10
|
+
interface CatalogImageGalleryElements {
|
|
11
|
+
own: BasicStateStylingBlock<CatalogImageGalleryStyles>[];
|
|
12
12
|
mainImage: BasicStateStylingBlock<DataImageStyles>[];
|
|
13
13
|
thumbnailImage: BasicStateStylingBlock<DataImageStyles>[];
|
|
14
14
|
thumbnailList: BasicStateStylingBlock<RowStyle>[];
|
|
15
15
|
}
|
|
16
|
-
interface
|
|
17
|
-
own?: null |
|
|
16
|
+
interface CatalogImageGalleryTransitions {
|
|
17
|
+
own?: null | CatalogImageGalleryStyles;
|
|
18
18
|
}
|
|
19
|
-
export interface
|
|
20
|
-
styles?: null | LayoutStyle<
|
|
21
|
-
imageKeys: Array<string>;
|
|
19
|
+
export interface CatalogImageGalleryModel<Predicates> {
|
|
20
|
+
styles?: null | LayoutStyle<CatalogImageGalleryElements, ConditionalStyleTransition<CatalogImageGalleryTransitions, Predicates>>;
|
|
22
21
|
}
|
|
23
|
-
export interface
|
|
24
|
-
schema:
|
|
22
|
+
export interface CatalogImageGalleryProps {
|
|
23
|
+
schema: CatalogImageGalleryModel<WhenPredicate>;
|
|
25
24
|
testId?: string;
|
|
26
25
|
}
|
|
27
|
-
export declare function
|
|
26
|
+
export declare function CatalogImageGallery(props: CatalogImageGalleryProps): import("react/jsx-runtime").JSX.Element | null;
|
|
28
27
|
export {};
|
|
@@ -0,0 +1,68 @@
|
|
|
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
|
+
import type { CheckoutStateData } from '../../actions/checkout-lifecycle';
|
|
4
|
+
export interface CheckoutStateButtonTriggerStyles {
|
|
5
|
+
background?: null | BackgroundStylingProperties;
|
|
6
|
+
border?: null | BorderStylingProperties;
|
|
7
|
+
container?: null | ContainerStylingProperties;
|
|
8
|
+
dimension?: null | DimensionStylingProperties;
|
|
9
|
+
flexChild?: null | FlexChildStylingProperties;
|
|
10
|
+
spacing?: null | SpacingStylingProperties;
|
|
11
|
+
}
|
|
12
|
+
export interface CheckoutStateButtonTriggerTransitions {
|
|
13
|
+
own?: null | CheckoutStateButtonTriggerStyles;
|
|
14
|
+
}
|
|
15
|
+
export interface CheckoutStateButtonTriggerElements {
|
|
16
|
+
own: StatelessStylingBlock<CheckoutStateButtonTriggerStyles>[];
|
|
17
|
+
}
|
|
18
|
+
export interface CheckoutStateButtonTriggerModel<Children, Predicates> {
|
|
19
|
+
a11yLabel?: null | string;
|
|
20
|
+
targetStep: CheckoutStep;
|
|
21
|
+
data?: CheckoutStateData;
|
|
22
|
+
styles?: null | LayoutStyle<CheckoutStateButtonTriggerElements, ConditionalStyleTransition<CheckoutStateButtonTriggerTransitions, Predicates>>;
|
|
23
|
+
children: Children[];
|
|
24
|
+
}
|
|
25
|
+
export interface CheckoutStateButtonTriggerProps {
|
|
26
|
+
/**
|
|
27
|
+
* - `a11yLabel`: define a custom accessibility label for a screen reader
|
|
28
|
+
* - `targetStep`: Checkout transaction step to transition to when element is clicked
|
|
29
|
+
* - `children`: it can accept below nodes,
|
|
30
|
+
* * `Row`
|
|
31
|
+
* * `Column`
|
|
32
|
+
* * `ZStack`
|
|
33
|
+
* * `FlowRow`
|
|
34
|
+
* * `BasicText`
|
|
35
|
+
* * `StaticImage`
|
|
36
|
+
* * `StaticIcon`
|
|
37
|
+
* * `DataImage`
|
|
38
|
+
* * `DataIcon`
|
|
39
|
+
* * `When`
|
|
40
|
+
* * `InlineContainer`
|
|
41
|
+
* * `EscapeHatch`
|
|
42
|
+
* - `styles`:
|
|
43
|
+
* * `elements`:
|
|
44
|
+
* - `own`:
|
|
45
|
+
* * `background`
|
|
46
|
+
* * `border`
|
|
47
|
+
* * `container`
|
|
48
|
+
* * `dimension`
|
|
49
|
+
* * `flexChild`
|
|
50
|
+
* * `spacing`
|
|
51
|
+
* * `transitions`:
|
|
52
|
+
* - `type`: 'Conditional'
|
|
53
|
+
* - `transition`:
|
|
54
|
+
* * `predicates`: WhenPredicate[]
|
|
55
|
+
* * `duration`: number
|
|
56
|
+
* * `value`:
|
|
57
|
+
* - `own`:
|
|
58
|
+
* * `container`
|
|
59
|
+
* * `dimension`
|
|
60
|
+
* * `flexChild`
|
|
61
|
+
* * `spacing`
|
|
62
|
+
* * `background`
|
|
63
|
+
* * `border`
|
|
64
|
+
*/
|
|
65
|
+
schema: CheckoutStateButtonTriggerModel<NonInteractableChildren, WhenPredicate>;
|
|
66
|
+
testId?: string;
|
|
67
|
+
}
|
|
68
|
+
export declare function CheckoutStateButtonTrigger(props: CheckoutStateButtonTriggerProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -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;
|