@spiffcommerce/core 22.2.1 → 22.3.0

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
@@ -4,6 +4,7 @@ export { Animatable, AnyStepData, AspectType, Asset, AssetType, BringForwardComm
4
4
  import { ApolloClient, MutationOptions, FetchResult } from '@apollo/client/core';
5
5
  import { RenderableContextService, RenderableContext, ThreeDPreviewService, ModelContainer } from '@spiffcommerce/preview';
6
6
  import * as lodash from 'lodash';
7
+ import { ThemeInstallConfigurationResource } from '@spiffcommerce/theme-bridge';
7
8
  import { FuseResult } from 'fuse.js';
8
9
 
9
10
  declare class OptionService {
@@ -1793,6 +1794,14 @@ interface GetWorkflowFromExternalProductOptions extends GetNewWorkflowOptionsBas
1793
1794
  }
1794
1795
  type GetNewWorkflowOptions = GetWorkflowFromIntegrationProductOptions | GetWorkflowFromExternalProductOptions;
1795
1796
  type GetWorkflowOptions = GetWorkflowFromTransactionOptions | GetNewWorkflowOptions;
1797
+ interface ClientConfiguration {
1798
+ hubUrl: string;
1799
+ serverUrl: string;
1800
+ servicesApiUrl: string;
1801
+ marketplaceThemeInstallId: string;
1802
+ marketplaceThemeInstallConfigurationId: string;
1803
+ bearerAuthenticationToken?: string;
1804
+ }
1796
1805
  /**
1797
1806
  * The Spiff Commerce Javascript Client. Required for
1798
1807
  * creating workflow experiences.
@@ -1803,12 +1812,17 @@ declare class SpiffCommerceClient {
1803
1812
  private currencyCode?;
1804
1813
  private customer?;
1805
1814
  private activeIntegration?;
1815
+ private marketplaceThemeInstallId?;
1816
+ private marketplaceThemeInstallConfigurationId?;
1806
1817
  /**
1807
1818
  * @deprecated This object is passed to the WorkflowExperience constructor and is no longer needed on this object.
1808
1819
  * Any functionality referencing this object will be removed in a future release.
1809
1820
  */
1810
1821
  private experienceOptions?;
1811
1822
  constructor(options: ClientOptions);
1823
+ /** @deprecated Use `configure` instead */
1824
+ configureUrls(hubUrl: string, serverUrl: string, servicesApiUrl: string): void;
1825
+ configure(configuration: ClientConfiguration): void;
1812
1826
  /**
1813
1827
  * @returns The asset manager allows for common operations related to assets
1814
1828
  * and the Spiff Commerce platform.
@@ -1937,7 +1951,6 @@ declare class SpiffCommerceClient {
1937
1951
  * @returns The transaction associated with this client.
1938
1952
  */
1939
1953
  getTransaction(): Transaction;
1940
- configureUrls(hubUrl: string, serverUrl: string, servicesApiUrl: string): void;
1941
1954
  /**
1942
1955
  * A function used to synchronize transaction state with the server.
1943
1956
  * @param options New state details. To be spread into the query.
@@ -2115,6 +2128,10 @@ interface WorkflowManager {
2115
2128
  * Returns the client that was responsible for spawning this manager.
2116
2129
  */
2117
2130
  getClient(): SpiffCommerceClient;
2131
+ /**
2132
+ * Returns the workflow experience that was responsible for creating this manager.
2133
+ */
2134
+ getWorkflowExperience(): WorkflowExperience;
2118
2135
  /**
2119
2136
  * Re-fetches the transactionShareActions for this WorkflowManager's Transaction object.
2120
2137
  * The updated transactionShareActions overwrite the existing values on the Transaction object returned by `getTransaction()`.
@@ -2317,6 +2334,7 @@ interface Transaction {
2317
2334
  transactionShareActions?: TransactionShareAction[];
2318
2335
  /** Whether any share actions for this Transaction require the user to be authenticated as a stakeholder */
2319
2336
  hasAuthenticatedActions?: boolean;
2337
+ marketplaceThemeInstallConfiguration?: ThemeInstallConfigurationResource;
2320
2338
  }
2321
2339
  interface TransactionShareAction {
2322
2340
  id: string;
@@ -3060,6 +3078,7 @@ declare const digitalContentStepService: DigitalContentStepService;
3060
3078
  declare class MockWorkflowManager implements WorkflowManager {
3061
3079
  private client;
3062
3080
  getClient(): SpiffCommerceClient;
3081
+ getWorkflowExperience(): WorkflowExperience;
3063
3082
  setClient(client: SpiffCommerceClient): void;
3064
3083
  getInitializationPromise(): Promise<void>;
3065
3084
  getProduct: () => Product;