@spiffcommerce/core 38.0.0 → 39.0.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/index.cjs +146 -140
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +22 -12
- package/dist/index.mjs +1042 -1031
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1173,7 +1173,7 @@ interface WorkflowExperience {
|
|
|
1173
1173
|
/**
|
|
1174
1174
|
* Returns all steps in the workflow that are conditionally active. Ordered by scene and appearance within their respective scenes.
|
|
1175
1175
|
*/
|
|
1176
|
-
getStepsConditionallyActive(): StepHandle<AnyStepData>[]
|
|
1176
|
+
getStepsConditionallyActive(): Promise<StepHandle<AnyStepData>[]>;
|
|
1177
1177
|
/**
|
|
1178
1178
|
* Returns a list of scenes that are configured in the workflow. Each scene
|
|
1179
1179
|
* contains a list of steps. See getStepsByScene to access these.
|
|
@@ -1355,7 +1355,7 @@ declare class WorkflowExperienceImpl implements WorkflowExperience {
|
|
|
1355
1355
|
createPreviewImage(isThreeD?: boolean, resolution?: number): Promise<string>;
|
|
1356
1356
|
getStepById(id: string): StepHandle<any> | undefined;
|
|
1357
1357
|
getSteps(): StepHandle<AnyStepData>[];
|
|
1358
|
-
getStepsConditionallyActive(): StepHandle<AnyStepData>[]
|
|
1358
|
+
getStepsConditionallyActive(): Promise<StepHandle<AnyStepData>[]>;
|
|
1359
1359
|
getScenes(): Scene[];
|
|
1360
1360
|
getSelectionPriceSubunits(disablePriceBreaks?: boolean): number;
|
|
1361
1361
|
getBasePriceSubunits(includeAdditionalProduct?: boolean, disablePriceBreaks?: boolean): number;
|
|
@@ -1439,7 +1439,7 @@ declare abstract class GlobalPropertyHandle {
|
|
|
1439
1439
|
* Returns all steps that share this property.
|
|
1440
1440
|
* @param targetExperiences Optionally filter the steps to only those in the given experiences.
|
|
1441
1441
|
*/
|
|
1442
|
-
protected getSharedSteps(targetExperiences?: WorkflowExperience[]): StepHandle<AnyStepData>[]
|
|
1442
|
+
protected getSharedSteps(targetExperiences?: WorkflowExperience[]): Promise<StepHandle<AnyStepData>[]>;
|
|
1443
1443
|
protected getStateValue(): string | undefined;
|
|
1444
1444
|
}
|
|
1445
1445
|
/**
|
|
@@ -1580,7 +1580,7 @@ declare class ColorOptionGlobalPropertyHandle extends OptionGlobalPropertyHandle
|
|
|
1580
1580
|
/**
|
|
1581
1581
|
* Sets a custom color on the global state.
|
|
1582
1582
|
*/
|
|
1583
|
-
setCustomColor(color: string): void
|
|
1583
|
+
setCustomColor(color: string): Promise<void>;
|
|
1584
1584
|
/**
|
|
1585
1585
|
* Gets the custom color used by the global state.
|
|
1586
1586
|
*/
|
|
@@ -2708,7 +2708,7 @@ interface WorkflowManager {
|
|
|
2708
2708
|
* Returns a set of strings representing the identifiers of the minimal set of options
|
|
2709
2709
|
* required to satisfy the default initial loaded state of the workflow.
|
|
2710
2710
|
*/
|
|
2711
|
-
getInitialOptionIds(existingSelections?: StepSelections): Set<string
|
|
2711
|
+
getInitialOptionIds(existingSelections?: StepSelections): Promise<Set<string>>;
|
|
2712
2712
|
markStepsAsInitialised: (stepNames: string[]) => void;
|
|
2713
2713
|
getUpdatesPending: () => boolean;
|
|
2714
2714
|
markUpdateCompleted: (id: string) => void;
|
|
@@ -2719,7 +2719,7 @@ interface WorkflowManager {
|
|
|
2719
2719
|
setEditedStatus: (stepName: string, status: boolean) => void;
|
|
2720
2720
|
setInformationResults: (results: InformationResult[]) => void;
|
|
2721
2721
|
setMandatoryFulfilled: (stepName: string, status: boolean) => void;
|
|
2722
|
-
getMandatoryUnfulfilledSteps: () => string[]
|
|
2722
|
+
getMandatoryUnfulfilledSteps: () => Promise<string[]>;
|
|
2723
2723
|
setSelectionsAndElements: (stepName: string, variants: VariantResource[], elements: RegionElement[], callback?: () => Promise<void>) => Promise<void>;
|
|
2724
2724
|
getStateHash(): Promise<string>;
|
|
2725
2725
|
setStepError: (stepName: string, field: string, error: string | undefined) => void;
|
|
@@ -3046,9 +3046,15 @@ interface Region {
|
|
|
3046
3046
|
width: number;
|
|
3047
3047
|
};
|
|
3048
3048
|
}
|
|
3049
|
+
interface RequiredVariantMetafield {
|
|
3050
|
+
variantMetafieldConfigurationId?: string;
|
|
3051
|
+
variantMetafieldValue?: string;
|
|
3052
|
+
}
|
|
3049
3053
|
interface Condition {
|
|
3054
|
+
requiredVariantMetafields?: RequiredVariantMetafield[];
|
|
3050
3055
|
requiredVariantSelections: string[];
|
|
3051
3056
|
action: string;
|
|
3057
|
+
type?: string;
|
|
3052
3058
|
targetStepName: string;
|
|
3053
3059
|
}
|
|
3054
3060
|
interface StepAsset {
|
|
@@ -5232,7 +5238,7 @@ declare const digitalContentStepService: DigitalContentStepService;
|
|
|
5232
5238
|
|
|
5233
5239
|
declare class MockWorkflowManager implements WorkflowManager {
|
|
5234
5240
|
traversableScenes(): Promise<WorkflowScene[]>;
|
|
5235
|
-
getMandatoryUnfulfilledSteps: () => string[]
|
|
5241
|
+
getMandatoryUnfulfilledSteps: () => Promise<string[]>;
|
|
5236
5242
|
getTemplatingContext: () => Promise<{
|
|
5237
5243
|
[key: string]: any;
|
|
5238
5244
|
}>;
|
|
@@ -5287,7 +5293,7 @@ declare class MockWorkflowManager implements WorkflowManager {
|
|
|
5287
5293
|
getTransactionCustomer(): undefined;
|
|
5288
5294
|
setTransactionCustomer(): void;
|
|
5289
5295
|
setTransactionCustomerDetails(): void;
|
|
5290
|
-
getInitialOptionIds(): Set<string
|
|
5296
|
+
getInitialOptionIds(): Promise<Set<string>>;
|
|
5291
5297
|
getWorkflow(): {
|
|
5292
5298
|
id: string;
|
|
5293
5299
|
name: string;
|
|
@@ -5982,11 +5988,14 @@ declare const getOrderedTransactions: (customerId: string, limit: number, offset
|
|
|
5982
5988
|
declare const getTemplateTransactions: (customerId: string, limit: number, offset: number) => Promise<Transaction[]>;
|
|
5983
5989
|
declare const getTemplateBundles: (customerId: string, limit: number, offset: number) => Promise<Bundle[]>;
|
|
5984
5990
|
|
|
5991
|
+
interface MetafieldMapValue {
|
|
5992
|
+
key: string;
|
|
5993
|
+
value: string;
|
|
5994
|
+
metafieldConfigurationId: string;
|
|
5995
|
+
metafieldType: string;
|
|
5996
|
+
}
|
|
5985
5997
|
declare class MetafieldManager {
|
|
5986
|
-
readonly internalMap: Map<string,
|
|
5987
|
-
key: string;
|
|
5988
|
-
value: string;
|
|
5989
|
-
}[]>;
|
|
5998
|
+
readonly internalMap: Map<string, MetafieldMapValue[]>;
|
|
5990
5999
|
/**
|
|
5991
6000
|
* Given a specific entity, request the given keys for that entity.
|
|
5992
6001
|
* This will first check if the keys are already present in the internal map, and if not, it will fetch them from the server.
|
|
@@ -6010,6 +6019,7 @@ declare class MetafieldManager {
|
|
|
6010
6019
|
* @returns A promise resolving to the field if available or undefined if not.
|
|
6011
6020
|
*/
|
|
6012
6021
|
requestKeyForEntityIfAvailable(entityId: string, key: string): string | undefined;
|
|
6022
|
+
requestIfAvailable(entityId: string, metafieldConfigurationId: string): MetafieldMapValue | undefined;
|
|
6013
6023
|
}
|
|
6014
6024
|
declare const metafieldManager: MetafieldManager;
|
|
6015
6025
|
|