@spiffcommerce/core 12.7.1 → 12.9.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
@@ -1916,10 +1916,16 @@ declare abstract class GlobalPropertyHandle {
1916
1916
  * @returns The type of the global property. Use this to determine how to render the property.
1917
1917
  */
1918
1918
  getType(): AspectType;
1919
+ /**
1920
+ * Applies the global state to all shared steps, if the state is set.
1921
+ * @param targetExperiences Optionally filter the workflow experiences it should be applied to.
1922
+ */
1923
+ abstract applyGlobalState(targetExperiences?: WorkflowExperience[]): Promise<void>;
1919
1924
  /**
1920
1925
  * Returns all steps that share this property.
1926
+ * @param targetExperiences Optionally filter the steps to only those in the given experiences.
1921
1927
  */
1922
- protected getSharedSteps(): import("stepHandles").StepHandle<import("@spiffcommerce/papyrus").AnyStepData>[];
1928
+ protected getSharedSteps(targetExperiences?: WorkflowExperience[]): import("stepHandles").StepHandle<import("index").AnyStepData>[];
1923
1929
  }
1924
1930
  interface GlobalPropertyStateManager {
1925
1931
  getGlobalPropertyState(): GlobalPropertyState | undefined;
@@ -1954,10 +1960,17 @@ interface _Bundle1 {
1954
1960
  getMetadata(): Map<string, string>;
1955
1961
  /**
1956
1962
  * Set custom metadata associated with this bundle.
1957
- * @param metadata The new metadata to set.
1963
+ * @param metadata Updated map of metadata items.
1958
1964
  * @returns A promise that resolves when the metadata has been updated in the Spiff Commerce system.
1959
1965
  */
1960
1966
  setMetadata(metadata: Map<string, string>): Promise<void>;
1967
+ /**
1968
+ * Set the name and metadata for this bundle.
1969
+ * @param name The new name for the bundle.
1970
+ * @param metadata Updated map of metadata items.
1971
+ * @returns A promise that resolves when the name and metadata have been updated in the Spiff Commerce system.
1972
+ */
1973
+ setNameAndMetadata(name: string, metadata: Map<string, string>): Promise<void>;
1961
1974
  /**
1962
1975
  * Returns true when the bundle contains products that share global properties.
1963
1976
  */
@@ -1995,9 +2008,11 @@ interface _Bundle1 {
1995
2008
  */
1996
2009
  getWorkflowExperiences(): WorkflowExperience[];
1997
2010
  /**
1998
- * Sort the list of workflow experiences.
2011
+ * Sort the list of workflow experiences. The sorting is performed locally, and then the order is updated in the Spiff Commerce system.
2012
+ * @returns A promise that resolves when the re-ordering of the workflow experiences has been updated in the Spiff Commerce system.
2013
+ * The sorting will occur immediately, but the promise will not resolve until the Spiff Commerce system has been updated.
1999
2014
  */
2000
- sortWorkflowExperiences(sortFunc: (expA: WorkflowExperience, expB: WorkflowExperience) => number): void;
2015
+ sortWorkflowExperiences(sortFunc: (expA: WorkflowExperience, expB: WorkflowExperience) => number): Promise<void>;
2001
2016
  /**
2002
2017
  * @returns The number of workflow experiences in this bundle.
2003
2018
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spiffcommerce/core",
3
- "version": "12.7.1",
3
+ "version": "12.9.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",
@@ -67,8 +67,8 @@
67
67
  "events": "^3.3.0",
68
68
  "https-browserify": "^1.0.0",
69
69
  "husky": "^8.0.1",
70
- "jest": "^29.0.3",
71
- "jest-environment-jsdom": "^29.0.3",
70
+ "jest": "^29.6.2",
71
+ "jest-environment-jsdom": "^29.6.2",
72
72
  "parcel": "^2.7.0",
73
73
  "path-browserify": "^1.0.1",
74
74
  "process": "^0.11.10",
@@ -77,7 +77,7 @@
77
77
  "react-dom": "^17.0.2",
78
78
  "stream-browserify": "^3.0.0",
79
79
  "stream-http": "^3.2.0",
80
- "ts-jest": "^29.0.2",
80
+ "ts-jest": "^29.1.1",
81
81
  "typescript": "4.7.2",
82
82
  "util": "^0.12.5"
83
83
  },