@spiffcommerce/core 18.5.0-alpha.1 → 19.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.d.ts +27 -15
- package/dist/index.js +1679 -1567
- package/dist/index.umd.cjs +141 -100
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -595,7 +595,7 @@ interface Transaction {
|
|
|
595
595
|
/**
|
|
596
596
|
* The integration product related to this lineitem.
|
|
597
597
|
*/
|
|
598
|
-
integrationProduct?:
|
|
598
|
+
integrationProduct?: IntegrationProductResource;
|
|
599
599
|
/**
|
|
600
600
|
* Whether this transaction has previously been ordered.
|
|
601
601
|
*/
|
|
@@ -645,7 +645,7 @@ interface Transaction {
|
|
|
645
645
|
* An integration product represents the connection of a product in SpiffCommerce with
|
|
646
646
|
* a product on a third party platform.
|
|
647
647
|
*/
|
|
648
|
-
interface
|
|
648
|
+
interface IntegrationProductResource {
|
|
649
649
|
/**
|
|
650
650
|
* The ID of the IntegrationProduct entity. Used internally by SpiffCommerce.
|
|
651
651
|
*/
|
|
@@ -670,7 +670,7 @@ interface IntegrationProduct {
|
|
|
670
670
|
* When the additionalExternalProductId is set, this is the IntegrationProduct that is associated with it.
|
|
671
671
|
* If no Spiff product has been associated with the additionalExternalProductId, this will be null.
|
|
672
672
|
*/
|
|
673
|
-
additionalIntegrationProduct?:
|
|
673
|
+
additionalIntegrationProduct?: IntegrationProductResource;
|
|
674
674
|
/**
|
|
675
675
|
* The product that this integration product is associated with.
|
|
676
676
|
*/
|
|
@@ -810,7 +810,7 @@ interface Product {
|
|
|
810
810
|
* Configuration for conversion. Optional.
|
|
811
811
|
*/
|
|
812
812
|
conversionConfiguration?: ConversionConfiguration;
|
|
813
|
-
integrationProducts?:
|
|
813
|
+
integrationProducts?: IntegrationProductResource[];
|
|
814
814
|
productTags?: ProductTag[];
|
|
815
815
|
/**
|
|
816
816
|
* The SKU of the product in the merchant's store.
|
|
@@ -1667,7 +1667,7 @@ declare class CollectionProduct {
|
|
|
1667
1667
|
* @param externalId An external integration ID to further filter by. Otherwise we return the first encountered.
|
|
1668
1668
|
* @returns The integration if found. Throws an error if not found as this data is typically a neccesity.
|
|
1669
1669
|
*/
|
|
1670
|
-
getIntegrationByType(type: IntegrationType, externalId?: string):
|
|
1670
|
+
getIntegrationByType(type: IntegrationType, externalId?: string): IntegrationProductResource;
|
|
1671
1671
|
/**
|
|
1672
1672
|
* A helper function for pulling the default workflow.
|
|
1673
1673
|
*/
|
|
@@ -1675,7 +1675,7 @@ declare class CollectionProduct {
|
|
|
1675
1675
|
/**
|
|
1676
1676
|
* A list of all integrations this product is connected to.
|
|
1677
1677
|
*/
|
|
1678
|
-
getIntegrations():
|
|
1678
|
+
getIntegrations(): IntegrationProductResource[];
|
|
1679
1679
|
/**
|
|
1680
1680
|
* The raw product resource. This is generally not needed and should be avoided.
|
|
1681
1681
|
*/
|
|
@@ -1939,11 +1939,18 @@ interface Bundle {
|
|
|
1939
1939
|
*/
|
|
1940
1940
|
getInitializationPromise(): Promise<void>;
|
|
1941
1941
|
/**
|
|
1942
|
-
* Sets the position, rotation, and scale of a workflow experience within this bundle.
|
|
1942
|
+
* Sets the position, rotation, and scale of a named transform for a workflow experience within this bundle.
|
|
1943
1943
|
* @param workflowExperience The workflow experience to update.
|
|
1944
|
+
* @param transformName The name of the transform.
|
|
1944
1945
|
* @param transform An object containing `position`, `rotation`, and `scale` properties. Each property is an object with `x`, `y`, and `z` properties.
|
|
1945
1946
|
*/
|
|
1946
|
-
|
|
1947
|
+
updateWorkflowExperienceTransform(workflowExperience: WorkflowExperience, transformName: string, transform: BundleStateTransform): Promise<void>;
|
|
1948
|
+
/**
|
|
1949
|
+
* Sets a transform of a workflow experience within this bundle to be the active one.
|
|
1950
|
+
* @param workflowExperience The workflow experience to update.
|
|
1951
|
+
* @param transform The name of the transform to make the active transform.
|
|
1952
|
+
*/
|
|
1953
|
+
activateWorkflowExperienceTransform(workflowExperience: WorkflowExperience, transformName: string): Promise<void>;
|
|
1947
1954
|
}
|
|
1948
1955
|
type BundleEventType = "conditional-global-properties-changed" | "workflow-experience-hover-enter" | "workflow-experience-hover-exit";
|
|
1949
1956
|
type BundleEventData = ConditionalGlobalPropertiesChangedEventData | WorkflowExperienceHoverEventData;
|
|
@@ -2118,6 +2125,15 @@ declare class ObjectInput extends FlowExecutionInput {
|
|
|
2118
2125
|
static validUUID(uuid: string): RegExpMatchArray | null;
|
|
2119
2126
|
}
|
|
2120
2127
|
|
|
2128
|
+
declare class IntegrationProduct {
|
|
2129
|
+
private readonly integrationProduct;
|
|
2130
|
+
constructor(product: IntegrationProductResource);
|
|
2131
|
+
getId(): string;
|
|
2132
|
+
getResource(): IntegrationProductResource;
|
|
2133
|
+
getBasePrice(): number;
|
|
2134
|
+
getDefaultWorkflow(): ProductWorkflow;
|
|
2135
|
+
}
|
|
2136
|
+
|
|
2121
2137
|
declare const getWorkflows: (ids: string[], options?: GetWorkflowGraphqlOptions) => Promise<Workflow[]>;
|
|
2122
2138
|
declare const getWorkflow: (id: string, options?: GetWorkflowGraphqlOptions) => Promise<Workflow>;
|
|
2123
2139
|
/**
|
|
@@ -2211,12 +2227,6 @@ declare class SpiffCommerceClient {
|
|
|
2211
2227
|
getAssetManager(): AssetManager;
|
|
2212
2228
|
getCurrencyCode(): string;
|
|
2213
2229
|
getFlowService(): FlowService;
|
|
2214
|
-
getIntegration(): Promise<{
|
|
2215
|
-
id: string;
|
|
2216
|
-
theme: Theme;
|
|
2217
|
-
partner: Partner;
|
|
2218
|
-
logo: string;
|
|
2219
|
-
}>;
|
|
2220
2230
|
/**
|
|
2221
2231
|
* Attempts to load persisted authentication information from local storage, and authenticate with the Spiff Commerce API.
|
|
2222
2232
|
* @param bundleId The ID of the bundle you intend to load.
|
|
@@ -2339,6 +2349,8 @@ declare class SpiffCommerceClient {
|
|
|
2339
2349
|
*/
|
|
2340
2350
|
private updateTransactionState;
|
|
2341
2351
|
storeCustomer(customer: Customer): void;
|
|
2352
|
+
getIntegrationProductById(integrationProductId: string): Promise<IntegrationProduct>;
|
|
2353
|
+
getIntegrationProductFromExternalIds(externalIntegrationId: string, externalProductId: string): Promise<IntegrationProduct>;
|
|
2342
2354
|
}
|
|
2343
2355
|
|
|
2344
2356
|
declare class Configuration {
|
|
@@ -2913,4 +2925,4 @@ declare class PromiseCache {
|
|
|
2913
2925
|
}
|
|
2914
2926
|
declare const promiseCache: PromiseCache;
|
|
2915
2927
|
|
|
2916
|
-
export { AssetNotFoundError, Bundle, CollectionProduct, ColorOption, ConversionConfiguration, ConversionData, ConversionDataType, ConversionLocation, Customer, CustomerDetailsInput, DesignCreationMessage, DesignCreationProgressUpdate, DesignInputStep, EditedSteps, FlowExecutionNodeResult, FlowExecutionResult, FlowService, FrameService, FrameStep, FrameStepHandle, FrameThresholdSettings, GetWorkflowOptions, GlobalPropertyHandle, IllustrationStepHandle, InformationMessageType, InformationResult, InformationStepHandle, IntegrationType, LayoutNotFoundError, MandatorySteps, MaterialStepHandle, MisconfigurationError, MockWorkflowManager, ModelStepHandle, NodeType, ObjectInput, ObjectInputType, OptionNotFoundError, ParseError, PictureStepHandle, Product, ProductCameraRig, ProductCollection, ProductWorkflow, promiseCache as PromiseCache, PromiseQueue, QuestionStepHandle, QueueablePromise, RegionElement, RenderableScene, ResourceNotFoundError, SavedDesign, SelectionStorage, ShapeStepHandle, SilentIllustrationStepData, SpiffCommerceClient, Stakeholder, StakeholderType, StateMutationFunc, StepElements, StepHandle, TextStepHandle, TextStepStorage, Transaction, Transform, TransformCollection, UnhandledBehaviorError, Variant, Vector3, WorkflowExperience, WorkflowExperienceImpl, WorkflowManager, WorkflowMetadata, WorkflowScene, WorkflowSelections, WorkflowStorage, assetService, createDesign, designService, digitalContentStepService, frameStepService, generateCommands, generateStateFromDesignInputSteps, getBoundedOffsets, getWorkflow, getWorkflows, graphQlManager, illustrationStepService, materialStepService, modelStepService, moduleStepService, optionService, persistenceService, pictureStepService, questionStepService, shapeStepService, shortenUrl, spiffCoreConfiguration, stepAspectValuesToDesignInputSteps, textStepService, toast };
|
|
2928
|
+
export { AssetNotFoundError, Bundle, CollectionProduct, ColorOption, ConversionConfiguration, ConversionData, ConversionDataType, ConversionLocation, Customer, CustomerDetailsInput, DesignCreationMessage, DesignCreationProgressUpdate, DesignInputStep, EditedSteps, FlowExecutionNodeResult, FlowExecutionResult, FlowService, FrameService, FrameStep, FrameStepHandle, FrameThresholdSettings, GetWorkflowOptions, GlobalPropertyHandle, IllustrationStepHandle, InformationMessageType, InformationResult, InformationStepHandle, IntegrationProduct, IntegrationType, LayoutNotFoundError, MandatorySteps, MaterialStepHandle, MisconfigurationError, MockWorkflowManager, ModelStepHandle, NodeType, ObjectInput, ObjectInputType, OptionNotFoundError, ParseError, PictureStepHandle, Product, ProductCameraRig, ProductCollection, ProductWorkflow, promiseCache as PromiseCache, PromiseQueue, QuestionStepHandle, QueueablePromise, RegionElement, RenderableScene, ResourceNotFoundError, SavedDesign, SelectionStorage, ShapeStepHandle, SilentIllustrationStepData, SpiffCommerceClient, Stakeholder, StakeholderType, StateMutationFunc, StepElements, StepHandle, TextStepHandle, TextStepStorage, Transaction, Transform, TransformCollection, UnhandledBehaviorError, Variant, Vector3, WorkflowExperience, WorkflowExperienceImpl, WorkflowManager, WorkflowMetadata, WorkflowScene, WorkflowSelections, WorkflowStorage, assetService, createDesign, designService, digitalContentStepService, frameStepService, generateCommands, generateStateFromDesignInputSteps, getBoundedOffsets, getWorkflow, getWorkflows, graphQlManager, illustrationStepService, materialStepService, modelStepService, moduleStepService, optionService, persistenceService, pictureStepService, questionStepService, shapeStepService, shortenUrl, spiffCoreConfiguration, stepAspectValuesToDesignInputSteps, textStepService, toast };
|