@ibiliaze/global-vars 1.38.0 → 1.40.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,6 @@
1
1
  import { Types } from 'mongoose';
2
2
  export interface ReaderTacsType {
3
- _id?: Types.ObjectId;
3
+ _id?: Types.ObjectId | string | undefined;
4
4
  name: string;
5
5
  password: string;
6
6
  room?: string;
@@ -11,54 +11,51 @@ export interface ReaderTacsType {
11
11
  lastSeen?: Date;
12
12
  online?: boolean;
13
13
  }
14
+ export type Flag = {
15
+ tag: FlagType;
16
+ time: Date;
17
+ readerName: string;
18
+ };
14
19
  export interface TicketTacsType {
15
- _id?: Types.ObjectId;
20
+ _id?: Types.ObjectId | string | undefined;
16
21
  ticketCode: string;
17
- fixtureId: Types.ObjectId;
22
+ fixtureId: Types.ObjectId | string;
18
23
  fixtureName: string;
19
24
  fixtureDate: Date;
20
25
  orderId: string;
21
- sectionId: Types.ObjectId;
26
+ sectionId: Types.ObjectId | string;
22
27
  row: number;
23
28
  seat: number;
24
29
  purchaseTime: Date;
25
30
  block: string;
26
31
  gate: string;
27
32
  area: string;
28
- flags?: {
29
- tag: FlagType;
30
- time: Date;
31
- }[];
32
- readerName?: string;
33
+ flags?: Flag[];
33
34
  sessionId?: string;
34
35
  createdAt?: Date;
35
36
  updatedAt?: Date;
36
37
  }
37
38
  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';
38
39
  export type TicketTacsMeshType = {
39
- flags?: {
40
- tag: FlagType;
41
- time: Date;
42
- }[];
40
+ flags?: Flag[];
43
41
  ticketCode: string;
44
- readerName: string;
45
42
  updatedAt: number;
46
43
  };
47
44
  export interface TicketType {
48
- _id?: Types.ObjectId;
45
+ _id?: Types.ObjectId | string;
49
46
  ticketCode: string;
50
47
  orderId: string;
51
- fixtureId: Types.ObjectId;
52
- sectionId: Types.ObjectId;
53
- userId: Types.ObjectId;
54
- seatId: Types.ObjectId;
48
+ fixtureId: Types.ObjectId | string;
49
+ sectionId: Types.ObjectId | string;
50
+ userId: Types.ObjectId | string;
51
+ seatId: Types.ObjectId | string;
55
52
  name: string;
56
53
  email: string;
57
54
  tel: string;
58
55
  verified?: boolean;
59
56
  }
60
57
  export interface FixtureTacsType {
61
- _id?: Types.ObjectId;
58
+ _id?: Types.ObjectId | string;
62
59
  name: string;
63
60
  date: Date;
64
61
  active: boolean;
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "@ibiliaze/global-vars",
3
- "version": "1.38.0",
3
+ "version": "1.40.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.38.0 -m 'v1.38.0'; git push origin v1.38.0; git push",
10
+ "git": "git add .; git commit -m 'changes'; git tag -a v1.40.0 -m 'v1.40.0'; git push origin v1.40.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
3
  export interface ReaderTacsType {
4
- _id?: Types.ObjectId;
4
+ _id?: Types.ObjectId | string | undefined;
5
5
  name: string;
6
6
  password: string;
7
7
  room?: string;
@@ -13,22 +13,23 @@ export interface ReaderTacsType {
13
13
  online?: boolean;
14
14
  }
15
15
 
16
+ export type Flag = { tag: FlagType; time: Date; readerName: string };
17
+
16
18
  export interface TicketTacsType {
17
- _id?: Types.ObjectId;
19
+ _id?: Types.ObjectId | string | undefined;
18
20
  ticketCode: string;
19
- fixtureId: Types.ObjectId;
21
+ fixtureId: Types.ObjectId | string;
20
22
  fixtureName: string;
21
23
  fixtureDate: Date;
22
24
  orderId: string;
23
- sectionId: Types.ObjectId;
25
+ sectionId: Types.ObjectId | string;
24
26
  row: number;
25
27
  seat: number;
26
28
  purchaseTime: Date;
27
29
  block: string;
28
30
  gate: string;
29
31
  area: string;
30
- flags?: { tag: FlagType; time: Date }[];
31
- readerName?: string;
32
+ flags?: Flag[];
32
33
  sessionId?: string;
33
34
  createdAt?: Date;
34
35
  updatedAt?: Date;
@@ -50,20 +51,19 @@ export type FlagType =
50
51
  | 'Mobile Barcode Pass';
51
52
 
52
53
  export type TicketTacsMeshType = {
53
- flags?: { tag: FlagType; time: Date }[];
54
+ flags?: Flag[];
54
55
  ticketCode: string;
55
- readerName: string;
56
56
  updatedAt: number;
57
57
  };
58
58
 
59
59
  export interface TicketType {
60
- _id?: Types.ObjectId;
60
+ _id?: Types.ObjectId | string;
61
61
  ticketCode: string;
62
62
  orderId: string;
63
- fixtureId: Types.ObjectId;
64
- sectionId: Types.ObjectId;
65
- userId: Types.ObjectId;
66
- seatId: Types.ObjectId;
63
+ fixtureId: Types.ObjectId | string;
64
+ sectionId: Types.ObjectId | string;
65
+ userId: Types.ObjectId | string;
66
+ seatId: Types.ObjectId | string;
67
67
  name: string;
68
68
  email: string;
69
69
  tel: string;
@@ -71,7 +71,7 @@ export interface TicketType {
71
71
  }
72
72
 
73
73
  export interface FixtureTacsType {
74
- _id?: Types.ObjectId;
74
+ _id?: Types.ObjectId | string;
75
75
  name: string;
76
76
  date: Date;
77
77
  active: boolean;