@spiffcommerce/core 13.0.0 → 13.1.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
@@ -1909,10 +1909,6 @@ export class FrameStepHandle extends StepHandle<_FrameStepData1> {
1909
1909
  hasVaryingUpload(): boolean | undefined;
1910
1910
  hasVaryingSelection(): boolean | undefined;
1911
1911
  }
1912
- /**
1913
- * TODO: Add GlobalPropertyState mutation & queries to bundle.
1914
- * TODO: Optimize workflow experience state updates.
1915
- */
1916
1912
  /**
1917
1913
  * A GlobalPropertyHandle acts as an interface to global properties on our platform. Currently
1918
1914
  * bundles can return a handle for any global properties associated to the collection.
@@ -1922,9 +1918,13 @@ declare abstract class GlobalPropertyHandle {
1922
1918
  protected readonly property: GlobalPropertyConfigurationAspect;
1923
1919
  constructor(bundle: _Bundle1, property: GlobalPropertyConfigurationAspect);
1924
1920
  /**
1925
- * @returns The human friendly name of the property.
1921
+ * @returns The name of the global property. This is the key used to store the property in the state.
1926
1922
  */
1927
1923
  getName(): string;
1924
+ /**
1925
+ * @returns A human friendly title.
1926
+ */
1927
+ getTitle(): string;
1928
1928
  /**
1929
1929
  * @returns A human friendly description.
1930
1930
  */
@@ -2055,7 +2055,18 @@ interface _Bundle1 {
2055
2055
  * helpful details like what product to add to cart on supported e-commerce platforms.
2056
2056
  */
2057
2057
  finish(): Promise<DesignCreationMessage[]>;
2058
+ /**
2059
+ * Add an event listener to this bundle.
2060
+ * @param event The event to listen for. Currently only "conditional-global-properties-changed" is supported.
2061
+ * @param listener The listener to call when the event occurs.
2062
+ */
2063
+ addEventListener(event: BundleEvent, listener: () => void): void;
2064
+ /**
2065
+ * Remove a previously added event listener from this bundle.
2066
+ */
2067
+ removeEventListener(event: BundleEvent, listener: () => void): void;
2058
2068
  }
2069
+ type BundleEvent = "conditional-global-properties-changed";
2059
2070
  export const getWorkflow: (id: string) => Promise<_Workflow1>;
2060
2071
  /**
2061
2072
  * Options that can be used during instantiation of the SpiffCommerce Javascript Client.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spiffcommerce/core",
3
- "version": "13.0.0",
3
+ "version": "13.1.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": "^3.0.0",
90
+ "@spiffcommerce/papyrus": "^3.1.0",
91
91
  "cross-fetch": "^3.1.5",
92
92
  "graphql": "^16.6.0",
93
93
  "lodash.clonedeep": "^4.5.0",