@spiffcommerce/core 32.4.0-beta.8897ea88-ee5b-526f-a5cc-8b19f8c7e3a8 → 32.4.0-beta.a1f69100-8b64-5ab1-b13d-d042fc2f8765
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/CHANGELOG.md +0 -13
- package/dist/index.d.ts +14 -60
- package/dist/index.js +170 -262
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +3600 -3736
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
@@ -14,19 +14,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
14
14
|
- `Fixed` for any bug fixes.
|
15
15
|
- `Security` in case of vulnerabilities.
|
16
16
|
|
17
|
-
## [33.0.0] - 14-10-2025
|
18
|
-
|
19
|
-
## Changed
|
20
|
-
|
21
|
-
- Updated `WorkflowExperience` to store `transaction`, `product`, `profanityList`, and `workflow` as direct properties, initialized in the constructor for improved encapsulation and performance.
|
22
|
-
|
23
|
-
## Added
|
24
|
-
|
25
|
-
- Added new methods to `WorkflowExperience`: `getProduct()`, `getProfanityList()`, `setProduct(integrationProductId: string)`, `getTransaction()`, `getWorkflow()`, and `setWorkflow(workflow: Workflow)` for easier access and mutation of core experience data.
|
26
|
-
- Introduced `getIntegrationProductIds()` and `addIntegrationProductId(id: string)` methods to `Bundle` and `BundleImpl` for tracking associated integration product IDs.
|
27
|
-
- Added GraphQL mutation for updating a transaction's integration product, enabling backend synchronization of integration product changes.
|
28
|
-
- Added `getState()` method to `BundleStateManager` for easier external access to the current bundle state.
|
29
|
-
|
30
17
|
## [32.4.0] - 16-10-2025
|
31
18
|
|
32
19
|
## Added
|
package/dist/index.d.ts
CHANGED
@@ -1049,6 +1049,7 @@ interface Scene {
|
|
1049
1049
|
* State related to a workflow experience.
|
1050
1050
|
*/
|
1051
1051
|
interface ExperienceOptions {
|
1052
|
+
product: Product;
|
1052
1053
|
transaction: Transaction;
|
1053
1054
|
workflow?: Workflow;
|
1054
1055
|
/**
|
@@ -1093,10 +1094,6 @@ interface ExperienceOptions {
|
|
1093
1094
|
* should get an instance of this class from a Client you have constructed previously.
|
1094
1095
|
*/
|
1095
1096
|
interface WorkflowExperience {
|
1096
|
-
/**
|
1097
|
-
* Get the current transaction for this experience.
|
1098
|
-
*/
|
1099
|
-
getTransaction(): Transaction;
|
1100
1097
|
/**
|
1101
1098
|
* Get the bundle this experience is part of. May be undefined.
|
1102
1099
|
*/
|
@@ -1105,28 +1102,6 @@ interface WorkflowExperience {
|
|
1105
1102
|
* Set the bundle this experience is part of. Can be cleared using undefined.
|
1106
1103
|
*/
|
1107
1104
|
setBundle(bundle: Bundle$1 | undefined): any;
|
1108
|
-
/**
|
1109
|
-
* Get the current product for this experience. May be undefined.
|
1110
|
-
*/
|
1111
|
-
getProduct(): Product | undefined;
|
1112
|
-
/**
|
1113
|
-
* Get the current profanity list for this experience. May be empty.
|
1114
|
-
*/
|
1115
|
-
getProfanityList(): string[];
|
1116
|
-
/**
|
1117
|
-
* Set the current product for this experience.
|
1118
|
-
* @param product The new product to set.
|
1119
|
-
*/
|
1120
|
-
setProduct(integrationProductId: string): Promise<void>;
|
1121
|
-
/**
|
1122
|
-
* Get the current workflow for this experience. May be undefined.
|
1123
|
-
*/
|
1124
|
-
getWorkflow(): Workflow | undefined;
|
1125
|
-
/**
|
1126
|
-
* Set the current workflow for this experience.
|
1127
|
-
* @param workflow The new workflow to set.
|
1128
|
-
*/
|
1129
|
-
setWorkflow(workflow: Workflow): Promise<void>;
|
1130
1105
|
/**
|
1131
1106
|
* Returns the client that was responsible for spawning this experience.
|
1132
1107
|
*/
|
@@ -1315,7 +1290,6 @@ declare enum WorkflowExperienceEventType {
|
|
1315
1290
|
}
|
1316
1291
|
declare class WorkflowExperienceImpl implements WorkflowExperience {
|
1317
1292
|
readonly client: SpiffCommerceClient;
|
1318
|
-
readonly transaction: Transaction;
|
1319
1293
|
readonly commandContext: CommandContext;
|
1320
1294
|
readonly graphQlClient: GraphQlClientFunc;
|
1321
1295
|
readonly workflowManager: WorkflowManager;
|
@@ -1325,20 +1299,11 @@ declare class WorkflowExperienceImpl implements WorkflowExperience {
|
|
1325
1299
|
* Bundle this experience has been added to.
|
1326
1300
|
*/
|
1327
1301
|
private bundle?;
|
1328
|
-
private product?;
|
1329
|
-
private profanityList;
|
1330
|
-
private workflow?;
|
1331
1302
|
private currentPriceBreak;
|
1332
1303
|
private renderableScenes;
|
1333
1304
|
private renderableSceneCallbacks;
|
1334
1305
|
private eventCallbacks;
|
1335
1306
|
constructor(client: SpiffCommerceClient, experienceOptions: ExperienceOptions);
|
1336
|
-
getTransaction(): Transaction;
|
1337
|
-
getProduct(): Product | undefined;
|
1338
|
-
getProfanityList(): string[];
|
1339
|
-
setProduct(integrationProductId: string): Promise<void>;
|
1340
|
-
getWorkflow(): Workflow | undefined;
|
1341
|
-
setWorkflow(workflow: Workflow): Promise<void>;
|
1342
1307
|
attachAddress(streetAddress?: string, apartment?: string, city?: string, country?: string, state?: string, postCode?: string): Promise<void>;
|
1343
1308
|
attachOrganization(name: string): Promise<void>;
|
1344
1309
|
getBundle(): Bundle$1 | undefined;
|
@@ -1819,9 +1784,6 @@ declare class Transform {
|
|
1819
1784
|
}
|
1820
1785
|
declare const getProductCollections: (ids: string[]) => Promise<ProductCollection[] | undefined>;
|
1821
1786
|
|
1822
|
-
interface BundleIntegrationProductsAddedEventData {
|
1823
|
-
integrationProductIds: string[];
|
1824
|
-
}
|
1825
1787
|
interface ConditionalGlobalPropertiesChangedEventData {
|
1826
1788
|
globalProperties: GlobalPropertyHandle[];
|
1827
1789
|
}
|
@@ -1839,7 +1801,6 @@ interface WorkflowExperienceAddedEventData {
|
|
1839
1801
|
interface WorkflowExperienceRemovedEventData extends WorkflowExperienceAddedEventData {
|
1840
1802
|
}
|
1841
1803
|
type BundleEventMap = {
|
1842
|
-
"bundle-integration-products-added": BundleIntegrationProductsAddedEventData;
|
1843
1804
|
"conditional-global-properties-changed": ConditionalGlobalPropertiesChangedEventData;
|
1844
1805
|
"global-properties-mandatory-changed": GlobalPropertiesMandatoryChangedEventData;
|
1845
1806
|
"workflow-experience-hover-enter": WorkflowExperienceHoverEventData;
|
@@ -1848,7 +1809,7 @@ type BundleEventMap = {
|
|
1848
1809
|
"workflow-experience-removed": WorkflowExperienceRemovedEventData;
|
1849
1810
|
};
|
1850
1811
|
type BundleEventType = keyof BundleEventMap;
|
1851
|
-
type BundleEventData =
|
1812
|
+
type BundleEventData = WorkflowExperienceHoverEventData | ConditionalGlobalPropertiesChangedEventData | WorkflowExperienceAddedEventData;
|
1852
1813
|
type BundleEvent<K extends BundleEventType = BundleEventType> = BundleEventMap[K];
|
1853
1814
|
|
1854
1815
|
/**
|
@@ -2092,8 +2053,6 @@ interface Bundle$1 {
|
|
2092
2053
|
generateQuoteId(): Promise<string>;
|
2093
2054
|
getQuoteCompleteMessage(): CompleteQuoteMessage;
|
2094
2055
|
applyGlobalPropertyState(state: GlobalPropertyState): Promise<void>;
|
2095
|
-
getIntegrationProductIds(): undefined | string[];
|
2096
|
-
addIntegrationProductId(id: string): void;
|
2097
2056
|
}
|
2098
2057
|
|
2099
2058
|
/**
|
@@ -2398,32 +2357,29 @@ interface GetWorkflowFromTransactionOptions extends GetWorkflowOptionsBase {
|
|
2398
2357
|
workflowState?: string;
|
2399
2358
|
type: "transaction";
|
2400
2359
|
}
|
2401
|
-
interface
|
2360
|
+
interface GetNewWorkflowOptionsBase extends GetWorkflowOptionsBase {
|
2402
2361
|
/** A name for the new transaction. */
|
2403
2362
|
designName?: string;
|
2404
2363
|
/** The workflow to load. */
|
2405
|
-
workflowId
|
2364
|
+
workflowId: string;
|
2406
2365
|
/** An existing workflow state, if available. */
|
2407
2366
|
workflowState?: string;
|
2408
2367
|
}
|
2409
|
-
interface
|
2410
|
-
type: "blank";
|
2411
|
-
}
|
2412
|
-
interface GetWorkflowExperienceFromIntegrationProductOptions extends GetNewWorkflowExperienceOptionsBase {
|
2368
|
+
interface GetWorkflowFromIntegrationProductOptions extends GetNewWorkflowOptionsBase {
|
2413
2369
|
integrationProductId: string;
|
2414
2370
|
quantity?: number;
|
2415
2371
|
recipient?: any;
|
2416
2372
|
type: "integration";
|
2417
2373
|
}
|
2418
|
-
interface
|
2374
|
+
interface GetWorkflowFromExternalProductOptions extends GetNewWorkflowOptionsBase {
|
2419
2375
|
/** The external ID associated with an integration. */
|
2420
2376
|
externalIntegrationId: string;
|
2421
2377
|
/** The ID of the product from the external system. */
|
2422
2378
|
externalProductId: string;
|
2423
2379
|
type: "external";
|
2424
2380
|
}
|
2425
|
-
type
|
2426
|
-
type GetWorkflowOptions = GetWorkflowFromTransactionOptions |
|
2381
|
+
type GetNewWorkflowOptions = GetWorkflowFromIntegrationProductOptions | GetWorkflowFromExternalProductOptions;
|
2382
|
+
type GetWorkflowOptions = GetWorkflowFromTransactionOptions | GetNewWorkflowOptions;
|
2427
2383
|
interface ClientConfiguration {
|
2428
2384
|
hubUrl: string;
|
2429
2385
|
serverUrl: string;
|
@@ -2703,6 +2659,7 @@ interface WorkflowManager {
|
|
2703
2659
|
getAllLayoutData: () => LayoutState[];
|
2704
2660
|
getLayoutPreviewService: () => LayoutPreviewService | undefined;
|
2705
2661
|
getPreviewService: () => ThreeDPreviewService | undefined;
|
2662
|
+
getProfanities: () => string[];
|
2706
2663
|
getRegionElements: (stepName: string) => RegionElement[];
|
2707
2664
|
getSerializedStep: (stepName: string, serializedSteps: SerializableStep[]) => SerializableStep | undefined;
|
2708
2665
|
getStepSpecificServices: (stepName: string) => StepSpecificServices | undefined;
|
@@ -2710,22 +2667,19 @@ interface WorkflowManager {
|
|
2710
2667
|
getMetadata: (stepName: string) => StepMetadata | undefined;
|
2711
2668
|
getWorkflowMetadata: () => WorkflowMetadata;
|
2712
2669
|
getInformationResults(): InformationResult[];
|
2670
|
+
getTransaction: () => Transaction;
|
2713
2671
|
getTransactionCustomer: () => Customer | undefined;
|
2714
2672
|
setTransactionCustomer: (customer: Customer) => void;
|
2715
|
-
/**
|
2716
|
-
* Sets the current workflow for this experience.
|
2717
|
-
* @param workflow The new workflow to set.
|
2718
|
-
* @returns A promise that resolves when the workflow has been set.
|
2719
|
-
*/
|
2720
|
-
setWorkflow: (workflow: Workflow) => Promise<void>;
|
2721
2673
|
/**
|
2722
2674
|
* @deprecated Use setTransactionCustomer instead.
|
2723
2675
|
*/
|
2724
2676
|
setTransactionCustomerDetails: (details: {
|
2725
2677
|
email: string;
|
2726
2678
|
}) => void;
|
2679
|
+
getWorkflow: () => Workflow;
|
2727
2680
|
getWorkflowSelections: () => WorkflowSelections;
|
2728
2681
|
getStepSelections: () => StepSelections;
|
2682
|
+
getProduct: () => Product;
|
2729
2683
|
/**
|
2730
2684
|
* A promise resolving when the initial state of the workflow has completed loading.
|
2731
2685
|
*/
|
@@ -5224,7 +5178,6 @@ declare class MockWorkflowManager implements WorkflowManager {
|
|
5224
5178
|
getWorkflowExperience(): WorkflowExperience;
|
5225
5179
|
setClient(client: SpiffCommerceClient): void;
|
5226
5180
|
getInitializationPromise(): Promise<void>;
|
5227
|
-
setWorkflow: (workflow: Workflow) => Promise<void>;
|
5228
5181
|
getProduct: () => Product;
|
5229
5182
|
isInitialized(): boolean;
|
5230
5183
|
getCommandContext: () => CommandContext;
|
@@ -5255,6 +5208,7 @@ declare class MockWorkflowManager implements WorkflowManager {
|
|
5255
5208
|
getPreviewService(): undefined;
|
5256
5209
|
setModelContainer: (container: any) => void;
|
5257
5210
|
getModelContainer(): undefined;
|
5211
|
+
getProfanities(): never[];
|
5258
5212
|
getRegionElements(_stepName: string): never[];
|
5259
5213
|
getSerializedStep(_stepName: string, _serializedSteps: SerializableStep[]): undefined;
|
5260
5214
|
getStepSpecificServices(_stepName: string): undefined;
|
@@ -6080,4 +6034,4 @@ declare const overrideWorkflowExperienceRecipientAddress: (workflowExperience: W
|
|
6080
6034
|
*/
|
6081
6035
|
declare const getGlobalPropertyStateForBundle: (bundleId: string) => Promise<GlobalPropertyState | undefined>;
|
6082
6036
|
|
6083
|
-
export { AddonHandle, type AddressComponent, type AddressValidationJob, AddressValidationJobStatus, type AddressValidationResult, AddressValidationResultConfirmationLevel, AddressValidationStatus, type Animatable, type AnyStepData, ArrayInput, AspectType, type Asset, type AssetConfiguration, AssetNotFoundError, type AssetObjectVersion, AssetType, BringForwardCommand, BringToBackCommand, BringToFrontCommand, type Bundle$1 as Bundle, BundleDesignCreationCartAddMode, type BundleDesignCreationMessage, type BundleEvent, type BundleEventData, type BundleEventType, type Bundle as BundleRaw, type BundleStakeholder, CanvasCommand, CollectionProduct, type ColorDefinition, type ColorOption, ColorOptionGlobalPropertyHandle, type ColorProfileProps, CommandContext, type CommandState, type Condition, type ConditionalGlobalPropertiesChangedEventData, CreateElementCommand, CreateLayoutCommand, CurrencyContext, CurrencyService, type Customer, type CustomerDetailsInput, DeleteElementCommand, type DesignCreationMessage, type DesignCreationProgressUpdate, type DesignInputStep, type DigitalContentStepData, DigitalContentStepHandle, type EditedSteps, type ExportedStepData, type ExportedStepDataProperty, type ExportedStepDataPropertyType, FileUploadGlobalPropertyHandle, FlowExecutionNodeResult, FlowExecutionResult, FlowService, FontAlignmentCommand, FontColorCommand, FontSizeCommand, FontSourceCommand, type FrameElement, FrameService, FrameStep, type FrameStepData, FrameStepHandle, type FrameThresholdSettings, type
|
6037
|
+
export { AddonHandle, type AddressComponent, type AddressValidationJob, AddressValidationJobStatus, type AddressValidationResult, AddressValidationResultConfirmationLevel, AddressValidationStatus, type Animatable, type AnyStepData, ArrayInput, AspectType, type Asset, type AssetConfiguration, AssetNotFoundError, type AssetObjectVersion, AssetType, BringForwardCommand, BringToBackCommand, BringToFrontCommand, type Bundle$1 as Bundle, BundleDesignCreationCartAddMode, type BundleDesignCreationMessage, type BundleEvent, type BundleEventData, type BundleEventType, type Bundle as BundleRaw, type BundleStakeholder, CanvasCommand, CollectionProduct, type ColorDefinition, type ColorOption, ColorOptionGlobalPropertyHandle, type ColorProfileProps, CommandContext, type CommandState, type Condition, type ConditionalGlobalPropertiesChangedEventData, CreateElementCommand, CreateLayoutCommand, CurrencyContext, CurrencyService, type Customer, type CustomerDetailsInput, DeleteElementCommand, type DesignCreationMessage, type DesignCreationProgressUpdate, type DesignInputStep, type DigitalContentStepData, DigitalContentStepHandle, type EditedSteps, type ExportedStepData, type ExportedStepDataProperty, type ExportedStepDataPropertyType, FileUploadGlobalPropertyHandle, FlowExecutionNodeResult, FlowExecutionResult, FlowService, FontAlignmentCommand, FontColorCommand, FontSizeCommand, FontSourceCommand, type FrameElement, FrameService, FrameStep, type FrameStepData, FrameStepHandle, type FrameThresholdSettings, type GetNewWorkflowOptions, type GetWorkflowOptions, type GlobalPropertiesMandatoryChangedEventData, type GlobalPropertyConfiguration, GlobalPropertyHandle, GroupCommand, type ILayout, type IllustrationElement, type IllustrationStepData, IllustrationStepHandle, type ImageElement, InformationMessageType, type InformationResult, type InformationStepData, InformationStepHandle, type Integration, type IntegrationOptionResource, IntegrationProduct, IntegrationType, type LayoutComponentConfiguration, type LayoutData, type LayoutElement, LayoutElementFactory, LayoutElementType, LayoutNotFoundError, LayoutRenderingPurpose, type LayoutState, type LayoutsState, type MandatorySteps, MaterialEffectMode, type MaterialStepData, MaterialStepHandle, MisconfigurationError, MockWorkflowManager, type ModelStepData, ModelStepHandle, type ModuleStepData, ModuleStepHandle, MoveCommand, NodeType, ObjectInput, ObjectInputType, OptionGlobalPropertyHandle, OptionNotFoundError, type OptionResource, type Order, type OrderItem, type PapyrusComponent, ParseError, type PictureStepData, PictureStepHandle, type Placeable, type PmsSearchResult, type Point, type Product, ProductCameraRig, ProductCollection, ProductCollectionProductSortKey, ProductWorkflow$1 as ProductWorkflow, promiseCache as PromiseCache, PromiseQueue, type QuestionStepData, QuestionStepHandle, QueueablePromise, type Recipient, type Region, type RegionElement, type RenderableScene, ResizeCommand, ResourceNotFoundError, RotateCommand, type SavedDesign, ScaleAxis, type SelectionStorage, SendBackwardsCommand, type ShapeStepData, ShapeStepHandle, type ShareAction, ShareActionType, type SilentIllustrationStepData, SpiffCommerceClient, type Stakeholder, StakeholderType, type StateMutationFunc, type Step, type StepAspect, StepAspectType, type StepElements, type StepGroup, StepHandle, type StepStorage, StepType, TextAlgorithm, TextChangeCommand, type TextChangeResult, TextGlobalPropertyHandle, TextInput, type TextStepData, TextStepHandle, type TextStepStorage, type TextboxElement, type Theme, type ToastCallback, type Transaction, Transform, TransformCollection$1 as TransformCollection, UnhandledBehaviorError, UnitOfMeasurement, UpdateImageSourceCommand, Variant, type VariantResource, type Vector3, type Workflow, type WorkflowExperience, WorkflowExperienceEventType, type WorkflowExperienceHoverEventData, WorkflowExperienceImpl, type WorkflowManager, type WorkflowMetadata, type WorkflowPanel, type WorkflowScene, type WorkflowSelections, type WorkflowStorage, assetService, browserColorToHex, cmPerPixel, createDesign, currentDirection, dataUrlFromExternalUrl, deleteBundle, designService, determineCorrectFontSizeAndLines, digitalContentStepService, domParser, duplicateBundle, duplicateTransaction, fetchAsString, findAngle, findElement, findPmsColors, frameDataCache, frameStepService, generate, generateCommands, generateSVGWithUnknownColors, generateStateFromDesignInputSteps, getAddressValidationJobs, getAttributesFromArrayBuffer, getAxisAlignedBoundingBox, getBoundedOffsets, getBundleThemeConfiguration, getCustomer, getCustomerBundles, getElementVertices, getFrameData, getGlobalPropertyStateForBundle, getIntegration, getNEPoint, getNWPoint, getOrderedTransactions, getOverrideThemeConfiguration, getPointOfRotation, getProductCollections, getSEPoint, getSvgElement, getTemplateBundles, getTemplateTransactions, getTransaction, getTransactionThemeConfiguration, getTransactionsForBundle, getTrueCoordinates, getUnorderedTransactions, getValidationJobsForWorkflowExperiences, getWorkflow, getWorkflows, graphQlManager, illustrationStepService, isCloseToValue, loadFont, matchHexToPms, materialStepService, metafieldManager, mmPerPixel, modelStepService, modifySVGColors, moduleStepService, nameBundle, nameTransaction, optionService, outlineFontsInSvg, overrideWorkflowExperienceRecipientAddress, patternImageDataCache, persistenceService, pictureStepService, pmsToRgb, questionStepService, registerFetchImplementation, registerWindowImplementation, rehydrateSerializedLayout, rgbToPms, rotateAroundPoint, sanitizeSvgTree, setBearerAuthenticationToken, setCanvasModule, shapeStepService, shortenUrl, spiffCoreConfiguration, stepAspectValuesToDesignInputSteps, svgColorValueToDefinition, svgStringDimensions, svgToDataUrl, textStepService, toast, validateWorkflowExperienceRecipient, validateWorkflowExperienceRecipients, xmlSerializer };
|