@battle-racing/br-common-lib 3.5.0 → 3.8.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.
- package/REFACTOR_README.md +185 -0
- package/br-common-lib.code-workspace +19 -0
- package/dist/constants/index.d.ts +2 -0
- package/dist/constants/index.js +2 -0
- package/dist/constants/payment-provider.d.ts +5 -0
- package/dist/constants/payment-provider.js +8 -0
- package/dist/constants/payment-status.d.ts +7 -0
- package/dist/constants/payment-status.js +10 -0
- package/dist/constants/user-role.d.ts +1 -0
- package/dist/constants/user-role.js +1 -0
- package/dist/schemas/team.schema.d.ts +7 -0
- package/dist/schemas/team.schema.js +9 -0
- package/dist/types/gameTrack/GameTrackKartConfig.d.ts +9 -0
- package/dist/types/gameTrack/index.d.ts +1 -0
- package/dist/types/gameTrack/index.js +1 -0
- package/dist/types/index.d.ts +3 -0
- package/dist/types/index.js +3 -0
- package/dist/types/pagination/Pagination.d.ts +3 -0
- package/dist/types/pagination/index.d.ts +2 -0
- package/dist/types/pagination/index.js +18 -0
- package/dist/types/pagination/pagination.schema.d.ts +14 -0
- package/dist/types/pagination/pagination.schema.js +16 -0
- package/dist/types/racingTeam/RacingTeam.d.ts +6 -0
- package/dist/types/racingTeam/RacingTeam.schema.d.ts +44 -0
- package/dist/types/racingTeam/RacingTeam.schema.js +27 -0
- package/dist/types/racingTeam/RacingTeamMembership.d.ts +6 -0
- package/dist/types/racingTeam/RacingTeamMembership.schema.d.ts +31 -0
- package/dist/types/racingTeam/RacingTeamMembership.schema.js +27 -0
- package/dist/types/racingTeam/index.d.ts +4 -0
- package/dist/types/racingTeam/index.js +20 -0
- package/dist/types/socket/serverToClient/SocketKartServerToClientEventsParams.d.ts +3 -5
- package/dist/types/ticketing/GameTicket.d.ts +3 -0
- package/dist/types/ticketing/GameTicket.js +2 -0
- package/dist/types/ticketing/GameTurn.d.ts +4 -0
- package/dist/types/ticketing/GameTurn.js +2 -0
- package/dist/types/ticketing/GameTurn.schema.d.ts +92 -0
- package/dist/types/ticketing/GameTurn.schema.js +46 -0
- package/dist/types/ticketing/GameTurnTask.d.ts +3 -0
- package/dist/types/ticketing/GameTurnTask.js +2 -0
- package/dist/types/ticketing/GameTurnTask.schema.d.ts +34 -0
- package/dist/types/ticketing/GameTurnTask.schema.js +30 -0
- package/dist/types/ticketing/PaymentProvider.d.ts +34 -0
- package/dist/types/ticketing/PaymentProvider.js +2 -0
- package/dist/types/ticketing/PlayerTurn.d.ts +3 -0
- package/dist/types/ticketing/PlayerTurn.js +2 -0
- package/dist/types/ticketing/Purchase.d.ts +3 -0
- package/dist/types/ticketing/Purchase.js +2 -0
- package/dist/types/ticketing/index.d.ts +9 -0
- package/dist/types/ticketing/index.js +25 -0
- package/dist/types/ticketing/ticketing.schemas.d.ts +58 -0
- package/dist/types/ticketing/ticketing.schemas.js +41 -0
- package/dist/types/user/User.d.ts +4 -9
- package/dist/types/user/index.d.ts +3 -1
- package/dist/types/user/index.js +5 -1
- package/dist/types/user/user-type.schema.d.ts +9 -0
- package/dist/types/user/user-type.schema.js +12 -0
- package/dist/types/user/user.schema.d.ts +39 -0
- package/dist/types/user/user.schema.js +19 -0
- package/package.json +6 -2
- package/src/constants/index.ts +2 -1
- package/src/constants/payment-provider.ts +5 -0
- package/src/constants/payment-status.ts +7 -0
- package/src/constants/user-role.ts +1 -0
- package/src/schemas/team.schema.ts +9 -0
- package/src/types/gameTrack/GameTrackKartConfig.ts +10 -0
- package/src/types/gameTrack/index.ts +1 -0
- package/src/types/index.ts +3 -1
- package/src/types/pagination/Pagination.ts +4 -0
- package/src/types/pagination/index.ts +2 -0
- package/src/types/pagination/pagination.schema.ts +14 -0
- package/src/types/racingTeam/RacingTeam.schema.ts +29 -0
- package/src/types/racingTeam/RacingTeam.ts +12 -0
- package/src/types/racingTeam/RacingTeamMembership.schema.ts +29 -0
- package/src/types/racingTeam/RacingTeamMembership.ts +12 -0
- package/src/types/racingTeam/index.ts +4 -0
- package/src/types/socket/serverToClient/SocketKartServerToClientEventsParams.ts +3 -4
- package/src/types/ticketing/GameTicket.ts +4 -0
- package/src/types/ticketing/GameTurn.schema.ts +49 -0
- package/src/types/ticketing/GameTurn.ts +6 -0
- package/src/types/ticketing/GameTurnTask.schema.ts +32 -0
- package/src/types/ticketing/GameTurnTask.ts +4 -0
- package/src/types/ticketing/PaymentProvider.ts +40 -0
- package/src/types/ticketing/Purchase.ts +4 -0
- package/src/types/ticketing/index.ts +9 -0
- package/src/types/ticketing/ticketing.schemas.ts +43 -0
- package/src/types/user/User.ts +4 -9
- package/src/types/user/index.ts +4 -1
- package/src/types/user/user-type.schema.ts +8 -0
- package/src/types/user/user.schema.ts +19 -0
- package/README.md +0 -3
- package/dist/data/RoleDefinitions.d.ts +0 -2
- package/dist/data/RoleDefinitions.js +0 -27
- package/dist/types/hardware/screen/ScreenKartPosition.d.ts +0 -4
- package/dist/types/hardware/screen/ScreenRaceLaps.d.ts +0 -4
- package/dist/types/response/SuccesResponse.d.ts +0 -5
- package/dist/types/user/UserOrigin.d.ts +0 -1
- package/src/types/user/UserOrigin.ts +0 -1
- /package/dist/types/{hardware/screen/ScreenKartPosition.js → gameTrack/GameTrackKartConfig.js} +0 -0
- /package/dist/types/{hardware/screen/ScreenRaceLaps.js → pagination/Pagination.js} +0 -0
- /package/dist/types/{response/SuccesResponse.js → racingTeam/RacingTeam.js} +0 -0
- /package/dist/types/{user/UserOrigin.js → racingTeam/RacingTeamMembership.js} +0 -0
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { paginatedResponseSchema } from '../pagination';
|
|
3
|
+
|
|
4
|
+
export const racingTeamSchema = z.object({
|
|
5
|
+
id: z.string(),
|
|
6
|
+
name: z.string().min(3).max(50),
|
|
7
|
+
imageUrl: z.string().url().optional(),
|
|
8
|
+
adminUserId: z.string(),
|
|
9
|
+
createdAt: z.date(),
|
|
10
|
+
updatedAt: z.date(),
|
|
11
|
+
});
|
|
12
|
+
|
|
13
|
+
export const createRacingTeamSchema = racingTeamSchema.omit({
|
|
14
|
+
id: true,
|
|
15
|
+
createdAt: true,
|
|
16
|
+
updatedAt: true,
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
export const updateRacingTeamSchema = racingTeamSchema.partial();
|
|
20
|
+
|
|
21
|
+
export const filterRacingTeamSchema = z.object({
|
|
22
|
+
name: z.string().optional(),
|
|
23
|
+
adminUserId: z.string().optional(),
|
|
24
|
+
page: z.number().min(1).default(1),
|
|
25
|
+
limit: z.number().min(1).max(100).default(10),
|
|
26
|
+
cursor: z.string().optional(),
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
export const paginatedRacingTeamSchema = paginatedResponseSchema(racingTeamSchema);
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import {
|
|
3
|
+
createRacingTeamSchema,
|
|
4
|
+
paginatedRacingTeamSchema,
|
|
5
|
+
racingTeamSchema,
|
|
6
|
+
updateRacingTeamSchema,
|
|
7
|
+
} from './RacingTeam.schema';
|
|
8
|
+
|
|
9
|
+
export type RacingTeam = z.infer<typeof racingTeamSchema>;
|
|
10
|
+
export type CreateRacingTeamDto = z.infer<typeof createRacingTeamSchema>;
|
|
11
|
+
export type UpdateRacingTeamDto = z.infer<typeof updateRacingTeamSchema>;
|
|
12
|
+
export type PaginatedRacingTeam = z.infer<typeof paginatedRacingTeamSchema>;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
// libs/common/src/schemas/racing-team-membership.ts
|
|
2
|
+
|
|
3
|
+
import { z } from 'zod';
|
|
4
|
+
|
|
5
|
+
export const joinRequestSchema = z.object({
|
|
6
|
+
id: z.string(),
|
|
7
|
+
racingTeamId: z.string(),
|
|
8
|
+
userId: z.string(),
|
|
9
|
+
status: z.enum(['PENDING', 'ACCEPTED', 'REJECTED'] as const),
|
|
10
|
+
createdAt: z.date(),
|
|
11
|
+
updatedAt: z.date(),
|
|
12
|
+
});
|
|
13
|
+
|
|
14
|
+
export const teamMemberSchema = z.object({
|
|
15
|
+
racingTeamId: z.string(),
|
|
16
|
+
userId: z.string(),
|
|
17
|
+
role: z.enum(['PILOT', 'TECHNICIAN', 'COACH'] as const),
|
|
18
|
+
joinedAt: z.date(),
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
export const createJoinRequestSchema = z.object({
|
|
22
|
+
racingTeamId: z.string(),
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
export const answerJoinRequestSchema = z.object({
|
|
26
|
+
racingTeamId: z.string(),
|
|
27
|
+
targetUserId: z.string(),
|
|
28
|
+
accepted: z.boolean(),
|
|
29
|
+
});
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import {
|
|
3
|
+
joinRequestSchema,
|
|
4
|
+
teamMemberSchema,
|
|
5
|
+
createJoinRequestSchema,
|
|
6
|
+
answerJoinRequestSchema,
|
|
7
|
+
} from './RacingTeamMembership.schema';
|
|
8
|
+
|
|
9
|
+
export type JoinRequest = z.infer<typeof joinRequestSchema>;
|
|
10
|
+
export type TeamMember = z.infer<typeof teamMemberSchema>;
|
|
11
|
+
export type CreateJoinRequest = z.infer<typeof createJoinRequestSchema>;
|
|
12
|
+
export type AnswerJoinRequest = z.infer<typeof answerJoinRequestSchema>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Game, GameType } from '../../game';
|
|
2
|
-
import type { GameTrack } from '../../gameTrack';
|
|
2
|
+
import type { GameTrack, GameTrackKartConfig, GameTrackKartsConfig } from '../../gameTrack';
|
|
3
3
|
import type { Kart, KartStatus } from '../../kart';
|
|
4
4
|
import type { Response } from '../../response';
|
|
5
5
|
import type { SocketPowerUpEventsParams } from '../SocketPowerUpEventsParams';
|
|
@@ -15,11 +15,10 @@ export type SocketKartPowerUpEventsParams = {
|
|
|
15
15
|
};
|
|
16
16
|
|
|
17
17
|
export interface SocketKartEventsParams {
|
|
18
|
-
'kart:updated': { kart: Kart };
|
|
19
18
|
// Response from server
|
|
20
19
|
'kart:init:response': Response<{ kart: Kart; gameTrack: GameTrack }>;
|
|
21
|
-
/** Whenever the Game Track config changed */
|
|
22
|
-
'kart:gameTrack:updated': { gameTrack: GameTrack };
|
|
20
|
+
/** Whenever the Game Track config changed, the config might change as well*/
|
|
21
|
+
'kart:gameTrack:updated': { gameTrack: GameTrack; config: GameTrackKartConfig };
|
|
23
22
|
/** When the physical button of the game track is pressed */
|
|
24
23
|
'kart:gameTrack:emergency:started': undefined;
|
|
25
24
|
/** When the physical button of the game track is released */
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { GameTurnTaskSchema } from './GameTurnTask.schema';
|
|
3
|
+
|
|
4
|
+
export const GAME_TURN_STATUS = {
|
|
5
|
+
CREATED: 'created',
|
|
6
|
+
IN_QUEUE: 'in_queue',
|
|
7
|
+
READY: 'ready',
|
|
8
|
+
PLAYING: 'playing',
|
|
9
|
+
COMPLETED: 'completed',
|
|
10
|
+
} as const;
|
|
11
|
+
|
|
12
|
+
export const GAME_TURN_CHECK = {
|
|
13
|
+
TUTORIAL: 'tutorial',
|
|
14
|
+
AGE_VERIFICATION: 'age_verification',
|
|
15
|
+
TERMS_ACCEPTANCE: 'terms_acceptance',
|
|
16
|
+
} as const;
|
|
17
|
+
|
|
18
|
+
export const GameTurnStatusSchema = z.enum([
|
|
19
|
+
GAME_TURN_STATUS.CREATED,
|
|
20
|
+
GAME_TURN_STATUS.IN_QUEUE,
|
|
21
|
+
GAME_TURN_STATUS.READY,
|
|
22
|
+
GAME_TURN_STATUS.PLAYING,
|
|
23
|
+
GAME_TURN_STATUS.COMPLETED,
|
|
24
|
+
]);
|
|
25
|
+
|
|
26
|
+
export const GameTurnCheckSchema = z.enum([
|
|
27
|
+
GAME_TURN_CHECK.TUTORIAL,
|
|
28
|
+
GAME_TURN_CHECK.AGE_VERIFICATION,
|
|
29
|
+
GAME_TURN_CHECK.TERMS_ACCEPTANCE,
|
|
30
|
+
]);
|
|
31
|
+
|
|
32
|
+
export const GameTurnSchema = z.object({
|
|
33
|
+
id: z.string(),
|
|
34
|
+
purchaseId: z.string(),
|
|
35
|
+
leaderUsername: z.string(),
|
|
36
|
+
gameTickets: z.array(z.string()),
|
|
37
|
+
usernames: z.array(z.string()),
|
|
38
|
+
status: GameTurnStatusSchema,
|
|
39
|
+
tasks: z.array(GameTurnTaskSchema),
|
|
40
|
+
createdAt: z.date(),
|
|
41
|
+
updatedAt: z.date(),
|
|
42
|
+
startedAt: z.date().optional(),
|
|
43
|
+
completedAt: z.date().optional(),
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
// The Game turn queue item requires a position to sort it.
|
|
47
|
+
export const GameTurnQueueItemSchema = GameTurnSchema.extend({
|
|
48
|
+
position: z.number(),
|
|
49
|
+
});
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
|
|
3
|
+
export const GAME_TURN_TASK_TYPE = {
|
|
4
|
+
QR_SCAN: 'qr_scan',
|
|
5
|
+
MANUAL_CHECK: 'manual_check',
|
|
6
|
+
LINK_ACCEPT: 'link_accept',
|
|
7
|
+
} as const;
|
|
8
|
+
|
|
9
|
+
export const GAME_TURN_TASK_STATUS = {
|
|
10
|
+
PENDING: 'pending',
|
|
11
|
+
COMPLETED: 'completed',
|
|
12
|
+
} as const;
|
|
13
|
+
|
|
14
|
+
export const GameTurnTaskTypeSchema = z.enum([
|
|
15
|
+
GAME_TURN_TASK_TYPE.QR_SCAN,
|
|
16
|
+
GAME_TURN_TASK_TYPE.MANUAL_CHECK,
|
|
17
|
+
GAME_TURN_TASK_TYPE.LINK_ACCEPT,
|
|
18
|
+
] as const);
|
|
19
|
+
|
|
20
|
+
export const GameTurnTaskStatusSchema = z.enum([
|
|
21
|
+
GAME_TURN_TASK_STATUS.PENDING,
|
|
22
|
+
GAME_TURN_TASK_STATUS.COMPLETED,
|
|
23
|
+
] as const);
|
|
24
|
+
|
|
25
|
+
export const GameTurnTaskSchema = z.object({
|
|
26
|
+
id: z.string(),
|
|
27
|
+
type: GameTurnTaskTypeSchema,
|
|
28
|
+
status: GameTurnTaskStatusSchema,
|
|
29
|
+
label: z.string(),
|
|
30
|
+
metadata: z.record(z.string(), z.any()).optional(),
|
|
31
|
+
completedAt: z.date().optional(),
|
|
32
|
+
});
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { PAYMENT_PROVIDERS, PAYMENT_STATUSES } from '../../constants';
|
|
2
|
+
|
|
3
|
+
export type PaymentProviderName = (typeof PAYMENT_PROVIDERS)[keyof typeof PAYMENT_PROVIDERS];
|
|
4
|
+
|
|
5
|
+
export type PaymentStatus = (typeof PAYMENT_STATUSES)[keyof typeof PAYMENT_STATUSES];
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Generic payment provider data that can be reused across different providers
|
|
9
|
+
* This allows easy switching between Stripe, PayPal, etc.
|
|
10
|
+
*/
|
|
11
|
+
export interface PaymentProviderData {
|
|
12
|
+
provider: PaymentProviderName;
|
|
13
|
+
paymentIntentId?: string;
|
|
14
|
+
transactionId: string;
|
|
15
|
+
amountPaid: number;
|
|
16
|
+
currency: string;
|
|
17
|
+
paymentStatus: PaymentStatus;
|
|
18
|
+
paymentMethod?: string;
|
|
19
|
+
metadata?: Record<string, any>;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Strategy interface for payment providers
|
|
24
|
+
*/
|
|
25
|
+
export interface PaymentProvider {
|
|
26
|
+
/**
|
|
27
|
+
* Confirm and validate a purchase from webhook payload
|
|
28
|
+
*/
|
|
29
|
+
confirmPurchase(payload: any, signature?: string): Promise<PaymentProviderData>;
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Validate webhook signature if provided
|
|
33
|
+
*/
|
|
34
|
+
validateWebhookSignature?(payload: any, signature: string): boolean;
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Get provider name
|
|
38
|
+
*/
|
|
39
|
+
getProviderName(): string;
|
|
40
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export * from './GameTicket';
|
|
2
|
+
export * from './PaymentProvider';
|
|
3
|
+
export * from './GameTurn';
|
|
4
|
+
export * from './Purchase';
|
|
5
|
+
export * from './ticketing.schemas';
|
|
6
|
+
export * from './ticketing.schemas';
|
|
7
|
+
export * from './GameTurnTask';
|
|
8
|
+
export * from './GameTurnTask.schema';
|
|
9
|
+
export * from './GameTurn.schema';
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
|
|
3
|
+
export const GAME_TICKET_STATUS = {
|
|
4
|
+
CREATED: 'created',
|
|
5
|
+
ASSIGNED: 'assigned',
|
|
6
|
+
ACTIVE: 'active',
|
|
7
|
+
COMPLETED: 'completed',
|
|
8
|
+
} as const;
|
|
9
|
+
|
|
10
|
+
export const TICKET_USER_TYPE = {
|
|
11
|
+
LEADER: 'leader',
|
|
12
|
+
SUB_USER: 'sub-user',
|
|
13
|
+
EXISTING: 'existing',
|
|
14
|
+
GUEST: 'guest',
|
|
15
|
+
} as const;
|
|
16
|
+
|
|
17
|
+
export const GameTicketStatusSchema = z.enum(GAME_TICKET_STATUS);
|
|
18
|
+
export const TicketUserTypeSchema = z.enum(TICKET_USER_TYPE);
|
|
19
|
+
|
|
20
|
+
export const GameTicketSchema = z.object({
|
|
21
|
+
id: z.string(),
|
|
22
|
+
purchaseId: z.string(),
|
|
23
|
+
gameTurnId: z.string(),
|
|
24
|
+
ownerUsername: z.string(),
|
|
25
|
+
userType: TicketUserTypeSchema,
|
|
26
|
+
status: GameTicketStatusSchema,
|
|
27
|
+
createdAt: z.date(),
|
|
28
|
+
updatedAt: z.date(),
|
|
29
|
+
completedAt: z.date().optional(),
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
export const PurchaseSchema = z.object({
|
|
33
|
+
id: z.string(),
|
|
34
|
+
purchaseNumber: z.number(),
|
|
35
|
+
buyerUserId: z.string(),
|
|
36
|
+
totalTickets: z.number(),
|
|
37
|
+
availableTickets: z.number(),
|
|
38
|
+
usedTickets: z.number(),
|
|
39
|
+
purchaseDate: z.date(),
|
|
40
|
+
paymentData: z.any().optional(),
|
|
41
|
+
createdAt: z.date(),
|
|
42
|
+
updatedAt: z.date(),
|
|
43
|
+
});
|
package/src/types/user/User.ts
CHANGED
|
@@ -1,10 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { UserSchema, UserWithPasswordSchema } from './user.schema';
|
|
3
3
|
|
|
4
|
-
export
|
|
5
|
-
|
|
6
|
-
username: string;
|
|
7
|
-
name: string;
|
|
8
|
-
origin: UserOrigin;
|
|
9
|
-
role: UserRole;
|
|
10
|
-
}
|
|
4
|
+
export type User = z.infer<typeof UserSchema>;
|
|
5
|
+
export type UserWithPassword = z.infer<typeof UserWithPasswordSchema>;
|
package/src/types/user/index.ts
CHANGED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { USER_ROLE } from '../../constants/user-role';
|
|
3
|
+
import { UserTypeSchema } from './user-type.schema';
|
|
4
|
+
|
|
5
|
+
export const UserRoleSchema = z.enum([USER_ROLE.SUPER_ADMIN, USER_ROLE.PLAYER, USER_ROLE.OPERATOR] as const);
|
|
6
|
+
|
|
7
|
+
export const UserSchema = z.object({
|
|
8
|
+
id: z.string(),
|
|
9
|
+
name: z.string(),
|
|
10
|
+
username: z.string(),
|
|
11
|
+
email: z.email(),
|
|
12
|
+
phone: z.string().optional(),
|
|
13
|
+
role: UserRoleSchema,
|
|
14
|
+
type: UserTypeSchema,
|
|
15
|
+
});
|
|
16
|
+
|
|
17
|
+
export const UserWithPasswordSchema = UserSchema.extend({
|
|
18
|
+
password: z.string(),
|
|
19
|
+
});
|
package/README.md
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ROLE_DEFINITIONS = void 0;
|
|
4
|
-
const constants_1 = require("../constants");
|
|
5
|
-
exports.ROLE_DEFINITIONS = [
|
|
6
|
-
{
|
|
7
|
-
role: constants_1.USER_ROLE.SUPER_ADMIN,
|
|
8
|
-
description: 'Complete access to all features and settings',
|
|
9
|
-
permissions: [
|
|
10
|
-
constants_1.PERMISSION.FULL_ACCESS,
|
|
11
|
-
constants_1.PERMISSION.KARTS_MANAGE_HARDWARE,
|
|
12
|
-
constants_1.PERMISSION.KARTS_MANAGE_POWER_UPS,
|
|
13
|
-
constants_1.PERMISSION.GAME_TRACK_MANAGE_GAMES,
|
|
14
|
-
constants_1.PERMISSION.GAME_TRACK_MANAGE_BASIC_INFO,
|
|
15
|
-
constants_1.PERMISSION.GAME_TRACK_MANAGE_HARDWARE,
|
|
16
|
-
constants_1.PERMISSION.GAME_TRACK_MANAGE_KARTS_CONFIG,
|
|
17
|
-
constants_1.PERMISSION.GAME_TRACK_MANAGE_CHECKPOINTS,
|
|
18
|
-
constants_1.PERMISSION.GAME_TRACK_MANAGE_KARTS,
|
|
19
|
-
constants_1.PERMISSION.KARTS_TRACKING,
|
|
20
|
-
],
|
|
21
|
-
},
|
|
22
|
-
{
|
|
23
|
-
role: constants_1.USER_ROLE.OPERATOR,
|
|
24
|
-
description: 'Game Track Operator',
|
|
25
|
-
permissions: [constants_1.PERMISSION.GAME_TRACK_MANAGE_GAMES],
|
|
26
|
-
},
|
|
27
|
-
];
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export type UserOrigin = 'webapp' | 'hardware';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export type UserOrigin = 'webapp' | 'hardware';
|
/package/dist/types/{hardware/screen/ScreenKartPosition.js → gameTrack/GameTrackKartConfig.js}
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|