@spiffcommerce/core 26.27.1 → 26.29.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/CHANGELOG.md +12 -0
- package/dist/index.d.ts +28 -3
- package/dist/index.js +179 -134
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +650 -550
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -14,6 +14,18 @@ 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
|
+
## [26.29.0] - 18-06-2025
|
|
18
|
+
|
|
19
|
+
### Added
|
|
20
|
+
|
|
21
|
+
- The method `updateRecipient` on `WorkflowManager`.
|
|
22
|
+
|
|
23
|
+
## [26.28.0] - 18-06-2025
|
|
24
|
+
|
|
25
|
+
### Added
|
|
26
|
+
|
|
27
|
+
- The methods `filterProducts` and `fetchProductsFeed` on `ProductCollection` now accept the optional parameters `sortKey` and `sortDescending`. Sort key can be one of: Default, Name, Price.
|
|
28
|
+
|
|
17
29
|
## [26.27.0] - 11-06-2025
|
|
18
30
|
|
|
19
31
|
### Added
|
package/dist/index.d.ts
CHANGED
|
@@ -1543,6 +1543,11 @@ interface ProductTagFilter {
|
|
|
1543
1543
|
/** Only products that have no tags matching any entry in this array will be included. */
|
|
1544
1544
|
exclude: string[];
|
|
1545
1545
|
}
|
|
1546
|
+
declare enum ProductCollectionProductSortKey {
|
|
1547
|
+
Default = "Default",
|
|
1548
|
+
Name = "Name",
|
|
1549
|
+
Price = "Price"
|
|
1550
|
+
}
|
|
1546
1551
|
/**
|
|
1547
1552
|
* A collection of products that can be used to form a bundle.
|
|
1548
1553
|
*/
|
|
@@ -1579,7 +1584,7 @@ declare class ProductCollection {
|
|
|
1579
1584
|
* @param filters A list of metafield filters to apply.
|
|
1580
1585
|
* @param tags An object of tag filters to apply.
|
|
1581
1586
|
*/
|
|
1582
|
-
filterProducts(filters?: ProductMetafieldFilter[], tags?: ProductTagFilter): Promise<CollectionProduct[]>;
|
|
1587
|
+
filterProducts(filters?: ProductMetafieldFilter[], tags?: ProductTagFilter, sortKey?: ProductCollectionProductSortKey, sortDescending?: boolean): Promise<CollectionProduct[]>;
|
|
1583
1588
|
/**
|
|
1584
1589
|
* Fetches a paginated feed of products.
|
|
1585
1590
|
* @param offset The zero-based start index.
|
|
@@ -1588,7 +1593,7 @@ declare class ProductCollection {
|
|
|
1588
1593
|
* @param tags Optional object of tag filters to apply.
|
|
1589
1594
|
* @returns
|
|
1590
1595
|
*/
|
|
1591
|
-
fetchProductsFeed(offset: number, limit: number, filters?: ProductMetafieldFilter[], tags?: ProductTagFilter): Promise<{
|
|
1596
|
+
fetchProductsFeed(offset: number, limit: number, filters?: ProductMetafieldFilter[], tags?: ProductTagFilter, sortKey?: ProductCollectionProductSortKey, sortDescending?: boolean): Promise<{
|
|
1592
1597
|
items: CollectionProduct[];
|
|
1593
1598
|
total: number;
|
|
1594
1599
|
}>;
|
|
@@ -2593,6 +2598,10 @@ interface WorkflowManager {
|
|
|
2593
2598
|
getStepTags(stepId: string): string[];
|
|
2594
2599
|
approveTransaction(note?: string): Promise<void>;
|
|
2595
2600
|
rejectTransaction(note?: string): Promise<void>;
|
|
2601
|
+
/**
|
|
2602
|
+
* Create or amend the recipient fo the transaction.
|
|
2603
|
+
*/
|
|
2604
|
+
updateRecipient(firstName?: string, lastName?: string, address?: string, suburb?: string, state?: string, email?: string, postalCode?: string, country?: string): Promise<void>;
|
|
2596
2605
|
}
|
|
2597
2606
|
|
|
2598
2607
|
declare enum AssetType {
|
|
@@ -3573,6 +3582,7 @@ interface Transaction {
|
|
|
3573
3582
|
stakeholders?: Stakeholder[];
|
|
3574
3583
|
/** The stakeholder of the currently logged in user, if applicable. */
|
|
3575
3584
|
currentStakeholder?: Stakeholder;
|
|
3585
|
+
recipient?: Recipient;
|
|
3576
3586
|
/**
|
|
3577
3587
|
* The amount of this transaction that was, or will be, ordered
|
|
3578
3588
|
*/
|
|
@@ -3602,6 +3612,20 @@ interface Transaction {
|
|
|
3602
3612
|
marketplaceThemeInstallConfiguration?: ThemeInstallConfigurationGraphQl;
|
|
3603
3613
|
completed?: boolean;
|
|
3604
3614
|
}
|
|
3615
|
+
interface Recipient {
|
|
3616
|
+
id?: string;
|
|
3617
|
+
firstName?: string;
|
|
3618
|
+
lastName?: string;
|
|
3619
|
+
address?: string;
|
|
3620
|
+
suburb?: string;
|
|
3621
|
+
state?: string;
|
|
3622
|
+
email?: string;
|
|
3623
|
+
postalCode?: string;
|
|
3624
|
+
country?: string;
|
|
3625
|
+
createdAt?: string;
|
|
3626
|
+
updatedAt?: string;
|
|
3627
|
+
deletedAt?: string;
|
|
3628
|
+
}
|
|
3605
3629
|
interface ShareAction {
|
|
3606
3630
|
id: string;
|
|
3607
3631
|
type: ShareActionType;
|
|
@@ -4895,6 +4919,7 @@ declare class DigitalContentStepService implements StepService<DigitalContentSte
|
|
|
4895
4919
|
declare const digitalContentStepService: DigitalContentStepService;
|
|
4896
4920
|
|
|
4897
4921
|
declare class MockWorkflowManager implements WorkflowManager {
|
|
4922
|
+
updateRecipient(_firstName?: string, _lastName?: string, _address?: string, _suburb?: string, _state?: string, _email?: string, _postalCode?: string, _country?: string): Promise<void>;
|
|
4898
4923
|
approveTransaction(_note?: string): Promise<void>;
|
|
4899
4924
|
rejectTransaction(_note?: string): Promise<void>;
|
|
4900
4925
|
private client;
|
|
@@ -5647,4 +5672,4 @@ declare class MetafieldManager {
|
|
|
5647
5672
|
}
|
|
5648
5673
|
declare const metafieldManager: MetafieldManager;
|
|
5649
5674
|
|
|
5650
|
-
export { AddonHandle, Animatable, AnyStepData, ArrayInput, AspectType, Asset, AssetConfiguration, AssetNotFoundError, AssetObjectVersion, AssetType, BringForwardCommand, BringToBackCommand, BringToFrontCommand, Bundle$1 as Bundle, BundleDesignCreationCartAddMode, BundleDesignCreationMessage, BundleEvent, BundleEventData, BundleEventType, BundleStakeholder, CanvasCommand, CollectionProduct, ColorDefinition, ColorOption, ColorOptionGlobalPropertyHandle, ColorProfileProps, CommandContext, CommandState, Condition, ConditionalGlobalPropertiesChangedEventData, CreateElementCommand, CreateLayoutCommand, Customer, CustomerDetailsInput, DeleteElementCommand, DesignCreationMessage, DesignCreationProgressUpdate, DesignInputStep, DigitalContentStepData, DigitalContentStepHandle, EditedSteps, 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, 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, ProductWorkflow$1 as ProductWorkflow, promiseCache as PromiseCache, PromiseQueue, QuestionStepData, QuestionStepHandle, QueueablePromise, 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, getAttributesFromArrayBuffer, getAxisAlignedBoundingBox, getBoundedOffsets, getBundleThemeConfiguration, getCustomer, getCustomerBundles, getElementVertices, getFrameData, getIntegration, getNEPoint, getNWPoint, getOrderedTransactions, getOverrideThemeConfiguration, getPointOfRotation, getSEPoint, getSvgElement, getTemplateBundles, getTemplateTransactions, getTransaction, getTransactionThemeConfiguration, getTransactionsForBundle, getTrueCoordinates, getUnorderedTransactions, 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, xmlSerializer };
|
|
5675
|
+
export { AddonHandle, Animatable, AnyStepData, ArrayInput, AspectType, Asset, AssetConfiguration, AssetNotFoundError, AssetObjectVersion, AssetType, BringForwardCommand, BringToBackCommand, BringToFrontCommand, Bundle$1 as Bundle, BundleDesignCreationCartAddMode, BundleDesignCreationMessage, BundleEvent, BundleEventData, BundleEventType, BundleStakeholder, CanvasCommand, CollectionProduct, ColorDefinition, ColorOption, ColorOptionGlobalPropertyHandle, ColorProfileProps, CommandContext, CommandState, Condition, ConditionalGlobalPropertiesChangedEventData, CreateElementCommand, CreateLayoutCommand, Customer, CustomerDetailsInput, DeleteElementCommand, DesignCreationMessage, DesignCreationProgressUpdate, DesignInputStep, DigitalContentStepData, DigitalContentStepHandle, EditedSteps, 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, 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, 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, getAttributesFromArrayBuffer, getAxisAlignedBoundingBox, getBoundedOffsets, getBundleThemeConfiguration, getCustomer, getCustomerBundles, getElementVertices, getFrameData, getIntegration, getNEPoint, getNWPoint, getOrderedTransactions, getOverrideThemeConfiguration, getPointOfRotation, getSEPoint, getSvgElement, getTemplateBundles, getTemplateTransactions, getTransaction, getTransactionThemeConfiguration, getTransactionsForBundle, getTrueCoordinates, getUnorderedTransactions, 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, xmlSerializer };
|