@spiffcommerce/core 32.4.0-beta.8897ea88-ee5b-526f-a5cc-8b19f8c7e3a8 → 32.4.0-beta.b62ed93b-f241-5f20-b4ff-1ffbdfdab196
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 +15 -60
- package/dist/index.js +170 -262
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2968 -3094
- 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;
|
@@ -1590,6 +1555,7 @@ interface GlobalPropertyStateManager {
|
|
1590
1555
|
setBundleOptions(bundleOptions?: BundleOptions): void;
|
1591
1556
|
getBundleOptions(): BundleOptions | undefined;
|
1592
1557
|
setConfiguration(configuration: GlobalPropertyConfiguration | undefined): void;
|
1558
|
+
clearAspects(names: string[]): Promise<void>;
|
1593
1559
|
}
|
1594
1560
|
interface BundleOptions {
|
1595
1561
|
additionalHeaders?: {
|
@@ -1819,9 +1785,6 @@ declare class Transform {
|
|
1819
1785
|
}
|
1820
1786
|
declare const getProductCollections: (ids: string[]) => Promise<ProductCollection[] | undefined>;
|
1821
1787
|
|
1822
|
-
interface BundleIntegrationProductsAddedEventData {
|
1823
|
-
integrationProductIds: string[];
|
1824
|
-
}
|
1825
1788
|
interface ConditionalGlobalPropertiesChangedEventData {
|
1826
1789
|
globalProperties: GlobalPropertyHandle[];
|
1827
1790
|
}
|
@@ -1839,7 +1802,6 @@ interface WorkflowExperienceAddedEventData {
|
|
1839
1802
|
interface WorkflowExperienceRemovedEventData extends WorkflowExperienceAddedEventData {
|
1840
1803
|
}
|
1841
1804
|
type BundleEventMap = {
|
1842
|
-
"bundle-integration-products-added": BundleIntegrationProductsAddedEventData;
|
1843
1805
|
"conditional-global-properties-changed": ConditionalGlobalPropertiesChangedEventData;
|
1844
1806
|
"global-properties-mandatory-changed": GlobalPropertiesMandatoryChangedEventData;
|
1845
1807
|
"workflow-experience-hover-enter": WorkflowExperienceHoverEventData;
|
@@ -1848,7 +1810,7 @@ type BundleEventMap = {
|
|
1848
1810
|
"workflow-experience-removed": WorkflowExperienceRemovedEventData;
|
1849
1811
|
};
|
1850
1812
|
type BundleEventType = keyof BundleEventMap;
|
1851
|
-
type BundleEventData =
|
1813
|
+
type BundleEventData = WorkflowExperienceHoverEventData | ConditionalGlobalPropertiesChangedEventData | WorkflowExperienceAddedEventData;
|
1852
1814
|
type BundleEvent<K extends BundleEventType = BundleEventType> = BundleEventMap[K];
|
1853
1815
|
|
1854
1816
|
/**
|
@@ -2092,8 +2054,6 @@ interface Bundle$1 {
|
|
2092
2054
|
generateQuoteId(): Promise<string>;
|
2093
2055
|
getQuoteCompleteMessage(): CompleteQuoteMessage;
|
2094
2056
|
applyGlobalPropertyState(state: GlobalPropertyState): Promise<void>;
|
2095
|
-
getIntegrationProductIds(): undefined | string[];
|
2096
|
-
addIntegrationProductId(id: string): void;
|
2097
2057
|
}
|
2098
2058
|
|
2099
2059
|
/**
|
@@ -2398,32 +2358,29 @@ interface GetWorkflowFromTransactionOptions extends GetWorkflowOptionsBase {
|
|
2398
2358
|
workflowState?: string;
|
2399
2359
|
type: "transaction";
|
2400
2360
|
}
|
2401
|
-
interface
|
2361
|
+
interface GetNewWorkflowOptionsBase extends GetWorkflowOptionsBase {
|
2402
2362
|
/** A name for the new transaction. */
|
2403
2363
|
designName?: string;
|
2404
2364
|
/** The workflow to load. */
|
2405
|
-
workflowId
|
2365
|
+
workflowId: string;
|
2406
2366
|
/** An existing workflow state, if available. */
|
2407
2367
|
workflowState?: string;
|
2408
2368
|
}
|
2409
|
-
interface
|
2410
|
-
type: "blank";
|
2411
|
-
}
|
2412
|
-
interface GetWorkflowExperienceFromIntegrationProductOptions extends GetNewWorkflowExperienceOptionsBase {
|
2369
|
+
interface GetWorkflowFromIntegrationProductOptions extends GetNewWorkflowOptionsBase {
|
2413
2370
|
integrationProductId: string;
|
2414
2371
|
quantity?: number;
|
2415
2372
|
recipient?: any;
|
2416
2373
|
type: "integration";
|
2417
2374
|
}
|
2418
|
-
interface
|
2375
|
+
interface GetWorkflowFromExternalProductOptions extends GetNewWorkflowOptionsBase {
|
2419
2376
|
/** The external ID associated with an integration. */
|
2420
2377
|
externalIntegrationId: string;
|
2421
2378
|
/** The ID of the product from the external system. */
|
2422
2379
|
externalProductId: string;
|
2423
2380
|
type: "external";
|
2424
2381
|
}
|
2425
|
-
type
|
2426
|
-
type GetWorkflowOptions = GetWorkflowFromTransactionOptions |
|
2382
|
+
type GetNewWorkflowOptions = GetWorkflowFromIntegrationProductOptions | GetWorkflowFromExternalProductOptions;
|
2383
|
+
type GetWorkflowOptions = GetWorkflowFromTransactionOptions | GetNewWorkflowOptions;
|
2427
2384
|
interface ClientConfiguration {
|
2428
2385
|
hubUrl: string;
|
2429
2386
|
serverUrl: string;
|
@@ -2703,6 +2660,7 @@ interface WorkflowManager {
|
|
2703
2660
|
getAllLayoutData: () => LayoutState[];
|
2704
2661
|
getLayoutPreviewService: () => LayoutPreviewService | undefined;
|
2705
2662
|
getPreviewService: () => ThreeDPreviewService | undefined;
|
2663
|
+
getProfanities: () => string[];
|
2706
2664
|
getRegionElements: (stepName: string) => RegionElement[];
|
2707
2665
|
getSerializedStep: (stepName: string, serializedSteps: SerializableStep[]) => SerializableStep | undefined;
|
2708
2666
|
getStepSpecificServices: (stepName: string) => StepSpecificServices | undefined;
|
@@ -2710,22 +2668,19 @@ interface WorkflowManager {
|
|
2710
2668
|
getMetadata: (stepName: string) => StepMetadata | undefined;
|
2711
2669
|
getWorkflowMetadata: () => WorkflowMetadata;
|
2712
2670
|
getInformationResults(): InformationResult[];
|
2671
|
+
getTransaction: () => Transaction;
|
2713
2672
|
getTransactionCustomer: () => Customer | undefined;
|
2714
2673
|
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
2674
|
/**
|
2722
2675
|
* @deprecated Use setTransactionCustomer instead.
|
2723
2676
|
*/
|
2724
2677
|
setTransactionCustomerDetails: (details: {
|
2725
2678
|
email: string;
|
2726
2679
|
}) => void;
|
2680
|
+
getWorkflow: () => Workflow;
|
2727
2681
|
getWorkflowSelections: () => WorkflowSelections;
|
2728
2682
|
getStepSelections: () => StepSelections;
|
2683
|
+
getProduct: () => Product;
|
2729
2684
|
/**
|
2730
2685
|
* A promise resolving when the initial state of the workflow has completed loading.
|
2731
2686
|
*/
|
@@ -5224,7 +5179,6 @@ declare class MockWorkflowManager implements WorkflowManager {
|
|
5224
5179
|
getWorkflowExperience(): WorkflowExperience;
|
5225
5180
|
setClient(client: SpiffCommerceClient): void;
|
5226
5181
|
getInitializationPromise(): Promise<void>;
|
5227
|
-
setWorkflow: (workflow: Workflow) => Promise<void>;
|
5228
5182
|
getProduct: () => Product;
|
5229
5183
|
isInitialized(): boolean;
|
5230
5184
|
getCommandContext: () => CommandContext;
|
@@ -5255,6 +5209,7 @@ declare class MockWorkflowManager implements WorkflowManager {
|
|
5255
5209
|
getPreviewService(): undefined;
|
5256
5210
|
setModelContainer: (container: any) => void;
|
5257
5211
|
getModelContainer(): undefined;
|
5212
|
+
getProfanities(): never[];
|
5258
5213
|
getRegionElements(_stepName: string): never[];
|
5259
5214
|
getSerializedStep(_stepName: string, _serializedSteps: SerializableStep[]): undefined;
|
5260
5215
|
getStepSpecificServices(_stepName: string): undefined;
|
@@ -6080,4 +6035,4 @@ declare const overrideWorkflowExperienceRecipientAddress: (workflowExperience: W
|
|
6080
6035
|
*/
|
6081
6036
|
declare const getGlobalPropertyStateForBundle: (bundleId: string) => Promise<GlobalPropertyState | undefined>;
|
6082
6037
|
|
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
|
6038
|
+
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 };
|