@spiffcommerce/core 0.10.43 → 0.10.45

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/types.d.ts CHANGED
@@ -30,12 +30,6 @@ export interface WorkflowScene {
30
30
  renderableSteps: _Step1<_AnyStepData1>[];
31
31
  silentSteps: _Step1<_AnyStepData1>[];
32
32
  }
33
- interface WorkflowScenesConfiguration {
34
- bulkScene: boolean;
35
- bulkSceneTitle: string;
36
- finishScene: boolean;
37
- finishSceneTitle: string;
38
- }
39
33
  /**
40
34
  * A queue promise is a container for a promise that can be
41
35
  * executed at a later time.
@@ -269,13 +263,19 @@ declare class FrameStepService implements StepService<_FrameStepData1> {
269
263
  }
270
264
  export const frameStepService: FrameStepService;
271
265
  declare class MaterialStepService implements StepService<_MaterialStepData1> {
272
- init(stepData: _Step1<_MaterialStepData1>, workflowManager: WorkflowManager, reducerState?: _LayoutsState1): Promise<null | (() => Promise<void>)>;
273
- selectVariant(step: _Step1<_MaterialStepData1>, variant: _VariantResource1, workflowManager: WorkflowManager, setApplying: (status: boolean) => void): void;
266
+ init(stepData: _Step1<_MaterialStepData1>, workflowManager: WorkflowManager, reducerState?: _LayoutsState1): Promise<null | CommandWithFollowup>;
267
+ selectVariant(step: _Step1<_MaterialStepData1>, variant: _VariantResource1, workflowManager: WorkflowManager, setApplying: (status: boolean) => void): Promise<{
268
+ command: any;
269
+ followup: () => Promise<void>;
270
+ }>;
274
271
  }
275
272
  export const materialStepService: MaterialStepService;
276
273
  declare class ModelStepService implements StepService<_ModelStepData1> {
277
- init(stepData: _Step1<_ModelStepData1>, workflowManager: WorkflowManager, reducerState?: _LayoutsState1): Promise<null | (() => Promise<void>)>;
278
- selectVariant(step: _Step1<_ModelStepData1>, variant: _VariantResource1, workflowManager: WorkflowManager, setApplying: (status: boolean) => void): void;
274
+ init(stepData: _Step1<_ModelStepData1>, workflowManager: WorkflowManager, reducerState?: _LayoutsState1): Promise<null | CommandWithFollowup>;
275
+ selectVariant(step: _Step1<_ModelStepData1>, variant: _VariantResource1, workflowManager: WorkflowManager, setApplying: (status: boolean) => void): Promise<{
276
+ command: any;
277
+ followup: () => Promise<void>;
278
+ }>;
279
279
  }
280
280
  export const modelStepService: ModelStepService;
281
281
  declare class ModuleStepService implements StepService<_ModuleStepData1> {
@@ -300,8 +300,11 @@ declare class PictureStepService implements StepService<_PictureStepData1> {
300
300
  }
301
301
  export const pictureStepService: PictureStepService;
302
302
  declare class QuestionStepService implements StepService<_QuestionStepData1> {
303
- init(stepData: _Step1<_QuestionStepData1>, workflowManager: WorkflowManager, reducerState?: _LayoutsState1): Promise<null | (() => Promise<void>)>;
304
- selectVariant(stepData: _Step1<_QuestionStepData1>, variantId: string, workflowManager: WorkflowManager): Promise<void>;
303
+ init(stepData: _Step1<_QuestionStepData1>, workflowManager: WorkflowManager, reducerState?: _LayoutsState1): Promise<null | CommandWithFollowup>;
304
+ selectVariant(stepData: _Step1<_QuestionStepData1>, variantId: string, workflowManager: WorkflowManager): Promise<{
305
+ command: any;
306
+ followup: () => Promise<void>;
307
+ }>;
305
308
  }
306
309
  export const questionStepService: QuestionStepService;
307
310
  declare class ShapeStepService implements StepService<_ShapeStepData1> {
@@ -485,12 +488,11 @@ export interface WorkflowManager {
485
488
  removeVariationRecord: (recordNumber: number) => VariationRecord[];
486
489
  reset: () => Promise<void>;
487
490
  setCurrentAdjustingStepId: (stepId: string) => void;
488
- setAllScenes: (config: WorkflowScenesConfiguration) => void;
489
491
  setCurrentVariationRecord: (variationRecord: null | VariationRecord) => void;
490
492
  setEditedStatus: (stepName: string, status: boolean) => void;
491
493
  setInformationResults: (results: InformationResult[]) => void;
492
494
  setMandatoryFulfilled: (stepName: string, status: boolean) => void;
493
- setSelectionsAndElements: (stepName: string, variants: _VariantResource1[], elements: RegionElement[], callback?: () => Promise<void>) => void;
495
+ setSelectionsAndElements: (stepName: string, variants: _VariantResource1[], elements: RegionElement[], callback?: () => Promise<void>) => Promise<void>;
494
496
  setVariationRecords: (variationRecords: VariationRecord[]) => void;
495
497
  toggleDesignConfirmed: () => void;
496
498
  updateMetadata: (stepName: string, update: any) => void;
@@ -519,8 +521,8 @@ interface FileInfo {
519
521
  * A command along with a function to run afterwards.
520
522
  */
521
523
  interface CommandWithFollowup {
522
- command: _CanvasCommand1;
523
- followup: () => Promise<void>;
524
+ command?: _CanvasCommand1;
525
+ followup?: () => Promise<void>;
524
526
  }
525
527
  /**
526
528
  * The variant selections of a completed step.
@@ -1367,7 +1369,6 @@ export class MockWorkflowManager implements WorkflowManager {
1367
1369
  markUpdatePending(): string;
1368
1370
  getWorkflowSelections(): {};
1369
1371
  setCurrentAdjustingStepId(_stepId: string): void;
1370
- setAllScenes(_config: WorkflowScenesConfiguration): void;
1371
1372
  setCurrentVariationRecord(_variationRecord: VariationRecord | null): void;
1372
1373
  setEditedStatus(_stepName: string, _status: boolean): void;
1373
1374
  setInformationResults(_results: InformationResult[]): void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spiffcommerce/core",
3
- "version": "0.10.43",
3
+ "version": "0.10.45",
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",