@spiffcommerce/core 26.1.0 → 26.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/CHANGELOG.md +6 -0
- package/dist/index.d.ts +41 -2
- package/dist/index.js +520 -229
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +4816 -4282
- 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.1.1] - 30-10-2024
|
|
18
|
+
|
|
19
|
+
### Changed
|
|
20
|
+
|
|
21
|
+
- Merged some GraphQL calls to reduce the number of requests made when loading a bundle.
|
|
22
|
+
|
|
17
23
|
## [26.1.0] - 30-10-2024
|
|
18
24
|
|
|
19
25
|
### Changed
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { FunctionComponent, ReactNode } from 'preact/compat';
|
|
2
|
+
import * as _apollo_client_core from '@apollo/client/core';
|
|
2
3
|
import { MutationOptions, FetchResult, ApolloClient } from '@apollo/client/core';
|
|
3
4
|
import { RenderableContextService, RenderableContext, ThreeDPreviewService, ModelContainer } from '@spiffcommerce/preview';
|
|
4
5
|
import * as lodash from 'lodash';
|
|
@@ -1880,6 +1881,8 @@ interface Bundle$1 {
|
|
|
1880
1881
|
getShareActions(): undefined | ShareAction[];
|
|
1881
1882
|
getWorkflowViewerLink(): string;
|
|
1882
1883
|
getWorkflowViewerAmendLink(): string;
|
|
1884
|
+
approve(note?: string): Promise<void>;
|
|
1885
|
+
reject(note?: string): Promise<void>;
|
|
1883
1886
|
}
|
|
1884
1887
|
type BundleEventType = "conditional-global-properties-changed" | "workflow-experience-hover-enter" | "workflow-experience-hover-exit";
|
|
1885
1888
|
type BundleEventData = ConditionalGlobalPropertiesChangedEventData | WorkflowExperienceHoverEventData;
|
|
@@ -2084,7 +2087,7 @@ interface ClientOptions {
|
|
|
2084
2087
|
* The client will use the provided application key to
|
|
2085
2088
|
* authenticate with the SpiffCommerce API. This key can be generated and replaced in Spiffcommerce Hub.
|
|
2086
2089
|
*/
|
|
2087
|
-
applicationKey
|
|
2090
|
+
applicationKey?: string;
|
|
2088
2091
|
}
|
|
2089
2092
|
interface GetBundleGraphqlAssetsOptions {
|
|
2090
2093
|
metadata?: boolean;
|
|
@@ -2331,6 +2334,11 @@ declare class SpiffCommerceClient {
|
|
|
2331
2334
|
}>): Promise<IntegrationProduct>;
|
|
2332
2335
|
getShareActionsForTransaction(transactionId: string): Promise<ShareAction[] | undefined>;
|
|
2333
2336
|
}
|
|
2337
|
+
declare const getIntegration: (applicationKey: string) => Promise<Integration>;
|
|
2338
|
+
declare const getTransaction: (transactionId: string) => Promise<Transaction | undefined>;
|
|
2339
|
+
declare const getOverrideThemeConfiguration: (overrideThemeConfigurationId: string, overrideThemeInstallId: string) => Promise<ThemeInstallConfigurationGraphQl | undefined>;
|
|
2340
|
+
declare const getBundleThemeConfiguration: (bundleId: string) => Promise<ThemeInstallConfigurationGraphQl | undefined>;
|
|
2341
|
+
declare const getTransactionThemeConfiguration: (transactionId: string) => Promise<ThemeInstallConfigurationGraphQl | undefined>;
|
|
2334
2342
|
|
|
2335
2343
|
interface SilentIllustrationStepData extends SilentStepData, Placeable {
|
|
2336
2344
|
}
|
|
@@ -2508,6 +2516,8 @@ interface WorkflowManager {
|
|
|
2508
2516
|
* Returns the tags for a step.
|
|
2509
2517
|
*/
|
|
2510
2518
|
getStepTags(stepId: string): string[];
|
|
2519
|
+
approveTransaction(note?: string): Promise<void>;
|
|
2520
|
+
rejectTransaction(note?: string): Promise<void>;
|
|
2511
2521
|
}
|
|
2512
2522
|
|
|
2513
2523
|
declare enum AssetType {
|
|
@@ -3452,6 +3462,7 @@ interface Transaction {
|
|
|
3452
3462
|
* The amount of this transaction that was, or will be, ordered
|
|
3453
3463
|
*/
|
|
3454
3464
|
quantity?: number;
|
|
3465
|
+
createdAt?: string;
|
|
3455
3466
|
printFileUrl1?: string;
|
|
3456
3467
|
printFileUrl2?: string;
|
|
3457
3468
|
printFileUrl3?: string;
|
|
@@ -3542,6 +3553,7 @@ interface Integration {
|
|
|
3542
3553
|
theme: Theme;
|
|
3543
3554
|
logo: string;
|
|
3544
3555
|
partner: Partner;
|
|
3556
|
+
marketplaceThemeInstallConfiguration?: ThemeInstallConfigurationGraphQl;
|
|
3545
3557
|
}
|
|
3546
3558
|
interface Theme {
|
|
3547
3559
|
configuration?: string;
|
|
@@ -4775,6 +4787,8 @@ declare class DigitalContentStepService implements StepService<DigitalContentSte
|
|
|
4775
4787
|
declare const digitalContentStepService: DigitalContentStepService;
|
|
4776
4788
|
|
|
4777
4789
|
declare class MockWorkflowManager implements WorkflowManager {
|
|
4790
|
+
approveTransaction(_note?: string): Promise<void>;
|
|
4791
|
+
rejectTransaction(_note?: string): Promise<void>;
|
|
4778
4792
|
private client;
|
|
4779
4793
|
getClient(): SpiffCommerceClient;
|
|
4780
4794
|
getWorkflowExperience(): WorkflowExperience;
|
|
@@ -5451,4 +5465,29 @@ declare const determineCorrectFontSizeAndLines: (curFontSize: number, fontData:
|
|
|
5451
5465
|
*/
|
|
5452
5466
|
declare const loadFont: (url: string) => Promise<Font>;
|
|
5453
5467
|
|
|
5454
|
-
|
|
5468
|
+
declare const nameBundle: (id: string, name: string, context: any) => Promise<_apollo_client_core.FetchResult<object>>;
|
|
5469
|
+
declare const nameTransaction: (id: string, name: string) => Promise<_apollo_client_core.FetchResult<object>>;
|
|
5470
|
+
declare const duplicateBundle: (id: string, template: boolean) => Promise<_apollo_client_core.FetchResult<{
|
|
5471
|
+
bundleDuplicate: Bundle;
|
|
5472
|
+
}>>;
|
|
5473
|
+
declare const duplicateTransaction: (id: string, template: boolean) => Promise<_apollo_client_core.FetchResult<{
|
|
5474
|
+
transactionDuplicate: Transaction;
|
|
5475
|
+
}>>;
|
|
5476
|
+
declare const getCustomer: (email: string) => Promise<{
|
|
5477
|
+
id: string;
|
|
5478
|
+
}>;
|
|
5479
|
+
declare const getCustomerBundles: (customerId: string, limit: number, offset: number) => Promise<_apollo_client_core.ApolloQueryResult<{
|
|
5480
|
+
customerBundlesFeed: BundlesFeed;
|
|
5481
|
+
}>>;
|
|
5482
|
+
declare const getTransactionsForBundle: (id: string, context: any) => Promise<_apollo_client_core.ApolloQueryResult<{
|
|
5483
|
+
bundles: {
|
|
5484
|
+
id: string;
|
|
5485
|
+
transactions: Transaction[];
|
|
5486
|
+
}[];
|
|
5487
|
+
}>>;
|
|
5488
|
+
declare const getUnorderedTransactions: (customerId: string, limit: number, offset: number) => Promise<Transaction[]>;
|
|
5489
|
+
declare const getOrderedTransactions: (customerId: string, limit: number, offset: number) => Promise<Transaction[]>;
|
|
5490
|
+
declare const getTemplateTransactions: (customerId: string, limit: number, offset: number) => Promise<Transaction[]>;
|
|
5491
|
+
declare const getTemplateBundles: (customerId: string, limit: number, offset: number) => Promise<Bundle[]>;
|
|
5492
|
+
|
|
5493
|
+
export { AddonHandle, Animatable, AnyStepData, ArrayInput, AspectType, Asset, 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, 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, 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, moduleStepService, nameBundle, nameTransaction, optionService, patternImageDataCache, persistenceService, pictureStepService, pmsToRgb, questionStepService, registerFetchImplementation, registerWindowImplementation, rgbToPms, rotateAroundPoint, sanitizeSvgTree, setBearerAuthenticationToken, setCanvasModule, shapeStepService, shortenUrl, spiffCoreConfiguration, stepAspectValuesToDesignInputSteps, svgColorValueToDefinition, svgStringDimensions, svgToDataUrl, textStepService, toast, xmlSerializer };
|