mirror of
https://github.com/fsolla/teqo.git
synced 2026-11-13 15:13:07 +00:00
Board "Acompanhe de perto" (S1+S2) ganha o feed automático do perfil oficial: loader irmão src/utilities/socialFeed/instagramFeed.ts (Graph API /media com children p/ carrossel + username, unstable_cache tag social-feed + revalidate 300, snapshot cru pré-exclusão persistido via SQL direto, refresh de token automático com retry 1x — refresh endpoint só renova tokens de Instagram Login, page tokens caem no fail-closed), global SocialFeedSettings estendida (instagramEnabled/AccessToken/UserId/MaxItems + snapshot hidden; excludedItems já cobria a plataforma desde a S2). Requisito nº 1 — picker de exclusão no admin (primeiro componente custom do repo, campo ui + importmap): lista os posts do snapshot com thumbnail e toggle "Não exibir" que escreve em excludedItems. Card com coverAspect square (1:1 do rascunho), badge Instagram, título = legenda com fallback para post sem legenda, clique no permalink (noopener), link "Seguir no Instagram →" derivado do username. Os feeds externos mudam para o subfolder socialFeed/ (pin da S2 previa). Migration 20260818_192948_add_instagram_social_feed_fields (não destrutiva). Stub IG no webServer (porta dev+2000, helper socialStub.ts) + 3 e2e novos no describe serial + kill switch estendido + smoke do picker no admin. Closes #20
2685 lines
No EOL
64 KiB
TypeScript
2685 lines
No EOL
64 KiB
TypeScript
/* tslint:disable */
|
|
/* eslint-disable */
|
|
/**
|
|
* This file was automatically generated by Payload.
|
|
* DO NOT MODIFY IT BY HAND. Instead, modify your source Payload config,
|
|
* and re-run `payload generate:types` to regenerate this file.
|
|
*/
|
|
|
|
/**
|
|
* Supported timezones in IANA format.
|
|
*
|
|
* This interface was referenced by `Config`'s JSON-Schema
|
|
* via the `definition` "supportedTimezones".
|
|
*/
|
|
export type SupportedTimezones =
|
|
| 'Pacific/Midway'
|
|
| 'Pacific/Niue'
|
|
| 'Pacific/Honolulu'
|
|
| 'Pacific/Rarotonga'
|
|
| 'America/Anchorage'
|
|
| 'Pacific/Gambier'
|
|
| 'America/Los_Angeles'
|
|
| 'America/Tijuana'
|
|
| 'America/Denver'
|
|
| 'America/Phoenix'
|
|
| 'America/Chicago'
|
|
| 'America/Guatemala'
|
|
| 'America/New_York'
|
|
| 'America/Bogota'
|
|
| 'America/Caracas'
|
|
| 'America/Santiago'
|
|
| 'America/Buenos_Aires'
|
|
| 'America/Sao_Paulo'
|
|
| 'Atlantic/South_Georgia'
|
|
| 'Atlantic/Azores'
|
|
| 'Atlantic/Cape_Verde'
|
|
| 'Europe/London'
|
|
| 'Europe/Berlin'
|
|
| 'Africa/Lagos'
|
|
| 'Europe/Athens'
|
|
| 'Africa/Cairo'
|
|
| 'Europe/Moscow'
|
|
| 'Asia/Riyadh'
|
|
| 'Asia/Dubai'
|
|
| 'Asia/Baku'
|
|
| 'Asia/Karachi'
|
|
| 'Asia/Tashkent'
|
|
| 'Asia/Calcutta'
|
|
| 'Asia/Dhaka'
|
|
| 'Asia/Almaty'
|
|
| 'Asia/Jakarta'
|
|
| 'Asia/Bangkok'
|
|
| 'Asia/Shanghai'
|
|
| 'Asia/Singapore'
|
|
| 'Asia/Tokyo'
|
|
| 'Asia/Seoul'
|
|
| 'Australia/Brisbane'
|
|
| 'Australia/Sydney'
|
|
| 'Pacific/Guam'
|
|
| 'Pacific/Noumea'
|
|
| 'Pacific/Auckland'
|
|
| 'Pacific/Fiji';
|
|
|
|
export interface Config {
|
|
auth: {
|
|
users: UserAuthOperations;
|
|
campaignUser: CampaignUserAuthOperations;
|
|
};
|
|
blocks: {};
|
|
collections: {
|
|
users: User;
|
|
campaignUser: CampaignUser;
|
|
campaignWebAuthnCredential: CampaignWebAuthnCredential;
|
|
notification: Notification;
|
|
pushSubscription: PushSubscription;
|
|
campaignInvite: CampaignInvite;
|
|
campaignVoteSummarySnapshot: CampaignVoteSummarySnapshot;
|
|
municipality: Municipality;
|
|
leadership: Leadership;
|
|
organization: Organization;
|
|
stateDeputy: StateDeputy;
|
|
votePledge: VotePledge;
|
|
allocationDecision: AllocationDecision;
|
|
campaignDemand: CampaignDemand;
|
|
supporter: Supporter;
|
|
supporterImportBatch: SupporterImportBatch;
|
|
municipalityUpdate: MunicipalityUpdate;
|
|
activity: Activity;
|
|
calendarFeed: CalendarFeed;
|
|
googleCalendarSync: GoogleCalendarSync;
|
|
electionTally: ElectionTally;
|
|
electionCandidateVote: ElectionCandidateVote;
|
|
electionCandidate: ElectionCandidate;
|
|
media: Media;
|
|
petition: Petition;
|
|
contact: Contact;
|
|
consent: Consent;
|
|
signature: Signature;
|
|
subscription: Subscription;
|
|
post: Post;
|
|
tag: Tag;
|
|
exports: Export;
|
|
imports: Import;
|
|
'payload-kv': PayloadKv;
|
|
'payload-jobs': PayloadJob;
|
|
'payload-locked-documents': PayloadLockedDocument;
|
|
'payload-preferences': PayloadPreference;
|
|
'payload-migrations': PayloadMigration;
|
|
};
|
|
collectionsJoins: {};
|
|
collectionsSelect: {
|
|
users: UsersSelect<false> | UsersSelect<true>;
|
|
campaignUser: CampaignUserSelect<false> | CampaignUserSelect<true>;
|
|
campaignWebAuthnCredential: CampaignWebAuthnCredentialSelect<false> | CampaignWebAuthnCredentialSelect<true>;
|
|
notification: NotificationSelect<false> | NotificationSelect<true>;
|
|
pushSubscription: PushSubscriptionSelect<false> | PushSubscriptionSelect<true>;
|
|
campaignInvite: CampaignInviteSelect<false> | CampaignInviteSelect<true>;
|
|
campaignVoteSummarySnapshot: CampaignVoteSummarySnapshotSelect<false> | CampaignVoteSummarySnapshotSelect<true>;
|
|
municipality: MunicipalitySelect<false> | MunicipalitySelect<true>;
|
|
leadership: LeadershipSelect<false> | LeadershipSelect<true>;
|
|
organization: OrganizationSelect<false> | OrganizationSelect<true>;
|
|
stateDeputy: StateDeputySelect<false> | StateDeputySelect<true>;
|
|
votePledge: VotePledgeSelect<false> | VotePledgeSelect<true>;
|
|
allocationDecision: AllocationDecisionSelect<false> | AllocationDecisionSelect<true>;
|
|
campaignDemand: CampaignDemandSelect<false> | CampaignDemandSelect<true>;
|
|
supporter: SupporterSelect<false> | SupporterSelect<true>;
|
|
supporterImportBatch: SupporterImportBatchSelect<false> | SupporterImportBatchSelect<true>;
|
|
municipalityUpdate: MunicipalityUpdateSelect<false> | MunicipalityUpdateSelect<true>;
|
|
activity: ActivitySelect<false> | ActivitySelect<true>;
|
|
calendarFeed: CalendarFeedSelect<false> | CalendarFeedSelect<true>;
|
|
googleCalendarSync: GoogleCalendarSyncSelect<false> | GoogleCalendarSyncSelect<true>;
|
|
electionTally: ElectionTallySelect<false> | ElectionTallySelect<true>;
|
|
electionCandidateVote: ElectionCandidateVoteSelect<false> | ElectionCandidateVoteSelect<true>;
|
|
electionCandidate: ElectionCandidateSelect<false> | ElectionCandidateSelect<true>;
|
|
media: MediaSelect<false> | MediaSelect<true>;
|
|
petition: PetitionSelect<false> | PetitionSelect<true>;
|
|
contact: ContactSelect<false> | ContactSelect<true>;
|
|
consent: ConsentSelect<false> | ConsentSelect<true>;
|
|
signature: SignatureSelect<false> | SignatureSelect<true>;
|
|
subscription: SubscriptionSelect<false> | SubscriptionSelect<true>;
|
|
post: PostSelect<false> | PostSelect<true>;
|
|
tag: TagSelect<false> | TagSelect<true>;
|
|
exports: ExportsSelect<false> | ExportsSelect<true>;
|
|
imports: ImportsSelect<false> | ImportsSelect<true>;
|
|
'payload-kv': PayloadKvSelect<false> | PayloadKvSelect<true>;
|
|
'payload-jobs': PayloadJobsSelect<false> | PayloadJobsSelect<true>;
|
|
'payload-locked-documents': PayloadLockedDocumentsSelect<false> | PayloadLockedDocumentsSelect<true>;
|
|
'payload-preferences': PayloadPreferencesSelect<false> | PayloadPreferencesSelect<true>;
|
|
'payload-migrations': PayloadMigrationsSelect<false> | PayloadMigrationsSelect<true>;
|
|
};
|
|
db: {
|
|
defaultIDType: number;
|
|
};
|
|
fallbackLocale: null;
|
|
globals: {
|
|
'site-settings': SiteSetting;
|
|
home: Home;
|
|
metadata: Metadatum;
|
|
'privacy-policy': PrivacyPolicy;
|
|
campaignGoals: CampaignGoal;
|
|
'social-feed-settings': SocialFeedSetting;
|
|
};
|
|
globalsSelect: {
|
|
'site-settings': SiteSettingsSelect<false> | SiteSettingsSelect<true>;
|
|
home: HomeSelect<false> | HomeSelect<true>;
|
|
metadata: MetadataSelect<false> | MetadataSelect<true>;
|
|
'privacy-policy': PrivacyPolicySelect<false> | PrivacyPolicySelect<true>;
|
|
campaignGoals: CampaignGoalsSelect<false> | CampaignGoalsSelect<true>;
|
|
'social-feed-settings': SocialFeedSettingsSelect<false> | SocialFeedSettingsSelect<true>;
|
|
};
|
|
locale: null;
|
|
widgets: {
|
|
collections: CollectionsWidget;
|
|
};
|
|
user: User | CampaignUser;
|
|
jobs: {
|
|
tasks: {
|
|
createCollectionExport: TaskCreateCollectionExport;
|
|
createCollectionImport: TaskCreateCollectionImport;
|
|
schedulePublish: TaskSchedulePublish;
|
|
inline: {
|
|
input: unknown;
|
|
output: unknown;
|
|
};
|
|
};
|
|
workflows: unknown;
|
|
};
|
|
}
|
|
export interface UserAuthOperations {
|
|
forgotPassword: {
|
|
email: string;
|
|
password: string;
|
|
};
|
|
login: {
|
|
email: string;
|
|
password: string;
|
|
};
|
|
registerFirstUser: {
|
|
email: string;
|
|
password: string;
|
|
};
|
|
unlock: {
|
|
email: string;
|
|
password: string;
|
|
};
|
|
}
|
|
export interface CampaignUserAuthOperations {
|
|
forgotPassword:
|
|
| {
|
|
email: string;
|
|
}
|
|
| {
|
|
username: string;
|
|
};
|
|
login:
|
|
| {
|
|
email: string;
|
|
password: string;
|
|
}
|
|
| {
|
|
password: string;
|
|
username: string;
|
|
};
|
|
registerFirstUser: {
|
|
password: string;
|
|
username?: string;
|
|
email?: string;
|
|
};
|
|
unlock:
|
|
| {
|
|
email: string;
|
|
}
|
|
| {
|
|
username: string;
|
|
};
|
|
}
|
|
/**
|
|
* This interface was referenced by `Config`'s JSON-Schema
|
|
* via the `definition` "users".
|
|
*/
|
|
export interface User {
|
|
id: number;
|
|
/**
|
|
* Administrador: acesso total ao painel. Editor: publica notícias/tags/mídia — sem PII nem campanha. Contas novas de comunicação devem ser “Editor”.
|
|
*/
|
|
roles: ('admin' | 'editor')[];
|
|
updatedAt: string;
|
|
createdAt: string;
|
|
email: string;
|
|
resetPasswordToken?: string | null;
|
|
resetPasswordExpiration?: string | null;
|
|
salt?: string | null;
|
|
hash?: string | null;
|
|
loginAttempts?: number | null;
|
|
lockUntil?: string | null;
|
|
sessions?:
|
|
| {
|
|
id: string;
|
|
createdAt?: string | null;
|
|
expiresAt: string;
|
|
}[]
|
|
| null;
|
|
password?: string | null;
|
|
collection: 'users';
|
|
}
|
|
/**
|
|
* This interface was referenced by `Config`'s JSON-Schema
|
|
* via the `definition` "campaignUser".
|
|
*/
|
|
export interface CampaignUser {
|
|
id: number;
|
|
contact?: (number | null) | Contact;
|
|
name: string;
|
|
avatar?: (number | null) | Media;
|
|
role: 'coordinator' | 'advisor' | 'candidate' | 'leader';
|
|
phone?: string | null;
|
|
updatedAt: string;
|
|
createdAt: string;
|
|
email?: string | null;
|
|
username?: string | null;
|
|
resetPasswordToken?: string | null;
|
|
resetPasswordExpiration?: string | null;
|
|
salt?: string | null;
|
|
hash?: string | null;
|
|
loginAttempts?: number | null;
|
|
lockUntil?: string | null;
|
|
sessions?:
|
|
| {
|
|
id: string;
|
|
createdAt?: string | null;
|
|
expiresAt: string;
|
|
}[]
|
|
| null;
|
|
password?: string | null;
|
|
collection: 'campaignUser';
|
|
}
|
|
/**
|
|
* This interface was referenced by `Config`'s JSON-Schema
|
|
* via the `definition` "contact".
|
|
*/
|
|
export interface Contact {
|
|
id: number;
|
|
name: string;
|
|
email?: string | null;
|
|
phones?:
|
|
| {
|
|
value?: string | null;
|
|
id?: string | null;
|
|
}[]
|
|
| null;
|
|
gender?: ('feminino' | 'masculino' | 'outro' | 'nao_informado') | null;
|
|
state:
|
|
| 'AC'
|
|
| 'AL'
|
|
| 'AM'
|
|
| 'AP'
|
|
| 'BA'
|
|
| 'CE'
|
|
| 'DF'
|
|
| 'ES'
|
|
| 'GO'
|
|
| 'MA'
|
|
| 'MG'
|
|
| 'MS'
|
|
| 'MT'
|
|
| 'PA'
|
|
| 'PB'
|
|
| 'PE'
|
|
| 'PI'
|
|
| 'PR'
|
|
| 'RJ'
|
|
| 'RN'
|
|
| 'RO'
|
|
| 'RR'
|
|
| 'RS'
|
|
| 'SC'
|
|
| 'SE'
|
|
| 'SP'
|
|
| 'TO';
|
|
city?: string | null;
|
|
postalCode?: string | null;
|
|
updatedAt: string;
|
|
createdAt: string;
|
|
}
|
|
/**
|
|
* This interface was referenced by `Config`'s JSON-Schema
|
|
* via the `definition` "media".
|
|
*/
|
|
export interface Media {
|
|
id: number;
|
|
/**
|
|
* Descrição da imagem para acessibilidade.
|
|
*/
|
|
alt: string;
|
|
updatedAt: string;
|
|
createdAt: string;
|
|
url?: string | null;
|
|
thumbnailURL?: string | null;
|
|
filename?: string | null;
|
|
mimeType?: string | null;
|
|
filesize?: number | null;
|
|
width?: number | null;
|
|
height?: number | null;
|
|
focalX?: number | null;
|
|
focalY?: number | null;
|
|
}
|
|
/**
|
|
* Chaves públicas dos aparelhos que entram com digital ou Face ID. Nenhum dado biométrico é armazenado.
|
|
*
|
|
* This interface was referenced by `Config`'s JSON-Schema
|
|
* via the `definition` "campaignWebAuthnCredential".
|
|
*/
|
|
export interface CampaignWebAuthnCredential {
|
|
id: number;
|
|
user: number | CampaignUser;
|
|
credentialId: string;
|
|
publicKey: string;
|
|
counter: number;
|
|
transports?:
|
|
| {
|
|
[k: string]: unknown;
|
|
}
|
|
| unknown[]
|
|
| string
|
|
| number
|
|
| boolean
|
|
| null;
|
|
deviceLabel: string;
|
|
lastUsedAt?: string | null;
|
|
updatedAt: string;
|
|
createdAt: string;
|
|
}
|
|
/**
|
|
* Avisos in-app e push da campanha. Cada linha pertence a um destinatário.
|
|
*
|
|
* This interface was referenced by `Config`'s JSON-Schema
|
|
* via the `definition` "notification".
|
|
*/
|
|
export interface Notification {
|
|
id: number;
|
|
recipient: number | CampaignUser;
|
|
type: 'municipality_update' | 'new_supporter' | 'activity_attention' | 'invite_accepted';
|
|
/**
|
|
* Título, detalhe e href exibidos no sino e no push.
|
|
*/
|
|
payload:
|
|
| {
|
|
[k: string]: unknown;
|
|
}
|
|
| unknown[]
|
|
| string
|
|
| number
|
|
| boolean
|
|
| null;
|
|
municipality?: (number | null) | Municipality;
|
|
readAt?: string | null;
|
|
updatedAt: string;
|
|
createdAt: string;
|
|
}
|
|
/**
|
|
* Os 435 municípios operacionais são pré-definidos (município inteiro, ou zona eleitoral em Salvador) e criados por migração. A geografia não é editável.
|
|
*
|
|
* This interface was referenced by `Config`'s JSON-Schema
|
|
* via the `definition` "municipality".
|
|
*/
|
|
export interface Municipality {
|
|
id: number;
|
|
name: string;
|
|
slug: string;
|
|
kind: 'municipio' | 'zona';
|
|
city: string;
|
|
region: string;
|
|
ibgeCode: string;
|
|
tseCityCode: string;
|
|
/**
|
|
* Preenchido apenas para municípios de zona (Salvador).
|
|
*/
|
|
zoneNumber?: number | null;
|
|
advisors?: (number | CampaignUser)[] | null;
|
|
priority?: ('alta' | 'normal') | null;
|
|
/**
|
|
* Quanto a campanha investe neste município (N0 a N4). Movimento é decisão da coordenação e fica registrado em Decisões de alocação.
|
|
*/
|
|
engagementLevel?: ('n0' | 'n1' | 'n2' | 'n3' | 'n4') | null;
|
|
/**
|
|
* Motivo corrente do nível — o histórico vive em Decisões de alocação.
|
|
*/
|
|
levelNote?: string | null;
|
|
/**
|
|
* Derivado da última mudança de nível.
|
|
*/
|
|
levelChangedAt?: string | null;
|
|
/**
|
|
* Total esperado do município por cenário (pessimista/média/otimista) — distinto da soma das lideranças.
|
|
*/
|
|
expectedVotes?: {
|
|
pessimistic?: number | null;
|
|
central?: number | null;
|
|
optimistic?: number | null;
|
|
};
|
|
/**
|
|
* Leitura de conjuntura registrada pela coordenação (alianças, prefeitos, disputas locais) — não é série numérica.
|
|
*/
|
|
politicalTrend?: {
|
|
status?: ('favoravel' | 'neutra' | 'desfavoravel') | null;
|
|
note?: string | null;
|
|
recordedBy?: (number | null) | CampaignUser;
|
|
recordedAt?: string | null;
|
|
};
|
|
strengths?:
|
|
| {
|
|
text: string;
|
|
id?: string | null;
|
|
}[]
|
|
| null;
|
|
risks?:
|
|
| {
|
|
text: string;
|
|
id?: string | null;
|
|
}[]
|
|
| null;
|
|
stateDeputies?: (number | StateDeputy)[] | null;
|
|
/**
|
|
* Quem dobra no município hoje e o estado da negociação.
|
|
*/
|
|
dobradinhaNotes?: string | null;
|
|
/**
|
|
* Próximos passos operacionais para o município.
|
|
*/
|
|
nextSteps?: string | null;
|
|
/**
|
|
* Emendas parlamentares aportadas no município (valores, anos, situação) — nota manual da coordenação (G11).
|
|
*/
|
|
budgetNotes?: string | null;
|
|
/**
|
|
* Derivado automaticamente do feed de atualizações do município.
|
|
*/
|
|
lastUpdateAt?: string | null;
|
|
updatedAt: string;
|
|
createdAt: string;
|
|
}
|
|
/**
|
|
* Deputados estaduais com quem a campanha dobra. Vincule a municípios e lideranças nas fichas correspondentes.
|
|
*
|
|
* This interface was referenced by `Config`'s JSON-Schema
|
|
* via the `definition` "stateDeputy".
|
|
*/
|
|
export interface StateDeputy {
|
|
id: number;
|
|
contact: number | Contact;
|
|
slug: string;
|
|
party?: string | null;
|
|
/**
|
|
* Como o nome da dobradinha deve aparecer na urna (ex.: apelido ou abreviação).
|
|
*/
|
|
ballotName?: string | null;
|
|
notes?: string | null;
|
|
advisors?: (number | CampaignUser)[] | null;
|
|
createdBy?: (number | null) | CampaignUser;
|
|
updatedAt: string;
|
|
createdAt: string;
|
|
}
|
|
/**
|
|
* Endpoints Web Push por dispositivo. Não armazena dados biométricos.
|
|
*
|
|
* This interface was referenced by `Config`'s JSON-Schema
|
|
* via the `definition` "pushSubscription".
|
|
*/
|
|
export interface PushSubscription {
|
|
id: number;
|
|
user: number | CampaignUser;
|
|
endpoint: string;
|
|
p256dh: string;
|
|
auth: string;
|
|
expirationTime?: number | null;
|
|
consent: number | Consent;
|
|
consentContentHash: string;
|
|
consentedAt: string;
|
|
userAgent?: string | null;
|
|
updatedAt: string;
|
|
createdAt: string;
|
|
}
|
|
/**
|
|
* This interface was referenced by `Config`'s JSON-Schema
|
|
* via the `definition` "consent".
|
|
*/
|
|
export interface Consent {
|
|
id: number;
|
|
/**
|
|
* Identificador estável para referências no código.
|
|
*/
|
|
key?: string | null;
|
|
text: {
|
|
root: {
|
|
type: string;
|
|
children: {
|
|
type: any;
|
|
version: number;
|
|
[k: string]: unknown;
|
|
}[];
|
|
direction: ('ltr' | 'rtl') | null;
|
|
format: 'left' | 'start' | 'center' | 'right' | 'end' | 'justify' | '';
|
|
indent: number;
|
|
version: number;
|
|
};
|
|
[k: string]: unknown;
|
|
};
|
|
updatedAt: string;
|
|
createdAt: string;
|
|
}
|
|
/**
|
|
* This interface was referenced by `Config`'s JSON-Schema
|
|
* via the `definition` "campaignInvite".
|
|
*/
|
|
export interface CampaignInvite {
|
|
id: number;
|
|
tokenHash: string;
|
|
leadership: number | Leadership;
|
|
kind: 'login' | 'autopreenchimento';
|
|
expiresAt: string;
|
|
usedAt?: string | null;
|
|
revokedAt?: string | null;
|
|
createdBy: number | CampaignUser;
|
|
updatedAt: string;
|
|
createdAt: string;
|
|
}
|
|
/**
|
|
* This interface was referenced by `Config`'s JSON-Schema
|
|
* via the `definition` "leadership".
|
|
*/
|
|
export interface Leadership {
|
|
id: number;
|
|
contact: number | Contact;
|
|
municipalities: (number | Municipality)[];
|
|
organizations?: (number | Organization)[] | null;
|
|
stateDeputies?: (number | StateDeputy)[] | null;
|
|
advisors?: (number | CampaignUser)[] | null;
|
|
exclusive?: boolean | null;
|
|
supportStatus: 'engajado' | 'a_abordar' | 'em_disputa' | 'lembranca' | 'negativo';
|
|
user?: (number | null) | CampaignUser;
|
|
consent?: (number | null) | Consent;
|
|
consentContentHash?: string | null;
|
|
consentedAt?: string | null;
|
|
notes?: string | null;
|
|
createdBy?: (number | null) | CampaignUser;
|
|
updatedAt: string;
|
|
createdAt: string;
|
|
}
|
|
/**
|
|
* Sindicatos, associações, movimentos e afins. Concentra lideranças associadas e atividades apoiadas.
|
|
*
|
|
* This interface was referenced by `Config`'s JSON-Schema
|
|
* via the `definition` "organization".
|
|
*/
|
|
export interface Organization {
|
|
id: number;
|
|
name: string;
|
|
slug: string;
|
|
kind: 'sindicato' | 'associacao' | 'religioso' | 'movimento' | 'categoria_profissional' | 'outro';
|
|
municipalities?: (number | Municipality)[] | null;
|
|
notes?: string | null;
|
|
createdBy?: (number | null) | CampaignUser;
|
|
updatedAt: string;
|
|
createdAt: string;
|
|
}
|
|
/**
|
|
* This interface was referenced by `Config`'s JSON-Schema
|
|
* via the `definition` "campaignVoteSummarySnapshot".
|
|
*/
|
|
export interface CampaignVoteSummarySnapshot {
|
|
id: number;
|
|
/**
|
|
* Dia civil America/Bahia (`aaaa-mm-dd`), armazenado como meia-noite UTC.
|
|
*/
|
|
day: string;
|
|
scopeKey: string;
|
|
staffVoteTotalCentral: number;
|
|
updatedAt: string;
|
|
createdAt: string;
|
|
}
|
|
/**
|
|
* This interface was referenced by `Config`'s JSON-Schema
|
|
* via the `definition` "votePledge".
|
|
*/
|
|
export interface VotePledge {
|
|
id: number;
|
|
leadership: number | Leadership;
|
|
municipality: number | Municipality;
|
|
declaredVotes: number;
|
|
declaredAt?: string | null;
|
|
declaredBy?: (number | null) | CampaignUser;
|
|
/**
|
|
* Faixa interna pessimista / média / otimista. A liderança nunca vê estes números.
|
|
*/
|
|
estimatedVotes?: {
|
|
pessimistic?: number | null;
|
|
central?: number | null;
|
|
optimistic?: number | null;
|
|
};
|
|
estimateNote?: string | null;
|
|
estimatedBy?: (number | null) | CampaignUser;
|
|
estimatedAt?: string | null;
|
|
updatedAt: string;
|
|
createdAt: string;
|
|
}
|
|
/**
|
|
* This interface was referenced by `Config`'s JSON-Schema
|
|
* via the `definition` "allocationDecision".
|
|
*/
|
|
export interface AllocationDecision {
|
|
id: number;
|
|
municipality: number | Municipality;
|
|
patternId: string;
|
|
outcome: 'aceita' | 'descarta' | 'movimento' | 'adiada';
|
|
rationale?: string | null;
|
|
alternativeReading?: string | null;
|
|
/**
|
|
* Somente os números e classificações usados no momento da decisão.
|
|
*/
|
|
snapshot:
|
|
| {
|
|
[k: string]: unknown;
|
|
}
|
|
| unknown[]
|
|
| string
|
|
| number
|
|
| boolean
|
|
| null;
|
|
decidedBy?: (number | null) | CampaignUser;
|
|
updatedAt: string;
|
|
createdAt: string;
|
|
}
|
|
/**
|
|
* Necessidades operacionais da campanha. Custo e comprovantes são controle interno — não substituem a prestação de contas oficial (SPCE/TSE).
|
|
*
|
|
* This interface was referenced by `Config`'s JSON-Schema
|
|
* via the `definition` "campaignDemand".
|
|
*/
|
|
export interface CampaignDemand {
|
|
id: number;
|
|
title: string;
|
|
slug: string;
|
|
kind:
|
|
| 'material'
|
|
| 'servico'
|
|
| 'transporte'
|
|
| 'alimentacao'
|
|
| 'infraestrutura'
|
|
| 'espaco'
|
|
| 'equipamento'
|
|
| 'pessoal_apoio'
|
|
| 'outro';
|
|
description?: string | null;
|
|
municipality: number | Municipality;
|
|
activity?: (number | null) | Activity;
|
|
leadership?: (number | null) | Leadership;
|
|
status: 'aberta' | 'em_analise' | 'escalada' | 'aprovada' | 'rejeitada';
|
|
decisionNote?: string | null;
|
|
decidedBy?: (number | null) | CampaignUser;
|
|
decidedAt?: string | null;
|
|
/**
|
|
* Controle interno de gastos. Não substitui a prestação de contas oficial.
|
|
*/
|
|
cost?: number | null;
|
|
/**
|
|
* Documentos fiscais podem conter CPF/CNPJ — acesso restrito ao staff. Não substitui o SPCE.
|
|
*/
|
|
receipts?: (number | Media)[] | null;
|
|
statusHistory?:
|
|
| {
|
|
status: 'aberta' | 'em_analise' | 'escalada' | 'aprovada' | 'rejeitada';
|
|
note?: string | null;
|
|
author?: (number | null) | CampaignUser;
|
|
createdAt?: string | null;
|
|
id?: string | null;
|
|
}[]
|
|
| null;
|
|
createdBy?: (number | null) | CampaignUser;
|
|
updatedAt: string;
|
|
createdAt: string;
|
|
}
|
|
/**
|
|
* This interface was referenced by `Config`'s JSON-Schema
|
|
* via the `definition` "activity".
|
|
*/
|
|
export interface Activity {
|
|
id: number;
|
|
title: string;
|
|
slug: string;
|
|
/**
|
|
* Classificação livre do compromisso (ex.: comício, imprensa, reunião).
|
|
*/
|
|
tags?: string[] | null;
|
|
status: 'confirmado' | 'realizado' | 'cancelado';
|
|
description?: string | null;
|
|
/**
|
|
* Marque quando o deputado Jorge Solla estiver presente na atividade.
|
|
*/
|
|
deputyPresent?: boolean | null;
|
|
/**
|
|
* Compromisso que ocupa um ou mais dias inteiros, sem horário.
|
|
*/
|
|
allDay?: boolean | null;
|
|
startAt?: string | null;
|
|
endAt?: string | null;
|
|
municipality: number | Municipality;
|
|
locality?: string | null;
|
|
organizations?: (number | Organization)[] | null;
|
|
responsible?:
|
|
| (
|
|
| {
|
|
relationTo: 'campaignUser';
|
|
value: number | CampaignUser;
|
|
}
|
|
| {
|
|
relationTo: 'leadership';
|
|
value: number | Leadership;
|
|
}
|
|
| {
|
|
relationTo: 'stateDeputy';
|
|
value: number | StateDeputy;
|
|
}
|
|
)[]
|
|
| null;
|
|
tasks?:
|
|
| {
|
|
title: string;
|
|
responsible?: (number | null) | Contact;
|
|
done?: boolean | null;
|
|
doneAt?: string | null;
|
|
id?: string | null;
|
|
}[]
|
|
| null;
|
|
taskTotal?: number | null;
|
|
taskDoneCount?: number | null;
|
|
updates?:
|
|
| {
|
|
body: string;
|
|
author?: (number | null) | CampaignUser;
|
|
createdAt?: string | null;
|
|
id?: string | null;
|
|
}[]
|
|
| null;
|
|
/**
|
|
* O que aconteceu, público, aprendizados. Vira base para futuras atividades no mesmo município.
|
|
*/
|
|
resultSummary?: string | null;
|
|
resultMedia?: (number | Media)[] | null;
|
|
resultRecordedBy?: (number | null) | CampaignUser;
|
|
resultRecordedAt?: string | null;
|
|
lastMirroredChangeAt?: string | null;
|
|
createdBy?: (number | null) | CampaignUser;
|
|
updatedAt: string;
|
|
createdAt: string;
|
|
}
|
|
/**
|
|
* This interface was referenced by `Config`'s JSON-Schema
|
|
* via the `definition` "supporter".
|
|
*/
|
|
export interface Supporter {
|
|
id: number;
|
|
contact: number | Contact;
|
|
municipality?: (number | null) | Municipality;
|
|
voteIntention?: ('certo' | 'tende_a_certo' | 'indeciso' | 'outro') | null;
|
|
consent?: (number | null) | Consent;
|
|
consentContentHash?: string | null;
|
|
consentedAt?: string | null;
|
|
voteIntentionConsent?: (number | null) | Consent;
|
|
voteIntentionConsentContentHash?: string | null;
|
|
voteIntentionConsentedAt?: string | null;
|
|
source: 'import_csv' | 'manual' | 'lideranca' | 'convite' | 'evento';
|
|
consentNote?: string | null;
|
|
notes?: string | null;
|
|
createdBy?: (number | null) | CampaignUser;
|
|
updatedAt: string;
|
|
createdAt: string;
|
|
}
|
|
/**
|
|
* This interface was referenced by `Config`'s JSON-Schema
|
|
* via the `definition` "supporterImportBatch".
|
|
*/
|
|
export interface SupporterImportBatch {
|
|
id: number;
|
|
batchId: string;
|
|
actor: number | CampaignUser;
|
|
expiresAt: string;
|
|
rows:
|
|
| {
|
|
[k: string]: unknown;
|
|
}
|
|
| unknown[]
|
|
| string
|
|
| number
|
|
| boolean
|
|
| null;
|
|
updatedAt: string;
|
|
createdAt: string;
|
|
}
|
|
/**
|
|
* This interface was referenced by `Config`'s JSON-Schema
|
|
* via the `definition` "municipalityUpdate".
|
|
*/
|
|
export interface MunicipalityUpdate {
|
|
id: number;
|
|
municipality: number | Municipality;
|
|
author: number | CampaignUser;
|
|
polarity: 'boa' | 'neutra' | 'ruim';
|
|
urgent?: boolean | null;
|
|
adversarySignal?: boolean | null;
|
|
body: string;
|
|
activeVolunteers?: number | null;
|
|
newSupports?: number | null;
|
|
updatedAt: string;
|
|
createdAt: string;
|
|
}
|
|
/**
|
|
* This interface was referenced by `Config`'s JSON-Schema
|
|
* via the `definition` "calendarFeed".
|
|
*/
|
|
export interface CalendarFeed {
|
|
id: number;
|
|
secretSlug: string;
|
|
/**
|
|
* Nome descritivo para identificar o feed (ex: "Só deputado presente")
|
|
*/
|
|
label: string;
|
|
/**
|
|
* Se vazio, inclui todos os municípios do escopo do criador
|
|
*/
|
|
filterMunicipality?: (number | null) | Municipality;
|
|
filterDeputyPresent?: boolean | null;
|
|
/**
|
|
* Se vazio, inclui todas as tags
|
|
*/
|
|
filterTag?: string | null;
|
|
revokedAt?: string | null;
|
|
createdBy: number | CampaignUser;
|
|
updatedAt: string;
|
|
createdAt: string;
|
|
}
|
|
/**
|
|
* This interface was referenced by `Config`'s JSON-Schema
|
|
* via the `definition` "googleCalendarSync".
|
|
*/
|
|
export interface GoogleCalendarSync {
|
|
id: number;
|
|
/**
|
|
* O calendarId do calendário "Agenda da Campanha" na conta Google da campanha (ex.: c_…@group.calendar.google.com). O calendário precisa estar público no link e a service account com permissão de edição.
|
|
*/
|
|
calendarId?: string | null;
|
|
/**
|
|
* Enquanto preenchido, o Teqo não escreve no Google.
|
|
*/
|
|
disabledAt?: string | null;
|
|
lastSyncedAt?: string | null;
|
|
lastSuccessAt?: string | null;
|
|
lastErrorAt?: string | null;
|
|
lastError?: string | null;
|
|
pushChannelId?: string | null;
|
|
pushChannelResourceId?: string | null;
|
|
pushChannelExpiresAt?: string | null;
|
|
pushChannelSecret?: string | null;
|
|
pushChannelError?: string | null;
|
|
lastSeenEventIds?:
|
|
| {
|
|
[k: string]: unknown;
|
|
}
|
|
| unknown[]
|
|
| string
|
|
| number
|
|
| boolean
|
|
| null;
|
|
updatedAt: string;
|
|
createdAt: string;
|
|
}
|
|
/**
|
|
* Totais oficiais TSE por município e zona (dado público).
|
|
*
|
|
* This interface was referenced by `Config`'s JSON-Schema
|
|
* via the `definition` "electionTally".
|
|
*/
|
|
export interface ElectionTally {
|
|
id: number;
|
|
year: number;
|
|
office: 'presidente' | 'governador' | 'deputado_federal' | 'deputado_estadual';
|
|
turn: '1' | '2';
|
|
state: string;
|
|
cityCode: string;
|
|
cityName: string;
|
|
zoneNumber: number;
|
|
aptos: number;
|
|
comparecimento: number;
|
|
abstencoes: number;
|
|
votosValidos: number;
|
|
votosNominaisValidos: number;
|
|
votosLegenda: number;
|
|
votosBranco: number;
|
|
votosNulo: number;
|
|
votosAnulados: number;
|
|
winnerCandidateNumber?: number | null;
|
|
winnerCandidateName?: string | null;
|
|
winnerVotes?: number | null;
|
|
winnerCoalition?: string | null;
|
|
winnerParty?: string | null;
|
|
updatedAt: string;
|
|
createdAt: string;
|
|
}
|
|
/**
|
|
* Votos nominais oficiais TSE por município e zona (dado público).
|
|
*
|
|
* This interface was referenced by `Config`'s JSON-Schema
|
|
* via the `definition` "electionCandidateVote".
|
|
*/
|
|
export interface ElectionCandidateVote {
|
|
id: number;
|
|
year: number;
|
|
office: 'presidente' | 'governador' | 'deputado_federal' | 'deputado_estadual';
|
|
turn: '1' | '2';
|
|
state: string;
|
|
cityCode: string;
|
|
cityName: string;
|
|
zoneNumber: number;
|
|
candidateNumber: number;
|
|
candidateName: string;
|
|
coalition?: string | null;
|
|
party?: string | null;
|
|
voteType: 'nominal' | 'legenda';
|
|
votes: number;
|
|
updatedAt: string;
|
|
createdAt: string;
|
|
}
|
|
/**
|
|
* Registro de candidatura TSE (dado público).
|
|
*
|
|
* This interface was referenced by `Config`'s JSON-Schema
|
|
* via the `definition` "electionCandidate".
|
|
*/
|
|
export interface ElectionCandidate {
|
|
id: number;
|
|
year: number;
|
|
office: 'presidente' | 'governador' | 'deputado_federal' | 'deputado_estadual';
|
|
turn: '1' | '2';
|
|
state: string;
|
|
candidateNumber: number;
|
|
urnaName: string;
|
|
completeName?: string | null;
|
|
party?: string | null;
|
|
coalition?: string | null;
|
|
candidateStatus?: string | null;
|
|
elected?: boolean | null;
|
|
electedBy?: ('QP' | 'média' | '2º turno') | null;
|
|
totalVotesState?: number | null;
|
|
/**
|
|
* sha256(nome urna + naturalidade + partido); só dados públicos.
|
|
*/
|
|
identityKey?: string | null;
|
|
runningAgain2026: 'sim' | 'nao' | 'desconhecido';
|
|
updatedAt: string;
|
|
createdAt: string;
|
|
}
|
|
/**
|
|
* This interface was referenced by `Config`'s JSON-Schema
|
|
* via the `definition` "petition".
|
|
*/
|
|
export interface Petition {
|
|
id: string;
|
|
title: string;
|
|
subtitle: string;
|
|
enabled: boolean;
|
|
body: {
|
|
root: {
|
|
type: string;
|
|
children: {
|
|
type: any;
|
|
version: number;
|
|
[k: string]: unknown;
|
|
}[];
|
|
direction: ('ltr' | 'rtl') | null;
|
|
format: 'left' | 'start' | 'center' | 'right' | 'end' | 'justify' | '';
|
|
indent: number;
|
|
version: number;
|
|
};
|
|
[k: string]: unknown;
|
|
};
|
|
form: {
|
|
title?: string | null;
|
|
subtitle?: string | null;
|
|
consent: number | Consent;
|
|
};
|
|
tracking?: {
|
|
/**
|
|
* Cole somente o ID numérico do Events Manager (ex.: 123456789012345), não o snippet HTML completo.
|
|
*/
|
|
facebookPixelId?: string | null;
|
|
};
|
|
updatedAt: string;
|
|
createdAt: string;
|
|
_status?: ('draft' | 'published') | null;
|
|
}
|
|
/**
|
|
* This interface was referenced by `Config`'s JSON-Schema
|
|
* via the `definition` "signature".
|
|
*/
|
|
export interface Signature {
|
|
id: number;
|
|
contact: number | Contact;
|
|
petition: string | Petition;
|
|
consent: number | Consent;
|
|
comment?: string | null;
|
|
updatedAt: string;
|
|
createdAt: string;
|
|
}
|
|
/**
|
|
* This interface was referenced by `Config`'s JSON-Schema
|
|
* via the `definition` "subscription".
|
|
*/
|
|
export interface Subscription {
|
|
id: number;
|
|
contact: number | Contact;
|
|
consent: number | Consent;
|
|
comment?: string | null;
|
|
updatedAt: string;
|
|
createdAt: string;
|
|
}
|
|
/**
|
|
* This interface was referenced by `Config`'s JSON-Schema
|
|
* via the `definition` "post".
|
|
*/
|
|
export interface Post {
|
|
id: number;
|
|
title: string;
|
|
/**
|
|
* Gerado automaticamente a partir do título quando vazio.
|
|
*/
|
|
slug?: string | null;
|
|
type: 'noticia' | 'campanha' | 'artigo' | 'evento';
|
|
category: number | Tag;
|
|
tags?: (number | Tag)[] | null;
|
|
subtitle?: string | null;
|
|
coverImage?: (number | null) | Media;
|
|
publishedDate?: string | null;
|
|
body?: {
|
|
root: {
|
|
type: string;
|
|
children: {
|
|
type: any;
|
|
version: number;
|
|
[k: string]: unknown;
|
|
}[];
|
|
direction: ('ltr' | 'rtl') | null;
|
|
format: 'left' | 'start' | 'center' | 'right' | 'end' | 'justify' | '';
|
|
indent: number;
|
|
version: number;
|
|
};
|
|
[k: string]: unknown;
|
|
} | null;
|
|
updatedAt: string;
|
|
createdAt: string;
|
|
_status?: ('draft' | 'published') | null;
|
|
}
|
|
/**
|
|
* This interface was referenced by `Config`'s JSON-Schema
|
|
* via the `definition` "tag".
|
|
*/
|
|
export interface Tag {
|
|
id: number;
|
|
name: string;
|
|
/**
|
|
* Gerado automaticamente a partir do nome quando vazio.
|
|
*/
|
|
slug?: string | null;
|
|
/**
|
|
* Esconde do site todas as publicações com esta tag.
|
|
*/
|
|
hidden?: boolean | null;
|
|
updatedAt: string;
|
|
createdAt: string;
|
|
}
|
|
/**
|
|
* This interface was referenced by `Config`'s JSON-Schema
|
|
* via the `definition` "exports".
|
|
*/
|
|
export interface Export {
|
|
id: number;
|
|
name?: string | null;
|
|
format: 'csv' | 'json';
|
|
limit?: number | null;
|
|
page?: number | null;
|
|
sort?: string | null;
|
|
sortOrder?: ('asc' | 'desc') | null;
|
|
drafts?: ('yes' | 'no') | null;
|
|
selectionToUse?: ('currentSelection' | 'currentFilters' | 'all') | null;
|
|
fields?: string[] | null;
|
|
collectionSlug: string;
|
|
where?:
|
|
| {
|
|
[k: string]: unknown;
|
|
}
|
|
| unknown[]
|
|
| string
|
|
| number
|
|
| boolean
|
|
| null;
|
|
updatedAt: string;
|
|
createdAt: string;
|
|
url?: string | null;
|
|
thumbnailURL?: string | null;
|
|
filename?: string | null;
|
|
mimeType?: string | null;
|
|
filesize?: number | null;
|
|
width?: number | null;
|
|
height?: number | null;
|
|
focalX?: number | null;
|
|
focalY?: number | null;
|
|
}
|
|
/**
|
|
* This interface was referenced by `Config`'s JSON-Schema
|
|
* via the `definition` "imports".
|
|
*/
|
|
export interface Import {
|
|
id: number;
|
|
collectionSlug: string;
|
|
importMode?: ('create' | 'update' | 'upsert') | null;
|
|
matchField?: string | null;
|
|
status?: ('pending' | 'completed' | 'partial' | 'failed') | null;
|
|
summary?: {
|
|
imported?: number | null;
|
|
updated?: number | null;
|
|
total?: number | null;
|
|
issues?: number | null;
|
|
issueDetails?:
|
|
| {
|
|
[k: string]: unknown;
|
|
}
|
|
| unknown[]
|
|
| string
|
|
| number
|
|
| boolean
|
|
| null;
|
|
};
|
|
updatedAt: string;
|
|
createdAt: string;
|
|
url?: string | null;
|
|
thumbnailURL?: string | null;
|
|
filename?: string | null;
|
|
mimeType?: string | null;
|
|
filesize?: number | null;
|
|
width?: number | null;
|
|
height?: number | null;
|
|
focalX?: number | null;
|
|
focalY?: number | null;
|
|
}
|
|
/**
|
|
* This interface was referenced by `Config`'s JSON-Schema
|
|
* via the `definition` "payload-kv".
|
|
*/
|
|
export interface PayloadKv {
|
|
id: number;
|
|
key: string;
|
|
data:
|
|
| {
|
|
[k: string]: unknown;
|
|
}
|
|
| unknown[]
|
|
| string
|
|
| number
|
|
| boolean
|
|
| null;
|
|
}
|
|
/**
|
|
* This interface was referenced by `Config`'s JSON-Schema
|
|
* via the `definition` "payload-jobs".
|
|
*/
|
|
export interface PayloadJob {
|
|
id: number;
|
|
/**
|
|
* Input data provided to the job
|
|
*/
|
|
input?:
|
|
| {
|
|
[k: string]: unknown;
|
|
}
|
|
| unknown[]
|
|
| string
|
|
| number
|
|
| boolean
|
|
| null;
|
|
taskStatus?:
|
|
| {
|
|
[k: string]: unknown;
|
|
}
|
|
| unknown[]
|
|
| string
|
|
| number
|
|
| boolean
|
|
| null;
|
|
completedAt?: string | null;
|
|
totalTried?: number | null;
|
|
/**
|
|
* If hasError is true this job will not be retried
|
|
*/
|
|
hasError?: boolean | null;
|
|
/**
|
|
* If hasError is true, this is the error that caused it
|
|
*/
|
|
error?:
|
|
| {
|
|
[k: string]: unknown;
|
|
}
|
|
| unknown[]
|
|
| string
|
|
| number
|
|
| boolean
|
|
| null;
|
|
/**
|
|
* Task execution log
|
|
*/
|
|
log?:
|
|
| {
|
|
executedAt: string;
|
|
completedAt: string;
|
|
taskSlug: 'inline' | 'createCollectionExport' | 'createCollectionImport' | 'schedulePublish';
|
|
taskID: string;
|
|
input?:
|
|
| {
|
|
[k: string]: unknown;
|
|
}
|
|
| unknown[]
|
|
| string
|
|
| number
|
|
| boolean
|
|
| null;
|
|
output?:
|
|
| {
|
|
[k: string]: unknown;
|
|
}
|
|
| unknown[]
|
|
| string
|
|
| number
|
|
| boolean
|
|
| null;
|
|
state: 'failed' | 'succeeded';
|
|
error?:
|
|
| {
|
|
[k: string]: unknown;
|
|
}
|
|
| unknown[]
|
|
| string
|
|
| number
|
|
| boolean
|
|
| null;
|
|
id?: string | null;
|
|
}[]
|
|
| null;
|
|
taskSlug?: ('inline' | 'createCollectionExport' | 'createCollectionImport' | 'schedulePublish') | null;
|
|
queue?: string | null;
|
|
waitUntil?: string | null;
|
|
processing?: boolean | null;
|
|
updatedAt: string;
|
|
createdAt: string;
|
|
}
|
|
/**
|
|
* This interface was referenced by `Config`'s JSON-Schema
|
|
* via the `definition` "payload-locked-documents".
|
|
*/
|
|
export interface PayloadLockedDocument {
|
|
id: number;
|
|
document?:
|
|
| ({
|
|
relationTo: 'users';
|
|
value: number | User;
|
|
} | null)
|
|
| ({
|
|
relationTo: 'campaignUser';
|
|
value: number | CampaignUser;
|
|
} | null)
|
|
| ({
|
|
relationTo: 'campaignWebAuthnCredential';
|
|
value: number | CampaignWebAuthnCredential;
|
|
} | null)
|
|
| ({
|
|
relationTo: 'notification';
|
|
value: number | Notification;
|
|
} | null)
|
|
| ({
|
|
relationTo: 'pushSubscription';
|
|
value: number | PushSubscription;
|
|
} | null)
|
|
| ({
|
|
relationTo: 'campaignInvite';
|
|
value: number | CampaignInvite;
|
|
} | null)
|
|
| ({
|
|
relationTo: 'campaignVoteSummarySnapshot';
|
|
value: number | CampaignVoteSummarySnapshot;
|
|
} | null)
|
|
| ({
|
|
relationTo: 'municipality';
|
|
value: number | Municipality;
|
|
} | null)
|
|
| ({
|
|
relationTo: 'leadership';
|
|
value: number | Leadership;
|
|
} | null)
|
|
| ({
|
|
relationTo: 'organization';
|
|
value: number | Organization;
|
|
} | null)
|
|
| ({
|
|
relationTo: 'stateDeputy';
|
|
value: number | StateDeputy;
|
|
} | null)
|
|
| ({
|
|
relationTo: 'votePledge';
|
|
value: number | VotePledge;
|
|
} | null)
|
|
| ({
|
|
relationTo: 'allocationDecision';
|
|
value: number | AllocationDecision;
|
|
} | null)
|
|
| ({
|
|
relationTo: 'campaignDemand';
|
|
value: number | CampaignDemand;
|
|
} | null)
|
|
| ({
|
|
relationTo: 'supporter';
|
|
value: number | Supporter;
|
|
} | null)
|
|
| ({
|
|
relationTo: 'supporterImportBatch';
|
|
value: number | SupporterImportBatch;
|
|
} | null)
|
|
| ({
|
|
relationTo: 'municipalityUpdate';
|
|
value: number | MunicipalityUpdate;
|
|
} | null)
|
|
| ({
|
|
relationTo: 'activity';
|
|
value: number | Activity;
|
|
} | null)
|
|
| ({
|
|
relationTo: 'calendarFeed';
|
|
value: number | CalendarFeed;
|
|
} | null)
|
|
| ({
|
|
relationTo: 'googleCalendarSync';
|
|
value: number | GoogleCalendarSync;
|
|
} | null)
|
|
| ({
|
|
relationTo: 'electionTally';
|
|
value: number | ElectionTally;
|
|
} | null)
|
|
| ({
|
|
relationTo: 'electionCandidateVote';
|
|
value: number | ElectionCandidateVote;
|
|
} | null)
|
|
| ({
|
|
relationTo: 'electionCandidate';
|
|
value: number | ElectionCandidate;
|
|
} | null)
|
|
| ({
|
|
relationTo: 'media';
|
|
value: number | Media;
|
|
} | null)
|
|
| ({
|
|
relationTo: 'petition';
|
|
value: string | Petition;
|
|
} | null)
|
|
| ({
|
|
relationTo: 'contact';
|
|
value: number | Contact;
|
|
} | null)
|
|
| ({
|
|
relationTo: 'consent';
|
|
value: number | Consent;
|
|
} | null)
|
|
| ({
|
|
relationTo: 'signature';
|
|
value: number | Signature;
|
|
} | null)
|
|
| ({
|
|
relationTo: 'subscription';
|
|
value: number | Subscription;
|
|
} | null)
|
|
| ({
|
|
relationTo: 'post';
|
|
value: number | Post;
|
|
} | null)
|
|
| ({
|
|
relationTo: 'tag';
|
|
value: number | Tag;
|
|
} | null);
|
|
globalSlug?: string | null;
|
|
user:
|
|
| {
|
|
relationTo: 'users';
|
|
value: number | User;
|
|
}
|
|
| {
|
|
relationTo: 'campaignUser';
|
|
value: number | CampaignUser;
|
|
};
|
|
updatedAt: string;
|
|
createdAt: string;
|
|
}
|
|
/**
|
|
* This interface was referenced by `Config`'s JSON-Schema
|
|
* via the `definition` "payload-preferences".
|
|
*/
|
|
export interface PayloadPreference {
|
|
id: number;
|
|
user:
|
|
| {
|
|
relationTo: 'users';
|
|
value: number | User;
|
|
}
|
|
| {
|
|
relationTo: 'campaignUser';
|
|
value: number | CampaignUser;
|
|
};
|
|
key?: string | null;
|
|
value?:
|
|
| {
|
|
[k: string]: unknown;
|
|
}
|
|
| unknown[]
|
|
| string
|
|
| number
|
|
| boolean
|
|
| null;
|
|
updatedAt: string;
|
|
createdAt: string;
|
|
}
|
|
/**
|
|
* This interface was referenced by `Config`'s JSON-Schema
|
|
* via the `definition` "payload-migrations".
|
|
*/
|
|
export interface PayloadMigration {
|
|
id: number;
|
|
name?: string | null;
|
|
batch?: number | null;
|
|
updatedAt: string;
|
|
createdAt: string;
|
|
}
|
|
/**
|
|
* This interface was referenced by `Config`'s JSON-Schema
|
|
* via the `definition` "users_select".
|
|
*/
|
|
export interface UsersSelect<T extends boolean = true> {
|
|
roles?: T;
|
|
updatedAt?: T;
|
|
createdAt?: T;
|
|
email?: T;
|
|
resetPasswordToken?: T;
|
|
resetPasswordExpiration?: T;
|
|
salt?: T;
|
|
hash?: T;
|
|
loginAttempts?: T;
|
|
lockUntil?: T;
|
|
sessions?:
|
|
| T
|
|
| {
|
|
id?: T;
|
|
createdAt?: T;
|
|
expiresAt?: T;
|
|
};
|
|
}
|
|
/**
|
|
* This interface was referenced by `Config`'s JSON-Schema
|
|
* via the `definition` "campaignUser_select".
|
|
*/
|
|
export interface CampaignUserSelect<T extends boolean = true> {
|
|
contact?: T;
|
|
name?: T;
|
|
avatar?: T;
|
|
role?: T;
|
|
phone?: T;
|
|
updatedAt?: T;
|
|
createdAt?: T;
|
|
email?: T;
|
|
username?: T;
|
|
resetPasswordToken?: T;
|
|
resetPasswordExpiration?: T;
|
|
salt?: T;
|
|
hash?: T;
|
|
loginAttempts?: T;
|
|
lockUntil?: T;
|
|
sessions?:
|
|
| T
|
|
| {
|
|
id?: T;
|
|
createdAt?: T;
|
|
expiresAt?: T;
|
|
};
|
|
}
|
|
/**
|
|
* This interface was referenced by `Config`'s JSON-Schema
|
|
* via the `definition` "campaignWebAuthnCredential_select".
|
|
*/
|
|
export interface CampaignWebAuthnCredentialSelect<T extends boolean = true> {
|
|
user?: T;
|
|
credentialId?: T;
|
|
publicKey?: T;
|
|
counter?: T;
|
|
transports?: T;
|
|
deviceLabel?: T;
|
|
lastUsedAt?: T;
|
|
updatedAt?: T;
|
|
createdAt?: T;
|
|
}
|
|
/**
|
|
* This interface was referenced by `Config`'s JSON-Schema
|
|
* via the `definition` "notification_select".
|
|
*/
|
|
export interface NotificationSelect<T extends boolean = true> {
|
|
recipient?: T;
|
|
type?: T;
|
|
payload?: T;
|
|
municipality?: T;
|
|
readAt?: T;
|
|
updatedAt?: T;
|
|
createdAt?: T;
|
|
}
|
|
/**
|
|
* This interface was referenced by `Config`'s JSON-Schema
|
|
* via the `definition` "pushSubscription_select".
|
|
*/
|
|
export interface PushSubscriptionSelect<T extends boolean = true> {
|
|
user?: T;
|
|
endpoint?: T;
|
|
p256dh?: T;
|
|
auth?: T;
|
|
expirationTime?: T;
|
|
consent?: T;
|
|
consentContentHash?: T;
|
|
consentedAt?: T;
|
|
userAgent?: T;
|
|
updatedAt?: T;
|
|
createdAt?: T;
|
|
}
|
|
/**
|
|
* This interface was referenced by `Config`'s JSON-Schema
|
|
* via the `definition` "campaignInvite_select".
|
|
*/
|
|
export interface CampaignInviteSelect<T extends boolean = true> {
|
|
tokenHash?: T;
|
|
leadership?: T;
|
|
kind?: T;
|
|
expiresAt?: T;
|
|
usedAt?: T;
|
|
revokedAt?: T;
|
|
createdBy?: T;
|
|
updatedAt?: T;
|
|
createdAt?: T;
|
|
}
|
|
/**
|
|
* This interface was referenced by `Config`'s JSON-Schema
|
|
* via the `definition` "campaignVoteSummarySnapshot_select".
|
|
*/
|
|
export interface CampaignVoteSummarySnapshotSelect<T extends boolean = true> {
|
|
day?: T;
|
|
scopeKey?: T;
|
|
staffVoteTotalCentral?: T;
|
|
updatedAt?: T;
|
|
createdAt?: T;
|
|
}
|
|
/**
|
|
* This interface was referenced by `Config`'s JSON-Schema
|
|
* via the `definition` "municipality_select".
|
|
*/
|
|
export interface MunicipalitySelect<T extends boolean = true> {
|
|
name?: T;
|
|
slug?: T;
|
|
kind?: T;
|
|
city?: T;
|
|
region?: T;
|
|
ibgeCode?: T;
|
|
tseCityCode?: T;
|
|
zoneNumber?: T;
|
|
advisors?: T;
|
|
priority?: T;
|
|
engagementLevel?: T;
|
|
levelNote?: T;
|
|
levelChangedAt?: T;
|
|
expectedVotes?:
|
|
| T
|
|
| {
|
|
pessimistic?: T;
|
|
central?: T;
|
|
optimistic?: T;
|
|
};
|
|
politicalTrend?:
|
|
| T
|
|
| {
|
|
status?: T;
|
|
note?: T;
|
|
recordedBy?: T;
|
|
recordedAt?: T;
|
|
};
|
|
strengths?:
|
|
| T
|
|
| {
|
|
text?: T;
|
|
id?: T;
|
|
};
|
|
risks?:
|
|
| T
|
|
| {
|
|
text?: T;
|
|
id?: T;
|
|
};
|
|
stateDeputies?: T;
|
|
dobradinhaNotes?: T;
|
|
nextSteps?: T;
|
|
budgetNotes?: T;
|
|
lastUpdateAt?: T;
|
|
updatedAt?: T;
|
|
createdAt?: T;
|
|
}
|
|
/**
|
|
* This interface was referenced by `Config`'s JSON-Schema
|
|
* via the `definition` "leadership_select".
|
|
*/
|
|
export interface LeadershipSelect<T extends boolean = true> {
|
|
contact?: T;
|
|
municipalities?: T;
|
|
organizations?: T;
|
|
stateDeputies?: T;
|
|
advisors?: T;
|
|
exclusive?: T;
|
|
supportStatus?: T;
|
|
user?: T;
|
|
consent?: T;
|
|
consentContentHash?: T;
|
|
consentedAt?: T;
|
|
notes?: T;
|
|
createdBy?: T;
|
|
updatedAt?: T;
|
|
createdAt?: T;
|
|
}
|
|
/**
|
|
* This interface was referenced by `Config`'s JSON-Schema
|
|
* via the `definition` "organization_select".
|
|
*/
|
|
export interface OrganizationSelect<T extends boolean = true> {
|
|
name?: T;
|
|
slug?: T;
|
|
kind?: T;
|
|
municipalities?: T;
|
|
notes?: T;
|
|
createdBy?: T;
|
|
updatedAt?: T;
|
|
createdAt?: T;
|
|
}
|
|
/**
|
|
* This interface was referenced by `Config`'s JSON-Schema
|
|
* via the `definition` "stateDeputy_select".
|
|
*/
|
|
export interface StateDeputySelect<T extends boolean = true> {
|
|
contact?: T;
|
|
slug?: T;
|
|
party?: T;
|
|
ballotName?: T;
|
|
notes?: T;
|
|
advisors?: T;
|
|
createdBy?: T;
|
|
updatedAt?: T;
|
|
createdAt?: T;
|
|
}
|
|
/**
|
|
* This interface was referenced by `Config`'s JSON-Schema
|
|
* via the `definition` "votePledge_select".
|
|
*/
|
|
export interface VotePledgeSelect<T extends boolean = true> {
|
|
leadership?: T;
|
|
municipality?: T;
|
|
declaredVotes?: T;
|
|
declaredAt?: T;
|
|
declaredBy?: T;
|
|
estimatedVotes?:
|
|
| T
|
|
| {
|
|
pessimistic?: T;
|
|
central?: T;
|
|
optimistic?: T;
|
|
};
|
|
estimateNote?: T;
|
|
estimatedBy?: T;
|
|
estimatedAt?: T;
|
|
updatedAt?: T;
|
|
createdAt?: T;
|
|
}
|
|
/**
|
|
* This interface was referenced by `Config`'s JSON-Schema
|
|
* via the `definition` "allocationDecision_select".
|
|
*/
|
|
export interface AllocationDecisionSelect<T extends boolean = true> {
|
|
municipality?: T;
|
|
patternId?: T;
|
|
outcome?: T;
|
|
rationale?: T;
|
|
alternativeReading?: T;
|
|
snapshot?: T;
|
|
decidedBy?: T;
|
|
updatedAt?: T;
|
|
createdAt?: T;
|
|
}
|
|
/**
|
|
* This interface was referenced by `Config`'s JSON-Schema
|
|
* via the `definition` "campaignDemand_select".
|
|
*/
|
|
export interface CampaignDemandSelect<T extends boolean = true> {
|
|
title?: T;
|
|
slug?: T;
|
|
kind?: T;
|
|
description?: T;
|
|
municipality?: T;
|
|
activity?: T;
|
|
leadership?: T;
|
|
status?: T;
|
|
decisionNote?: T;
|
|
decidedBy?: T;
|
|
decidedAt?: T;
|
|
cost?: T;
|
|
receipts?: T;
|
|
statusHistory?:
|
|
| T
|
|
| {
|
|
status?: T;
|
|
note?: T;
|
|
author?: T;
|
|
createdAt?: T;
|
|
id?: T;
|
|
};
|
|
createdBy?: T;
|
|
updatedAt?: T;
|
|
createdAt?: T;
|
|
}
|
|
/**
|
|
* This interface was referenced by `Config`'s JSON-Schema
|
|
* via the `definition` "supporter_select".
|
|
*/
|
|
export interface SupporterSelect<T extends boolean = true> {
|
|
contact?: T;
|
|
municipality?: T;
|
|
voteIntention?: T;
|
|
consent?: T;
|
|
consentContentHash?: T;
|
|
consentedAt?: T;
|
|
voteIntentionConsent?: T;
|
|
voteIntentionConsentContentHash?: T;
|
|
voteIntentionConsentedAt?: T;
|
|
source?: T;
|
|
consentNote?: T;
|
|
notes?: T;
|
|
createdBy?: T;
|
|
updatedAt?: T;
|
|
createdAt?: T;
|
|
}
|
|
/**
|
|
* This interface was referenced by `Config`'s JSON-Schema
|
|
* via the `definition` "supporterImportBatch_select".
|
|
*/
|
|
export interface SupporterImportBatchSelect<T extends boolean = true> {
|
|
batchId?: T;
|
|
actor?: T;
|
|
expiresAt?: T;
|
|
rows?: T;
|
|
updatedAt?: T;
|
|
createdAt?: T;
|
|
}
|
|
/**
|
|
* This interface was referenced by `Config`'s JSON-Schema
|
|
* via the `definition` "municipalityUpdate_select".
|
|
*/
|
|
export interface MunicipalityUpdateSelect<T extends boolean = true> {
|
|
municipality?: T;
|
|
author?: T;
|
|
polarity?: T;
|
|
urgent?: T;
|
|
adversarySignal?: T;
|
|
body?: T;
|
|
activeVolunteers?: T;
|
|
newSupports?: T;
|
|
updatedAt?: T;
|
|
createdAt?: T;
|
|
}
|
|
/**
|
|
* This interface was referenced by `Config`'s JSON-Schema
|
|
* via the `definition` "activity_select".
|
|
*/
|
|
export interface ActivitySelect<T extends boolean = true> {
|
|
title?: T;
|
|
slug?: T;
|
|
tags?: T;
|
|
status?: T;
|
|
description?: T;
|
|
deputyPresent?: T;
|
|
allDay?: T;
|
|
startAt?: T;
|
|
endAt?: T;
|
|
municipality?: T;
|
|
locality?: T;
|
|
organizations?: T;
|
|
responsible?: T;
|
|
tasks?:
|
|
| T
|
|
| {
|
|
title?: T;
|
|
responsible?: T;
|
|
done?: T;
|
|
doneAt?: T;
|
|
id?: T;
|
|
};
|
|
taskTotal?: T;
|
|
taskDoneCount?: T;
|
|
updates?:
|
|
| T
|
|
| {
|
|
body?: T;
|
|
author?: T;
|
|
createdAt?: T;
|
|
id?: T;
|
|
};
|
|
resultSummary?: T;
|
|
resultMedia?: T;
|
|
resultRecordedBy?: T;
|
|
resultRecordedAt?: T;
|
|
lastMirroredChangeAt?: T;
|
|
createdBy?: T;
|
|
updatedAt?: T;
|
|
createdAt?: T;
|
|
}
|
|
/**
|
|
* This interface was referenced by `Config`'s JSON-Schema
|
|
* via the `definition` "calendarFeed_select".
|
|
*/
|
|
export interface CalendarFeedSelect<T extends boolean = true> {
|
|
secretSlug?: T;
|
|
label?: T;
|
|
filterMunicipality?: T;
|
|
filterDeputyPresent?: T;
|
|
filterTag?: T;
|
|
revokedAt?: T;
|
|
createdBy?: T;
|
|
updatedAt?: T;
|
|
createdAt?: T;
|
|
}
|
|
/**
|
|
* This interface was referenced by `Config`'s JSON-Schema
|
|
* via the `definition` "googleCalendarSync_select".
|
|
*/
|
|
export interface GoogleCalendarSyncSelect<T extends boolean = true> {
|
|
calendarId?: T;
|
|
disabledAt?: T;
|
|
lastSyncedAt?: T;
|
|
lastSuccessAt?: T;
|
|
lastErrorAt?: T;
|
|
lastError?: T;
|
|
pushChannelId?: T;
|
|
pushChannelResourceId?: T;
|
|
pushChannelExpiresAt?: T;
|
|
pushChannelSecret?: T;
|
|
pushChannelError?: T;
|
|
lastSeenEventIds?: T;
|
|
updatedAt?: T;
|
|
createdAt?: T;
|
|
}
|
|
/**
|
|
* This interface was referenced by `Config`'s JSON-Schema
|
|
* via the `definition` "electionTally_select".
|
|
*/
|
|
export interface ElectionTallySelect<T extends boolean = true> {
|
|
year?: T;
|
|
office?: T;
|
|
turn?: T;
|
|
state?: T;
|
|
cityCode?: T;
|
|
cityName?: T;
|
|
zoneNumber?: T;
|
|
aptos?: T;
|
|
comparecimento?: T;
|
|
abstencoes?: T;
|
|
votosValidos?: T;
|
|
votosNominaisValidos?: T;
|
|
votosLegenda?: T;
|
|
votosBranco?: T;
|
|
votosNulo?: T;
|
|
votosAnulados?: T;
|
|
winnerCandidateNumber?: T;
|
|
winnerCandidateName?: T;
|
|
winnerVotes?: T;
|
|
winnerCoalition?: T;
|
|
winnerParty?: T;
|
|
updatedAt?: T;
|
|
createdAt?: T;
|
|
}
|
|
/**
|
|
* This interface was referenced by `Config`'s JSON-Schema
|
|
* via the `definition` "electionCandidateVote_select".
|
|
*/
|
|
export interface ElectionCandidateVoteSelect<T extends boolean = true> {
|
|
year?: T;
|
|
office?: T;
|
|
turn?: T;
|
|
state?: T;
|
|
cityCode?: T;
|
|
cityName?: T;
|
|
zoneNumber?: T;
|
|
candidateNumber?: T;
|
|
candidateName?: T;
|
|
coalition?: T;
|
|
party?: T;
|
|
voteType?: T;
|
|
votes?: T;
|
|
updatedAt?: T;
|
|
createdAt?: T;
|
|
}
|
|
/**
|
|
* This interface was referenced by `Config`'s JSON-Schema
|
|
* via the `definition` "electionCandidate_select".
|
|
*/
|
|
export interface ElectionCandidateSelect<T extends boolean = true> {
|
|
year?: T;
|
|
office?: T;
|
|
turn?: T;
|
|
state?: T;
|
|
candidateNumber?: T;
|
|
urnaName?: T;
|
|
completeName?: T;
|
|
party?: T;
|
|
coalition?: T;
|
|
candidateStatus?: T;
|
|
elected?: T;
|
|
electedBy?: T;
|
|
totalVotesState?: T;
|
|
identityKey?: T;
|
|
runningAgain2026?: T;
|
|
updatedAt?: T;
|
|
createdAt?: T;
|
|
}
|
|
/**
|
|
* This interface was referenced by `Config`'s JSON-Schema
|
|
* via the `definition` "media_select".
|
|
*/
|
|
export interface MediaSelect<T extends boolean = true> {
|
|
alt?: T;
|
|
updatedAt?: T;
|
|
createdAt?: T;
|
|
url?: T;
|
|
thumbnailURL?: T;
|
|
filename?: T;
|
|
mimeType?: T;
|
|
filesize?: T;
|
|
width?: T;
|
|
height?: T;
|
|
focalX?: T;
|
|
focalY?: T;
|
|
}
|
|
/**
|
|
* This interface was referenced by `Config`'s JSON-Schema
|
|
* via the `definition` "petition_select".
|
|
*/
|
|
export interface PetitionSelect<T extends boolean = true> {
|
|
id?: T;
|
|
title?: T;
|
|
subtitle?: T;
|
|
enabled?: T;
|
|
body?: T;
|
|
form?:
|
|
| T
|
|
| {
|
|
title?: T;
|
|
subtitle?: T;
|
|
consent?: T;
|
|
};
|
|
tracking?:
|
|
| T
|
|
| {
|
|
facebookPixelId?: T;
|
|
};
|
|
updatedAt?: T;
|
|
createdAt?: T;
|
|
_status?: T;
|
|
}
|
|
/**
|
|
* This interface was referenced by `Config`'s JSON-Schema
|
|
* via the `definition` "contact_select".
|
|
*/
|
|
export interface ContactSelect<T extends boolean = true> {
|
|
name?: T;
|
|
email?: T;
|
|
phones?:
|
|
| T
|
|
| {
|
|
value?: T;
|
|
id?: T;
|
|
};
|
|
gender?: T;
|
|
state?: T;
|
|
city?: T;
|
|
postalCode?: T;
|
|
updatedAt?: T;
|
|
createdAt?: T;
|
|
}
|
|
/**
|
|
* This interface was referenced by `Config`'s JSON-Schema
|
|
* via the `definition` "consent_select".
|
|
*/
|
|
export interface ConsentSelect<T extends boolean = true> {
|
|
key?: T;
|
|
text?: T;
|
|
updatedAt?: T;
|
|
createdAt?: T;
|
|
}
|
|
/**
|
|
* This interface was referenced by `Config`'s JSON-Schema
|
|
* via the `definition` "signature_select".
|
|
*/
|
|
export interface SignatureSelect<T extends boolean = true> {
|
|
contact?: T;
|
|
petition?: T;
|
|
consent?: T;
|
|
comment?: T;
|
|
updatedAt?: T;
|
|
createdAt?: T;
|
|
}
|
|
/**
|
|
* This interface was referenced by `Config`'s JSON-Schema
|
|
* via the `definition` "subscription_select".
|
|
*/
|
|
export interface SubscriptionSelect<T extends boolean = true> {
|
|
contact?: T;
|
|
consent?: T;
|
|
comment?: T;
|
|
updatedAt?: T;
|
|
createdAt?: T;
|
|
}
|
|
/**
|
|
* This interface was referenced by `Config`'s JSON-Schema
|
|
* via the `definition` "post_select".
|
|
*/
|
|
export interface PostSelect<T extends boolean = true> {
|
|
title?: T;
|
|
slug?: T;
|
|
type?: T;
|
|
category?: T;
|
|
tags?: T;
|
|
subtitle?: T;
|
|
coverImage?: T;
|
|
publishedDate?: T;
|
|
body?: T;
|
|
updatedAt?: T;
|
|
createdAt?: T;
|
|
_status?: T;
|
|
}
|
|
/**
|
|
* This interface was referenced by `Config`'s JSON-Schema
|
|
* via the `definition` "tag_select".
|
|
*/
|
|
export interface TagSelect<T extends boolean = true> {
|
|
name?: T;
|
|
slug?: T;
|
|
hidden?: T;
|
|
updatedAt?: T;
|
|
createdAt?: T;
|
|
}
|
|
/**
|
|
* This interface was referenced by `Config`'s JSON-Schema
|
|
* via the `definition` "exports_select".
|
|
*/
|
|
export interface ExportsSelect<T extends boolean = true> {
|
|
name?: T;
|
|
format?: T;
|
|
limit?: T;
|
|
page?: T;
|
|
sort?: T;
|
|
sortOrder?: T;
|
|
drafts?: T;
|
|
selectionToUse?: T;
|
|
fields?: T;
|
|
collectionSlug?: T;
|
|
where?: T;
|
|
updatedAt?: T;
|
|
createdAt?: T;
|
|
url?: T;
|
|
thumbnailURL?: T;
|
|
filename?: T;
|
|
mimeType?: T;
|
|
filesize?: T;
|
|
width?: T;
|
|
height?: T;
|
|
focalX?: T;
|
|
focalY?: T;
|
|
}
|
|
/**
|
|
* This interface was referenced by `Config`'s JSON-Schema
|
|
* via the `definition` "imports_select".
|
|
*/
|
|
export interface ImportsSelect<T extends boolean = true> {
|
|
collectionSlug?: T;
|
|
importMode?: T;
|
|
matchField?: T;
|
|
status?: T;
|
|
summary?:
|
|
| T
|
|
| {
|
|
imported?: T;
|
|
updated?: T;
|
|
total?: T;
|
|
issues?: T;
|
|
issueDetails?: T;
|
|
};
|
|
updatedAt?: T;
|
|
createdAt?: T;
|
|
url?: T;
|
|
thumbnailURL?: T;
|
|
filename?: T;
|
|
mimeType?: T;
|
|
filesize?: T;
|
|
width?: T;
|
|
height?: T;
|
|
focalX?: T;
|
|
focalY?: T;
|
|
}
|
|
/**
|
|
* This interface was referenced by `Config`'s JSON-Schema
|
|
* via the `definition` "payload-kv_select".
|
|
*/
|
|
export interface PayloadKvSelect<T extends boolean = true> {
|
|
key?: T;
|
|
data?: T;
|
|
}
|
|
/**
|
|
* This interface was referenced by `Config`'s JSON-Schema
|
|
* via the `definition` "payload-jobs_select".
|
|
*/
|
|
export interface PayloadJobsSelect<T extends boolean = true> {
|
|
input?: T;
|
|
taskStatus?: T;
|
|
completedAt?: T;
|
|
totalTried?: T;
|
|
hasError?: T;
|
|
error?: T;
|
|
log?:
|
|
| T
|
|
| {
|
|
executedAt?: T;
|
|
completedAt?: T;
|
|
taskSlug?: T;
|
|
taskID?: T;
|
|
input?: T;
|
|
output?: T;
|
|
state?: T;
|
|
error?: T;
|
|
id?: T;
|
|
};
|
|
taskSlug?: T;
|
|
queue?: T;
|
|
waitUntil?: T;
|
|
processing?: T;
|
|
updatedAt?: T;
|
|
createdAt?: T;
|
|
}
|
|
/**
|
|
* This interface was referenced by `Config`'s JSON-Schema
|
|
* via the `definition` "payload-locked-documents_select".
|
|
*/
|
|
export interface PayloadLockedDocumentsSelect<T extends boolean = true> {
|
|
document?: T;
|
|
globalSlug?: T;
|
|
user?: T;
|
|
updatedAt?: T;
|
|
createdAt?: T;
|
|
}
|
|
/**
|
|
* This interface was referenced by `Config`'s JSON-Schema
|
|
* via the `definition` "payload-preferences_select".
|
|
*/
|
|
export interface PayloadPreferencesSelect<T extends boolean = true> {
|
|
user?: T;
|
|
key?: T;
|
|
value?: T;
|
|
updatedAt?: T;
|
|
createdAt?: T;
|
|
}
|
|
/**
|
|
* This interface was referenced by `Config`'s JSON-Schema
|
|
* via the `definition` "payload-migrations_select".
|
|
*/
|
|
export interface PayloadMigrationsSelect<T extends boolean = true> {
|
|
name?: T;
|
|
batch?: T;
|
|
updatedAt?: T;
|
|
createdAt?: T;
|
|
}
|
|
/**
|
|
* This interface was referenced by `Config`'s JSON-Schema
|
|
* via the `definition` "site-settings".
|
|
*/
|
|
export interface SiteSetting {
|
|
id: number;
|
|
headerTitle?: string | null;
|
|
socialLinks?:
|
|
| {
|
|
platform: 'instagram' | 'facebook' | 'youtube' | 'whatsapp';
|
|
url: string;
|
|
/**
|
|
* Rótulo opcional para acessibilidade. Se estiver vazio, usamos um rótulo padrão da plataforma.
|
|
*/
|
|
label?: string | null;
|
|
enabled?: boolean | null;
|
|
id?: string | null;
|
|
}[]
|
|
| null;
|
|
_status?: ('draft' | 'published') | null;
|
|
updatedAt?: string | null;
|
|
createdAt?: string | null;
|
|
}
|
|
/**
|
|
* This interface was referenced by `Config`'s JSON-Schema
|
|
* via the `definition` "home".
|
|
*/
|
|
export interface Home {
|
|
id: number;
|
|
image: number | Media;
|
|
updatedAt?: string | null;
|
|
createdAt?: string | null;
|
|
}
|
|
/**
|
|
* This interface was referenced by `Config`'s JSON-Schema
|
|
* via the `definition` "metadata".
|
|
*/
|
|
export interface Metadatum {
|
|
id: number;
|
|
URL: string;
|
|
title: string;
|
|
description: string;
|
|
keywords: {
|
|
keyword: string;
|
|
id?: string | null;
|
|
}[];
|
|
openGraph: {
|
|
siteName: string;
|
|
description: string;
|
|
};
|
|
twitter: {
|
|
creator: string;
|
|
description: string;
|
|
};
|
|
image?: (number | null) | Media;
|
|
updatedAt?: string | null;
|
|
createdAt?: string | null;
|
|
}
|
|
/**
|
|
* Aviso de Privacidade institucional exibido em /privacidade. Publicar somente após revisão jurídica.
|
|
*
|
|
* This interface was referenced by `Config`'s JSON-Schema
|
|
* via the `definition` "privacy-policy".
|
|
*/
|
|
export interface PrivacyPolicy {
|
|
id: number;
|
|
/**
|
|
* Quando desmarcado, a rota pública /privacidade retorna 404.
|
|
*/
|
|
published?: boolean | null;
|
|
body: {
|
|
root: {
|
|
type: string;
|
|
children: {
|
|
type: any;
|
|
version: number;
|
|
[k: string]: unknown;
|
|
}[];
|
|
direction: ('ltr' | 'rtl') | null;
|
|
format: 'left' | 'start' | 'center' | 'right' | 'end' | 'justify' | '';
|
|
indent: number;
|
|
version: number;
|
|
};
|
|
[k: string]: unknown;
|
|
};
|
|
updatedAt?: string | null;
|
|
createdAt?: string | null;
|
|
}
|
|
/**
|
|
* This interface was referenced by `Config`'s JSON-Schema
|
|
* via the `definition` "campaignGoals".
|
|
*/
|
|
export interface CampaignGoal {
|
|
id: number;
|
|
/**
|
|
* Piso decidido pela coordenação geral. Define o cenário OTIMISTA da meta sugerida por município: a votação de 2022 de cada município é multiplicada por (meta estadual ÷ votação estadual de 2022), então a soma das metas otimistas fecha exatamente neste valor.
|
|
*/
|
|
stateGoal: number;
|
|
/**
|
|
* Corte do cenário PESSIMISTA da meta sugerida: quanto da votação de 2022 a campanha admite perder (ex.: 10 = meta pessimista 10% abaixo de 2022). Vazio usa 10%.
|
|
*/
|
|
margin?: number | null;
|
|
/**
|
|
* Ano-base considerado pela coordenação ao fixar a meta estadual (contexto, não usado em cálculo).
|
|
*/
|
|
baseYear?: number | null;
|
|
/**
|
|
* Contexto livre sobre a decisão da meta (ex.: data e instância que decidiu).
|
|
*/
|
|
note?: string | null;
|
|
updatedAt?: string | null;
|
|
createdAt?: string | null;
|
|
}
|
|
/**
|
|
* Fonte automática do board "Acompanhe de perto" da home de campanha. Sem chave configurada, os cards da plataforma não aparecem.
|
|
*
|
|
* This interface was referenced by `Config`'s JSON-Schema
|
|
* via the `definition` "social-feed-settings".
|
|
*/
|
|
export interface SocialFeedSetting {
|
|
id: number;
|
|
/**
|
|
* Desligado, as fontes externas (YouTube, Instagram) somem do board sem mexer nos artigos do site.
|
|
*/
|
|
enabled?: boolean | null;
|
|
/**
|
|
* Desliga só os cards de vídeo do YouTube.
|
|
*/
|
|
youtubeEnabled?: boolean | null;
|
|
/**
|
|
* Chave de API do Google Cloud com a YouTube Data API v3 habilitada. Restrinja por IP se possível.
|
|
*/
|
|
youtubeApiKey?: string | null;
|
|
/**
|
|
* Ex.: UCyqT2nMLnwQn2Bh7mB7y3dA (o canal oficial é @JorgeSollaDep).
|
|
*/
|
|
youtubeChannelId?: string | null;
|
|
/**
|
|
* Quantos vídeos entram no bento (1 grande + os próximos).
|
|
*/
|
|
youtubeMaxItems?: number | null;
|
|
/**
|
|
* Desliga só os cards de post do Instagram.
|
|
*/
|
|
instagramEnabled?: boolean | null;
|
|
/**
|
|
* Token long-lived da conta Business/Creator vinculada à página do Facebook. Tokens emitidos via Instagram Login são renovados automaticamente; para page tokens, o refresh falha e o token precisa ser trocado aqui manualmente.
|
|
*/
|
|
instagramAccessToken?: string | null;
|
|
/**
|
|
* ID numérico da conta de negócios do Instagram.
|
|
*/
|
|
instagramUserId?: string | null;
|
|
/**
|
|
* Quantos posts entram no bento (1 grande + os próximos).
|
|
*/
|
|
instagramMaxItems?: number | null;
|
|
/**
|
|
* Conteúdo marcado para NÃO aparecer no board (vídeo errado, transmissão incompleta, post de grade). O board pula para o próximo elegível.
|
|
*/
|
|
excludedItems?:
|
|
| {
|
|
platform: 'youtube' | 'instagram';
|
|
itemId: string;
|
|
reason?: string | null;
|
|
id?: string | null;
|
|
}[]
|
|
| null;
|
|
youtubeFeedSnapshot?:
|
|
| {
|
|
[k: string]: unknown;
|
|
}
|
|
| unknown[]
|
|
| string
|
|
| number
|
|
| boolean
|
|
| null;
|
|
instagramFeedSnapshot?:
|
|
| {
|
|
[k: string]: unknown;
|
|
}
|
|
| unknown[]
|
|
| string
|
|
| number
|
|
| boolean
|
|
| null;
|
|
updatedAt?: string | null;
|
|
createdAt?: string | null;
|
|
}
|
|
/**
|
|
* This interface was referenced by `Config`'s JSON-Schema
|
|
* via the `definition` "site-settings_select".
|
|
*/
|
|
export interface SiteSettingsSelect<T extends boolean = true> {
|
|
headerTitle?: T;
|
|
socialLinks?:
|
|
| T
|
|
| {
|
|
platform?: T;
|
|
url?: T;
|
|
label?: T;
|
|
enabled?: T;
|
|
id?: T;
|
|
};
|
|
_status?: T;
|
|
updatedAt?: T;
|
|
createdAt?: T;
|
|
globalType?: T;
|
|
}
|
|
/**
|
|
* This interface was referenced by `Config`'s JSON-Schema
|
|
* via the `definition` "home_select".
|
|
*/
|
|
export interface HomeSelect<T extends boolean = true> {
|
|
image?: T;
|
|
updatedAt?: T;
|
|
createdAt?: T;
|
|
globalType?: T;
|
|
}
|
|
/**
|
|
* This interface was referenced by `Config`'s JSON-Schema
|
|
* via the `definition` "metadata_select".
|
|
*/
|
|
export interface MetadataSelect<T extends boolean = true> {
|
|
URL?: T;
|
|
title?: T;
|
|
description?: T;
|
|
keywords?:
|
|
| T
|
|
| {
|
|
keyword?: T;
|
|
id?: T;
|
|
};
|
|
openGraph?:
|
|
| T
|
|
| {
|
|
siteName?: T;
|
|
description?: T;
|
|
};
|
|
twitter?:
|
|
| T
|
|
| {
|
|
creator?: T;
|
|
description?: T;
|
|
};
|
|
image?: T;
|
|
updatedAt?: T;
|
|
createdAt?: T;
|
|
globalType?: T;
|
|
}
|
|
/**
|
|
* This interface was referenced by `Config`'s JSON-Schema
|
|
* via the `definition` "privacy-policy_select".
|
|
*/
|
|
export interface PrivacyPolicySelect<T extends boolean = true> {
|
|
published?: T;
|
|
body?: T;
|
|
updatedAt?: T;
|
|
createdAt?: T;
|
|
globalType?: T;
|
|
}
|
|
/**
|
|
* This interface was referenced by `Config`'s JSON-Schema
|
|
* via the `definition` "campaignGoals_select".
|
|
*/
|
|
export interface CampaignGoalsSelect<T extends boolean = true> {
|
|
stateGoal?: T;
|
|
margin?: T;
|
|
baseYear?: T;
|
|
note?: T;
|
|
updatedAt?: T;
|
|
createdAt?: T;
|
|
globalType?: T;
|
|
}
|
|
/**
|
|
* This interface was referenced by `Config`'s JSON-Schema
|
|
* via the `definition` "social-feed-settings_select".
|
|
*/
|
|
export interface SocialFeedSettingsSelect<T extends boolean = true> {
|
|
enabled?: T;
|
|
youtubeEnabled?: T;
|
|
youtubeApiKey?: T;
|
|
youtubeChannelId?: T;
|
|
youtubeMaxItems?: T;
|
|
instagramEnabled?: T;
|
|
instagramAccessToken?: T;
|
|
instagramUserId?: T;
|
|
instagramMaxItems?: T;
|
|
excludedItems?:
|
|
| T
|
|
| {
|
|
platform?: T;
|
|
itemId?: T;
|
|
reason?: T;
|
|
id?: T;
|
|
};
|
|
youtubeFeedSnapshot?: T;
|
|
instagramFeedSnapshot?: T;
|
|
updatedAt?: T;
|
|
createdAt?: T;
|
|
globalType?: T;
|
|
}
|
|
/**
|
|
* This interface was referenced by `Config`'s JSON-Schema
|
|
* via the `definition` "collections_widget".
|
|
*/
|
|
export interface CollectionsWidget {
|
|
data?: {
|
|
[k: string]: unknown;
|
|
};
|
|
width: 'full';
|
|
}
|
|
/**
|
|
* This interface was referenced by `Config`'s JSON-Schema
|
|
* via the `definition` "TaskCreateCollectionExport".
|
|
*/
|
|
export interface TaskCreateCollectionExport {
|
|
input: {
|
|
id: string;
|
|
name: string;
|
|
batchSize?: number | null;
|
|
collectionSlug:
|
|
| 'users'
|
|
| 'campaignUser'
|
|
| 'campaignWebAuthnCredential'
|
|
| 'notification'
|
|
| 'pushSubscription'
|
|
| 'campaignInvite'
|
|
| 'campaignVoteSummarySnapshot'
|
|
| 'municipality'
|
|
| 'leadership'
|
|
| 'organization'
|
|
| 'stateDeputy'
|
|
| 'votePledge'
|
|
| 'allocationDecision'
|
|
| 'campaignDemand'
|
|
| 'supporter'
|
|
| 'supporterImportBatch'
|
|
| 'municipalityUpdate'
|
|
| 'activity'
|
|
| 'calendarFeed'
|
|
| 'googleCalendarSync'
|
|
| 'electionTally'
|
|
| 'electionCandidateVote'
|
|
| 'electionCandidate'
|
|
| 'media'
|
|
| 'petition'
|
|
| 'contact'
|
|
| 'consent'
|
|
| 'signature'
|
|
| 'subscription'
|
|
| 'post'
|
|
| 'tag'
|
|
| 'exports'
|
|
| 'imports';
|
|
drafts?: ('yes' | 'no') | null;
|
|
exportCollection: string;
|
|
fields?: string[] | null;
|
|
format: 'csv' | 'json';
|
|
limit?: number | null;
|
|
locale?: string | null;
|
|
maxLimit?: number | null;
|
|
page?: number | null;
|
|
sort?: string | null;
|
|
userCollection?: string | null;
|
|
userID?: string | null;
|
|
where?:
|
|
| {
|
|
[k: string]: unknown;
|
|
}
|
|
| unknown[]
|
|
| string
|
|
| number
|
|
| boolean
|
|
| null;
|
|
};
|
|
output?: unknown;
|
|
}
|
|
/**
|
|
* This interface was referenced by `Config`'s JSON-Schema
|
|
* via the `definition` "TaskCreateCollectionImport".
|
|
*/
|
|
export interface TaskCreateCollectionImport {
|
|
input: {
|
|
importId: string;
|
|
importCollection: string;
|
|
userID?: string | null;
|
|
userCollection?: string | null;
|
|
batchSize?: number | null;
|
|
debug?: boolean | null;
|
|
defaultVersionStatus?: ('draft' | 'published') | null;
|
|
maxLimit?: number | null;
|
|
};
|
|
output?: unknown;
|
|
}
|
|
/**
|
|
* This interface was referenced by `Config`'s JSON-Schema
|
|
* via the `definition` "TaskSchedulePublish".
|
|
*/
|
|
export interface TaskSchedulePublish {
|
|
input: {
|
|
type?: ('publish' | 'unpublish') | null;
|
|
locale?: string | null;
|
|
doc?:
|
|
| ({
|
|
relationTo: 'petition';
|
|
value: string | Petition;
|
|
} | null)
|
|
| ({
|
|
relationTo: 'post';
|
|
value: number | Post;
|
|
} | null);
|
|
global?: 'site-settings' | null;
|
|
user?: (number | null) | User;
|
|
};
|
|
output?: unknown;
|
|
}
|
|
/**
|
|
* This interface was referenced by `Config`'s JSON-Schema
|
|
* via the `definition` "auth".
|
|
*/
|
|
export interface Auth {
|
|
[k: string]: unknown;
|
|
}
|
|
|
|
|
|
declare module 'payload' {
|
|
export interface GeneratedTypes extends Config {}
|
|
} |