@spiffcommerce/core 30.0.1 → 31.1.0-beta.c5afa5d3-4b53-5432-9ee2-0dbc6dca6200

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 CHANGED
@@ -7,12 +7,30 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  #### Types of changes
9
9
 
10
- - `Added` for new features.
11
- - `Changed` for changes in existing functionality.
12
- - `Deprecated` for soon-to-be removed features.
13
- - `Removed` for now removed features.
14
- - `Fixed` for any bug fixes.
15
- - `Security` in case of vulnerabilities.
10
+ - `Added` for new features.
11
+ - `Changed` for changes in existing functionality.
12
+ - `Deprecated` for soon-to-be removed features.
13
+ - `Removed` for now removed features.
14
+ - `Fixed` for any bug fixes.
15
+ - `Security` in case of vulnerabilities.
16
+
17
+ ## [30.2.0] - 01-09-2025
18
+
19
+ ## Added
20
+
21
+ - The `getOrCreateCustomer` call will fetch an existing customer's product collection customers.
22
+
23
+ ## [31.1.0] - 01-09-2025
24
+
25
+ ## Added
26
+
27
+ - The function `ProductCollection.fetchProductsFeed` now supports an additional string parameter to further filter the returned products by name.
28
+
29
+ ## [31.0.0] - 29-08-2025
30
+
31
+ ## Added
32
+
33
+ - Latest versions of internal build tools and libraries. EG. Vite and ESLint
16
34
 
17
35
  ## [30.0.0] - 27-08-2025
18
36
 
@@ -24,586 +42,586 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
24
42
 
25
43
  ## Added
26
44
 
27
- - Added new functionality regarding mandatory Global Property aspects:
28
- - 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.
29
- - 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.
30
- - 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[]; }`
45
+ - Added new functionality regarding mandatory Global Property aspects:
46
+ - 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.
47
+ - 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.
48
+ - 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[]; }`
31
49
 
32
50
  ## [29.2.0] - 25-08-2025
33
51
 
34
52
  ## Added
35
53
 
36
- - Added the function `TextGlobalPropertyHandle.isTemplatingEnabled(): boolean`. Use this to determine whether you should display any templating tools.
54
+ - Added the function `TextGlobalPropertyHandle.isTemplatingEnabled(): boolean`. Use this to determine whether you should display any templating tools.
37
55
 
38
56
  ## [29.1.2] - 25-08-2025
39
57
 
40
58
  ## Changed
41
59
 
42
- - Text steps now render any templated values prior to calculating the character limit
60
+ - Text steps now render any templated values prior to calculating the character limit
43
61
 
44
62
  ## [29.1.1] - 20-08-2025
45
63
 
46
64
  ## Fixed
47
65
 
48
- - 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.
66
+ - 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.
49
67
 
50
68
  ## [29.0.4] - 14-08-2025
51
69
 
52
70
  ## Fixed
53
71
 
54
- - Existing dispatchDate is now correctly applied when reloading a bundle
72
+ - Existing dispatchDate is now correctly applied when reloading a bundle
55
73
 
56
74
  ## [29.0.3] - 14-08-2025
57
75
 
58
76
  ## Added
59
77
 
60
- - `getDispatchStartDate` method to `ProductCollection`.
61
- - `getDispatchEndDate` method to `ProductCollection`.
78
+ - `getDispatchStartDate` method to `ProductCollection`.
79
+ - `getDispatchEndDate` method to `ProductCollection`.
62
80
 
63
81
  ## [29.0.2] - 08-08-2025
64
82
 
65
83
  ## Fixed
66
84
 
67
- - `getExportedStepData` now returns only steps with properties as per original behavior.
85
+ - `getExportedStepData` now returns only steps with properties as per original behavior.
68
86
 
69
87
  ## [29.0.1] - 07-08-2025
70
88
 
71
89
  ## Fixed
72
90
 
73
- - Missing `ExportedStepData` types.
91
+ - Missing `ExportedStepData` types.
74
92
 
75
93
  ## [29.0.0] - 06-08-2025
76
94
 
77
95
  ## Changed
78
96
 
79
- - 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.
97
+ - 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.
80
98
 
81
99
  ## [28.0.0] - 30-07-2025
82
100
 
83
101
  ## Changed
84
102
 
85
- - The `duplicateBundle` method now returns a function that creates a bundle object, rather than creating the object automatically.
103
+ - The `duplicateBundle` method now returns a function that creates a bundle object, rather than creating the object automatically.
86
104
 
87
105
  ## Fixed
88
106
 
89
- - Fixed bugs around reloading state.
107
+ - Fixed bugs around reloading state.
90
108
 
91
109
  ## [27.3.0] - 28-07-2025
92
110
 
93
111
  ## Added
94
112
 
95
- - CurrencyService & CurrencyContext can now be used to correctly transform values for display. See `client.getCurrencyContext`
113
+ - CurrencyService & CurrencyContext can now be used to correctly transform values for display. See `client.getCurrencyContext`
96
114
 
97
115
  ## [27.2.1] - 28-07-2025
98
116
 
99
117
  ## Fixed
100
118
 
101
- - `WorkflowExperience.assignCustomerDetails` should no longer fail when you have ownership of the associated Transaction.
119
+ - `WorkflowExperience.assignCustomerDetails` should no longer fail when you have ownership of the associated Transaction.
102
120
 
103
121
  ## [27.2.0] - 24-07-2025
104
122
 
105
123
  ## Added
106
124
 
107
- - Bundles now have the `applyGlobalPropertyState` method for copying one global state onto another.
125
+ - Bundles now have the `applyGlobalPropertyState` method for copying one global state onto another.
108
126
 
109
127
  ## [27.1.1] - 23-07-2025
110
128
 
111
129
  ## Fixed
112
130
 
113
- - Correctly the case of handle multiple text steps that are conditional and share a text aspect.
131
+ - Correctly the case of handle multiple text steps that are conditional and share a text aspect.
114
132
 
115
133
  ## [27.1.0] - 16-07-2025
116
134
 
117
135
  ## Changed
118
136
 
119
- - Added support for Handlebars in text steps.
137
+ - Added support for Handlebars in text steps.
120
138
 
121
139
  ## [27.0.0] - 15-07-2025
122
140
 
123
141
  ## Changed
124
142
 
125
- - Modified the functions for logging in as a customer.
143
+ - Modified the functions for logging in as a customer.
126
144
 
127
145
  ## [26.40.0] - 10-07-2025
128
146
 
129
147
  ## Added
130
148
 
131
- - Added `setDispatchDate` and `setPurchaseOrder` to `Bundle`.
149
+ - Added `setDispatchDate` and `setPurchaseOrder` to `Bundle`.
132
150
 
133
151
  ## [26.39.0] - 08-07-2025
134
152
 
135
153
  ## Fixed
136
154
 
137
- - The function `fetchProductsFeed` on `ProductCollection` now correctly reads from the in-memory cache for repeated calls with the same inputs.
155
+ - The function `fetchProductsFeed` on `ProductCollection` now correctly reads from the in-memory cache for repeated calls with the same inputs.
138
156
 
139
157
  ## [26.38.0] - 07-07-2025
140
158
 
141
159
  ## Added
142
160
 
143
- - `WorkflowManager` now has the function `addRecipientCallback` to listen to changes to the attached Recipient.
161
+ - `WorkflowManager` now has the function `addRecipientCallback` to listen to changes to the attached Recipient.
144
162
 
145
163
  ## [26.35.0] - 03-07-2025
146
164
 
147
165
  ## Added
148
166
 
149
- - The `Bundle` type now has the `productsCount` property.
167
+ - The `Bundle` type now has the `productsCount` property.
150
168
 
151
169
  ## [26.33.0] - 02-07-2025
152
170
 
153
171
  ## Added
154
172
 
155
- - The method `getBundlesForCustomer` now has an "ordered" option.
173
+ - The method `getBundlesForCustomer` now has an "ordered" option.
156
174
 
157
175
  ## [26.31.0] - 24-06-2025
158
176
 
159
177
  ## Fixed
160
178
 
161
- - Fixed issues with authorizing certain requests affecting recipients.
179
+ - Fixed issues with authorizing certain requests affecting recipients.
162
180
 
163
181
  ## [26.30.0] - 23-06-2025
164
182
 
165
183
  ## Added
166
184
 
167
- - New global function `getProductCollections`, which fetches a list of Product Collections by their ids.
185
+ - New global function `getProductCollections`, which fetches a list of Product Collections by their ids.
168
186
 
169
187
  ## [26.29.3] - 19-06-2025
170
188
 
171
189
  ## Fixed
172
190
 
173
- - The method `updateRecipient` now saves its arguments correctly.
191
+ - The method `updateRecipient` now saves its arguments correctly.
174
192
 
175
193
  ## [26.29.1] - 18-06-2025
176
194
 
177
195
  ### Fixed
178
196
 
179
- - Fix issues with bleeding-edge endpoints.
197
+ - Fix issues with bleeding-edge endpoints.
180
198
 
181
199
  ## [26.29.0] - 18-06-2025
182
200
 
183
201
  ### Added
184
202
 
185
- - The method `updateRecipient` on `WorkflowManager`.
203
+ - The method `updateRecipient` on `WorkflowManager`.
186
204
 
187
205
  ## [26.28.0] - 18-06-2025
188
206
 
189
207
  ### Added
190
208
 
191
- - The methods `filterProducts` and `fetchProductsFeed` on `ProductCollection` now accept the optional parameters `sortKey` and `sortDescending`. Sort key can be one of: Default, Name, Price.
209
+ - The methods `filterProducts` and `fetchProductsFeed` on `ProductCollection` now accept the optional parameters `sortKey` and `sortDescending`. Sort key can be one of: Default, Name, Price.
192
210
 
193
211
  ## [26.27.0] - 11-06-2025
194
212
 
195
213
  ### Added
196
214
 
197
- - 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.
215
+ - 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.
198
216
 
199
217
  ## [26.26.0] - 27-05-2025
200
218
 
201
219
  ### Changed
202
220
 
203
- - 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.
221
+ - 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.
204
222
 
205
223
  ### Added
206
224
 
207
- - 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.
225
+ - 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.
208
226
 
209
227
  ## [26.24.0] - 12-05-2025
210
228
 
211
229
  ### Changed
212
230
 
213
- - 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.
231
+ - 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.
214
232
 
215
233
  ### Fixed
216
234
 
217
- - The `duplicateBundle` call no longer fails due to missing GraphQl fragments.
235
+ - The `duplicateBundle` call no longer fails due to missing GraphQl fragments.
218
236
 
219
237
  ## [26.23.2] - 16-04-2025
220
238
 
221
239
  ### Fixed
222
240
 
223
- - The `duplicateBundle` will now correctly duplicate the global property state.
241
+ - The `duplicateBundle` will now correctly duplicate the global property state.
224
242
 
225
243
  ## [26.22.0] - 07-04-2025
226
244
 
227
245
  ### Changed
228
246
 
229
- - The `approve` and `reject` functions on `Bundle` now accept a `stakeholderId?: string` to specify which stakeholder you are interacting as.
247
+ - The `approve` and `reject` functions on `Bundle` now accept a `stakeholderId?: string` to specify which stakeholder you are interacting as.
230
248
 
231
249
  ## [26.21.1] - 03-04-2025
232
250
 
233
251
  ### Fixed
234
252
 
235
- - Fixed a bug around illustrations in global configurations being initializd with the incorrect amount of channel aspects.
253
+ - Fixed a bug around illustrations in global configurations being initializd with the incorrect amount of channel aspects.
236
254
 
237
255
  ## [26.21.0] - 01-04-2025
238
256
 
239
257
  ### Added
240
258
 
241
- - The `getQuoteCompleteMessage` method on bundles. Pass the return value of this method to Theme Bridge's `SpiffThemeLoader.completeQuote` method.
259
+ - The `getQuoteCompleteMessage` method on bundles. Pass the return value of this method to Theme Bridge's `SpiffThemeLoader.completeQuote` method.
242
260
 
243
261
  ## [26.20.0] - 31-03-2025
244
262
 
245
263
  ### Added
246
264
 
247
- - Added new methods to the `FileUploadGlobalPropertyHandle` for overriding SVG colors:
248
- - `getImageWithColors`: Returns a promise that resolves with the current image with the current color configuration, if applicable.
249
- - `getAvailableColors`: Returns the colors from the configured color option.
250
- - `getCurrentColors`: Returns the current color configuration.
251
- - `isColorPickerEnabled` and `isPmsPickerEnabled`: Return whether the color picker and pms picker are enabled, respectively.
252
- - `getOriginalColors`: Returns a promise that resolves with the original color configuration of the image asset.
253
- - `changeColors`: Updates the current color configuration and propagates the changes to all connected workflow experiences.
265
+ - Added new methods to the `FileUploadGlobalPropertyHandle` for overriding SVG colors:
266
+ - `getImageWithColors`: Returns a promise that resolves with the current image with the current color configuration, if applicable.
267
+ - `getAvailableColors`: Returns the colors from the configured color option.
268
+ - `getCurrentColors`: Returns the current color configuration.
269
+ - `isColorPickerEnabled` and `isPmsPickerEnabled`: Return whether the color picker and pms picker are enabled, respectively.
270
+ - `getOriginalColors`: Returns a promise that resolves with the original color configuration of the image asset.
271
+ - `changeColors`: Updates the current color configuration and propagates the changes to all connected workflow experiences.
254
272
 
255
273
  ## [26.19.0] - 26-03-2025
256
274
 
257
275
  ### Added
258
276
 
259
- - The `generateQuoteId` method on bundles.
277
+ - The `generateQuoteId` method on bundles.
260
278
 
261
279
  ## [26.18.0] - 24-03-2025
262
280
 
263
281
  ### Added
264
282
 
265
- - Added `OneToOne` mode to `BundleDesignCreationCartAddMode`, which adds each Transaction of a Bundle to the cart as individual line items.
283
+ - Added `OneToOne` mode to `BundleDesignCreationCartAddMode`, which adds each Transaction of a Bundle to the cart as individual line items.
266
284
 
267
285
  ## [26.17.0] - 24-03-2025
268
286
 
269
287
  ### Added
270
288
 
271
- - 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.
289
+ - 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.
272
290
 
273
291
  ## [26.16.1] - 18-03-2025
274
292
 
275
293
  ### Changed
276
294
 
277
- - If both the partner and workflow have terms and conditions, the workflow wins.
295
+ - If both the partner and workflow have terms and conditions, the workflow wins.
278
296
 
279
297
  ## [26.15.0] - 03-03-2025
280
298
 
281
299
  ### Added
282
300
 
283
- - Methods on experiences and bundles to attach addresses and organizations.
301
+ - Methods on experiences and bundles to attach addresses and organizations.
284
302
 
285
303
  ## [26.13.0] - 27-02-2025
286
304
 
287
305
  ### Changed
288
306
 
289
- - The selectVariant method of ColorOptionGlobalPropertyHandle objects now has an optional `channel` parameter for color channels.
307
+ - The selectVariant method of ColorOptionGlobalPropertyHandle objects now has an optional `channel` parameter for color channels.
290
308
 
291
309
  ## [26.12.0] - 26-02-2025
292
310
 
293
311
  ### Changed
294
312
 
295
- - The global function `getIntegration` now supports a second parameter, `themeConfigurationId`, which allows you to override the Theme Configuration that is returned on the object.
313
+ - The global function `getIntegration` now supports a second parameter, `themeConfigurationId`, which allows you to override the Theme Configuration that is returned on the object.
296
314
 
297
315
  ## [26.11.0] - 24-02-2025
298
316
 
299
317
  ### Changed
300
318
 
301
- - The `createPreviewImage` parameter in `Bundle.finish()` is now provided a second argument, `shouldRender3D: boolean`, which can be passed to `WorkflowExperience.createPreviewImage()`
319
+ - The `createPreviewImage` parameter in `Bundle.finish()` is now provided a second argument, `shouldRender3D: boolean`, which can be passed to `WorkflowExperience.createPreviewImage()`
302
320
 
303
321
  ## [26.10.0] - 24-02-2025
304
322
 
305
323
  ### Added
306
324
 
307
- - Ability to handle illustrations with asset configurations.
325
+ - Ability to handle illustrations with asset configurations.
308
326
 
309
327
  ## [26.9.1] - 20-02-2025
310
328
 
311
329
  ### Fixed
312
330
 
313
- - Resolved an issue allowing empty text to pass mandatory checks on the text step.
331
+ - Resolved an issue allowing empty text to pass mandatory checks on the text step.
314
332
 
315
333
  ## [26.8.0] - 06-02-2025
316
334
 
317
335
  ### Fixed
318
336
 
319
- - Resolved an issue causing clients using module steps not to handle errors correctly.
337
+ - Resolved an issue causing clients using module steps not to handle errors correctly.
320
338
 
321
339
  ## [26.7.9] - 21-01-2025
322
340
 
323
341
  ### Fixed
324
342
 
325
- - Resolved an issue when duplicating a bundle causing any copied workflow experiences to be missing in the javascript class returned.
343
+ - Resolved an issue when duplicating a bundle causing any copied workflow experiences to be missing in the javascript class returned.
326
344
 
327
345
  ## [26.7.6] - 10-01-2025
328
346
 
329
347
  ### Fixed
330
348
 
331
- - Reverted the previous due to issues with other areas of opentype.
349
+ - Reverted the previous due to issues with other areas of opentype.
332
350
 
333
351
  ## [26.7.5] - 10-01-2025
334
352
 
335
353
  ### Added
336
354
 
337
- - Updated opentype to access more functionality around font outlining.
355
+ - Updated opentype to access more functionality around font outlining.
338
356
 
339
357
  ## [26.7.4] - 19-12-2024
340
358
 
341
359
  ### Fixed
342
360
 
343
- - 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.
361
+ - 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.
344
362
 
345
363
  ## [26.7.3] - 18-12-2024
346
364
 
347
365
  ### Added
348
366
 
349
- - Added the `illustrationStep.isPMSPickerEnabled` function. This function returns a boolean indicating whether the PMS picker is enabled for the step.
367
+ - Added the `illustrationStep.isPMSPickerEnabled` function. This function returns a boolean indicating whether the PMS picker is enabled for the step.
350
368
 
351
369
  ## [26.7.2] - 02-12-2024
352
370
 
353
371
  ### Fixed
354
372
 
355
- - Corrected an issue with `TextStepService.availableFillColors` not returning the correct colors under certain conditions.
373
+ - Corrected an issue with `TextStepService.availableFillColors` not returning the correct colors under certain conditions.
356
374
 
357
375
  ## [26.7.0] - 27-11-2024
358
376
 
359
377
  ### Added
360
378
 
361
- - Text steps now support custom stroke. Similar to other color customisation features, this is accessible via the functions `getAvailableStrokeColors`, `getStrokeColor`, and `setStrokeColor` on `TextStepHandle`.
362
- The thickness of the stroke, the colors to select from, and other options, are configurable via the Spiff Hub in the Workflow editor.
379
+ - Text steps now support custom stroke. Similar to other color customisation features, this is accessible via the functions `getAvailableStrokeColors`, `getStrokeColor`, and `setStrokeColor` on `TextStepHandle`.
380
+ The thickness of the stroke, the colors to select from, and other options, are configurable via the Spiff Hub in the Workflow editor.
363
381
 
364
382
  ## [26.5.2] - 20-11-2024
365
383
 
366
384
  ### Fixed
367
385
 
368
- - Fixed issues regarding EXIF orientation calculation throwing errors under specific conditions.
386
+ - Fixed issues regarding EXIF orientation calculation throwing errors under specific conditions.
369
387
 
370
388
  ## [26.5.1] - 20-11-2024
371
389
 
372
390
  ### Fixed
373
391
 
374
- - SVG Files uploaded to the platform will now have widths and heights specified in non-pixel values
375
- stripped. This shouldn't have any effect on user uploads but will prevent the system from breaking when
376
- encountering these values.
392
+ - SVG Files uploaded to the platform will now have widths and heights specified in non-pixel values
393
+ stripped. This shouldn't have any effect on user uploads but will prevent the system from breaking when
394
+ encountering these values.
377
395
 
378
396
  ## [26.5.0] - 18-11-2024
379
397
 
380
398
  ### Added
381
399
 
382
- - 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.
400
+ - 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.
383
401
 
384
402
  ## [26.4.0] - 07-11-2024
385
403
 
386
404
  ### Added
387
405
 
388
- - 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.
389
- - 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.
390
- - Interface `Order` and `OrderItem` have been added to the package. These interfaces can be used with the new placeOrder functions.
406
+ - 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.
407
+ - 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.
408
+ - Interface `Order` and `OrderItem` have been added to the package. These interfaces can be used with the new placeOrder functions.
391
409
 
392
410
  ## [26.3.0] - 04-11-2024
393
411
 
394
412
  ### Changed
395
413
 
396
- - IllustrationStepHandle now accepts providing PMS values when calling `setColor`
397
- - IllustrationStepHandle's `getAvailableColors` function now returns the names of the variants as PMS values.
414
+ - IllustrationStepHandle now accepts providing PMS values when calling `setColor`
415
+ - IllustrationStepHandle's `getAvailableColors` function now returns the names of the variants as PMS values.
398
416
 
399
417
  ## [26.1.2] - 30-10-2024
400
418
 
401
419
  ### Fixed
402
420
 
403
- - The ProductCollection class will no longer request the products it contains if they are already present in the cache.
421
+ - The ProductCollection class will no longer request the products it contains if they are already present in the cache.
404
422
 
405
423
  ## [26.1.1] - 30-10-2024
406
424
 
407
425
  ### Changed
408
426
 
409
- - Merged some GraphQL calls to reduce the number of requests made when loading a bundle.
427
+ - Merged some GraphQL calls to reduce the number of requests made when loading a bundle.
410
428
 
411
429
  ## [26.1.0] - 30-10-2024
412
430
 
413
431
  ### Changed
414
432
 
415
- - Several internal functions have been changed, been merged or removed. This should not affect any public API.
416
- - `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.
433
+ - Several internal functions have been changed, been merged or removed. This should not affect any public API.
434
+ - `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.
417
435
 
418
436
  ## [26.0.0] - 30-10-2024
419
437
 
420
438
  ### Changed
421
439
 
422
- - `getWorkflowExperience` has removed 3 deprecated parameters in favor of the options object. The options object is no longer optional.
423
- - `configureUrls` has been removed in favor of the `configure` function. Please use `configure` moving forwards.
424
- - 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.
440
+ - `getWorkflowExperience` has removed 3 deprecated parameters in favor of the options object. The options object is no longer optional.
441
+ - `configureUrls` has been removed in favor of the `configure` function. Please use `configure` moving forwards.
442
+ - 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.
425
443
 
426
444
  ## [22.0.0] - 10-07-2024
427
445
 
428
446
  ### Changed
429
447
 
430
- - `matchHexToPms` now returns a list of objects of `{ pms: string; hex: string; }` rather than strings.
448
+ - `matchHexToPms` now returns a list of objects of `{ pms: string; hex: string; }` rather than strings.
431
449
 
432
450
  ### Added
433
451
 
434
- - `findPmsColors(input: string, limit?: number): PmsSearchResult[]`: A function to find PMS colors by name using fuzzy search.
452
+ - `findPmsColors(input: string, limit?: number): PmsSearchResult[]`: A function to find PMS colors by name using fuzzy search.
435
453
 
436
454
  ## [21.8.1] - 27-03-2024
437
455
 
438
456
  ### Fixed
439
457
 
440
- - `WorkflowExperience.getTotalPriceSubunits` no longer always returns the discounted price.
458
+ - `WorkflowExperience.getTotalPriceSubunits` no longer always returns the discounted price.
441
459
 
442
460
  ## [21.8.0] - 26-03-2024
443
461
 
444
462
  ### Added
445
463
 
446
- - `Bundle.removeStakeholder(email: string): Promise<void>`: Removes a single stakeholder from the Bundle, via email address.
464
+ - `Bundle.removeStakeholder(email: string): Promise<void>`: Removes a single stakeholder from the Bundle, via email address.
447
465
 
448
466
  ## [21.7.1] - 25-03-2024
449
467
 
450
468
  ### Fixed
451
469
 
452
- - `Bundle.getAllStakeholders()` now returns correct results on subsequent calls.
470
+ - `Bundle.getAllStakeholders()` now returns correct results on subsequent calls.
453
471
 
454
472
  ## [21.7.0] - 25-03-2024
455
473
 
456
474
  ### Added
457
475
 
458
- - `CollectionProduct.getAllWorkflows(): ProductWorkflow[]`: Returns all workflows associated with this product.
476
+ - `CollectionProduct.getAllWorkflows(): ProductWorkflow[]`: Returns all workflows associated with this product.
459
477
 
460
478
  ## [21.6.0] - 22-03-2024
461
479
 
462
480
  ### Added
463
481
 
464
- - `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).
482
+ - `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).
465
483
 
466
484
  ## [21.5.0] - 22-03-2024
467
485
 
468
486
  ### Changed
469
487
 
470
- - `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.
471
- - `getOverrideGlobalPreviewConfiguration` -> `getOverrideGlobalPropertyConfiguration(type: AspectType): boolean`.
472
- - `setOverrideGlobalPreviewConfiguration` -> `setOverrideGlobalPropertyConfiguration(type: AspectType, value: boolean): void`
488
+ - `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.
489
+ - `getOverrideGlobalPreviewConfiguration` -> `getOverrideGlobalPropertyConfiguration(type: AspectType): boolean`.
490
+ - `setOverrideGlobalPreviewConfiguration` -> `setOverrideGlobalPropertyConfiguration(type: AspectType, value: boolean): void`
473
491
 
474
492
  ## [21.4.1] - 21-03-2024
475
493
 
476
494
  ### Changed
477
495
 
478
- - `readTransactionsQuery` now fetches `printFileUrl1` to `printFileUrl5` for each transaction.
496
+ - `readTransactionsQuery` now fetches `printFileUrl1` to `printFileUrl5` for each transaction.
479
497
 
480
498
  ## [21.4.0] - 20-03-2024
481
499
 
482
500
  ### Added
483
501
 
484
- - `StepHandle`:
485
- - `getOverrideGlobalPreviewConfiguration(): boolean`: Returns a boolean that indicates whether this step should override (ignore) Global Property state.
486
- - `setOverrideGlobalPreviewConfiguration(value: boolean): void`: Modifies whether this step should override (ignore) Global Property state.
487
- - `getGlobalPropertyAspects(configurationId: string): string[]`: Returns all Aspect names in the supplied Global Property Configuration that this step is configured to use.
488
- - `Bundle.getGlobalPropertyConfiguration(): GlobalPropertyConfiguration | undefined`: Returns the Global Property Configuration object associated with the Bundle, if it exists.
502
+ - `StepHandle`:
503
+ - `getOverrideGlobalPreviewConfiguration(): boolean`: Returns a boolean that indicates whether this step should override (ignore) Global Property state.
504
+ - `setOverrideGlobalPreviewConfiguration(value: boolean): void`: Modifies whether this step should override (ignore) Global Property state.
505
+ - `getGlobalPropertyAspects(configurationId: string): string[]`: Returns all Aspect names in the supplied Global Property Configuration that this step is configured to use.
506
+ - `Bundle.getGlobalPropertyConfiguration(): GlobalPropertyConfiguration | undefined`: Returns the Global Property Configuration object associated with the Bundle, if it exists.
489
507
 
490
508
  ## [21.3.1] - 20-03-2024
491
509
 
492
510
  ### Fixed
493
511
 
494
- - 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.
512
+ - 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.
495
513
 
496
514
  ## [21.3.0] - 20-03-2024
497
515
 
498
516
  ### Added
499
517
 
500
- - `WorkflowExperience.priceBreakToBeApplied()` returns the percentage that will be used in `WorkflowExperience.getTotalPriceSubunits()` and related methods.
518
+ - `WorkflowExperience.priceBreakToBeApplied()` returns the percentage that will be used in `WorkflowExperience.getTotalPriceSubunits()` and related methods.
501
519
 
502
520
  ### Changed
503
521
 
504
- - `WorkflowExperience.getTotalPriceSubunits()` and related methods now consider price breaks in their calculations, but also now have a `disablePriceBreaks` argument.
522
+ - `WorkflowExperience.getTotalPriceSubunits()` and related methods now consider price breaks in their calculations, but also now have a `disablePriceBreaks` argument.
505
523
 
506
524
  ## [21.2.1] - 15-03-2024
507
525
 
508
526
  ### Fixed
509
527
 
510
- - Fixed Global Property Handles not updating values when WorkflowExperiences in the Bundle share the same Workflow.
528
+ - Fixed Global Property Handles not updating values when WorkflowExperiences in the Bundle share the same Workflow.
511
529
 
512
530
  ## [21.2.0] - 15-03-2024
513
531
 
514
532
  ### Added
515
533
 
516
- - `FileUploadGlobalPropertyHandle`:
517
- - `hasImage(): boolean`: Returns a boolean value indicating if the associated state has an image.
518
- - `getImage(): Promise<Asset | undefined>`: Retrieves the current image from the server.
534
+ - `FileUploadGlobalPropertyHandle`:
535
+ - `hasImage(): boolean`: Returns a boolean value indicating if the associated state has an image.
536
+ - `getImage(): Promise<Asset | undefined>`: Retrieves the current image from the server.
519
537
 
520
538
  ## [21.1.1] - 15-03-2024
521
539
 
522
540
  ### Fixed
523
541
 
524
- - Exported missing `AspectType` for global property handles.
542
+ - Exported missing `AspectType` for global property handles.
525
543
 
526
544
  ## [21.1.0] - 14-03-2024
527
545
 
528
546
  ### Added
529
547
 
530
- - `Bundle.hasGlobalProperties(): boolean`: Returns true when the bundle is linked to a Global Property Configuration.
548
+ - `Bundle.hasGlobalProperties(): boolean`: Returns true when the bundle is linked to a Global Property Configuration.
531
549
 
532
550
  ## [21.0.1] - 13-03-2024
533
551
 
534
552
  ### Fixed
535
553
 
536
- - Package now supplies this `CHANGELOG.md` in published releases.
554
+ - Package now supplies this `CHANGELOG.md` in published releases.
537
555
 
538
556
  ## [21.0.0] - 13-03-2024
539
557
 
540
558
  ### Added
541
559
 
542
- - `DesignCreationMessage` now has `quantity: number | undefined`.
560
+ - `DesignCreationMessage` now has `quantity: number | undefined`.
543
561
 
544
562
  ### Changed
545
563
 
546
- - `Bundle.finish()` no longer returns an array of `DesignCreationMessage` objects, but instead returns a `BundleDesignCreationMessage` object which wraps the array of `DesignCreationMessage` entries.
564
+ - `Bundle.finish()` no longer returns an array of `DesignCreationMessage` objects, but instead returns a `BundleDesignCreationMessage` object which wraps the array of `DesignCreationMessage` entries.
547
565
 
548
566
  ## [20.5.1] - 12-03-2024
549
567
 
550
568
  ### Fixed
551
569
 
552
- - `WorkflowExperience.getSelectionPriceSubunits()` (and consequently `getTotalPriceSubunits()`) can no longer return `NaN`.
570
+ - `WorkflowExperience.getSelectionPriceSubunits()` (and consequently `getTotalPriceSubunits()`) can no longer return `NaN`.
553
571
 
554
572
  ## [20.5.0] - 12-03-2024
555
573
 
556
574
  ### Added
557
575
 
558
- - `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`.
576
+ - `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`.
559
577
 
560
578
  ## [20.4.5] - 08-03-2024
561
579
 
562
580
  ### Added
563
581
 
564
- - `RenderableScene` objects will now contain a `workflowScene: WorkflowScene` field. This is only provided for backwards compatibility and is considered deprecated functionality.
582
+ - `RenderableScene` objects will now contain a `workflowScene: WorkflowScene` field. This is only provided for backwards compatibility and is considered deprecated functionality.
565
583
 
566
584
  ## [20.4.4] - 08-03-2024
567
585
 
568
586
  ### Fixed
569
587
 
570
- - Updating quantity via `WorkflowExperience.setQuantity()` will now correctly update on the server.
588
+ - Updating quantity via `WorkflowExperience.setQuantity()` will now correctly update on the server.
571
589
 
572
590
  ## [20.4.3] - 08-03-2024
573
591
 
574
592
  ### Changed
575
593
 
576
- - `WorkflowExperience.setQuantity()` now returns a promise that resolves once the quantity has been updated on the server.
594
+ - `WorkflowExperience.setQuantity()` now returns a promise that resolves once the quantity has been updated on the server.
577
595
 
578
596
  ## [20.4.0] - 08-03-2024
579
597
 
580
598
  ### Added
581
599
 
582
- - `Transaction` entities now have `quantity: number | undefined`.
583
- - New functions on `WorkflowExperience` for managing quantity:
584
- - `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`.
585
- - `setQuantity(<number>)`: Updates the quantity value on the underlying `Transaction` entity. Must be >= 1.
586
- - New events functionality on `WorkflowExperience`. Currently the only event is `QuantityChanged`.
587
- - `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.
588
- - `removeEventListener(<type>, <callback>)`: Removes a previously registered callback.
600
+ - `Transaction` entities now have `quantity: number | undefined`.
601
+ - New functions on `WorkflowExperience` for managing quantity:
602
+ - `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`.
603
+ - `setQuantity(<number>)`: Updates the quantity value on the underlying `Transaction` entity. Must be >= 1.
604
+ - New events functionality on `WorkflowExperience`. Currently the only event is `QuantityChanged`.
605
+ - `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.
606
+ - `removeEventListener(<type>, <callback>)`: Removes a previously registered callback.
589
607
 
590
608
  ## [20.3.0] - 07-03-2024
591
609
 
592
610
  ### Added
593
611
 
594
- - `CollectionProduct.getCurrentIntegration()`: returns the `IntegrationProductResource` associated with the product that is linked to the current Integration (resolved via the application key).
612
+ - `CollectionProduct.getCurrentIntegration()`: returns the `IntegrationProductResource` associated with the product that is linked to the current Integration (resolved via the application key).
595
613
 
596
614
  ## [20.2.2] - 05-03-2024
597
615
 
598
616
  ### Changed
599
617
 
600
- - `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.
618
+ - `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.
601
619
 
602
620
  ## [20.2.1] - 29-02-2024
603
621
 
604
622
  ### Changed
605
623
 
606
- - 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`:
624
+ - 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`:
607
625
 
608
626
  ```ts
609
627
  // Before
@@ -624,7 +642,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
624
642
 
625
643
  ### Added
626
644
 
627
- - `SpiffCommerceClient.getIntegrationProduct(<options>)`: Fetches an `IntegrationProduct` object. Essentially a wrapper for the functions `getIntegrationProductById` and `getIntegrationProductFromExternalIds`. The options object type is as follows:
645
+ - `SpiffCommerceClient.getIntegrationProduct(<options>)`: Fetches an `IntegrationProduct` object. Essentially a wrapper for the functions `getIntegrationProductById` and `getIntegrationProductFromExternalIds`. The options object type is as follows:
628
646
  ```ts
629
647
  {
630
648
  type: "integration";
@@ -640,27 +658,27 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
640
658
 
641
659
  ### Added
642
660
 
643
- - `IntegrationProduct.getAllWorkflows()`: Returns an array of `ProductWorkflow`, ordered by their internal `index` value (matches the order seen on the SpiffCommerce Hub).
661
+ - `IntegrationProduct.getAllWorkflows()`: Returns an array of `ProductWorkflow`, ordered by their internal `index` value (matches the order seen on the SpiffCommerce Hub).
644
662
 
645
663
  ## [20.0.1] - 23-02-2024
646
664
 
647
665
  ### Changed
648
666
 
649
- - `StepHandle.executeAnimations()` now logs a warning to the console when the associated `WorkflowManager` is not associated with a `ThreeDPreviewService`.
667
+ - `StepHandle.executeAnimations()` now logs a warning to the console when the associated `WorkflowManager` is not associated with a `ThreeDPreviewService`.
650
668
 
651
669
  ## [20.0.0] - 15-02-2024
652
670
 
653
671
  ### Added
654
672
 
655
- - Additional configuration options for GraphQL on bundles.
656
- - A separate fetchProducts function on the ProductCollection interface.
673
+ - Additional configuration options for GraphQL on bundles.
674
+ - A separate fetchProducts function on the ProductCollection interface.
657
675
 
658
676
  ### Changed
659
677
 
660
- - Removed async on getProducts call.
678
+ - Removed async on getProducts call.
661
679
 
662
680
  ### Removed
663
681
 
664
- - Unused normalize.css file.
665
- - Identical links assigned in each translation file.
666
- - Duplicate index file for the english version.
682
+ - Unused normalize.css file.
683
+ - Identical links assigned in each translation file.
684
+ - Duplicate index file for the english version.