@spiffcommerce/core 26.42.1 → 27.0.0-beta.13aa0f1e-5cb6-5e64-afe5-83b8ea2e14d3
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 +38 -10
- package/dist/index.js +168 -168
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +3110 -2971
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -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
|
+
## [27.0.0] - 15-07-2025
|
|
18
|
+
|
|
19
|
+
## Changed
|
|
20
|
+
|
|
21
|
+
- Modified the functions for logging in as a customer.
|
|
22
|
+
|
|
17
23
|
## [26.40.0] - 10-07-2025
|
|
18
24
|
|
|
19
25
|
## Added
|
package/dist/index.d.ts
CHANGED
|
@@ -617,11 +617,14 @@ interface LayoutData {
|
|
|
617
617
|
|
|
618
618
|
declare class LayoutPreviewService implements RenderableContextService {
|
|
619
619
|
private readonly layouts;
|
|
620
|
+
private workflowManager?;
|
|
620
621
|
private handleCompleteRender;
|
|
621
622
|
constructor(layouts: ILayout[]);
|
|
622
623
|
setCompleteRenderCallback(handleCompleteRender: (layouts: LayoutPreviewBridge[]) => void): void;
|
|
623
624
|
onCompleteRender(): void;
|
|
624
625
|
getAll(): ReadonlyMap<string, LayoutPreviewBridge>;
|
|
626
|
+
setWorkflowManager(workflowManager: WorkflowManager): void;
|
|
627
|
+
getWorkflowManager(): WorkflowManager | undefined;
|
|
625
628
|
}
|
|
626
629
|
/**
|
|
627
630
|
* The panel canvas class that stores both the main rendering canvas as well as rendering context
|
|
@@ -632,6 +635,7 @@ declare class LayoutPreviewBridge implements RenderableContext {
|
|
|
632
635
|
private readonly id;
|
|
633
636
|
private readonly name;
|
|
634
637
|
private readonly panelSize;
|
|
638
|
+
private readonly getWorkflowManager?;
|
|
635
639
|
private service;
|
|
636
640
|
private interactiveDirty;
|
|
637
641
|
private textureCtx?;
|
|
@@ -642,7 +646,7 @@ declare class LayoutPreviewBridge implements RenderableContext {
|
|
|
642
646
|
constructor(id: string, name: string, service: LayoutPreviewService, panelSize: {
|
|
643
647
|
width: number;
|
|
644
648
|
height: number;
|
|
645
|
-
});
|
|
649
|
+
}, getWorkflowManager?: () => WorkflowManager | undefined);
|
|
646
650
|
getID(): string;
|
|
647
651
|
getName(): string;
|
|
648
652
|
getPanelSize(): {
|
|
@@ -2283,6 +2287,9 @@ interface ClientConfiguration {
|
|
|
2283
2287
|
marketplaceThemeInstallId?: string;
|
|
2284
2288
|
marketplaceThemeInstallConfigurationId?: string;
|
|
2285
2289
|
bearerAuthenticationToken?: string;
|
|
2290
|
+
userPoolClientId?: string;
|
|
2291
|
+
userPoolRegion?: string;
|
|
2292
|
+
spiffRegion?: string;
|
|
2286
2293
|
}
|
|
2287
2294
|
/**
|
|
2288
2295
|
* The Spiff Commerce Javascript Client. Required for
|
|
@@ -2295,6 +2302,9 @@ declare class SpiffCommerceClient {
|
|
|
2295
2302
|
private activeIntegration?;
|
|
2296
2303
|
private marketplaceThemeInstallId?;
|
|
2297
2304
|
private marketplaceThemeInstallConfigurationId?;
|
|
2305
|
+
private userPoolClientId?;
|
|
2306
|
+
private userPoolRegion?;
|
|
2307
|
+
private spiffRegion?;
|
|
2298
2308
|
constructor(options: ClientOptions);
|
|
2299
2309
|
configure(configuration: ClientConfiguration): void;
|
|
2300
2310
|
/**
|
|
@@ -2341,19 +2351,26 @@ declare class SpiffCommerceClient {
|
|
|
2341
2351
|
isAuthenticated: boolean;
|
|
2342
2352
|
}>;
|
|
2343
2353
|
getCustomer(): Customer | undefined;
|
|
2344
|
-
private authenticateCustomerId;
|
|
2345
2354
|
/**
|
|
2346
|
-
*
|
|
2347
|
-
*
|
|
2355
|
+
* Check if a customer is logged in.
|
|
2356
|
+
* If they are, set the customer object.
|
|
2357
|
+
* This is how we resume sessions between loads.
|
|
2358
|
+
*/
|
|
2359
|
+
reloadLoggedInCustomer(): Promise<boolean>;
|
|
2360
|
+
/**
|
|
2361
|
+
* Generate an email code to allow logging in as a Spiff user.
|
|
2348
2362
|
*/
|
|
2349
2363
|
generateVerificationCode(emailAddress: string): Promise<void>;
|
|
2350
2364
|
/**
|
|
2351
|
-
*
|
|
2352
|
-
*
|
|
2353
|
-
|
|
2354
|
-
|
|
2365
|
+
* Verify an email code to log in as a Spiff user.
|
|
2366
|
+
* Always returns true if it doesn't throw.
|
|
2367
|
+
*/
|
|
2368
|
+
verifyCode(emailAddress: string, code: string): Promise<boolean>;
|
|
2369
|
+
/**
|
|
2370
|
+
* Log out the currently logged-in Spiff user.
|
|
2355
2371
|
*/
|
|
2356
|
-
|
|
2372
|
+
logOut(): Promise<void>;
|
|
2373
|
+
loggedInBearerToken(): Promise<string>;
|
|
2357
2374
|
getCustomerMetafields(): Promise<Metafield[]>;
|
|
2358
2375
|
/**
|
|
2359
2376
|
* @param collectionId Optional: The id of the product collection that the bundle can use.
|
|
@@ -2636,6 +2653,10 @@ interface WorkflowManager {
|
|
|
2636
2653
|
* Create or amend the recipient fo the transaction.
|
|
2637
2654
|
*/
|
|
2638
2655
|
updateRecipient(firstName?: string, lastName?: string, address?: string, suburb?: string, state?: string, email?: string, postalCode?: string, country?: string, mobile?: string, company?: string): Promise<void>;
|
|
2656
|
+
/**
|
|
2657
|
+
* Returns the context object used for text templating.
|
|
2658
|
+
*/
|
|
2659
|
+
getTemplatingContext(): any;
|
|
2639
2660
|
}
|
|
2640
2661
|
|
|
2641
2662
|
declare enum AssetType {
|
|
@@ -3375,6 +3396,10 @@ interface RenderingConfiguration {
|
|
|
3375
3396
|
* Allow for debug rendering on elements.
|
|
3376
3397
|
*/
|
|
3377
3398
|
debug?: boolean;
|
|
3399
|
+
/**
|
|
3400
|
+
* Contents variables for templating text.
|
|
3401
|
+
*/
|
|
3402
|
+
templatingContext?: any;
|
|
3378
3403
|
}
|
|
3379
3404
|
interface ColorProfileProps {
|
|
3380
3405
|
name: string;
|
|
@@ -4680,7 +4705,9 @@ declare const optionService: OptionService;
|
|
|
4680
4705
|
declare const setBearerAuthenticationToken: (token: string) => void;
|
|
4681
4706
|
declare class GraphQlManager {
|
|
4682
4707
|
private shadowGraphqlClient;
|
|
4708
|
+
private spiffClient?;
|
|
4683
4709
|
constructor();
|
|
4710
|
+
setSpiffCommerceClient(client: SpiffCommerceClient): void;
|
|
4684
4711
|
getShadowGraphqlClient(): ApolloClient<any>;
|
|
4685
4712
|
private constructShadowGraphqlClient;
|
|
4686
4713
|
}
|
|
@@ -4963,6 +4990,7 @@ declare class DigitalContentStepService implements StepService<DigitalContentSte
|
|
|
4963
4990
|
declare const digitalContentStepService: DigitalContentStepService;
|
|
4964
4991
|
|
|
4965
4992
|
declare class MockWorkflowManager implements WorkflowManager {
|
|
4993
|
+
getTemplatingContext: () => void;
|
|
4966
4994
|
removeRecipientCallback: (callback: RecipientCallback) => void;
|
|
4967
4995
|
addRecipientCallback: (callback: RecipientCallback) => void;
|
|
4968
4996
|
updateRecipient(_firstName?: string, _lastName?: string, _address?: string, _suburb?: string, _state?: string, _email?: string, _postalCode?: string, _country?: string, _mobile?: string, _company?: string): Promise<void>;
|
|
@@ -5824,4 +5852,4 @@ declare const validateWorkflowExperienceRecipients: (workflowExperiences: Workfl
|
|
|
5824
5852
|
*/
|
|
5825
5853
|
declare const getGlobalPropertyStateForBundle: (bundleId: string) => Promise<GlobalPropertyState | undefined>;
|
|
5826
5854
|
|
|
5827
|
-
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, 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, 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 };
|
|
5855
|
+
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, 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, 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 };
|