@spiffcommerce/core 0.3.7 → 0.3.9
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/main.js +9 -9
- package/dist/module.js +9 -9
- package/dist/types.d.ts +68 -0
- package/package.json +2 -1
package/dist/types.d.ts
CHANGED
|
@@ -1444,6 +1444,74 @@ export class Client {
|
|
|
1444
1444
|
*/
|
|
1445
1445
|
getTransaction(): Transaction;
|
|
1446
1446
|
}
|
|
1447
|
+
export class MockWorkflowManager implements WorkflowManager {
|
|
1448
|
+
getVariationRecords(): VariationRecord[];
|
|
1449
|
+
reset(): Promise<void>;
|
|
1450
|
+
updateStateWithServer(_getReducerState: () => CommandState): void;
|
|
1451
|
+
addVariationRecord(_variationRecord: Omit<VariationRecord, "recordNumber">): {
|
|
1452
|
+
recordNumber: number;
|
|
1453
|
+
transactionId: string;
|
|
1454
|
+
values: any[];
|
|
1455
|
+
};
|
|
1456
|
+
getCurrentVariationRecord(): any;
|
|
1457
|
+
removeVariationRecord(_recordNumber: number): any[];
|
|
1458
|
+
outstandingRequestsPromise(): Promise<void>;
|
|
1459
|
+
updateStateWithServerImmediate(_getReducerState: () => CommandState): Promise<void>;
|
|
1460
|
+
addPoller(_poller: Poller): void;
|
|
1461
|
+
addConfirmCallback(_callback: ConfirmCallback): void;
|
|
1462
|
+
addCurrentVariationCallback(_callback: CurrentVariationRecordCallback): void;
|
|
1463
|
+
addEditedCallback(_callback: EditedCallback): void;
|
|
1464
|
+
addElementsCallback(_callback: ElementsCallback): void;
|
|
1465
|
+
addInformationResultCallback(_callback: InformationResultCallback): void;
|
|
1466
|
+
addInitCallback(_callback: InitCallback): void;
|
|
1467
|
+
addMakingAdjustmentsCallback(_callback: MakingAdjustmentsCallback): void;
|
|
1468
|
+
addMandatoryCallback(_callback: MandatoryCallback): void;
|
|
1469
|
+
addMetadataCallback(_callback: MetadataCallback): void;
|
|
1470
|
+
addSelectionCallback(_callback: SelectionCallback): void;
|
|
1471
|
+
addStepSpecificStorageCallback(_callback: StepSpecificStorageCallback, _stepName: string): void;
|
|
1472
|
+
addStorageCallback(_callback: StorageCallback): void;
|
|
1473
|
+
addUpdateCallback(_callback: UpdateCallback): void;
|
|
1474
|
+
addVariationRecordsCallback(_callback: VariationRecordsCallback): void;
|
|
1475
|
+
getCommandDispatcher(): (_command: CanvasCommand) => void;
|
|
1476
|
+
getLayouts(): any[];
|
|
1477
|
+
getLayoutPreviewService(): {
|
|
1478
|
+
getAll: () => Map<any, any>;
|
|
1479
|
+
};
|
|
1480
|
+
getPreviewService(): any;
|
|
1481
|
+
getProductName(): string;
|
|
1482
|
+
getProfanities(): any[];
|
|
1483
|
+
getRegionElements(_stepName: string): any[];
|
|
1484
|
+
getSerializedStep(_stepName: string, _serializedSteps: SerializableStep[]): any;
|
|
1485
|
+
getStepSpecificServices(_stepName: string): any;
|
|
1486
|
+
getTransaction(): {
|
|
1487
|
+
id: string;
|
|
1488
|
+
};
|
|
1489
|
+
getWorkflow(): {
|
|
1490
|
+
id: string;
|
|
1491
|
+
name: string;
|
|
1492
|
+
panels: any[];
|
|
1493
|
+
steps: any[];
|
|
1494
|
+
showModelOnFinishStep: boolean;
|
|
1495
|
+
allowProofDownload: boolean;
|
|
1496
|
+
introduction: string;
|
|
1497
|
+
stepGroups: any[];
|
|
1498
|
+
};
|
|
1499
|
+
markStepsAsInitialised(_stepNames: string[]): void;
|
|
1500
|
+
markUpdateCompleted(_update: string): void;
|
|
1501
|
+
markUpdatePending(_update: string): void;
|
|
1502
|
+
getWorkflowSelections(): {};
|
|
1503
|
+
setCurrentAdjustingStepId(_stepId: string): void;
|
|
1504
|
+
setAllScenes(_config: WorkflowScenesConfiguration): void;
|
|
1505
|
+
setCurrentVariationRecord(_variationRecord: VariationRecord | null): void;
|
|
1506
|
+
setEditedStatus(_stepName: string, _status: boolean): void;
|
|
1507
|
+
setInformationResults(_results: InformationResult[]): void;
|
|
1508
|
+
setMandatoryFulfilled(_stepName: string, _status: boolean): void;
|
|
1509
|
+
setSelectionsAndElements(_stepName: string, _variants: VariantResource[], _elements: RegionElement[]): Promise<void>;
|
|
1510
|
+
setVariationRecords(_variationRecords: VariationRecord[]): void;
|
|
1511
|
+
toggleDesignConfirmed(): void;
|
|
1512
|
+
updateMetadata(_stepName: string, _update: any): void;
|
|
1513
|
+
updateStorage(_stepName: string, _update: StepStorage): Promise<void>;
|
|
1514
|
+
}
|
|
1447
1515
|
export { CommandContext };
|
|
1448
1516
|
export { CreateElementCommand, TextChangeCommand, FontAlignmentCommand, FontColorCommand, LayoutElementFactory };
|
|
1449
1517
|
export { LayoutElement, ImageElement, TextboxElement, TextStepData, FrameElement, PatchworkElement, IllustrationElement, LayoutData, LayoutsState };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@spiffcommerce/core",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.9",
|
|
4
4
|
"description": "Core client API for interacting with the Spiff Commerce backend.",
|
|
5
5
|
"source": "src/index.ts",
|
|
6
6
|
"main": "dist/main.js",
|
|
@@ -34,6 +34,7 @@
|
|
|
34
34
|
],
|
|
35
35
|
"author": "Spiff Commerce",
|
|
36
36
|
"devDependencies": {
|
|
37
|
+
"@babel/plugin-proposal-class-properties": "^7.18.6",
|
|
37
38
|
"@parcel/packager-ts": "2.7.0",
|
|
38
39
|
"@parcel/transformer-typescript-tsc": "^2.7.0",
|
|
39
40
|
"@parcel/transformer-typescript-types": "^2.7.0",
|