@spiffcommerce/core 26.33.0 → 26.35.0-beta.aa978625-d361-5b17-8ca8-19a0a8ab12c8
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 +6 -0
- package/dist/index.d.ts +105 -3
- package/dist/index.js +215 -144
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1066 -926
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
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
|
+
## [26.35.0] - 03-07-2025
|
|
18
|
+
|
|
19
|
+
## Added
|
|
20
|
+
|
|
21
|
+
- The `Bundle` type now has the `productsCount` property.
|
|
22
|
+
|
|
17
23
|
## [26.33.0] - 02-07-2025
|
|
18
24
|
|
|
19
25
|
## Added
|
package/dist/index.d.ts
CHANGED
|
@@ -2615,7 +2615,7 @@ interface WorkflowManager {
|
|
|
2615
2615
|
/**
|
|
2616
2616
|
* Create or amend the recipient fo the transaction.
|
|
2617
2617
|
*/
|
|
2618
|
-
updateRecipient(firstName?: string, lastName?: string, address?: string, suburb?: string, state?: string, email?: string, postalCode?: string, country?: string, mobile?: string): Promise<void>;
|
|
2618
|
+
updateRecipient(firstName?: string, lastName?: string, address?: string, suburb?: string, state?: string, email?: string, postalCode?: string, country?: string, mobile?: string, company?: string): Promise<void>;
|
|
2619
2619
|
}
|
|
2620
2620
|
|
|
2621
2621
|
declare enum AssetType {
|
|
@@ -3637,6 +3637,7 @@ interface Recipient {
|
|
|
3637
3637
|
postalCode?: string;
|
|
3638
3638
|
country?: string;
|
|
3639
3639
|
mobile?: string;
|
|
3640
|
+
company?: string;
|
|
3640
3641
|
createdAt?: string;
|
|
3641
3642
|
updatedAt?: string;
|
|
3642
3643
|
deletedAt?: string;
|
|
@@ -4046,6 +4047,7 @@ interface Bundle {
|
|
|
4046
4047
|
workflowViewerReadOnlyLink: string;
|
|
4047
4048
|
createdAt: string;
|
|
4048
4049
|
transactionsCount?: number;
|
|
4050
|
+
productsCount?: number;
|
|
4049
4051
|
orderId?: string;
|
|
4050
4052
|
quoteId?: string;
|
|
4051
4053
|
}
|
|
@@ -4938,7 +4940,7 @@ declare class DigitalContentStepService implements StepService<DigitalContentSte
|
|
|
4938
4940
|
declare const digitalContentStepService: DigitalContentStepService;
|
|
4939
4941
|
|
|
4940
4942
|
declare class MockWorkflowManager implements WorkflowManager {
|
|
4941
|
-
updateRecipient(_firstName?: string, _lastName?: string, _address?: string, _suburb?: string, _state?: string, _email?: string, _postalCode?: string, _country?: string, _mobile?: string): Promise<void>;
|
|
4943
|
+
updateRecipient(_firstName?: string, _lastName?: string, _address?: string, _suburb?: string, _state?: string, _email?: string, _postalCode?: string, _country?: string, _mobile?: string, _company?: string): Promise<void>;
|
|
4942
4944
|
approveTransaction(_note?: string): Promise<void>;
|
|
4943
4945
|
rejectTransaction(_note?: string): Promise<void>;
|
|
4944
4946
|
private client;
|
|
@@ -5691,4 +5693,104 @@ declare class MetafieldManager {
|
|
|
5691
5693
|
}
|
|
5692
5694
|
declare const metafieldManager: MetafieldManager;
|
|
5693
5695
|
|
|
5694
|
-
|
|
5696
|
+
declare enum AddressValidationResultConfirmationLevel {
|
|
5697
|
+
Confirmed = "Confirmed",
|
|
5698
|
+
Plausible = "Plausible",
|
|
5699
|
+
Unlikely = "Unlikely"
|
|
5700
|
+
}
|
|
5701
|
+
interface AddressValidationResult {
|
|
5702
|
+
/**
|
|
5703
|
+
* Whether the resulting address is considered complete.
|
|
5704
|
+
* An address is considered complete if no components were unexpected or missing.
|
|
5705
|
+
*/
|
|
5706
|
+
addressComplete?: boolean;
|
|
5707
|
+
address?: {
|
|
5708
|
+
/**
|
|
5709
|
+
* The full address, formatted in the standard format for the area.
|
|
5710
|
+
*/
|
|
5711
|
+
formattedAddress?: string;
|
|
5712
|
+
/** Country code; AU, US, UK, etc. */
|
|
5713
|
+
regionCode?: string;
|
|
5714
|
+
postalCode?: string;
|
|
5715
|
+
/** The state/province etc. */
|
|
5716
|
+
administrativeArea?: string;
|
|
5717
|
+
/** Suburb/city */
|
|
5718
|
+
locality?: string;
|
|
5719
|
+
sublocality?: string;
|
|
5720
|
+
};
|
|
5721
|
+
/** The individual components of the address, and their associated validation information. */
|
|
5722
|
+
components?: {
|
|
5723
|
+
/** The text value of the component. */
|
|
5724
|
+
name: string;
|
|
5725
|
+
/**
|
|
5726
|
+
* The type of component it is.
|
|
5727
|
+
* See https://developers.google.com/maps/documentation/places/web-service/legacy/supported_types#table2 for a list of possible types.
|
|
5728
|
+
*/
|
|
5729
|
+
type: string;
|
|
5730
|
+
/** How strongly the validator believes the result to be correct. */
|
|
5731
|
+
confirmationLevel?: AddressValidationResultConfirmationLevel;
|
|
5732
|
+
/** Whether this component was inferred by the validator, i.e. it was not present on the original input. */
|
|
5733
|
+
inferred?: boolean;
|
|
5734
|
+
/** Whether this component had spelling corrected by the validator. */
|
|
5735
|
+
spellCorrected?: boolean;
|
|
5736
|
+
/** Whether this component had its original value completely replaced by the validator. */
|
|
5737
|
+
replaced?: boolean;
|
|
5738
|
+
/** Whether the validator believes this component to be unexpected for the supplied address. */
|
|
5739
|
+
unexpected?: boolean;
|
|
5740
|
+
}[];
|
|
5741
|
+
/**
|
|
5742
|
+
* Component types that were expected to be on the address, but were not present and could not be inferred by the validator.
|
|
5743
|
+
* See https://developers.google.com/maps/documentation/places/web-service/legacy/supported_types#table2 for a list of possible types.
|
|
5744
|
+
*/
|
|
5745
|
+
missingComponentTypes: string[];
|
|
5746
|
+
}
|
|
5747
|
+
declare enum AddressValidationJobStatus {
|
|
5748
|
+
Created = "Created",
|
|
5749
|
+
Processing = "Processing",
|
|
5750
|
+
Completed = "Completed",
|
|
5751
|
+
Failed = "Failed",
|
|
5752
|
+
Cancelled = "Cancelled"
|
|
5753
|
+
}
|
|
5754
|
+
interface AddressValidationJob {
|
|
5755
|
+
id: string;
|
|
5756
|
+
/** The entity this job was created for. */
|
|
5757
|
+
entityId?: string;
|
|
5758
|
+
/** The current status of this Job. */
|
|
5759
|
+
status: AddressValidationJobStatus;
|
|
5760
|
+
/** The datetime of when this Job was created. */
|
|
5761
|
+
createdAt: string;
|
|
5762
|
+
/** The datetime of when this Job was last updated. */
|
|
5763
|
+
updatedAt: string;
|
|
5764
|
+
/** The validation result. Only present if status is `Confirmed`. */
|
|
5765
|
+
result?: AddressValidationResult;
|
|
5766
|
+
}
|
|
5767
|
+
/**
|
|
5768
|
+
* Fetches Recipients of Workflow Experiences and their associated Address Validation Jobs.
|
|
5769
|
+
* The resulting array will be in the same order as the input `ids`. If a Recipient does not have an associated Job, it will be `undefined`.
|
|
5770
|
+
* @param workflowExperiences The Workflow Experiences to fetch jobs for.
|
|
5771
|
+
* @returns The associated Address Validation Jobs for the requested Workflow Experiences.
|
|
5772
|
+
*/
|
|
5773
|
+
declare const getValidationJobsForWorkflowExperiences: (workflowExperiences: WorkflowExperience[]) => Promise<(AddressValidationJob | undefined)[] | undefined>;
|
|
5774
|
+
/**
|
|
5775
|
+
* Retrieves an up-to-date version of the requested Address Validation Jobs.
|
|
5776
|
+
* If a Job has been completed, the validation result will be present on the object.
|
|
5777
|
+
* @param ids An array of Address Validation Job id strings.
|
|
5778
|
+
* @returns An array of Address Validation Jobs.
|
|
5779
|
+
*/
|
|
5780
|
+
declare const getAddressValidationJobs: (ids: string[]) => Promise<AddressValidationJob[] | undefined>;
|
|
5781
|
+
/**
|
|
5782
|
+
* Validate a single Workflow Experience's recipient address.
|
|
5783
|
+
* @param workflowExperience The Workflow Experience to validate. If this does not have a recipient attached, the function will immediately resolve with `undefined`.
|
|
5784
|
+
* @returns The validation result.
|
|
5785
|
+
*/
|
|
5786
|
+
declare const validateWorkflowExperienceRecipient: (workflowExperience: WorkflowExperience) => Promise<AddressValidationResult | undefined>;
|
|
5787
|
+
/**
|
|
5788
|
+
* Requests to validate many Workflow Experiences' recipient addresses asynchronously.
|
|
5789
|
+
* @param workflowExperiences The Workflow Experiences to validate.
|
|
5790
|
+
* @returns An array of Address Validation Jobs. This is guaranteed to be in the same order as the input array.
|
|
5791
|
+
* If an input Workflow Experience does not have a recipient, the associated Job will be `undefined`.
|
|
5792
|
+
* The Jobs will likely be incomplete; consider polling `getAddressValidationJobs` with the ids of the Jobs you get from this function.
|
|
5793
|
+
*/
|
|
5794
|
+
declare const validateWorkflowExperienceRecipients: (workflowExperiences: WorkflowExperience[]) => Promise<(AddressValidationJob | undefined)[] | undefined>;
|
|
5795
|
+
|
|
5796
|
+
export { AddonHandle, 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, 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, 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, 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 };
|