@spiffcommerce/core 0.10.44 → 0.10.46

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,13 @@ 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<void>;
274
268
  }
275
269
  export const materialStepService: MaterialStepService;
276
270
  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;
271
+ init(stepData: _Step1<_ModelStepData1>, workflowManager: WorkflowManager, reducerState?: _LayoutsState1): Promise<null | CommandWithFollowup>;
272
+ selectVariant(step: _Step1<_ModelStepData1>, variant: _VariantResource1, workflowManager: WorkflowManager, setApplying: (status: boolean) => void): Promise<void>;
279
273
  }
280
274
  export const modelStepService: ModelStepService;
281
275
  declare class ModuleStepService implements StepService<_ModuleStepData1> {
@@ -300,7 +294,7 @@ declare class PictureStepService implements StepService<_PictureStepData1> {
300
294
  }
301
295
  export const pictureStepService: PictureStepService;
302
296
  declare class QuestionStepService implements StepService<_QuestionStepData1> {
303
- init(stepData: _Step1<_QuestionStepData1>, workflowManager: WorkflowManager, reducerState?: _LayoutsState1): Promise<null | (() => Promise<void>)>;
297
+ init(stepData: _Step1<_QuestionStepData1>, workflowManager: WorkflowManager, reducerState?: _LayoutsState1): Promise<null | CommandWithFollowup>;
304
298
  selectVariant(stepData: _Step1<_QuestionStepData1>, variantId: string, workflowManager: WorkflowManager): Promise<void>;
305
299
  }
306
300
  export const questionStepService: QuestionStepService;
@@ -485,12 +479,11 @@ export interface WorkflowManager {
485
479
  removeVariationRecord: (recordNumber: number) => VariationRecord[];
486
480
  reset: () => Promise<void>;
487
481
  setCurrentAdjustingStepId: (stepId: string) => void;
488
- setAllScenes: (config: WorkflowScenesConfiguration) => void;
489
482
  setCurrentVariationRecord: (variationRecord: null | VariationRecord) => void;
490
483
  setEditedStatus: (stepName: string, status: boolean) => void;
491
484
  setInformationResults: (results: InformationResult[]) => void;
492
485
  setMandatoryFulfilled: (stepName: string, status: boolean) => void;
493
- setSelectionsAndElements: (stepName: string, variants: _VariantResource1[], elements: RegionElement[], callback?: () => Promise<void>) => void;
486
+ setSelectionsAndElements: (stepName: string, variants: _VariantResource1[], elements: RegionElement[], callback?: () => Promise<void>) => Promise<void>;
494
487
  setVariationRecords: (variationRecords: VariationRecord[]) => void;
495
488
  toggleDesignConfirmed: () => void;
496
489
  updateMetadata: (stepName: string, update: any) => void;
@@ -519,8 +512,8 @@ interface FileInfo {
519
512
  * A command along with a function to run afterwards.
520
513
  */
521
514
  interface CommandWithFollowup {
522
- command: _CanvasCommand1;
523
- followup: () => Promise<void>;
515
+ command?: _CanvasCommand1;
516
+ followup?: () => Promise<void>;
524
517
  }
525
518
  /**
526
519
  * The variant selections of a completed step.
@@ -1367,7 +1360,6 @@ export class MockWorkflowManager implements WorkflowManager {
1367
1360
  markUpdatePending(): string;
1368
1361
  getWorkflowSelections(): {};
1369
1362
  setCurrentAdjustingStepId(_stepId: string): void;
1370
- setAllScenes(_config: WorkflowScenesConfiguration): void;
1371
1363
  setCurrentVariationRecord(_variationRecord: VariationRecord | null): void;
1372
1364
  setEditedStatus(_stepName: string, _status: boolean): void;
1373
1365
  setInformationResults(_results: InformationResult[]): void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spiffcommerce/core",
3
- "version": "0.10.44",
3
+ "version": "0.10.46",
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",