@spiffcommerce/core 11.1.2 → 11.2.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
@@ -1809,6 +1809,46 @@ export interface WorkflowExperience {
1809
1809
  [key: string]: string;
1810
1810
  }>;
1811
1811
  }
1812
+ /**
1813
+ * A bundle serves as a container for a set of workflow experience.
1814
+ */
1815
+ interface Bundle {
1816
+ /**
1817
+ * @returns The client that this bundle is associated with.
1818
+ */
1819
+ getClient(): SpiffCommerceClient;
1820
+ /**
1821
+ * @returns The id of the bundle entity in the Spiff Commerce system.
1822
+ */
1823
+ getId(): string;
1824
+ /**
1825
+ * Returns true when the bundle contains transactions with shared properties.
1826
+ */
1827
+ hasGlobalProperties(): boolean;
1828
+ /**
1829
+ * Get a handle to the global properties available within this bundle. Setting values
1830
+ * via this method will make selections on all bundles that share the property.
1831
+ */
1832
+ getGlobalProperties(): any;
1833
+ /**
1834
+ * Add another workflow experience to this bundle.
1835
+ * @param experience The workflow experience to add to this bundle.
1836
+ */
1837
+ addWorkflowExperience(experience: WorkflowExperience): Promise<void>;
1838
+ /**
1839
+ * Remove a workflow experience from this bundle.
1840
+ * @param experience The workflow experience to remove from this bundle.
1841
+ */
1842
+ removeWorkflowExperience(experience: WorkflowExperience): Promise<void>;
1843
+ /**
1844
+ * Sort the list of workflow experiences.
1845
+ */
1846
+ sortWorkflowExperiences(sortFunc: (expA: WorkflowExperience, expB: WorkflowExperience) => number): void;
1847
+ /**
1848
+ * @returns The number of workflow experiences in this bundle.
1849
+ */
1850
+ getWorkflowExperienceCount(): number;
1851
+ }
1812
1852
  export const getWorkflow: (id: string) => Promise<_Workflow1>;
1813
1853
  /**
1814
1854
  * Options that can be used during instantiation of the SpiffCommerce Javascript Client.
@@ -1906,6 +1946,16 @@ export class SpiffCommerceClient {
1906
1946
  * @returns True if the verification was successful, false otherwise.
1907
1947
  */
1908
1948
  verifyCode(emailAddress: string, verificationCode: string): Promise<boolean>;
1949
+ /**
1950
+ * @param configurationId The id of the configuration to be used for the bundle.
1951
+ * @returns A bundle to be used for grouping and operating on large amounts of workflow experiences.
1952
+ */
1953
+ getNewBundle(): Promise<Bundle>;
1954
+ /**
1955
+ * Retrieves an existing bundle from the API, by id.
1956
+ * @returns A bundle to be used for grouping and operating on large amounts of workflow experiences.
1957
+ */
1958
+ getExistingBundle(bundleId: string): Promise<Bundle>;
1909
1959
  /**
1910
1960
  * Creates a new instance of WorkflowExperience. A high level wrapper for workflows.
1911
1961
  * @param workflowId The id of the workflow to be run. Deprecated: Provide options instead.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spiffcommerce/core",
3
- "version": "11.1.2",
3
+ "version": "11.2.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",