@spiffcommerce/core 39.2.4 → 40.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/CHANGELOG.md +6 -0
- package/dist/index.cjs +208 -214
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +19 -3
- package/dist/index.mjs +478 -465
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -3
package/dist/index.d.ts
CHANGED
|
@@ -797,7 +797,7 @@ declare class Variant {
|
|
|
797
797
|
/**
|
|
798
798
|
* @returns The URL for a thumbnail resource configured on this variant.
|
|
799
799
|
*/
|
|
800
|
-
getThumbnail(): string | undefined;
|
|
800
|
+
getThumbnail(resolution?: number, quality?: number): string | undefined;
|
|
801
801
|
/**
|
|
802
802
|
* @returns When this variant is configured to have a color, this will return the hex value for that color.
|
|
803
803
|
*/
|
|
@@ -1805,7 +1805,7 @@ declare class ProductWorkflow$1 {
|
|
|
1805
1805
|
* An image to be used to display this workflow in a UI to the customer.
|
|
1806
1806
|
* @returns A resource URL.
|
|
1807
1807
|
*/
|
|
1808
|
-
getThumbnail(): string;
|
|
1808
|
+
getThumbnail(resolution?: number, quality?: number): string | undefined;
|
|
1809
1809
|
}
|
|
1810
1810
|
declare const getProductCollections: (ids: string[]) => Promise<ProductCollection[] | undefined>;
|
|
1811
1811
|
|
|
@@ -2859,6 +2859,10 @@ interface Asset {
|
|
|
2859
2859
|
fileLink?: string;
|
|
2860
2860
|
newVersionLink?: string;
|
|
2861
2861
|
invalidateLink?: string;
|
|
2862
|
+
/**
|
|
2863
|
+
* @deprecated Use getTransformedAssetURL instead for getting URLs for specific use cases such as thumbnails and previews.
|
|
2864
|
+
* NOTE: Currently svgs from PDF files & video transcoding still require this field.
|
|
2865
|
+
*/
|
|
2862
2866
|
versions?: AssetVersion[];
|
|
2863
2867
|
metadata?: AssetMetadata[];
|
|
2864
2868
|
assetConfiguration?: AssetConfiguration;
|
|
@@ -6146,4 +6150,16 @@ declare const getGlobalPropertyStateForBundle: (bundleId: string) => Promise<Glo
|
|
|
6146
6150
|
|
|
6147
6151
|
declare const getIntegrationProducts: (ids: string[]) => Promise<IntegrationProductResource[]>;
|
|
6148
6152
|
|
|
6149
|
-
|
|
6153
|
+
/**
|
|
6154
|
+
* Utility function to generate a transformed URL for an asset.
|
|
6155
|
+
* This is used to generate URLs for thumbnails and other transformed versions of an asset.
|
|
6156
|
+
* The transformation is done by the asset service and the parameters are passed as query parameters in the URL. The exact transformations
|
|
6157
|
+
* that are applied depend on the asset type and the transformations that are configured for it.
|
|
6158
|
+
* @param asset The asset for which a transformed URL is desired.
|
|
6159
|
+
* @param resolution The desired resolution for the asset. This is a hint that may or may not be respected depending on the asset type and the transformations that are configured for it.
|
|
6160
|
+
* @param quality The desired quality for the asset. This is a hint that may or may not be respected depending on the asset type and the transformations that are configured for it.
|
|
6161
|
+
* @returns The transformed URL for the asset or undefined if the asset does not have a file link.
|
|
6162
|
+
*/
|
|
6163
|
+
declare const getTransformedAssetURL: (asset: Asset | string, resolution?: number, format?: "jpg" | "png" | "webp", quality?: number) => string | undefined;
|
|
6164
|
+
|
|
6165
|
+
export { AddonHandle, type AddressComponent, type AddressValidationJob, AddressValidationJobStatus, type AddressValidationResult, AddressValidationResultConfirmationLevel, AddressValidationStatus, type Animatable, type AnyStepData, ArrayInput, AspectType, type Asset, type AssetConfiguration, AssetNotFoundError, type AssetObjectVersion, AssetType, BringForwardCommand, BringToBackCommand, BringToFrontCommand, type Bundle$1 as Bundle, BundleDesignCreationCartAddMode, type BundleDesignCreationMessage, type BundleEvent, type BundleEventData, type BundleEventType, type BundleProductsAddedEventData, type BundleProductsRemovedEventData, type Bundle as BundleRaw, type BundleStakeholder, CanvasCommand, CollectionProduct, type ColorDefinition, type ColorOption, ColorOptionGlobalPropertyHandle, type ColorProfileProps, CommandContext, type CommandState, type Condition, type ConditionalGlobalPropertiesChangedEventData, CreateElementCommand, CreateLayoutCommand, CurrencyContext, CurrencyService, type Customer, type CustomerDetailsInput, DeleteElementCommand, type DesignCreationMessage, type DesignCreationProgressUpdate, type DesignInputStep, type DigitalContentStepData, DigitalContentStepHandle, type EditedSteps, type ExportedStepData, type ExportedStepDataProperty, type ExportedStepDataPropertyType, FileUploadGlobalPropertyHandle, FlowExecutionNodeResult, FlowExecutionResult, FlowService, FontAlignmentCommand, FontColorCommand, FontSizeCommand, FontSourceCommand, type FrameElement, FrameService, FrameStep, type FrameStepData, FrameStepHandle, type FrameThresholdSettings, type GetNewWorkflowExperienceOptions as GetNewWorkflowOptions, type GetWorkflowOptions, type GlobalPropertiesMandatoryChangedEventData, type GlobalPropertyConfiguration, GlobalPropertyHandle, GroupCommand, type ILayout, type IllustrationElement, type IllustrationStepData, IllustrationStepHandle, type ImageElement, InformationMessageType, type InformationResult, type InformationStepData, InformationStepHandle, type Integration, type IntegrationOptionResource, IntegrationProduct, IntegrationType, type LayoutComponentConfiguration, type LayoutData, type LayoutElement, LayoutElementFactory, LayoutElementType, LayoutNotFoundError, LayoutRenderingPurpose, type LayoutState, type LayoutsState, type MandatorySteps, MaterialEffectMode, type MaterialStepData, MaterialStepHandle, MisconfigurationError, MockWorkflowManager, type ModelStepData, ModelStepHandle, type ModuleStepData, ModuleStepHandle, MoveCommand, NodeType, ObjectInput, ObjectInputType, OptionGlobalPropertyHandle, OptionNotFoundError, type OptionResource, type Order, type OrderItem, type PapyrusComponent, ParseError, type PictureStepData, PictureStepHandle, type Placeable, type PmsSearchResult, type Point, type Product, ProductCameraRig, ProductCollection, ProductCollectionProductSortKey, ProductWorkflow$1 as ProductWorkflow, promiseCache as PromiseCache, PromiseQueue, type QuestionStepData, QuestionStepHandle, QueueablePromise, type Recipient, type Region, type RegionElement, type RenderableScene, ResizeCommand, ResourceNotFoundError, RotateCommand, type SavedDesign, ScaleAxis, type SelectionStorage, SendBackwardsCommand, type ShapeStepData, ShapeStepHandle, type ShareAction, ShareActionType, type SilentIllustrationStepData, SpiffCommerceClient, type Stakeholder, StakeholderType, type StateMutationFunc, type Step, type StepAspect, StepAspectType, type StepElements, type StepGroup, StepHandle, type StepStorage, StepType, TextAlgorithm, TextChangeCommand, type TextChangeResult, TextGlobalPropertyHandle, TextInput, type TextStepData, TextStepHandle, type TextStepStorage, type TextboxElement, type Theme, type ToastCallback, type Transaction, UnhandledBehaviorError, UnitOfMeasurement, UpdateImageSourceCommand, Variant, type VariantResource, type Workflow, type WorkflowExperience, type WorkflowExperienceAddedEventData, WorkflowExperienceEventType, type WorkflowExperienceHoverEventData, WorkflowExperienceImpl, type WorkflowExperienceRemovedEventData, type WorkflowManager, type WorkflowMetadata, type WorkflowPanel, type WorkflowScene, type WorkflowSelections, type WorkflowStorage, amtChannelsForAspect, assetService, browserColorToHex, cmPerPixel, currentDirection, dataUrlFromExternalUrl, deleteBundle, designService, determineCorrectFontSizeAndLines, digitalContentStepService, domParser, duplicateBundle, duplicateTransaction, fetchAsString, findAngle, findElement, findPmsColors, frameDataCache, frameStepService, generate, generateCommands, generateSVGWithUnknownColors, generateStateFromDesignInputSteps, getAddressValidationJobs, getAttributesFromArrayBuffer, getAxisAlignedBoundingBox, getBoundedOffsets, getBundleIdForTransaction, getBundleThemeConfiguration, getCustomer, getCustomerBundles, getElementVertices, getFrameData, getGlobalPropertyStateForBundle, getIntegration, getIntegrationProducts, getNEPoint, getNWPoint, getOrderedTransactions, getOverrideThemeConfiguration, getPointOfRotation, getProductCollections, getSEPoint, getSvgElement, getTemplateBundles, getTemplateTransactions, getTransaction, getTransactionThemeConfiguration, getTransactionsForBundle, getTransformedAssetURL, getTrueCoordinates, getUnorderedTransactions, getValidationJobsForWorkflowExperiences, getWorkflow, getWorkflows, graphQlManager, illustrationStepService, isCloseToValue, loadFont, matchHexToPms, materialStepService, metafieldManager, mmPerPixel, modelStepService, modifySVGColors, moduleStepService, nameBundle, nameTransaction, optionService, outlineFontsInSvg, overrideWorkflowExperienceRecipientAddress, 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 };
|