@spiffcommerce/core 10.3.1 → 11.0.1

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/types.d.ts CHANGED
@@ -1880,30 +1880,31 @@ export class SpiffCommerceClient {
1880
1880
  * - `success`: Whether or not the authentication was successful.
1881
1881
  * @throws An error if the transaction is not found.
1882
1882
  */
1883
- loadTransactionAuth(transactionId: string): Promise<{
1883
+ authenticateTransactionFromLocalStorage(transactionId: string): Promise<{
1884
1884
  customLogoLink?: string;
1885
1885
  transactionReadOnly?: boolean;
1886
1886
  stakeholderType?: StakeholderType;
1887
1887
  success: boolean;
1888
1888
  theme?: _Theme1;
1889
1889
  }>;
1890
+ clearCustomer(): void;
1891
+ clearCustomerForTransaction(transactionId: string): void;
1892
+ getOrCreateCustomer(emailAddress: string): Promise<{
1893
+ customer: Customer;
1894
+ isAuthenticated: boolean;
1895
+ }>;
1890
1896
  /**
1891
- * Generates a verification code for the given email address. An error will be thrown if the email address is not associated with the transaction.
1892
- * @param transactionId The ID of the transaction that the user is attempting to load.
1897
+ * Generates a verification code for the given email address.
1893
1898
  * @param emailAddress The email address to generate a verification code for. The user will be sent an email with the verification code.
1894
1899
  */
1895
- generateVerificationCode(transactionId: string, emailAddress: string): Promise<void>;
1900
+ generateVerificationCode(emailAddress: string): Promise<void>;
1896
1901
  /**
1897
1902
  * Verifies the given email address with the given verification code.
1898
- * @param transactionId The ID of the transaction that the user is attempting to load.
1899
1903
  * @param emailAddress The email address to verify.
1900
1904
  * @param verificationCode The verification code to verify the email address with.
1901
- * @returns An object containing the success status of the verification attempt, and a stakeholder type if the verification was successful.
1905
+ * @returns True if the verification was successful, false otherwise.
1902
1906
  */
1903
- verifyCode(transactionId: string, emailAddress: string, verificationCode: string): Promise<{
1904
- success: boolean;
1905
- stakeholderType?: StakeholderType;
1906
- }>;
1907
+ verifyCode(emailAddress: string, verificationCode: string): Promise<boolean>;
1907
1908
  /**
1908
1909
  * Creates a new instance of WorkflowExperience. A high level wrapper for workflows.
1909
1910
  * @param workflowId The id of the workflow to be run. Deprecated: Provide options instead.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spiffcommerce/core",
3
- "version": "10.3.1",
3
+ "version": "11.0.1",
4
4
  "description": "Core client API for interacting with the Spiff Commerce backend.",
5
5
  "source": "src/index.ts",
6
6
  "main": "dist/main.js",