@ibiliaze/global-vars 1.40.0 → 1.42.0
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.
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { Types } from 'mongoose';
|
|
2
|
-
|
|
3
|
-
_id?: Types.ObjectId | string | undefined;
|
|
2
|
+
interface ReaderMeta {
|
|
4
3
|
name: string;
|
|
5
4
|
password: string;
|
|
6
5
|
room?: string;
|
|
@@ -8,56 +7,98 @@ export interface ReaderTacsType {
|
|
|
8
7
|
area?: string;
|
|
9
8
|
block?: string;
|
|
10
9
|
sessionId?: string;
|
|
11
|
-
lastSeen?: Date;
|
|
12
10
|
online?: boolean;
|
|
13
11
|
}
|
|
14
|
-
export type
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
12
|
+
export type ReaderTacsTypeNode = {
|
|
13
|
+
_id?: Types.ObjectId | undefined;
|
|
14
|
+
lastSeen?: Date;
|
|
15
|
+
} & ReaderMeta;
|
|
16
|
+
export type ReaderTacsTypeReact = {
|
|
17
|
+
_id?: string | undefined;
|
|
18
|
+
lastSeen?: string;
|
|
19
|
+
} & ReaderMeta;
|
|
20
|
+
interface TicketTacsTypeMeta {
|
|
21
21
|
ticketCode: string;
|
|
22
|
-
fixtureId: Types.ObjectId | string;
|
|
23
22
|
fixtureName: string;
|
|
24
|
-
fixtureDate: Date;
|
|
25
23
|
orderId: string;
|
|
26
|
-
sectionId: Types.ObjectId | string;
|
|
27
24
|
row: number;
|
|
28
25
|
seat: number;
|
|
29
|
-
purchaseTime: Date;
|
|
30
26
|
block: string;
|
|
31
27
|
gate: string;
|
|
32
28
|
area: string;
|
|
33
|
-
flags?: Flag[];
|
|
34
29
|
sessionId?: string;
|
|
30
|
+
}
|
|
31
|
+
export type TicketTacsTypeNode = {
|
|
32
|
+
_id?: Types.ObjectId | undefined;
|
|
33
|
+
fixtureId: Types.ObjectId;
|
|
34
|
+
fixtureDate: Date;
|
|
35
|
+
sectionId: Types.ObjectId;
|
|
36
|
+
purchaseTime: Date;
|
|
35
37
|
createdAt?: Date;
|
|
36
38
|
updatedAt?: Date;
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
export type
|
|
40
|
-
|
|
39
|
+
flags?: FlagNode[];
|
|
40
|
+
} & TicketTacsTypeMeta;
|
|
41
|
+
export type TicketTacsTypeReact = {
|
|
42
|
+
_id?: string | undefined;
|
|
43
|
+
fixtureId: string;
|
|
44
|
+
fixtureDate: string;
|
|
45
|
+
sectionId: string;
|
|
46
|
+
purchaseTime: string;
|
|
47
|
+
createdAt?: string;
|
|
48
|
+
updatedAt?: string;
|
|
49
|
+
flags?: FlagReact[];
|
|
50
|
+
} & TicketTacsTypeMeta;
|
|
51
|
+
interface TicketTacsMeshTypeMeta {
|
|
41
52
|
ticketCode: string;
|
|
42
53
|
updatedAt: number;
|
|
43
|
-
}
|
|
44
|
-
export
|
|
45
|
-
|
|
54
|
+
}
|
|
55
|
+
export type TicketTacsMeshType = {
|
|
56
|
+
flags?: FlagNode[];
|
|
57
|
+
} & TicketTacsMeshTypeMeta;
|
|
58
|
+
interface TicketTypeMeta {
|
|
46
59
|
ticketCode: string;
|
|
47
60
|
orderId: string;
|
|
48
|
-
fixtureId: Types.ObjectId | string;
|
|
49
|
-
sectionId: Types.ObjectId | string;
|
|
50
|
-
userId: Types.ObjectId | string;
|
|
51
|
-
seatId: Types.ObjectId | string;
|
|
52
61
|
name: string;
|
|
53
62
|
email: string;
|
|
54
63
|
tel: string;
|
|
55
64
|
verified?: boolean;
|
|
56
65
|
}
|
|
57
|
-
export
|
|
58
|
-
_id?: Types.ObjectId
|
|
66
|
+
export type TicketTypeNode = {
|
|
67
|
+
_id?: Types.ObjectId;
|
|
68
|
+
fixtureId: Types.ObjectId;
|
|
69
|
+
sectionId: Types.ObjectId;
|
|
70
|
+
userId: Types.ObjectId;
|
|
71
|
+
seatId: Types.ObjectId;
|
|
72
|
+
} & TicketTypeMeta;
|
|
73
|
+
export type TicketTypeReact = {
|
|
74
|
+
_id?: string;
|
|
75
|
+
fixtureId: string;
|
|
76
|
+
sectionId: string;
|
|
77
|
+
userId: string;
|
|
78
|
+
seatId: string;
|
|
79
|
+
} & TicketTypeMeta;
|
|
80
|
+
export type FlagNode = {
|
|
81
|
+
tag: FlagType;
|
|
82
|
+
time: Date;
|
|
83
|
+
readerName: string;
|
|
84
|
+
};
|
|
85
|
+
export type FlagReact = {
|
|
86
|
+
tag: FlagType;
|
|
87
|
+
time: string;
|
|
88
|
+
readerName: string;
|
|
89
|
+
};
|
|
90
|
+
export type FlagType = 'Passed OK' | 'Wrong Gate' | 'Unknown Card' | 'Similary Check' | 'Invalid Ticket Format' | 'Wrong Ticket' | 'Duplicate Attempt [MESH]' | 'Duplicate Attempt [TACS]' | 'Not Completed' | 'Passing Simultaneaously' | 'Block or Alternative Gate Definition Error' | 'Mobile NFC Pass' | 'Mobile Barcode Pass';
|
|
91
|
+
interface FixtureTacsTypeMeta {
|
|
59
92
|
name: string;
|
|
60
|
-
date: Date;
|
|
61
93
|
active: boolean;
|
|
62
94
|
minimumReaders?: number;
|
|
63
95
|
}
|
|
96
|
+
export type FixtureTacsTypeNode = {
|
|
97
|
+
_id?: Types.ObjectId;
|
|
98
|
+
date: Date;
|
|
99
|
+
} & FixtureTacsTypeMeta;
|
|
100
|
+
export type FixtureTacsTypeReact = {
|
|
101
|
+
_id?: string;
|
|
102
|
+
date: string;
|
|
103
|
+
} & FixtureTacsTypeMeta;
|
|
104
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ibiliaze/global-vars",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.42.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
7
7
|
"scripts": {
|
|
8
8
|
"build": "tsc",
|
|
9
9
|
"pub": "npm publish --access public",
|
|
10
|
-
"git": "git add .; git commit -m 'changes'; git tag -a v1.
|
|
10
|
+
"git": "git add .; git commit -m 'changes'; git tag -a v1.42.0 -m 'v1.42.0'; git push origin v1.42.0; git push",
|
|
11
11
|
"push": "npm run build; npm run git; npm run pub"
|
|
12
12
|
},
|
|
13
13
|
"author": "Ibi Hasanli",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Types } from 'mongoose';
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
// Reader
|
|
4
|
+
interface ReaderMeta {
|
|
5
5
|
name: string;
|
|
6
6
|
password: string;
|
|
7
7
|
room?: string;
|
|
@@ -9,32 +9,93 @@ export interface ReaderTacsType {
|
|
|
9
9
|
area?: string;
|
|
10
10
|
block?: string;
|
|
11
11
|
sessionId?: string;
|
|
12
|
-
lastSeen?: Date;
|
|
13
12
|
online?: boolean;
|
|
14
13
|
}
|
|
15
14
|
|
|
16
|
-
export type
|
|
15
|
+
export type ReaderTacsTypeNode = {
|
|
16
|
+
_id?: Types.ObjectId | undefined;
|
|
17
|
+
lastSeen?: Date;
|
|
18
|
+
} & ReaderMeta;
|
|
19
|
+
|
|
20
|
+
export type ReaderTacsTypeReact = {
|
|
21
|
+
_id?: string | undefined;
|
|
22
|
+
lastSeen?: string;
|
|
23
|
+
} & ReaderMeta;
|
|
17
24
|
|
|
18
|
-
|
|
19
|
-
|
|
25
|
+
// Ticket TACS
|
|
26
|
+
interface TicketTacsTypeMeta {
|
|
20
27
|
ticketCode: string;
|
|
21
|
-
fixtureId: Types.ObjectId | string;
|
|
22
28
|
fixtureName: string;
|
|
23
|
-
fixtureDate: Date;
|
|
24
29
|
orderId: string;
|
|
25
|
-
sectionId: Types.ObjectId | string;
|
|
26
30
|
row: number;
|
|
27
31
|
seat: number;
|
|
28
|
-
purchaseTime: Date;
|
|
29
32
|
block: string;
|
|
30
33
|
gate: string;
|
|
31
34
|
area: string;
|
|
32
|
-
flags?: Flag[];
|
|
33
35
|
sessionId?: string;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export type TicketTacsTypeNode = {
|
|
39
|
+
_id?: Types.ObjectId | undefined;
|
|
40
|
+
fixtureId: Types.ObjectId;
|
|
41
|
+
fixtureDate: Date;
|
|
42
|
+
sectionId: Types.ObjectId;
|
|
43
|
+
purchaseTime: Date;
|
|
34
44
|
createdAt?: Date;
|
|
35
45
|
updatedAt?: Date;
|
|
46
|
+
flags?: FlagNode[];
|
|
47
|
+
} & TicketTacsTypeMeta;
|
|
48
|
+
|
|
49
|
+
export type TicketTacsTypeReact = {
|
|
50
|
+
_id?: string | undefined;
|
|
51
|
+
fixtureId: string;
|
|
52
|
+
fixtureDate: string;
|
|
53
|
+
sectionId: string;
|
|
54
|
+
purchaseTime: string;
|
|
55
|
+
createdAt?: string;
|
|
56
|
+
updatedAt?: string;
|
|
57
|
+
flags?: FlagReact[];
|
|
58
|
+
} & TicketTacsTypeMeta;
|
|
59
|
+
|
|
60
|
+
// Ticket mesh
|
|
61
|
+
interface TicketTacsMeshTypeMeta {
|
|
62
|
+
ticketCode: string;
|
|
63
|
+
updatedAt: number;
|
|
36
64
|
}
|
|
37
65
|
|
|
66
|
+
export type TicketTacsMeshType = {
|
|
67
|
+
flags?: FlagNode[];
|
|
68
|
+
} & TicketTacsMeshTypeMeta;
|
|
69
|
+
|
|
70
|
+
// Ticket
|
|
71
|
+
interface TicketTypeMeta {
|
|
72
|
+
ticketCode: string;
|
|
73
|
+
orderId: string;
|
|
74
|
+
name: string;
|
|
75
|
+
email: string;
|
|
76
|
+
tel: string;
|
|
77
|
+
verified?: boolean;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
export type TicketTypeNode = {
|
|
81
|
+
_id?: Types.ObjectId;
|
|
82
|
+
fixtureId: Types.ObjectId;
|
|
83
|
+
sectionId: Types.ObjectId;
|
|
84
|
+
userId: Types.ObjectId;
|
|
85
|
+
seatId: Types.ObjectId;
|
|
86
|
+
} & TicketTypeMeta;
|
|
87
|
+
|
|
88
|
+
export type TicketTypeReact = {
|
|
89
|
+
_id?: string;
|
|
90
|
+
fixtureId: string;
|
|
91
|
+
sectionId: string;
|
|
92
|
+
userId: string;
|
|
93
|
+
seatId: string;
|
|
94
|
+
} & TicketTypeMeta;
|
|
95
|
+
|
|
96
|
+
// Flag
|
|
97
|
+
export type FlagNode = { tag: FlagType; time: Date; readerName: string };
|
|
98
|
+
export type FlagReact = { tag: FlagType; time: string; readerName: string };
|
|
38
99
|
export type FlagType =
|
|
39
100
|
| 'Passed OK'
|
|
40
101
|
| 'Wrong Gate'
|
|
@@ -42,38 +103,27 @@ export type FlagType =
|
|
|
42
103
|
| 'Similary Check'
|
|
43
104
|
| 'Invalid Ticket Format'
|
|
44
105
|
| 'Wrong Ticket'
|
|
45
|
-
| 'Duplicate
|
|
46
|
-
| 'Duplicate
|
|
106
|
+
| 'Duplicate Attempt [MESH]'
|
|
107
|
+
| 'Duplicate Attempt [TACS]'
|
|
47
108
|
| 'Not Completed'
|
|
48
109
|
| 'Passing Simultaneaously'
|
|
49
110
|
| 'Block or Alternative Gate Definition Error'
|
|
50
111
|
| 'Mobile NFC Pass'
|
|
51
112
|
| 'Mobile Barcode Pass';
|
|
52
113
|
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
ticketCode: string;
|
|
56
|
-
updatedAt: number;
|
|
57
|
-
};
|
|
58
|
-
|
|
59
|
-
export interface TicketType {
|
|
60
|
-
_id?: Types.ObjectId | string;
|
|
61
|
-
ticketCode: string;
|
|
62
|
-
orderId: string;
|
|
63
|
-
fixtureId: Types.ObjectId | string;
|
|
64
|
-
sectionId: Types.ObjectId | string;
|
|
65
|
-
userId: Types.ObjectId | string;
|
|
66
|
-
seatId: Types.ObjectId | string;
|
|
67
|
-
name: string;
|
|
68
|
-
email: string;
|
|
69
|
-
tel: string;
|
|
70
|
-
verified?: boolean;
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
export interface FixtureTacsType {
|
|
74
|
-
_id?: Types.ObjectId | string;
|
|
114
|
+
// Fixture
|
|
115
|
+
interface FixtureTacsTypeMeta {
|
|
75
116
|
name: string;
|
|
76
|
-
date: Date;
|
|
77
117
|
active: boolean;
|
|
78
118
|
minimumReaders?: number;
|
|
79
119
|
}
|
|
120
|
+
|
|
121
|
+
export type FixtureTacsTypeNode = {
|
|
122
|
+
_id?: Types.ObjectId;
|
|
123
|
+
date: Date;
|
|
124
|
+
} & FixtureTacsTypeMeta;
|
|
125
|
+
|
|
126
|
+
export type FixtureTacsTypeReact = {
|
|
127
|
+
_id?: string;
|
|
128
|
+
date: string;
|
|
129
|
+
} & FixtureTacsTypeMeta;
|