@spiffcommerce/core 29.2.0-beta.3ff37077-33d0-571f-b9a9-bc0d6594c98d → 29.2.0-beta.9392b841-e595-5697-83d1-d02467299033

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 CHANGED
@@ -14,6 +14,12 @@ 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
+
17
23
  ## [29.2.0] - 25-08-2025
18
24
 
19
25
  ## 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-friendly title.
1368
+ * @returns A human friendly title.
1369
1369
  */
1370
1370
  getTitle(): string;
1371
1371
  /**
1372
- * @returns A human-friendly description.
1372
+ * @returns A human friendly description.
1373
1373
  */
1374
1374
  getDescription(): string;
1375
1375
  /**
@@ -1380,14 +1380,6 @@ 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;
1391
1383
  /**
1392
1384
  * Applies the global state to all shared steps, if the state is set.
1393
1385
  * @param targetExperiences Optionally filter the workflow experiences it should be applied to.
@@ -1539,18 +1531,15 @@ interface GlobalPropertyStateManager {
1539
1531
  setGlobalPropertyState(state: GlobalPropertyState): Promise<void>;
1540
1532
  getAspect(name: string, channel?: number): string | undefined;
1541
1533
  getAspectStorage<S extends GlobalPropertyStateAspectStorage>(name: string, channel?: number): S | undefined;
1542
- getAspectMandatoryFulfilled(name: string): boolean | undefined;
1543
1534
  /**
1544
1535
  * Updates the value of a named aspect in the state.
1545
1536
  * @param name The name (key) of the aspect. This must match the key in the associated Global Property Config
1546
1537
  * @param value The value, represented as a string.
1547
1538
  * @param storage Optional: Additional data storage for the aspect. Not specifying this parameter, or providing `undefined`, will not update the
1548
1539
  * storage (if it already exists). Providing `null` will clear the existing storage.
1549
- * @param channel Optional: Additional sub-identifier.
1550
- * @param mandatoryFulfilled Optional: Marks the aspect as fulfilled/unfulfilled for mandatory checks.
1551
1540
  */
1552
- setAspect(name: string, value: string, storage?: GlobalPropertyStateAspectStorage | null, channel?: number, mandatoryFulfilled?: boolean): Promise<void>;
1553
- setAspectStorage<S extends GlobalPropertyStateAspectStorage>(name: string, storage: S | null, channel?: number, mandatoryFulfilled?: boolean): Promise<void>;
1541
+ setAspect(name: string, value: string, storage?: GlobalPropertyStateAspectStorage | null, channel?: number): Promise<void>;
1542
+ setAspectStorage<S extends GlobalPropertyStateAspectStorage>(name: string, storage: S | null, channel?: number): Promise<void>;
1554
1543
  setBundleOptions(bundleOptions?: BundleOptions): void;
1555
1544
  getBundleOptions(): BundleOptions | undefined;
1556
1545
  setConfiguration(configuration: GlobalPropertyConfiguration | undefined): void;
@@ -1782,11 +1771,6 @@ declare const getProductCollections: (ids: string[]) => Promise<ProductCollectio
1782
1771
  interface ConditionalGlobalPropertiesChangedEventData {
1783
1772
  globalProperties: GlobalPropertyHandle[];
1784
1773
  }
1785
- interface GlobalPropertiesMandatoryChangedEventData {
1786
- changed: GlobalPropertyHandle[];
1787
- completed: GlobalPropertyHandle[];
1788
- remaining: GlobalPropertyHandle[];
1789
- }
1790
1774
  interface WorkflowExperienceHoverEventData {
1791
1775
  workflowExperience: WorkflowExperience;
1792
1776
  }
@@ -1797,7 +1781,6 @@ interface WorkflowExperienceRemovedEventData extends WorkflowExperienceAddedEven
1797
1781
  }
1798
1782
  type BundleEventMap = {
1799
1783
  "conditional-global-properties-changed": ConditionalGlobalPropertiesChangedEventData;
1800
- "global-properties-mandatory-changed": GlobalPropertiesMandatoryChangedEventData;
1801
1784
  "workflow-experience-hover-enter": WorkflowExperienceHoverEventData;
1802
1785
  "workflow-experience-hover-exit": WorkflowExperienceHoverEventData;
1803
1786
  "workflow-experience-added": WorkflowExperienceAddedEventData;
@@ -2744,11 +2727,13 @@ interface WorkflowManager {
2744
2727
  /**
2745
2728
  * Create or amend the recipient fo the transaction.
2746
2729
  */
2747
- updateRecipient(firstName?: string, lastName?: string, address?: string, suburb?: string, state?: string, email?: string, postalCode?: string, country?: string, mobile?: string, company?: string): Promise<void>;
2730
+ updateRecipient(firstName?: string, lastName?: string, address?: string, suburb?: string, state?: string, email?: string, postalCode?: string, country?: string, mobile?: string, company?: string, apartment?: string, customField1?: string, customField2?: string, customField3?: string, customField4?: string, customField5?: string, conversionConfigurationId?: string): Promise<void>;
2748
2731
  /**
2749
2732
  * Returns the context object used for text templating.
2750
2733
  */
2751
- getTemplatingContext(): any;
2734
+ getTemplatingContext(): Promise<{
2735
+ [key: string]: any;
2736
+ }>;
2752
2737
  }
2753
2738
 
2754
2739
  declare enum AssetType {
@@ -2917,7 +2902,6 @@ interface GlobalPropertyConfigurationAspect {
2917
2902
  entityId?: string;
2918
2903
  conditions?: GlobalPropertyConfigurationAspectCondition[];
2919
2904
  data?: GlobalPropertyConfigurationAspectData;
2920
- mandatory?: boolean;
2921
2905
  }
2922
2906
  interface GlobalPropertyConfigurationAspectData {
2923
2907
  fileUpload?: GlobalPropertyConfigurationAspectFileUploadData;
@@ -3496,7 +3480,9 @@ interface RenderingConfiguration {
3496
3480
  /**
3497
3481
  * Contents variables for templating text.
3498
3482
  */
3499
- templatingContext?: any;
3483
+ templatingContext?: {
3484
+ [key: string]: any;
3485
+ };
3500
3486
  }
3501
3487
  interface ColorProfileProps {
3502
3488
  name: string;
@@ -3780,6 +3766,13 @@ interface Recipient {
3780
3766
  country?: string;
3781
3767
  mobile?: string;
3782
3768
  company?: string;
3769
+ apartment?: string;
3770
+ customField1?: string;
3771
+ customField2?: string;
3772
+ customField3?: string;
3773
+ customField4?: string;
3774
+ customField5?: string;
3775
+ conversionConfigurationId?: string;
3783
3776
  createdAt?: string;
3784
3777
  updatedAt?: string;
3785
3778
  deletedAt?: string;
@@ -4243,7 +4236,6 @@ type GlobalPropertyStateAspect = {
4243
4236
  type?: AspectType;
4244
4237
  storage?: GlobalPropertyStateAspectStorage;
4245
4238
  channel?: number;
4246
- mandatoryFulfilled?: boolean;
4247
4239
  };
4248
4240
  type GlobalPropertyStateAspectStorage = GlobalPropertyStateFileUploadStorage | GlobalPropertyStateColorOptionStorage;
4249
4241
  type GlobalPropertyStateFileUploadStorage = {
@@ -5091,10 +5083,12 @@ declare class DigitalContentStepService implements StepService<DigitalContentSte
5091
5083
  declare const digitalContentStepService: DigitalContentStepService;
5092
5084
 
5093
5085
  declare class MockWorkflowManager implements WorkflowManager {
5094
- getTemplatingContext: () => void;
5086
+ getTemplatingContext: () => Promise<{
5087
+ [key: string]: any;
5088
+ }>;
5095
5089
  removeRecipientCallback: (callback: RecipientCallback) => void;
5096
5090
  addRecipientCallback: (callback: RecipientCallback) => void;
5097
- updateRecipient(_firstName?: string, _lastName?: string, _address?: string, _suburb?: string, _state?: string, _email?: string, _postalCode?: string, _country?: string, _mobile?: string, _company?: string): Promise<void>;
5091
+ updateRecipient(_firstName?: string, _lastName?: string, _address?: string, _suburb?: string, _state?: string, _email?: string, _postalCode?: string, _country?: string, _mobile?: string, _company?: string, _apartment?: string, _customField1?: string, _customField2?: string, _customField3?: string, _customField4?: string, _customField5?: string, _conversionConfigurationId?: string): Promise<void>;
5098
5092
  approveTransaction(_note?: string): Promise<void>;
5099
5093
  rejectTransaction(_note?: string): Promise<void>;
5100
5094
  private client;
@@ -5953,4 +5947,4 @@ declare const validateWorkflowExperienceRecipients: (workflowExperiences: Workfl
5953
5947
  */
5954
5948
  declare const getGlobalPropertyStateForBundle: (bundleId: string) => Promise<GlobalPropertyState | undefined>;
5955
5949
 
5956
- 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 };
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 };