@spiffcommerce/core 26.40.0 → 26.41.1-beta.27edcea8-a794-5873-ba48-38f5bed94c71

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
@@ -1778,6 +1778,14 @@ interface Bundle$1 {
1778
1778
  * @returns The name of the bundle.
1779
1779
  */
1780
1780
  getName(): string;
1781
+ /**
1782
+ * @returns True if this bundle is a template, false otherwise.
1783
+ */
1784
+ getTemplate(): boolean;
1785
+ /**
1786
+ * @returns The quote id of the bundle, if it has one.
1787
+ * This is used to identify the bundle in the Spiff Commerce system for quoting purposes.
1788
+ */
1781
1789
  getQuoteId(): string | undefined;
1782
1790
  /**
1783
1791
  * Set the name of the bundle.
@@ -1913,6 +1921,11 @@ interface Bundle$1 {
1913
1921
  * Retrieves all stakeholders associated with this bundle.
1914
1922
  */
1915
1923
  getAllStakeholders(): Promise<BundleStakeholder[]>;
1924
+ /**
1925
+ * Retrieves the current stakeholder for this bundle. This is the stakeholder that has write access to the bundle.
1926
+ * If no stakeholder has write access, this will return undefined.
1927
+ * @returns A promise that resolves with the current stakeholder, or undefined if no stakeholder has write access.
1928
+ */
1916
1929
  getCurrentStakeholder(): Promise<BundleStakeholder | undefined>;
1917
1930
  /**
1918
1931
  * Finalizes all experiences within the bundle. This will return a promise that resolves when all experiences have been finalized.
@@ -2270,6 +2283,9 @@ interface ClientConfiguration {
2270
2283
  marketplaceThemeInstallId?: string;
2271
2284
  marketplaceThemeInstallConfigurationId?: string;
2272
2285
  bearerAuthenticationToken?: string;
2286
+ userPoolClientId?: string;
2287
+ userPoolRegion?: string;
2288
+ spiffRegion?: string;
2273
2289
  }
2274
2290
  /**
2275
2291
  * The Spiff Commerce Javascript Client. Required for
@@ -2282,6 +2298,10 @@ declare class SpiffCommerceClient {
2282
2298
  private activeIntegration?;
2283
2299
  private marketplaceThemeInstallId?;
2284
2300
  private marketplaceThemeInstallConfigurationId?;
2301
+ private userPoolClientId?;
2302
+ private userPoolRegion?;
2303
+ private spiffRegion?;
2304
+ private challengeSession?;
2285
2305
  constructor(options: ClientOptions);
2286
2306
  configure(configuration: ClientConfiguration): void;
2287
2307
  /**
@@ -2341,6 +2361,25 @@ declare class SpiffCommerceClient {
2341
2361
  * @returns True if the verification was successful, false otherwise.
2342
2362
  */
2343
2363
  verifyCode(emailAddress: string, verificationCode: string): Promise<boolean>;
2364
+ /**
2365
+ * Generate an email code to allow logging in as a Spiff user.
2366
+ */
2367
+ generateLoginCode(emailAddress: string): Promise<void>;
2368
+ /**
2369
+ * Verify an email code to log in as a Spiff user.
2370
+ */
2371
+ verifyLoginCode(emailAddress: string, code: string): Promise<void>;
2372
+ /**
2373
+ * Log out the currently logged-in Spiff user.
2374
+ */
2375
+ logOut(): Promise<void>;
2376
+ /**
2377
+ * Check if a customer is logged in.
2378
+ * If they are, set the customer object.
2379
+ * This is how we resume sessions between loads.
2380
+ */
2381
+ reloadLoggedInCustomer(): Promise<void>;
2382
+ loggedInBearerToken(): Promise<string>;
2344
2383
  getCustomerMetafields(): Promise<Metafield[]>;
2345
2384
  /**
2346
2385
  * @param collectionId Optional: The id of the product collection that the bundle can use.
@@ -4667,7 +4706,9 @@ declare const optionService: OptionService;
4667
4706
  declare const setBearerAuthenticationToken: (token: string) => void;
4668
4707
  declare class GraphQlManager {
4669
4708
  private shadowGraphqlClient;
4709
+ private spiffClient?;
4670
4710
  constructor();
4711
+ setSpiffCommerceClient(client: SpiffCommerceClient): void;
4671
4712
  getShadowGraphqlClient(): ApolloClient<any>;
4672
4713
  private constructShadowGraphqlClient;
4673
4714
  }