@spiffcommerce/core 26.30.2 → 26.31.0-beta.53dcf693-b89c-523e-8efe-63bbda00da37

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,6 +14,12 @@ 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
+ ## [26.31.0] - 24-06-2025
18
+
19
+ ## Fixed
20
+
21
+ - Fixed issues with authorizing certain requests affecting recipients.
22
+
17
23
  ## [26.30.0] - 23-06-2025
18
24
 
19
25
  ## Added
@@ -24,7 +30,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
24
30
 
25
31
  ## Fixed
26
32
 
27
- - The method `updateRecipient` now saves its arguments correctly.
33
+ - The method `updateRecipient` now saves its arguments correctly.
28
34
 
29
35
  ## [26.29.1] - 18-06-2025
30
36
 
package/dist/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { FunctionComponent, ReactNode } from 'preact/compat';
2
2
  import * as _apollo_client_core from '@apollo/client/core';
3
- import { MutationOptions, FetchResult, ApolloClient } from '@apollo/client/core';
3
+ import { OperationVariables, QueryOptions, ApolloQueryResult, DefaultContext, MutationOptions, FetchResult, ApolloClient } from '@apollo/client/core';
4
4
  import { RenderableContextService, RenderableContext, ThreeDPreviewService, ModelContainer } from '@spiffcommerce/preview';
5
5
  import * as lodash from 'lodash';
6
6
  import { CompleteQuoteMessage, ThemeInstallConfigurationGraphQl, ConversionConfiguration } from '@spiffcommerce/theme-bridge';
@@ -1017,6 +1017,12 @@ declare class DesignService {
1017
1017
  }
1018
1018
  declare const designService: DesignService;
1019
1019
 
1020
+ interface GraphQlClient {
1021
+ query<T = any, TVariables extends OperationVariables = OperationVariables>(options: QueryOptions<TVariables, T>): Promise<ApolloQueryResult<T>>;
1022
+ mutate<TData = any, TVariables extends OperationVariables = OperationVariables, TContext extends Record<string, any> = DefaultContext>(options: MutationOptions<TData, TVariables, TContext>): Promise<FetchResult<TData>>;
1023
+ }
1024
+ type GraphQlClientFunc = () => GraphQlClient;
1025
+
1020
1026
  /**
1021
1027
  * A scene is a collection of steps that can be used to group steps together.
1022
1028
  */
@@ -1057,6 +1063,10 @@ interface ExperienceOptions {
1057
1063
  * A function that communicates state changes to the server.
1058
1064
  */
1059
1065
  stateMutationFunc: StateMutationFunc;
1066
+ /**
1067
+ * The interface for the graphql client
1068
+ */
1069
+ graphQlClient: GraphQlClientFunc;
1060
1070
  /**
1061
1071
  * Should be set to true when the experience is loaded from an existing transaction.
1062
1072
  * FIXME: Wouldn't we know this from existance of reloadedState
@@ -1264,6 +1274,7 @@ declare enum WorkflowExperienceEventType {
1264
1274
  declare class WorkflowExperienceImpl implements WorkflowExperience {
1265
1275
  readonly client: SpiffCommerceClient;
1266
1276
  readonly commandContext: CommandContext;
1277
+ readonly graphQlClient: GraphQlClientFunc;
1267
1278
  readonly workflowManager: WorkflowManager;
1268
1279
  readonly isReadOnly: boolean;
1269
1280
  readonly cachedStepHandles: Map<string, StepHandle<any>>;
@@ -2602,7 +2613,7 @@ interface WorkflowManager {
2602
2613
  /**
2603
2614
  * Create or amend the recipient fo the transaction.
2604
2615
  */
2605
- updateRecipient(firstName?: string, lastName?: string, address?: string, suburb?: string, state?: string, email?: string, postalCode?: string, country?: string): Promise<void>;
2616
+ updateRecipient(firstName?: string, lastName?: string, address?: string, suburb?: string, state?: string, email?: string, postalCode?: string, country?: string, mobile?: string): Promise<void>;
2606
2617
  }
2607
2618
 
2608
2619
  declare enum AssetType {
@@ -3623,6 +3634,7 @@ interface Recipient {
3623
3634
  email?: string;
3624
3635
  postalCode?: string;
3625
3636
  country?: string;
3637
+ mobile?: string;
3626
3638
  createdAt?: string;
3627
3639
  updatedAt?: string;
3628
3640
  deletedAt?: string;
@@ -4921,7 +4933,7 @@ declare class DigitalContentStepService implements StepService<DigitalContentSte
4921
4933
  declare const digitalContentStepService: DigitalContentStepService;
4922
4934
 
4923
4935
  declare class MockWorkflowManager implements WorkflowManager {
4924
- updateRecipient(_firstName?: string, _lastName?: string, _address?: string, _suburb?: string, _state?: string, _email?: string, _postalCode?: string, _country?: string): Promise<void>;
4936
+ updateRecipient(_firstName?: string, _lastName?: string, _address?: string, _suburb?: string, _state?: string, _email?: string, _postalCode?: string, _country?: string, _mobile?: string): Promise<void>;
4925
4937
  approveTransaction(_note?: string): Promise<void>;
4926
4938
  rejectTransaction(_note?: string): Promise<void>;
4927
4939
  private client;