File tree Expand file tree Collapse file tree 3 files changed +4
-27
lines changed Expand file tree Collapse file tree 3 files changed +4
-27
lines changed Original file line number Diff line number Diff line change @@ -15,17 +15,3 @@ export const queueJobAttemptsDelay = 1000;
15
15
16
16
/** Time interval for queue needs in milliseconds */
17
17
export const queueHeartbeat = 5 ;
18
-
19
- /**
20
- * Deal status
21
- */
22
- export enum DealStatus {
23
- Created , // Just created
24
- Claimed , // Claimed by the supplier
25
- Rejected , // Rejected by the supplier
26
- Refunded , // Refunded by the supplier
27
- Cancelled , // Cancelled by the buyer
28
- CheckedIn , // Checked In
29
- CheckedOut , // Checked Out
30
- Disputed , // Dispute started
31
- }
Original file line number Diff line number Diff line change 1
1
import { Hash } from 'viem' ;
2
- /**
3
- * Allowed deal states
4
- */
5
- export enum DealState {
6
- PENDING ,
7
- ACCEPTED ,
8
- REJECTED ,
9
- CANCELLED ,
10
- CHECKED_IN ,
11
- }
2
+ import { DealStatus } from './contracts.js' ;
12
3
13
4
/**
14
5
* Deal data type
@@ -19,7 +10,7 @@ export interface DealData {
19
10
/** Supplier Id */
20
11
supplierId : Hash ;
21
12
/** Deal status */
22
- status : DealState ;
13
+ status : DealStatus ;
23
14
/** Deal status change reason */
24
15
reason ?: string ;
25
16
/** Deal creation date */
Original file line number Diff line number Diff line change @@ -82,7 +82,7 @@ export interface Job<JobDataType = unknown> {
82
82
*/
83
83
export type JobHandler < OfferData = unknown , HandlerOptions extends object = object > = (
84
84
job : Job < OfferData > ,
85
- options ? : HandlerOptions ,
85
+ options : HandlerOptions ,
86
86
) => Promise < boolean | void > ;
87
87
88
88
/**
@@ -108,7 +108,7 @@ export const createJobHandler =
108
108
< OfferData = any , HandlerOptions extends object = object > (
109
109
handler : JobHandler < OfferData , HandlerOptions > ,
110
110
) =>
111
- ( options ? : HandlerOptions ) =>
111
+ ( options : HandlerOptions ) =>
112
112
( job : Job < OfferData > ) =>
113
113
handler ( job , options ) ;
114
114
/* eslint-disable @typescript-eslint/no-explicit-any */
You can’t perform that action at this time.
0 commit comments