@battle-racing/br-common-lib
Version:
Common library for all Battle Racing Repositorios
105 lines (104 loc) • 3.21 kB
TypeScript
import { z } from 'zod';
export declare const GAME_TICKET_STATUS: {
readonly CREATED: "created";
readonly ASSIGNED: "assigned";
readonly ACTIVE: "active";
readonly COMPLETED: "completed";
};
export declare const TICKET_USER_TYPE: {
readonly LEADER: "leader";
readonly SUB_USER: "sub-user";
readonly EXISTING: "existing";
readonly GUEST: "guest";
};
export declare const TICKET_TYPE: {
readonly RACE: "race";
readonly BATTLE: "battle";
readonly SOCCER: "soccer";
};
export declare const GameTicketStatusSchema: z.ZodEnum<{
readonly CREATED: "created";
readonly ASSIGNED: "assigned";
readonly ACTIVE: "active";
readonly COMPLETED: "completed";
}>;
export declare const TicketUserTypeSchema: z.ZodEnum<{
readonly LEADER: "leader";
readonly SUB_USER: "sub-user";
readonly EXISTING: "existing";
readonly GUEST: "guest";
}>;
export declare const TicketTypeSchema: z.ZodEnum<{
readonly RACE: "race";
readonly BATTLE: "battle";
readonly SOCCER: "soccer";
}>;
export declare const TicketSummarySchema: z.ZodRecord<z.ZodEnum<{
readonly RACE: "race";
readonly BATTLE: "battle";
readonly SOCCER: "soccer";
}>, z.ZodNumber>;
export declare const GameTicketSchema: z.ZodObject<{
id: z.ZodString;
purchaseId: z.ZodString;
gameTurnId: z.ZodString;
ownerUsername: z.ZodString;
userType: z.ZodEnum<{
readonly LEADER: "leader";
readonly SUB_USER: "sub-user";
readonly EXISTING: "existing";
readonly GUEST: "guest";
}>;
status: z.ZodEnum<{
readonly CREATED: "created";
readonly ASSIGNED: "assigned";
readonly ACTIVE: "active";
readonly COMPLETED: "completed";
}>;
type: z.ZodDefault<z.ZodEnum<{
readonly RACE: "race";
readonly BATTLE: "battle";
readonly SOCCER: "soccer";
}>>;
createdAt: z.ZodDate;
updatedAt: z.ZodDate;
completedAt: z.ZodOptional<z.ZodDate>;
}, z.core.$strip>;
export declare const PurchaseSchema: z.ZodObject<{
id: z.ZodString;
purchaseNumber: z.ZodNumber;
buyerUserId: z.ZodString;
totalTickets: z.ZodNumber;
purchaseDate: z.ZodDate;
ticketType: z.ZodDefault<z.ZodEnum<{
readonly RACE: "race";
readonly BATTLE: "battle";
readonly SOCCER: "soccer";
}>>;
paymentData: z.ZodOptional<z.ZodAny>;
createdAt: z.ZodDate;
updatedAt: z.ZodDate;
}, z.core.$strip>;
/**
* Probably temporary as the purchase will be a webhook called by the provider (Stripe, PayPal, etc)
*/
export declare const CreatePurchasePublicSchema: z.ZodObject<{
ticketType: z.ZodDefault<z.ZodEnum<{
readonly RACE: "race";
readonly BATTLE: "battle";
readonly SOCCER: "soccer";
}>>;
ticketCount: z.ZodNumber;
}, z.core.$strip>;
/**
* The public input doesn't receive a userId, as it's resolved on the backend
*/
export declare const CreatePurchaseInternalSchema: z.ZodObject<{
buyerUserId: z.ZodString;
ticketType: z.ZodDefault<z.ZodEnum<{
readonly RACE: "race";
readonly BATTLE: "battle";
readonly SOCCER: "soccer";
}>>;
ticketCount: z.ZodNumber;
}, z.core.$strip>;