Plugin API for Transition Service

### Hierarchy

- TransitionServicePluginAPI

## Index

### Methods

- _defineEvent
- _definePathType
- _getEvents
- _getPathTypes
- getHooks

## Methods

- _defineEvent(name: string, hookPhase: TransitionHookPhase.CREATE | TransitionHookPhase.BEFORE | TransitionHookPhase.RUN | TransitionHookPhase.SUCCESS | TransitionHookPhase.ERROR, hookOrder: number, criteriaMatchPath: PathType, reverseSort?: boolean, getResultHandler?: GetResultHandler, getErrorHandler?: GetErrorHandler, rejectIfSuperseded?: boolean): any

- Defines a transition hook type and returns a transition hook registration function (which can then be used to register hooks of this type).

- Defines a transition hook type and returns a transition hook registration function (which can then be used to register hooks of this type).

  #### Parameters

  - ##### name string

  - ##### hookPhase TransitionHookPhase.CREATE | TransitionHookPhase.BEFORE | TransitionHookPhase.RUN | TransitionHookPhase.SUCCESS | TransitionHookPhase.ERROR

  - ##### hookOrder number

  - ##### criteriaMatchPath PathType

  - ##### reverseSort: Optional boolean

  - ##### getResultHandler: Optional GetResultHandler

  - ##### getErrorHandler: Optional GetErrorHandler

  - ##### rejectIfSuperseded: Optional boolean

  #### Returns any

  - Defined in transition/transitionService.ts:79

- _definePathType(name: string, hookScope: TransitionHookScope.TRANSITION | TransitionHookScope.STATE): any

- Adds a Path to be used as a criterion against a TreeChanges path

- Adds a Path to be used as a criterion against a TreeChanges path

  For example: the `exiting` path in HookMatchCriteria is a STATE scoped path. It was defined by calling `defineTreeChangesCriterion('exiting', TransitionHookScope.STATE)` Each state in the exiting path is checked against the criteria and returned as part of the match.

  Another example: the `to` path in HookMatchCriteria is a TRANSITION scoped path. It was defined by calling `defineTreeChangesCriterion('to', TransitionHookScope.TRANSITION)` Only the tail of the `to` path is checked against the criteria and returned as part of the match.

  #### Parameters

  - ##### name string

  - ##### hookScope TransitionHookScope.TRANSITION | TransitionHookScope.STATE

  #### Returns any

  - Defined in transition/transitionService.ts:68

- _getEvents(phase?: TransitionHookPhase.CREATE | TransitionHookPhase.BEFORE | TransitionHookPhase.RUN | TransitionHookPhase.SUCCESS | TransitionHookPhase.ERROR): TransitionEventType[]

- Returns the known event types, such as `onBefore` If a phase argument is provided, returns only events for the given phase.

- Returns the known event types, such as `onBefore` If a phase argument is provided, returns only events for the given phase.

  #### Parameters

  - ##### phase: Optional TransitionHookPhase.CREATE | TransitionHookPhase.BEFORE | TransitionHookPhase.RUN | TransitionHookPhase.SUCCESS | TransitionHookPhase.ERROR

  #### Returns TransitionEventType[]

  - Defined in transition/transitionService.ts:92

- _getPathTypes(): PathTypes

- Gets a Path definition used as a criterion against a TreeChanges path

- Gets a Path definition used as a criterion against a TreeChanges path

  #### Returns PathTypes

  - Defined in transition/transitionService.ts:73

- getHooks(hookName: string): RegisteredHook[]

- Returns the hooks registered for the given hook name

- Returns the hooks registered for the given hook name

  #### Parameters

  - ##### hookName string

  #### Returns RegisteredHook[]

  - Defined in transition/transitionService.ts:95

Generated using TypeDoc