@spiffcommerce/core 22.1.5 → 22.2.0-beta.4d3c03ea-bbcf-5554-acbf-81d2affe87e2
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/index.d.ts +24 -1
- package/dist/index.js +724 -664
- package/dist/index.umd.cjs +137 -101
- package/package.json +2 -1
package/dist/index.d.ts
CHANGED
|
@@ -4,6 +4,7 @@ export { Animatable, AnyStepData, AspectType, Asset, AssetType, BringForwardComm
|
|
|
4
4
|
import { ApolloClient, MutationOptions, FetchResult } from '@apollo/client/core';
|
|
5
5
|
import { RenderableContextService, RenderableContext, ThreeDPreviewService, ModelContainer } from '@spiffcommerce/preview';
|
|
6
6
|
import * as lodash from 'lodash';
|
|
7
|
+
import { ThemeInstallConfigurationResource } from '@spiffcommerce/theme-bridge';
|
|
7
8
|
import { FuseResult } from 'fuse.js';
|
|
8
9
|
|
|
9
10
|
declare class OptionService {
|
|
@@ -1793,6 +1794,13 @@ interface GetWorkflowFromExternalProductOptions extends GetNewWorkflowOptionsBas
|
|
|
1793
1794
|
}
|
|
1794
1795
|
type GetNewWorkflowOptions = GetWorkflowFromIntegrationProductOptions | GetWorkflowFromExternalProductOptions;
|
|
1795
1796
|
type GetWorkflowOptions = GetWorkflowFromTransactionOptions | GetNewWorkflowOptions;
|
|
1797
|
+
interface ClientConfiguration {
|
|
1798
|
+
hubUrl: string;
|
|
1799
|
+
serverUrl: string;
|
|
1800
|
+
servicesApiUrl: string;
|
|
1801
|
+
marketplaceThemeInstallId: string;
|
|
1802
|
+
marketplaceThemeInstallConfigurationId: string;
|
|
1803
|
+
}
|
|
1796
1804
|
/**
|
|
1797
1805
|
* The Spiff Commerce Javascript Client. Required for
|
|
1798
1806
|
* creating workflow experiences.
|
|
@@ -1803,12 +1811,17 @@ declare class SpiffCommerceClient {
|
|
|
1803
1811
|
private currencyCode?;
|
|
1804
1812
|
private customer?;
|
|
1805
1813
|
private activeIntegration?;
|
|
1814
|
+
private marketplaceThemeInstallId?;
|
|
1815
|
+
private marketplaceThemeInstallConfigurationId?;
|
|
1806
1816
|
/**
|
|
1807
1817
|
* @deprecated This object is passed to the WorkflowExperience constructor and is no longer needed on this object.
|
|
1808
1818
|
* Any functionality referencing this object will be removed in a future release.
|
|
1809
1819
|
*/
|
|
1810
1820
|
private experienceOptions?;
|
|
1811
1821
|
constructor(options: ClientOptions);
|
|
1822
|
+
/** @deprecated Use configureClient instead */
|
|
1823
|
+
configureUrls(hubUrl: string, serverUrl: string, servicesApiUrl: string): void;
|
|
1824
|
+
configureClient(configuration: ClientConfiguration): void;
|
|
1812
1825
|
/**
|
|
1813
1826
|
* @returns The asset manager allows for common operations related to assets
|
|
1814
1827
|
* and the Spiff Commerce platform.
|
|
@@ -1937,7 +1950,6 @@ declare class SpiffCommerceClient {
|
|
|
1937
1950
|
* @returns The transaction associated with this client.
|
|
1938
1951
|
*/
|
|
1939
1952
|
getTransaction(): Transaction;
|
|
1940
|
-
configureUrls(hubUrl: string, serverUrl: string, servicesApiUrl: string): void;
|
|
1941
1953
|
/**
|
|
1942
1954
|
* A function used to synchronize transaction state with the server.
|
|
1943
1955
|
* @param options New state details. To be spread into the query.
|
|
@@ -2120,6 +2132,11 @@ interface WorkflowManager {
|
|
|
2120
2132
|
* The updated transactionShareActions overwrite the existing values on the Transaction object returned by `getTransaction()`.
|
|
2121
2133
|
*/
|
|
2122
2134
|
updateTransactionShareActions(): Promise<void>;
|
|
2135
|
+
/**
|
|
2136
|
+
* Re-fetches the stakeholders and currentStakeholder for this WorkflowManager's Transaction object.
|
|
2137
|
+
* The updated stakeholders and currentStakeholder overwrite the existing values on the Transaction object returned by `getTransaction()`.
|
|
2138
|
+
*/
|
|
2139
|
+
updateTransactionStakeholders(): Promise<void>;
|
|
2123
2140
|
}
|
|
2124
2141
|
|
|
2125
2142
|
interface StepService<T extends AnyStepData> {
|
|
@@ -2285,6 +2302,8 @@ interface Transaction {
|
|
|
2285
2302
|
* The users who have access to this transaction.
|
|
2286
2303
|
*/
|
|
2287
2304
|
stakeholders?: Stakeholder[];
|
|
2305
|
+
/** The stakeholder of the currently logged in user, if applicable. */
|
|
2306
|
+
currentStakeholder?: Stakeholder;
|
|
2288
2307
|
/**
|
|
2289
2308
|
* The amount of this transaction that was, or will be, ordered
|
|
2290
2309
|
*/
|
|
@@ -2308,6 +2327,9 @@ interface Transaction {
|
|
|
2308
2327
|
* A list of actions that have been associated to this transaction. To be used by the client to interact further post design.
|
|
2309
2328
|
*/
|
|
2310
2329
|
transactionShareActions?: TransactionShareAction[];
|
|
2330
|
+
/** Whether any share actions for this Transaction require the user to be authenticated as a stakeholder */
|
|
2331
|
+
hasAuthenticatedActions?: boolean;
|
|
2332
|
+
marketplaceThemeInstallConfiguration?: ThemeInstallConfigurationResource;
|
|
2311
2333
|
}
|
|
2312
2334
|
interface TransactionShareAction {
|
|
2313
2335
|
id: string;
|
|
@@ -3126,6 +3148,7 @@ declare class MockWorkflowManager implements WorkflowManager {
|
|
|
3126
3148
|
getValidationErrors(): {
|
|
3127
3149
|
steps: Map<any, any>;
|
|
3128
3150
|
};
|
|
3151
|
+
updateTransactionStakeholders(): Promise<void>;
|
|
3129
3152
|
}
|
|
3130
3153
|
|
|
3131
3154
|
declare const generateCommands: (designInputSteps: DesignInputStep[], workflow: Workflow, layouts: ILayout[], productOverlayImageUrl?: string) => Promise<CanvasCommand[]>;
|