@spiffcommerce/core 12.3.1 → 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/main.js +79 -43
- package/dist/module.js +59 -23
- package/dist/types.d.ts +13 -2
- package/package.json +2 -2
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
|
|
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
|
+
"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",
|
|
@@ -87,7 +87,7 @@
|
|
|
87
87
|
},
|
|
88
88
|
"dependencies": {
|
|
89
89
|
"@apollo/client": "^3.7.0",
|
|
90
|
-
"@spiffcommerce/papyrus": "^2.0.
|
|
90
|
+
"@spiffcommerce/papyrus": "^2.0.5",
|
|
91
91
|
"cross-fetch": "^3.1.5",
|
|
92
92
|
"graphql": "^16.6.0",
|
|
93
93
|
"lodash.clonedeep": "^4.5.0",
|