@spiffcommerce/core 27.2.0 → 27.2.1-beta.09bbc077-24f6-56dd-8b64-ffb7b45a0a75

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
@@ -14,17 +14,23 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
14
14
  - `Fixed` for any bug fixes.
15
15
  - `Security` in case of vulnerabilities.
16
16
 
17
+ ## [27.2.1] - 28-07-2025
18
+
19
+ ## Fixed
20
+
21
+ - `WorkflowExperience.assignCustomerDetails` should no longer fail when you have ownership of the associated Transaction.
22
+
17
23
  ## [27.2.0] - 24-07-2025
18
24
 
19
25
  ## Added
20
26
 
21
- - Bundles now have the `applyGlobalPropertyState` method for copying one global state onto another.
27
+ - Bundles now have the `applyGlobalPropertyState` method for copying one global state onto another.
22
28
 
23
29
  ## [27.1.1] - 23-07-2025
24
30
 
25
31
  ## Fixed
26
32
 
27
- - Correctly the case of handle multiple text steps that are conditional and share a text aspect.
33
+ - Correctly the case of handle multiple text steps that are conditional and share a text aspect.
28
34
 
29
35
  ## [27.1.0] - 16-07-2025
30
36
 
@@ -36,13 +42,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
36
42
 
37
43
  ## Changed
38
44
 
39
- - Modified the functions for logging in as a customer.
45
+ - Modified the functions for logging in as a customer.
40
46
 
41
47
  ## [26.40.0] - 10-07-2025
42
48
 
43
49
  ## Added
44
50
 
45
- - Added `setDispatchDate` and `setPurchaseOrder` to `Bundle`.
51
+ - Added `setDispatchDate` and `setPurchaseOrder` to `Bundle`.
46
52
 
47
53
  ## [26.39.0] - 08-07-2025
48
54
 
package/dist/index.d.ts CHANGED
@@ -5,6 +5,7 @@ import { RenderableContextService, RenderableContext, ThreeDPreviewService, Mode
5
5
  import * as lodash from 'lodash';
6
6
  import { CompleteQuoteMessage, ThemeInstallConfigurationGraphQl, ConversionConfiguration } from '@spiffcommerce/theme-bridge';
7
7
  export { ConversionConfiguration, ConversionData, ConversionDataType, ConversionLocation } from '@spiffcommerce/theme-bridge';
8
+ import { Currency } from 'dinero.js';
8
9
  import { FuseResult } from 'fuse.js';
9
10
  import { Font } from 'opentype.js';
10
11
 
@@ -2187,6 +2188,37 @@ declare class IntegrationProduct {
2187
2188
  getAllWorkflows(): ProductWorkflow$1[];
2188
2189
  }
2189
2190
 
2191
+ declare class CurrencyContext {
2192
+ private readonly presentmentCurrency?;
2193
+ private readonly partnerCurrency;
2194
+ private readonly rateFrom;
2195
+ private readonly rateTo;
2196
+ constructor(rateFrom: number, rateTo: number, partnerCurrency: Currency, presentmentCurrency?: Currency);
2197
+ /**
2198
+ * @returns The currency code for the currency being used for monetary display.
2199
+ */
2200
+ code(): Currency;
2201
+ /**
2202
+ * @returns true if the conversion is required, false otherwise.
2203
+ */
2204
+ conversionRequired(): boolean;
2205
+ /**
2206
+ * Converts a monetary value from a workflow in a partner specified currency
2207
+ * to the units of the currency being used for display.
2208
+ * @param amount The amount in minor units to convert.
2209
+ * @returns
2210
+ */
2211
+ getConvertedSubunits(amount: number): number;
2212
+ /**
2213
+ * Converts a monetary value from the database to the units of its currency.
2214
+ */
2215
+ private units;
2216
+ /**
2217
+ * Converts a monetary value in units to the subunits of its currency.
2218
+ */
2219
+ private subunits;
2220
+ }
2221
+
2190
2222
  declare const getWorkflows: (ids: string[], options?: GetWorkflowGraphqlOptions) => Promise<Workflow[]>;
2191
2223
  declare const getWorkflow: (id: string, options?: GetWorkflowGraphqlOptions) => Promise<Workflow>;
2192
2224
  /**
@@ -2298,7 +2330,6 @@ interface ClientConfiguration {
2298
2330
  */
2299
2331
  declare class SpiffCommerceClient {
2300
2332
  private options;
2301
- private currencyCode?;
2302
2333
  private customer?;
2303
2334
  private activeIntegration?;
2304
2335
  private marketplaceThemeInstallId?;
@@ -2313,8 +2344,8 @@ declare class SpiffCommerceClient {
2313
2344
  * and the Spiff Commerce platform.
2314
2345
  */
2315
2346
  getAssetManager(): AssetManager;
2316
- getCurrencyCode(): string;
2317
2347
  getFlowService(): FlowService;
2348
+ getCurrencyContext(presentmentCurrency: string): Promise<CurrencyContext>;
2318
2349
  getIntegration(): Promise<Integration>;
2319
2350
  canUseAddon(addonHandle: AddonHandle): Promise<boolean>;
2320
2351
  /**