@spiffcommerce/core
Version:
Core client API for interacting with the Spiff Commerce backend.
923 lines (495 loc) • 29.7 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.
## [34.4.1] - 16-12-2025
### Fixed
- Question steps now correctly respect the default variant override
## [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.0.0] - 12-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.4] - 12-11-2025
### Fixed
- Fix persisted state becoming clobbered when performing multiple calls to `client.getWorkflowExperiences` in parallel.
## [33.13.3] - 12-11-2025
### Fixed
- Corrected non-deterministic behavior with (de)serializing layout states for frame steps with multiple regions.
## [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.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.3] - 03-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.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.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] - 21-10-2025
### Fixed
- Recipient information is now populated correctly when creating new transactions via `getWorkflowExperience` with `GetWorkflowFromIntegrationProductOptions` or `GetWorkflowFromExternalProductOptions`.
## [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] - 14-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] - 16-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.6] - 08-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.0] - 23-09-2025
### Added
- Added new `overrideWorkflowExperienceRecipientAddress` function to override the address of a specific workflow experience recipient.
## [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] - 04-09-2025
### Fixed
- Vertical text steps now respect region boundaries, even if the text is really long.
## [30.2.2] - 01-09-2025
### Added
- The `collectionId` field will now be available on the complete event.
## [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`.
## [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.
## [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.0.0] - 27-08-2025
### Added
- The `updateRecipient` method now has extra arguments, primarily for custom fields.
## [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] - 25-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.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] - 06-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.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] - 16-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.40.0] - 10-07-2025
### Added
- Added `setDispatchDate` and `setPurchaseOrder` to `Bundle`.
## [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.35.0] - 03-07-2025
### Added
- The `Bundle` type now has the `productsCount` property.
## [26.33.0] - 02-07-2025
### Added
- The method `getBundlesForCustomer` now has an "ordered" option.
## [26.31.0] - 24-06-2025
### Fixed
- Fixed issues with authorizing certain requests affecting recipients.
## [26.30.0] - 23-06-2025
### Added
- New global function `getProductCollections`, which fetches a list of Product Collections by their ids.
## [26.29.3] - 19-06-2025
### Fixed
- The method `updateRecipient` now saves its arguments correctly.
## [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.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.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.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.2] - 16-04-2025
### Fixed
- The `duplicateBundle` will now correctly duplicate the global property state.
## [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] - 31-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] - 26-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.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.1] - 18-03-2025
### Changed
- If both the partner and workflow have terms and conditions, the workflow wins.
## [26.15.0] - 03-03-2025
### Added
- Methods on experiences and bundles to attach addresses and organizations.
## [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] - 24-02-2025
### Added
- Ability to handle illustrations with asset configurations.
## [26.9.1] - 20-02-2025
### Fixed
- Resolved an issue allowing empty text to pass mandatory checks on the text step.
## [26.8.0] - 06-02-2025
### Fixed
- Resolved an issue causing clients using module steps not to handle errors correctly.
## [26.7.9] - 21-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.6] - 10-01-2025
### Fixed
- Reverted the previous due to issues with other areas of opentype.
## [26.7.5] - 10-01-2025
### Added
- Updated opentype to access more functionality around font outlining.
## [26.7.4] - 19-12-2024
### 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.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.5.2] - 20-11-2024
### Fixed
- Fixed issues regarding EXIF orientation calculation throwing errors under specific conditions.
## [26.5.1] - 20-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.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.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] - 30-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.
## [22.0.0] - 10-07-2024
### Changed
- `matchHexToPms` now returns a list of objects of `{ pms: string; hex: string; }` rather than strings.
### Added
- `findPmsColors(input: string, limit?: number): PmsSearchResult[]`: A function to find PMS colors by name using fuzzy search.
## [21.8.1] - 27-03-2024
### Fixed
- `WorkflowExperience.getTotalPriceSubunits` no longer always returns the discounted price.
## [21.8.0] - 26-03-2024
### Added
- `Bundle.removeStakeholder(email: string): Promise<void>`: Removes a single stakeholder from the Bundle, via email address.
## [21.7.1] - 25-03-2024
### Fixed
- `Bundle.getAllStakeholders()` now returns correct results on subsequent calls.
## [21.7.0] - 25-03-2024
### Added
- `CollectionProduct.getAllWorkflows(): ProductWorkflow[]`: Returns all workflows associated with this product.
## [21.6.0] - 22-03-2024
### Added
- `WorkflowExperienceEventType.PriceBreakChanged`: The relevant event fires whenever the price break to be used in a WorkflowExperience changes. This even will fire when the quantity changes, and will also fire when in a Bundle when other WorkflowExperiences using the same Product have quantity changes (or are added & removed from the Bundle).
## [21.5.0] - 22-03-2024
### Changed
- `StepHandle`: The override global property state setting now has a different value for each Global Property Aspect type. The get/set functions have been renamed and have an extra parameter to determine the Aspect Type.
- `getOverrideGlobalPreviewConfiguration` -> `getOverrideGlobalPropertyConfiguration(type: AspectType): boolean`.
- `setOverrideGlobalPreviewConfiguration` -> `setOverrideGlobalPropertyConfiguration(type: AspectType, value: boolean): void`
## [21.4.1] - 21-03-2024
### Changed
- `readTransactionsQuery` now fetches `printFileUrl1` to `printFileUrl5` for each transaction.
## [21.4.0] - 20-03-2024
### Added
- `StepHandle`:
- `getOverrideGlobalPreviewConfiguration(): boolean`: Returns a boolean that indicates whether this step should override (ignore) Global Property state.
- `setOverrideGlobalPreviewConfiguration(value: boolean): void`: Modifies whether this step should override (ignore) Global Property state.
- `getGlobalPropertyAspects(configurationId: string): string[]`: Returns all Aspect names in the supplied Global Property Configuration that this step is configured to use.
- `Bundle.getGlobalPropertyConfiguration(): GlobalPropertyConfiguration | undefined`: Returns the Global Property Configuration object associated with the Bundle, if it exists.
## [21.3.1] - 20-03-2024
### Fixed
- When a `Bundle` is loaded by ID, the `WorkflowExperience` objects it loads will not correctly be linked internally. This resolves issues regarding price breaks not calculating correctly on bundle reload when multiple transactions share a product.
## [21.3.0] - 20-03-2024
### Added
- `WorkflowExperience.priceBreakToBeApplied()` returns the percentage that will be used in `WorkflowExperience.getTotalPriceSubunits()` and related methods.
### Changed
- `WorkflowExperience.getTotalPriceSubunits()` and related methods now consider price breaks in their calculations, but also now have a `disablePriceBreaks` argument.
## [21.2.1] - 15-03-2024
### Fixed
- Fixed Global Property Handles not updating values when WorkflowExperiences in the Bundle share the same Workflow.
## [21.2.0] - 15-03-2024
### Added
- `FileUploadGlobalPropertyHandle`:
- `hasImage(): boolean`: Returns a boolean value indicating if the associated state has an image.
- `getImage(): Promise<Asset | undefined>`: Retrieves the current image from the server.
## [21.1.1] - 15-03-2024
### Fixed
- Exported missing `AspectType` for global property handles.
## [21.1.0] - 14-03-2024
### Added
- `Bundle.hasGlobalProperties(): boolean`: Returns true when the bundle is linked to a Global Property Configuration.
## [21.0.1] - 13-03-2024
### Fixed
- Package now supplies this `CHANGELOG.md` in published releases.
## [21.0.0] - 13-03-2024
### Added
- `DesignCreationMessage` now has `quantity: number | undefined`.
### Changed
- `Bundle.finish()` no longer returns an array of `DesignCreationMessage` objects, but instead returns a `BundleDesignCreationMessage` object which wraps the array of `DesignCreationMessage` entries.
## [20.5.1] - 12-03-2024
### Fixed
- `WorkflowExperience.getSelectionPriceSubunits()` (and consequently `getTotalPriceSubunits()`) can no longer return `NaN`.
## [20.5.0] - 12-03-2024
### Added
- `WorkflowManager.injectIntoPreviewService()` now has a second argument `refocusCamera`, a boolean which allows you to disable the automatic refocusing of the camera when the model is loaded. This requires `@spiffcommerce/preview@^5.7.0`.
## [20.4.5] - 08-03-2024
### Added
- `RenderableScene` objects will now contain a `workflowScene: WorkflowScene` field. This is only provided for backwards compatibility and is considered deprecated functionality.
## [20.4.4] - 08-03-2024
### Fixed
- Updating quantity via `WorkflowExperience.setQuantity()` will now correctly update on the server.
## [20.4.3] - 08-03-2024
### Changed
- `WorkflowExperience.setQuantity()` now returns a promise that resolves once the quantity has been updated on the server.
## [20.4.0] - 08-03-2024
### Added
- `Transaction` entities now have `quantity: number | undefined`.
- New functions on `WorkflowExperience` for managing quantity:
- `getQuantity()`: The amount that was, or will be, ordered of the underlying `Transaction`. This will default to `1` if the value is undefined. If you want to read the raw value, use `getWorkflowManager().getTransaction().quantity`.
- `setQuantity(<number>)`: Updates the quantity value on the underlying `Transaction` entity. Must be >= 1.
- New events functionality on `WorkflowExperience`. Currently the only event is `QuantityChanged`.
- `addEventListener(<type>, <callback>)`: Registers a callback function to be called when the specified event is raised. The associated `WorkflowExperience` is passed as a parameter to the callback function.
- `removeEventListener(<type>, <callback>)`: Removes a previously registered callback.
## [20.3.0] - 07-03-2024
### Added
- `CollectionProduct.getCurrentIntegration()`: returns the `IntegrationProductResource` associated with the product that is linked to the current Integration (resolved via the application key).
## [20.2.2] - 05-03-2024
### Changed
- `WorkflowExperience.getStepById(<string>)` now internally caches the `StepHandle` objects that it creates. This resolves an issue with functional rendering systems that re-render when the object reference changes, where they would re-renderer whenever this function was called even if the object was identical.
## [20.2.1] - 29-02-2024
### Changed
- The union type `GetWorkflowOptions` has some of its entries wrapped in another union. The types that will create a brand new `Transaction` are now nested under `GetNewWorkflowOptions`:
```ts
// Before
export type GetWorkflowOptions =
| GetWorkflowFromTransactionOptions
| GetWorkflowFromIntegrationProductOptions
| GetWorkflowFromExternalProductOptions;
// After
export type GetNewWorkflowOptions =
| GetWorkflowFromIntegrationProductOptions
| GetWorkflowFromExternalProductOptions;
export type GetWorkflowOptions = GetWorkflowFromTransactionOptions | GetNewWorkflowOptions;
```
## [20.2.0] - 29-02-2024
### Added
- `SpiffCommerceClient.getIntegrationProduct(<options>)`: Fetches an `IntegrationProduct` object. Essentially a wrapper for the functions `getIntegrationProductById` and `getIntegrationProductFromExternalIds`. The options object type is as follows:
```ts
{
type: "integration";
integrationProductId: string;
} | {
type: "external";
externalIntegrationId: string;
externalProductId: string;
}
```
## [20.1.0] - 23-02-2024
### Added
- `IntegrationProduct.getAllWorkflows()`: Returns an array of `ProductWorkflow`, ordered by their internal `index` value (matches the order seen on the SpiffCommerce Hub).
## [20.0.1] - 23-02-2024
### Changed
- `StepHandle.executeAnimations()` now logs a warning to the console when the associated `WorkflowManager` is not associated with a `ThreeDPreviewService`.
## [20.0.0] - 15-02-2024
### Added
- Additional configuration options for GraphQL on bundles.
- A separate fetchProducts function on the ProductCollection interface.
### Changed
- Removed async on getProducts call.
### Removed
- Unused normalize.css file.
- Identical links assigned in each translation file.
- Duplicate index file for the english version.