@spiffcommerce/core 26.13.0 → 26.14.0-beta.7abb9829-776e-5d84-bc2f-e55656d13b71

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
+ ## [26.15.0] - 03-03-2025
18
+
19
+ ### Added
20
+
21
+ - Methods on experiences and bundles to attach adresses and organizations.
22
+
17
23
  ## [26.13.0] - 27-02-2025
18
24
 
19
25
  ### Changed
package/dist/index.d.ts CHANGED
@@ -3,7 +3,8 @@ import * as _apollo_client_core from '@apollo/client/core';
3
3
  import { MutationOptions, FetchResult, ApolloClient } from '@apollo/client/core';
4
4
  import { RenderableContextService, RenderableContext, ThreeDPreviewService, ModelContainer } from '@spiffcommerce/preview';
5
5
  import * as lodash from 'lodash';
6
- import { ThemeInstallConfigurationGraphQl } from '@spiffcommerce/theme-bridge';
6
+ import { ThemeInstallConfigurationGraphQl, ConversionConfiguration } from '@spiffcommerce/theme-bridge';
7
+ export { ConversionConfiguration, ConversionData, ConversionDataType, ConversionLocation } from '@spiffcommerce/theme-bridge';
7
8
  import { FuseResult } from 'fuse.js';
8
9
  import { Font } from 'opentype.js';
9
10
 
@@ -1253,6 +1254,8 @@ interface WorkflowExperience {
1253
1254
  * @param callback The function to remove.
1254
1255
  */
1255
1256
  removeEventListener(type: WorkflowExperienceEventType, callback: (workflowExperience: WorkflowExperience) => void): void;
1257
+ attachAddress(streetAddress?: string, apartment?: string, city?: string, country?: string, state?: string, postCode?: string): Promise<void>;
1258
+ attachOrganization(name: string): Promise<void>;
1256
1259
  }
1257
1260
  declare enum WorkflowExperienceEventType {
1258
1261
  QuantityChanged = "QuantityChanged",
@@ -1273,6 +1276,8 @@ declare class WorkflowExperienceImpl implements WorkflowExperience {
1273
1276
  private renderableSceneCallbacks;
1274
1277
  private eventCallbacks;
1275
1278
  constructor(client: SpiffCommerceClient, experienceOptions: ExperienceOptions);
1279
+ attachAddress(streetAddress?: string, apartment?: string, city?: string, country?: string, state?: string, postCode?: string): Promise<void>;
1280
+ attachOrganization(name: string): Promise<void>;
1276
1281
  getBundle(): Bundle$1 | undefined;
1277
1282
  setBundle(bundle: Bundle$1): void;
1278
1283
  getClient(): SpiffCommerceClient;
@@ -1506,6 +1511,7 @@ interface BundleOptions {
1506
1511
  * When reloading a bundle we may have an existing state to pull with it.
1507
1512
  */
1508
1513
  existingGlobalPropertyState?: GlobalPropertyState;
1514
+ readonly?: boolean;
1509
1515
  }
1510
1516
 
1511
1517
  interface ProductMetafieldFilter {
@@ -1904,6 +1910,8 @@ interface Bundle$1 {
1904
1910
  getWorkflowViewerAmendLink(): string;
1905
1911
  approve(note?: string): Promise<void>;
1906
1912
  reject(note?: string): Promise<void>;
1913
+ attachAddress(streetAddress?: string, apartment?: string, city?: string, country?: string, state?: string, postCode?: string): Promise<void>;
1914
+ attachOrganization(name: string): Promise<void>;
1907
1915
  }
1908
1916
  type BundleEventType = "conditional-global-properties-changed" | "workflow-experience-hover-enter" | "workflow-experience-hover-exit";
1909
1917
  type BundleEventData = ConditionalGlobalPropertiesChangedEventData | WorkflowExperienceHoverEventData;
@@ -2129,6 +2137,7 @@ interface GetBundleOptions {
2129
2137
  * of additional data.
2130
2138
  */
2131
2139
  graphql?: GetBundleGraphqlOptions;
2140
+ readonly?: boolean;
2132
2141
  }
2133
2142
  interface GetWorkflowGraphqlAssetsOptions {
2134
2143
  metadata?: boolean;
@@ -2280,7 +2289,8 @@ declare class SpiffCommerceClient {
2280
2289
  * Retrieves an existing bundle from the API, by id.
2281
2290
  * @param bundleId The id of the bundle to retrieve.
2282
2291
  * @param previewService Optional: A reference to an existing preview service to use. This can be assigned manually later.
2283
- * @param graphqlOptions Optional: Options to configure loading the workflow.
2292
+ * @param graphqlOptions Optional: Options to configure loading the bundle.
2293
+ * @param options Optional: Options to configure loading the bundle.
2284
2294
  * @returns A bundle to be used for grouping and operating on large amounts of workflow experiences.
2285
2295
  */
2286
2296
  getExistingBundle(bundleId: string, previewService?: ThreeDPreviewService,
@@ -3859,51 +3869,6 @@ declare enum ProductCameraRig {
3859
3869
  Orbit = 0,
3860
3870
  Pan = 1
3861
3871
  }
3862
- /**
3863
- * Defines the locations at which a conversion attempt can take place.
3864
- */
3865
- declare enum ConversionLocation {
3866
- /**
3867
- * The client should expose a flow for allowing the user to optionally input details at any point.
3868
- */
3869
- Manual = "Manual",
3870
- /**
3871
- * The client should show the conversion flow at the beginning of a workflow.
3872
- */
3873
- OnStart = "OnStart",
3874
- /**
3875
- * The client should allow the user to input details just before quitting the experience.
3876
- */
3877
- OnQuit = "OnQuit",
3878
- /**
3879
- * The client should ask the user for details prior to adding to cart.
3880
- */
3881
- OnEnd = "OnEnd"
3882
- }
3883
- /**
3884
- * The data configured to be requested.
3885
- */
3886
- declare enum ConversionDataType {
3887
- Email = "Email",
3888
- FirstName = "FirstName",
3889
- LastName = "LastName",
3890
- Phone = "Phone"
3891
- }
3892
- interface ConversionData {
3893
- type: ConversionDataType;
3894
- mandatory: boolean;
3895
- }
3896
- /**
3897
- * The configuration for conversion, exposed on products currently.
3898
- */
3899
- interface ConversionConfiguration {
3900
- id: string;
3901
- name?: string;
3902
- locations: ConversionLocation[];
3903
- requestedData: ConversionDataType[];
3904
- requestedDataItems: ConversionData[];
3905
- mandatory?: boolean;
3906
- }
3907
3872
  /**
3908
3873
  * Someone who has used a workflow experience and entered their contact details.
3909
3874
  */
@@ -5578,4 +5543,4 @@ declare const getOrderedTransactions: (customerId: string, limit: number, offset
5578
5543
  declare const getTemplateTransactions: (customerId: string, limit: number, offset: number) => Promise<Transaction[]>;
5579
5544
  declare const getTemplateBundles: (customerId: string, limit: number, offset: number) => Promise<Bundle[]>;
5580
5545
 
5581
- export { AddonHandle, Animatable, AnyStepData, ArrayInput, AspectType, Asset, AssetConfiguration, AssetNotFoundError, AssetObjectVersion, AssetType, BringForwardCommand, BringToBackCommand, BringToFrontCommand, Bundle$1 as Bundle, BundleDesignCreationMessage, BundleEvent, BundleEventData, BundleEventType, BundleStakeholder, CanvasCommand, CollectionProduct, ColorDefinition, ColorOption, ColorOptionGlobalPropertyHandle, ColorProfileProps, CommandContext, CommandState, Condition, ConditionalGlobalPropertiesChangedEventData, ConversionConfiguration, ConversionData, ConversionDataType, ConversionLocation, 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, 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 };
5546
+ export { AddonHandle, Animatable, AnyStepData, ArrayInput, AspectType, Asset, AssetConfiguration, AssetNotFoundError, AssetObjectVersion, AssetType, BringForwardCommand, BringToBackCommand, BringToFrontCommand, Bundle$1 as Bundle, 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, 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 };