Guests
Methods and related types for `scrims.guests`.
Guests (scrims.guests)
Table of Contents
Methods
| Method | Signature |
|---|---|
fetchAll |
fetchAll(eventId: string, statusFilters?: number[]) => Promise<GuestListResponse> |
fetch |
fetch(eventId: string, guestId: string) => Promise<GuestWithRelations> |
fetchById |
fetchById(guestId: string) => Promise<GuestWithRelations> |
fetchHosts |
fetchHosts(eventId: string) => Promise<HostListResponse> |
create |
create(memberId: string, eventId: string, data: GuestCreateInput) => Promise<GuestMutationResponse> |
update |
update(memberId: string, eventId: string, data: GuestUpdateInput) => Promise<GuestMutationResponse> |
Method Signatures
fetchAll
fetchAll(
eventId: string,
statusFilters?: number[],
): Promise<GuestListResponse>
fetch
fetch(
eventId: string,
guestId: string,
): Promise<GuestWithRelations>
fetchById
fetchById(
guestId: string,
): Promise<GuestWithRelations>
fetchHosts
fetchHosts(
eventId: string,
): Promise<HostListResponse>
create
create(
memberId: string,
eventId: string,
data: GuestCreateInput,
): Promise<GuestMutationResponse>
update
update(
memberId: string,
eventId: string,
data: GuestUpdateInput,
): Promise<GuestMutationResponse>
Related Type References
JsonObject
type JsonObject = Record<string, unknown>;
ScrimsEvent
type ScrimsEvent = JsonObject
& {
_id?: string;
calendar?: string;
owner_id?: string;
start_time?: string | Date;
end_time?: string | Date;
start_timezone?: string;
end_timezone?: string;
is_all_day?: boolean;
recurrence?: string[];
recurrence_id?: string;
title?: string;
subheading?: string;
remove_assigned_roles?: boolean;
descriptions?: EventDescription;
color?: string;
image_url?: string;
location_meta?: LocationMeta;
allowed_roles?: string[];
banned_roles?: string[];
assign_roles?: string[];
primarily_hosting?: boolean;
archived?: boolean;
no_further_occurrence?: boolean;
discarded?: boolean;
guest_can_edit?: boolean;
is_private?: boolean;
logs?: JsonObject[];
etag?: string;
notifications?: EventNotification[];
send_notifications?: boolean;
template?: string | null;
tickets?: EventTicket[];
emailTemplates?: EmailTemplates;
general?: General;
register?: Register;
waitlist?: Waitlist;
estimate_guest_count?: number;
migration_overrides?: JsonObject;
created_at?: string | Date;
updated_at?: string | Date;
};
ScrimsMember
type ScrimsMember = JsonObject
& {
_id?: string;
email?: string;
is_paid?: boolean;
image?: string;
preferred_timezone?: string;
username?: string;
name?: string;
super_admin?: boolean;
moderator_status?: string;
};
EventDescription
type EventDescription = JsonObject
& {
description?: string;
objectives?: string[];
specialNotes?: string[];
};
EventNotification
type EventNotification = JsonObject
& {
message?: string;
status?: number;
before_in_minutes?: number;
recipient?: string;
ticket_type?: string;
};
CustomQuestionValidation
type CustomQuestionValidation = JsonObject
& {
min_length?: number;
max_length?: number;
min_value?: number;
max_value?: number;
pattern?: string;
custom_message?: string;
};
CustomQuestion
type CustomQuestion = JsonObject
& {
_id?: string;
question?: string;
type?: string;
required?: boolean;
placeholder?: string;
options?: string[];
validation?: CustomQuestionValidation;
help_text?: string;
icon?: string;
order?: number;
};
RegistrationDeadline
type RegistrationDeadline = JsonObject
& {
days?: number;
hours?: number;
minutes?: number;
};
General
type General = JsonObject
& {
allow_multiple_hosts?: boolean;
allow_multiple_specs?: boolean;
add_creator_as_host?: boolean;
enable_tickets?: boolean;
enable_registration_deadline?: boolean;
total_capacity?: number;
specs_label?: string;
ticket_label?: string;
host_label?: string;
invited_label?: string;
confirmed_label?: string;
late_label?: string;
tentative_label?: string;
absence_label?: string;
kicked_label?: string;
ticket_icon?: string;
invited_icon?: string;
confirmed_icon?: string;
late_icon?: string;
tentative_icon?: string;
absence_icon?: string;
kicked_icon?: string;
host_icon?: string;
empty_icon?: string;
signups_icon?: string;
countdown_icon?: string;
static_icon?: string;
reset_specs_icon?: string;
enable_bundles?: boolean;
members_only?: boolean;
allow_multiple_ticket?: boolean;
registration_deadline?: RegistrationDeadline;
};
LocationMeta
type LocationMeta = JsonObject
& {
address?: string;
link?: string;
type?: string;
};
Register
type Register = JsonObject
& {
show_form?: boolean;
custom_questions?: CustomQuestion[];
};
Waitlist
type Waitlist = JsonObject
& {
waitlist_enabled?: boolean;
waitlist_label?: string;
waitlist_icon?: string;
waitlist_message?: string;
waitlist_time?: string;
waitlist_threshold?: number;
waitlist_max_capacity?: number;
open_waitlist_if?: string[];
};
EmailTemplates
type EmailTemplates = JsonObject
& {
accept_join_request?: string;
decline_join_request?: string;
invite_guests?: string;
reminder?: string;
cancellation?: string;
};
TicketTag
type TicketTag = JsonObject
& {
name?: string;
icon?: string;
};
Fee
type Fee = JsonObject
& {
high?: number;
low?: number;
discount?: number;
offer?: string;
currency?: string;
tax?: number;
};
SalesPeriod
type SalesPeriod = JsonObject
& {
sales_start?: string | Date;
sales_end?: string | Date;
timezone?: string;
utc?: string | Date;
};
Capacity
type Capacity = JsonObject
& {
max_quantity_per_order?: number;
min_quantity_per_order?: number;
quantity_required?: number;
max_quantity?: number;
quantity_remaining?: number;
};
Refunds
type Refunds = JsonObject
& {
allowed?: boolean;
processed_by?: string;
};
BoosterOverrides
type BoosterOverrides = JsonObject
& {
sales_period?: JsonObject;
fee?: JsonObject;
requires_approval?: boolean;
};
EventTicket
type EventTicket = JsonObject
& {
_id?: string;
name?: string;
description?: string;
color?: string;
icon?: string;
image?: string;
ticket_specs?: TicketSpec[];
ticket_tags?: TicketTag[];
fee?: Fee;
sales_period?: SalesPeriod;
capacity?: Capacity;
requires_approval?: boolean;
refunds?: Refunds;
booster_overrides?: BoosterOverrides;
};
TicketSpec
type TicketSpec = JsonObject
& {
name?: string;
icon?: string;
color?: string;
description?: string;
max_capacity?: number;
};
ModalConfig
type ModalConfig = JsonObject
& {
isWaitlist?: boolean;
icon?: string;
title?: string;
thankYouMessage?: string;
emailMessage?: string;
buttonText?: string;
price?: (
{
amount: number;
currency: string;
}
| null
);
};
EventGuest
type EventGuest = JsonObject
& {
_id?: string;
member?: string | ScrimsMember;
event?: string | ScrimsEvent;
is_host?: boolean;
status?: number;
notes?: string;
custom_fields?: Record<string, string | boolean>;
created_at?: string | Date;
updated_at?: string | Date;
};
GuestTicket
type GuestTicket = JsonObject
& {
_id?: string;
guest?: string | EventGuest;
ticket?: string | EventTicket;
event?: string | ScrimsEvent;
ticket_specs?: TicketSpec[];
status?: number;
refunded_at?: string | Date | null;
transaction_id?: string;
checkout_url?: string;
refund_initiated_by?: string;
created_at?: string | Date;
updated_at?: string | Date;
};
GuestWithRelations
type GuestWithRelations = EventGuest
& {
member?: ScrimsMember;
tickets?: GuestTicket[];
};
GuestListResponse
type GuestListResponse = {
guests: GuestWithRelations[];
};
HostListResponse
type HostListResponse = {
hosts: GuestWithRelations[];
};
GuestMutationResponse
type GuestMutationResponse = {
guest: GuestWithRelations;
message?: string;
modalConfig?: ModalConfig;
}
& JsonObject;
GuestCreateInput
type GuestCreateInput = JsonObject
& {
status?: number;
notes?: string;
customFields?: Record<string, string | boolean>;
custom_fields?: Record<string, string | boolean>;
};
GuestUpdateInput
type GuestUpdateInput = JsonObject
& {
status?: number;
notes?: string;
custom_fields?: Record<string, string | boolean>;
customFields?: Record<string, string | boolean>;
};