@spiffcommerce/core 29.2.0-beta.9392b841-e595-5697-83d1-d02467299033 → 29.2.0-beta.9a6c3271-4de2-5d0a-a272-faa4a5c6152f
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/CHANGELOG.md +0 -6
- package/dist/index.d.ts +26 -21
- package/dist/index.js +70 -126
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +602 -648
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -14,12 +14,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
14
14
|
- `Fixed` for any bug fixes.
|
|
15
15
|
- `Security` in case of vulnerabilities.
|
|
16
16
|
|
|
17
|
-
## [30.0.0] - 26-08-2025
|
|
18
|
-
|
|
19
|
-
## Added
|
|
20
|
-
|
|
21
|
-
- The `updateRecipient` method now has extra arguments, primarily for custom fields.
|
|
22
|
-
|
|
23
17
|
## [29.2.0] - 25-08-2025
|
|
24
18
|
|
|
25
19
|
## Added
|
package/dist/index.d.ts
CHANGED
|
@@ -1365,11 +1365,11 @@ declare abstract class GlobalPropertyHandle {
|
|
|
1365
1365
|
*/
|
|
1366
1366
|
getName(): string;
|
|
1367
1367
|
/**
|
|
1368
|
-
* @returns A human
|
|
1368
|
+
* @returns A human-friendly title.
|
|
1369
1369
|
*/
|
|
1370
1370
|
getTitle(): string;
|
|
1371
1371
|
/**
|
|
1372
|
-
* @returns A human
|
|
1372
|
+
* @returns A human-friendly description.
|
|
1373
1373
|
*/
|
|
1374
1374
|
getDescription(): string;
|
|
1375
1375
|
/**
|
|
@@ -1380,6 +1380,14 @@ declare abstract class GlobalPropertyHandle {
|
|
|
1380
1380
|
* @returns The underlying property data object.
|
|
1381
1381
|
*/
|
|
1382
1382
|
getRawProperty(): GlobalPropertyConfigurationAspect;
|
|
1383
|
+
/**
|
|
1384
|
+
* @returns Whether this aspect has been marked as required to be completed before the user can continue.
|
|
1385
|
+
*/
|
|
1386
|
+
isMandatory(): boolean;
|
|
1387
|
+
/**
|
|
1388
|
+
* @returns Whether this aspect has been marked as `completed` for mandatory checks. Note that this function always returns `true` if the aspect has not been marked as mandatory.
|
|
1389
|
+
*/
|
|
1390
|
+
isMandatoryFulfilled(): boolean;
|
|
1383
1391
|
/**
|
|
1384
1392
|
* Applies the global state to all shared steps, if the state is set.
|
|
1385
1393
|
* @param targetExperiences Optionally filter the workflow experiences it should be applied to.
|
|
@@ -1531,12 +1539,15 @@ interface GlobalPropertyStateManager {
|
|
|
1531
1539
|
setGlobalPropertyState(state: GlobalPropertyState): Promise<void>;
|
|
1532
1540
|
getAspect(name: string, channel?: number): string | undefined;
|
|
1533
1541
|
getAspectStorage<S extends GlobalPropertyStateAspectStorage>(name: string, channel?: number): S | undefined;
|
|
1542
|
+
getAspectMandatoryFulfilled(name: string): boolean | undefined;
|
|
1543
|
+
setAspectMandatoryFulfilled(name: string, fulfilled: boolean): Promise<void>;
|
|
1534
1544
|
/**
|
|
1535
1545
|
* Updates the value of a named aspect in the state.
|
|
1536
1546
|
* @param name The name (key) of the aspect. This must match the key in the associated Global Property Config
|
|
1537
1547
|
* @param value The value, represented as a string.
|
|
1538
1548
|
* @param storage Optional: Additional data storage for the aspect. Not specifying this parameter, or providing `undefined`, will not update the
|
|
1539
1549
|
* storage (if it already exists). Providing `null` will clear the existing storage.
|
|
1550
|
+
* @param channel Optional: Additional sub-identifier.
|
|
1540
1551
|
*/
|
|
1541
1552
|
setAspect(name: string, value: string, storage?: GlobalPropertyStateAspectStorage | null, channel?: number): Promise<void>;
|
|
1542
1553
|
setAspectStorage<S extends GlobalPropertyStateAspectStorage>(name: string, storage: S | null, channel?: number): Promise<void>;
|
|
@@ -1771,6 +1782,11 @@ declare const getProductCollections: (ids: string[]) => Promise<ProductCollectio
|
|
|
1771
1782
|
interface ConditionalGlobalPropertiesChangedEventData {
|
|
1772
1783
|
globalProperties: GlobalPropertyHandle[];
|
|
1773
1784
|
}
|
|
1785
|
+
interface GlobalPropertiesMandatoryChangedEventData {
|
|
1786
|
+
changed: GlobalPropertyHandle[];
|
|
1787
|
+
completed: GlobalPropertyHandle[];
|
|
1788
|
+
remaining: GlobalPropertyHandle[];
|
|
1789
|
+
}
|
|
1774
1790
|
interface WorkflowExperienceHoverEventData {
|
|
1775
1791
|
workflowExperience: WorkflowExperience;
|
|
1776
1792
|
}
|
|
@@ -1781,6 +1797,7 @@ interface WorkflowExperienceRemovedEventData extends WorkflowExperienceAddedEven
|
|
|
1781
1797
|
}
|
|
1782
1798
|
type BundleEventMap = {
|
|
1783
1799
|
"conditional-global-properties-changed": ConditionalGlobalPropertiesChangedEventData;
|
|
1800
|
+
"global-properties-mandatory-changed": GlobalPropertiesMandatoryChangedEventData;
|
|
1784
1801
|
"workflow-experience-hover-enter": WorkflowExperienceHoverEventData;
|
|
1785
1802
|
"workflow-experience-hover-exit": WorkflowExperienceHoverEventData;
|
|
1786
1803
|
"workflow-experience-added": WorkflowExperienceAddedEventData;
|
|
@@ -2727,13 +2744,11 @@ interface WorkflowManager {
|
|
|
2727
2744
|
/**
|
|
2728
2745
|
* Create or amend the recipient fo the transaction.
|
|
2729
2746
|
*/
|
|
2730
|
-
updateRecipient(firstName?: string, lastName?: string, address?: string, suburb?: string, state?: string, email?: string, postalCode?: string, country?: string, mobile?: string, company?: string
|
|
2747
|
+
updateRecipient(firstName?: string, lastName?: string, address?: string, suburb?: string, state?: string, email?: string, postalCode?: string, country?: string, mobile?: string, company?: string): Promise<void>;
|
|
2731
2748
|
/**
|
|
2732
2749
|
* Returns the context object used for text templating.
|
|
2733
2750
|
*/
|
|
2734
|
-
getTemplatingContext():
|
|
2735
|
-
[key: string]: any;
|
|
2736
|
-
}>;
|
|
2751
|
+
getTemplatingContext(): any;
|
|
2737
2752
|
}
|
|
2738
2753
|
|
|
2739
2754
|
declare enum AssetType {
|
|
@@ -2902,6 +2917,7 @@ interface GlobalPropertyConfigurationAspect {
|
|
|
2902
2917
|
entityId?: string;
|
|
2903
2918
|
conditions?: GlobalPropertyConfigurationAspectCondition[];
|
|
2904
2919
|
data?: GlobalPropertyConfigurationAspectData;
|
|
2920
|
+
mandatory?: boolean;
|
|
2905
2921
|
}
|
|
2906
2922
|
interface GlobalPropertyConfigurationAspectData {
|
|
2907
2923
|
fileUpload?: GlobalPropertyConfigurationAspectFileUploadData;
|
|
@@ -3480,9 +3496,7 @@ interface RenderingConfiguration {
|
|
|
3480
3496
|
/**
|
|
3481
3497
|
* Contents variables for templating text.
|
|
3482
3498
|
*/
|
|
3483
|
-
templatingContext?:
|
|
3484
|
-
[key: string]: any;
|
|
3485
|
-
};
|
|
3499
|
+
templatingContext?: any;
|
|
3486
3500
|
}
|
|
3487
3501
|
interface ColorProfileProps {
|
|
3488
3502
|
name: string;
|
|
@@ -3766,13 +3780,6 @@ interface Recipient {
|
|
|
3766
3780
|
country?: string;
|
|
3767
3781
|
mobile?: string;
|
|
3768
3782
|
company?: string;
|
|
3769
|
-
apartment?: string;
|
|
3770
|
-
customField1?: string;
|
|
3771
|
-
customField2?: string;
|
|
3772
|
-
customField3?: string;
|
|
3773
|
-
customField4?: string;
|
|
3774
|
-
customField5?: string;
|
|
3775
|
-
conversionConfigurationId?: string;
|
|
3776
3783
|
createdAt?: string;
|
|
3777
3784
|
updatedAt?: string;
|
|
3778
3785
|
deletedAt?: string;
|
|
@@ -5083,12 +5090,10 @@ declare class DigitalContentStepService implements StepService<DigitalContentSte
|
|
|
5083
5090
|
declare const digitalContentStepService: DigitalContentStepService;
|
|
5084
5091
|
|
|
5085
5092
|
declare class MockWorkflowManager implements WorkflowManager {
|
|
5086
|
-
getTemplatingContext: () =>
|
|
5087
|
-
[key: string]: any;
|
|
5088
|
-
}>;
|
|
5093
|
+
getTemplatingContext: () => void;
|
|
5089
5094
|
removeRecipientCallback: (callback: RecipientCallback) => void;
|
|
5090
5095
|
addRecipientCallback: (callback: RecipientCallback) => void;
|
|
5091
|
-
updateRecipient(_firstName?: string, _lastName?: string, _address?: string, _suburb?: string, _state?: string, _email?: string, _postalCode?: string, _country?: string, _mobile?: string, _company?: string
|
|
5096
|
+
updateRecipient(_firstName?: string, _lastName?: string, _address?: string, _suburb?: string, _state?: string, _email?: string, _postalCode?: string, _country?: string, _mobile?: string, _company?: string): Promise<void>;
|
|
5092
5097
|
approveTransaction(_note?: string): Promise<void>;
|
|
5093
5098
|
rejectTransaction(_note?: string): Promise<void>;
|
|
5094
5099
|
private client;
|
|
@@ -5947,4 +5952,4 @@ declare const validateWorkflowExperienceRecipients: (workflowExperiences: Workfl
|
|
|
5947
5952
|
*/
|
|
5948
5953
|
declare const getGlobalPropertyStateForBundle: (bundleId: string) => Promise<GlobalPropertyState | undefined>;
|
|
5949
5954
|
|
|
5950
|
-
export { AddonHandle, AddressComponent, AddressValidationJob, AddressValidationJobStatus, AddressValidationResult, AddressValidationResultConfirmationLevel, Animatable, AnyStepData, ArrayInput, AspectType, Asset, AssetConfiguration, AssetNotFoundError, AssetObjectVersion, AssetType, BringForwardCommand, BringToBackCommand, BringToFrontCommand, Bundle$1 as Bundle, BundleDesignCreationCartAddMode, BundleDesignCreationMessage, BundleEvent, BundleEventData, BundleEventType, Bundle as BundleRaw, BundleStakeholder, CanvasCommand, CollectionProduct, ColorDefinition, ColorOption, ColorOptionGlobalPropertyHandle, ColorProfileProps, CommandContext, CommandState, Condition, ConditionalGlobalPropertiesChangedEventData, CreateElementCommand, CreateLayoutCommand, CurrencyContext, CurrencyService, Customer, CustomerDetailsInput, DeleteElementCommand, DesignCreationMessage, DesignCreationProgressUpdate, DesignInputStep, DigitalContentStepData, DigitalContentStepHandle, EditedSteps, ExportedStepData, ExportedStepDataProperty, ExportedStepDataPropertyType, FileUploadGlobalPropertyHandle, FlowExecutionNodeResult, FlowExecutionResult, FlowService, FontAlignmentCommand, FontColorCommand, FontSizeCommand, FontSourceCommand, FrameElement, FrameService, FrameStep, FrameStepData, FrameStepHandle, FrameThresholdSettings, GetNewWorkflowOptions, GetWorkflowOptions, GlobalPropertyConfiguration, GlobalPropertyHandle, GroupCommand, ILayout, IllustrationElement, IllustrationStepData, IllustrationStepHandle, ImageElement, InformationMessageType, InformationResult, InformationStepData, InformationStepHandle, Integration, IntegrationOptionResource, IntegrationProduct, IntegrationType, LayoutComponentConfiguration, LayoutData, LayoutElement, LayoutElementFactory, LayoutElementType, LayoutNotFoundError, LayoutRenderingPurpose, LayoutState, LayoutsState, MandatorySteps, MaterialEffectMode, MaterialStepData, MaterialStepHandle, MisconfigurationError, MockWorkflowManager, ModelStepData, ModelStepHandle, ModuleStepData, ModuleStepHandle, MoveCommand, NodeType, ObjectInput, ObjectInputType, OptionGlobalPropertyHandle, OptionNotFoundError, OptionResource, Order, OrderItem, PapyrusComponent, ParseError, PictureStepData, PictureStepHandle, Placeable, PmsSearchResult, Point, Product, ProductCameraRig, ProductCollection, ProductCollectionProductSortKey, ProductWorkflow$1 as ProductWorkflow, promiseCache as PromiseCache, PromiseQueue, QuestionStepData, QuestionStepHandle, QueueablePromise, Recipient, Region, RegionElement, RenderableScene, ResizeCommand, ResourceNotFoundError, RotateCommand, SavedDesign, ScaleAxis, SelectionStorage, SendBackwardsCommand, ShapeStepData, ShapeStepHandle, ShareAction, ShareActionType, SilentIllustrationStepData, SpiffCommerceClient, Stakeholder, StakeholderType, StateMutationFunc, Step, StepAspect, StepAspectType, StepElements, StepGroup, StepHandle, StepStorage, StepType, TextAlgorithm, TextChangeCommand, TextChangeResult, TextGlobalPropertyHandle, TextInput, TextStepData, TextStepHandle, TextStepStorage, TextboxElement, Theme, ToastCallback, Transaction, Transform, TransformCollection$1 as TransformCollection, UnhandledBehaviorError, UnitOfMeasurement, UpdateImageSourceCommand, Variant, VariantResource, Vector3, Workflow, WorkflowExperience, WorkflowExperienceEventType, WorkflowExperienceHoverEventData, WorkflowExperienceImpl, WorkflowManager, WorkflowMetadata, WorkflowPanel, WorkflowScene, WorkflowSelections, WorkflowStorage, assetService, browserColorToHex, cmPerPixel, createDesign, currentDirection, dataUrlFromExternalUrl, designService, determineCorrectFontSizeAndLines, digitalContentStepService, domParser, duplicateBundle, duplicateTransaction, fetchAsString, findAngle, findElement, findPmsColors, frameDataCache, frameStepService, generate, generateCommands, generateSVGWithUnknownColors, generateStateFromDesignInputSteps, getAddressValidationJobs, getAttributesFromArrayBuffer, getAxisAlignedBoundingBox, getBoundedOffsets, getBundleThemeConfiguration, getCustomer, getCustomerBundles, getElementVertices, getFrameData, getGlobalPropertyStateForBundle, getIntegration, getNEPoint, getNWPoint, getOrderedTransactions, getOverrideThemeConfiguration, getPointOfRotation, getProductCollections, getSEPoint, getSvgElement, getTemplateBundles, getTemplateTransactions, getTransaction, getTransactionThemeConfiguration, getTransactionsForBundle, getTrueCoordinates, getUnorderedTransactions, getValidationJobsForWorkflowExperiences, getWorkflow, getWorkflows, graphQlManager, illustrationStepService, isCloseToValue, loadFont, matchHexToPms, materialStepService, metafieldManager, mmPerPixel, modelStepService, modifySVGColors, moduleStepService, nameBundle, nameTransaction, optionService, outlineFontsInSvg, patternImageDataCache, persistenceService, pictureStepService, pmsToRgb, questionStepService, registerFetchImplementation, registerWindowImplementation, rehydrateSerializedLayout, rgbToPms, rotateAroundPoint, sanitizeSvgTree, setBearerAuthenticationToken, setCanvasModule, shapeStepService, shortenUrl, spiffCoreConfiguration, stepAspectValuesToDesignInputSteps, svgColorValueToDefinition, svgStringDimensions, svgToDataUrl, textStepService, toast, validateWorkflowExperienceRecipient, validateWorkflowExperienceRecipients, xmlSerializer };
|
|
5955
|
+
export { AddonHandle, AddressComponent, AddressValidationJob, AddressValidationJobStatus, AddressValidationResult, AddressValidationResultConfirmationLevel, Animatable, AnyStepData, ArrayInput, AspectType, Asset, AssetConfiguration, AssetNotFoundError, AssetObjectVersion, AssetType, BringForwardCommand, BringToBackCommand, BringToFrontCommand, Bundle$1 as Bundle, BundleDesignCreationCartAddMode, BundleDesignCreationMessage, BundleEvent, BundleEventData, BundleEventType, Bundle as BundleRaw, BundleStakeholder, CanvasCommand, CollectionProduct, ColorDefinition, ColorOption, ColorOptionGlobalPropertyHandle, ColorProfileProps, CommandContext, CommandState, Condition, ConditionalGlobalPropertiesChangedEventData, CreateElementCommand, CreateLayoutCommand, CurrencyContext, CurrencyService, Customer, CustomerDetailsInput, DeleteElementCommand, DesignCreationMessage, DesignCreationProgressUpdate, DesignInputStep, DigitalContentStepData, DigitalContentStepHandle, EditedSteps, ExportedStepData, ExportedStepDataProperty, ExportedStepDataPropertyType, FileUploadGlobalPropertyHandle, FlowExecutionNodeResult, FlowExecutionResult, FlowService, FontAlignmentCommand, FontColorCommand, FontSizeCommand, FontSourceCommand, FrameElement, FrameService, FrameStep, FrameStepData, FrameStepHandle, FrameThresholdSettings, GetNewWorkflowOptions, GetWorkflowOptions, GlobalPropertiesMandatoryChangedEventData, GlobalPropertyConfiguration, GlobalPropertyHandle, GroupCommand, ILayout, IllustrationElement, IllustrationStepData, IllustrationStepHandle, ImageElement, InformationMessageType, InformationResult, InformationStepData, InformationStepHandle, Integration, IntegrationOptionResource, IntegrationProduct, IntegrationType, LayoutComponentConfiguration, LayoutData, LayoutElement, LayoutElementFactory, LayoutElementType, LayoutNotFoundError, LayoutRenderingPurpose, LayoutState, LayoutsState, MandatorySteps, MaterialEffectMode, MaterialStepData, MaterialStepHandle, MisconfigurationError, MockWorkflowManager, ModelStepData, ModelStepHandle, ModuleStepData, ModuleStepHandle, MoveCommand, NodeType, ObjectInput, ObjectInputType, OptionGlobalPropertyHandle, OptionNotFoundError, OptionResource, Order, OrderItem, PapyrusComponent, ParseError, PictureStepData, PictureStepHandle, Placeable, PmsSearchResult, Point, Product, ProductCameraRig, ProductCollection, ProductCollectionProductSortKey, ProductWorkflow$1 as ProductWorkflow, promiseCache as PromiseCache, PromiseQueue, QuestionStepData, QuestionStepHandle, QueueablePromise, Recipient, Region, RegionElement, RenderableScene, ResizeCommand, ResourceNotFoundError, RotateCommand, SavedDesign, ScaleAxis, SelectionStorage, SendBackwardsCommand, ShapeStepData, ShapeStepHandle, ShareAction, ShareActionType, SilentIllustrationStepData, SpiffCommerceClient, Stakeholder, StakeholderType, StateMutationFunc, Step, StepAspect, StepAspectType, StepElements, StepGroup, StepHandle, StepStorage, StepType, TextAlgorithm, TextChangeCommand, TextChangeResult, TextGlobalPropertyHandle, TextInput, TextStepData, TextStepHandle, TextStepStorage, TextboxElement, Theme, ToastCallback, Transaction, Transform, TransformCollection$1 as TransformCollection, UnhandledBehaviorError, UnitOfMeasurement, UpdateImageSourceCommand, Variant, VariantResource, Vector3, Workflow, WorkflowExperience, WorkflowExperienceEventType, WorkflowExperienceHoverEventData, WorkflowExperienceImpl, WorkflowManager, WorkflowMetadata, WorkflowPanel, WorkflowScene, WorkflowSelections, WorkflowStorage, assetService, browserColorToHex, cmPerPixel, createDesign, currentDirection, dataUrlFromExternalUrl, designService, determineCorrectFontSizeAndLines, digitalContentStepService, domParser, duplicateBundle, duplicateTransaction, fetchAsString, findAngle, findElement, findPmsColors, frameDataCache, frameStepService, generate, generateCommands, generateSVGWithUnknownColors, generateStateFromDesignInputSteps, getAddressValidationJobs, getAttributesFromArrayBuffer, getAxisAlignedBoundingBox, getBoundedOffsets, getBundleThemeConfiguration, getCustomer, getCustomerBundles, getElementVertices, getFrameData, getGlobalPropertyStateForBundle, getIntegration, getNEPoint, getNWPoint, getOrderedTransactions, getOverrideThemeConfiguration, getPointOfRotation, getProductCollections, getSEPoint, getSvgElement, getTemplateBundles, getTemplateTransactions, getTransaction, getTransactionThemeConfiguration, getTransactionsForBundle, getTrueCoordinates, getUnorderedTransactions, getValidationJobsForWorkflowExperiences, getWorkflow, getWorkflows, graphQlManager, illustrationStepService, isCloseToValue, loadFont, matchHexToPms, materialStepService, metafieldManager, mmPerPixel, modelStepService, modifySVGColors, moduleStepService, nameBundle, nameTransaction, optionService, outlineFontsInSvg, patternImageDataCache, persistenceService, pictureStepService, pmsToRgb, questionStepService, registerFetchImplementation, registerWindowImplementation, rehydrateSerializedLayout, rgbToPms, rotateAroundPoint, sanitizeSvgTree, setBearerAuthenticationToken, setCanvasModule, shapeStepService, shortenUrl, spiffCoreConfiguration, stepAspectValuesToDesignInputSteps, svgColorValueToDefinition, svgStringDimensions, svgToDataUrl, textStepService, toast, validateWorkflowExperienceRecipient, validateWorkflowExperienceRecipients, xmlSerializer };
|