// JSON API response types
export interface JsonApiResource {
id: string;
type: string;
attributes: Record<string, unknown>;
relationships?: Record<string, unknown>;
links?: Record<string, string>;
}
export interface JsonApiResponse<T = JsonApiResource> {
data: T | T[];
included?: JsonApiResource[];
meta?: {
total_count?: number;
count?: number;
can_order_by?: string[];
can_query_by?: string[];
can_include?: string[];
can_filter?: string[];
[key: string]: unknown;
};
links?: {
self?: string;
next?: string;
prev?: string;
first?: string;
last?: string;
[key: string]: string | undefined;
};
}
// PCO Person
export interface PcoPerson extends JsonApiResource {
type: "Person";
attributes: {
first_name?: string;
middle_name?: string;
last_name?: string;
birthdate?: string;
anniversary?: string;
gender?: string;
grade?: number;
child?: boolean;
status?: string;
school_type?: string;
graduation_year?: number;
site_administrator?: boolean;
accounting_administrator?: boolean;
people_permissions?: string;
created_at?: string;
updated_at?: string;
avatar?: string;
name?: string;
demographic_avatar_url?: string;
directory_status?: string;
membership?: string;
inactivated_at?: string;
medical_notes?: string;
passed_background_check?: boolean;
remote_id?: number;
};
}
// PCO Email
export interface PcoEmail extends JsonApiResource {
type: "Email";
attributes: {
address?: string;
location?: string;
primary?: boolean;
created_at?: string;
updated_at?: string;
};
}
// PCO Phone Number
export interface PcoPhoneNumber extends JsonApiResource {
type: "PhoneNumber";
attributes: {
number?: string;
carrier?: string;
location?: string;
primary?: boolean;
created_at?: string;
updated_at?: string;
};
}
// PCO Address
export interface PcoAddress extends JsonApiResource {
type: "Address";
attributes: {
street?: string;
city?: string;
state?: string;
zip?: string;
country_code?: string;
location?: string;
primary?: boolean;
created_at?: string;
updated_at?: string;
};
}
// PCO Service Type
export interface PcoServiceType extends JsonApiResource {
type: "ServiceType";
attributes: {
name?: string;
sequence?: number;
created_at?: string;
updated_at?: string;
archived_at?: string;
background_check_permissions?: string;
comment_permissions?: string;
custom_item_types?: string;
frequency?: string;
last_plan_from?: string;
};
}
// PCO Plan
export interface PcoPlan extends JsonApiResource {
type: "Plan";
attributes: {
title?: string;
series_title?: string;
plan_notes_count?: number;
other_time_count?: number;
rehearsal_time_count?: number;
service_time_count?: number;
plan_people_count?: number;
needed_positions_count?: number;
items_count?: number;
total_length?: number;
public?: boolean;
dates?: string;
short_dates?: string;
planning_center_url?: string;
sort_date?: string;
last_time_at?: string;
permissions?: string;
created_at?: string;
updated_at?: string;
};
}
// PCO Song
export interface PcoSong extends JsonApiResource {
type: "Song";
attributes: {
title?: string;
admin?: string;
author?: string;
copyright?: string;
ccli_number?: string;
hidden?: boolean;
last_scheduled_at?: string;
themes?: string;
created_at?: string;
updated_at?: string;
};
}
// PCO Team
export interface PcoTeam extends JsonApiResource {
type: "Team";
attributes: {
name?: string;
rehearsal_team?: boolean;
sequence?: number;
schedule_to?: string;
default_status?: string;
default_prepare_notifications?: boolean;
created_at?: string;
updated_at?: string;
assigned_directly?: boolean;
secure_team?: boolean;
last_plan_from?: string;
stage_color?: string;
stage_variant?: string;
};
}
// PCO Donation
export interface PcoDonation extends JsonApiResource {
type: "Donation";
attributes: {
created_at?: string;
updated_at?: string;
payment_method?: string;
payment_method_sub?: string;
payment_last4?: string;
payment_brand?: string;
payment_check_number?: number;
payment_check_dated_at?: string;
fee_cents?: number;
amount_cents?: number;
amount_currency?: string;
fee_currency?: string;
completed_at?: string;
batch_id?: string;
payment_status?: string;
received_at?: string;
refunded?: boolean;
refund_started_at?: string;
};
}
// PCO Fund
export interface PcoFund extends JsonApiResource {
type: "Fund";
attributes: {
name?: string;
ledger_code?: string;
description?: string;
visibility?: string;
default?: boolean;
color?: string;
created_at?: string;
updated_at?: string;
deletable?: boolean;
};
}
// PCO Group
export interface PcoGroup extends JsonApiResource {
type: "Group";
attributes: {
name?: string;
archive_at?: string;
description?: string;
events_visibility?: string;
location?: string;
memberships_count?: number;
public_church_center_web_url?: string;
schedule?: string;
virtual_location_url?: string;
widget_status?: string;
created_at?: string;
updated_at?: string;
};
}
// PCO Calendar Event
export interface PcoCalendarEvent extends JsonApiResource {
type: "Event";
attributes: {
approval_status?: string;
created_at?: string;
updated_at?: string;
description?: string;
featured?: boolean;
image_url?: string;
name?: string;
percent_approved?: number;
percent_rejected?: number;
registration_url?: string;
summary?: string;
visible_in_church_center?: boolean;
};
}
// PCO Check-In
export interface PcoCheckIn extends JsonApiResource {
type: "CheckIn";
attributes: {
first_name?: string;
last_name?: string;
medical_notes?: string;
kind?: string;
number?: number;
security_code?: string;
created_at?: string;
updated_at?: string;
checked_out_at?: string;
emergency_contact_name?: string;
emergency_contact_phone_number?: string;
};
}
// Tool result type (index signature required by MCP SDK)
export interface ToolResult {
[key: string]: unknown;
content: Array<{ type: "text"; text: string }>;
structuredContent?: Record<string, unknown>;
}
// Pagination metadata
export interface PaginationMeta {
total: number;
count: number;
offset: number;
has_more: boolean;
next_offset?: number;
}