@ibiliaze/global-vars 1.50.0 → 1.53.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,26 @@
1
+ import { pages } from './ticketops/pages';
2
+ export interface Cart {
3
+ timer: number;
4
+ limit: number;
5
+ }
6
+ export interface User {
7
+ auth: boolean;
8
+ }
9
+ type App = 'TradeOps_a' | 'SabahFK_A' | 'SabahFK_B' | 'Sumgayit';
10
+ export interface Globals {
11
+ cart?: Cart;
12
+ user?: User;
13
+ checkout: {
14
+ epoint: boolean;
15
+ lockTimerMs: number;
16
+ };
17
+ tickets: {
18
+ accessControl: 'epra' | 'tacs';
19
+ pages: typeof pages;
20
+ };
21
+ }
22
+ export type GlobalVars = {
23
+ [A in App]: Globals;
24
+ };
25
+ declare const globals: GlobalVars;
26
+ export default globals;
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const pages_1 = require("./ticketops/pages");
4
+ const globals = {
5
+ TradeOps_a: {},
6
+ SabahFK_A: {
7
+ cart: { timer: 10 * 60 * 1000, limit: 100 },
8
+ user: { auth: true },
9
+ checkout: { epoint: true, lockTimerMs: 10 * 60 * 1000 },
10
+ tickets: { accessControl: 'epra', pages: pages_1.pages },
11
+ },
12
+ SabahFK_B: {
13
+ cart: { timer: 10 * 60 * 1000, limit: 100 },
14
+ user: { auth: true },
15
+ checkout: { epoint: false, lockTimerMs: 10 * 60 * 1000 },
16
+ tickets: { accessControl: 'epra', pages: pages_1.pages },
17
+ },
18
+ Sumgayit: {
19
+ cart: { timer: 10 * 60 * 1000, limit: 100 },
20
+ user: { auth: true },
21
+ checkout: { epoint: false, lockTimerMs: 10 * 60 * 1000 },
22
+ tickets: { accessControl: 'tacs', pages: pages_1.pages },
23
+ },
24
+ };
25
+ exports.default = globals;
package/dist/index.d.ts CHANGED
@@ -1,30 +1,2 @@
1
- import { pages } from './ticketops/pages';
2
- declare const globals: GlobalVars;
3
- export interface Cart {
4
- timer: number;
5
- limit: number;
6
- }
7
- export interface User {
8
- auth: boolean;
9
- }
10
- type App = 'TradeOps_a' | 'SabahFK_A' | 'SabahFK_B' | 'Sumgayit';
11
- export type GlobalVars = {
12
- [A in App]: Globals;
13
- };
14
- export interface Globals {
15
- cart?: Cart;
16
- user?: User;
17
- checkout: {
18
- epoint: boolean;
19
- lockTimerMs: number;
20
- };
21
- tickets: {
22
- accessControl: 'epra' | 'tacs';
23
- pages: typeof pages;
24
- };
25
- }
26
- export * as ticketopsTypes from './ticketops/inputsDefault';
27
- export * from './ticketops/pages';
28
- export * from './checkout';
29
- export * from './countries';
30
- export default globals;
1
+ export { countries } from './countries';
2
+ export type { Cart, User, Globals, GlobalVars } from './globals';
package/dist/index.js CHANGED
@@ -1,44 +1,5 @@
1
1
  "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
2
  Object.defineProperty(exports, "__esModule", { value: true });
17
- exports.ticketopsTypes = void 0;
18
- const pages_1 = require("./ticketops/pages");
19
- const globals = {
20
- TradeOps_a: {},
21
- SabahFK_A: {
22
- cart: { timer: 10 * 60 * 1000, limit: 100 },
23
- user: { auth: true },
24
- checkout: { epoint: true, lockTimerMs: 10 * 60 * 1000 },
25
- tickets: { accessControl: 'epra', pages: pages_1.pages },
26
- },
27
- SabahFK_B: {
28
- cart: { timer: 10 * 60 * 1000, limit: 100 },
29
- user: { auth: true },
30
- checkout: { epoint: false, lockTimerMs: 10 * 60 * 1000 },
31
- tickets: { accessControl: 'epra', pages: pages_1.pages },
32
- },
33
- Sumgayit: {
34
- cart: { timer: 10 * 60 * 1000, limit: 100 },
35
- user: { auth: true },
36
- checkout: { epoint: false, lockTimerMs: 10 * 60 * 1000 },
37
- tickets: { accessControl: 'tacs', pages: pages_1.pages },
38
- },
39
- };
40
- exports.ticketopsTypes = require("./ticketops/inputsDefault");
41
- __exportStar(require("./ticketops/pages"), exports);
42
- __exportStar(require("./checkout"), exports);
43
- __exportStar(require("./countries"), exports);
44
- exports.default = globals;
3
+ exports.countries = void 0;
4
+ var countries_1 = require("./countries");
5
+ Object.defineProperty(exports, "countries", { enumerable: true, get: function () { return countries_1.countries; } });
package/package.json CHANGED
@@ -1,13 +1,27 @@
1
1
  {
2
2
  "name": "@ibiliaze/global-vars",
3
- "version": "1.50.0",
4
- "description": "",
3
+ "version": "1.53.0",
5
4
  "main": "dist/index.js",
6
5
  "types": "dist/index.d.ts",
6
+ "exports": {
7
+ ".": {
8
+ "import": "./dist/index.js",
9
+ "require": "./dist/index.js",
10
+ "types": "./dist/index.d.ts"
11
+ },
12
+ "./globals": {
13
+ "import": "./dist/globals.js",
14
+ "require": "./dist/globals.js",
15
+ "types": "./dist/globals.d.ts"
16
+ }
17
+ },
18
+ "files": [
19
+ "dist/**/*"
20
+ ],
7
21
  "scripts": {
8
22
  "build": "tsc",
9
23
  "pub": "npm publish --access public",
10
- "git": "git add .; git commit -m 'changes'; git tag -a v1.50.0 -m 'v1.50.0'; git push origin v1.50.0; git push",
24
+ "git": "git add .; git commit -m 'changes'; git tag -a v1.53.0 -m 'v1.53.0'; git push origin v1.53.0; git push",
11
25
  "push": "npm run build; npm run git; npm run pub"
12
26
  },
13
27
  "author": "Ibi Hasanli",
package/src/checkout.ts DELETED
@@ -1,37 +0,0 @@
1
- export interface Checkout {
2
- stripe?: {};
3
- epoint?: Epoint;
4
- local?: Local;
5
- }
6
-
7
- export interface Epoint {
8
- orderId: string | number;
9
- amountAZN: string | number;
10
- description?: string;
11
- lang?: EpointLang;
12
- successUrl?: string;
13
- errorUrl?: string;
14
- }
15
-
16
- export interface Local {
17
- user: any;
18
- promoDiscount: number;
19
- promoCode: string;
20
- subscription: boolean;
21
- successPath?: string;
22
- cancelPath?: string;
23
- items: LocalItem[];
24
- }
25
-
26
- export interface LocalItem {
27
- _id: string;
28
- name: string;
29
- type: 'product' | 'occupance';
30
- quantity: number;
31
- price: number;
32
- subscriptionPeriod: '' | 'day' | 'week' | 'month' | 'year';
33
- reservedAt?: string;
34
- selectedAddonIds?: string[];
35
- }
36
-
37
- export type EpointLang = 'az' | 'en' | 'ru';
package/src/countries.ts DELETED
@@ -1,196 +0,0 @@
1
- export const countries = [
2
- 'Afghanistan',
3
- 'Albania',
4
- 'Algeria',
5
- 'Andorra',
6
- 'Angola',
7
- 'Antigua and Barbuda',
8
- 'Argentina',
9
- 'Armenia',
10
- 'Australia',
11
- 'Austria',
12
- 'Azerbaijan',
13
- 'Bahamas',
14
- 'Bahrain',
15
- 'Bangladesh',
16
- 'Barbados',
17
- 'Belarus',
18
- 'Belgium',
19
- 'Belize',
20
- 'Benin',
21
- 'Bhutan',
22
- 'Bolivia',
23
- 'Bosnia and Herzegovina',
24
- 'Botswana',
25
- 'Brazil',
26
- 'Brunei',
27
- 'Bulgaria',
28
- 'Burkina Faso',
29
- 'Burundi',
30
- 'Cabo Verde',
31
- 'Cambodia',
32
- 'Cameroon',
33
- 'Canada',
34
- 'Central African Republic',
35
- 'Chad',
36
- 'Chile',
37
- 'China',
38
- 'Colombia',
39
- 'Comoros',
40
- 'Congo (Congo-Brazzaville)',
41
- 'Costa Rica',
42
- 'Croatia',
43
- 'Cuba',
44
- 'Cyprus',
45
- 'Czechia',
46
- 'Democratic Republic of the Congo',
47
- 'Denmark',
48
- 'Djibouti',
49
- 'Dominica',
50
- 'Dominican Republic',
51
- 'Ecuador',
52
- 'Egypt',
53
- 'El Salvador',
54
- 'Equatorial Guinea',
55
- 'Eritrea',
56
- 'Estonia',
57
- 'Eswatini (fmr. Swaziland)',
58
- 'Ethiopia',
59
- 'Fiji',
60
- 'Finland',
61
- 'France',
62
- 'Gabon',
63
- 'Gambia',
64
- 'Georgia',
65
- 'Germany',
66
- 'Ghana',
67
- 'Greece',
68
- 'Grenada',
69
- 'Guatemala',
70
- 'Guinea',
71
- 'Guinea-Bissau',
72
- 'Guyana',
73
- 'Haiti',
74
- 'Honduras',
75
- 'Hungary',
76
- 'Iceland',
77
- 'India',
78
- 'Indonesia',
79
- 'Iran',
80
- 'Iraq',
81
- 'Ireland',
82
- 'Israel',
83
- 'Italy',
84
- 'Jamaica',
85
- 'Japan',
86
- 'Jordan',
87
- 'Kazakhstan',
88
- 'Kenya',
89
- 'Kiribati',
90
- 'Kuwait',
91
- 'Kyrgyzstan',
92
- 'Laos',
93
- 'Latvia',
94
- 'Lebanon',
95
- 'Lesotho',
96
- 'Liberia',
97
- 'Libya',
98
- 'Liechtenstein',
99
- 'Lithuania',
100
- 'Luxembourg',
101
- 'Madagascar',
102
- 'Malawi',
103
- 'Malaysia',
104
- 'Maldives',
105
- 'Mali',
106
- 'Malta',
107
- 'Marshall Islands',
108
- 'Mauritania',
109
- 'Mauritius',
110
- 'Mexico',
111
- 'Micronesia',
112
- 'Moldova',
113
- 'Monaco',
114
- 'Mongolia',
115
- 'Montenegro',
116
- 'Morocco',
117
- 'Mozambique',
118
- 'Myanmar (Burma)',
119
- 'Namibia',
120
- 'Nauru',
121
- 'Nepal',
122
- 'Netherlands',
123
- 'New Zealand',
124
- 'Nicaragua',
125
- 'Niger',
126
- 'Nigeria',
127
- 'North Korea',
128
- 'North Macedonia',
129
- 'Norway',
130
- 'Oman',
131
- 'Pakistan',
132
- 'Palau',
133
- 'Palestine State',
134
- 'Panama',
135
- 'Papua New Guinea',
136
- 'Paraguay',
137
- 'Peru',
138
- 'Philippines',
139
- 'Poland',
140
- 'Portugal',
141
- 'Qatar',
142
- 'Romania',
143
- 'Russia',
144
- 'Rwanda',
145
- 'Saint Kitts and Nevis',
146
- 'Saint Lucia',
147
- 'Saint Vincent and the Grenadines',
148
- 'Samoa',
149
- 'San Marino',
150
- 'Sao Tome and Principe',
151
- 'Saudi Arabia',
152
- 'Senegal',
153
- 'Serbia',
154
- 'Seychelles',
155
- 'Sierra Leone',
156
- 'Singapore',
157
- 'Slovakia',
158
- 'Slovenia',
159
- 'Solomon Islands',
160
- 'Somalia',
161
- 'South Africa',
162
- 'South Korea',
163
- 'South Sudan',
164
- 'Spain',
165
- 'Sri Lanka',
166
- 'Sudan',
167
- 'Suriname',
168
- 'Sweden',
169
- 'Switzerland',
170
- 'Syria',
171
- 'Tajikistan',
172
- 'Tanzania',
173
- 'Thailand',
174
- 'Timor-Leste',
175
- 'Togo',
176
- 'Tonga',
177
- 'Trinidad and Tobago',
178
- 'Tunisia',
179
- 'Turkey',
180
- 'Turkmenistan',
181
- 'Tuvalu',
182
- 'Uganda',
183
- 'Ukraine',
184
- 'United Arab Emirates',
185
- 'United Kingdom',
186
- 'United States of America',
187
- 'Uruguay',
188
- 'Uzbekistan',
189
- 'Vanuatu',
190
- 'Vatican City',
191
- 'Venezuela',
192
- 'Vietnam',
193
- 'Yemen',
194
- 'Zambia',
195
- 'Zimbabwe',
196
- ];
package/src/index.ts DELETED
@@ -1,54 +0,0 @@
1
- import { pages } from './ticketops/pages';
2
-
3
- const globals = {
4
- TradeOps_a: {},
5
- SabahFK_A: {
6
- cart: { timer: 10 * 60 * 1000, limit: 100 },
7
- user: { auth: true },
8
- checkout: { epoint: true, lockTimerMs: 10 * 60 * 1000 },
9
- tickets: { accessControl: 'epra', pages },
10
- },
11
- SabahFK_B: {
12
- cart: { timer: 10 * 60 * 1000, limit: 100 },
13
- user: { auth: true },
14
- checkout: { epoint: false, lockTimerMs: 10 * 60 * 1000 },
15
- tickets: { accessControl: 'epra', pages },
16
- },
17
- Sumgayit: {
18
- cart: { timer: 10 * 60 * 1000, limit: 100 },
19
- user: { auth: true },
20
- checkout: { epoint: false, lockTimerMs: 10 * 60 * 1000 },
21
- tickets: { accessControl: 'tacs', pages },
22
- },
23
- } as GlobalVars;
24
-
25
- export interface Cart {
26
- timer: number;
27
- limit: number;
28
- }
29
-
30
- export interface User {
31
- auth: boolean;
32
- }
33
-
34
- type App = 'TradeOps_a' | 'SabahFK_A' | 'SabahFK_B' | 'Sumgayit';
35
-
36
- export type GlobalVars = {
37
- [A in App]: Globals;
38
- };
39
-
40
- export interface Globals {
41
- cart?: Cart;
42
- user?: User;
43
- checkout: { epoint: boolean; lockTimerMs: number };
44
- tickets: {
45
- accessControl: 'epra' | 'tacs';
46
- pages: typeof pages;
47
- };
48
- }
49
-
50
- export * as ticketopsTypes from './ticketops/inputsDefault';
51
- export * from './ticketops/pages';
52
- export * from './checkout';
53
- export * from './countries';
54
- export default globals;
package/src/test.ts DELETED
@@ -1,4 +0,0 @@
1
- import globals from './index';
2
- import { BlogsTabId } from './index';
3
-
4
- globals.SabahFK_A.tickets.pages.blogs.Icon;
@@ -1,129 +0,0 @@
1
- import { Types } from 'mongoose';
2
-
3
- // Reader
4
- interface ReaderMeta {
5
- name: string;
6
- password: string;
7
- room?: string;
8
- gate?: string;
9
- area?: string;
10
- block?: string;
11
- sessionId?: string;
12
- online?: boolean;
13
- }
14
-
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;
24
-
25
- // Ticket TACS
26
- interface TicketTacsTypeMeta {
27
- ticketCode: string;
28
- fixtureName: string;
29
- orderId: string;
30
- row: number;
31
- seat: number;
32
- block: string;
33
- gate: string;
34
- area: string;
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;
44
- createdAt?: Date;
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;
64
- }
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 };
99
- export type FlagType =
100
- | 'Passed OK'
101
- | 'Wrong Gate'
102
- | 'Unknown Card'
103
- | 'Similary Check'
104
- | 'Invalid Ticket Format'
105
- | 'Wrong Ticket'
106
- | 'Duplicate Attempt [MESH]'
107
- | 'Duplicate Attempt [TACS]'
108
- | 'Not Completed'
109
- | 'Passing Simultaneaously'
110
- | 'Block or Alternative Gate Definition Error'
111
- | 'Mobile NFC Pass'
112
- | 'Mobile Barcode Pass';
113
-
114
- // Fixture
115
- interface FixtureTacsTypeMeta {
116
- name: string;
117
- active: boolean;
118
- minimumReaders?: number;
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;
@@ -1,284 +0,0 @@
1
- ///////////////////////////////////////////////////////////////////////////////////MODULES
2
- import {
3
- IconAd2,
4
- IconAdCircle,
5
- IconAi,
6
- IconAnalyze,
7
- IconArmchair2,
8
- IconBallBasketball,
9
- IconBallFootball,
10
- IconBeach,
11
- IconBrandOauth,
12
- IconBubble,
13
- IconBuilding,
14
- IconCalendar,
15
- IconCalendarEvent,
16
- IconCalendarExclamation,
17
- IconCancel,
18
- IconCaretLeftRight,
19
- IconCashBanknote,
20
- IconClock,
21
- IconCloudDataConnection,
22
- IconCloudUpload,
23
- IconContainer,
24
- IconDatabase,
25
- IconDiscount,
26
- IconFileDelta,
27
- IconGraph,
28
- IconImageInPicture,
29
- IconLink,
30
- IconLinkPlus,
31
- IconList,
32
- IconLiveView,
33
- IconLockCheck,
34
- IconMail,
35
- IconMenuOrder,
36
- IconMoneybagPlus,
37
- IconPageBreak,
38
- IconPaperclip,
39
- IconProgressX,
40
- IconReceipt2,
41
- IconSection,
42
- IconSettings,
43
- IconShoppingBag,
44
- IconTemplate,
45
- IconTextCaption,
46
- IconTicket,
47
- IconTransactionPound,
48
- IconTrophy,
49
- IconUserCheck,
50
- IconUserCircle,
51
- IconUserHexagon,
52
- IconView360,
53
- IconWallpaper,
54
- } from '@tabler/icons-react';
55
- //////////////////////////////////////////////////////////////////////////////////////////
56
-
57
- export const pages = {
58
- sections: {
59
- parentId: 'sections-section',
60
- path: '/admin/sections',
61
- name: 'Stadiums',
62
- Icon: IconSection,
63
- } as const,
64
- fixtures: {
65
- parentId: 'fixtures-section',
66
- path: '/admin/fixtures',
67
- name: 'Matches',
68
- Icon: IconBallFootball,
69
- subPages: [
70
- { name: 'Matches', path: '/matches', Icon: IconBallFootball },
71
- { name: 'Seats', path: '/seats', Icon: IconArmchair2 },
72
- { name: 'Match Types', path: '/types', Icon: IconTrophy },
73
- ],
74
- } as const,
75
- tickets: {
76
- parentId: 'tickets-section',
77
- path: '/admin/tickets',
78
- name: 'Tickets',
79
- Icon: IconTicket,
80
- } as const,
81
- categories: {
82
- parentId: 'categories-section',
83
- path: '/admin/categories',
84
- name: 'Categories',
85
- Icon: IconReceipt2,
86
- } as const,
87
- users: {
88
- parentId: 'users-section',
89
- path: '/admin/users',
90
- name: 'Users',
91
- Icon: IconUserCircle,
92
- } as const,
93
- staffs: {
94
- parentId: 'staffs-section',
95
- path: '/admin/staffs',
96
- name: 'Admins',
97
- Icon: IconUserHexagon,
98
- } as const,
99
- roles: {
100
- parentId: 'roles-section',
101
- path: '/admin/roles',
102
- name: 'Roles',
103
- Icon: IconLockCheck,
104
- } as const,
105
- blogs: {
106
- parentId: 'blogs-section',
107
- path: '/admin/blogs',
108
- name: 'Blogs',
109
- Icon: IconTextCaption,
110
- subPages: [
111
- { name: 'Blogs', path: '/blogs', Icon: IconTextCaption },
112
- { name: 'Groups', path: '/groups', Icon: IconContainer },
113
- ],
114
- } as const,
115
- products: {
116
- parentId: 'products-section',
117
- path: '/admin/products',
118
- name: 'E-Commerce',
119
- Icon: IconShoppingBag,
120
- subPages: [
121
- { name: 'Products', path: '/products', Icon: IconFileDelta },
122
- { name: 'Groups', path: '/groups', Icon: IconContainer },
123
- ],
124
- } as const,
125
- events: {
126
- parentId: 'events-section',
127
- path: '/admin/events',
128
- name: 'Calendar',
129
- Icon: IconCalendar,
130
- subPages: [
131
- { name: 'Table', path: '/table', Icon: IconCalendar },
132
- { name: 'Events', path: '/events', Icon: IconCalendarEvent },
133
- ],
134
- } as const,
135
- prospects: {
136
- parentId: 'prospects-section',
137
- path: '/admin/prospects',
138
- name: 'Prospects',
139
- Icon: IconUserCheck,
140
- subPages: [
141
- { name: 'Prospects', path: '/prospects', Icon: IconUserCheck },
142
- { name: 'Niches', path: '/niches', Icon: IconBallBasketball },
143
- { name: 'Groups', path: '/groups', Icon: IconContainer },
144
- ],
145
- } as const,
146
- campaigns: {
147
- parentId: 'campaigns-section',
148
- path: '/admin/campaigns',
149
- name: 'Campaigns',
150
- Icon: IconAdCircle,
151
- subPages: [
152
- { name: 'Campaigns', path: '/campaigns', Icon: IconAdCircle },
153
- { name: 'DM Templates', path: '/templates', Icon: IconTemplate },
154
- ],
155
- } as const,
156
- jobs: {
157
- parentId: 'jobs-section',
158
- path: '/admin/jobs',
159
- name: 'Scheduled Jobs',
160
- Icon: IconCalendarExclamation,
161
- } as const,
162
- sales: {
163
- parentId: 'sales-list-section',
164
- path: '/admin/sales',
165
- name: 'Sales',
166
- Icon: IconGraph,
167
- subPages: [
168
- { name: 'Insights', path: '/insights', Icon: IconGraph },
169
- { name: 'Transactions', path: '/transactions', Icon: IconTransactionPound },
170
- ],
171
- } as const,
172
- pipelines: {
173
- parentId: 'pipelines-section',
174
- path: '/admin/pipelines',
175
- name: 'Pipelines',
176
- Icon: IconMenuOrder,
177
- subPages: [
178
- { name: 'Pipelines', path: '/pipelines', Icon: IconMenuOrder },
179
- { name: 'Groups', path: '/groups', Icon: IconTemplate },
180
- ],
181
- } as const,
182
- pages: {
183
- parentId: 'landing-pages-section',
184
- path: '/admin/landing-pages',
185
- name: 'Pages',
186
- Icon: IconPageBreak,
187
- } as const,
188
- accounts: {
189
- parentId: 'accounts-section',
190
- path: '/admin/accounts',
191
- name: 'Accounts',
192
- Icon: IconBrandOauth,
193
- } as const,
194
- payments: {
195
- parentId: 'payments-section',
196
- path: '/admin/payments',
197
- name: 'Payments',
198
- Icon: IconMoneybagPlus,
199
- subPages: [
200
- { name: 'Bank details', path: '/bank-details', Icon: IconCashBanknote },
201
- { name: 'Discounts', path: '/discounts', Icon: IconDiscount },
202
- ],
203
- } as const,
204
- emails: {
205
- parentId: 'emails-section',
206
- path: '/admin/emails',
207
- name: 'Emails',
208
- Icon: IconMail,
209
- subPages: [
210
- { name: 'Send emails', path: '/send-email', Icon: IconMail },
211
- { name: 'Templates', path: '/templates', Icon: IconTemplate },
212
- { name: 'Attachments', path: '/attachments', Icon: IconPaperclip },
213
- ],
214
- } as const,
215
- public: {
216
- parentId: 'public-section',
217
- path: '/admin/public',
218
- name: 'Public',
219
- Icon: IconLiveView,
220
- subPages: [
221
- { name: 'Company', path: '/company', Icon: IconBuilding },
222
- { name: 'Banner', path: '/banner', Icon: IconAd2 },
223
- { name: 'Reviewers', path: '/reviewers', Icon: IconBubble },
224
- { name: 'Policies', path: '/policies', Icon: IconWallpaper },
225
- { name: 'Albums', path: '/albums', Icon: IconImageInPicture },
226
- { name: 'Comparisons', path: '/comparisons', Icon: IconCaretLeftRight },
227
- { name: 'Working hours', path: '/working-hours', Icon: IconClock },
228
- { name: 'Holidays', path: '/holidays', Icon: IconBeach },
229
- { name: 'Links', path: '/links', Icon: IconLink },
230
- ],
231
- } as const,
232
- settings: {
233
- parentId: 'settings-section',
234
- path: '/admin/settings',
235
- name: 'Settings',
236
- Icon: IconSettings,
237
- subPages: [
238
- { name: 'View', path: '/view', Icon: IconView360 },
239
- { name: 'Integrations', path: '/integrations', Icon: IconLinkPlus },
240
- { name: 'AI', path: '/ai', Icon: IconAi },
241
- { name: 'Backup', path: '/backup', Icon: IconCloudUpload },
242
- { name: 'Sessions', path: '/sessions', Icon: IconCloudDataConnection },
243
- { name: 'Logs', path: '/logs', Icon: IconList },
244
- { name: 'DLQ', path: '/dlq', Icon: IconCancel },
245
- { name: 'Quota Limit', path: '/quota-limit', Icon: IconProgressX },
246
- { name: 'Status', path: '/status', Icon: IconAnalyze },
247
- { name: 'Database', path: '/database', Icon: IconDatabase },
248
- ],
249
- } as const,
250
- } satisfies Sections;
251
-
252
- // Define the structure of subPages
253
- interface SupPage {
254
- path: string;
255
- name: string;
256
- Icon: any;
257
- }
258
-
259
- // Define structure for a page
260
- interface SectionBase {
261
- parentId: string;
262
- path: string;
263
- name: string;
264
- Icon: any;
265
- }
266
-
267
- interface SectionWithTabs extends SectionBase {
268
- subPages: readonly SupPage[];
269
- }
270
-
271
- // Type for the pages map
272
- interface Sections {
273
- [key: string]: SectionBase | SectionWithTabs;
274
- }
275
-
276
- export type SettingsTabId = (typeof pages.settings.subPages)[number]['path'];
277
- export type ProductsTabId = (typeof pages.products.subPages)[number]['path'];
278
- export type BlogsTabId = (typeof pages.blogs.subPages)[number]['path'];
279
- export type EventsTabId = (typeof pages.events.subPages)[number]['path'];
280
- export type ProspectsTabId = (typeof pages.prospects.subPages)[number]['path'];
281
- export type CampaignsTabId = (typeof pages.campaigns.subPages)[number]['path'];
282
- export type PipelinesTabId = (typeof pages.pipelines.subPages)[number]['path'];
283
- export type SalesTabId = (typeof pages.sales.subPages)[number]['path'];
284
- export type FixturesTabId = (typeof pages.fixtures.subPages)[number]['path'];
package/tsconfig.json DELETED
@@ -1,10 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- "outDir": "dist",
4
- "declaration": true,
5
- "strict": true,
6
- "module": "commonjs",
7
- "target": "es2024"
8
- },
9
- "include": ["src/**/*"]
10
- }