|
1
|
import { HttpTypes } from "@medusajs/types" |
|
2
|
import { TransactionState, TransactionStepState } from "./types" |
|
3
|
|
|
4
|
export const STEP_IN_PROGRESS_STATES: HttpTypes.TransactionStepState[] = [ |
|
5
|
TransactionStepState.COMPENSATING, |
|
6
|
TransactionStepState.INVOKING, |
|
7
|
] |
|
8
|
|
|
9
|
export const STEP_SKIPPED_STATES: HttpTypes.TransactionStepState[] = [ |
|
10
|
TransactionStepState.SKIPPED, |
|
11
|
TransactionStepState.SKIPPED_FAILURE, |
|
12
|
] |
|
13
|
export const STEP_OK_STATES: HttpTypes.TransactionStepState[] = [ |
|
14
|
TransactionStepState.DONE, |
|
15
|
] |
|
16
|
|
|
17
|
export const STEP_ERROR_STATES: HttpTypes.TransactionStepState[] = [ |
|
18
|
TransactionStepState.FAILED, |
|
19
|
TransactionStepState.REVERTED, |
|
20
|
TransactionStepState.TIMEOUT, |
|
21
|
TransactionStepState.DORMANT, |
|
22
|
] |
|
23
|
export const STEP_INACTIVE_STATES: HttpTypes.TransactionStepState[] = [ |
|
24
|
TransactionStepState.NOT_STARTED, |
|
25
|
] |
|
26
|
|
|
27
|
export const TRANSACTION_OK_STATES: HttpTypes.TransactionState[] = [ |
|
28
|
TransactionState.DONE, |
|
29
|
] |
|
30
|
export const TRANSACTION_ERROR_STATES: HttpTypes.TransactionState[] = [ |
|
31
|
TransactionState.FAILED, |
|
32
|
TransactionState.REVERTED, |
|
33
|
] |
|
34
|
export const TRANSACTION_IN_PROGRESS_STATES: HttpTypes.TransactionState[] = [ |
|
35
|
TransactionState.INVOKING, |
|
36
|
TransactionState.WAITING_TO_COMPENSATE, |
|
37
|
TransactionState.COMPENSATING, |
|
38
|
] |