@rokt/dcui-orchestrator 0.2.1-rc.2 → 0.2.1-rc.4
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 +21 -21
- package/dist/index.js +21 -21
- package/dist/libraries/domain/src/behaviors/offer-engagement.d.ts +7 -1
- package/dist/libraries/domain/src/models/plugin/plugin-catalog-item.d.ts +4 -0
- package/dist/libraries/domain/src/models/plugin/plugin-creative-response-option.d.ts +5 -1
- package/dist/libraries/domain/src/models/plugin/plugin-signal-type.d.ts +2 -1
- package/dist/libraries/domain/src/models/signals.d.ts +12 -2
- package/dist/libraries/orchestrator/src/sagas/offer-engagement/sagas.d.ts +1 -1
- package/dist/libraries/plugin-utils/src/translate-config.d.ts +2 -2
- package/dist/modules/instant-purchase/src/components/dismiss-instant-purchase-button/dismiss-instant-purchase-button.d.ts +64 -0
- package/dist/modules/standard-marketing/src/components/catalog-response-button/catalog-response-button.d.ts +43 -0
- package/dist/modules/standard-marketing/src/components/catalog-response-button/factory.d.ts +2 -0
- package/package.json +1 -1
|
@@ -19,13 +19,19 @@ export interface OfferEngagementUrlPayload extends PluginCreativeUrlResponseOpti
|
|
|
19
19
|
referralCreativeID?: string;
|
|
20
20
|
creativeInstanceGuid?: string;
|
|
21
21
|
}
|
|
22
|
+
export interface OfferEngagementProductItemResponsePayload extends OfferEngagementUrlPayload {
|
|
23
|
+
catalogItemId: string;
|
|
24
|
+
productSku: string;
|
|
25
|
+
catalogId: string;
|
|
26
|
+
}
|
|
22
27
|
export type OfferEngagementCaptureOnlyPayload = PluginCreativeCaptureOnlyResponseOption;
|
|
23
28
|
export type OfferEngagementExternalPayload = PluginCreativeExternalResponseOption;
|
|
24
|
-
export type OfferEngagementPayload = OfferEngagementFulfillmentPayload | OfferEngagementUrlPayload | OfferEngagementCaptureOnlyPayload | OfferEngagementExternalPayload;
|
|
29
|
+
export type OfferEngagementPayload = OfferEngagementFulfillmentPayload | OfferEngagementUrlPayload | OfferEngagementCaptureOnlyPayload | OfferEngagementExternalPayload | OfferEngagementProductItemResponsePayload;
|
|
25
30
|
export declare function isFulfillmentPayload(value: unknown): value is OfferEngagementFulfillmentPayload;
|
|
26
31
|
export declare function isExternalPayload(value: unknown): value is OfferEngagementExternalPayload;
|
|
27
32
|
export declare function isUrlPayload(value: unknown): value is OfferEngagementUrlPayload;
|
|
28
33
|
export declare function isCaptureOnlyPayload(value: unknown): value is OfferEngagementCaptureOnlyPayload;
|
|
34
|
+
export declare function isProductItemResponsePayload(value: unknown): value is OfferEngagementProductItemResponsePayload;
|
|
29
35
|
export declare function isRealTimeFulfillmentReferral(response: OfferEngagementPayload | (OfferEngagementPayload & {
|
|
30
36
|
offerPositionIndex: number;
|
|
31
37
|
})): response is OfferEngagementPayload & {
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { PluginCreativeUrlResponseOption } from './plugin-creative-response-option';
|
|
1
2
|
import { PluginImage } from './plugin-image';
|
|
2
3
|
export interface PluginCatalogItem {
|
|
3
4
|
instanceGuid: string;
|
|
@@ -9,6 +10,7 @@ export interface PluginCatalogItem {
|
|
|
9
10
|
description: string;
|
|
10
11
|
disclaimer?: string;
|
|
11
12
|
images?: Record<string, PluginImage>;
|
|
13
|
+
responseOptionsMap?: Record<string, PluginCreativeUrlResponseOption>;
|
|
12
14
|
priceFormatted: string;
|
|
13
15
|
price: number;
|
|
14
16
|
providerData?: string;
|
|
@@ -22,6 +24,8 @@ export interface PluginCatalogItem {
|
|
|
22
24
|
positiveResponseText: string;
|
|
23
25
|
negativeResponseText: string;
|
|
24
26
|
url?: string;
|
|
27
|
+
productSku?: string;
|
|
28
|
+
catalogId?: string;
|
|
25
29
|
}
|
|
26
30
|
export interface PluginCatalogItemImage {
|
|
27
31
|
url: string;
|
|
@@ -2,7 +2,7 @@ import { PluginConversionType } from './plugin-conversion-type';
|
|
|
2
2
|
import { PluginCreativeResponseActionType } from './plugin-creative-response-action-type';
|
|
3
3
|
import { PluginSignalType } from './plugin-signal-type';
|
|
4
4
|
import { PluginUrlBehavior } from './plugin-url-behavior';
|
|
5
|
-
export type PluginCreativeResponseOption = PluginCreativeFulfillmentResponseOption | PluginCreativeUrlResponseOption | PluginCreativeCaptureOnlyResponseOption | PluginCreativeExternalResponseOption;
|
|
5
|
+
export type PluginCreativeResponseOption = PluginCreativeFulfillmentResponseOption | PluginCreativeUrlResponseOption | PluginCreativeCaptureOnlyResponseOption | PluginCreativeExternalResponseOption | PluginCatalogItemUrlResponseOption;
|
|
6
6
|
export interface PluginCreativeFulfillmentResponseOption {
|
|
7
7
|
id: string;
|
|
8
8
|
action: PluginCreativeResponseActionType.Fulfillment;
|
|
@@ -46,6 +46,10 @@ export interface PluginCreativeCaptureOnlyResponseOption {
|
|
|
46
46
|
urlBehavior?: PluginUrlBehavior;
|
|
47
47
|
creativeInstanceGuid?: string;
|
|
48
48
|
}
|
|
49
|
+
export interface PluginCatalogItemUrlResponseOption extends PluginCreativeUrlResponseOption {
|
|
50
|
+
catalogItemId: string;
|
|
51
|
+
externalId: string;
|
|
52
|
+
}
|
|
49
53
|
export interface PluginCreativeExternalResponseOption {
|
|
50
54
|
id: string;
|
|
51
55
|
action: PluginCreativeResponseActionType.External;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export declare const enum PluginSignalType {
|
|
2
2
|
SignalResponse = "SignalResponse",
|
|
3
3
|
SignalGatedResponse = "SignalGatedResponse",
|
|
4
|
-
SignalSecondaryResponse = "SignalSecondaryResponse"
|
|
4
|
+
SignalSecondaryResponse = "SignalSecondaryResponse",
|
|
5
|
+
SignalProductItemResponse = "SignalProductItemResponse"
|
|
5
6
|
}
|
|
@@ -2,7 +2,7 @@ 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 | Viewed | Response | Dismissal | UserInteraction | InstantPurchaseDismissal;
|
|
5
|
+
export type CoreSignals = LoadStart | LoadComplete | Activation | Impression | Viewed | Response | Dismissal | UserInteraction | InstantPurchaseDismissal | ProductItemResponse;
|
|
6
6
|
export type ResponseActionPayload = CaptureOnlyAction | UrlAction | ExternalAction | FulfillmentAction;
|
|
7
7
|
export type CartSignals = CartItemInstantPurchaseInitiated | CartItemInstantPurchase | CartItemInstantPurchaseFailure | CartItemQuantitySelected;
|
|
8
8
|
export type UniqueSignal = LoadStart | LoadComplete | Activation | Impression | Viewed | Response | Dismissal | UserInteraction | InstantPurchaseDismissal | CartItemInstantPurchaseInitiated | CartItemInstantPurchase | CartItemInstantPurchaseFailure;
|
|
@@ -10,7 +10,7 @@ export declare enum InitiatedBy {
|
|
|
10
10
|
DCUI = "DCUI",
|
|
11
11
|
Partner = "partner"
|
|
12
12
|
}
|
|
13
|
-
export type RepeatableSignal = CartItemQuantitySelected;
|
|
13
|
+
export type RepeatableSignal = CartItemQuantitySelected | ProductItemResponse;
|
|
14
14
|
export interface LoadComplete {
|
|
15
15
|
name: 'SignalLoadComplete';
|
|
16
16
|
parentGuid: string;
|
|
@@ -89,6 +89,16 @@ export interface UserInteraction {
|
|
|
89
89
|
action: string;
|
|
90
90
|
context: string;
|
|
91
91
|
}
|
|
92
|
+
export interface ProductItemResponse {
|
|
93
|
+
name: 'SignalProductItemResponse';
|
|
94
|
+
parentGuid: string;
|
|
95
|
+
objectData: {
|
|
96
|
+
catalogItemId: string;
|
|
97
|
+
productSku: string;
|
|
98
|
+
catalogId: string;
|
|
99
|
+
accountId: string;
|
|
100
|
+
};
|
|
101
|
+
}
|
|
92
102
|
export interface CaptureOnlyAction {
|
|
93
103
|
name: PluginCreativeResponseActionType.CaptureOnly;
|
|
94
104
|
creativeInstanceGuid?: string;
|
|
@@ -6,7 +6,7 @@ import { ContextService, PartnerInteractionService } from '../../../../plugin-ut
|
|
|
6
6
|
import { WindowRef } from '../../../../layout-renderer-utils/src/index';
|
|
7
7
|
type NextValues = WindowRef | CallEffect | null | undefined;
|
|
8
8
|
type OfferCompletionResult = 'SUCCESS' | 'UNSPECIFIED' | 'ERROR' | 'EXPLICIT_DISMISSAL' | 'IMPLICIT_DISMISSAL' | 'END';
|
|
9
|
-
declare const handleUrlResponse: (args_0: PluginCreativeResponseOption, args_1: ContextService, args_2: import("@rokt/plugin").SenderReceiver) => Generator<TakeEffect | NextValues | PutEffect<RaiseSignal | ClosePlugin | ReportError>, OfferCompletionResult, NextValues>;
|
|
9
|
+
declare const handleUrlResponse: (args_0: PluginCreativeResponseOption, args_1: ContextService, args_2: import("@rokt/plugin").SenderReceiver, args_3: OfferEngagement) => Generator<TakeEffect | NextValues | PutEffect<RaiseSignal | ClosePlugin | ReportError>, OfferCompletionResult, NextValues>;
|
|
10
10
|
export declare function processOfferResponse(dependencies: {
|
|
11
11
|
context: ContextService;
|
|
12
12
|
partner: PartnerInteractionService;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { PluginCreative, PluginCreativeResponseOption, PluginCreativeResponseActionType, PluginSignalType, PluginUrlBehavior, LayoutCreative, LayoutCreativeResponseOption, PluginConversionType } from '../../domain/src/models';
|
|
1
|
+
import { PluginCreative, PluginCreativeResponseOption, PluginCreativeResponseActionType, PluginSignalType, PluginUrlBehavior, LayoutCreative, LayoutCreativeResponseOption, PluginConversionType, PluginCatalogItemUrlResponseOption } from '../../domain/src/models';
|
|
2
2
|
export declare const CREATIVE_RESPONSE_ENUM_MAP: {
|
|
3
3
|
action: {
|
|
4
4
|
CaptureOnly: PluginCreativeResponseActionType;
|
|
@@ -24,6 +24,6 @@ export declare const CREATIVE_RESPONSE_ENUM_MAP: {
|
|
|
24
24
|
};
|
|
25
25
|
export declare function makeTranslateErrorLogs(configurationName: string, instanceGuid: string, isChildLayout?: boolean): Error;
|
|
26
26
|
export declare function translateLayoutCreative(layoutCreative: LayoutCreative, isChildLayout?: boolean): PluginCreative;
|
|
27
|
-
export declare function translateLayoutResponse(response: LayoutCreativeResponseOption): PluginCreativeResponseOption
|
|
27
|
+
export declare function translateLayoutResponse(response: LayoutCreativeResponseOption): Exclude<PluginCreativeResponseOption, PluginCatalogItemUrlResponseOption>;
|
|
28
28
|
export type ParseJsonCategory = 'LayoutRootLayoutSchema' | 'LayoutSlotLayoutVariant' | 'ChildLayoutRootSchema';
|
|
29
29
|
export declare function parseLayoutJsonAs<T>(json: string, category: ParseJsonCategory, instanceGuid: string): T;
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { BackgroundStylingProperties, BorderStylingProperties, ConditionalStyleTransition, ContainerStylingProperties, DimensionStylingProperties, FlexChildStylingProperties, LayoutStyle, NonInteractableChildren, SpacingStylingProperties, StatelessStylingBlock, WhenPredicate } from '@rokt/dcui-layout-schema';
|
|
2
|
+
export interface DismissInstantPurchaseButtonStyles {
|
|
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 DismissInstantPurchaseButtonTransitions {
|
|
11
|
+
own?: null | DismissInstantPurchaseButtonStyles;
|
|
12
|
+
}
|
|
13
|
+
export interface DismissInstantPurchaseButtonElements {
|
|
14
|
+
own: StatelessStylingBlock<DismissInstantPurchaseButtonStyles>[];
|
|
15
|
+
}
|
|
16
|
+
export interface DismissInstantPurchaseButtonModel<Children, Predicates> {
|
|
17
|
+
a11yLabel?: null | string;
|
|
18
|
+
styles?: null | LayoutStyle<DismissInstantPurchaseButtonElements, ConditionalStyleTransition<DismissInstantPurchaseButtonTransitions, Predicates>>;
|
|
19
|
+
children: Children[];
|
|
20
|
+
}
|
|
21
|
+
export interface DismissInstantPurchaseButtonProps {
|
|
22
|
+
/**
|
|
23
|
+
* - `a11yLabel`: define a custom accessibility label for a screen reader
|
|
24
|
+
* - `targetStep`: Checkout transaction step to transition to when element is clicked
|
|
25
|
+
* - `children`: it can accept below nodes,
|
|
26
|
+
* * `Row`
|
|
27
|
+
* * `Column`
|
|
28
|
+
* * `ZStack`
|
|
29
|
+
* * `FlowRow`
|
|
30
|
+
* * `BasicText`
|
|
31
|
+
* * `StaticImage`
|
|
32
|
+
* * `StaticIcon`
|
|
33
|
+
* * `DataImage`
|
|
34
|
+
* * `DataIcon`
|
|
35
|
+
* * `When`
|
|
36
|
+
* * `InlineContainer`
|
|
37
|
+
* * `EscapeHatch`
|
|
38
|
+
* - `styles`:
|
|
39
|
+
* * `elements`:
|
|
40
|
+
* - `own`:
|
|
41
|
+
* * `background`
|
|
42
|
+
* * `border`
|
|
43
|
+
* * `container`
|
|
44
|
+
* * `dimension`
|
|
45
|
+
* * `flexChild`
|
|
46
|
+
* * `spacing`
|
|
47
|
+
* * `transitions`:
|
|
48
|
+
* - `type`: 'Conditional'
|
|
49
|
+
* - `transition`:
|
|
50
|
+
* * `predicates`: WhenPredicate[]
|
|
51
|
+
* * `duration`: number
|
|
52
|
+
* * `value`:
|
|
53
|
+
* - `own`:
|
|
54
|
+
* * `container`
|
|
55
|
+
* * `dimension`
|
|
56
|
+
* * `flexChild`
|
|
57
|
+
* * `spacing`
|
|
58
|
+
* * `background`
|
|
59
|
+
* * `border`
|
|
60
|
+
*/
|
|
61
|
+
schema: DismissInstantPurchaseButtonModel<NonInteractableChildren, WhenPredicate>;
|
|
62
|
+
testId?: string;
|
|
63
|
+
}
|
|
64
|
+
export declare function DismissInstantPurchaseButton(props: DismissInstantPurchaseButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { CatalogResponseButtonModel, NonInteractableChildren, WhenPredicate } from '@rokt/dcui-layout-schema';
|
|
2
|
+
export interface CatalogResponseButtonProps {
|
|
3
|
+
/**
|
|
4
|
+
* - `responseKey`: the key of the response option to use.
|
|
5
|
+
* - `children`: it can accept below nodes,
|
|
6
|
+
* * `Row`
|
|
7
|
+
* * `Column`
|
|
8
|
+
* * `ZStack`
|
|
9
|
+
* * `BasicText`
|
|
10
|
+
* * `StaticImage`
|
|
11
|
+
* * `DataImage`
|
|
12
|
+
* * `When`
|
|
13
|
+
* - `styles`:
|
|
14
|
+
* * `elements`:
|
|
15
|
+
* * `own`:
|
|
16
|
+
* - `container`
|
|
17
|
+
* - `dimension`
|
|
18
|
+
* - `flexChild`
|
|
19
|
+
* - `spacing`
|
|
20
|
+
* - `background`
|
|
21
|
+
* - `border`
|
|
22
|
+
* * `transitions`:
|
|
23
|
+
* - `type`: 'Conditional'
|
|
24
|
+
* - `transition`:
|
|
25
|
+
* * `predicates`: WhenPredicate[]
|
|
26
|
+
* * `duration`: number
|
|
27
|
+
* * `value`:
|
|
28
|
+
* * `own`:
|
|
29
|
+
* - `container`
|
|
30
|
+
* - `dimension`
|
|
31
|
+
* - `flexChild`
|
|
32
|
+
* - `spacing`
|
|
33
|
+
* - `background`
|
|
34
|
+
* - `border`
|
|
35
|
+
*/
|
|
36
|
+
schema: CatalogResponseButtonModel<NonInteractableChildren, WhenPredicate>;
|
|
37
|
+
testId?: string;
|
|
38
|
+
}
|
|
39
|
+
/**The CatalogResponse is a button node that generate a Call-to-Action button
|
|
40
|
+
* for performing response actions for catalog items
|
|
41
|
+
* *Where can we use this: __layout variant__*
|
|
42
|
+
*/
|
|
43
|
+
export declare function CatalogResponseButton(props: CatalogResponseButtonProps): import("react/jsx-runtime").JSX.Element | undefined;
|