@spiffcommerce/core 16.0.2-alpha.0 → 16.0.3-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.d.ts +34 -3
- package/dist/index.js +741 -681
- package/dist/index.umd.cjs +80 -80
- package/package.json +3 -2
package/dist/index.d.ts
CHANGED
|
@@ -634,7 +634,7 @@ interface LineItemMetadata {
|
|
|
634
634
|
stepName: string;
|
|
635
635
|
metadata: string;
|
|
636
636
|
}
|
|
637
|
-
interface ProductWorkflow {
|
|
637
|
+
interface ProductWorkflow$1 {
|
|
638
638
|
friendlyName: string;
|
|
639
639
|
id: string;
|
|
640
640
|
present?: boolean;
|
|
@@ -708,7 +708,7 @@ interface Product {
|
|
|
708
708
|
/**
|
|
709
709
|
* Workflows which have been assigned to this product.
|
|
710
710
|
*/
|
|
711
|
-
workflows?: ProductWorkflow[];
|
|
711
|
+
workflows?: ProductWorkflow$1[];
|
|
712
712
|
/**
|
|
713
713
|
* The base price of this product in sub units. Essentially the cost of the
|
|
714
714
|
* product without any customisations applied.
|
|
@@ -1586,6 +1586,10 @@ declare class CollectionProduct {
|
|
|
1586
1586
|
* @returns The integration if found. Throws an error if not found as this data is typically a neccesity.
|
|
1587
1587
|
*/
|
|
1588
1588
|
getIntegrationByType(type: IntegrationType): IntegrationProduct;
|
|
1589
|
+
/**
|
|
1590
|
+
* A helper function for pulling the default workflow.
|
|
1591
|
+
*/
|
|
1592
|
+
getDefaultWorkflow(): ProductWorkflow;
|
|
1589
1593
|
/**
|
|
1590
1594
|
* A list of all integrations this product is connected to.
|
|
1591
1595
|
*/
|
|
@@ -1595,6 +1599,26 @@ declare class CollectionProduct {
|
|
|
1595
1599
|
*/
|
|
1596
1600
|
getResource(): Product;
|
|
1597
1601
|
}
|
|
1602
|
+
/**
|
|
1603
|
+
* Represents a the relationship between a workflow and a product.
|
|
1604
|
+
*/
|
|
1605
|
+
declare class ProductWorkflow {
|
|
1606
|
+
private readonly workflow;
|
|
1607
|
+
constructor(workflow: ProductWorkflow$1);
|
|
1608
|
+
/**
|
|
1609
|
+
* @returns The ID of this workflow, to be used when starting an experience.
|
|
1610
|
+
*/
|
|
1611
|
+
getId(): string;
|
|
1612
|
+
/**
|
|
1613
|
+
* @returns The name of the workflow.
|
|
1614
|
+
*/
|
|
1615
|
+
getName(): string;
|
|
1616
|
+
/**
|
|
1617
|
+
* An image to be used to display this workflow in a UI to the customer.
|
|
1618
|
+
* @returns A resource URL.
|
|
1619
|
+
*/
|
|
1620
|
+
getThumbnail(): string;
|
|
1621
|
+
}
|
|
1598
1622
|
|
|
1599
1623
|
/**
|
|
1600
1624
|
* A bundle serves as a container for a set of workflow experience.
|
|
@@ -1971,6 +1995,13 @@ interface ClientOptions {
|
|
|
1971
1995
|
* authenticate with the SpiffCommerce API.
|
|
1972
1996
|
*/
|
|
1973
1997
|
applicationKey?: string;
|
|
1998
|
+
/**
|
|
1999
|
+
* When set to true, the client will instantiate a service for tracking internal errors. This allows
|
|
2000
|
+
* us to track errors that occur within the client, and improve the experience for our users.
|
|
2001
|
+
*
|
|
2002
|
+
* NOTE: True by default, you may disable if you have privacy requirements.
|
|
2003
|
+
*/
|
|
2004
|
+
internalAnalytics?: boolean;
|
|
1974
2005
|
}
|
|
1975
2006
|
interface GetWorkflowGraphqlAssetsOptions {
|
|
1976
2007
|
metadata?: boolean;
|
|
@@ -2766,4 +2797,4 @@ interface StepAspectValue {
|
|
|
2766
2797
|
declare const stepAspectValuesToDesignInputSteps: (stepAspectValues: StepAspectValue[], workflow: Workflow) => DesignInputStep[];
|
|
2767
2798
|
declare const generateStateFromDesignInputSteps: (designInputSteps: DesignInputStep[], workflow: Workflow, layouts: ILayout[], productOverlayImageUrl?: string) => Promise<LayoutsState>;
|
|
2768
2799
|
|
|
2769
|
-
export { AssetNotFoundError, BulkPriceCalculationStrategy, BulkStepHandle, Bundle, CollectionProduct, ColorOption, ConversionConfiguration, ConversionData, ConversionDataType, ConversionLocation, Customer, CustomerDetailsInput, DesignCreationMessage, DesignCreationProgressUpdate, DesignInputStep, EditedSteps, FlowExecutionNodeResult, FlowExecutionResult, FlowService, FrameService, FrameStep, FrameStepHandle, GetWorkflowOptions, GlobalPropertyHandle, IllustrationStepHandle, InformationMessageType, InformationResult, InformationStepHandle, LayoutNotFoundError, MandatorySteps, MaterialStepHandle, MisconfigurationError, MockWorkflowManager, ModelStepHandle, NodeType, ObjectInput, ObjectInputType, OptionNotFoundError, ParseError, PictureStepHandle, Product, ProductCameraRig, ProductCollection, PromiseQueue, QuestionStepHandle, QueueablePromise, RegionElement, RenderableScene, ResourceNotFoundError, SavedDesign, SelectionStorage, ShapeStepHandle, SilentIllustrationStepData, SpiffCommerceClient, Stakeholder, StakeholderType, StateMutationFunc, StepElements, StepHandle, TextStepHandle, TextStepStorage, Transaction, UnhandledBehaviorError, Variant, VariationRecord, WorkflowExperience, WorkflowExperienceImpl, WorkflowManager, WorkflowMetadata, WorkflowScene, WorkflowSelections, WorkflowStorage, assetService, createDesign, designService, digitalContentStepService, frameStepService, gatherVaryingStepAspects, generateCommands, generateStateFromDesignInputSteps, getBoundedOffsets, getWorkflow, getWorkflows, graphQlManager, illustrationStepService, materialStepService, modelStepService, moduleStepService, optionService, persistenceService, pictureStepService, questionStepService, shapeStepService, shortenUrl, spiffCoreConfiguration, stepAspectValuesToDesignInputSteps, textStepService, toast };
|
|
2800
|
+
export { AssetNotFoundError, BulkPriceCalculationStrategy, BulkStepHandle, Bundle, CollectionProduct, ColorOption, ConversionConfiguration, ConversionData, ConversionDataType, ConversionLocation, Customer, CustomerDetailsInput, DesignCreationMessage, DesignCreationProgressUpdate, DesignInputStep, EditedSteps, FlowExecutionNodeResult, FlowExecutionResult, FlowService, FrameService, FrameStep, FrameStepHandle, GetWorkflowOptions, GlobalPropertyHandle, IllustrationStepHandle, InformationMessageType, InformationResult, InformationStepHandle, LayoutNotFoundError, MandatorySteps, MaterialStepHandle, MisconfigurationError, MockWorkflowManager, ModelStepHandle, NodeType, ObjectInput, ObjectInputType, OptionNotFoundError, ParseError, PictureStepHandle, Product, ProductCameraRig, ProductCollection, ProductWorkflow, PromiseQueue, QuestionStepHandle, QueueablePromise, RegionElement, RenderableScene, ResourceNotFoundError, SavedDesign, SelectionStorage, ShapeStepHandle, SilentIllustrationStepData, SpiffCommerceClient, Stakeholder, StakeholderType, StateMutationFunc, StepElements, StepHandle, TextStepHandle, TextStepStorage, Transaction, UnhandledBehaviorError, Variant, VariationRecord, WorkflowExperience, WorkflowExperienceImpl, WorkflowManager, WorkflowMetadata, WorkflowScene, WorkflowSelections, WorkflowStorage, assetService, createDesign, designService, digitalContentStepService, frameStepService, gatherVaryingStepAspects, generateCommands, generateStateFromDesignInputSteps, getBoundedOffsets, getWorkflow, getWorkflows, graphQlManager, illustrationStepService, materialStepService, modelStepService, moduleStepService, optionService, persistenceService, pictureStepService, questionStepService, shapeStepService, shortenUrl, spiffCoreConfiguration, stepAspectValuesToDesignInputSteps, textStepService, toast };
|