@spiffcommerce/core 14.9.0 → 14.10.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
@@ -1156,6 +1156,14 @@ declare class AssetService implements AssetManager {
1156
1156
  * Allows for retrieving an asset, returns the option from a cache if possible.
1157
1157
  */
1158
1158
  getLocalOrFromServer(assetKey: string): Promise<_Asset1>;
1159
+ /**
1160
+ * Caches an asset if it doesn't already exist.
1161
+ */
1162
+ cacheAsset(asset: _Asset1): void;
1163
+ /**
1164
+ * Caches a material if it doesn't already exist.
1165
+ */
1166
+ cacheMaterial(material: MaterialResource): void;
1159
1167
  /**
1160
1168
  * Allows for retrieving amaterial, returns the option from a cache if possible.
1161
1169
  * @param id The option ID to be retrieved.
@@ -2123,16 +2131,38 @@ export interface Bundle {
2123
2131
  * @param experience The workflow experience to add to this bundle.
2124
2132
  */
2125
2133
  addWorkflowExperience(experience: WorkflowExperience): Promise<void>;
2134
+ /**
2135
+ * Adds multiple workflow experiences to this bundle.
2136
+ * @param experiences The workflow experiences to add to this bundle.
2137
+ */
2138
+ addWorkflowExperiences(experiences: WorkflowExperience[]): Promise<void>;
2126
2139
  /**
2127
2140
  * Remove a workflow experience from this bundle.
2128
2141
  * @param experience The workflow experience to remove from this bundle.
2129
2142
  */
2130
2143
  removeWorkflowExperience(experience: WorkflowExperience): Promise<void>;
2144
+ /**
2145
+ * Removes multiple workflow experiences from this bundle.
2146
+ * @param experiences The workflow experiences to remove from this bundle.
2147
+ */
2148
+ removeWorkflowExperiences(experiences: WorkflowExperience[]): Promise<void>;
2131
2149
  /**
2132
2150
  * Remove a workflow experience from this bundle by transaction.
2133
2151
  * @param transaction The transaction to remove from this bundle.
2134
2152
  */
2135
2153
  removeWorkflowExperienceByTransaction(transaction: Transaction): Promise<void>;
2154
+ /**
2155
+ * Removes multiple workflow experiences from this bundle by their transactions.
2156
+ * @param transactions The transactions to remove from this bundle.
2157
+ */
2158
+ removeWorkflowExperiencesByTransactions(transactions: Transaction[]): Promise<void>;
2159
+ /**
2160
+ * Inserts the given workflow experience into the bundle at the given index.
2161
+ * NOTE: If you intend to insert a workflow experience at the end of the bundle, use `addWorkflowExperience` instead as it is more efficient.
2162
+ * @param experience The workflow experience to insert.
2163
+ * @param index The index to insert the workflow experience at.
2164
+ */
2165
+ insertWorkflowExperience(experience: WorkflowExperience, index: number): Promise<void>;
2136
2166
  /**
2137
2167
  * Returns all workflow experiences currently added to this bundle.
2138
2168
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spiffcommerce/core",
3
- "version": "14.9.0",
3
+ "version": "14.10.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",