@spiffcommerce/core 0.10.203 → 0.10.205
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/main.js +7 -2
- package/dist/module.js +8 -3
- package/dist/types.d.ts +22 -0
- package/package.json +1 -1
package/dist/types.d.ts
CHANGED
|
@@ -581,6 +581,9 @@ export interface WorkflowManager {
|
|
|
581
581
|
getInformationResults(): InformationResult[];
|
|
582
582
|
getServer(): ServerService;
|
|
583
583
|
getTransaction: () => Transaction;
|
|
584
|
+
setTransactionCustomerDetails: (details: {
|
|
585
|
+
email: string;
|
|
586
|
+
}) => void;
|
|
584
587
|
getWorkflow: () => _Workflow1;
|
|
585
588
|
getWorkflowSelections: () => WorkflowSelections;
|
|
586
589
|
getProduct: () => Product;
|
|
@@ -867,6 +870,13 @@ interface Product {
|
|
|
867
870
|
* displayed to customers while the 3D preview is loading.
|
|
868
871
|
*/
|
|
869
872
|
preloadImageUrl?: string;
|
|
873
|
+
/**
|
|
874
|
+
* When set the store owner has configured this product to prompt for
|
|
875
|
+
* customer details. In hosted experience, we'll offer to collect this information from the customer. In
|
|
876
|
+
* bespoke UIs created using the Core SDK you will need to check this flag and request the data accordingly.
|
|
877
|
+
* See attachCustomerDetails on the WorkflowExperience for how to supply us with the details you collect.
|
|
878
|
+
*/
|
|
879
|
+
promptForCustomerDetails?: boolean;
|
|
870
880
|
}
|
|
871
881
|
interface ColorOption {
|
|
872
882
|
id?: string;
|
|
@@ -1543,6 +1553,17 @@ export interface WorkflowExperience {
|
|
|
1543
1553
|
* @param scene The scene you want the steps for.
|
|
1544
1554
|
*/
|
|
1545
1555
|
getStepsByScene(scene: StepGroup): StepHandle<_AnyStepData1>[];
|
|
1556
|
+
/**
|
|
1557
|
+
* Attach specific details about the customer to the experience. This is useful for things like retargeting. Currently only
|
|
1558
|
+
* email is supported. From SpiffCommerce hosted experiences these details will be attached whenever the customer has provided & given permission.
|
|
1559
|
+
* @param details The new customer details. Only email is supported.
|
|
1560
|
+
*/
|
|
1561
|
+
attachCustomerDetails(details: {
|
|
1562
|
+
/**
|
|
1563
|
+
* An email used for things like sending a design to the user.
|
|
1564
|
+
*/
|
|
1565
|
+
email: string;
|
|
1566
|
+
}): Promise<void>;
|
|
1546
1567
|
/**
|
|
1547
1568
|
* Attaches a listener to the scenes on a workflow experience. The scenes returned are a subset of the scenes configured in the
|
|
1548
1569
|
* workflow and are based on the current state of the experience. This is useful for building a navigation menu.
|
|
@@ -1685,6 +1706,7 @@ export class MockWorkflowManager implements WorkflowManager {
|
|
|
1685
1706
|
getTransaction(): {
|
|
1686
1707
|
id: string;
|
|
1687
1708
|
};
|
|
1709
|
+
setTransactionCustomerDetails(): void;
|
|
1688
1710
|
getWorkflow(): {
|
|
1689
1711
|
id: string;
|
|
1690
1712
|
name: string;
|