@spiffcommerce/core 12.3.2 → 12.4.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/types.d.ts CHANGED
@@ -1019,6 +1019,7 @@ interface Bundle {
1019
1019
  }[];
1020
1020
  name?: string;
1021
1021
  partner?: Partner;
1022
+ productCollection?: ProductCollection;
1022
1023
  transactions?: Transaction[];
1023
1024
  }
1024
1025
  interface BundleStakeholder {
@@ -1031,6 +1032,11 @@ interface BundleStakeholderInput {
1031
1032
  type: StakeholderType;
1032
1033
  customerDetails: CustomerDetailsInput;
1033
1034
  }
1035
+ type ProductCollection = {
1036
+ id: string;
1037
+ name: string;
1038
+ products: Product[];
1039
+ };
1034
1040
  interface StorageService {
1035
1041
  /**
1036
1042
  * Get a value.
@@ -1893,6 +1899,11 @@ interface _Bundle1 {
1893
1899
  * Return the total in subunits for this bundle. This is the sum of the total for all individual transactions.
1894
1900
  */
1895
1901
  getTotalSubunits(): number;
1902
+ /**
1903
+ * Retrieves the product collection associated with this bundle.
1904
+ * If the bundle is not associated with a product collection, this method will return undefined.
1905
+ */
1906
+ getProductCollection(): ProductCollection | undefined;
1896
1907
  /**
1897
1908
  * Add another workflow experience to this bundle.
1898
1909
  * @param experience The workflow experience to add to this bundle.
@@ -2034,10 +2045,10 @@ export class SpiffCommerceClient {
2034
2045
  */
2035
2046
  verifyCode(emailAddress: string, verificationCode: string): Promise<boolean>;
2036
2047
  /**
2037
- * @param configurationId The id of the configuration to be used for the bundle.
2048
+ * @param collectionId Optional: The id of the product collection that the bundle can use.
2038
2049
  * @returns A bundle to be used for grouping and operating on large amounts of workflow experiences.
2039
2050
  */
2040
- getNewBundle(): Promise<_Bundle1>;
2051
+ getNewBundle(collectionId?: string): Promise<_Bundle1>;
2041
2052
  /**
2042
2053
  * Retrieves an existing bundle from the API, by id.
2043
2054
  * @returns A bundle to be used for grouping and operating on large amounts of workflow experiences.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spiffcommerce/core",
3
- "version": "12.3.2",
3
+ "version": "12.4.0",
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",