@spiffcommerce/core
Version:
Core client API for interacting with the Spiff Commerce backend.
1,521 lines (791 loc) • 108 kB
Markdown
# Changelog
All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
#### Types of changes
- `Added` for new features.
- `Changed` for changes in existing functionality.
- `Deprecated` for soon-to-be removed features.
- `Removed` for now removed features.
- `Fixed` for any bug fixes.
- `Security` in case of vulnerabilities.
## [41.0.1] - 13-05-2026
### Fixed
- Deployment issue preventing publishing of core.
## [41.0.0] - 13-05-2026
### Added
- Added image state comparison tool to the frame step:
- New `getCurrentImageState()` method to retrieve the current image state (original, backgroundRemoved, or optimized)
- New `ImageState` enum to represent different image processing states
- Enhanced image state tracking for background removal and optimization workflows
- Improved asset key preservation when vectorizing or enhancing images
- Added rotation controls for frame positioning:
- New `setRotation()` method in `FrameService` to control image rotation within frames
- Rotation change listeners support for reactive UI updates
- Per-frame rotation tracking in offset calculations
- Integration with existing zoom and positioning controls
- Added color utility functions:
- New `rgbaToHex()` function to convert rgba/rgb color strings to hexadecimal format
- Enhanced color channel editing capabilities for PMS color matching
- Added AI-powered image enhancement capabilities to the frame step:
- New `enhanceWithAI()` method in `FrameStepHandle` for upscaling and enhancing images using AI
- Support for enhancement options including target dimensions, quality settings, seed, cfg scale, and negative prompts
- New `getEnhancedImageSelection()` and `hasEnhancedImageSelection()` methods to retrieve AI-enhanced assets
- Enhanced asset tracking in `FrameStepStorage` with `enhancedAssetKey` field
- Persistent caching of enhanced assets for improved performance
- GraphQL mutation `assetEnhanceWithAI` with `AssetEnhanceOptions` input type
## [40.4.1] - 01-05-2026
### Added
- Extended documentation for the frame step.
- Included a new `getMinimumPixelThresholdForOptimization` function that returns a number representing the minimum number of pixels in either dimension of the image required for optimization to be applied. This is used to determine whether to suggest an optimization pathway when vectorization is enabled.
## [40.4.0] - 30-04-2026
### Added
- The internal GraphQL client will now attempt to retry requests that are denied with a 429 (Too Many Requests) error.
## [40.3.20] - 30-04-2026
### Fixed
- One instance of GraphQL query mutations being used external to core in a way that breaks our test processes.
## [40.3.19] - 29-04-2026
### Fixed
- Various localization related issues across the client.
## [40.3.18] - 22-04-2026
### Fixed
- Permissions for changesets were not set correctly, causing the changelog to not update. This has been fixed and the changelog has been updated to reflect all changes since the last update.
## [40.3.17] - 22-04-2026
### Changed
- Bumped core one last time to verify the new changelog process works as expected.
## [40.3.15] - 22-04-2026
### Changed
- Bumped core once again to verify the new changelog process works as expected.
## [40.3.14] - 22-04-2026
### Changed
- Bumped core again to verify the new changelog process works as expected.
## [40.3.13] - 22-04-2026
### Changed
- Bumped core to verify the new changelog process works as expected.
## [40.3.11] - 20-04-2026
### Fixed
- If a product collection is assigned to a bundle, products not in the collection will be cleared from the bundle.
## [40.3.10] - 17-04-2026
### Fixed
- Personalization bug in new changelog process.
## [40.3.8] - 17-04-2026
### Added
- Changes to core build process will now notify subscribers
## [40.3.6] - 16-04-2026
### Fixed
- If a bundle is reloaded after products have been removed from its collection, the products are now removed from the bundle even if the bundle had no transactions.
## [40.3.1] - 24-03-2026
### Fixed
- Fixed workflows not loading in certain cases due to writing to non-readable fields.
## [40.2.0] - 23-03-2026
### Fixed
- Corrected a number of instances where lazy-loaded options were unintentionally not being used.
### Changed
- The Question step handle method `getDisplayType` now returns a promise to account for the changes to option lazy loading.
## [40.1.0] - 19-03-2026
### Changed
- Global property handles will now be considered "silent" if the current bundle's state has the aspect marked as "hidden", in addition to the current behaviour.
## [40.0.0] - 17-03-2026
### Changed
- Asset versions will now only return when applicable to the relevant asset. A new interface for dynamic thumbnail and image conversions via the `getTransformedAssetURL` function. This function takes the asset or url to be transformed and allows you to configured dimensions, format and quality in one place. This function should be used in place of any code you had that searched through asset versions for thumbnails or other related assets. the svg and video formats are still required to use asset versions for the time being however.
## [39.2.0] - 13-03-2026
### Changed
- The frame step now optionally allows passing an existing asset instead of vectorizing the current image selection, allowing for more flexible usage of the vectorization feature. The `vectorize` method on the frame step now accepts an optional `Asset` parameter to specify the asset to vectorize, and an optional `maxColors` parameter to specify the maximum number of colors for vectorization. If no asset is provided, it will default to vectorizing the current image selection as before.
## [39.1.1] - 11-03-2026
### Fixed
- Frame step should correctly load when an option with no variants is supplied.
## [39.1.0] - 11-03-2026
### Added
- Introduced the `silent` flag on Global Property Configuration Aspects (fields). Global Property Handles have the new method `isSilent(): boolean` which returns a value indicating whether the content should be displayed to the user, or silently applying its state without presenting an interactive choice.
## [38.0.0] - 11-03-2026
### Added
- Deployed the vectorization feature for frame steps allowing bad user content to be made safe and high quality for print.
## [37.1.0] - 10-03-2026
### Added
- `VariantResource` now has the field `category`, and `Variant` now has the utility method `getCategory`.
- A number of step handles now have a new method `isVariantCategoriesEnabled(): boolean`, which should be called to determine if the variants from their respective options should be categorized using the variant's associated `category` field.
## [37.0.2] - 05-03-2026
### Fixed
- Resolved a frame step loading issue where missing option variants would prevent the default variant from being selected, causing visual artifacts (squares) to appear.
## [37.0.1] - 04-03-2026
### Changed
- Don't delete workflows in read only mode
### Fixed
- Don't apply changes to bundle in readonly mode
## [37.0.0] - 04-03-2026
### Added
- `Bundle` now provides `getProductIds(): undefined | string[]`, `addProductId(id: string): Promise<void>;`, and `removeProductIds(ids: string[]): Promise<void>`. These replace the existing methods related to integration product ids.
- `Bundle` events: `bundle-products-added` and `bundle-products-removed`, related to the new methods.
### Removed
- `Bundle` methods `getIntegrationProductIds`, `addIntegrationProductId`, and `removeIntegrationProductIds`.
- `Bundle` events: `bundle-integration-products-added` and `bundle-integration-products-removed`.
## [36.1.1] - 03-03-2026
### Changed
- Updated the internal preview dependency to the latest version.
## [36.1.0] - 02-03-2026
### Added
- The option service now has the method `getTagsForAssets`.
## [36.0.0] - 02-03-2026
### Changed
- Refactored the `WorkflowManager`, `Bundle`, and option service internals to remove deprecated 3D transform management code, streamline default variant initialization, and extract lower-level helper functions into separate utility files for reduced file bloat.
- Moved `getDefaultVariant` from a standalone utility into the `OptionService` class, now accepting an optional `overrideDefaultVariantId` parameter for consistent default variant resolution across all step types.
## [35.0.1] - 01-03-2026
### Changed
- Updated the internal preview dependency to the latest version.
## [35.0.0] - 01-03-2026
### Added
- `WorkflowManager` now provides a `getInitialOptionIds(): Set<string>` method that returns the minimal set of option IDs required to satisfy the default initial loaded state of a workflow. The implementation simulates default variant selections, expands active scenes until stable, and collects option IDs from all renderable steps in the resulting state — ensuring options activated by default selections (and any conditions they satisfy) are included.
### Changed
- `StepHandle.getAvailableVariants()` and `StepHandle.getAllVariants()` are now asynchronous, returning `Promise<Variant[]>`. `getAllVariants()` now lazy-loads variants via the option service if they are not already populated on the step.
- Workflow initialization now fetches required initial options concurrently with conversion configuration using `Promise.all`, improving load performance.
### Removed
- **`client.authenticateBundleFromLocalStorage()`** has been removed.
- **`client.authenticateTransactionFromLocalStorage()`** has been removed.
- `BundleStateManager.applyStateToWorkflowExperience()`, `updateWorkflowExperienceTransform()`, and `activateWorkflowExperienceTransform()` have been removed. 3D transform management is no longer handled via bundle state.
- The following types have been removed from the public API: `Vector3`, `Transform`, `TransformCollection`, `TransformCollectionTransform`, and `BundleStateTransform`. The `transform`, `activeTransform`, and `transforms` fields have been removed from `BundleStateTransaction`.
- `overrideTheme` has been removed from the workflow request payload.
- The unused `introduction` implicit step type has been removed.
## [34.4.10] - 25-02-2026
### Changed
- GraphQL requests now skip fetching the integration object when the operation context indicates it is not needed, reducing unnecessary network calls when loading existing workflows.
### Fixed
- Fixed an issue where the integration was not correctly fetched when loading an existing workflow, by switching from an internal synchronous accessor to the full asynchronous `getIntegration()` method.
## [34.4.9] - 24-02-2026
### Changed
- The integration object is now fetched via the internal synchronous accessor during GraphQL context setup, avoiding a redundant network request on every API call.
### Fixed
- Resolved a recursion bug in the client's integration fetching logic by introducing a dedicated `getIntegrationInternal()` method that returns the cached integration without triggering a re-fetch loop.
## [34.4.8] - 24-02-2026
### Changed
- API requests now send the partner's beta flag setting at all times.
## [34.4.7] - 20-02-2026
### Fixed
- Network redirects are now correctly handled in more cases.
## [34.4.6] - 18-02-2026
### Fixed
- Now handles global configuration colors for illustration steps with one color channel.
## [34.4.5] - 11-02-2026
### Changed
- Updated network requests to only include ID for default variants reducing duplication and simplifying logic around variants. This should not have any effect on functionality but will improve performance in some cases.
## [34.4.4] - 02-02-2026
### Fixed
- Ensure mandatory flag is set for already set variants on reload.
## [34.4.3] - 20-01-2026
### Fixed
- Fixed an issue where stroke would not init properly on text step
## [34.4.2] - 20-01-2026
### Fixed
- `loadExistingWorkflowExperiences` removes any products that are no longer in the product collection.
## [34.4.1] - 16-12-2025
### Fixed
- Question steps now correctly respect the default variant override
## [34.4.0] - 10-12-2025
### Changed
- Default variant resolution across all step types (frame, illustration, picture, shape, question, text) now respects the `overrideDefaultVariantId` field on each step, allowing workflows to specify a non-standard default variant for any option.
## [34.3.1] - 10-12-2025
### Fixed
- Designs will now be updated on the server when the user modifies the design after initial creation.
## [34.3.0] - 03-12-2025
### Added
- New `findBundleForTransactions` GraphQL query that looks up the associated bundle for a given list of transaction IDs, enabling the ability to edit individual bundle transactions.
## [34.2.0] - 02-12-2025
### Changed
- Internal changes and improvements.
## [34.1.0] - 21-11-2025
### Changed
- Design creation API requests now include the partner's `X-Spiff-Beta` header when the partner has the beta flag enabled, ensuring beta features are available during the design creation process.
## [34.0.3] - 19-11-2025
### Fixed
- Fixed a GraphQL variable name mismatch in the `confirmWorkflowStates` query that was causing the workflow state confirmation step to fail during design creation.
## [34.0.2] - 19-11-2025
### Fixed
- Workflow state confirmation requests are now batched into chunks of 100 transactions to prevent excessively large GraphQL requests when creating designs for bundles with many transactions.
## [34.0.1] - 19-11-2025
### Changed
- SVG illustration elements without an explicit `fill` attribute now inherit the fill from their closest ancestor element (checking inline styles first, then attributes), rather than always defaulting to black. This improves color accuracy for nested SVG elements in illustration steps.
## [34.0.0] - 13-11-2025
### Changed
- During the design creation process, workflow states are now confirmed via a dedicated GraphQL query.
This improves performance and reliability when creating designs for multiple transactions.
### Removed
- `createDesign` is no longer available and anything that relied upon it has been wired to the bulk
function which can handle creating multiple designs at once.
## [33.13.5] - 13-11-2025
### Removed
- Revert "Black fill fix (#355)"
## [33.13.4] - 12-11-2025
### Fixed
- Fix persisted state becoming clobbered when performing multiple calls to `client.getWorkflowExperiences` in parallel.
## [33.13.3] - 11-11-2025
### Fixed
- Corrected non-deterministic behavior with (de)serializing layout states for frame steps with multiple regions.
## [33.13.2] - 11-11-2025
### Added
- The `externalOrderId` and `internalOrderId` fields are now fetched as part of the bundle's base GraphQL fields, making order identification data available on the `Bundle` type.
## [33.13.1] - 10-11-2025
### Fixed
- Resolved an issue occurring when duplicating bundles causing recipient information to fail to load.
## [33.13.0] - 10-11-2025
### Added
- Added `prevalidated` argument to `updateRecipient` methods for addresses that have already been validated by external means.
## [33.12.0] - 10-11-2025
### Changed
- Further improved performance of loading large Bundles and creating/loading large amounts of Transactions.
## [33.11.0] - 07-11-2025
### Added
- Added new method to `Bundle`: `removeIntegrationProductIds(ids: string[]): Promise<void>`
## [33.10.0] - 07-11-2025
### Added
- `Bundle` initialization now accepts an optional `transactionLoadProgressCallback` parameter of type `(loaded: number, total: number) => void`, which fires as existing workflow experiences are loaded, allowing consumers to display a loading progress indicator.
## [33.9.0] - 06-11-2025
### Changed
- Improved performance when loading many WorkflowExperiences at the same time.
## [33.8.5] - 03-11-2025
### Changed
- Improved performance when loading many WorkflowExperiences at the same time.
## [33.8.4] - 03-11-2025
### Fixed
- Corrected address validation utility functions that could incorrectly return `undefined` instead of a valid result.
## [33.8.3] - 02-11-2025
### Fixed
- `Bundle.addIntegrationProductId` no longer adds duplicate integration product ids. The callback event is however still fired.
### Changed
- `Bundle.addIntegrationProductId` is now asynchronous.
## [33.8.2] - 31-10-2025
### Added
- The option GraphQL fragment now includes the `integrationOptions` field (with `id` and `integrationId`), making integration-specific option data available when loading workflow steps.
## [33.8.1] - 30-10-2025
### Added
- New events for changing product and recipient on experience
## [33.8.0] - 29-10-2025
### Added
- Custom data fields on Conversion Configurations may now optionally link to an Option. You should use this Option to drive the selections and provide the selected variant ID as the user's selection when updating a recipient. This process may be more strongly enforced in the future.
## [33.7.0] - 29-10-2025
### Added
- New `clearProduct()` method on `WorkflowExperience` that removes the currently assigned product and workflow from the experience, resetting the transaction's product and integration product fields on both the client and server.
## [33.6.0] - 28-10-2025
### Added
- New exported function `getIntegrationProducts(ids: string[])` that fetches integration products by their IDs, returning each product's `id` and associated `product.id` and `product.name`.
## [33.5.3] - 28-10-2025
### Fixed
- Await async method in applyGlobalPropertyState
## [33.5.2] - 28-10-2025
### Removed
- Reverted the automatic black fill assignment for SVG elements without explicit fills, as this caused unintended rendering of illustration steps.
## [33.5.1] - 24-10-2025
### Fixed
- The `quantity` field is now included in the transaction read query, ensuring quantity data is available when loading existing transactions.
## [33.5.0] - 23-10-2025
### Added
- A new callback is now fired when a transaction has been fully initialized during workflow experience creation, allowing consumers to be notified when the transaction is ready for interaction.
## [33.4.2] - 23-10-2025
### Fixed
- The `bundleStateData` field is now included in the `duplicateBundle` GraphQL mutation response, ensuring bundle state is preserved when duplicating a bundle.
## [33.4.1] - 21-10-2025
### Fixed
- Valid calls to `deleteBundle` should no longer fail due to invalid authorization.
## [33.4.0] - 21-10-2025
### Added
- Bundles now have an `updatedAt` field, which is automatically updated on the server whenever changes are made.
## [33.2.4] - 20-10-2025
### Fixed
- Recipient information is now populated correctly when creating new transactions via `getWorkflowExperience` with `GetWorkflowFromIntegrationProductOptions` or `GetWorkflowFromExternalProductOptions`.
## [33.2.3] - 20-10-2025
### Fixed
- Removed overly strict validation checks on optional `quantity` and `recipient` parameters when creating workflow experiences, which were preventing valid calls with partial data from succeeding.
## [33.2.2] - 20-10-2025
### Fixed
- Quantity and recipient now supported on all create cases
## [33.2.1] - 20-10-2025
### Fixed
- Quantity & recipient data not reading on blank workflows
## [33.2.0] - 20-10-2025
### Changed
- Global aspects can now be configured to check their conditions using a logical "AND" or "OR", rather than just "OR".
## [33.1.0] - 20-10-2025
### Fixed
- Global aspects that are transitively conditional now get cleared correctly when deactivated.
## [33.0.0] - 19-10-2025
### Changed
- Updated `WorkflowExperience` to store `transaction`, `product`, `profanityList`, and `workflow` as direct properties, initialized in the constructor for improved encapsulation and performance.
### Added
- 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.
- Introduced `getIntegrationProductIds()` and `addIntegrationProductId(id: string)` methods to `Bundle` and `BundleImpl` for tracking associated integration product IDs.
- Added GraphQL mutation for updating a transaction's integration product, enabling backend synchronization of integration product changes.
- Added `getState()` method to `BundleStateManager` for easier external access to the current bundle state.
## [32.4.0] - 15-10-2025
### Added
- The interface `GetWorkflowFromIntegrationProductOptions` now has optional `quantity` and `recipient` arguments.
## [32.3.1] - 09-10-2025
### Added
- Added the `SelectionChanged` event to `WorkflowExperienceEventType`. This event fires whenever the selection in a workflow experience changes. This includes changes to variant selections.
## [32.3.0] - 08-10-2025
### Added
- Added the new global function `deleteBundle` which takes a bundle id string and deletes the marks the bundle as deleted on the server.
## [32.2.7] - 08-10-2025
### Fixed
- Calling `finish()` on a completed bundle now correctly re-computes and returns the full design creation results instead of returning an empty items array on subsequent calls.
## [32.2.6] - 01-10-2025
### Fixed
- Resolved an issue where `finish` function on `Bundle` would return no items if the bundle was being edited.
## [32.2.5] - 01-10-2025
### Fixed
- Fixed various bugs with custom colors for global properties.
## [32.2.4] - 29-09-2025
### Fixed
- Fixed a regression from 32.2.3 which causes defaults to incorrectly be applied when applying a saved global state to a bundle.
## [32.2.3] - 29-09-2025
### Fixed
- Whenever global property handles change, they will correctly apply their defaults if no value is set.
## [32.2.2] - 29-09-2025
### Fixed
- Text steps will no longer incorrectly clear templated text under certain configurations.
## [32.2.1] - 24-09-2025
### Changed
- Whenever the Global Property State of a bundle has changed, every active handle will re-apply their current state.
## [32.2.0] - 24-09-2025
### Added
- Added new field `addressValidationStatus` on the Transaction type, which is fetched whenever the transaction is read.
### Changed
- When calling `overrideWorkflowExperienceRecipientAddress`, the associated Transaction's `addressValidationStatus` is updated locally.
## [32.1.1] - 23-09-2025
### Fixed
- Exported additional type definitions from the package index to make newly added types available to consumers.
## [32.1.0] - 23-09-2025
### Added
- Added new `overrideWorkflowExperienceRecipientAddress` function to override the address of a specific workflow experience recipient.
## [32.0.2] - 22-09-2025
### Fixed
- The `updateRecipient` method now uses nullish coalescing (`??`) instead of logical OR (`||`) when merging recipient fields, allowing empty strings to correctly clear field values instead of being ignored.
## [32.0.1] - 22-09-2025
### Changed
- Internal changes and improvements.
## [32.0.0] - 16-09-2025
### Changed
- Added `getMandatoryUnfulfilledSteps()` method to `WorkflowManager` that returns the step names of all active mandatory steps that have not yet been fulfilled. Also exposed `traversableScenes()` as a public method on `WorkflowManager`.
## [31.4.0] - 10-09-2025
### Added
- Fetching new `limit` option for Theme Configurations
## [31.3.0] - 10-09-2025
### Added
- The function `ProductCollection.fetchProductsFeed` now supports an additional metafield filters parameter for filtering via attached workflows.
## [31.2.4] - 07-09-2025
### Fixed
- Vertical text steps now respect region boundaries, even if the text is really long.
## [31.2.3] - 01-09-2025
### Fixed
- The `collectionId` field is now included in the `BundleDesignCreationMessage` returned by `Bundle.finish()`, ensuring the product collection ID is available in the completion event data.
## [31.2.2] - 01-09-2025
### Fixed
- Text steps with templated input should have their font correctly resized in appropriate situations.
- The templating context for a WorkflowManager now correctly provides first/last name fields with a custom `uniqueIdentifier`.
## [31.2.1] - 01-09-2025
### Added
- The `BundleDesignCreationMessage` returned by `Bundle.finish()` now includes the `name`, `dispatchDate`, `purchaseOrder`, and `collectionName` fields, providing richer context in the completion event for iframe consumers.
## [31.2.0] - 01-09-2025
### Added
- The product collection GraphQL fragment now fetches `productCollectionCustomers` with their associated `customer.id`, making customer association data available when loading product collections.
## [31.1.0] - 01-09-2025
### Added
- The function `ProductCollection.fetchProductsFeed` now supports an additional string parameter to further filter the returned products by name.
## [31.0.0] - 29-08-2025
### Added
- Latest versions of internal build tools and libraries. EG. Vite and ESLint
## [30.2.2] - 01-09-2025
### Added
- The `collectionId` field will now be available on the complete event.
## [30.2.1] - 01-09-2025
### Added
- The `name`, `dispatchDate`, `purchaseOrder` and `collectionName` fields will now be available on the complete event.
## [30.2.0] - 01-09-2025
### Added
- The `getOrCreateCustomer` call will fetch an existing customer's product collection customers.
## [30.0.1] - 27-08-2025
### Changed
- Removed an unnecessary Preact import from the Bundle module.
- When global property state is fully re-applied to a bundle, mandatory handle change events are now correctly fired, ensuring the UI reflects the current mandatory status of all global property handles.
## [30.0.0] - 27-08-2025
### Added
- The `updateRecipient` method now has extra arguments, primarily for custom fields.
## [29.4.0] - 27-08-2025
### Changed
- The recipient create and update GraphQL mutations now support additional fields: `apartment`, `customField1` through `customField5`, and `conversionConfigurationId`, enabling custom recipient column data to be stored and retrieved.
## [29.3.0] - 27-08-2025
### Added
- Added new functionality regarding mandatory Global Property aspects:
- New function `GlobalPropertyHandle.isMandatory(): boolean`: returns a boolean indicating whether the aspect has been marked as required to be completed before the user can continue.
- New function `GlobalPropertyHandle.isMandatoryFulfilled(): boolean`: returns a boolean indicating whether the aspect has been marked as "completed" for mandatory checks. Note that this function always returns `true` if the aspect has not been marked as mandatory.
- New event on Bundle `global-properties-mandatory-changed`: Fires whenever any global property's mandatory states have changed. Provides an object with the following shape: `{ changed: GlobalPropertyHandle[]; completed: GlobalPropertyHandle[]; remaining: GlobalPropertyHandle[]; }`
## [29.2.0] - 25-08-2025
### Added
- Added the function `TextGlobalPropertyHandle.isTemplatingEnabled(): boolean`. Use this to determine whether you should display any templating tools.
## [29.1.2] - 24-08-2025
### Changed
- Text steps now render any templated values prior to calculating the character limit
## [29.1.1] - 20-08-2025
### Fixed
- Inputting an incorrect code when calling `verifyCode` will no longer prevent you from succeeding if you then input the correct code in a subsequent request.
## [29.1.0] - 19-08-2025
### Changed
- Added persona-related fields to the GraphQL query definitions, enabling the persona form builder feature for customized user input collection.
## [29.0.4] - 14-08-2025
### Fixed
- Existing dispatchDate is now correctly applied when reloading a bundle
## [29.0.3] - 14-08-2025
### Added
- `getDispatchStartDate` method to `ProductCollection`.
- `getDispatchEndDate` method to `ProductCollection`.
## [29.0.2] - 08-08-2025
### Fixed
- `getExportedStepData` now returns only steps with properties as per original behavior.
## [29.0.1] - 07-08-2025
### Fixed
- Missing `ExportedStepData` types.
## [29.0.0] - 07-08-2025
### Changed
- The `getExportedData` method has been renamed `getExportedStepData` for clarity, it now returns a list of steps and their metadata chronological to the workflow. Localization has also been removed as this is a theme concern.
## [28.0.2] - 31-07-2025
### Fixed
- Fixed an issue where reloading a bundle would not correctly restore the global property state, by ensuring state is re-applied to the client after re-initialization.
## [28.0.1] - 30-07-2025
### Fixed
- Fixed bundle reload incorrectly overwriting existing global property state with defaults. Default variant initialization now checks if an aspect already has a value before applying the default, preventing saved state from being clobbered on reload.
## [28.0.0] - 30-07-2025
### Changed
- The `duplicateBundle` method now returns a function that creates a bundle object, rather than creating the object automatically.
### Fixed
- Fixed bugs around reloading state.
## [27.3.0] - 28-07-2025
### Added
- CurrencyService & CurrencyContext can now be used to correctly transform values for display. See `client.getCurrencyContext`
## [27.2.1] - 28-07-2025
### Fixed
- `WorkflowExperience.assignCustomerDetails` should no longer fail when you have ownership of the associated Transaction.
## [27.2.0] - 24-07-2025
### Added
- Bundles now have the `applyGlobalPropertyState` method for copying one global state onto another.
## [27.1.1] - 23-07-2025
### Fixed
- Correctly the case of handle multiple text steps that are conditional and share a text aspect.
## [27.1.0] - 17-07-2025
### Changed
- Added support for Handlebars in text steps.
## [27.0.0] - 15-07-2025
### Changed
- Modified the functions for logging in as a customer.
## [26.42.1] - 14-07-2025
### Added
- New exported function `getGlobalPropertyStateForBundle(bundleId: string)` that fetches the raw `GlobalPropertyState` for a given bundle ID via GraphQL, enabling external access to a bundle's global property state without needing a full bundle instance.
## [26.42.0] - 14-07-2025
### Changed
- Internal changes and improvements.
## [26.41.2] - 13-07-2025
### Fixed
- The customer bundles feed GraphQL query now includes the `globalPropertyConfiguration.id` field, ensuring the global property configuration ID is available when listing bundles for a customer.
## [26.41.1] - 10-07-2025
### Fixed
- The bundle read and duplicate GraphQL queries now include the `template` field, and the update bundle mutation has been reformatted for clarity with proper multi-line variable definitions.
## [26.41.0] - 10-07-2025
### Added
- New `getTemplate(): boolean` method on `Bundle` that indicates whether the bundle is a template. Also added `getCurrentStakeholder()` method documentation and the `getQuoteId()` JSDoc.
## [26.40.0] - 09-07-2025
### Added
- Added `setDispatchDate` and `setPurchaseOrder` to `Bundle`.
## [26.39.1] - 09-07-2025
### Changed
- The `AddressComponent` type is now exported from the package, allowing consumers to use the address validation component types directly.
## [26.39.0] - 08-07-2025
### Fixed
- The function `fetchProductsFeed` on `ProductCollection` now correctly reads from the in-memory cache for repeated calls with the same inputs.
## [26.38.0] - 07-07-2025
### Added
- `WorkflowManager` now has the function `addRecipientCallback` to listen to changes to the attached Recipient.
## [26.37.0] - 07-07-2025
### Added
- The `totalPriceSubunits` field is now included in the customer bundles feed GraphQL query, making the total price available when listing bundles for a customer.
## [26.36.0] - 03-07-2025
### Added
- The `company` field is now supported in recipient create and update operations, and the `updateRecipient` method on `WorkflowManager` now accepts an optional `company` parameter.
## [26.35.0] - 03-07-2025
### Added
- The `Bundle` type now has the `productsCount` property.
## [26.34.0] - 02-07-2025
### Changed
- Introduced a new `addressValidation` module with functions for validating recipient addresses against configured address validation rules, including the exported `AddressComponent` type and validation utilities.
## [26.33.0] - 02-07-2025
### Added
- The method `getBundlesForCustomer` now has an "ordered" option.
## [26.32.2] - 02-07-2025
### Added
- The customer bundles feed GraphQL query now includes `createdAt`, `transactionsCount`, `quoteId`, and `orderId` fields, providing richer data when listing bundles for a customer.
## [26.32.1] - 02-07-2025
### Changed
- Exported additional raw bundle-related type definitions from the package index.
## [26.32.0] - 25-06-2025
### Added
- The `mobile` field is now supported in recipient create and update operations, and the `updateRecipient` method on `WorkflowManager` now accepts an optional `mobile` parameter.
## [26.31.0] - 24-06-2025
### Fixed
- Fixed issues with authorizing certain requests affecting recipients.
## [26.30.2] - 24-06-2025
### Changed
- Exported the `Recipient` type from the package index, making it available for consumers to use directly.
## [26.30.1] - 23-06-2025
### Added
- The integration product GraphQL query now includes the `name` field on the associated product, making the product name available when fetching integration products.
## [26.30.0] - 23-06-2025
### Added
- New global function `getProductCollections`, which fetches a list of Product Collections by their ids.
## [26.29.4] - 20-06-2025
### Changed
- Internal changes and improvements.
## [26.29.3] - 19-06-2025
### Fixed
- The method `updateRecipient` now saves its arguments correctly.
## [26.29.2] - 18-06-2025
### Fixed
- Fixed the `updateRecipient` method not correctly persisting the recipient ID after creating a new recipient, which prevented subsequent recipient updates from targeting the correct record.
## [26.29.1] - 18-06-2025
### Fixed
- Fix issues with bleeding-edge endpoints.
## [26.29.0] - 18-06-2025
### Added
- The method `updateRecipient` on `WorkflowManager`.
## [26.28.0] - 18-06-2025
### Added
- The methods `filterProducts` and `fetchProductsFeed` on `ProductCollection` now accept the optional parameters `sortKey` and `sortDescending`. Sort key can be one of: Default, Name, Price.
## [26.27.1] - 18-06-2025
### Changed
- GraphQL network requests now correctly handle server redirects by detecting opaque redirect responses and re-sending the request to the appropriate regional endpoint (Moonlight), preventing failed API calls when the server issues a redirect.
## [26.27.0] - 11-06-2025
### Added
- The methods `filterProducts` and `fetchProductsFeed` on `ProductCollection` now accept an optional parameter `tags`, which is an object with the shape `{ include: string[]; exclude: string[]; }`. Only products that have all tags in `include` and no tags in `exclude` will be returned. If either array is provided as empty they will have no effect on the query.
## [26.26.1] - 28-05-2025
### Changed
- Removed verbose console logging from global property variant selection methods that was producing excessive output during normal operation.
## [26.26.0] - 27-05-2025
### Changed
- The event emitter on `Bundle` has been improved and made generic. Two new events will also now fire. One for a workflow being added and one for a workflow being removed.
### Added
- The `MetafieldManager` is now exposed for use. Certain functions such as CollectionProduct will now expose utility functions that allow pulling the metafields for the entity being called on.
## [26.25.0] - 21-05-2025
### Added
- Add metafield helper to collection products, include metafieldmanager
## [26.24.0] - 12-05-2025
### Changed
- The functions `getIntegrationProductById` and `getIntegrationProductFromExternalIds` now accept an additional boolean parameter that allows you to fetch all of the linked integration products on the product you have requested.
### Fixed
- The `duplicateBundle` call no longer fails due to missing GraphQl fragments.
## [26.23.4] - 12-05-2025
### Fixed
- Removed the strict file extension vs MIME type validation check for frame pattern images, as it was incorrectly rejecting valid image files whose extension did not exactly match their detected MIME type.
## [26.23.3] - 05-05-2025
### Changed
- Bundle state serialization now recursively strips the `__typename` field from the state object before persisting, preventing GraphQL metadata from being included in the stored state string.
## [26.23.2] - 16-04-2025
### Fixed
- The `duplicateBundle` will now correctly duplicate the global property state.
## [26.23.1] - 14-04-2025
### Fixed
- Fixed product collection filtering to correctly match products, resolving an issue where certain collection products were not being returned in filter results.
## [26.23.0] - 09-04-2025
### Changed
- Added new fields to the workflow/panel query types to support 2D panel configuration data on workflows.
## [26.22.1] - 07-04-2025
### Changed
- Updated the Preact dependency to a newer version.
## [26.22.0] - 07-04-2025
### Changed
- The `approve` and `reject` functions on `Bundle` now accept a `stakeholderId?: string` to specify which stakeholder you are interacting as.
## [26.21.1] - 03-04-2025
### Fixed
- Fixed a bug around illustrations in global configurations being initializd with the incorrect amount of channel aspects.
## [26.21.0] - 01-04-2025
### Added
- The `getQuoteCompleteMessage` method on bundles. Pass the return value of this method to Theme Bridge's `SpiffThemeLoader.completeQuote` method.
## [26.20.0] - 30-03-2025
### Added
- Added new methods to the `FileUploadGlobalPropertyHandle` for overriding SVG colors:
- `getImageWithColors`: Returns a promise that resolves with the current image with the current color configuration, if applicable.
- `getAvailableColors`: Returns the colors from the configured color option.
- `getCurrentColors`: Returns the current color configuration.
- `isColorPickerEnabled` and `isPmsPickerEnabled`: Return whether the color picker and pms picker are enabled, respectively.
- `getOriginalColors`: Returns a promise that resolves with the original color configuration of the image asset.
- `changeColors`: Updates the current color configuration and propagates the changes to all connected workflow experiences.
## [26.19.0] - 25-03-2025
### Added
- The `generateQuoteId` method on bundles.
## [26.18.0] - 24-03-2025
### Added
- Added `OneToOne` mode to `BundleDesignCreationCartAddMode`, which adds each Transaction of a Bundle to the cart as individual line items.
## [26.17.1] - 24-03-2025
### Changed
- Internal changes and improvements.
## [26.17.0] - 24-03-2025
### Added
- The object returned by `Bundle.finish()`, `BundleDesignCreationMessage`, has a new field `cartAddMode?: BundleDesignCreationCartAddMode`. This controls the strategy for adding the items of a Bundle to an ecommerce cart.
## [26.16.2] - 18-03-2025
### Changed
- Internal changes and improvements.
## [26.16.1] - 17-03-2025
### Changed
- If both the partner and workflow have terms and conditions, the workflow wins.
## [26.16.0] - 16-03-2025
### Changed
- The `minimumOrderQuantity` field is now fetched as part of product queries, making minimum order quantity data available on products for validation and display purposes.
## [26.15.1] - 05-03-2025
### Changed
- The `assignProductCollection` method on `Bundle` now always updates the local product collection reference and re-initializes the global property configuration, even if one was already set, allowing product collections to be reassigned.
## [26.15.0] - 03-03-2025
### Added
- Methods on experiences and bundles to attach addresses and organizations.
## [26.14.0] - 02-03-2025
### Fixed
- Fixed bundle loading to correctly handle readonly mode by skipping default variant initialization, and improved global property state initialization to properly handle cases where the state is not yet available. Also improved channel calculation for illustration steps in global configurations.
## [26.13.0] - 27-02-2025
### Changed
- The selectVariant method of ColorOptionGlobalPropertyHandle objects now has an optional `channel` parameter for color channels.
## [26.12.0] - 26-02-2025
### Changed
- The global function `getIntegration` now supports a second parameter, `themeConfigurationId`, which allows you to override the Theme Configuration that is returned on the object.
## [26.11.0] - 24-02-2025
### Changed
- The `createPreviewImage` parameter in `Bundle.finish()` is now provided a second argument, `shouldRender3D: boolean`, which can be passed to `WorkflowExperience.createPreviewImage()`
## [26.10.0] - 23-02-2025
### Added
- Ability to handle illustrations with asset configurations.
## [26.9.2] - 20-02-2025
### Changed
- Internal changes and improvements.
## [26.9.1] - 20-02-2025
### Fixed
- Resolved an issue allowing empty text to pass mandatory checks on the text step.
## [26.9.0] - 13-02-2025
### Changed
- `StepHandle.executeAnimations()` now accepts an optional `immediate` boolean parameter that is passed through to the model container's `executeAnimation` call, allowing animations to be triggered without transition effects.
## [26.8.1] - 12-02-2025
### Changed
- Updated the product terms and conditions query reference in the client.
## [26.8.0] - 05-02-2025
### Fixed
- Resolved an issue causing clients using module steps not to handle errors correctly.
## [26.7.9] - 20-01-2025
### Fixed
- Resolved an issue when duplicating a bundle causing any copied workflow experiences to be missing in the javascript class returned.
## [26.7.8] - 14-01-2025
### Changed
- Added diagnostic logging during global property default variant initialization to help trace issues with variant selection timing and state initialization order.
## [26.7.7] - 14-01-2025
### Changed
- Fixed a race condition during bundle initialization where default global property variants were being set concurrently with global property state initialization. Default variant initialization now waits for both the workflow experiences and state to be fully loaded before running.
## [26.7.6] - 10-01-2025
### Fixed
- Reverted the previous due to issues with other areas of opentype.
## [26.7.5] - 09-01-2025
### Added
- Updated opentype to access more functionality around font outlining.
## [26.7.4] - 09-01-2025
### Fixed
- The version of Opentype we use now correctly includes the fill functionality of the font outlining tool. Fill will now be correctly applied to any text outlined by this tool.
## [26.7.3] - 18-12-2024
### Added
- Added the `illustrationStep.isPMSPickerEnabled` function. This function returns a boolean indicating whether the PMS picker is enabled for the step.
## [26.7.2] - 02-12-2024
### Fixed
- Corrected an issue with `TextStepService.availableFillColors` not returning the correct colors under certain conditions.
## [26.7.1] - 28-11-2024
### Fixed
- Fixed frame step region element targeting to use the correct `FrameStepHandle` frame service when notifying about new elements, resolving issues with frame region element tracking after region changes.
## [26.7.0] - 27-11-2024
### Added
- Text steps now support custom stroke. Similar to other color customisation features, this is accessible via the functions `getAvailableStrokeColors`, `getStrokeColor`, and `setStrokeColor` on `TextStepHandle`.
The thickness of the stroke, the colors to select from, and other options, are configurable via the Spiff Hub in the Workflow editor.
## [26.6.1] - 27-11-2024
### Fixed
- Fixed frame step pattern image source resolution to use the correct SVG asset version URL, resolving rendering issues with frame patterns.
## [26.6.0] - 25-11-2024
### Changed
- When a product collection is assigned to a bundle, the global property configuration is now automatically set from the product collection's configuration, linking the bundle to the correct global property setup.
## [26.5.2] - 20-11-2024
### Fixed
- Fixed issues regarding EXIF orientation calculation throwing errors under specific conditions.
## [26.5.1] - 19-11-2024
### Fixed
- SVG Files uploaded to the platform will now have widths and heights specified in non-pixel values
stripped. This shouldn't have any effect on user uploads but will prevent the system from breaking when
encountering these values.
## [26.5.0] - 18-11-2024
### Added
- ProductCollection has a new function `fetchProductsFeed`, which fetches a paginated array of product collection products (entries in the product collection). Note that this does not edit the internal array of previously fetched products like `fetchProducts` does, so calls to `fetchProductsFeed` will not change the array that is returned by `getProducts`. If `fetchProducts` has already been called, or if the ProductCollection has been initialised with products, `fetchProductsFeed` will avoid making any network calls where it can.
## [26.4.4] - 15-11-2024
### Changed
- SVG path elements generated during font outlining no longer have the `xmlns` attribute set explicitly, as it was causing rendering issues in certain environments.
## [26.4.3] - 15-11-2024
### Changed
- SVG namespace attributes are now set after the element is appended to the DOM during font outlining, ensuring correct namespace resolution.
## [26.4.2] - 15-11-2024
### Changed
- SVG path elements generated during font outlining now have the correct SVG namespace (`xmlns`) explicitly set to ensure cross-browser compatibility.
## [26.4.1] - 08-11-2024
### Changed
- Asset fetch requests now include cache-busting headers to ensure the latest versions of assets are always retrieved from the server.
## [26.4.0] - 07-11-2024
### Added
- The client now has a `placeOrder` function. This allows ordering any combination of transactions. Remember that this may require additional permissions on the application key.
- Bundle now has a `placeOrder` function that will place an order for the bundle. The will create an order containing all transactions in the bundle. Remember that this may require additional permissions on the application key.
- Interface `Order` and `OrderItem` have been added to the package. These interfaces can be used with the new placeOrder functions.
## [26.3.0] - 04-11-2024
### Changed
- IllustrationStepHandle now accepts providing PMS values when calling `setColor`
- IllustrationStepHandle's `getAvailableColors` function now returns the names of the variants as PMS values.
## [26.2.0] - 04-11-2024
### Added
- Added font outlining functionality that converts text glyphs into SVG path elements, enabling text to be rendered as outlines for print and export purposes.
## [26.1.2] - 30-10-2024
### Fixed
- The ProductCollection class will no longer request the products it contains if they are already present in the cache.
## [26.1.1] - 30-10-2024
### Changed
- Merged some GraphQL calls to reduce the number of requests made when loading a bundle.
## [26.1.0] - 30-10-2024
### Changed
- Several internal functions have been changed, been merged or removed. This should not affect any public API.
- `rehydrateSerializedLayout` is no longer exported from the package. No functionality is intended to take its place. The function was always intended for internal use only.
## [26.0.0] - 29-10-2024
### Changed
- `getWorkflowExperience` has removed 3 deprecated parameters in favor of the options object. The options object is no longer optional.
- `configureUrls` has been removed in favor of the `configure` function. Please use `configure` moving forwards.
- The client constructor should know be called with an application in most use cases. We'll continue locking down functionality to require this in the future.
## [25.1.4] - 29-10-2024
### Changed
- When loading an existing bundle, global property state is now loaded as part of the bundle initialization process, removing the need for a separate manual load step.
## [25.1.3] - 28-10-2024
### Changed
- Product filtering logic has been moved from the theme layer into the core package, making it available as a shared utility for all consumers.
## [25.1.2] - 27-10-2024
### Changed
- Internal changes and improvements.
## [25.1.1] - 25-10-2024
### Changed
- The bundle owner ID is now passed through to workflow experience loading, ensuring correct authorization when loading bundle transactions.
## [25.1.0] - 25-10-2024
### Added
- Ability to check whether customer has bundle templates
### Changed
- Remove legacy reference from default region settings
## [25.0.9] - 24-10-2024
### Changed
- Enabled Apollo client caching for certain frequently accessed GraphQL fields to reduce redundant network requests.
- Optimized bundle initialization by reducing unnecessary re-fetches during the setup phase.
## [25.0.8] - 23-10-2024
### Changed
- Improved GraphQL caching strategies to reduce redundant network requests during bundle and workflow operations.
## [25.0.7] - 23-10-2024
### Added
- The `completed` field is now available on bundle and transaction entities, indicating whether they have been finalized.
## [25.0.6] - 22-10-2024
### Changed
- Step tags are now populated from the workflow definition during step initialization, making tag metadata available on step handles.
## [25.0.5] - 22-10-2024
### Changed
- Text step metadata is no longer updated when the text value