@spiffcommerce/core 19.0.0 → 19.1.1

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/dist/index.d.ts CHANGED
@@ -595,7 +595,7 @@ interface Transaction {
595
595
  /**
596
596
  * The integration product related to this lineitem.
597
597
  */
598
- integrationProduct?: IntegrationProduct;
598
+ integrationProduct?: IntegrationProductResource;
599
599
  /**
600
600
  * Whether this transaction has previously been ordered.
601
601
  */
@@ -645,7 +645,7 @@ interface Transaction {
645
645
  * An integration product represents the connection of a product in SpiffCommerce with
646
646
  * a product on a third party platform.
647
647
  */
648
- interface IntegrationProduct {
648
+ interface IntegrationProductResource {
649
649
  /**
650
650
  * The ID of the IntegrationProduct entity. Used internally by SpiffCommerce.
651
651
  */
@@ -670,7 +670,7 @@ interface IntegrationProduct {
670
670
  * When the additionalExternalProductId is set, this is the IntegrationProduct that is associated with it.
671
671
  * If no Spiff product has been associated with the additionalExternalProductId, this will be null.
672
672
  */
673
- additionalIntegrationProduct?: IntegrationProduct;
673
+ additionalIntegrationProduct?: IntegrationProductResource;
674
674
  /**
675
675
  * The product that this integration product is associated with.
676
676
  */
@@ -810,7 +810,7 @@ interface Product {
810
810
  * Configuration for conversion. Optional.
811
811
  */
812
812
  conversionConfiguration?: ConversionConfiguration;
813
- integrationProducts?: IntegrationProduct[];
813
+ integrationProducts?: IntegrationProductResource[];
814
814
  productTags?: ProductTag[];
815
815
  /**
816
816
  * The SKU of the product in the merchant's store.
@@ -1667,7 +1667,7 @@ declare class CollectionProduct {
1667
1667
  * @param externalId An external integration ID to further filter by. Otherwise we return the first encountered.
1668
1668
  * @returns The integration if found. Throws an error if not found as this data is typically a neccesity.
1669
1669
  */
1670
- getIntegrationByType(type: IntegrationType, externalId?: string): IntegrationProduct;
1670
+ getIntegrationByType(type: IntegrationType, externalId?: string): IntegrationProductResource;
1671
1671
  /**
1672
1672
  * A helper function for pulling the default workflow.
1673
1673
  */
@@ -1675,7 +1675,7 @@ declare class CollectionProduct {
1675
1675
  /**
1676
1676
  * A list of all integrations this product is connected to.
1677
1677
  */
1678
- getIntegrations(): IntegrationProduct[];
1678
+ getIntegrations(): IntegrationProductResource[];
1679
1679
  /**
1680
1680
  * The raw product resource. This is generally not needed and should be avoided.
1681
1681
  */
@@ -2125,6 +2125,15 @@ declare class ObjectInput extends FlowExecutionInput {
2125
2125
  static validUUID(uuid: string): RegExpMatchArray | null;
2126
2126
  }
2127
2127
 
2128
+ declare class IntegrationProduct {
2129
+ private readonly integrationProduct;
2130
+ constructor(product: IntegrationProductResource);
2131
+ getId(): string;
2132
+ getResource(): IntegrationProductResource;
2133
+ getBasePrice(): number;
2134
+ getDefaultWorkflow(): ProductWorkflow;
2135
+ }
2136
+
2128
2137
  declare const getWorkflows: (ids: string[], options?: GetWorkflowGraphqlOptions) => Promise<Workflow[]>;
2129
2138
  declare const getWorkflow: (id: string, options?: GetWorkflowGraphqlOptions) => Promise<Workflow>;
2130
2139
  /**
@@ -2340,6 +2349,8 @@ declare class SpiffCommerceClient {
2340
2349
  */
2341
2350
  private updateTransactionState;
2342
2351
  storeCustomer(customer: Customer): void;
2352
+ getIntegrationProductById(integrationProductId: string): Promise<IntegrationProduct>;
2353
+ getIntegrationProductFromExternalIds(externalIntegrationId: string, externalProductId: string): Promise<IntegrationProduct>;
2343
2354
  }
2344
2355
 
2345
2356
  declare class Configuration {
@@ -2914,4 +2925,4 @@ declare class PromiseCache {
2914
2925
  }
2915
2926
  declare const promiseCache: PromiseCache;
2916
2927
 
2917
- export { AssetNotFoundError, Bundle, CollectionProduct, ColorOption, ConversionConfiguration, ConversionData, ConversionDataType, ConversionLocation, Customer, CustomerDetailsInput, DesignCreationMessage, DesignCreationProgressUpdate, DesignInputStep, EditedSteps, FlowExecutionNodeResult, FlowExecutionResult, FlowService, FrameService, FrameStep, FrameStepHandle, FrameThresholdSettings, GetWorkflowOptions, GlobalPropertyHandle, IllustrationStepHandle, InformationMessageType, InformationResult, InformationStepHandle, IntegrationType, LayoutNotFoundError, MandatorySteps, MaterialStepHandle, MisconfigurationError, MockWorkflowManager, ModelStepHandle, NodeType, ObjectInput, ObjectInputType, OptionNotFoundError, ParseError, PictureStepHandle, Product, ProductCameraRig, ProductCollection, ProductWorkflow, promiseCache as PromiseCache, PromiseQueue, QuestionStepHandle, QueueablePromise, RegionElement, RenderableScene, ResourceNotFoundError, SavedDesign, SelectionStorage, ShapeStepHandle, SilentIllustrationStepData, SpiffCommerceClient, Stakeholder, StakeholderType, StateMutationFunc, StepElements, StepHandle, TextStepHandle, TextStepStorage, Transaction, Transform, TransformCollection, UnhandledBehaviorError, Variant, Vector3, WorkflowExperience, WorkflowExperienceImpl, WorkflowManager, WorkflowMetadata, WorkflowScene, WorkflowSelections, WorkflowStorage, assetService, createDesign, designService, digitalContentStepService, frameStepService, generateCommands, generateStateFromDesignInputSteps, getBoundedOffsets, getWorkflow, getWorkflows, graphQlManager, illustrationStepService, materialStepService, modelStepService, moduleStepService, optionService, persistenceService, pictureStepService, questionStepService, shapeStepService, shortenUrl, spiffCoreConfiguration, stepAspectValuesToDesignInputSteps, textStepService, toast };
2928
+ export { AssetNotFoundError, Bundle, CollectionProduct, ColorOption, ConversionConfiguration, ConversionData, ConversionDataType, ConversionLocation, Customer, CustomerDetailsInput, DesignCreationMessage, DesignCreationProgressUpdate, DesignInputStep, EditedSteps, FlowExecutionNodeResult, FlowExecutionResult, FlowService, FrameService, FrameStep, FrameStepHandle, FrameThresholdSettings, GetWorkflowOptions, GlobalPropertyHandle, IllustrationStepHandle, InformationMessageType, InformationResult, InformationStepHandle, IntegrationProduct, IntegrationType, LayoutNotFoundError, MandatorySteps, MaterialStepHandle, MisconfigurationError, MockWorkflowManager, ModelStepHandle, NodeType, ObjectInput, ObjectInputType, OptionNotFoundError, ParseError, PictureStepHandle, Product, ProductCameraRig, ProductCollection, ProductWorkflow, promiseCache as PromiseCache, PromiseQueue, QuestionStepHandle, QueueablePromise, RegionElement, RenderableScene, ResourceNotFoundError, SavedDesign, SelectionStorage, ShapeStepHandle, SilentIllustrationStepData, SpiffCommerceClient, Stakeholder, StakeholderType, StateMutationFunc, StepElements, StepHandle, TextStepHandle, TextStepStorage, Transaction, Transform, TransformCollection, UnhandledBehaviorError, Variant, Vector3, WorkflowExperience, WorkflowExperienceImpl, WorkflowManager, WorkflowMetadata, WorkflowScene, WorkflowSelections, WorkflowStorage, assetService, createDesign, designService, digitalContentStepService, frameStepService, generateCommands, generateStateFromDesignInputSteps, getBoundedOffsets, getWorkflow, getWorkflows, graphQlManager, illustrationStepService, materialStepService, modelStepService, moduleStepService, optionService, persistenceService, pictureStepService, questionStepService, shapeStepService, shortenUrl, spiffCoreConfiguration, stepAspectValuesToDesignInputSteps, textStepService, toast };