@ibiliaze/global-vars 1.264.0 → 1.265.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.
@@ -0,0 +1,181 @@
1
+ import type { ReaderBase } from '../inputsDefault';
2
+ export declare const readerRoleDefs: <TId, TDate>() => readonly [{
3
+ readonly method: "post";
4
+ readonly path: "/reader/admin";
5
+ readonly role: "postReaderAdmin";
6
+ readonly name: "Create reader as root";
7
+ readonly response_201: {
8
+ reader: ReaderBase<TId, TDate>;
9
+ message: string;
10
+ };
11
+ readonly response_400: {
12
+ message: string;
13
+ };
14
+ readonly response_401: {
15
+ message: string;
16
+ };
17
+ readonly response_500: {
18
+ message: string;
19
+ error: string;
20
+ };
21
+ }, {
22
+ readonly method: "post";
23
+ readonly path: "/reader/token";
24
+ readonly role: "postReaderToken";
25
+ readonly name: "Reader login (token)";
26
+ readonly response_200: {
27
+ reader: ReaderBase<TId, TDate>;
28
+ message: string;
29
+ };
30
+ readonly response_401: {
31
+ message: string;
32
+ };
33
+ readonly response_500: {
34
+ message: string;
35
+ error: string;
36
+ };
37
+ }, {
38
+ readonly method: "post";
39
+ readonly path: "/reader/logout";
40
+ readonly role: "postReaderLogout";
41
+ readonly name: "Reader logout";
42
+ readonly response_200: {
43
+ reader: ReaderBase<TId, TDate>;
44
+ message: string;
45
+ };
46
+ readonly response_500: {
47
+ message: string;
48
+ error: string;
49
+ };
50
+ }, {
51
+ readonly method: "post";
52
+ readonly path: "/reader/logout/all";
53
+ readonly role: "postReaderLogoutAll";
54
+ readonly name: "Reader logout all sessions";
55
+ readonly response_200: {
56
+ reader: ReaderBase<TId, TDate>;
57
+ message: string;
58
+ };
59
+ readonly response_500: {
60
+ message: string;
61
+ error: string;
62
+ };
63
+ }, {
64
+ readonly method: "post";
65
+ readonly path: "/reader/logout/:id";
66
+ readonly role: "postReaderLogoutById";
67
+ readonly name: "Reader logout by session id";
68
+ readonly response_200: {
69
+ reader: ReaderBase<TId, TDate>;
70
+ message: string;
71
+ };
72
+ readonly response_404: {
73
+ message: string;
74
+ };
75
+ readonly response_500: {
76
+ message: string;
77
+ error: string;
78
+ };
79
+ }, {
80
+ readonly method: "get";
81
+ readonly path: "/reader";
82
+ readonly role: "getReader";
83
+ readonly name: "Get current reader";
84
+ readonly response_200: {
85
+ reader: ReaderBase<TId, TDate>;
86
+ };
87
+ readonly response_500: {
88
+ message: string;
89
+ error: string;
90
+ };
91
+ }, {
92
+ readonly method: "get";
93
+ readonly path: "/reader/exists/:email";
94
+ readonly role: "getReaderExistsByEmail";
95
+ readonly name: "Check reader email exists";
96
+ readonly response_200: Record<string, never>;
97
+ readonly response_409: {
98
+ message: string;
99
+ };
100
+ readonly response_500: {
101
+ message: string;
102
+ error: string;
103
+ };
104
+ }, {
105
+ readonly method: "get";
106
+ readonly path: "/reader/all";
107
+ readonly role: "getReaderAll";
108
+ readonly name: "Get all reader";
109
+ readonly response_200: {
110
+ readers: ReaderBase<TId, TDate>[];
111
+ count?: number;
112
+ };
113
+ readonly response_500: {
114
+ message: string;
115
+ error: string;
116
+ };
117
+ }, {
118
+ readonly method: "put";
119
+ readonly path: "/reader/account";
120
+ readonly role: "putReaderAccount";
121
+ readonly name: "Update own reader account";
122
+ readonly response_200: {
123
+ reader: ReaderBase<TId, TDate>;
124
+ message: string;
125
+ };
126
+ readonly response_404: {
127
+ message: string;
128
+ };
129
+ readonly response_500: {
130
+ message: string;
131
+ error: string;
132
+ };
133
+ }, {
134
+ readonly method: "put";
135
+ readonly path: "/reader/:id";
136
+ readonly role: "putReaderById";
137
+ readonly name: "Update reader by ID";
138
+ readonly response_200: {
139
+ reader: ReaderBase<TId, TDate>;
140
+ message: string;
141
+ };
142
+ readonly response_404: {
143
+ message: string;
144
+ };
145
+ readonly response_500: {
146
+ message: string;
147
+ error: string;
148
+ };
149
+ }, {
150
+ readonly method: "put";
151
+ readonly path: "/reader/password";
152
+ readonly role: "putReaderPassword";
153
+ readonly name: "Update reader password";
154
+ readonly response_200: {
155
+ reader: ReaderBase<TId, TDate>;
156
+ message: string;
157
+ };
158
+ readonly response_404: {
159
+ message: string;
160
+ };
161
+ readonly response_500: {
162
+ message: string;
163
+ error: string;
164
+ };
165
+ }, {
166
+ readonly method: "delete";
167
+ readonly path: "/reader/:id";
168
+ readonly role: "deleteReaderById";
169
+ readonly name: "Delete reader by ID";
170
+ readonly response_200: {
171
+ reader: ReaderBase<TId, TDate>;
172
+ message: string;
173
+ };
174
+ readonly response_404: {
175
+ message: string;
176
+ };
177
+ readonly response_500: {
178
+ message: string;
179
+ error: string;
180
+ };
181
+ }];
@@ -0,0 +1,113 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.readerRoleDefs = void 0;
4
+ const readerRoleDefs = () => {
5
+ return [
6
+ {
7
+ method: 'post',
8
+ path: '/reader/admin',
9
+ role: 'postReaderAdmin',
10
+ name: 'Create reader as root',
11
+ response_201: {},
12
+ response_400: {},
13
+ response_401: {},
14
+ response_500: {},
15
+ },
16
+ {
17
+ method: 'post',
18
+ path: '/reader/token',
19
+ role: 'postReaderToken',
20
+ name: 'Reader login (token)',
21
+ response_200: {},
22
+ response_401: {},
23
+ response_500: {},
24
+ },
25
+ {
26
+ method: 'post',
27
+ path: '/reader/logout',
28
+ role: 'postReaderLogout',
29
+ name: 'Reader logout',
30
+ response_200: {},
31
+ response_500: {},
32
+ },
33
+ {
34
+ method: 'post',
35
+ path: '/reader/logout/all',
36
+ role: 'postReaderLogoutAll',
37
+ name: 'Reader logout all sessions',
38
+ response_200: {},
39
+ response_500: {},
40
+ },
41
+ {
42
+ method: 'post',
43
+ path: '/reader/logout/:id',
44
+ role: 'postReaderLogoutById',
45
+ name: 'Reader logout by session id',
46
+ response_200: {},
47
+ response_404: {},
48
+ response_500: {},
49
+ },
50
+ {
51
+ method: 'get',
52
+ path: '/reader',
53
+ role: 'getReader',
54
+ name: 'Get current reader',
55
+ response_200: {},
56
+ response_500: {},
57
+ },
58
+ {
59
+ method: 'get',
60
+ path: '/reader/exists/:email',
61
+ role: 'getReaderExistsByEmail',
62
+ name: 'Check reader email exists',
63
+ response_200: {},
64
+ response_409: {},
65
+ response_500: {},
66
+ },
67
+ {
68
+ method: 'get',
69
+ path: '/reader/all',
70
+ role: 'getReaderAll',
71
+ name: 'Get all reader',
72
+ response_200: {},
73
+ response_500: {},
74
+ },
75
+ {
76
+ method: 'put',
77
+ path: '/reader/account',
78
+ role: 'putReaderAccount',
79
+ name: 'Update own reader account',
80
+ response_200: {},
81
+ response_404: {},
82
+ response_500: {},
83
+ },
84
+ {
85
+ method: 'put',
86
+ path: '/reader/:id',
87
+ role: 'putReaderById',
88
+ name: 'Update reader by ID',
89
+ response_200: {},
90
+ response_404: {},
91
+ response_500: {},
92
+ },
93
+ {
94
+ method: 'put',
95
+ path: '/reader/password',
96
+ role: 'putReaderPassword',
97
+ name: 'Update reader password',
98
+ response_200: {},
99
+ response_404: {},
100
+ response_500: {},
101
+ },
102
+ {
103
+ method: 'delete',
104
+ path: '/reader/:id',
105
+ role: 'deleteReaderById',
106
+ name: 'Delete reader by ID',
107
+ response_200: {},
108
+ response_404: {},
109
+ response_500: {},
110
+ },
111
+ ];
112
+ };
113
+ exports.readerRoleDefs = readerRoleDefs;
@@ -1,5 +1,70 @@
1
1
  import type { TicketBase, EventBase, SeasonBase } from '../inputsDefault';
2
2
  export declare const ticketRoleDefs: <TId, TDate>() => readonly [{
3
+ readonly method: "post";
4
+ readonly path: "/ticket";
5
+ readonly role: "postTicket";
6
+ readonly name: "Create tickets";
7
+ readonly response_201: {
8
+ tickets: TicketBase<TId, TDate>[];
9
+ count: number;
10
+ message: string;
11
+ };
12
+ readonly response_207: {
13
+ message: string;
14
+ error: string;
15
+ };
16
+ readonly response_400: {
17
+ message: string;
18
+ };
19
+ readonly response_500: {
20
+ message: string;
21
+ error: string;
22
+ };
23
+ }, {
24
+ readonly method: "get";
25
+ readonly path: "/ticket/verify";
26
+ readonly role: "getTicketVerify";
27
+ readonly name: "Verify ticket";
28
+ readonly response_200: {
29
+ ticket: TicketBase<TId, TDate>;
30
+ };
31
+ readonly response_400: {
32
+ message: string;
33
+ };
34
+ readonly response_404: {
35
+ message: string;
36
+ };
37
+ readonly response_500: {
38
+ message: string;
39
+ error: string;
40
+ };
41
+ }, {
42
+ readonly method: "get";
43
+ readonly path: "/ticket";
44
+ readonly role: "getTickets";
45
+ readonly name: "List tickets";
46
+ readonly response_200: {
47
+ tickets: TicketBase<TId, TDate>[];
48
+ count: number;
49
+ };
50
+ readonly response_500: {
51
+ message: string;
52
+ error: string;
53
+ };
54
+ }, {
55
+ readonly method: "get";
56
+ readonly path: "/ticket/:id";
57
+ readonly role: "getTicketById";
58
+ readonly name: "Get ticket by id";
59
+ readonly response_200: {
60
+ ticket: TicketBase<TId, TDate>;
61
+ message: string;
62
+ };
63
+ readonly response_404: {
64
+ message: string;
65
+ error: string;
66
+ };
67
+ }, {
3
68
  readonly method: "get";
4
69
  readonly path: "/ticket/customer";
5
70
  readonly role: "getTicketsCustomer";
@@ -109,4 +174,21 @@ export declare const ticketRoleDefs: <TId, TDate>() => readonly [{
109
174
  message: string;
110
175
  error: string;
111
176
  };
177
+ }, {
178
+ readonly method: "delete";
179
+ readonly path: "/ticket/:id";
180
+ readonly role: "deleteTicketById";
181
+ readonly name: "Delete ticket";
182
+ readonly response_200: {
183
+ ticket: TicketBase<TId, TDate>;
184
+ message: string;
185
+ };
186
+ readonly response_404: {
187
+ ticket?: TicketBase<TId, TDate>;
188
+ message: string;
189
+ };
190
+ readonly response_500: {
191
+ message: string;
192
+ error: string;
193
+ };
112
194
  }];
@@ -3,6 +3,46 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ticketRoleDefs = void 0;
4
4
  const ticketRoleDefs = () => {
5
5
  return [
6
+ // POST /api/ticket
7
+ {
8
+ method: 'post',
9
+ path: '/ticket',
10
+ role: 'postTicket',
11
+ name: 'Create tickets',
12
+ response_201: {},
13
+ response_207: {},
14
+ response_400: {},
15
+ response_500: {},
16
+ },
17
+ // GET /api/ticket/verify
18
+ {
19
+ method: 'get',
20
+ path: '/ticket/verify',
21
+ role: 'getTicketVerify',
22
+ name: 'Verify ticket',
23
+ response_200: {},
24
+ response_400: {},
25
+ response_404: {},
26
+ response_500: {},
27
+ },
28
+ // GET /api/ticket
29
+ {
30
+ method: 'get',
31
+ path: '/ticket',
32
+ role: 'getTickets',
33
+ name: 'List tickets',
34
+ response_200: {},
35
+ response_500: {},
36
+ },
37
+ // GET /api/ticket/:id
38
+ {
39
+ method: 'get',
40
+ path: '/ticket/:id',
41
+ role: 'getTicketById',
42
+ name: 'Get ticket by id',
43
+ response_200: {},
44
+ response_404: {},
45
+ },
6
46
  {
7
47
  method: 'get',
8
48
  path: '/ticket/customer',
@@ -69,6 +109,16 @@ const ticketRoleDefs = () => {
69
109
  response_200: {},
70
110
  response_500: {},
71
111
  },
112
+ // DELETE /api/ticket/:id
113
+ {
114
+ method: 'delete',
115
+ path: '/ticket/:id',
116
+ role: 'deleteTicketById',
117
+ name: 'Delete ticket',
118
+ response_200: {},
119
+ response_404: {},
120
+ response_500: {},
121
+ },
72
122
  ];
73
123
  };
74
124
  exports.ticketRoleDefs = ticketRoleDefs;
@@ -1,11 +1,12 @@
1
1
  type MethodKey = 'get' | 'post' | 'put' | 'delete';
2
- export type ApiRoute<R200 = unknown, R201 = unknown, R302 = unknown, R400 = unknown, R401 = unknown, R403 = unknown, R404 = unknown, R409 = unknown, R500 = unknown> = {
2
+ export type ApiRoute<R200 = unknown, R201 = unknown, R207 = unknown, R302 = unknown, R400 = unknown, R401 = unknown, R403 = unknown, R404 = unknown, R409 = unknown, R500 = unknown> = {
3
3
  method: MethodKey;
4
4
  path: string;
5
5
  role: string;
6
6
  name: string;
7
7
  response_200?: R200;
8
8
  response_201?: R201;
9
+ response_207?: R207;
9
10
  response_302?: R302;
10
11
  response_400?: R400;
11
12
  response_401?: R401;
@@ -2097,6 +2098,71 @@ export declare const apis: <TId, TDate>() => readonly [{
2097
2098
  message: string;
2098
2099
  error: string;
2099
2100
  };
2101
+ }, {
2102
+ readonly method: "post";
2103
+ readonly path: "/ticket";
2104
+ readonly role: "postTicket";
2105
+ readonly name: "Create tickets";
2106
+ readonly response_201: {
2107
+ tickets: import("./inputsDefault").TicketBase<TId_23, TDate_23>[];
2108
+ count: number;
2109
+ message: string;
2110
+ };
2111
+ readonly response_207: {
2112
+ message: string;
2113
+ error: string;
2114
+ };
2115
+ readonly response_400: {
2116
+ message: string;
2117
+ };
2118
+ readonly response_500: {
2119
+ message: string;
2120
+ error: string;
2121
+ };
2122
+ }, {
2123
+ readonly method: "get";
2124
+ readonly path: "/ticket/verify";
2125
+ readonly role: "getTicketVerify";
2126
+ readonly name: "Verify ticket";
2127
+ readonly response_200: {
2128
+ ticket: import("./inputsDefault").TicketBase<TId_23, TDate_23>;
2129
+ };
2130
+ readonly response_400: {
2131
+ message: string;
2132
+ };
2133
+ readonly response_404: {
2134
+ message: string;
2135
+ };
2136
+ readonly response_500: {
2137
+ message: string;
2138
+ error: string;
2139
+ };
2140
+ }, {
2141
+ readonly method: "get";
2142
+ readonly path: "/ticket";
2143
+ readonly role: "getTickets";
2144
+ readonly name: "List tickets";
2145
+ readonly response_200: {
2146
+ tickets: import("./inputsDefault").TicketBase<TId_23, TDate_23>[];
2147
+ count: number;
2148
+ };
2149
+ readonly response_500: {
2150
+ message: string;
2151
+ error: string;
2152
+ };
2153
+ }, {
2154
+ readonly method: "get";
2155
+ readonly path: "/ticket/:id";
2156
+ readonly role: "getTicketById";
2157
+ readonly name: "Get ticket by id";
2158
+ readonly response_200: {
2159
+ ticket: import("./inputsDefault").TicketBase<TId_23, TDate_23>;
2160
+ message: string;
2161
+ };
2162
+ readonly response_404: {
2163
+ message: string;
2164
+ error: string;
2165
+ };
2100
2166
  }, {
2101
2167
  readonly method: "get";
2102
2168
  readonly path: "/ticket/customer";
@@ -2207,6 +2273,23 @@ export declare const apis: <TId, TDate>() => readonly [{
2207
2273
  message: string;
2208
2274
  error: string;
2209
2275
  };
2276
+ }, {
2277
+ readonly method: "delete";
2278
+ readonly path: "/ticket/:id";
2279
+ readonly role: "deleteTicketById";
2280
+ readonly name: "Delete ticket";
2281
+ readonly response_200: {
2282
+ ticket: import("./inputsDefault").TicketBase<TId_23, TDate_23>;
2283
+ message: string;
2284
+ };
2285
+ readonly response_404: {
2286
+ ticket?: import("./inputsDefault").TicketBase<TId_23, TDate_23>;
2287
+ message: string;
2288
+ };
2289
+ readonly response_500: {
2290
+ message: string;
2291
+ error: string;
2292
+ };
2210
2293
  }, {
2211
2294
  readonly method: "post";
2212
2295
  readonly path: "/user/admin";
@@ -2569,6 +2652,185 @@ export declare const apis: <TId, TDate>() => readonly [{
2569
2652
  message: string;
2570
2653
  error: string;
2571
2654
  };
2655
+ }, {
2656
+ readonly method: "post";
2657
+ readonly path: "/reader/admin";
2658
+ readonly role: "postReaderAdmin";
2659
+ readonly name: "Create reader as root";
2660
+ readonly response_201: {
2661
+ reader: import("./inputsDefault").ReaderBase<TId_26, TDate_26>;
2662
+ message: string;
2663
+ };
2664
+ readonly response_400: {
2665
+ message: string;
2666
+ };
2667
+ readonly response_401: {
2668
+ message: string;
2669
+ };
2670
+ readonly response_500: {
2671
+ message: string;
2672
+ error: string;
2673
+ };
2674
+ }, {
2675
+ readonly method: "post";
2676
+ readonly path: "/reader/token";
2677
+ readonly role: "postReaderToken";
2678
+ readonly name: "Reader login (token)";
2679
+ readonly response_200: {
2680
+ reader: import("./inputsDefault").ReaderBase<TId_26, TDate_26>;
2681
+ message: string;
2682
+ };
2683
+ readonly response_401: {
2684
+ message: string;
2685
+ };
2686
+ readonly response_500: {
2687
+ message: string;
2688
+ error: string;
2689
+ };
2690
+ }, {
2691
+ readonly method: "post";
2692
+ readonly path: "/reader/logout";
2693
+ readonly role: "postReaderLogout";
2694
+ readonly name: "Reader logout";
2695
+ readonly response_200: {
2696
+ reader: import("./inputsDefault").ReaderBase<TId_26, TDate_26>;
2697
+ message: string;
2698
+ };
2699
+ readonly response_500: {
2700
+ message: string;
2701
+ error: string;
2702
+ };
2703
+ }, {
2704
+ readonly method: "post";
2705
+ readonly path: "/reader/logout/all";
2706
+ readonly role: "postReaderLogoutAll";
2707
+ readonly name: "Reader logout all sessions";
2708
+ readonly response_200: {
2709
+ reader: import("./inputsDefault").ReaderBase<TId_26, TDate_26>;
2710
+ message: string;
2711
+ };
2712
+ readonly response_500: {
2713
+ message: string;
2714
+ error: string;
2715
+ };
2716
+ }, {
2717
+ readonly method: "post";
2718
+ readonly path: "/reader/logout/:id";
2719
+ readonly role: "postReaderLogoutById";
2720
+ readonly name: "Reader logout by session id";
2721
+ readonly response_200: {
2722
+ reader: import("./inputsDefault").ReaderBase<TId_26, TDate_26>;
2723
+ message: string;
2724
+ };
2725
+ readonly response_404: {
2726
+ message: string;
2727
+ };
2728
+ readonly response_500: {
2729
+ message: string;
2730
+ error: string;
2731
+ };
2732
+ }, {
2733
+ readonly method: "get";
2734
+ readonly path: "/reader";
2735
+ readonly role: "getReader";
2736
+ readonly name: "Get current reader";
2737
+ readonly response_200: {
2738
+ reader: import("./inputsDefault").ReaderBase<TId_26, TDate_26>;
2739
+ };
2740
+ readonly response_500: {
2741
+ message: string;
2742
+ error: string;
2743
+ };
2744
+ }, {
2745
+ readonly method: "get";
2746
+ readonly path: "/reader/exists/:email";
2747
+ readonly role: "getReaderExistsByEmail";
2748
+ readonly name: "Check reader email exists";
2749
+ readonly response_200: Record<string, never>;
2750
+ readonly response_409: {
2751
+ message: string;
2752
+ };
2753
+ readonly response_500: {
2754
+ message: string;
2755
+ error: string;
2756
+ };
2757
+ }, {
2758
+ readonly method: "get";
2759
+ readonly path: "/reader/all";
2760
+ readonly role: "getReaderAll";
2761
+ readonly name: "Get all reader";
2762
+ readonly response_200: {
2763
+ readers: import("./inputsDefault").ReaderBase<TId_26, TDate_26>[];
2764
+ count?: number;
2765
+ };
2766
+ readonly response_500: {
2767
+ message: string;
2768
+ error: string;
2769
+ };
2770
+ }, {
2771
+ readonly method: "put";
2772
+ readonly path: "/reader/account";
2773
+ readonly role: "putReaderAccount";
2774
+ readonly name: "Update own reader account";
2775
+ readonly response_200: {
2776
+ reader: import("./inputsDefault").ReaderBase<TId_26, TDate_26>;
2777
+ message: string;
2778
+ };
2779
+ readonly response_404: {
2780
+ message: string;
2781
+ };
2782
+ readonly response_500: {
2783
+ message: string;
2784
+ error: string;
2785
+ };
2786
+ }, {
2787
+ readonly method: "put";
2788
+ readonly path: "/reader/:id";
2789
+ readonly role: "putReaderById";
2790
+ readonly name: "Update reader by ID";
2791
+ readonly response_200: {
2792
+ reader: import("./inputsDefault").ReaderBase<TId_26, TDate_26>;
2793
+ message: string;
2794
+ };
2795
+ readonly response_404: {
2796
+ message: string;
2797
+ };
2798
+ readonly response_500: {
2799
+ message: string;
2800
+ error: string;
2801
+ };
2802
+ }, {
2803
+ readonly method: "put";
2804
+ readonly path: "/reader/password";
2805
+ readonly role: "putReaderPassword";
2806
+ readonly name: "Update reader password";
2807
+ readonly response_200: {
2808
+ reader: import("./inputsDefault").ReaderBase<TId_26, TDate_26>;
2809
+ message: string;
2810
+ };
2811
+ readonly response_404: {
2812
+ message: string;
2813
+ };
2814
+ readonly response_500: {
2815
+ message: string;
2816
+ error: string;
2817
+ };
2818
+ }, {
2819
+ readonly method: "delete";
2820
+ readonly path: "/reader/:id";
2821
+ readonly role: "deleteReaderById";
2822
+ readonly name: "Delete reader by ID";
2823
+ readonly response_200: {
2824
+ reader: import("./inputsDefault").ReaderBase<TId_26, TDate_26>;
2825
+ message: string;
2826
+ };
2827
+ readonly response_404: {
2828
+ message: string;
2829
+ };
2830
+ readonly response_500: {
2831
+ message: string;
2832
+ error: string;
2833
+ };
2572
2834
  }, {
2573
2835
  readonly method: "post";
2574
2836
  readonly path: "/checkout/create-session";
@@ -4735,6 +4997,71 @@ declare const allApis: readonly [{
4735
4997
  message: string;
4736
4998
  error: string;
4737
4999
  };
5000
+ }, {
5001
+ readonly method: "post";
5002
+ readonly path: "/ticket";
5003
+ readonly role: "postTicket";
5004
+ readonly name: "Create tickets";
5005
+ readonly response_201: {
5006
+ tickets: import("./inputsDefault").TicketBase<TId_22, TDate_22>[];
5007
+ count: number;
5008
+ message: string;
5009
+ };
5010
+ readonly response_207: {
5011
+ message: string;
5012
+ error: string;
5013
+ };
5014
+ readonly response_400: {
5015
+ message: string;
5016
+ };
5017
+ readonly response_500: {
5018
+ message: string;
5019
+ error: string;
5020
+ };
5021
+ }, {
5022
+ readonly method: "get";
5023
+ readonly path: "/ticket/verify";
5024
+ readonly role: "getTicketVerify";
5025
+ readonly name: "Verify ticket";
5026
+ readonly response_200: {
5027
+ ticket: import("./inputsDefault").TicketBase<TId_22, TDate_22>;
5028
+ };
5029
+ readonly response_400: {
5030
+ message: string;
5031
+ };
5032
+ readonly response_404: {
5033
+ message: string;
5034
+ };
5035
+ readonly response_500: {
5036
+ message: string;
5037
+ error: string;
5038
+ };
5039
+ }, {
5040
+ readonly method: "get";
5041
+ readonly path: "/ticket";
5042
+ readonly role: "getTickets";
5043
+ readonly name: "List tickets";
5044
+ readonly response_200: {
5045
+ tickets: import("./inputsDefault").TicketBase<TId_22, TDate_22>[];
5046
+ count: number;
5047
+ };
5048
+ readonly response_500: {
5049
+ message: string;
5050
+ error: string;
5051
+ };
5052
+ }, {
5053
+ readonly method: "get";
5054
+ readonly path: "/ticket/:id";
5055
+ readonly role: "getTicketById";
5056
+ readonly name: "Get ticket by id";
5057
+ readonly response_200: {
5058
+ ticket: import("./inputsDefault").TicketBase<TId_22, TDate_22>;
5059
+ message: string;
5060
+ };
5061
+ readonly response_404: {
5062
+ message: string;
5063
+ error: string;
5064
+ };
4738
5065
  }, {
4739
5066
  readonly method: "get";
4740
5067
  readonly path: "/ticket/customer";
@@ -4845,6 +5172,23 @@ declare const allApis: readonly [{
4845
5172
  message: string;
4846
5173
  error: string;
4847
5174
  };
5175
+ }, {
5176
+ readonly method: "delete";
5177
+ readonly path: "/ticket/:id";
5178
+ readonly role: "deleteTicketById";
5179
+ readonly name: "Delete ticket";
5180
+ readonly response_200: {
5181
+ ticket: import("./inputsDefault").TicketBase<TId_22, TDate_22>;
5182
+ message: string;
5183
+ };
5184
+ readonly response_404: {
5185
+ ticket?: import("./inputsDefault").TicketBase<TId_22, TDate_22>;
5186
+ message: string;
5187
+ };
5188
+ readonly response_500: {
5189
+ message: string;
5190
+ error: string;
5191
+ };
4848
5192
  }, {
4849
5193
  readonly method: "post";
4850
5194
  readonly path: "/user/admin";
@@ -5207,6 +5551,185 @@ declare const allApis: readonly [{
5207
5551
  message: string;
5208
5552
  error: string;
5209
5553
  };
5554
+ }, {
5555
+ readonly method: "post";
5556
+ readonly path: "/reader/admin";
5557
+ readonly role: "postReaderAdmin";
5558
+ readonly name: "Create reader as root";
5559
+ readonly response_201: {
5560
+ reader: import("./inputsDefault").ReaderBase<TId_25, TDate_25>;
5561
+ message: string;
5562
+ };
5563
+ readonly response_400: {
5564
+ message: string;
5565
+ };
5566
+ readonly response_401: {
5567
+ message: string;
5568
+ };
5569
+ readonly response_500: {
5570
+ message: string;
5571
+ error: string;
5572
+ };
5573
+ }, {
5574
+ readonly method: "post";
5575
+ readonly path: "/reader/token";
5576
+ readonly role: "postReaderToken";
5577
+ readonly name: "Reader login (token)";
5578
+ readonly response_200: {
5579
+ reader: import("./inputsDefault").ReaderBase<TId_25, TDate_25>;
5580
+ message: string;
5581
+ };
5582
+ readonly response_401: {
5583
+ message: string;
5584
+ };
5585
+ readonly response_500: {
5586
+ message: string;
5587
+ error: string;
5588
+ };
5589
+ }, {
5590
+ readonly method: "post";
5591
+ readonly path: "/reader/logout";
5592
+ readonly role: "postReaderLogout";
5593
+ readonly name: "Reader logout";
5594
+ readonly response_200: {
5595
+ reader: import("./inputsDefault").ReaderBase<TId_25, TDate_25>;
5596
+ message: string;
5597
+ };
5598
+ readonly response_500: {
5599
+ message: string;
5600
+ error: string;
5601
+ };
5602
+ }, {
5603
+ readonly method: "post";
5604
+ readonly path: "/reader/logout/all";
5605
+ readonly role: "postReaderLogoutAll";
5606
+ readonly name: "Reader logout all sessions";
5607
+ readonly response_200: {
5608
+ reader: import("./inputsDefault").ReaderBase<TId_25, TDate_25>;
5609
+ message: string;
5610
+ };
5611
+ readonly response_500: {
5612
+ message: string;
5613
+ error: string;
5614
+ };
5615
+ }, {
5616
+ readonly method: "post";
5617
+ readonly path: "/reader/logout/:id";
5618
+ readonly role: "postReaderLogoutById";
5619
+ readonly name: "Reader logout by session id";
5620
+ readonly response_200: {
5621
+ reader: import("./inputsDefault").ReaderBase<TId_25, TDate_25>;
5622
+ message: string;
5623
+ };
5624
+ readonly response_404: {
5625
+ message: string;
5626
+ };
5627
+ readonly response_500: {
5628
+ message: string;
5629
+ error: string;
5630
+ };
5631
+ }, {
5632
+ readonly method: "get";
5633
+ readonly path: "/reader";
5634
+ readonly role: "getReader";
5635
+ readonly name: "Get current reader";
5636
+ readonly response_200: {
5637
+ reader: import("./inputsDefault").ReaderBase<TId_25, TDate_25>;
5638
+ };
5639
+ readonly response_500: {
5640
+ message: string;
5641
+ error: string;
5642
+ };
5643
+ }, {
5644
+ readonly method: "get";
5645
+ readonly path: "/reader/exists/:email";
5646
+ readonly role: "getReaderExistsByEmail";
5647
+ readonly name: "Check reader email exists";
5648
+ readonly response_200: Record<string, never>;
5649
+ readonly response_409: {
5650
+ message: string;
5651
+ };
5652
+ readonly response_500: {
5653
+ message: string;
5654
+ error: string;
5655
+ };
5656
+ }, {
5657
+ readonly method: "get";
5658
+ readonly path: "/reader/all";
5659
+ readonly role: "getReaderAll";
5660
+ readonly name: "Get all reader";
5661
+ readonly response_200: {
5662
+ readers: import("./inputsDefault").ReaderBase<TId_25, TDate_25>[];
5663
+ count?: number;
5664
+ };
5665
+ readonly response_500: {
5666
+ message: string;
5667
+ error: string;
5668
+ };
5669
+ }, {
5670
+ readonly method: "put";
5671
+ readonly path: "/reader/account";
5672
+ readonly role: "putReaderAccount";
5673
+ readonly name: "Update own reader account";
5674
+ readonly response_200: {
5675
+ reader: import("./inputsDefault").ReaderBase<TId_25, TDate_25>;
5676
+ message: string;
5677
+ };
5678
+ readonly response_404: {
5679
+ message: string;
5680
+ };
5681
+ readonly response_500: {
5682
+ message: string;
5683
+ error: string;
5684
+ };
5685
+ }, {
5686
+ readonly method: "put";
5687
+ readonly path: "/reader/:id";
5688
+ readonly role: "putReaderById";
5689
+ readonly name: "Update reader by ID";
5690
+ readonly response_200: {
5691
+ reader: import("./inputsDefault").ReaderBase<TId_25, TDate_25>;
5692
+ message: string;
5693
+ };
5694
+ readonly response_404: {
5695
+ message: string;
5696
+ };
5697
+ readonly response_500: {
5698
+ message: string;
5699
+ error: string;
5700
+ };
5701
+ }, {
5702
+ readonly method: "put";
5703
+ readonly path: "/reader/password";
5704
+ readonly role: "putReaderPassword";
5705
+ readonly name: "Update reader password";
5706
+ readonly response_200: {
5707
+ reader: import("./inputsDefault").ReaderBase<TId_25, TDate_25>;
5708
+ message: string;
5709
+ };
5710
+ readonly response_404: {
5711
+ message: string;
5712
+ };
5713
+ readonly response_500: {
5714
+ message: string;
5715
+ error: string;
5716
+ };
5717
+ }, {
5718
+ readonly method: "delete";
5719
+ readonly path: "/reader/:id";
5720
+ readonly role: "deleteReaderById";
5721
+ readonly name: "Delete reader by ID";
5722
+ readonly response_200: {
5723
+ reader: import("./inputsDefault").ReaderBase<TId_25, TDate_25>;
5724
+ message: string;
5725
+ };
5726
+ readonly response_404: {
5727
+ message: string;
5728
+ };
5729
+ readonly response_500: {
5730
+ message: string;
5731
+ error: string;
5732
+ };
5210
5733
  }, {
5211
5734
  readonly method: "post";
5212
5735
  readonly path: "/checkout/create-session";
@@ -31,6 +31,7 @@ const google_1 = require("./roles/google");
31
31
  const schema_1 = require("./roles/schema");
32
32
  const role_1 = require("./roles/role");
33
33
  const items_1 = require("./roles/items");
34
+ const reader_1 = require("./roles/reader");
34
35
  /**
35
36
  * Generic route factory.
36
37
  *
@@ -68,6 +69,7 @@ const apis = () => [
68
69
  ...(0, ticket_1.ticketRoleDefs)(),
69
70
  ...(0, user_1.userRoleDefs)(),
70
71
  ...(0, customer_1.customerRoleDefs)(),
72
+ ...(0, reader_1.readerRoleDefs)(),
71
73
  // Util routes
72
74
  ...checkout_1.checkoutRoleDefs,
73
75
  ...file_1.fileRoleDefs,
@@ -107,6 +109,7 @@ const allApis = [
107
109
  ...(0, ticket_1.ticketRoleDefs)(),
108
110
  ...(0, user_1.userRoleDefs)(),
109
111
  ...(0, customer_1.customerRoleDefs)(),
112
+ ...(0, reader_1.readerRoleDefs)(),
110
113
  ...checkout_1.checkoutRoleDefs,
111
114
  ...file_1.fileRoleDefs,
112
115
  ...google_1.googleRoleDefs,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ibiliaze/global-vars",
3
- "version": "1.264.0",
3
+ "version": "1.265.0",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "sideEffects": false,
@@ -22,7 +22,7 @@
22
22
  "scripts": {
23
23
  "build": "tsc",
24
24
  "pub": "npm publish --access public",
25
- "git": "git add .; git commit -m 'changes'; git tag -a v1.264.0 -m 'v1.264.0'; git push origin v1.264.0; git push",
25
+ "git": "git add .; git commit -m 'changes'; git tag -a v1.265.0 -m 'v1.265.0'; git push origin v1.265.0; git push",
26
26
  "push": "npm run build; npm run git; npm run pub"
27
27
  },
28
28
  "author": "Ibi Hasanli",