@spiffcommerce/core 26.30.0 → 26.30.1-beta.bd6c2e26-471b-5bce-8962-bb6e924ed382

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/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>>;
@@ -3694,6 +3705,7 @@ interface Integration {
3694
3705
  logo: string;
3695
3706
  partner: Partner;
3696
3707
  marketplaceThemeInstallConfiguration?: ThemeInstallConfigurationGraphQl;
3708
+ name?: string;
3697
3709
  }
3698
3710
  interface Theme {
3699
3711
  configuration?: string;