Skip to main content

churchtools_api/generated/
queries.rs

1//! Query parameters (`…Query`) and form fields (`…Form`) of the generated methods.
2//! Unset fields are left out of the request; fill them with `..Default::default()`.
3//!
4//! Generated by codegen/generate.py from the OpenAPI spec of ChurchTools 3.138.1 (build 32938). Do not edit. The spec is licensed under CC BY 4.0 (<https://creativecommons.org/licenses/by/4.0/>); see NOTICE.
5
6#![allow(clippy::all, deprecated)]
7
8use crate::client::Query;
9use crate::query::ToQuery;
10
11/// Query parameters for `GET /addresses/search`.
12#[derive(Debug, Clone, Default)]
13pub struct GetAddressesSearchQuery {
14    /// Search term to look up addresses by (e.g. street, city, person name).
15    pub query: Option<String>,
16}
17
18impl GetAddressesSearchQuery {
19    pub(crate) fn to_query(&self) -> Query {
20        let mut q = Query::new();
21        self.query.push_query("query", &mut q);
22        q
23    }
24}
25
26/// Query parameters for `DELETE /agendatemplates/{agendaId}`.
27#[derive(Debug, Clone, Default)]
28pub struct DeleteAgendatemplatesAgendaIdQuery {
29    /// Deprecated. Accepted but ignored. Both `false` and `true` execute deletion; this parameter does not provide a dry run.
30    #[deprecated = "deprecated in the ChurchTools API"]
31    pub dry_run: Option<bool>,
32}
33
34impl DeleteAgendatemplatesAgendaIdQuery {
35    pub(crate) fn to_query(&self) -> Query {
36        let mut q = Query::new();
37        self.dry_run.push_query("dryRun", &mut q);
38        q
39    }
40}
41
42/// Query parameters for `POST /agendatemplates/{agendaId}/export`.
43#[derive(Debug, Clone, Default)]
44pub struct PostAgendatemplatesAgendaIdExportQuery {
45    /// Target presenter format. The generated archive is returned through a download URL in the JSON response.
46    /// Allowed values: `PRO_PRESENTER_6`, `PRO_PRESENTER_7`, `SONG_BEAMER`.
47    pub format: Option<String>,
48}
49
50impl PostAgendatemplatesAgendaIdExportQuery {
51    pub(crate) fn to_query(&self) -> Query {
52        let mut q = Query::new();
53        self.format.push_query("format", &mut q);
54        q
55    }
56}
57
58/// Query parameters for `POST /agendatemplates/{agendaId}/items`.
59#[derive(Debug, Clone, Default)]
60pub struct PostAgendatemplatesAgendaIdItemsQuery {
61    /// Place the item before this existing item in the same agenda. Use at most one of `before_id` and `after_id`. These are item IDs, not zero-based positions.
62    pub before_id: Option<i64>,
63    /// Place the item after this existing item in the same agenda. Use at most one of `before_id` and `after_id`. These are item IDs, not zero-based positions.
64    pub after_id: Option<i64>,
65    /// Deprecated. Accepted and validated as an integer, but not applied by the item service. Use `before_id` or `after_id` to position an item.
66    #[deprecated = "Use `before_id` or `after_id` to position an item."]
67    pub sort_key: Option<i64>,
68}
69
70impl PostAgendatemplatesAgendaIdItemsQuery {
71    pub(crate) fn to_query(&self) -> Query {
72        let mut q = Query::new();
73        self.before_id.push_query("before_id", &mut q);
74        self.after_id.push_query("after_id", &mut q);
75        self.sort_key.push_query("sortKey", &mut q);
76        q
77    }
78}
79
80/// Query parameters for `PUT /agendatemplates/{agendaId}/items/{itemId}`.
81#[derive(Debug, Clone, Default)]
82pub struct PutAgendatemplatesAgendaIdItemsItemIdQuery {
83    /// Place the item before this existing item in the same agenda. Use at most one of `before_id` and `after_id`. These are item IDs, not zero-based positions.
84    pub before_id: Option<i64>,
85    /// Place the item after this existing item in the same agenda. Use at most one of `before_id` and `after_id`. These are item IDs, not zero-based positions.
86    pub after_id: Option<i64>,
87    /// Deprecated. Accepted and validated as an integer, but not applied by the item service. Use `before_id` or `after_id` to position an item.
88    #[deprecated = "Use `before_id` or `after_id` to position an item."]
89    pub sort_key: Option<i64>,
90}
91
92impl PutAgendatemplatesAgendaIdItemsItemIdQuery {
93    pub(crate) fn to_query(&self) -> Query {
94        let mut q = Query::new();
95        self.before_id.push_query("before_id", &mut q);
96        self.after_id.push_query("after_id", &mut q);
97        self.sort_key.push_query("sortKey", &mut q);
98        q
99    }
100}
101
102/// Query parameters for `GET /bookings/{bookingId}`.
103#[derive(Debug, Clone, Default)]
104pub struct GetBookingsIdQuery {
105    /// Optional enrichments. conflicts adds overlapping bookings; involvedPersonsDomainObjects adds person references to the booking base.
106    /// Allowed values: `conflicts`, `involvedPersonsDomainObjects`.
107    pub include: Option<Vec<String>>,
108}
109
110impl GetBookingsIdQuery {
111    pub(crate) fn to_query(&self) -> Query {
112        let mut q = Query::new();
113        self.include.push_query("include[]", &mut q);
114        q
115    }
116}
117
118/// Query parameters for `GET /bookings`.
119#[derive(Debug, Clone, Default)]
120pub struct GetBookingsQuery {
121    /// Optional enrichments. conflicts adds overlapping bookings; involvedPersonsDomainObjects adds person references to the booking base.
122    /// Allowed values: `conflicts`, `involvedPersonsDomainObjects`.
123    pub include: Option<Vec<String>>,
124    /// IDs of resources to include.
125    pub resource_ids: Option<Vec<i64>>,
126    /// Substring search in booking titles; at least two characters after trimming.
127    pub query: Option<String>,
128    /// Return bookings created by this person or made on their behalf.
129    pub person_id: Option<i64>,
130    /// Booking statuses to include.
131    /// Allowed values: `1`, `2`, `3`.
132    pub status_ids: Option<Vec<i64>>,
133    /// First included local date.
134    pub from: Option<chrono::NaiveDate>,
135    /// Last included local date, on or after `from`.
136    pub to: Option<chrono::NaiveDate>,
137}
138
139impl GetBookingsQuery {
140    pub(crate) fn to_query(&self) -> Query {
141        let mut q = Query::new();
142        self.include.push_query("include[]", &mut q);
143        self.resource_ids.push_query("resource_ids[]", &mut q);
144        self.query.push_query("query", &mut q);
145        self.person_id.push_query("person_id", &mut q);
146        self.status_ids.push_query("status_ids[]", &mut q);
147        self.from.push_query("from", &mut q);
148        self.to.push_query("to", &mut q);
149        q
150    }
151}
152
153/// Query parameters for `GET /calendars/{calendarId}/meetingrequestpersons`.
154#[derive(Debug, Clone, Default)]
155pub struct GetCalendarsCalendarIdMeetingrequestpersonsQuery {
156    /// Include persons already invited to this appointment
157    pub appointment_id: Option<i64>,
158}
159
160impl GetCalendarsCalendarIdMeetingrequestpersonsQuery {
161    pub(crate) fn to_query(&self) -> Query {
162        let mut q = Query::new();
163        self.appointment_id.push_query("appointmentId", &mut q);
164        q
165    }
166}
167
168/// Query parameters for `GET /calendars/{calendarId}/appointments/{appointmentId}`.
169#[derive(Debug, Clone, Default)]
170pub struct GetCalendarsCalendarIdAppointmentsAppointmentIdQuery {
171    /// Additional series data: event, group, bookings and titleSuffix enrich calculatedDates; tags enriches additionalInfos.
172    /// Allowed values: `bookings`, `event`, `group`, `meetingRequests`, `tags`, `titleSuffix`.
173    pub include: Option<Vec<String>>,
174}
175
176impl GetCalendarsCalendarIdAppointmentsAppointmentIdQuery {
177    pub(crate) fn to_query(&self) -> Query {
178        let mut q = Query::new();
179        self.include.push_query("include[]", &mut q);
180        q
181    }
182}
183
184/// Query parameters for `GET /calendars/appointments/{appointmentId}/{startDate}`.
185#[derive(Debug, Clone, Default)]
186pub struct GetCalendarsAppointmentsAppointmentIdStartDateQuery {
187    /// Additional data for this occurrence. Meeting requests belong to the whole appointment/series.
188    /// Allowed values: `bookings`, `event`, `group`, `meetingRequests`, `tags`, `titleSuffix`.
189    pub include: Option<Vec<String>>,
190}
191
192impl GetCalendarsAppointmentsAppointmentIdStartDateQuery {
193    pub(crate) fn to_query(&self) -> Query {
194        let mut q = Query::new();
195        self.include.push_query("include[]", &mut q);
196        q
197    }
198}
199
200/// Query parameters for `GET /calendars/{calendarId}/appointments/{appointmentId}/{startDate}`.
201#[derive(Debug, Clone, Default)]
202pub struct GetCalendarsCalendarIdAppointmentsAppointmentIdStartDateQuery {
203    /// Additional data for this occurrence. Meeting requests belong to the whole appointment/series.
204    /// Allowed values: `bookings`, `event`, `group`, `meetingRequests`, `tags`, `titleSuffix`.
205    pub include: Option<Vec<String>>,
206}
207
208impl GetCalendarsCalendarIdAppointmentsAppointmentIdStartDateQuery {
209    pub(crate) fn to_query(&self) -> Query {
210        let mut q = Query::new();
211        self.include.push_query("include[]", &mut q);
212        q
213    }
214}
215
216/// Query parameters for `GET /calendars/appointments`.
217#[derive(Debug, Clone, Default)]
218pub struct GetCalendarsAppointmentsQuery {
219    /// IDs of the calendars to read. Access is checked for every selected calendar.
220    pub calendar_ids: Option<Vec<i64>>,
221    /// Start of the requested date range in the installation’s timezone. Defaults to the first day of the current month.
222    pub from: Option<chrono::NaiveDate>,
223    /// Last requested calendar date. Defaults to the last day of the current month and must be on or after from.
224    pub to: Option<chrono::NaiveDate>,
225    /// Search appointment titles for the supplied text.
226    pub query: Option<String>,
227    /// Additional data requested for each calculated occurrence.
228    /// Allowed values: `bookings`, `event`, `group`, `meetingRequests`, `tags`, `titleSuffix`.
229    pub include: Option<Vec<String>>,
230}
231
232impl GetCalendarsAppointmentsQuery {
233    pub(crate) fn to_query(&self) -> Query {
234        let mut q = Query::new();
235        self.calendar_ids.push_query("calendar_ids[]", &mut q);
236        self.from.push_query("from", &mut q);
237        self.to.push_query("to", &mut q);
238        self.query.push_query("query", &mut q);
239        self.include.push_query("include[]", &mut q);
240        q
241    }
242}
243
244/// Query parameters for `GET /calendars/{calendarId}/appointments`.
245#[derive(Debug, Clone, Default)]
246pub struct GetCalendarsCalendarIdAppointmentsQuery {
247    /// Start of the requested date range in the installation’s timezone. Defaults to the first day of the current month.
248    pub from: Option<chrono::NaiveDate>,
249    /// Last requested calendar date. Defaults to the last day of the current month and must be on or after from.
250    pub to: Option<chrono::NaiveDate>,
251    /// Search appointment titles for the supplied text.
252    pub query: Option<String>,
253    /// Additional data requested for each calculated occurrence.
254    /// Allowed values: `bookings`, `event`, `group`, `meetingRequests`, `tags`, `titleSuffix`.
255    pub include: Option<Vec<String>>,
256}
257
258impl GetCalendarsCalendarIdAppointmentsQuery {
259    pub(crate) fn to_query(&self) -> Query {
260        let mut q = Query::new();
261        self.from.push_query("from", &mut q);
262        self.to.push_query("to", &mut q);
263        self.query.push_query("query", &mut q);
264        self.include.push_query("include[]", &mut q);
265        q
266    }
267}
268
269/// Query parameters for `GET /calendars/{calendarId}/meetingrequest/candidates`.
270#[derive(Debug, Clone, Default)]
271pub struct GetCalendarsCalendarIdMeetingrequestCandidatesQuery {
272    /// Include persons already invited to this appointment
273    pub appointment_id: Option<i64>,
274}
275
276impl GetCalendarsCalendarIdMeetingrequestCandidatesQuery {
277    pub(crate) fn to_query(&self) -> Query {
278        let mut q = Query::new();
279        self.appointment_id.push_query("appointmentId", &mut q);
280        q
281    }
282}
283
284/// Query parameters for `DELETE /chat/{guid}`.
285#[derive(Debug, Clone, Default)]
286pub struct DeleteChatGuidQuery {
287    /// Synchronization token for central chat service callbacks.
288    pub nonce: Option<String>,
289}
290
291impl DeleteChatGuidQuery {
292    pub(crate) fn to_query(&self) -> Query {
293        let mut q = Query::new();
294        self.nonce.push_query("nonce", &mut q);
295        q
296    }
297}
298
299/// Query parameters for `GET /chat`.
300#[derive(Debug, Clone, Default)]
301pub struct GetChatQuery {
302    /// Synchronization token for central chat service callbacks.
303    pub nonce: Option<String>,
304}
305
306impl GetChatQuery {
307    pub(crate) fn to_query(&self) -> Query {
308        let mut q = Query::new();
309        self.nonce.push_query("nonce", &mut q);
310        q
311    }
312}
313
314/// Query parameters for `POST /checkin/persons`.
315#[derive(Debug, Clone, Default)]
316pub struct PostCheckinPersonsQuery {
317    /// Omits the otherwise mandatory privacy policy agreement fields. Only effective when `privacy_policy_fields_mandatory_api` is disabled in the ChurchTools configuration. Clients must verify that configuration before using this parameter and must not use it as a fallback for missing agreement information.
318    pub without_privacy_policy_agreement: Option<bool>,
319}
320
321impl PostCheckinPersonsQuery {
322    pub(crate) fn to_query(&self) -> Query {
323        let mut q = Query::new();
324        self.without_privacy_policy_agreement.push_query("without_privacy_policy_agreement", &mut q);
325        q
326    }
327}
328
329/// Query parameters for `GET /churchquery/metadata`.
330#[derive(Debug, Clone, Default)]
331pub struct GetChurchqueryMetadataQuery {
332    /// Root entity prefix for which metadata should be generated.
333    pub entity_to_search_for: Option<String>,
334    /// Excludes db-field intern codes from metadata field lists (e.g. `multiselect`).
335    pub exclude_field_types: Option<Vec<String>>,
336}
337
338impl GetChurchqueryMetadataQuery {
339    pub(crate) fn to_query(&self) -> Query {
340        let mut q = Query::new();
341        self.entity_to_search_for.push_query("entity_to_search_for", &mut q);
342        self.exclude_field_types.push_query("exclude_field_types[]", &mut q);
343        q
344    }
345}
346
347/// Query parameters for `POST /churchquery/debug/export`.
348#[derive(Debug, Clone, Default)]
349pub struct PostChurchqueryDebugExportQuery {
350    /// type of export
351    pub r#type: Option<String>,
352}
353
354impl PostChurchqueryDebugExportQuery {
355    pub(crate) fn to_query(&self) -> Query {
356        let mut q = Query::new();
357        self.r#type.push_query("type", &mut q);
358        q
359    }
360}
361
362/// Query parameters for `GET /config`.
363#[derive(Debug, Clone, Default)]
364pub struct GetConfigQuery {
365    /// If `true` the response will contain the extended config.
366    pub extended: Option<bool>,
367}
368
369impl GetConfigQuery {
370    pub(crate) fn to_query(&self) -> Query {
371        let mut q = Query::new();
372        self.extended.push_query("extended", &mut q);
373        q
374    }
375}
376
377/// Query parameters for `DELETE /contactlabels/{id}`.
378#[derive(Debug, Clone, Default)]
379pub struct DeleteContactlabelsIdQuery {
380    /// If set to true, the deletion is simulated but nothing will be deleted.
381    pub dry_run: Option<bool>,
382}
383
384impl DeleteContactlabelsIdQuery {
385    pub(crate) fn to_query(&self) -> Query {
386        let mut q = Query::new();
387        self.dry_run.push_query("dry_run", &mut q);
388        q
389    }
390}
391
392/// Query parameters for `GET /dbfields`.
393#[derive(Debug, Clone, Default)]
394pub struct GetDbfieldsQuery {
395    /// Limit results to database-field categories.
396    /// Allowed values: `f_address`, `f_category`, `f_church`, `f_datasecurity`, `f_dep`, `f_group`, `f_growpath`.
397    pub categories: Option<Vec<String>>,
398    /// Expand selection choices for each field.
399    /// Allowed values: `options`.
400    pub include: Option<Vec<String>>,
401}
402
403impl GetDbfieldsQuery {
404    pub(crate) fn to_query(&self) -> Query {
405        let mut q = Query::new();
406        self.categories.push_query("categories[]", &mut q);
407        self.include.push_query("include[]", &mut q);
408        q
409    }
410}
411
412/// Query parameters for `DELETE /dbfields/{fieldId}/options/{optionId}`.
413#[derive(Debug, Clone, Default)]
414pub struct DeleteDbfieldsFieldIdOptionsOptionIdQuery {
415    /// If true, the deletion is only simulated and the option is not deleted. The response describes whether the option can be deleted.
416    pub dry_run: Option<bool>,
417}
418
419impl DeleteDbfieldsFieldIdOptionsOptionIdQuery {
420    pub(crate) fn to_query(&self) -> Query {
421        let mut q = Query::new();
422        self.dry_run.push_query("dryRun", &mut q);
423        q
424    }
425}
426
427/// Query parameters for `GET /domainobjects`.
428#[derive(Debug, Clone, Default)]
429pub struct GetDomainobjectsQuery {
430    /// Registered object types, paired by index with `domain_identifiers[]`.
431    /// Allowed values: `appointment`, `appointment_occurrence`, `event`, `group`, `group_membership`, `person`, `song`, `wiki_page`.
432    pub domain_types: Option<Vec<String>>,
433    /// For `person`, `group`, `song`, `event`, `group_membership`, and `appointment`, use a numeric database ID encoded as a string. `group_membership` uses the membership row ID, and `wiki_page` uses the page GUID. For `appointment_occurrence`, use `-`, for example `23-2026-09-14`.
434    pub domain_identifiers: Option<Vec<String>>,
435}
436
437impl GetDomainobjectsQuery {
438    pub(crate) fn to_query(&self) -> Query {
439        let mut q = Query::new();
440        self.domain_types.push_query("domain_types[]", &mut q);
441        self.domain_identifiers.push_query("domain_identifiers[]", &mut q);
442        q
443    }
444}
445
446/// Query parameters for `POST /events/ical`.
447#[derive(Debug, Clone, Default)]
448pub struct PostEventsIcalQuery {
449    /// ID of person
450    pub person_id: Option<i64>,
451}
452
453impl PostEventsIcalQuery {
454    pub(crate) fn to_query(&self) -> Query {
455        let mut q = Query::new();
456        self.person_id.push_query("personId", &mut q);
457        q
458    }
459}
460
461/// Query parameters for `DELETE /events/{eventId}`.
462#[derive(Debug, Clone, Default)]
463pub struct DeleteEventsIdQuery {
464    /// Check deletion and return a `409` report. Does not suppress the `sendMail` step.
465    pub dry_run: Option<bool>,
466    /// Request event-deletion notifications before the deletion check, including during `dryRun`.
467    pub send_mail: Option<bool>,
468}
469
470impl DeleteEventsIdQuery {
471    pub(crate) fn to_query(&self) -> Query {
472        let mut q = Query::new();
473        self.dry_run.push_query("dryRun", &mut q);
474        self.send_mail.push_query("sendMail", &mut q);
475        q
476    }
477}
478
479/// Query parameters for `GET /events/ical`.
480#[derive(Debug, Clone, Default)]
481pub struct GetEventsIcalQuery {
482    /// ID of person
483    pub person_id: Option<i64>,
484}
485
486impl GetEventsIcalQuery {
487    pub(crate) fn to_query(&self) -> Query {
488        let mut q = Query::new();
489        self.person_id.push_query("personId", &mut q);
490        q
491    }
492}
493
494/// Query parameters for `GET /events`.
495#[derive(Debug, Clone, Default)]
496pub struct GetEventsQuery {
497    /// Midnight anchor or beginning of the range.
498    pub from: Option<chrono::NaiveDate>,
499    /// Range upper bound at midnight, inclusive.
500    pub to: Option<chrono::NaiveDate>,
501    /// Enable directional pagination; omit for an unpaginated date range.
502    /// Allowed values: `backward`, `forward`.
503    pub direction: Option<String>,
504    /// Results per page in directional mode; ignored in range mode.
505    pub limit: Option<i64>,
506    /// Include cancelled events in addition to active events.
507    pub canceled: Option<bool>,
508    /// Comma-separated Fractal includes. event_services includes visible assignments; eventServices is its legacy spelling. The response key follows the selected spelling. Other Fractal syntax is accepted, so this is not a closed enum.
509    pub include: Option<String>,
510}
511
512impl GetEventsQuery {
513    pub(crate) fn to_query(&self) -> Query {
514        let mut q = Query::new();
515        self.from.push_query("from", &mut q);
516        self.to.push_query("to", &mut q);
517        self.direction.push_query("direction", &mut q);
518        self.limit.push_query("limit", &mut q);
519        self.canceled.push_query("canceled", &mut q);
520        self.include.push_query("include", &mut q);
521        q
522    }
523}
524
525/// Query parameters for `POST /events/{eventId}/agenda/export`.
526#[derive(Debug, Clone, Default)]
527pub struct PostEventsIdAgendaExportQuery {
528    /// Target presenter format. The generated archive is returned through a download URL in the JSON response.
529    /// Allowed values: `PRO_PRESENTER_6`, `PRO_PRESENTER_7`, `SONG_BEAMER`.
530    pub format: Option<String>,
531}
532
533impl PostEventsIdAgendaExportQuery {
534    pub(crate) fn to_query(&self) -> Query {
535        let mut q = Query::new();
536        self.format.push_query("format", &mut q);
537        q
538    }
539}
540
541/// Query parameters for `POST /events/{eventId}/agenda/integrate`.
542#[derive(Debug, Clone, Default)]
543pub struct PostEventsIdAgendaIntegrateQuery {
544    /// Source event ID. Its agenda is shared with the target event in the path; the two event IDs must differ.
545    pub event_id: Option<i64>,
546}
547
548impl PostEventsIdAgendaIntegrateQuery {
549    pub(crate) fn to_query(&self) -> Query {
550        let mut q = Query::new();
551        self.event_id.push_query("event_id", &mut q);
552        q
553    }
554}
555
556/// Query parameters for `PUT /events/{eventId}/agenda`.
557#[derive(Debug, Clone, Default)]
558pub struct PutEventsIdAgendaQuery {
559    /// Agenda template to copy. Replaces the target items with copies and supplies fallback metadata values. Mutually exclusive with `event_id` and the items body field.
560    pub template_id: Option<i64>,
561    /// Event whose agenda should be copied. Must differ from the target event ID. Replaces target items with copies and supplies fallback metadata values. Mutually exclusive with `template_id` and the items body field.
562    pub event_id: Option<i64>,
563}
564
565impl PutEventsIdAgendaQuery {
566    pub(crate) fn to_query(&self) -> Query {
567        let mut q = Query::new();
568        self.template_id.push_query("template_id", &mut q);
569        self.event_id.push_query("event_id", &mut q);
570        q
571    }
572}
573
574/// Query parameters for `POST /events/{eventId}/agenda/items`.
575#[derive(Debug, Clone, Default)]
576pub struct PostEventsIdAgendaItemsQuery {
577    /// Place the item before this existing item in the same agenda. Use at most one of `before_id` and `after_id`. These are item IDs, not zero-based positions.
578    pub before_id: Option<i64>,
579    /// Place the item after this existing item in the same agenda. Use at most one of `before_id` and `after_id`. These are item IDs, not zero-based positions.
580    pub after_id: Option<i64>,
581    /// Deprecated. Accepted and validated as an integer, but not applied by the item service. Use `before_id` or `after_id` to position an item.
582    #[deprecated = "Use `before_id` or `after_id` to position an item."]
583    pub sort_key: Option<i64>,
584}
585
586impl PostEventsIdAgendaItemsQuery {
587    pub(crate) fn to_query(&self) -> Query {
588        let mut q = Query::new();
589        self.before_id.push_query("before_id", &mut q);
590        self.after_id.push_query("after_id", &mut q);
591        self.sort_key.push_query("sortKey", &mut q);
592        q
593    }
594}
595
596/// Query parameters for `PUT /events/{eventId}/agenda/items/{itemId}`.
597#[derive(Debug, Clone, Default)]
598pub struct PutEventsIdAgendaItemsIdQuery {
599    /// Place the item before this existing item in the same agenda. Use at most one of `before_id` and `after_id`. These are item IDs, not zero-based positions.
600    pub before_id: Option<i64>,
601    /// Place the item after this existing item in the same agenda. Use at most one of `before_id` and `after_id`. These are item IDs, not zero-based positions.
602    pub after_id: Option<i64>,
603    /// Deprecated. Accepted and validated as an integer, but not applied by the item service. Use `before_id` or `after_id` to position an item.
604    #[deprecated = "Use `before_id` or `after_id` to position an item."]
605    pub sort_key: Option<i64>,
606}
607
608impl PutEventsIdAgendaItemsIdQuery {
609    pub(crate) fn to_query(&self) -> Query {
610        let mut q = Query::new();
611        self.before_id.push_query("before_id", &mut q);
612        self.after_id.push_query("after_id", &mut q);
613        self.sort_key.push_query("sortKey", &mut q);
614        q
615    }
616}
617
618/// Query parameters for `POST /events/facts/export`.
619#[derive(Debug, Clone, Default)]
620pub struct PostEventsFactsExportQuery {
621    /// Download format.
622    /// Allowed values: `csv`, `xlsx`.
623    pub format: Option<String>,
624}
625
626impl PostEventsFactsExportQuery {
627    pub(crate) fn to_query(&self) -> Query {
628        let mut q = Query::new();
629        self.format.push_query("format", &mut q);
630        q
631    }
632}
633
634/// Query parameters for `GET /events/facts`.
635#[derive(Debug, Clone, Default)]
636pub struct GetEventsFactsQuery {
637    /// Return entities starting from this date.
638    pub from: Option<chrono::NaiveDate>,
639    /// Return entities up to (but not including) this date.
640    pub to: Option<chrono::NaiveDate>,
641    /// Restrict to these service-planning event IDs. An empty list does not restrict events.
642    pub event_id: Option<Vec<i64>>,
643    /// Restrict to these fact definitions, intersected with the definitions the user may view or edit. An empty list uses all visible definitions.
644    pub fact_id: Option<Vec<i64>>,
645    /// Number of results per page.
646    pub limit: Option<i64>,
647}
648
649impl GetEventsFactsQuery {
650    pub(crate) fn to_query(&self) -> Query {
651        let mut q = Query::new();
652        self.from.push_query("from", &mut q);
653        self.to.push_query("to", &mut q);
654        self.event_id.push_query("event_id[]", &mut q);
655        self.fact_id.push_query("fact_id[]", &mut q);
656        self.limit.push_query("limit", &mut q);
657        q
658    }
659}
660
661/// Query parameters for `GET /externallogins/oidc/callback`.
662#[derive(Debug, Clone, Default)]
663pub struct GetExternalloginsOidcCallbackQuery {
664    /// Opaque state created by the matching OIDC start request.
665    pub state: Option<String>,
666    /// Authorization code returned by the OIDC provider.
667    pub code: Option<String>,
668    /// OIDC authorization error returned instead of a code.
669    pub error: Option<String>,
670}
671
672impl GetExternalloginsOidcCallbackQuery {
673    pub(crate) fn to_query(&self) -> Query {
674        let mut q = Query::new();
675        self.state.push_query("state", &mut q);
676        self.code.push_query("code", &mut q);
677        self.error.push_query("error", &mut q);
678        q
679    }
680}
681
682/// Query parameters for `GET /externallogins/{externalLoginId}/oidc/callback`.
683#[derive(Debug, Clone, Default)]
684pub struct GetExternalloginsIdOidcCallbackQuery {
685    /// Opaque state created by the matching OIDC start request.
686    pub state: Option<String>,
687    /// Authorization code returned by the OIDC provider.
688    pub code: Option<String>,
689    /// OIDC authorization error returned instead of a code.
690    pub error: Option<String>,
691}
692
693impl GetExternalloginsIdOidcCallbackQuery {
694    pub(crate) fn to_query(&self) -> Query {
695        let mut q = Query::new();
696        self.state.push_query("state", &mut q);
697        self.code.push_query("code", &mut q);
698        self.error.push_query("error", &mut q);
699        q
700    }
701}
702
703/// Query parameters for `GET /externallogins/{externalLoginId}/oidc/start`.
704#[derive(Debug, Clone, Default)]
705pub struct GetExternalloginsIdOidcStartQuery {
706    /// Absolute same-origin URL within the ChurchTools base path to open after login. Invalid, external or relative targets are ignored and fall back to the installation root.
707    pub redirect: Option<String>,
708}
709
710impl GetExternalloginsIdOidcStartQuery {
711    pub(crate) fn to_query(&self) -> Query {
712        let mut q = Query::new();
713        self.redirect.push_query("redirect", &mut q);
714        q
715    }
716}
717
718/// Query parameters for `POST /externallogins/{externalLoginId}/saml/sls`.
719#[derive(Debug, Clone, Default)]
720pub struct PostExternalloginsExternalLoginIdSamlSlsQuery {
721    /// Base64-encoded, DEFLATE-compressed SAML LogoutRequest. Supply either `SAMLRequest` or `SAMLResponse`.
722    pub saml_request: Option<String>,
723    /// Base64-encoded, DEFLATE-compressed SAML LogoutResponse. Takes precedence when both message fields are supplied.
724    pub saml_response: Option<String>,
725    /// Opaque state echoed when responding to a logout request.
726    pub relay_state: Option<String>,
727    /// URI of the redirect-binding signature algorithm.
728    pub sig_alg: Option<String>,
729    /// Base64-encoded redirect-binding signature.
730    pub signature: Option<String>,
731}
732
733impl PostExternalloginsExternalLoginIdSamlSlsQuery {
734    pub(crate) fn to_query(&self) -> Query {
735        let mut q = Query::new();
736        self.saml_request.push_query("SAMLRequest", &mut q);
737        self.saml_response.push_query("SAMLResponse", &mut q);
738        self.relay_state.push_query("RelayState", &mut q);
739        self.sig_alg.push_query("SigAlg", &mut q);
740        self.signature.push_query("Signature", &mut q);
741        q
742    }
743}
744
745/// Query parameters for `DELETE /externallogins/{externalLoginId}/saml/sls`.
746#[derive(Debug, Clone, Default)]
747pub struct DeleteExternalloginsExternalLoginIdSamlSlsQuery {
748    /// Base64-encoded, DEFLATE-compressed SAML LogoutRequest. Supply either `SAMLRequest` or `SAMLResponse`.
749    pub saml_request: Option<String>,
750    /// Base64-encoded, DEFLATE-compressed SAML LogoutResponse. Takes precedence when both message fields are supplied.
751    pub saml_response: Option<String>,
752    /// Opaque state echoed when responding to a logout request.
753    pub relay_state: Option<String>,
754    /// URI of the redirect-binding signature algorithm.
755    pub sig_alg: Option<String>,
756    /// Base64-encoded redirect-binding signature.
757    pub signature: Option<String>,
758}
759
760impl DeleteExternalloginsExternalLoginIdSamlSlsQuery {
761    pub(crate) fn to_query(&self) -> Query {
762        let mut q = Query::new();
763        self.saml_request.push_query("SAMLRequest", &mut q);
764        self.saml_response.push_query("SAMLResponse", &mut q);
765        self.relay_state.push_query("RelayState", &mut q);
766        self.sig_alg.push_query("SigAlg", &mut q);
767        self.signature.push_query("Signature", &mut q);
768        q
769    }
770}
771
772/// Query parameters for `GET /externallogins/{externalLoginId}/saml/login`.
773#[derive(Debug, Clone, Default)]
774pub struct GetExternalloginsExternalLoginIdSamlLoginQuery {
775    /// Absolute same-origin destination after successful login.
776    pub redirect: Option<String>,
777}
778
779impl GetExternalloginsExternalLoginIdSamlLoginQuery {
780    pub(crate) fn to_query(&self) -> Query {
781        let mut q = Query::new();
782        self.redirect.push_query("redirect", &mut q);
783        q
784    }
785}
786
787/// Query parameters for `GET /externallogins/{externalLoginId}/saml/sls`.
788#[derive(Debug, Clone, Default)]
789pub struct GetExternalloginsExternalLoginIdSamlSlsQuery {
790    /// Base64-encoded, DEFLATE-compressed SAML LogoutRequest. Supply either `SAMLRequest` or `SAMLResponse`.
791    pub saml_request: Option<String>,
792    /// Base64-encoded, DEFLATE-compressed SAML LogoutResponse. Takes precedence when both message fields are supplied.
793    pub saml_response: Option<String>,
794    /// Opaque state echoed when responding to a logout request.
795    pub relay_state: Option<String>,
796    /// URI of the redirect-binding signature algorithm.
797    pub sig_alg: Option<String>,
798    /// Base64-encoded redirect-binding signature.
799    pub signature: Option<String>,
800}
801
802impl GetExternalloginsExternalLoginIdSamlSlsQuery {
803    pub(crate) fn to_query(&self) -> Query {
804        let mut q = Query::new();
805        self.saml_request.push_query("SAMLRequest", &mut q);
806        self.saml_response.push_query("SAMLResponse", &mut q);
807        self.relay_state.push_query("RelayState", &mut q);
808        self.sig_alg.push_query("SigAlg", &mut q);
809        self.signature.push_query("Signature", &mut q);
810        q
811    }
812}
813
814/// Query parameters for `PATCH /externallogins/{externalLoginId}/saml/sls`.
815#[derive(Debug, Clone, Default)]
816pub struct PatchExternalloginsExternalLoginIdSamlSlsQuery {
817    /// Base64-encoded, DEFLATE-compressed SAML LogoutRequest. Supply either `SAMLRequest` or `SAMLResponse`.
818    pub saml_request: Option<String>,
819    /// Base64-encoded, DEFLATE-compressed SAML LogoutResponse. Takes precedence when both message fields are supplied.
820    pub saml_response: Option<String>,
821    /// Opaque state echoed when responding to a logout request.
822    pub relay_state: Option<String>,
823    /// URI of the redirect-binding signature algorithm.
824    pub sig_alg: Option<String>,
825    /// Base64-encoded redirect-binding signature.
826    pub signature: Option<String>,
827}
828
829impl PatchExternalloginsExternalLoginIdSamlSlsQuery {
830    pub(crate) fn to_query(&self) -> Query {
831        let mut q = Query::new();
832        self.saml_request.push_query("SAMLRequest", &mut q);
833        self.saml_response.push_query("SAMLResponse", &mut q);
834        self.relay_state.push_query("RelayState", &mut q);
835        self.sig_alg.push_query("SigAlg", &mut q);
836        self.signature.push_query("Signature", &mut q);
837        q
838    }
839}
840
841/// Query parameters for `PUT /externallogins/{externalLoginId}/saml/sls`.
842#[derive(Debug, Clone, Default)]
843pub struct PutExternalloginsExternalLoginIdSamlSlsQuery {
844    /// Base64-encoded, DEFLATE-compressed SAML LogoutRequest. Supply either `SAMLRequest` or `SAMLResponse`.
845    pub saml_request: Option<String>,
846    /// Base64-encoded, DEFLATE-compressed SAML LogoutResponse. Takes precedence when both message fields are supplied.
847    pub saml_response: Option<String>,
848    /// Opaque state echoed when responding to a logout request.
849    pub relay_state: Option<String>,
850    /// URI of the redirect-binding signature algorithm.
851    pub sig_alg: Option<String>,
852    /// Base64-encoded redirect-binding signature.
853    pub signature: Option<String>,
854}
855
856impl PutExternalloginsExternalLoginIdSamlSlsQuery {
857    pub(crate) fn to_query(&self) -> Query {
858        let mut q = Query::new();
859        self.saml_request.push_query("SAMLRequest", &mut q);
860        self.saml_response.push_query("SAMLResponse", &mut q);
861        self.relay_state.push_query("RelayState", &mut q);
862        self.sig_alg.push_query("SigAlg", &mut q);
863        self.signature.push_query("Signature", &mut q);
864        q
865    }
866}
867
868/// Query parameters for `GET /externalposts`.
869#[derive(Debug, Clone, Default)]
870pub struct GetExternalpostsQuery {
871    /// If set, only posts created before this date are returned. The date must be in RFC3339 format (Zulu-Date).
872    pub before: Option<chrono::DateTime<chrono::Utc>>,
873    /// If set, posts created at the "before" date are included in the result, if the guids of the posts are lexically smaller than the last_post_indentifier. Will be ignored if "before" is not set.
874    pub last_post_indentifier: Option<String>,
875    /// If set, only posts created after this date are returned. The date must be in RFC3339 format (Zulu-Date).
876    pub after: Option<chrono::DateTime<chrono::Utc>>,
877    /// If set posts of these groups are returned.
878    pub external_group_guid: Option<Vec<String>>,
879    /// If set posts of these instances are returned.
880    pub external_instance_guid: Option<Vec<String>>,
881    /// If set, the response will include the specified data.
882    /// Allowed values: `linkings`.
883    pub include: Option<Vec<String>>,
884    /// Number of results per page.
885    pub limit: Option<i64>,
886}
887
888impl GetExternalpostsQuery {
889    pub(crate) fn to_query(&self) -> Query {
890        let mut q = Query::new();
891        self.before.push_query("before", &mut q);
892        self.last_post_indentifier.push_query("last_post_indentifier", &mut q);
893        self.after.push_query("after", &mut q);
894        self.external_group_guid.push_query("external_group_guid[]", &mut q);
895        self.external_instance_guid.push_query("external_instance_guid[]", &mut q);
896        self.include.push_query("include[]", &mut q);
897        self.limit.push_query("limit", &mut q);
898        q
899    }
900}
901
902/// Query parameters for `DELETE /facts/{id}`.
903#[derive(Debug, Clone, Default)]
904pub struct DeleteFactsIdQuery {
905    /// Inspect deletion references without deleting. Returns `409` with the deletion report, including deletable=`true` when deletion would be allowed.
906    pub dry_run: Option<bool>,
907}
908
909impl DeleteFactsIdQuery {
910    pub(crate) fn to_query(&self) -> Query {
911        let mut q = Query::new();
912        self.dry_run.push_query("dry_run", &mut q);
913        q
914    }
915}
916
917/// Form fields for `POST /files/{domainType}/{domainIdentifier}` besides the files.
918#[derive(Debug, Clone, Default)]
919pub struct PostFilesDomainTypeDomainIdentifierForm {
920    /// JSON-encoded image crop and focus options.
921    pub image_options: Option<String>,
922    /// Security level used by the selected attachment category.
923    pub securitylevel_id: Option<i64>,
924    /// Stored sort key.
925    pub sort_key: Option<i64>,
926}
927
928impl PostFilesDomainTypeDomainIdentifierForm {
929    pub(crate) fn to_query(&self) -> Query {
930        let mut q = Query::new();
931        self.image_options.push_query("image_options", &mut q);
932        self.securitylevel_id.push_query("securitylevel_id", &mut q);
933        self.sort_key.push_query("sortKey", &mut q);
934        q
935    }
936}
937
938/// Query parameters for `GET /finance/masterdata`.
939#[derive(Debug, Clone, Default)]
940pub struct GetFinanceMasterdataQuery {
941    /// Visible accounting period whose finance definitions are requested.
942    pub accounting_period_id: Option<i64>,
943}
944
945impl GetFinanceMasterdataQuery {
946    pub(crate) fn to_query(&self) -> Query {
947        let mut q = Query::new();
948        self.accounting_period_id.push_query("accounting_period_id", &mut q);
949        q
950    }
951}
952
953/// Query parameters for `DELETE /finance/accountclasses/{id}`.
954#[derive(Debug, Clone, Default)]
955pub struct DeleteFinanceAccountclassesIdQuery {
956    /// If set to true, the deletion is simulated but nothing will be deleted.
957    pub dry_run: Option<bool>,
958}
959
960impl DeleteFinanceAccountclassesIdQuery {
961    pub(crate) fn to_query(&self) -> Query {
962        let mut q = Query::new();
963        self.dry_run.push_query("dry_run", &mut q);
964        q
965    }
966}
967
968/// Query parameters for `DELETE /finance/accountgroups/{id}`.
969#[derive(Debug, Clone, Default)]
970pub struct DeleteFinanceAccountgroupsIdQuery {
971    /// If set to true, the deletion is simulated but nothing will be deleted.
972    pub dry_run: Option<bool>,
973}
974
975impl DeleteFinanceAccountgroupsIdQuery {
976    pub(crate) fn to_query(&self) -> Query {
977        let mut q = Query::new();
978        self.dry_run.push_query("dry_run", &mut q);
979        q
980    }
981}
982
983/// Query parameters for `DELETE /finance/accounttypes/{id}`.
984#[derive(Debug, Clone, Default)]
985pub struct DeleteFinanceAccounttypesIdQuery {
986    /// If set to true, the deletion is simulated but nothing will be deleted.
987    pub dry_run: Option<bool>,
988}
989
990impl DeleteFinanceAccounttypesIdQuery {
991    pub(crate) fn to_query(&self) -> Query {
992        let mut q = Query::new();
993        self.dry_run.push_query("dry_run", &mut q);
994        q
995    }
996}
997
998/// Query parameters for `DELETE /finance/accountingperiods/{id}`.
999#[derive(Debug, Clone, Default)]
1000pub struct DeleteFinanceAccountingperiodsIdQuery {
1001    /// If set to true, the deletion is simulated but nothing will be deleted.
1002    pub dry_run: Option<bool>,
1003}
1004
1005impl DeleteFinanceAccountingperiodsIdQuery {
1006    pub(crate) fn to_query(&self) -> Query {
1007        let mut q = Query::new();
1008        self.dry_run.push_query("dry_run", &mut q);
1009        q
1010    }
1011}
1012
1013/// Query parameters for `GET /finance/accountingperiods/{id}/bills`.
1014#[derive(Debug, Clone, Default)]
1015pub struct GetFinanceAccountingperiodsIdBillsQuery {
1016    /// Maximum documents per page.
1017    pub limit: Option<i64>,
1018    /// Enable sorting by submission date, with bill ID as a tie-breaker.
1019    /// Allowed values: `submittedDate`.
1020    pub order_by: Option<String>,
1021    /// Direction used when order_by is supplied.
1022    /// Allowed values: `ASC`, `DESC`.
1023    pub order_direction: Option<String>,
1024}
1025
1026impl GetFinanceAccountingperiodsIdBillsQuery {
1027    pub(crate) fn to_query(&self) -> Query {
1028        let mut q = Query::new();
1029        self.limit.push_query("limit", &mut q);
1030        self.order_by.push_query("order_by", &mut q);
1031        self.order_direction.push_query("order_direction", &mut q);
1032        q
1033    }
1034}
1035
1036/// Query parameters for `GET /finance/accountingperiods/{id}/accounts/{accountId}/movements`.
1037#[derive(Debug, Clone, Default)]
1038pub struct GetFinanceAccountingperiodsIdAccountsIdMovementsQuery {
1039    /// Positive number of results per page. No upper bound is enforced.
1040    pub limit: Option<i64>,
1041    /// Restrict to a stored movement state.
1042    /// Allowed values: `booked`, `ignored`, `open`.
1043    pub state: Option<String>,
1044    /// Substring search across purpose, account identifier and person name.
1045    pub query: Option<String>,
1046    /// Additional suggestion details; use the PHP array syntax include\[\]=bills.
1047    /// Allowed values: `bills`.
1048    pub include: Option<Vec<String>>,
1049}
1050
1051impl GetFinanceAccountingperiodsIdAccountsIdMovementsQuery {
1052    pub(crate) fn to_query(&self) -> Query {
1053        let mut q = Query::new();
1054        self.limit.push_query("limit", &mut q);
1055        self.state.push_query("state", &mut q);
1056        self.query.push_query("query", &mut q);
1057        self.include.push_query("include[]", &mut q);
1058        q
1059    }
1060}
1061
1062/// Query parameters for `GET /finance/accountingperiods/{id}/accounts/{accountId}/statements/{statementId}/movements`.
1063#[derive(Debug, Clone, Default)]
1064pub struct GetFinanceAccountingperiodsIdAccountsIdStatementsIdMovementsQuery {
1065    /// Positive number of results per page. No upper bound is enforced.
1066    pub limit: Option<i64>,
1067    /// Restrict to a stored movement state.
1068    /// Allowed values: `booked`, `ignored`, `open`.
1069    pub state: Option<String>,
1070    /// Substring search across purpose, account identifier and person name.
1071    pub query: Option<String>,
1072    /// Additional suggestion details; use the PHP array syntax include\[\]=bills.
1073    /// Allowed values: `bills`.
1074    pub include: Option<Vec<String>>,
1075}
1076
1077impl GetFinanceAccountingperiodsIdAccountsIdStatementsIdMovementsQuery {
1078    pub(crate) fn to_query(&self) -> Query {
1079        let mut q = Query::new();
1080        self.limit.push_query("limit", &mut q);
1081        self.state.push_query("state", &mut q);
1082        self.query.push_query("query", &mut q);
1083        self.include.push_query("include[]", &mut q);
1084        q
1085    }
1086}
1087
1088/// Query parameters for `DELETE /finance/accounts/{id}`.
1089#[derive(Debug, Clone, Default)]
1090pub struct DeleteFinanceAccountsIdQuery {
1091    /// If set to true, the deletion is simulated but nothing will be deleted.
1092    pub dry_run: Option<bool>,
1093}
1094
1095impl DeleteFinanceAccountsIdQuery {
1096    pub(crate) fn to_query(&self) -> Query {
1097        let mut q = Query::new();
1098        self.dry_run.push_query("dry_run", &mut q);
1099        q
1100    }
1101}
1102
1103/// Query parameters for `GET /finance/accounts/csv`.
1104#[derive(Debug, Clone, Default)]
1105pub struct GetFinanceAccountsCsvQuery {
1106    /// Accounting period to export.
1107    pub accounting_period_id: Option<i64>,
1108}
1109
1110impl GetFinanceAccountsCsvQuery {
1111    pub(crate) fn to_query(&self) -> Query {
1112        let mut q = Query::new();
1113        self.accounting_period_id.push_query("accounting_period_id", &mut q);
1114        q
1115    }
1116}
1117
1118/// Query parameters for `GET /finance/accounts/export`.
1119#[derive(Debug, Clone, Default)]
1120pub struct GetFinanceAccountsExportQuery {
1121    /// Accounting period to export.
1122    pub accounting_period_id: Option<i64>,
1123    /// Download format. Only CSV and XLSX generators are registered.
1124    /// Allowed values: `csv`, `xlsx`.
1125    pub format: Option<String>,
1126    /// Deprecated. Compatibility alias for format.
1127    /// Allowed values: `csv`, `xlsx`.
1128    #[deprecated = "deprecated in the ChurchTools API"]
1129    pub r#type: Option<String>,
1130}
1131
1132impl GetFinanceAccountsExportQuery {
1133    pub(crate) fn to_query(&self) -> Query {
1134        let mut q = Query::new();
1135        self.accounting_period_id.push_query("accounting_period_id", &mut q);
1136        self.format.push_query("format", &mut q);
1137        self.r#type.push_query("type", &mut q);
1138        q
1139    }
1140}
1141
1142/// Query parameters for `GET /finance/accounts`.
1143#[derive(Debug, Clone, Default)]
1144pub struct GetFinanceAccountsQuery {
1145    /// One accounting period or an array of period IDs. Use accounting_period_id\[\]=1&accounting_period_id\[\]=2 for multiple periods. Omit to search all visible periods.
1146    pub accounting_period_id: Option<serde_json::Value>,
1147    /// Calculate current balances and budgets from the previous period. False skips these calculations; returned zero or null values do not indicate calculated balances.
1148    pub calculate_balance: Option<bool>,
1149}
1150
1151impl GetFinanceAccountsQuery {
1152    pub(crate) fn to_query(&self) -> Query {
1153        let mut q = Query::new();
1154        self.accounting_period_id.push_query("accounting_period_id", &mut q);
1155        self.calculate_balance.push_query("calculate_balance", &mut q);
1156        q
1157    }
1158}
1159
1160/// Query parameters for `DELETE /finance/bills/{id}`.
1161#[derive(Debug, Clone, Default)]
1162pub struct DeleteFinanceBillsIdQuery {
1163    /// If set to true, the deletion is simulated but nothing will be deleted.
1164    pub dry_run: Option<bool>,
1165}
1166
1167impl DeleteFinanceBillsIdQuery {
1168    pub(crate) fn to_query(&self) -> Query {
1169        let mut q = Query::new();
1170        self.dry_run.push_query("dry_run", &mut q);
1171        q
1172    }
1173}
1174
1175/// Query parameters for `DELETE /finance/cashdiscounts/{id}`.
1176#[derive(Debug, Clone, Default)]
1177pub struct DeleteFinanceCashdiscountsIdQuery {
1178    /// If set to true, the deletion is simulated but nothing will be deleted.
1179    pub dry_run: Option<bool>,
1180}
1181
1182impl DeleteFinanceCashdiscountsIdQuery {
1183    pub(crate) fn to_query(&self) -> Query {
1184        let mut q = Query::new();
1185        self.dry_run.push_query("dry_run", &mut q);
1186        q
1187    }
1188}
1189
1190/// Query parameters for `GET /finance/cashdiscounts`.
1191#[derive(Debug, Clone, Default)]
1192pub struct GetFinanceCashdiscountsQuery {
1193    /// Only return entries linked to accounts in this accounting period. Omit to return all periods.
1194    pub accounting_period_id: Option<i64>,
1195}
1196
1197impl GetFinanceCashdiscountsQuery {
1198    pub(crate) fn to_query(&self) -> Query {
1199        let mut q = Query::new();
1200        self.accounting_period_id.push_query("accounting_period_id", &mut q);
1201        q
1202    }
1203}
1204
1205/// Query parameters for `DELETE /finance/clients/{id}`.
1206#[derive(Debug, Clone, Default)]
1207pub struct DeleteFinanceClientsIdQuery {
1208    /// If set to true, the deletion is simulated but nothing will be deleted.
1209    pub dry_run: Option<bool>,
1210}
1211
1212impl DeleteFinanceClientsIdQuery {
1213    pub(crate) fn to_query(&self) -> Query {
1214        let mut q = Query::new();
1215        self.dry_run.push_query("dry_run", &mut q);
1216        q
1217    }
1218}
1219
1220/// Query parameters for `DELETE /finance/costcenters/{id}`.
1221#[derive(Debug, Clone, Default)]
1222pub struct DeleteFinanceCostcentersIdQuery {
1223    /// If set to true, the deletion is simulated but nothing will be deleted.
1224    pub dry_run: Option<bool>,
1225}
1226
1227impl DeleteFinanceCostcentersIdQuery {
1228    pub(crate) fn to_query(&self) -> Query {
1229        let mut q = Query::new();
1230        self.dry_run.push_query("dry_run", &mut q);
1231        q
1232    }
1233}
1234
1235/// Query parameters for `GET /finance/costcenters/export`.
1236#[derive(Debug, Clone, Default)]
1237pub struct GetFinanceCostcentersExportQuery {
1238    /// Accounting period to export.
1239    pub accounting_period_id: Option<i64>,
1240    /// Download format. Only CSV and XLSX generators are registered.
1241    /// Allowed values: `csv`, `xlsx`.
1242    pub format: Option<String>,
1243    /// Deprecated. Compatibility alias for format.
1244    /// Allowed values: `csv`, `xlsx`.
1245    #[deprecated = "deprecated in the ChurchTools API"]
1246    pub r#type: Option<String>,
1247}
1248
1249impl GetFinanceCostcentersExportQuery {
1250    pub(crate) fn to_query(&self) -> Query {
1251        let mut q = Query::new();
1252        self.accounting_period_id.push_query("accounting_period_id", &mut q);
1253        self.format.push_query("format", &mut q);
1254        self.r#type.push_query("type", &mut q);
1255        q
1256    }
1257}
1258
1259/// Query parameters for `GET /finance/costcenters`.
1260#[derive(Debug, Clone, Default)]
1261pub struct GetFinanceCostcentersQuery {
1262    /// Restrict results to this accounting period. The period must also be visible to the caller.
1263    pub accounting_period_id: Option<i64>,
1264}
1265
1266impl GetFinanceCostcentersQuery {
1267    pub(crate) fn to_query(&self) -> Query {
1268        let mut q = Query::new();
1269        self.accounting_period_id.push_query("accounting_period_id", &mut q);
1270        q
1271    }
1272}
1273
1274/// Query parameters for `DELETE /finance/donators/{donatorCoupleId}/receipts`.
1275#[derive(Debug, Clone, Default)]
1276pub struct DeleteFinanceDonatorsDonatorCoupleIdQuery {
1277    /// Accounting period for these donation receipts.
1278    pub accounting_period_id: Option<i64>,
1279}
1280
1281impl DeleteFinanceDonatorsDonatorCoupleIdQuery {
1282    pub(crate) fn to_query(&self) -> Query {
1283        let mut q = Query::new();
1284        self.accounting_period_id.push_query("accounting_period_id", &mut q);
1285        q
1286    }
1287}
1288
1289/// Query parameters for `DELETE /finance/donators/receipts`.
1290#[derive(Debug, Clone, Default)]
1291pub struct DeleteFinanceDonatorsReceiptsQuery {
1292    /// Accounting period for these donation receipts.
1293    pub accounting_period_id: Option<i64>,
1294}
1295
1296impl DeleteFinanceDonatorsReceiptsQuery {
1297    pub(crate) fn to_query(&self) -> Query {
1298        let mut q = Query::new();
1299        self.accounting_period_id.push_query("accounting_period_id", &mut q);
1300        q
1301    }
1302}
1303
1304/// Query parameters for `GET /finance/donators/receipts`.
1305#[derive(Debug, Clone, Default)]
1306pub struct GetFinanceDonatorsReceiptsQuery {
1307    /// Accounting period for these donation receipts.
1308    pub accounting_period_id: Option<i64>,
1309    /// Combine letters and attachments separately (twofiles), or interleave them by recipient into one PDF (onefile).
1310    /// Allowed values: `onefile`, `twofiles`.
1311    pub mode: Option<String>,
1312    /// Insert blank pages for duplex printing: all, only cover letters, only attachments, or none. In onefile mode donation_attachment alone has no effect.
1313    /// Allowed values: `all`, `donation_attachment`, `donation_cover_letter`, `none`.
1314    pub cleardoublepage: Option<String>,
1315}
1316
1317impl GetFinanceDonatorsReceiptsQuery {
1318    pub(crate) fn to_query(&self) -> Query {
1319        let mut q = Query::new();
1320        self.accounting_period_id.push_query("accounting_period_id", &mut q);
1321        self.mode.push_query("mode", &mut q);
1322        self.cleardoublepage.push_query("cleardoublepage", &mut q);
1323        q
1324    }
1325}
1326
1327/// Query parameters for `GET /finance/donators/{donatorCoupleId}/receipts`.
1328#[derive(Debug, Clone, Default)]
1329pub struct GetFinanceDonatorsDonatorCoupleIdQuery {
1330    /// Accounting period for these donation receipts.
1331    pub accounting_period_id: Option<i64>,
1332    /// Watermark for returned files. Does not select the stored receipt type.
1333    /// Allowed values: `DRAFT`, `DUPLICATE`, `ORIGINAL`.
1334    pub r#type: Option<String>,
1335}
1336
1337impl GetFinanceDonatorsDonatorCoupleIdQuery {
1338    pub(crate) fn to_query(&self) -> Query {
1339        let mut q = Query::new();
1340        self.accounting_period_id.push_query("accounting_period_id", &mut q);
1341        self.r#type.push_query("type", &mut q);
1342        q
1343    }
1344}
1345
1346/// Query parameters for `GET /finance/donators`.
1347#[derive(Debug, Clone, Default)]
1348pub struct GetFinanceDonatorsQuery {
1349    /// Accounting period to aggregate.
1350    pub accounting_period_id: Option<i64>,
1351    /// Return only households missing at least one required name/address field.
1352    pub only_incomplete: Option<bool>,
1353    /// Sort by primary last name, donation count, latest donation date or net sum.
1354    /// Allowed values: `count`, `last`, `name`, `sum`.
1355    pub order_by: Option<String>,
1356    /// Sort direction; upper- and lower-case values are accepted.
1357    /// Allowed values: `ASC`, `DESC`, `asc`, `desc`.
1358    pub order_direction: Option<String>,
1359    /// Substring search on the primary first or last name. No minimum length is enforced; SQL LIKE wildcards are not escaped.
1360    pub query: Option<String>,
1361    /// Maximum households per page. No upper bound is enforced.
1362    pub limit: Option<i64>,
1363}
1364
1365impl GetFinanceDonatorsQuery {
1366    pub(crate) fn to_query(&self) -> Query {
1367        let mut q = Query::new();
1368        self.accounting_period_id.push_query("accounting_period_id", &mut q);
1369        self.only_incomplete.push_query("only_incomplete", &mut q);
1370        self.order_by.push_query("order_by", &mut q);
1371        self.order_direction.push_query("order_direction", &mut q);
1372        self.query.push_query("query", &mut q);
1373        self.limit.push_query("limit", &mut q);
1374        q
1375    }
1376}
1377
1378/// Query parameters for `GET /finance/eubp/submissions`.
1379#[derive(Debug, Clone, Default)]
1380pub struct GetFinanceEubpSubmissionsQuery {
1381    /// Filter by client ID
1382    pub client_id: Option<i64>,
1383}
1384
1385impl GetFinanceEubpSubmissionsQuery {
1386    pub(crate) fn to_query(&self) -> Query {
1387        let mut q = Query::new();
1388        self.client_id.push_query("client_id", &mut q);
1389        q
1390    }
1391}
1392
1393/// Query parameters for `GET /finance/eubp/submissions/{id}/accounts`.
1394#[derive(Debug, Clone, Default)]
1395pub struct GetFinanceEubpSubmissionsIdAccountsQuery {
1396    /// Optional finance client ID to return accounts only for this client.
1397    pub client_id: Option<i64>,
1398}
1399
1400impl GetFinanceEubpSubmissionsIdAccountsQuery {
1401    pub(crate) fn to_query(&self) -> Query {
1402        let mut q = Query::new();
1403        self.client_id.push_query("client_id", &mut q);
1404        q
1405    }
1406}
1407
1408/// Query parameters for `POST /finance/splittransactions`.
1409#[derive(Debug, Clone, Default)]
1410pub struct PostFinanceSplittransactionsQuery {
1411    /// Skip the normal donation-account/donor constraint. Must be a query parameter. Joint-donor consistency checks still apply in the child service.
1412    pub ignore_donation_constraint: Option<bool>,
1413}
1414
1415impl PostFinanceSplittransactionsQuery {
1416    pub(crate) fn to_query(&self) -> Query {
1417        let mut q = Query::new();
1418        self.ignore_donation_constraint.push_query("ignoreDonationConstraint", &mut q);
1419        q
1420    }
1421}
1422
1423/// Query parameters for `DELETE /finance/splittransactions/{id}`.
1424#[derive(Debug, Clone, Default)]
1425pub struct DeleteFinanceSplittransactionsIdQuery {
1426    /// If set to true, the deletion is simulated but nothing will be deleted.
1427    pub dry_run: Option<bool>,
1428    /// Include additional information
1429    /// Allowed values: `bills`.
1430    pub include: Option<Vec<String>>,
1431}
1432
1433impl DeleteFinanceSplittransactionsIdQuery {
1434    pub(crate) fn to_query(&self) -> Query {
1435        let mut q = Query::new();
1436        self.dry_run.push_query("dry_run", &mut q);
1437        self.include.push_query("include[]", &mut q);
1438        q
1439    }
1440}
1441
1442/// Query parameters for `GET /finance/splittransactions/{id}`.
1443#[derive(Debug, Clone, Default)]
1444pub struct GetFinanceSplittransactionsIdQuery {
1445    /// Include additional information
1446    /// Allowed values: `bills`.
1447    pub include: Option<Vec<String>>,
1448}
1449
1450impl GetFinanceSplittransactionsIdQuery {
1451    pub(crate) fn to_query(&self) -> Query {
1452        let mut q = Query::new();
1453        self.include.push_query("include[]", &mut q);
1454        q
1455    }
1456}
1457
1458/// Query parameters for `PUT /finance/splittransactions/{id}`.
1459#[derive(Debug, Clone, Default)]
1460pub struct PutFinanceSplittransactionsIdQuery {
1461    /// Skip the normal donation-account/donor constraint. Must be a query parameter. Joint-donor consistency checks still apply in the child service.
1462    pub ignore_donation_constraint: Option<bool>,
1463    /// Include additional information
1464    /// Allowed values: `bills`.
1465    pub include: Option<Vec<String>>,
1466}
1467
1468impl PutFinanceSplittransactionsIdQuery {
1469    pub(crate) fn to_query(&self) -> Query {
1470        let mut q = Query::new();
1471        self.ignore_donation_constraint.push_query("ignoreDonationConstraint", &mut q);
1472        self.include.push_query("include[]", &mut q);
1473        q
1474    }
1475}
1476
1477/// Query parameters for `DELETE /finance/taxrates/{id}`.
1478#[derive(Debug, Clone, Default)]
1479pub struct DeleteFinanceTaxratesIdQuery {
1480    /// If set to true, the deletion is simulated but nothing will be deleted.
1481    pub dry_run: Option<bool>,
1482}
1483
1484impl DeleteFinanceTaxratesIdQuery {
1485    pub(crate) fn to_query(&self) -> Query {
1486        let mut q = Query::new();
1487        self.dry_run.push_query("dry_run", &mut q);
1488        q
1489    }
1490}
1491
1492/// Query parameters for `GET /finance/taxrates`.
1493#[derive(Debug, Clone, Default)]
1494pub struct GetFinanceTaxratesQuery {
1495    /// Only return entries linked to accounts in this accounting period. Omit to return all periods.
1496    pub accounting_period_id: Option<i64>,
1497}
1498
1499impl GetFinanceTaxratesQuery {
1500    pub(crate) fn to_query(&self) -> Query {
1501        let mut q = Query::new();
1502        self.accounting_period_id.push_query("accounting_period_id", &mut q);
1503        q
1504    }
1505}
1506
1507/// Query parameters for `DELETE /finance/taxtypes/{id}`.
1508#[derive(Debug, Clone, Default)]
1509pub struct DeleteFinanceTaxtypesIdQuery {
1510    /// If set to true, the deletion is simulated but nothing will be deleted.
1511    pub dry_run: Option<bool>,
1512}
1513
1514impl DeleteFinanceTaxtypesIdQuery {
1515    pub(crate) fn to_query(&self) -> Query {
1516        let mut q = Query::new();
1517        self.dry_run.push_query("dry_run", &mut q);
1518        q
1519    }
1520}
1521
1522/// Query parameters for `POST /finance/templates/{id}`.
1523#[derive(Debug, Clone, Default)]
1524pub struct PostFinanceTemplatesIdQuery {
1525    /// Existing accounting period visible to the caller.
1526    pub accounting_period_id: Option<i64>,
1527}
1528
1529impl PostFinanceTemplatesIdQuery {
1530    pub(crate) fn to_query(&self) -> Query {
1531        let mut q = Query::new();
1532        self.accounting_period_id.push_query("accounting_period_id", &mut q);
1533        q
1534    }
1535}
1536
1537/// Query parameters for `GET /finance/templates/export`.
1538#[derive(Debug, Clone, Default)]
1539pub struct GetFinanceTemplatesExportQuery {
1540    /// Existing accounting period visible to the caller.
1541    pub accounting_period_id: Option<i64>,
1542}
1543
1544impl GetFinanceTemplatesExportQuery {
1545    pub(crate) fn to_query(&self) -> Query {
1546        let mut q = Query::new();
1547        self.accounting_period_id.push_query("accounting_period_id", &mut q);
1548        q
1549    }
1550}
1551
1552/// Query parameters for `DELETE /finance/transactionpurposes/{id}`.
1553#[derive(Debug, Clone, Default)]
1554pub struct DeleteFinanceTransactionpurposesIdQuery {
1555    /// If set to true, the deletion is simulated but nothing will be deleted.
1556    pub dry_run: Option<bool>,
1557}
1558
1559impl DeleteFinanceTransactionpurposesIdQuery {
1560    pub(crate) fn to_query(&self) -> Query {
1561        let mut q = Query::new();
1562        self.dry_run.push_query("dry_run", &mut q);
1563        q
1564    }
1565}
1566
1567/// Query parameters for `POST /finance/transactions/bulkcreate`.
1568#[derive(Debug, Clone, Default)]
1569pub struct PostFinanceTransactionsBulkcreateQuery {
1570    /// Skip the donor/account constraint. For creation this must be a query parameter; a body-only value does not disable the constraint. Spouse consistency remains enforced.
1571    pub ignore_donation_constraint: Option<bool>,
1572}
1573
1574impl PostFinanceTransactionsBulkcreateQuery {
1575    pub(crate) fn to_query(&self) -> Query {
1576        let mut q = Query::new();
1577        self.ignore_donation_constraint.push_query("ignoreDonationConstraint", &mut q);
1578        q
1579    }
1580}
1581
1582/// Query parameters for `POST /finance/transactions`.
1583#[derive(Debug, Clone, Default)]
1584pub struct PostFinanceTransactionsQuery {
1585    /// Skip the donor/account constraint. For creation this must be a query parameter; a body-only value does not disable the constraint. Spouse consistency remains enforced.
1586    pub ignore_donation_constraint: Option<bool>,
1587}
1588
1589impl PostFinanceTransactionsQuery {
1590    pub(crate) fn to_query(&self) -> Query {
1591        let mut q = Query::new();
1592        self.ignore_donation_constraint.push_query("ignoreDonationConstraint", &mut q);
1593        q
1594    }
1595}
1596
1597/// Query parameters for `DELETE /finance/transactions/{id}`.
1598#[derive(Debug, Clone, Default)]
1599pub struct DeleteFinanceTransactionsIdQuery {
1600    /// If set to true, the deletion is simulated but nothing will be deleted.
1601    pub dry_run: Option<bool>,
1602    /// Include additional information
1603    /// Allowed values: `bills`.
1604    pub include: Option<Vec<String>>,
1605}
1606
1607impl DeleteFinanceTransactionsIdQuery {
1608    pub(crate) fn to_query(&self) -> Query {
1609        let mut q = Query::new();
1610        self.dry_run.push_query("dry_run", &mut q);
1611        self.include.push_query("include[]", &mut q);
1612        q
1613    }
1614}
1615
1616/// Query parameters for `GET /finance/transactions/{id}`.
1617#[derive(Debug, Clone, Default)]
1618pub struct GetFinanceTransactionsIdQuery {
1619    /// Include additional information
1620    /// Allowed values: `bills`.
1621    pub include: Option<Vec<String>>,
1622}
1623
1624impl GetFinanceTransactionsIdQuery {
1625    pub(crate) fn to_query(&self) -> Query {
1626        let mut q = Query::new();
1627        self.include.push_query("include[]", &mut q);
1628        q
1629    }
1630}
1631
1632/// Query parameters for `GET /finance/transactions/csv`.
1633#[derive(Debug, Clone, Default)]
1634pub struct GetFinanceTransactionsCsvQuery {
1635    /// ID of accounting period to get master data for
1636    pub accounting_period_id: Option<i64>,
1637    /// Filter by person ID. Get all transactions the person has created. But only show those the user can see.
1638    pub created_pid: Option<i64>,
1639    /// Filter by cost centers.
1640    pub cost_center_ids: Option<Vec<i64>>,
1641    /// Person IDs matching either donor or spouse, including donors of the original booking when matching cancellations.
1642    pub donator_ids: Option<Vec<i64>>,
1643    /// Filter by ids to include.
1644    pub include_ids: Option<Vec<i64>>,
1645    /// Filter by ids to exclude.
1646    pub exclude_ids: Option<Vec<i64>>,
1647    /// Filter by account/contra account. All transactions match, where either account or contra account is in the list.
1648    pub account_ids: Option<Vec<i64>>,
1649    /// Currently, either true or false selects bookings with a positive donor ID. Omit this parameter to include both donations and other bookings.
1650    pub is_donation: Option<bool>,
1651    /// True selects a cash-asset debit account and a non-cash-asset credit account (income); false selects the reverse (expense). Transfers between two cash-asset accounts or two non-cash-asset accounts match neither value.
1652    pub is_income: Option<bool>,
1653    /// Inclusive lower bound for documentDate.
1654    pub start_date: Option<chrono::NaiveDate>,
1655    /// Inclusive upper bound for documentDate.
1656    pub end_date: Option<chrono::NaiveDate>,
1657    /// Filter transactions, whether transaction is immutable.
1658    pub is_immutable: Option<bool>,
1659    /// Sort by document date, amount, modification time, document number, note, account number, contra-account number, cost-center number, donor name or receipt count. Date and modification time plus ID break ties where applicable. Document numbers use their stored text, numeric and split suffix parts.
1660    /// Allowed values: `account`, `amount`, `bills`, `contra_account`, `cost_center`, `date`, `donator`, `modified`, `note`, `number`.
1661    pub order_by: Option<String>,
1662    /// Primary sort direction. Prefer uppercase values for consistent secondary sorting.
1663    /// Allowed values: `ASC`, `DESC`, `asc`, `desc`.
1664    pub order_direction: Option<String>,
1665    /// Search note, document number or amount. For amount matching, leading zeros and decimal separators are removed.
1666    pub query: Option<String>,
1667    /// Filter by whether reimbursement of expenses was waived as a donation.
1668    pub is_waiver_of_reimbursement_of_expenses: Option<bool>,
1669    /// Column layout: default is the human-readable CT export; sage100 uses separate debit/credit account and cost-center numbers plus tax fields. An empty string selects default.
1670    /// Allowed values: ``, `default`, `sage100`.
1671    pub target: Option<String>,
1672}
1673
1674impl GetFinanceTransactionsCsvQuery {
1675    pub(crate) fn to_query(&self) -> Query {
1676        let mut q = Query::new();
1677        self.accounting_period_id.push_query("accounting_period_id", &mut q);
1678        self.created_pid.push_query("created_pid", &mut q);
1679        self.cost_center_ids.push_query("cost_center_ids[]", &mut q);
1680        self.donator_ids.push_query("donator_ids[]", &mut q);
1681        self.include_ids.push_query("include_ids[]", &mut q);
1682        self.exclude_ids.push_query("exclude_ids[]", &mut q);
1683        self.account_ids.push_query("account_ids[]", &mut q);
1684        self.is_donation.push_query("is_donation", &mut q);
1685        self.is_income.push_query("is_income", &mut q);
1686        self.start_date.push_query("start_date", &mut q);
1687        self.end_date.push_query("end_date", &mut q);
1688        self.is_immutable.push_query("is_immutable", &mut q);
1689        self.order_by.push_query("order_by", &mut q);
1690        self.order_direction.push_query("order_direction", &mut q);
1691        self.query.push_query("query", &mut q);
1692        self.is_waiver_of_reimbursement_of_expenses.push_query("is_waiver_of_reimbursement_of_expenses", &mut q);
1693        self.target.push_query("target", &mut q);
1694        q
1695    }
1696}
1697
1698/// Query parameters for `GET /finance/transactions/datevexport`.
1699#[derive(Debug, Clone, Default)]
1700pub struct GetFinanceTransactionsDatevexportQuery {
1701    /// ID of accounting period to get master data for
1702    pub accounting_period_id: Option<i64>,
1703    /// Filter by person ID. Get all transactions the person has created. But only show those the user can see.
1704    pub created_pid: Option<i64>,
1705    /// Filter by cost centers.
1706    pub cost_center_ids: Option<Vec<i64>>,
1707    /// Person IDs matching either donor or spouse, including donors of the original booking when matching cancellations.
1708    pub donator_ids: Option<Vec<i64>>,
1709    /// Filter by ids to include.
1710    pub include_ids: Option<Vec<i64>>,
1711    /// Filter by ids to exclude.
1712    pub exclude_ids: Option<Vec<i64>>,
1713    /// Filter by account/contra account. All transactions match, where either account or contra account is in the list.
1714    pub account_ids: Option<Vec<i64>>,
1715    /// Currently, either true or false selects bookings with a positive donor ID. Omit this parameter to include both donations and other bookings.
1716    pub is_donation: Option<bool>,
1717    /// True selects a cash-asset debit account and a non-cash-asset credit account (income); false selects the reverse (expense). Transfers between two cash-asset accounts or two non-cash-asset accounts match neither value.
1718    pub is_income: Option<bool>,
1719    /// Inclusive lower bound for documentDate.
1720    pub start_date: Option<chrono::NaiveDate>,
1721    /// Inclusive upper bound for documentDate.
1722    pub end_date: Option<chrono::NaiveDate>,
1723    /// Filter transactions, whether transaction is immutable.
1724    pub is_immutable: Option<bool>,
1725    /// Sort by document date, amount, modification time, document number, note, account number, contra-account number, cost-center number, donor name or receipt count. Date and modification time plus ID break ties where applicable. Document numbers use their stored text, numeric and split suffix parts.
1726    /// Allowed values: `account`, `amount`, `bills`, `contra_account`, `cost_center`, `date`, `donator`, `modified`, `note`, `number`.
1727    pub order_by: Option<String>,
1728    /// Primary sort direction. Prefer uppercase values for consistent secondary sorting.
1729    /// Allowed values: `ASC`, `DESC`, `asc`, `desc`.
1730    pub order_direction: Option<String>,
1731    /// Search note, document number or amount. For amount matching, leading zeros and decimal separators are removed.
1732    pub query: Option<String>,
1733    /// Filter by whether reimbursement of expenses was waived as a donation.
1734    pub is_waiver_of_reimbursement_of_expenses: Option<bool>,
1735}
1736
1737impl GetFinanceTransactionsDatevexportQuery {
1738    pub(crate) fn to_query(&self) -> Query {
1739        let mut q = Query::new();
1740        self.accounting_period_id.push_query("accounting_period_id", &mut q);
1741        self.created_pid.push_query("created_pid", &mut q);
1742        self.cost_center_ids.push_query("cost_center_ids[]", &mut q);
1743        self.donator_ids.push_query("donator_ids[]", &mut q);
1744        self.include_ids.push_query("include_ids[]", &mut q);
1745        self.exclude_ids.push_query("exclude_ids[]", &mut q);
1746        self.account_ids.push_query("account_ids[]", &mut q);
1747        self.is_donation.push_query("is_donation", &mut q);
1748        self.is_income.push_query("is_income", &mut q);
1749        self.start_date.push_query("start_date", &mut q);
1750        self.end_date.push_query("end_date", &mut q);
1751        self.is_immutable.push_query("is_immutable", &mut q);
1752        self.order_by.push_query("order_by", &mut q);
1753        self.order_direction.push_query("order_direction", &mut q);
1754        self.query.push_query("query", &mut q);
1755        self.is_waiver_of_reimbursement_of_expenses.push_query("is_waiver_of_reimbursement_of_expenses", &mut q);
1756        q
1757    }
1758}
1759
1760/// Query parameters for `GET /finance/transactions/documentnumberavailable`.
1761#[derive(Debug, Clone, Default)]
1762pub struct GetFinanceTransactionsDocumentnumberavailableQuery {
1763    /// ID of accounting period to get master data for
1764    pub accounting_period_id: Option<i64>,
1765    /// Document number to check for availability.
1766    pub document_number: Option<String>,
1767}
1768
1769impl GetFinanceTransactionsDocumentnumberavailableQuery {
1770    pub(crate) fn to_query(&self) -> Query {
1771        let mut q = Query::new();
1772        self.accounting_period_id.push_query("accounting_period_id", &mut q);
1773        self.document_number.push_query("document_number", &mut q);
1774        q
1775    }
1776}
1777
1778/// Query parameters for `GET /finance/transactions/export`.
1779#[derive(Debug, Clone, Default)]
1780pub struct GetFinanceTransactionsExportQuery {
1781    /// ID of accounting period to get master data for
1782    pub accounting_period_id: Option<i64>,
1783    /// Filter by person ID. Get all transactions the person has created. But only show those the user can see.
1784    pub created_pid: Option<i64>,
1785    /// Filter by cost centers.
1786    pub cost_center_ids: Option<Vec<i64>>,
1787    /// Person IDs matching either donor or spouse, including donors of the original booking when matching cancellations.
1788    pub donator_ids: Option<Vec<i64>>,
1789    /// Filter by ids to include.
1790    pub include_ids: Option<Vec<i64>>,
1791    /// Filter by ids to exclude.
1792    pub exclude_ids: Option<Vec<i64>>,
1793    /// Filter by account/contra account. All transactions match, where either account or contra account is in the list.
1794    pub account_ids: Option<Vec<i64>>,
1795    /// Currently, either true or false selects bookings with a positive donor ID. Omit this parameter to include both donations and other bookings.
1796    pub is_donation: Option<bool>,
1797    /// True selects a cash-asset debit account and a non-cash-asset credit account (income); false selects the reverse (expense). Transfers between two cash-asset accounts or two non-cash-asset accounts match neither value.
1798    pub is_income: Option<bool>,
1799    /// Inclusive lower bound for documentDate.
1800    pub start_date: Option<chrono::NaiveDate>,
1801    /// Inclusive upper bound for documentDate.
1802    pub end_date: Option<chrono::NaiveDate>,
1803    /// Filter transactions, whether transaction is immutable.
1804    pub is_immutable: Option<bool>,
1805    /// Sort by document date, amount, modification time, document number, note, account number, contra-account number, cost-center number, donor name or receipt count. Date and modification time plus ID break ties where applicable. Document numbers use their stored text, numeric and split suffix parts.
1806    /// Allowed values: `account`, `amount`, `bills`, `contra_account`, `cost_center`, `date`, `donator`, `modified`, `note`, `number`.
1807    pub order_by: Option<String>,
1808    /// Primary sort direction. Prefer uppercase values for consistent secondary sorting.
1809    /// Allowed values: `ASC`, `DESC`, `asc`, `desc`.
1810    pub order_direction: Option<String>,
1811    /// Search note, document number or amount. For amount matching, leading zeros and decimal separators are removed.
1812    pub query: Option<String>,
1813    /// Filter by whether reimbursement of expenses was waived as a donation.
1814    pub is_waiver_of_reimbursement_of_expenses: Option<bool>,
1815    /// Column layout: default is the human-readable CT export; sage100 uses separate debit/credit account and cost-center numbers plus tax fields. An empty string selects default.
1816    /// Allowed values: ``, `default`, `sage100`.
1817    pub target: Option<String>,
1818    /// File format.
1819    /// Allowed values: `csv`, `xlsx`.
1820    pub format: Option<String>,
1821    /// Deprecated. Legacy alias for format. Use format for new integrations.
1822    /// Allowed values: `csv`, `xlsx`.
1823    #[deprecated = "Use format for new integrations."]
1824    pub r#type: Option<String>,
1825}
1826
1827impl GetFinanceTransactionsExportQuery {
1828    pub(crate) fn to_query(&self) -> Query {
1829        let mut q = Query::new();
1830        self.accounting_period_id.push_query("accounting_period_id", &mut q);
1831        self.created_pid.push_query("created_pid", &mut q);
1832        self.cost_center_ids.push_query("cost_center_ids[]", &mut q);
1833        self.donator_ids.push_query("donator_ids[]", &mut q);
1834        self.include_ids.push_query("include_ids[]", &mut q);
1835        self.exclude_ids.push_query("exclude_ids[]", &mut q);
1836        self.account_ids.push_query("account_ids[]", &mut q);
1837        self.is_donation.push_query("is_donation", &mut q);
1838        self.is_income.push_query("is_income", &mut q);
1839        self.start_date.push_query("start_date", &mut q);
1840        self.end_date.push_query("end_date", &mut q);
1841        self.is_immutable.push_query("is_immutable", &mut q);
1842        self.order_by.push_query("order_by", &mut q);
1843        self.order_direction.push_query("order_direction", &mut q);
1844        self.query.push_query("query", &mut q);
1845        self.is_waiver_of_reimbursement_of_expenses.push_query("is_waiver_of_reimbursement_of_expenses", &mut q);
1846        self.target.push_query("target", &mut q);
1847        self.format.push_query("format", &mut q);
1848        self.r#type.push_query("type", &mut q);
1849        q
1850    }
1851}
1852
1853/// Query parameters for `GET /finance/transactions/ids`.
1854#[derive(Debug, Clone, Default)]
1855pub struct GetFinanceTransactionsIdsQuery {
1856    /// Optional ID of an accounting period. When provided, only the transaction IDs of that period are returned as a flat array.
1857    pub accounting_period_id: Option<i64>,
1858}
1859
1860impl GetFinanceTransactionsIdsQuery {
1861    pub(crate) fn to_query(&self) -> Query {
1862        let mut q = Query::new();
1863        self.accounting_period_id.push_query("accounting_period_id", &mut q);
1864        q
1865    }
1866}
1867
1868/// Query parameters for `GET /finance/transactions/nextdocumentnumber`.
1869#[derive(Debug, Clone, Default)]
1870pub struct GetFinanceTransactionsNextdocumentnumberQuery {
1871    /// ID of accounting period to get master data for
1872    pub accounting_period_id: Option<i64>,
1873}
1874
1875impl GetFinanceTransactionsNextdocumentnumberQuery {
1876    pub(crate) fn to_query(&self) -> Query {
1877        let mut q = Query::new();
1878        self.accounting_period_id.push_query("accounting_period_id", &mut q);
1879        q
1880    }
1881}
1882
1883/// Query parameters for `GET /finance/transactions/summary`.
1884#[derive(Debug, Clone, Default)]
1885pub struct GetFinanceTransactionsSummaryQuery {
1886    /// ID of accounting period to get master data for
1887    pub accounting_period_id: Option<i64>,
1888    /// Filter by person ID. Get all transactions the person has created. But only show those the user can see.
1889    pub created_pid: Option<i64>,
1890    /// Filter by cost centers.
1891    pub cost_center_ids: Option<Vec<i64>>,
1892    /// Person IDs matching either donor or spouse, including donors of the original booking when matching cancellations.
1893    pub donator_ids: Option<Vec<i64>>,
1894    /// Filter by account/contra account. All transactions match, where either account or contra account is in the list.
1895    pub account_ids: Option<Vec<i64>>,
1896    /// Currently, either true or false selects bookings with a positive donor ID. Omit this parameter to include both donations and other bookings.
1897    pub is_donation: Option<bool>,
1898    /// True selects a cash-asset debit account and a non-cash-asset credit account (income); false selects the reverse (expense). Transfers between two cash-asset accounts or two non-cash-asset accounts match neither value.
1899    pub is_income: Option<bool>,
1900    /// Inclusive lower bound for documentDate.
1901    pub start_date: Option<chrono::NaiveDate>,
1902    /// Inclusive upper bound for documentDate.
1903    pub end_date: Option<chrono::NaiveDate>,
1904    /// Filter transactions, whether transaction is immutable.
1905    pub is_immutable: Option<bool>,
1906    /// Sort by document date, amount, modification time, document number, note, account number, contra-account number, cost-center number, donor name or receipt count. Date and modification time plus ID break ties where applicable. Document numbers use their stored text, numeric and split suffix parts.
1907    /// Allowed values: `account`, `amount`, `bills`, `contra_account`, `cost_center`, `date`, `donator`, `modified`, `note`, `number`.
1908    pub order_by: Option<String>,
1909    /// Primary sort direction. Prefer uppercase values for consistent secondary sorting.
1910    /// Allowed values: `ASC`, `DESC`, `asc`, `desc`.
1911    pub order_direction: Option<String>,
1912    /// Search note, document number or amount. For amount matching, leading zeros and decimal separators are removed.
1913    pub query: Option<String>,
1914    /// Filter by whether reimbursement of expenses was waived as a donation.
1915    pub is_waiver_of_reimbursement_of_expenses: Option<bool>,
1916    /// Explicit calculation mode, also saved as the current user’s preference. credit-debit uses selected account_ids; costcenter-sum uses cost-center selection; donation-sum uses donor selection.
1917    /// Allowed values: `costcenter-sum`, `credit-debit`, `donation-sum`.
1918    pub calculation_type: Option<String>,
1919}
1920
1921impl GetFinanceTransactionsSummaryQuery {
1922    pub(crate) fn to_query(&self) -> Query {
1923        let mut q = Query::new();
1924        self.accounting_period_id.push_query("accounting_period_id", &mut q);
1925        self.created_pid.push_query("created_pid", &mut q);
1926        self.cost_center_ids.push_query("cost_center_ids[]", &mut q);
1927        self.donator_ids.push_query("donator_ids[]", &mut q);
1928        self.account_ids.push_query("account_ids[]", &mut q);
1929        self.is_donation.push_query("is_donation", &mut q);
1930        self.is_income.push_query("is_income", &mut q);
1931        self.start_date.push_query("start_date", &mut q);
1932        self.end_date.push_query("end_date", &mut q);
1933        self.is_immutable.push_query("is_immutable", &mut q);
1934        self.order_by.push_query("order_by", &mut q);
1935        self.order_direction.push_query("order_direction", &mut q);
1936        self.query.push_query("query", &mut q);
1937        self.is_waiver_of_reimbursement_of_expenses.push_query("is_waiver_of_reimbursement_of_expenses", &mut q);
1938        self.calculation_type.push_query("calculation_type", &mut q);
1939        q
1940    }
1941}
1942
1943/// Query parameters for `GET /finance/transactions`.
1944#[derive(Debug, Clone, Default)]
1945pub struct GetFinanceTransactionsQuery {
1946    /// ID of accounting period to get master data for
1947    pub accounting_period_id: Option<i64>,
1948    /// Filter by person ID. Get all transactions the person has created. But only show those the user can see.
1949    pub created_pid: Option<i64>,
1950    /// Filter by cost centers.
1951    pub cost_center_ids: Option<Vec<i64>>,
1952    /// Person IDs matching either donor or spouse, including the original donation referenced by a cancellation booking. Subject to the donor-filter permission described above.
1953    pub donator_ids: Option<Vec<i64>>,
1954    /// Filter by ids to include.
1955    pub include_ids: Option<Vec<i64>>,
1956    /// Filter by ids to exclude.
1957    pub exclude_ids: Option<Vec<i64>>,
1958    /// Filter by account/contra account. All transactions match, where either account or contra account is in the list.
1959    pub account_ids: Option<Vec<i64>>,
1960    /// Currently, either true or false selects bookings with a positive donor ID. Omit this parameter to include both donations and other bookings.
1961    pub is_donation: Option<bool>,
1962    /// True selects a cash-asset debit account and a non-cash-asset credit account (income); false selects the reverse (expense). Transfers between two cash-asset accounts or two non-cash-asset accounts match neither value.
1963    pub is_income: Option<bool>,
1964    /// Inclusive lower bound for documentDate.
1965    pub start_date: Option<chrono::NaiveDate>,
1966    /// Inclusive upper bound for documentDate.
1967    pub end_date: Option<chrono::NaiveDate>,
1968    /// Filter transactions, whether transaction is immutable.
1969    pub is_immutable: Option<bool>,
1970    /// Exclude both cancellation bookings and the original bookings they cancel.
1971    pub exclude_stornos: Option<bool>,
1972    /// Exclude donor-linked bookings debiting a donation account and crediting a non-donation account (donation repayments).
1973    pub exclude_paybacks: Option<bool>,
1974    /// Sort by document date, amount, modification time, document number, note, account number, contra-account number, cost-center number, donor name or receipt count. Date and modification time plus ID break ties where applicable. Document numbers use their stored text, numeric and split suffix parts.
1975    /// Allowed values: `account`, `amount`, `bills`, `contra_account`, `cost_center`, `date`, `donator`, `modified`, `note`, `number`.
1976    pub order_by: Option<String>,
1977    /// Primary sort direction. Prefer uppercase values for consistent secondary sorting.
1978    /// Allowed values: `ASC`, `DESC`, `asc`, `desc`.
1979    pub order_direction: Option<String>,
1980    /// Maximum number of bookings per page. No explicit maximum is validated.
1981    pub limit: Option<i64>,
1982    /// Include additional information
1983    /// Allowed values: `bills`.
1984    pub include: Option<Vec<String>>,
1985    /// Search note, document number or amount. For amount matching, leading zeros and decimal separators are removed.
1986    pub query: Option<String>,
1987    /// Filter by whether reimbursement of expenses was waived as a donation.
1988    pub is_waiver_of_reimbursement_of_expenses: Option<bool>,
1989}
1990
1991impl GetFinanceTransactionsQuery {
1992    pub(crate) fn to_query(&self) -> Query {
1993        let mut q = Query::new();
1994        self.accounting_period_id.push_query("accounting_period_id", &mut q);
1995        self.created_pid.push_query("created_pid", &mut q);
1996        self.cost_center_ids.push_query("cost_center_ids[]", &mut q);
1997        self.donator_ids.push_query("donator_ids[]", &mut q);
1998        self.include_ids.push_query("include_ids[]", &mut q);
1999        self.exclude_ids.push_query("exclude_ids[]", &mut q);
2000        self.account_ids.push_query("account_ids[]", &mut q);
2001        self.is_donation.push_query("is_donation", &mut q);
2002        self.is_income.push_query("is_income", &mut q);
2003        self.start_date.push_query("start_date", &mut q);
2004        self.end_date.push_query("end_date", &mut q);
2005        self.is_immutable.push_query("is_immutable", &mut q);
2006        self.exclude_stornos.push_query("exclude_stornos", &mut q);
2007        self.exclude_paybacks.push_query("exclude_paybacks", &mut q);
2008        self.order_by.push_query("order_by", &mut q);
2009        self.order_direction.push_query("order_direction", &mut q);
2010        self.limit.push_query("limit", &mut q);
2011        self.include.push_query("include[]", &mut q);
2012        self.query.push_query("query", &mut q);
2013        self.is_waiver_of_reimbursement_of_expenses.push_query("is_waiver_of_reimbursement_of_expenses", &mut q);
2014        q
2015    }
2016}
2017
2018/// Query parameters for `PUT /finance/transactions/{id}`.
2019#[derive(Debug, Clone, Default)]
2020pub struct PutFinanceTransactionsIdQuery {
2021    /// Include additional information
2022    /// Allowed values: `bills`.
2023    pub include: Option<Vec<String>>,
2024}
2025
2026impl PutFinanceTransactionsIdQuery {
2027    pub(crate) fn to_query(&self) -> Query {
2028        let mut q = Query::new();
2029        self.include.push_query("include[]", &mut q);
2030        q
2031    }
2032}
2033
2034/// Query parameters for `GET /followups`.
2035#[derive(Debug, Clone, Default)]
2036pub struct GetFollowupsQuery {
2037    /// Repeat to select any of the listed states. An empty array includes all states.
2038    /// Allowed values: `done`, `due-after-today`, `due-before-today`, `due-today`, `due-unspecified`.
2039    pub filter: Option<Vec<String>>,
2040    /// Maximum results in this page.
2041    pub limit: Option<i64>,
2042}
2043
2044impl GetFollowupsQuery {
2045    pub(crate) fn to_query(&self) -> Query {
2046        let mut q = Query::new();
2047        self.filter.push_query("filter[]", &mut q);
2048        self.limit.push_query("limit", &mut q);
2049        q
2050    }
2051}
2052
2053/// Query parameters for `POST /followups/{followUpId}/notes`.
2054#[derive(Debug, Clone, Default)]
2055pub struct PostFollowupsFollowUpIdNotesQuery {
2056    /// Additionally link the same note to the subject person.
2057    pub also_apply_to_person: Option<bool>,
2058}
2059
2060impl PostFollowupsFollowUpIdNotesQuery {
2061    pub(crate) fn to_query(&self) -> Query {
2062        let mut q = Query::new();
2063        self.also_apply_to_person.push_query("also_apply_to_person", &mut q);
2064        q
2065    }
2066}
2067
2068/// Query parameters for `DELETE /group/agegroups/{ageGroupId}`.
2069#[derive(Debug, Clone, Default)]
2070pub struct DeleteGroupAgegroupsAgeGroupIdQuery {
2071    /// Required; true returns a 409 deletion report without deleting, false performs deletion.
2072    pub dry_run: Option<bool>,
2073}
2074
2075impl DeleteGroupAgegroupsAgeGroupIdQuery {
2076    pub(crate) fn to_query(&self) -> Query {
2077        let mut q = Query::new();
2078        self.dry_run.push_query("dryRun", &mut q);
2079        q
2080    }
2081}
2082
2083/// Query parameters for `DELETE /group/groupcategories/{groupCategoryId}`.
2084#[derive(Debug, Clone, Default)]
2085pub struct DeleteGroupGroupcategoriesGroupCategoryIdQuery {
2086    /// Required; true returns a 409 deletion report without deleting, false performs deletion.
2087    pub dry_run: Option<bool>,
2088}
2089
2090impl DeleteGroupGroupcategoriesGroupCategoryIdQuery {
2091    pub(crate) fn to_query(&self) -> Query {
2092        let mut q = Query::new();
2093        self.dry_run.push_query("dryRun", &mut q);
2094        q
2095    }
2096}
2097
2098/// Query parameters for `DELETE /group/grouptypes/{groupTypeId}`.
2099#[derive(Debug, Clone, Default)]
2100pub struct DeleteGroupGrouptypesGroupTypeIdQuery {
2101    /// Inspect deletion dependencies without deleting; returns a 409 deletion report.
2102    pub dry_run: Option<bool>,
2103}
2104
2105impl DeleteGroupGrouptypesGroupTypeIdQuery {
2106    pub(crate) fn to_query(&self) -> Query {
2107        let mut q = Query::new();
2108        self.dry_run.push_query("dryRun", &mut q);
2109        q
2110    }
2111}
2112
2113/// Query parameters for `DELETE /group/meetingtemplates/{meetingTemplateId}`.
2114#[derive(Debug, Clone, Default)]
2115pub struct DeleteGroupMeetingtemplatesMeetingTemplateIdQuery {
2116    /// Required; true returns a 409 deletion report without deleting, false performs deletion.
2117    pub dry_run: Option<bool>,
2118}
2119
2120impl DeleteGroupMeetingtemplatesMeetingTemplateIdQuery {
2121    pub(crate) fn to_query(&self) -> Query {
2122        let mut q = Query::new();
2123        self.dry_run.push_query("dryRun", &mut q);
2124        q
2125    }
2126}
2127
2128/// Query parameters for `DELETE /group/roles/{roleId}`.
2129#[derive(Debug, Clone, Default)]
2130pub struct DeleteGroupRolesRoleIdQuery {
2131    /// Inspect deletion dependencies without deleting; returns a 409 deletion report.
2132    pub dry_run: Option<bool>,
2133}
2134
2135impl DeleteGroupRolesRoleIdQuery {
2136    pub(crate) fn to_query(&self) -> Query {
2137        let mut q = Query::new();
2138        self.dry_run.push_query("dryRun", &mut q);
2139        q
2140    }
2141}
2142
2143/// Query parameters for `GET /group/roles`.
2144#[derive(Debug, Clone, Default)]
2145pub struct GetGroupRolesQuery {
2146    /// ID of the group type whose role definitions to return.
2147    pub group_type_id: Option<i64>,
2148    /// Choose full role definitions (standard) or compact display references (domainObject).
2149    /// Allowed values: `domainObject`, `standard`.
2150    pub response_format: Option<String>,
2151}
2152
2153impl GetGroupRolesQuery {
2154    pub(crate) fn to_query(&self) -> Query {
2155        let mut q = Query::new();
2156        self.group_type_id.push_query("group_type_id", &mut q);
2157        self.response_format.push_query("responseFormat", &mut q);
2158        q
2159    }
2160}
2161
2162/// Query parameters for `DELETE /group/targetgroups/{targetGroupId}`.
2163#[derive(Debug, Clone, Default)]
2164pub struct DeleteGroupTargetgroupsTargetGroupIdQuery {
2165    /// Required; true returns a 409 deletion report without deleting, false performs deletion.
2166    pub dry_run: Option<bool>,
2167}
2168
2169impl DeleteGroupTargetgroupsTargetGroupIdQuery {
2170    pub(crate) fn to_query(&self) -> Query {
2171        let mut q = Query::new();
2172        self.dry_run.push_query("dryRun", &mut q);
2173        q
2174    }
2175}
2176
2177/// Query parameters for `GET /grouphomepages/{hash}`.
2178#[derive(Debug, Clone, Default)]
2179pub struct GetGrouphomepagesHashQuery {
2180    /// Optional hierarchy-depth override. 0 gives no descendants, positive values limit levels, negative values currently act as unbounded. Omitted uses the stored depth.
2181    pub depth: Option<i64>,
2182}
2183
2184impl GetGrouphomepagesHashQuery {
2185    pub(crate) fn to_query(&self) -> Query {
2186        let mut q = Query::new();
2187        self.depth.push_query("depth", &mut q);
2188        q
2189    }
2190}
2191
2192/// Query parameters for `DELETE /groups/{groupId}`.
2193#[derive(Debug, Clone, Default)]
2194pub struct DeleteGroupsGroupIdQuery {
2195    /// If set to true, the deletion is simulated but nothing will be deleted.
2196    pub dry_run: Option<bool>,
2197}
2198
2199impl DeleteGroupsGroupIdQuery {
2200    pub(crate) fn to_query(&self) -> Query {
2201        let mut q = Query::new();
2202        self.dry_run.push_query("dry_run", &mut q);
2203        q
2204    }
2205}
2206
2207/// Query parameters for `POST /groups/{groupId}/duplicate`.
2208#[derive(Debug, Clone, Default)]
2209pub struct PostGroupsIdDuplicateQuery {
2210    /// Name of the copy, trimmed before validation. Required in either the query or JSON body. The validator accepts up to 255 characters, but the stored group name column is limited to 100.
2211    pub new_name: Option<String>,
2212    /// Copy memberships, including statuses, roles, comments and member field values. Archived persons are excluded; group capacity is ignored and leaders are not informed.
2213    pub copy_members: Option<bool>,
2214    /// Copy group-role permissions and permission inheritance settings. Locked permissions are omitted unless the current user is an authorized person.
2215    pub copy_permissions: Option<bool>,
2216    /// Copy membership routines and prepare their potential runs for the new group.
2217    pub copy_routines: Option<bool>,
2218}
2219
2220impl PostGroupsIdDuplicateQuery {
2221    pub(crate) fn to_query(&self) -> Query {
2222        let mut q = Query::new();
2223        self.new_name.push_query("newName", &mut q);
2224        self.copy_members.push_query("copyMembers", &mut q);
2225        self.copy_permissions.push_query("copyPermissions", &mut q);
2226        self.copy_routines.push_query("copyRoutines", &mut q);
2227        q
2228    }
2229}
2230
2231/// Query parameters for `POST /groups/export`.
2232#[derive(Debug, Clone, Default)]
2233pub struct PostGroupsExportQuery {
2234    /// Export file format. Defaults to `csv` when omitted. The response content type depends on the selected format.
2235    /// Allowed values: `csv`, `xlsx`.
2236    pub format: Option<String>,
2237    /// Deprecated. Use `format`
2238    /// Allowed values: `csv`, `xlsx`.
2239    #[deprecated = "Use `format`"]
2240    pub r#type: Option<String>,
2241}
2242
2243impl PostGroupsExportQuery {
2244    pub(crate) fn to_query(&self) -> Query {
2245        let mut q = Query::new();
2246        self.format.push_query("format", &mut q);
2247        self.r#type.push_query("type", &mut q);
2248        q
2249    }
2250}
2251
2252/// Query parameters for `GET /groups/{groupId}`.
2253#[derive(Debug, Clone, Default)]
2254pub struct GetGroupsGroupIdQuery {
2255    /// Include additional information (currently, 'roles' are included by default but this behaviour is now deprecated)
2256    /// Allowed values: `averageMemberAge`, `hasPermissions`, `memberStatistics`, `places`, `publicPostsStatistic`, `roles`, `signupConditions`, `tags`.
2257    pub include: Option<Vec<String>>,
2258}
2259
2260impl GetGroupsGroupIdQuery {
2261    pub(crate) fn to_query(&self) -> Query {
2262        let mut q = Query::new();
2263        self.include.push_query("include[]", &mut q);
2264        q
2265    }
2266}
2267
2268/// Query parameters for `GET /groups/grouped`.
2269#[derive(Debug, Clone, Default)]
2270pub struct GetGroupsGroupedQuery {
2271    /// Group attribute used to build the response buckets
2272    /// Allowed values: `ageGroup`, `campus`, `groupCategory`, `groupStatus`, `groupType`, `isOpenForMembers`, `targetGroup`, `visibility`.
2273    pub group_by: Option<String>,
2274    /// Number of results per page.
2275    pub limit: Option<i64>,
2276}
2277
2278impl GetGroupsGroupedQuery {
2279    pub(crate) fn to_query(&self) -> Query {
2280        let mut q = Query::new();
2281        self.group_by.push_query("group_by", &mut q);
2282        self.limit.push_query("limit", &mut q);
2283        q
2284    }
2285}
2286
2287/// Query parameters for `GET /groups`.
2288#[derive(Debug, Clone, Default)]
2289pub struct GetGroupsQuery {
2290    /// Number of results per page.
2291    pub limit: Option<i64>,
2292    /// Array of group ids
2293    pub ids: Option<Vec<i64>>,
2294    /// Return direct child groups of this group
2295    pub parent_id: Option<i64>,
2296    /// Return direct parent groups of this group
2297    pub child_id: Option<i64>,
2298    /// Array of campus ids to filter the groups
2299    pub campus_ids: Option<Vec<i64>>,
2300    /// Array of age group ids to filter the groups
2301    pub agegroup_ids: Option<Vec<i64>>,
2302    /// Array of group status ids to filter the groups
2303    pub group_status_ids: Option<Vec<i64>>,
2304    /// Array of group category ids to filter the groups
2305    pub group_category_ids: Option<Vec<i64>>,
2306    /// Array of target group ids to filter the groups
2307    pub target_group_ids: Option<Vec<i64>>,
2308    /// Array of weekdays to filter the groups. Sunday = 0, Monday = 1 ...
2309    pub weekdays: Option<Vec<i64>>,
2310    /// Array of group type ids to filter the groups
2311    pub group_type_ids: Option<Vec<i64>>,
2312    /// Array of group tag ids to filter the groups
2313    pub tag_ids: Option<Vec<i64>>,
2314    /// Filters groups by its open status
2315    pub is_open_for_members: Option<bool>,
2316    /// Determines if groups should be omitted where I am in
2317    pub without_my_groups: Option<bool>,
2318    /// Determines if only groups where I am in should be returned
2319    pub only_my_groups: Option<bool>,
2320    /// Only show groups with meeting place
2321    pub has_meeting_place: Option<bool>,
2322    /// Only show groups where posting is allowed
2323    pub allow_posts: Option<bool>,
2324    /// Only show groups which has posts
2325    pub has_posts: Option<bool>,
2326    /// Filter groups based on whether they have an active chat
2327    pub has_active_chat: Option<bool>,
2328    pub query: Option<String>,
2329    /// Group visibility
2330    /// Allowed values: `hidden`, `intern`, `public`, `restricted`.
2331    pub visibility: Option<String>,
2332    /// The fields to order by
2333    pub order_fields: Option<Vec<String>>,
2334    /// The order direction ASC or DESC for the order_fields
2335    /// Allowed values: `ASC`, `DESC`.
2336    pub order_directions: Option<Vec<String>>,
2337    /// Include additional information (currently, 'roles' are included by default but this behaviour is now deprecated)
2338    /// Allowed values: `averageMemberAge`, `hasPermissions`, `memberStatistics`, `places`, `publicPostsStatistic`, `roles`, `signupConditions`, `tags`.
2339    pub include: Option<Vec<String>>,
2340}
2341
2342impl GetGroupsQuery {
2343    pub(crate) fn to_query(&self) -> Query {
2344        let mut q = Query::new();
2345        self.limit.push_query("limit", &mut q);
2346        self.ids.push_query("ids[]", &mut q);
2347        self.parent_id.push_query("parent_id", &mut q);
2348        self.child_id.push_query("child_id", &mut q);
2349        self.campus_ids.push_query("campus_ids[]", &mut q);
2350        self.agegroup_ids.push_query("agegroup_ids[]", &mut q);
2351        self.group_status_ids.push_query("group_status_ids[]", &mut q);
2352        self.group_category_ids.push_query("group_category_ids[]", &mut q);
2353        self.target_group_ids.push_query("target_group_ids[]", &mut q);
2354        self.weekdays.push_query("weekdays[]", &mut q);
2355        self.group_type_ids.push_query("group_type_ids[]", &mut q);
2356        self.tag_ids.push_query("tag_ids[]", &mut q);
2357        self.is_open_for_members.push_query("is_open_for_members", &mut q);
2358        self.without_my_groups.push_query("without_my_groups", &mut q);
2359        self.only_my_groups.push_query("only_my_groups", &mut q);
2360        self.has_meeting_place.push_query("has_meeting_place", &mut q);
2361        self.allow_posts.push_query("allow_posts", &mut q);
2362        self.has_posts.push_query("has_posts", &mut q);
2363        self.has_active_chat.push_query("has_active_chat", &mut q);
2364        self.query.push_query("query", &mut q);
2365        self.visibility.push_query("visibility", &mut q);
2366        self.order_fields.push_query("order_fields[]", &mut q);
2367        self.order_directions.push_query("order_directions[]", &mut q);
2368        self.include.push_query("include[]", &mut q);
2369        q
2370    }
2371}
2372
2373/// Query parameters for `GET /groups/{groupId}/absences`.
2374#[derive(Debug, Clone, Default)]
2375pub struct GetGroupsAbsencesQuery {
2376    /// Start of the overlap window. Defaults to midnight two weeks ago.
2377    pub from: Option<serde_json::Value>,
2378    /// End of the overlap window. Defaults to midnight two weeks from today.
2379    pub to: Option<serde_json::Value>,
2380    /// Order by absence start.
2381    /// Allowed values: `ASC`, `DESC`.
2382    pub order_direction: Option<String>,
2383    /// Deprecated. Legacy alias for from.
2384    #[deprecated = "deprecated in the ChurchTools API"]
2385    pub from_date: Option<serde_json::Value>,
2386    /// Deprecated. Legacy alias for to.
2387    #[deprecated = "deprecated in the ChurchTools API"]
2388    pub to_date: Option<serde_json::Value>,
2389}
2390
2391impl GetGroupsAbsencesQuery {
2392    pub(crate) fn to_query(&self) -> Query {
2393        let mut q = Query::new();
2394        self.from.push_query("from", &mut q);
2395        self.to.push_query("to", &mut q);
2396        self.order_direction.push_query("order_direction", &mut q);
2397        self.from_date.push_query("from_date", &mut q);
2398        self.to_date.push_query("to_date", &mut q);
2399        q
2400    }
2401}
2402
2403/// Query parameters for `GET /groups/{groupId}/children`.
2404#[derive(Debug, Clone, Default)]
2405pub struct GetGroupsGroupIdChildrenQuery {
2406    /// Number of results per page.
2407    pub limit: Option<i64>,
2408    /// Array of group ids
2409    pub ids: Option<Vec<i64>>,
2410    /// Array of campus ids to filter the groups
2411    pub campus_ids: Option<Vec<i64>>,
2412    /// Array of age group ids to filter the groups
2413    pub agegroup_ids: Option<Vec<i64>>,
2414    /// Array of group status ids to filter the groups
2415    pub group_status_ids: Option<Vec<i64>>,
2416    /// Array of group category ids to filter the groups
2417    pub group_category_ids: Option<Vec<i64>>,
2418    /// Array of target group ids to filter the groups
2419    pub target_group_ids: Option<Vec<i64>>,
2420    /// Array of weekdays to filter the groups. Sunday = 0, Monday = 1 ...
2421    pub weekdays: Option<Vec<i64>>,
2422    /// Array of group type ids to filter the groups
2423    pub group_type_ids: Option<Vec<i64>>,
2424    /// Array of group tag ids to filter the groups
2425    pub tag_ids: Option<Vec<i64>>,
2426    /// Filters groups by its open status
2427    pub is_open_for_members: Option<bool>,
2428    /// Determines if groups should be omitted where I am in
2429    pub without_my_groups: Option<bool>,
2430    /// Determines if only groups where I am in should be returned
2431    pub only_my_groups: Option<bool>,
2432    /// Only show groups with meeting place
2433    pub has_meeting_place: Option<bool>,
2434    /// Only show groups where posting is allowed
2435    pub allow_posts: Option<bool>,
2436    /// Only show groups which has posts
2437    pub has_posts: Option<bool>,
2438    /// Filter groups based on whether they have an active chat
2439    pub has_active_chat: Option<bool>,
2440    pub query: Option<String>,
2441    /// Group visibility
2442    /// Allowed values: `hidden`, `intern`, `public`, `restricted`.
2443    pub visibility: Option<String>,
2444}
2445
2446impl GetGroupsGroupIdChildrenQuery {
2447    pub(crate) fn to_query(&self) -> Query {
2448        let mut q = Query::new();
2449        self.limit.push_query("limit", &mut q);
2450        self.ids.push_query("ids[]", &mut q);
2451        self.campus_ids.push_query("campus_ids[]", &mut q);
2452        self.agegroup_ids.push_query("agegroup_ids[]", &mut q);
2453        self.group_status_ids.push_query("group_status_ids[]", &mut q);
2454        self.group_category_ids.push_query("group_category_ids[]", &mut q);
2455        self.target_group_ids.push_query("target_group_ids[]", &mut q);
2456        self.weekdays.push_query("weekdays[]", &mut q);
2457        self.group_type_ids.push_query("group_type_ids[]", &mut q);
2458        self.tag_ids.push_query("tag_ids[]", &mut q);
2459        self.is_open_for_members.push_query("is_open_for_members", &mut q);
2460        self.without_my_groups.push_query("without_my_groups", &mut q);
2461        self.only_my_groups.push_query("only_my_groups", &mut q);
2462        self.has_meeting_place.push_query("has_meeting_place", &mut q);
2463        self.allow_posts.push_query("allow_posts", &mut q);
2464        self.has_posts.push_query("has_posts", &mut q);
2465        self.has_active_chat.push_query("has_active_chat", &mut q);
2466        self.query.push_query("query", &mut q);
2467        self.visibility.push_query("visibility", &mut q);
2468        q
2469    }
2470}
2471
2472/// Query parameters for `GET /groups/hierarchies`.
2473#[derive(Debug, Clone, Default)]
2474pub struct GetGroupsHierarchiesQuery {
2475    /// Number of results per page.
2476    pub limit: Option<i64>,
2477    /// Array of group ids
2478    pub ids: Option<Vec<i64>>,
2479    /// Array of campus ids to filter the groups
2480    pub campus_ids: Option<Vec<i64>>,
2481    /// Array of age group ids to filter the groups
2482    pub agegroup_ids: Option<Vec<i64>>,
2483    /// Array of group status ids to filter the groups
2484    pub group_status_ids: Option<Vec<i64>>,
2485    /// Array of group category ids to filter the groups
2486    pub group_category_ids: Option<Vec<i64>>,
2487    /// Array of target group ids to filter the groups
2488    pub target_group_ids: Option<Vec<i64>>,
2489    /// Array of weekdays to filter the groups. Sunday = 0, Monday = 1 ...
2490    pub weekdays: Option<Vec<i64>>,
2491    /// Array of group type ids to filter the groups
2492    pub group_type_ids: Option<Vec<i64>>,
2493    /// Array of group tag ids to filter the groups
2494    pub tag_ids: Option<Vec<i64>>,
2495    /// Filters groups by its open status
2496    pub is_open_for_members: Option<bool>,
2497    /// Determines if groups should be omitted where I am in
2498    pub without_my_groups: Option<bool>,
2499    /// Determines if only groups where I am in should be returned
2500    pub only_my_groups: Option<bool>,
2501    /// Only show groups with meeting place
2502    pub has_meeting_place: Option<bool>,
2503    /// Only show groups where posting is allowed
2504    pub allow_posts: Option<bool>,
2505    /// Only show groups which has posts
2506    pub has_posts: Option<bool>,
2507    /// Filter groups based on whether they have an active chat
2508    pub has_active_chat: Option<bool>,
2509    pub query: Option<String>,
2510    /// Group visibility
2511    /// Allowed values: `hidden`, `intern`, `public`, `restricted`.
2512    pub visibility: Option<String>,
2513}
2514
2515impl GetGroupsHierarchiesQuery {
2516    pub(crate) fn to_query(&self) -> Query {
2517        let mut q = Query::new();
2518        self.limit.push_query("limit", &mut q);
2519        self.ids.push_query("ids[]", &mut q);
2520        self.campus_ids.push_query("campus_ids[]", &mut q);
2521        self.agegroup_ids.push_query("agegroup_ids[]", &mut q);
2522        self.group_status_ids.push_query("group_status_ids[]", &mut q);
2523        self.group_category_ids.push_query("group_category_ids[]", &mut q);
2524        self.target_group_ids.push_query("target_group_ids[]", &mut q);
2525        self.weekdays.push_query("weekdays[]", &mut q);
2526        self.group_type_ids.push_query("group_type_ids[]", &mut q);
2527        self.tag_ids.push_query("tag_ids[]", &mut q);
2528        self.is_open_for_members.push_query("is_open_for_members", &mut q);
2529        self.without_my_groups.push_query("without_my_groups", &mut q);
2530        self.only_my_groups.push_query("only_my_groups", &mut q);
2531        self.has_meeting_place.push_query("has_meeting_place", &mut q);
2532        self.allow_posts.push_query("allow_posts", &mut q);
2533        self.has_posts.push_query("has_posts", &mut q);
2534        self.has_active_chat.push_query("has_active_chat", &mut q);
2535        self.query.push_query("query", &mut q);
2536        self.visibility.push_query("visibility", &mut q);
2537        q
2538    }
2539}
2540
2541/// Query parameters for `GET /groups/ids`.
2542#[derive(Debug, Clone, Default)]
2543pub struct GetGroupsIdsQuery {
2544    /// Number of results per page.
2545    pub limit: Option<i64>,
2546    /// Array of group ids
2547    pub ids: Option<Vec<i64>>,
2548    /// Return direct child groups of this group
2549    pub parent_id: Option<i64>,
2550    /// Return direct parent groups of this group
2551    pub child_id: Option<i64>,
2552    /// Array of campus ids to filter the groups
2553    pub campus_ids: Option<Vec<i64>>,
2554    /// Array of age group ids to filter the groups
2555    pub agegroup_ids: Option<Vec<i64>>,
2556    /// Array of group status ids to filter the groups
2557    pub group_status_ids: Option<Vec<i64>>,
2558    /// Array of group category ids to filter the groups
2559    pub group_category_ids: Option<Vec<i64>>,
2560    /// Array of target group ids to filter the groups
2561    pub target_group_ids: Option<Vec<i64>>,
2562    /// Array of weekdays to filter the groups. Sunday = 0, Monday = 1 ...
2563    pub weekdays: Option<Vec<i64>>,
2564    /// Array of group type ids to filter the groups
2565    pub group_type_ids: Option<Vec<i64>>,
2566    /// Array of group tag ids to filter the groups
2567    pub tag_ids: Option<Vec<i64>>,
2568    /// Filters groups by its open status
2569    pub is_open_for_members: Option<bool>,
2570    /// Determines if groups should be omitted where I am in
2571    pub without_my_groups: Option<bool>,
2572    /// Determines if only groups where I am in should be returned
2573    pub only_my_groups: Option<bool>,
2574    /// Only show groups with meeting place
2575    pub has_meeting_place: Option<bool>,
2576    /// Only show groups where posting is allowed
2577    pub allow_posts: Option<bool>,
2578    /// Only show groups which has posts
2579    pub has_posts: Option<bool>,
2580    /// Filter groups based on whether they have an active chat
2581    pub has_active_chat: Option<bool>,
2582    pub query: Option<String>,
2583    /// Group visibility
2584    /// Allowed values: `hidden`, `intern`, `public`, `restricted`.
2585    pub visibility: Option<String>,
2586}
2587
2588impl GetGroupsIdsQuery {
2589    pub(crate) fn to_query(&self) -> Query {
2590        let mut q = Query::new();
2591        self.limit.push_query("limit", &mut q);
2592        self.ids.push_query("ids[]", &mut q);
2593        self.parent_id.push_query("parent_id", &mut q);
2594        self.child_id.push_query("child_id", &mut q);
2595        self.campus_ids.push_query("campus_ids[]", &mut q);
2596        self.agegroup_ids.push_query("agegroup_ids[]", &mut q);
2597        self.group_status_ids.push_query("group_status_ids[]", &mut q);
2598        self.group_category_ids.push_query("group_category_ids[]", &mut q);
2599        self.target_group_ids.push_query("target_group_ids[]", &mut q);
2600        self.weekdays.push_query("weekdays[]", &mut q);
2601        self.group_type_ids.push_query("group_type_ids[]", &mut q);
2602        self.tag_ids.push_query("tag_ids[]", &mut q);
2603        self.is_open_for_members.push_query("is_open_for_members", &mut q);
2604        self.without_my_groups.push_query("without_my_groups", &mut q);
2605        self.only_my_groups.push_query("only_my_groups", &mut q);
2606        self.has_meeting_place.push_query("has_meeting_place", &mut q);
2607        self.allow_posts.push_query("allow_posts", &mut q);
2608        self.has_posts.push_query("has_posts", &mut q);
2609        self.has_active_chat.push_query("has_active_chat", &mut q);
2610        self.query.push_query("query", &mut q);
2611        self.visibility.push_query("visibility", &mut q);
2612        q
2613    }
2614}
2615
2616/// Query parameters for `GET /groups/{groupId}/memberids`.
2617#[derive(Debug, Clone, Default)]
2618pub struct GetGroupsGroupIdMemberidsQuery {
2619    /// Filter by role definition IDs (Role.id from GET /roles), matching groupTypeRoleId on memberships. Multiple IDs match any of the selected roles.
2620    pub role_ids: Option<Vec<i64>>,
2621    /// Filter by person IDs. These are the IDs in person.domainIdentifier, not membership record IDs.
2622    pub person_id: Option<Vec<i64>>,
2623    /// Filter by membership status, independently of the member’s role. Multiple values match any selected status. Omit this filter to include all visible statuses.
2624    /// Allowed values: `active`, `requested`, `to_delete`, `waiting`.
2625    pub group_member_statuses: Option<Vec<String>>,
2626    /// If true, return only group members, that are allowed to chat in this group
2627    pub allowed_chat_users_only: Option<bool>,
2628    /// If true, return only group members that are allowed to write in the chat.
2629    pub allowed_chat_writers_only: Option<bool>,
2630    /// Search the first and last names of the persons belonging to the group.
2631    pub query: Option<String>,
2632    /// Return memberships whose comment contains the supplied text.
2633    pub comment: Option<String>,
2634    /// Filter by a membership start date strictly after this value. Memberships without a start date do not match. Use YYYY-MM-DD; UTC timestamps are also accepted for compatibility.
2635    pub member_start_date_after: Option<serde_json::Value>,
2636    /// Filter by a membership start date strictly before this value. Memberships without a start date do not match. Use YYYY-MM-DD; UTC timestamps are also accepted for compatibility.
2637    pub member_start_date_before: Option<serde_json::Value>,
2638}
2639
2640impl GetGroupsGroupIdMemberidsQuery {
2641    pub(crate) fn to_query(&self) -> Query {
2642        let mut q = Query::new();
2643        self.role_ids.push_query("role_ids[]", &mut q);
2644        self.person_id.push_query("person_id[]", &mut q);
2645        self.group_member_statuses.push_query("group_member_statuses[]", &mut q);
2646        self.allowed_chat_users_only.push_query("allowed_chat_users_only", &mut q);
2647        self.allowed_chat_writers_only.push_query("allowed_chat_writers_only", &mut q);
2648        self.query.push_query("query", &mut q);
2649        self.comment.push_query("comment", &mut q);
2650        self.member_start_date_after.push_query("member_start_date_after", &mut q);
2651        self.member_start_date_before.push_query("member_start_date_before", &mut q);
2652        q
2653    }
2654}
2655
2656/// Query parameters for `GET /groups/{groupId}/memberpreview`.
2657#[derive(Debug, Clone, Default)]
2658pub struct GetGroupsGroupIdMemberpreviewQuery {
2659    /// Maximum number of active, visible members returned for each role.
2660    pub members_per_role: Option<i64>,
2661}
2662
2663impl GetGroupsGroupIdMemberpreviewQuery {
2664    pub(crate) fn to_query(&self) -> Query {
2665        let mut q = Query::new();
2666        self.members_per_role.push_query("members_per_role", &mut q);
2667        q
2668    }
2669}
2670
2671/// Query parameters for `GET /groups/members`.
2672#[derive(Debug, Clone, Default)]
2673pub struct GetGroupsMembersQuery {
2674    /// Array of group ids
2675    pub ids: Option<Vec<i64>>,
2676    /// If true, return also deleted group members
2677    pub with_deleted: Option<bool>,
2678}
2679
2680impl GetGroupsMembersQuery {
2681    pub(crate) fn to_query(&self) -> Query {
2682        let mut q = Query::new();
2683        self.ids.push_query("ids[]", &mut q);
2684        self.with_deleted.push_query("with_deleted", &mut q);
2685        q
2686    }
2687}
2688
2689/// Query parameters for `GET /groups/{groupId}/posts`.
2690#[derive(Debug, Clone, Default)]
2691pub struct GetGroupsGroupIdPostsQuery {
2692    /// If set, only posts published before this date are returned. The date must be in RFC3339 format (Zulu-Date).
2693    pub before: Option<chrono::DateTime<chrono::Utc>>,
2694    /// If set, posts published at the `before` date are included in the result, if the guids of the posts are lexically smaller than the `last_post_identifier`. Will be ignored if `before` is not set.
2695    pub last_post_identifier: Option<String>,
2696    /// If set, only posts published at or after this date are returned. The date must be in RFC3339 format (Zulu-Date).
2697    pub after: Option<chrono::DateTime<chrono::Utc>>,
2698    /// Maximum number of posts in this batch.
2699    pub limit: Option<i64>,
2700    /// Optional comments and reactions. Linkings are already included by default.
2701    /// Allowed values: `comments`, `linkings`, `reactions`.
2702    pub include: Option<Vec<String>>,
2703}
2704
2705impl GetGroupsGroupIdPostsQuery {
2706    pub(crate) fn to_query(&self) -> Query {
2707        let mut q = Query::new();
2708        self.before.push_query("before", &mut q);
2709        self.last_post_identifier.push_query("last_post_identifier", &mut q);
2710        self.after.push_query("after", &mut q);
2711        self.limit.push_query("limit", &mut q);
2712        self.include.push_query("include[]", &mut q);
2713        q
2714    }
2715}
2716
2717/// Query parameters for `POST /groups/{groupId}/notification`.
2718#[derive(Debug, Clone, Default)]
2719pub struct PostGroupsGroupIdNotificationQuery {
2720    /// Preview the recipient count without sending. Only available before the group has been marked as notified.
2721    pub dry_run: Option<bool>,
2722}
2723
2724impl PostGroupsGroupIdNotificationQuery {
2725    pub(crate) fn to_query(&self) -> Query {
2726        let mut q = Query::new();
2727        self.dry_run.push_query("dry_run", &mut q);
2728        q
2729    }
2730}
2731
2732/// Query parameters for `PATCH /groups/{groupId}`.
2733#[derive(Debug, Clone, Default)]
2734pub struct PatchGroupsIdQuery {
2735    /// Decides in case of changing the visibility of posts in the group whether the current users posts should be skipped. Default: false
2736    pub skip_my_posts_reducing_visibility: Option<bool>,
2737    /// When changing the group status to finished with this flag it can be decided if all routines should be deactivated
2738    pub deactivate_routines_on_status_finished: Option<bool>,
2739}
2740
2741impl PatchGroupsIdQuery {
2742    pub(crate) fn to_query(&self) -> Query {
2743        let mut q = Query::new();
2744        self.skip_my_posts_reducing_visibility.push_query("skip_my_posts_reducing_visibility", &mut q);
2745        self.deactivate_routines_on_status_finished.push_query("deactivate_routines_on_status_finished", &mut q);
2746        q
2747    }
2748}
2749
2750/// Query parameters for `GET /groups/{groupId}/followups`.
2751#[derive(Debug, Clone, Default)]
2752pub struct GetGroupsGroupIdFollowupsQuery {
2753    /// Repeat to select any of the listed states; omitted/empty includes all states.
2754    /// Allowed values: `done`, `due-after-today`, `due-before-today`, `due-today`, `due-unspecified`.
2755    pub filter: Option<Vec<String>>,
2756    /// Maximum results in this page.
2757    pub limit: Option<i64>,
2758}
2759
2760impl GetGroupsGroupIdFollowupsQuery {
2761    pub(crate) fn to_query(&self) -> Query {
2762        let mut q = Query::new();
2763        self.filter.push_query("filter[]", &mut q);
2764        self.limit.push_query("limit", &mut q);
2765        q
2766    }
2767}
2768
2769/// Query parameters for `GET /groups/{groupId}/meetings/export`.
2770#[derive(Debug, Clone, Default)]
2771pub struct GetGroupsGroupIdMeetingsExportQuery {
2772    /// Download format supported by the export generators.
2773    /// Allowed values: `csv`, `xlsx`.
2774    pub format: Option<String>,
2775    /// Choose a person-by-meeting attendance matrix or one summary row per meeting.
2776    /// Allowed values: `meetings_members`, `meetings_overview`.
2777    pub r#type: Option<String>,
2778    /// Match the exact cancellation flag; omit to include canceled and non-canceled meetings.
2779    pub is_canceled: Option<bool>,
2780    /// Match the exact completion flag; omit to include both states.
2781    pub is_completed: Option<bool>,
2782    /// Inclusive lower start-time boundary. Date or UTC date-time; defaults to yesterday at midnight. start_date is a legacy alias.
2783    pub from: Option<String>,
2784    /// Exclusive upper start-time boundary. Date or UTC date-time; defaults to midnight 30 days after today. end_date is a legacy alias.
2785    pub to: Option<String>,
2786    /// Accepted for compatibility; the current date-range export remains ordered oldest first.
2787    /// Allowed values: `backward`, `forward`.
2788    pub direction: Option<String>,
2789}
2790
2791impl GetGroupsGroupIdMeetingsExportQuery {
2792    pub(crate) fn to_query(&self) -> Query {
2793        let mut q = Query::new();
2794        self.format.push_query("format", &mut q);
2795        self.r#type.push_query("type", &mut q);
2796        self.is_canceled.push_query("is_canceled", &mut q);
2797        self.is_completed.push_query("is_completed", &mut q);
2798        self.from.push_query("from", &mut q);
2799        self.to.push_query("to", &mut q);
2800        self.direction.push_query("direction", &mut q);
2801        q
2802    }
2803}
2804
2805/// Query parameters for `GET /groups/{groupId}/meetings`.
2806#[derive(Debug, Clone, Default)]
2807pub struct GetGroupsIdMeetingsQuery {
2808    /// Filter by the exact cancellation flag: true selects canceled meetings, false selects non-canceled meetings. Omit to include both.
2809    pub is_canceled: Option<bool>,
2810    /// Filter by the exact completion flag. Omit to include both completed and incomplete meetings.
2811    pub is_completed: Option<bool>,
2812    /// Lower inclusive range boundary, or exclusive anchor when direction is supplied. Defaults to yesterday at midnight. start_date is a legacy alias.
2813    pub from: Option<String>,
2814    /// Exclusive upper range boundary. Defaults to midnight 30 days after today; ignored in directional mode. end_date is a legacy alias.
2815    pub to: Option<String>,
2816    /// Enable directional paging strictly before or after from; omit for an unpaginated date range.
2817    /// Allowed values: `backward`, `forward`.
2818    pub direction: Option<String>,
2819    /// Number of meetings per page in directional mode only.
2820    pub limit: Option<i64>,
2821    /// Include additional information
2822    /// Allowed values: `attendances`.
2823    pub include: Option<Vec<String>>,
2824}
2825
2826impl GetGroupsIdMeetingsQuery {
2827    pub(crate) fn to_query(&self) -> Query {
2828        let mut q = Query::new();
2829        self.is_canceled.push_query("is_canceled", &mut q);
2830        self.is_completed.push_query("is_completed", &mut q);
2831        self.from.push_query("from", &mut q);
2832        self.to.push_query("to", &mut q);
2833        self.direction.push_query("direction", &mut q);
2834        self.limit.push_query("limit", &mut q);
2835        self.include.push_query("include[]", &mut q);
2836        q
2837    }
2838}
2839
2840/// Query parameters for `POST /groups/{groupId}/members/export`.
2841#[derive(Debug, Clone, Default)]
2842pub struct PostGroupsIdMembersExportQuery {
2843    /// Output format; CSV by default.
2844    /// Allowed values: `csv`, `xlsx`.
2845    pub format: Option<String>,
2846    /// Deprecated. Use `format`
2847    /// Allowed values: `csv`, `xlsx`.
2848    #[deprecated = "Use `format`"]
2849    pub r#type: Option<String>,
2850}
2851
2852impl PostGroupsIdMembersExportQuery {
2853    pub(crate) fn to_query(&self) -> Query {
2854        let mut q = Query::new();
2855        self.format.push_query("format", &mut q);
2856        self.r#type.push_query("type", &mut q);
2857        q
2858    }
2859}
2860
2861/// Query parameters for `GET /groups/{groupId}/members/export`.
2862#[derive(Debug, Clone, Default)]
2863pub struct GetGroupsGroupIdMembersExportQuery {
2864    /// Output format; CSV by default.
2865    /// Allowed values: `csv`, `xlsx`.
2866    pub format: Option<String>,
2867    /// Deprecated. Use `format`
2868    /// Allowed values: `csv`, `xlsx`.
2869    #[deprecated = "Use `format`"]
2870    pub r#type: Option<String>,
2871}
2872
2873impl GetGroupsGroupIdMembersExportQuery {
2874    pub(crate) fn to_query(&self) -> Query {
2875        let mut q = Query::new();
2876        self.format.push_query("format", &mut q);
2877        self.r#type.push_query("type", &mut q);
2878        q
2879    }
2880}
2881
2882/// Query parameters for `GET /groups/{groupId}/members`.
2883#[derive(Debug, Clone, Default)]
2884pub struct GetGroupsIdMembersQuery {
2885    /// Maximum number of memberships per page.
2886    pub limit: Option<i64>,
2887    /// Filter by role definition IDs (Role.id from GET /roles), matching groupTypeRoleId on memberships. Multiple IDs match any of the selected roles.
2888    pub role_ids: Option<Vec<i64>>,
2889    /// Filter by person IDs. These are the IDs in person.domainIdentifier, not membership record IDs.
2890    pub person_id: Option<Vec<i64>>,
2891    /// Filter by membership status, independently of the member’s role. Multiple values match any selected status. Omit this filter to include all visible statuses.
2892    /// Allowed values: `active`, `requested`, `to_delete`, `waiting`.
2893    pub group_member_statuses: Option<Vec<String>>,
2894    /// If true, return only group members, that are allowed to chat in this group
2895    pub allowed_chat_users_only: Option<bool>,
2896    /// If true, return only group members that are allowed to write in the chat.
2897    pub allowed_chat_writers_only: Option<bool>,
2898    /// Search the first and last names of the persons belonging to the group.
2899    pub query: Option<String>,
2900    /// Return memberships whose comment contains the supplied text.
2901    pub comment: Option<String>,
2902    /// Filter by a membership start date strictly after this value. Memberships without a start date do not match. Use YYYY-MM-DD; UTC timestamps are also accepted for compatibility.
2903    pub member_start_date_after: Option<serde_json::Value>,
2904    /// Filter by a membership start date strictly before this value. Memberships without a start date do not match. Use YYYY-MM-DD; UTC timestamps are also accepted for compatibility.
2905    pub member_start_date_before: Option<serde_json::Value>,
2906    /// Fields used to sort the member list. Use person_ for person fields and member_ for membership properties or custom member fields. For example: person_lastName or member_groupTypeRoleId. Without this parameter, results are ordered by role type, role sort key, last name, first name and person ID.
2907    pub order_fields: Option<Vec<String>>,
2908    /// Sort directions corresponding by position to orderFields. Supply one direction per sort field. Built-in fields default to ASC when their direction is omitted.
2909    /// Allowed values: `ASC`, `DESC`.
2910    pub order_directions: Option<Vec<String>>,
2911    /// Additional person-field keys to include in each member’s personFields object, for example firstName. Person-field permissions apply; membership-specific fields are returned separately in fields.
2912    pub person_fields: Option<Vec<String>>,
2913    /// Additional member-list data. newsletter and tags add properties to each member; aggregations adds meta.aggregations.fields with numeric group member field aggregates over all filtered members, across all pages.
2914    /// Allowed values: `aggregations`, `newsletter`, `tags`.
2915    pub include: Option<Vec<String>>,
2916}
2917
2918impl GetGroupsIdMembersQuery {
2919    pub(crate) fn to_query(&self) -> Query {
2920        let mut q = Query::new();
2921        self.limit.push_query("limit", &mut q);
2922        self.role_ids.push_query("role_ids[]", &mut q);
2923        self.person_id.push_query("person_id[]", &mut q);
2924        self.group_member_statuses.push_query("group_member_statuses[]", &mut q);
2925        self.allowed_chat_users_only.push_query("allowed_chat_users_only", &mut q);
2926        self.allowed_chat_writers_only.push_query("allowed_chat_writers_only", &mut q);
2927        self.query.push_query("query", &mut q);
2928        self.comment.push_query("comment", &mut q);
2929        self.member_start_date_after.push_query("member_start_date_after", &mut q);
2930        self.member_start_date_before.push_query("member_start_date_before", &mut q);
2931        self.order_fields.push_query("orderFields[]", &mut q);
2932        self.order_directions.push_query("orderDirections[]", &mut q);
2933        self.person_fields.push_query("personFields[]", &mut q);
2934        self.include.push_query("include[]", &mut q);
2935        q
2936    }
2937}
2938
2939/// Query parameters for `GET /groups/{groupId}/members/history`.
2940#[derive(Debug, Clone, Default)]
2941pub struct GetGroupsGroupIdMembersHistoryQuery {
2942    /// Affected person ID.
2943    pub member_id: Option<i64>,
2944    /// Person ID recorded as the actor.
2945    pub actor_id: Option<i64>,
2946    /// Origin of the membership change.
2947    /// Allowed values: `automatic`, `bulk-job`, `check-in`, `cron`, `default`, `duplicate-group`, `follow-up`, `group-creation`, `person-deletion`, `routine`, `self-registration`, `sign-up`, `waitinglist`.
2948    pub origin: Option<String>,
2949    /// Only changes to this role ID. Takes precedence over status/field-change filters.
2950    pub new_role_id: Option<i64>,
2951    /// Only changes to this status, unless new_role_id is supplied. Unknown strings match no entries.
2952    pub new_status: Option<String>,
2953    /// Whether the stored field snapshot changed; ignored when new_role_id or new_status is supplied.
2954    pub new_fields: Option<bool>,
2955    /// Deprecated. Legacy alias used only if new_fields is absent.
2956    #[deprecated = "deprecated in the ChurchTools API"]
2957    pub has_field_changed: Option<bool>,
2958    /// Exclusive upper entry-ID boundary; 0 yields an empty list.
2959    pub offset_id: Option<i64>,
2960    /// Maximum entries in this batch.
2961    pub limit: Option<i64>,
2962}
2963
2964impl GetGroupsGroupIdMembersHistoryQuery {
2965    pub(crate) fn to_query(&self) -> Query {
2966        let mut q = Query::new();
2967        self.member_id.push_query("member_id", &mut q);
2968        self.actor_id.push_query("actor_id", &mut q);
2969        self.origin.push_query("origin", &mut q);
2970        self.new_role_id.push_query("new_role_id", &mut q);
2971        self.new_status.push_query("new_status", &mut q);
2972        self.new_fields.push_query("new_fields", &mut q);
2973        self.has_field_changed.push_query("has_field_changed", &mut q);
2974        self.offset_id.push_query("offset_id", &mut q);
2975        self.limit.push_query("limit", &mut q);
2976        q
2977    }
2978}
2979
2980/// Query parameters for `GET /groups/{groupId}/members/statistics`.
2981#[derive(Debug, Clone, Default)]
2982pub struct GetGroupsGroupIdMembersStatisticsQuery {
2983    /// Group-type role IDs configured for this group; limits the population to these roles.
2984    pub group_type_role_ids: Option<Vec<i64>>,
2985    /// Keys of person database fields from address, information or church categories. Custom keys depend on the installation.
2986    pub person_fields: Option<Vec<String>>,
2987    /// IDs of custom membership field definitions belonging to this group.
2988    pub group_member_fields: Option<Vec<i64>>,
2989}
2990
2991impl GetGroupsGroupIdMembersStatisticsQuery {
2992    pub(crate) fn to_query(&self) -> Query {
2993        let mut q = Query::new();
2994        self.group_type_role_ids.push_query("group_type_role_ids[]", &mut q);
2995        self.person_fields.push_query("personFields[]", &mut q);
2996        self.group_member_fields.push_query("groupMemberFields[]", &mut q);
2997        q
2998    }
2999}
3000
3001/// Query parameters for `GET /groups/{groupId}/members/{personId}/followups`.
3002#[derive(Debug, Clone, Default)]
3003pub struct GetGroupsGroupIdMembersPersonIdFollowupsQuery {
3004    /// Repeat to select any of the listed states; omitted/empty includes all states.
3005    /// Allowed values: `done`, `due-after-today`, `due-before-today`, `due-today`, `due-unspecified`.
3006    pub filter: Option<Vec<String>>,
3007    /// Maximum results in this page.
3008    pub limit: Option<i64>,
3009}
3010
3011impl GetGroupsGroupIdMembersPersonIdFollowupsQuery {
3012    pub(crate) fn to_query(&self) -> Query {
3013        let mut q = Query::new();
3014        self.filter.push_query("filter[]", &mut q);
3015        self.limit.push_query("limit", &mut q);
3016        q
3017    }
3018}
3019
3020/// Query parameters for `POST /groups/{groupId}/newsletter-integrations/{provider}/{listId}/resend-optins`.
3021#[derive(Debug, Clone, Default)]
3022pub struct PostGroupsGroupIdNewsletterIntegrationsProviderListIdResendOptinsQuery {
3023    /// Resend only the pending opt-in for this person.
3024    pub person_id: Option<i64>,
3025}
3026
3027impl PostGroupsGroupIdNewsletterIntegrationsProviderListIdResendOptinsQuery {
3028    pub(crate) fn to_query(&self) -> Query {
3029        let mut q = Query::new();
3030        self.person_id.push_query("person_id", &mut q);
3031        q
3032    }
3033}
3034
3035/// Query parameters for `GET /groups/{groupId}/parents`.
3036#[derive(Debug, Clone, Default)]
3037pub struct GetGroupsGroupIdParentsQuery {
3038    /// Number of results per page.
3039    pub limit: Option<i64>,
3040    /// Array of group ids
3041    pub ids: Option<Vec<i64>>,
3042    /// Array of campus ids to filter the groups
3043    pub campus_ids: Option<Vec<i64>>,
3044    /// Array of age group ids to filter the groups
3045    pub agegroup_ids: Option<Vec<i64>>,
3046    /// Array of group status ids to filter the groups
3047    pub group_status_ids: Option<Vec<i64>>,
3048    /// Array of group category ids to filter the groups
3049    pub group_category_ids: Option<Vec<i64>>,
3050    /// Array of target group ids to filter the groups
3051    pub target_group_ids: Option<Vec<i64>>,
3052    /// Array of weekdays to filter the groups. Sunday = 0, Monday = 1 ...
3053    pub weekdays: Option<Vec<i64>>,
3054    /// Array of group type ids to filter the groups
3055    pub group_type_ids: Option<Vec<i64>>,
3056    /// Array of group tag ids to filter the groups
3057    pub tag_ids: Option<Vec<i64>>,
3058    /// Filters groups by its open status
3059    pub is_open_for_members: Option<bool>,
3060    /// Determines if groups should be omitted where I am in
3061    pub without_my_groups: Option<bool>,
3062    /// Determines if only groups where I am in should be returned
3063    pub only_my_groups: Option<bool>,
3064    /// Only show groups with meeting place
3065    pub has_meeting_place: Option<bool>,
3066    /// Only show groups where posting is allowed
3067    pub allow_posts: Option<bool>,
3068    /// Only show groups which has posts
3069    pub has_posts: Option<bool>,
3070    /// Filter groups based on whether they have an active chat
3071    pub has_active_chat: Option<bool>,
3072    pub query: Option<String>,
3073    /// Group visibility
3074    /// Allowed values: `hidden`, `intern`, `public`, `restricted`.
3075    pub visibility: Option<String>,
3076}
3077
3078impl GetGroupsGroupIdParentsQuery {
3079    pub(crate) fn to_query(&self) -> Query {
3080        let mut q = Query::new();
3081        self.limit.push_query("limit", &mut q);
3082        self.ids.push_query("ids[]", &mut q);
3083        self.campus_ids.push_query("campus_ids[]", &mut q);
3084        self.agegroup_ids.push_query("agegroup_ids[]", &mut q);
3085        self.group_status_ids.push_query("group_status_ids[]", &mut q);
3086        self.group_category_ids.push_query("group_category_ids[]", &mut q);
3087        self.target_group_ids.push_query("target_group_ids[]", &mut q);
3088        self.weekdays.push_query("weekdays[]", &mut q);
3089        self.group_type_ids.push_query("group_type_ids[]", &mut q);
3090        self.tag_ids.push_query("tag_ids[]", &mut q);
3091        self.is_open_for_members.push_query("is_open_for_members", &mut q);
3092        self.without_my_groups.push_query("without_my_groups", &mut q);
3093        self.only_my_groups.push_query("only_my_groups", &mut q);
3094        self.has_meeting_place.push_query("has_meeting_place", &mut q);
3095        self.allow_posts.push_query("allow_posts", &mut q);
3096        self.has_posts.push_query("has_posts", &mut q);
3097        self.has_active_chat.push_query("has_active_chat", &mut q);
3098        self.query.push_query("query", &mut q);
3099        self.visibility.push_query("visibility", &mut q);
3100        q
3101    }
3102}
3103
3104/// Query parameters for `GET /groups/{groupId}/wiki/categories/pages`.
3105#[derive(Debug, Clone, Default)]
3106pub struct GetGroupsIdWikiCategoriesPagesQuery {
3107    /// Maximum amount of pages returned per wiki category.
3108    pub limit: Option<i64>,
3109}
3110
3111impl GetGroupsIdWikiCategoriesPagesQuery {
3112    pub(crate) fn to_query(&self) -> Query {
3113        let mut q = Query::new();
3114        self.limit.push_query("limit", &mut q);
3115        q
3116    }
3117}
3118
3119/// Query parameters for `GET /history`.
3120#[derive(Debug, Clone, Default)]
3121pub struct GetHistoryQuery {
3122    /// Types of domain objects to retrieve
3123    pub domain_types: Option<Vec<String>>,
3124    /// Identifiers of domain objects to retrieve
3125    pub domain_identifiers: Option<Vec<String>>,
3126    /// Filters the action of the entry
3127    pub action: Option<String>,
3128    /// Full-Text Search for the Entry Name.
3129    pub query: Option<String>,
3130    /// Return entities starting from this date.
3131    pub from: Option<chrono::NaiveDate>,
3132    /// Return entities up to (but not including) this date.
3133    pub to: Option<chrono::NaiveDate>,
3134    /// Return entries created by this person.
3135    pub actor_id: Option<i64>,
3136    /// Return entries with this origin.
3137    pub origin: Option<String>,
3138    /// Number of results per page.
3139    pub limit: Option<i64>,
3140}
3141
3142impl GetHistoryQuery {
3143    pub(crate) fn to_query(&self) -> Query {
3144        let mut q = Query::new();
3145        self.domain_types.push_query("domain_types[]", &mut q);
3146        self.domain_identifiers.push_query("domain_identifiers[]", &mut q);
3147        self.action.push_query("action", &mut q);
3148        self.query.push_query("query", &mut q);
3149        self.from.push_query("from", &mut q);
3150        self.to.push_query("to", &mut q);
3151        self.actor_id.push_query("actor_id", &mut q);
3152        self.origin.push_query("origin", &mut q);
3153        self.limit.push_query("limit", &mut q);
3154        q
3155    }
3156}
3157
3158/// Query parameters for `DELETE /htmltemplates/{templateId}`.
3159#[derive(Debug, Clone, Default)]
3160pub struct DeleteHtmltemplatesTemplateIdQuery {
3161    /// True: only return a 409 dependency report. False: perform deletion if no blocker exists. No default is provided by the validator.
3162    pub dry_run: Option<bool>,
3163}
3164
3165impl DeleteHtmltemplatesTemplateIdQuery {
3166    pub(crate) fn to_query(&self) -> Query {
3167        let mut q = Query::new();
3168        self.dry_run.push_query("dryRun", &mut q);
3169        q
3170    }
3171}
3172
3173/// Query parameters for `GET /htmltemplates`.
3174#[derive(Debug, Clone, Default)]
3175pub struct GetHtmltemplatesQuery {
3176    /// Template purpose. Supply this canonical parameter, or the legacy type alias.
3177    /// Allowed values: `bulkletter`, `donation-receipt-attachment`, `donation-receipt-letter`, `email`, `groupmember-document`.
3178    pub domain_type: Option<String>,
3179    /// Deprecated. Legacy alias for domain_type; domain_type wins if both are provided.
3180    /// Allowed values: `bulkletter`, `donation-receipt-attachment`, `donation-receipt-letter`, `email`, `groupmember-document`.
3181    #[deprecated = "deprecated in the ChurchTools API"]
3182    pub r#type: Option<String>,
3183    /// Filter by the current owner, regardless of private/global visibility.
3184    pub only_own: Option<bool>,
3185}
3186
3187impl GetHtmltemplatesQuery {
3188    pub(crate) fn to_query(&self) -> Query {
3189        let mut q = Query::new();
3190        self.domain_type.push_query("domain_type", &mut q);
3191        self.r#type.push_query("type", &mut q);
3192        self.only_own.push_query("onlyOwn", &mut q);
3193        q
3194    }
3195}
3196
3197/// Query parameters for `GET /images/{fileId}/{hash}`.
3198#[derive(Debug, Clone, Default)]
3199pub struct GetImagesFileIdHashQuery {
3200    /// Output width in pixels, or `auto` to let Glide derive it.
3201    pub w: Option<String>,
3202    /// Output height in pixels, or `auto` to let Glide derive it.
3203    pub h: Option<String>,
3204    /// Output quality.
3205    pub q: Option<i64>,
3206    /// Glide crop specification. `original` bypasses the stored crop.
3207    pub crop: Option<String>,
3208    /// Glide fit mode. Raster images use their stored focus point by default.
3209    pub fit: Option<String>,
3210    /// Output format. A recognized hash suffix takes precedence.
3211    /// Allowed values: `avif`, `gif`, `heic`, `jpg`, `pjpg`, `png`, `tiff`, `webp`.
3212    pub fm: Option<String>,
3213    /// Comma-separated preset names: `group-homepage`, `group-detail`, `group-list`, `group-tile`, `group-minitile`, `person-detail` and `avatar`. Explicit parameters take precedence over preset values.
3214    pub p: Option<String>,
3215}
3216
3217impl GetImagesFileIdHashQuery {
3218    pub(crate) fn to_query(&self) -> Query {
3219        let mut q = Query::new();
3220        self.w.push_query("w", &mut q);
3221        self.h.push_query("h", &mut q);
3222        self.q.push_query("q", &mut q);
3223        self.crop.push_query("crop", &mut q);
3224        self.fit.push_query("fit", &mut q);
3225        self.fm.push_query("fm", &mut q);
3226        self.p.push_query("p", &mut q);
3227        q
3228    }
3229}
3230
3231/// Query parameters for `GET /joblog`.
3232#[derive(Debug, Clone, Default)]
3233pub struct GetJoblogQuery {
3234    /// Exact job identifier supplied by the job workflow, including any suffix.
3235    pub guid: Option<String>,
3236}
3237
3238impl GetJoblogQuery {
3239    pub(crate) fn to_query(&self) -> Query {
3240        let mut q = Query::new();
3241        self.guid.push_query("guid", &mut q);
3242        q
3243    }
3244}
3245
3246/// Query parameters for `GET /jobs`.
3247#[derive(Debug, Clone, Default)]
3248pub struct GetJobsQuery {
3249    /// Filter by stored states. Omit this filter to include all states.
3250    /// Allowed values: `DONE`, `ERROR`, `IN_PROGRESS`.
3251    pub status: Option<Vec<String>>,
3252    /// Exact identifier match, not a substring search.
3253    pub identifier: Option<String>,
3254    /// Exact name match, not a substring search.
3255    pub name: Option<String>,
3256    /// Associated business-object IDs, matched across all job domain types. Empty list does not restrict results.
3257    pub domain_ids: Option<Vec<f64>>,
3258    /// Inclusive lower date bound.
3259    pub created_start_date: Option<chrono::NaiveDate>,
3260    /// Inclusive upper date bound.
3261    pub created_end_date: Option<chrono::NaiveDate>,
3262    /// Inclusive lower date bound.
3263    pub modified_start_date: Option<chrono::NaiveDate>,
3264    /// Inclusive upper date bound.
3265    pub modified_end_date: Option<chrono::NaiveDate>,
3266}
3267
3268impl GetJobsQuery {
3269    pub(crate) fn to_query(&self) -> Query {
3270        let mut q = Query::new();
3271        self.status.push_query("status[]", &mut q);
3272        self.identifier.push_query("identifier", &mut q);
3273        self.name.push_query("name", &mut q);
3274        self.domain_ids.push_query("domain_ids[]", &mut q);
3275        self.created_start_date.push_query("created_start_date", &mut q);
3276        self.created_end_date.push_query("created_end_date", &mut q);
3277        self.modified_start_date.push_query("modified_start_date", &mut q);
3278        self.modified_end_date.push_query("modified_end_date", &mut q);
3279        q
3280    }
3281}
3282
3283/// Query parameters for `GET /languages`.
3284#[derive(Debug, Clone, Default)]
3285pub struct GetLanguagesQuery {
3286    /// Set to true if only active languages should be returned
3287    pub only_active: Option<bool>,
3288}
3289
3290impl GetLanguagesQuery {
3291    pub(crate) fn to_query(&self) -> Query {
3292        let mut q = Query::new();
3293        self.only_active.push_query("only_active", &mut q);
3294        q
3295    }
3296}
3297
3298/// Query parameters for `GET /logs`.
3299#[derive(Debug, Clone, Default)]
3300pub struct GetLogsQuery {
3301    /// Filter by text
3302    pub message: Option<String>,
3303    /// Filter by log level ID
3304    pub levels: Option<Vec<String>>,
3305    /// Filter log messages before that date. (Use DateTime-Format)
3306    pub before: Option<String>,
3307    /// Filter log messages after that date. (Use DateTime-Format)
3308    pub after: Option<String>,
3309    /// Filter by person
3310    pub person_id: Option<i64>,
3311    /// Number of results per page.
3312    pub limit: Option<i64>,
3313}
3314
3315impl GetLogsQuery {
3316    pub(crate) fn to_query(&self) -> Query {
3317        let mut q = Query::new();
3318        self.message.push_query("message", &mut q);
3319        self.levels.push_query("levels[]", &mut q);
3320        self.before.push_query("before", &mut q);
3321        self.after.push_query("after", &mut q);
3322        self.person_id.push_query("person_id", &mut q);
3323        self.limit.push_query("limit", &mut q);
3324        q
3325    }
3326}
3327
3328/// Query parameters for `GET /logs/statistics/login`.
3329#[derive(Debug, Clone, Default)]
3330pub struct GetLogsStatisticsLoginQuery {
3331    /// Order the pagination result. Allowed values: `frequent` and `last`
3332    pub order_by: Option<String>,
3333    /// Number of results per page.
3334    pub limit: Option<i64>,
3335}
3336
3337impl GetLogsStatisticsLoginQuery {
3338    pub(crate) fn to_query(&self) -> Query {
3339        let mut q = Query::new();
3340        self.order_by.push_query("order_by", &mut q);
3341        self.limit.push_query("limit", &mut q);
3342        q
3343    }
3344}
3345
3346/// Query parameters for `GET /permissions/definitions`.
3347#[derive(Debug, Clone, Default)]
3348pub struct GetPermissionsDefinitionsQuery {
3349    /// Permission scope to return
3350    /// Allowed values: `all`, `global`, `internal`.
3351    pub scope: Option<String>,
3352}
3353
3354impl GetPermissionsDefinitionsQuery {
3355    pub(crate) fn to_query(&self) -> Query {
3356        let mut q = Query::new();
3357        self.scope.push_query("scope", &mut q);
3358        q
3359    }
3360}
3361
3362/// Query parameters for `GET /permissions/assignment-targets`.
3363#[derive(Debug, Clone, Default)]
3364pub struct GetPermissionsAssignmentTargetsQuery {
3365    /// Search status, role, group-type, group, or person names
3366    pub query: Option<String>,
3367    /// Restrict categories; omitted or empty selects all categories
3368    /// Allowed values: `group_role`, `group_type_role`, `person`, `status`.
3369    pub domain_types: Option<Vec<String>>,
3370    /// Restrict to concrete roles of this group, intersected with domainTypes. A nonexistent group or incompatible categories yield an empty list.
3371    pub group_id: Option<i64>,
3372    /// Maximum number of targets per page across all categories
3373    pub limit: Option<i64>,
3374}
3375
3376impl GetPermissionsAssignmentTargetsQuery {
3377    pub(crate) fn to_query(&self) -> Query {
3378        let mut q = Query::new();
3379        self.query.push_query("query", &mut q);
3380        self.domain_types.push_query("domainTypes[]", &mut q);
3381        self.group_id.push_query("groupId", &mut q);
3382        self.limit.push_query("limit", &mut q);
3383        q
3384    }
3385}
3386
3387/// Query parameters for `GET /permissions/{domainType}`.
3388#[derive(Debug, Clone, Default)]
3389pub struct GetPermissionsPermissionDomainTypeQuery {
3390    /// Optional owner ID for direct domains; required in practice for group and group_type combined views. Prefer the explicit /{domainId} route for these views.
3391    pub domain_id: Option<i64>,
3392}
3393
3394impl GetPermissionsPermissionDomainTypeQuery {
3395    pub(crate) fn to_query(&self) -> Query {
3396        let mut q = Query::new();
3397        self.domain_id.push_query("domainId", &mut q);
3398        q
3399    }
3400}
3401
3402/// Query parameters for `GET /permissions/global/auths/{authId}/assignment-summary`.
3403#[derive(Debug, Clone, Default)]
3404pub struct GetPermissionsGlobalAuthsAuthIdAssignmentSummaryQuery {
3405    /// Required for a permission with selectable values, and forbidden for a boolean permission. Supply a configured selection ID, or -1 for genuinely unrestricted access to all current and future values. This differs from the internal permission endpoint, where -1 expands into separate configured selections.
3406    pub data_id: Option<i64>,
3407}
3408
3409impl GetPermissionsGlobalAuthsAuthIdAssignmentSummaryQuery {
3410    pub(crate) fn to_query(&self) -> Query {
3411        let mut q = Query::new();
3412        self.data_id.push_query("data_id", &mut q);
3413        q
3414    }
3415}
3416
3417/// Query parameters for `GET /permissions/global/auths/{authId}/persons`.
3418#[derive(Debug, Clone, Default)]
3419pub struct GetPermissionsGlobalAuthsAuthIdPersonsQuery {
3420    /// Required for a permission with selectable values, and forbidden for a boolean permission. Supply a configured selection ID, or -1 for genuinely unrestricted access to all current and future values. This differs from the internal permission endpoint, where -1 expands into separate configured selections.
3421    pub data_id: Option<i64>,
3422    /// One-based page. Providing page, limit or include=origins enables pagination; otherwise all matching IDs are returned. Defaults to 1 when pagination is enabled.
3423    pub page: Option<i64>,
3424    /// Page size, 1–100. Providing it enables pagination; page defaults to 1. When pagination is enabled by page or include, this defaults to 50.
3425    pub limit: Option<i64>,
3426    /// Add origins for each person on the page. This also enables pagination with defaults page=1 and limit=50.
3427    /// Allowed values: `origins`.
3428    pub include: Option<String>,
3429}
3430
3431impl GetPermissionsGlobalAuthsAuthIdPersonsQuery {
3432    pub(crate) fn to_query(&self) -> Query {
3433        let mut q = Query::new();
3434        self.data_id.push_query("data_id", &mut q);
3435        self.page.push_query("page", &mut q);
3436        self.limit.push_query("limit", &mut q);
3437        self.include.push_query("include", &mut q);
3438        q
3439    }
3440}
3441
3442/// Query parameters for `GET /permissions/internal/groups/{groupId}/auths/{authId}/persons`.
3443#[derive(Debug, Clone, Default)]
3444pub struct GetPermissionsInternalGroupsGroupIdAuthsAuthIdPersonsQuery {
3445    /// For group-internal permissions with selection values, this parameter is required: a configured ID selects one value and -1 expands into all current configured IDs, in ascending order. It does not select only unrestricted grants as in the global endpoint. Omit it for boolean permissions.
3446    pub data_id: Option<i64>,
3447}
3448
3449impl GetPermissionsInternalGroupsGroupIdAuthsAuthIdPersonsQuery {
3450    pub(crate) fn to_query(&self) -> Query {
3451        let mut q = Query::new();
3452        self.data_id.push_query("data_id", &mut q);
3453        q
3454    }
3455}
3456
3457/// Query parameters for `GET /permissions/origins/internal/persons/{personId}`.
3458#[derive(Debug, Clone, Default)]
3459pub struct GetPermissionsOriginsInternalPersonsPersonIdQuery {
3460    /// Target group IDs to inspect. Omission includes all targets; an empty array returns no groups. Duplicate IDs are collapsed and unknown IDs are omitted.
3461    pub group_ids: Option<Vec<i64>>,
3462}
3463
3464impl GetPermissionsOriginsInternalPersonsPersonIdQuery {
3465    pub(crate) fn to_query(&self) -> Query {
3466        let mut q = Query::new();
3467        self.group_ids.push_query("group_ids[]", &mut q);
3468        q
3469    }
3470}
3471
3472/// Query parameters for `DELETE /person/commentviewers/{id}`.
3473#[derive(Debug, Clone, Default)]
3474pub struct DeletePersonCommentviewersIdQuery {
3475    /// If set to true, the deletion is simulated but nothing will be deleted.
3476    pub dry_run: Option<bool>,
3477}
3478
3479impl DeletePersonCommentviewersIdQuery {
3480    pub(crate) fn to_query(&self) -> Query {
3481        let mut q = Query::new();
3482        self.dry_run.push_query("dry_run", &mut q);
3483        q
3484    }
3485}
3486
3487/// Query parameters for `DELETE /person/growpaths/{id}`.
3488#[derive(Debug, Clone, Default)]
3489pub struct DeletePersonGrowpathsIdQuery {
3490    /// Simulate deletion. Returns 409 with a deletion report even when deletion would be allowed. The spelling is dryRun, not the dry_run used by several other master-data endpoints.
3491    pub dry_run: Option<bool>,
3492}
3493
3494impl DeletePersonGrowpathsIdQuery {
3495    pub(crate) fn to_query(&self) -> Query {
3496        let mut q = Query::new();
3497        self.dry_run.push_query("dryRun", &mut q);
3498        q
3499    }
3500}
3501
3502/// Query parameters for `DELETE /person/relationshiptypes/{id}`.
3503#[derive(Debug, Clone, Default)]
3504pub struct DeletePersonRelationshiptypesIdQuery {
3505    /// Preview blockers and relationships that would be deleted. Always returns the deletion report with `409` and does not delete data.
3506    pub dry_run: Option<bool>,
3507}
3508
3509impl DeletePersonRelationshiptypesIdQuery {
3510    pub(crate) fn to_query(&self) -> Query {
3511        let mut q = Query::new();
3512        self.dry_run.push_query("dryRun", &mut q);
3513        q
3514    }
3515}
3516
3517/// Query parameters for `DELETE /person/sexes/{id}`.
3518#[derive(Debug, Clone, Default)]
3519pub struct DeletePersonSexesIdQuery {
3520    /// If set to true, the deletion is simulated but nothing will be deleted.
3521    pub dry_run: Option<bool>,
3522}
3523
3524impl DeletePersonSexesIdQuery {
3525    pub(crate) fn to_query(&self) -> Query {
3526        let mut q = Query::new();
3527        self.dry_run.push_query("dry_run", &mut q);
3528        q
3529    }
3530}
3531
3532/// Query parameters for `POST /persons`.
3533#[derive(Debug, Clone, Default)]
3534pub struct PostPersonsQuery {
3535    /// Force the action, which would otherwise fail.
3536    pub force: Option<bool>,
3537    /// Omits the otherwise mandatory privacy policy agreement fields. Only effective when `privacy_policy_fields_mandatory_api` is disabled in the ChurchTools configuration. Clients must verify that configuration before using this parameter and must not use it as a fallback for missing agreement information.
3538    pub without_privacy_policy_agreement: Option<bool>,
3539}
3540
3541impl PostPersonsQuery {
3542    pub(crate) fn to_query(&self) -> Query {
3543        let mut q = Query::new();
3544        self.force.push_query("force", &mut q);
3545        self.without_privacy_policy_agreement.push_query("without_privacy_policy_agreement", &mut q);
3546        q
3547    }
3548}
3549
3550/// Query parameters for `POST /persons/filter`.
3551#[derive(Debug, Clone, Default)]
3552pub struct PostPersonsFilterQuery {
3553    /// Page number to show page in pagination. If empty, start at first page.
3554    pub page: Option<i64>,
3555    /// Number of matching persons returned per page.
3556    pub limit: Option<i64>,
3557}
3558
3559impl PostPersonsFilterQuery {
3560    pub(crate) fn to_query(&self) -> Query {
3561        let mut q = Query::new();
3562        self.page.push_query("page", &mut q);
3563        self.limit.push_query("limit", &mut q);
3564        q
3565    }
3566}
3567
3568/// Query parameters for `GET /persons`.
3569#[derive(Debug, Clone, Default)]
3570pub struct GetPersonsQuery {
3571    /// Array of person ids
3572    pub ids: Option<Vec<i64>>,
3573    /// Filter by status id
3574    pub status_ids: Option<Vec<i64>>,
3575    /// Filter by campus id
3576    pub campus_ids: Option<Vec<i64>>,
3577    /// Filter by birthdays before that date (Format: YYYY-MM-DD)
3578    pub birthday_before: Option<chrono::NaiveDate>,
3579    /// Filter by birthdays after that date (Format: YYYY-MM-DD)
3580    pub birthday_after: Option<chrono::NaiveDate>,
3581    /// Show only archived or not archived people
3582    pub is_archived: Option<bool>,
3583    /// Show only persons with locked/not locked account
3584    pub is_account_locked: Option<bool>,
3585    /// Show only persons with or without a system user account
3586    pub is_system_user: Option<bool>,
3587    /// Filter by first name (case-insensitive substring match)
3588    pub first_name: Option<String>,
3589    /// Filter by nickname (case-insensitive substring match)
3590    pub nick_name: Option<String>,
3591    /// Filter by last name (case-insensitive substring match)
3592    pub last_name: Option<String>,
3593    /// Filter by a substring in first name, last name, or nickname (case-insensitive)
3594    pub query: Option<String>,
3595    /// Filter by an email address substring (case-insensitive)
3596    pub email: Option<String>,
3597    /// Filter by an exact email address
3598    pub email_exact: Option<String>,
3599    /// Number of results per page.
3600    pub limit: Option<i64>,
3601    /// Include additional information
3602    /// Allowed values: `tags`.
3603    pub include: Option<Vec<String>>,
3604}
3605
3606impl GetPersonsQuery {
3607    pub(crate) fn to_query(&self) -> Query {
3608        let mut q = Query::new();
3609        self.ids.push_query("ids[]", &mut q);
3610        self.status_ids.push_query("status_ids[]", &mut q);
3611        self.campus_ids.push_query("campus_ids[]", &mut q);
3612        self.birthday_before.push_query("birthday_before", &mut q);
3613        self.birthday_after.push_query("birthday_after", &mut q);
3614        self.is_archived.push_query("is_archived", &mut q);
3615        self.is_account_locked.push_query("is_account_locked", &mut q);
3616        self.is_system_user.push_query("is_system_user", &mut q);
3617        self.first_name.push_query("firstName", &mut q);
3618        self.nick_name.push_query("nickName", &mut q);
3619        self.last_name.push_query("lastName", &mut q);
3620        self.query.push_query("query", &mut q);
3621        self.email.push_query("email", &mut q);
3622        self.email_exact.push_query("email-exact", &mut q);
3623        self.limit.push_query("limit", &mut q);
3624        self.include.push_query("include[]", &mut q);
3625        q
3626    }
3627}
3628
3629/// Query parameters for `GET /persons/birthdays`.
3630#[derive(Debug, Clone, Default)]
3631pub struct GetPersonsBirthdaysQuery {
3632    /// Birthdays from that date on, defaults to yesterday
3633    pub start_date: Option<chrono::NaiveDate>,
3634    /// Birthdays up to that date, defaults to 30 days from now
3635    pub end_date: Option<chrono::NaiveDate>,
3636    /// The direction of the result set
3637    /// Allowed values: `backward`, `forward`.
3638    pub direction: Option<String>,
3639    /// Number of results per page.
3640    pub limit: Option<i64>,
3641    /// Filter by campus ids
3642    pub campus_ids: Option<Vec<i64>>,
3643    /// Filter by group ids
3644    pub group_ids: Option<Vec<i64>>,
3645    /// Filter by people in my groups
3646    pub my_groups: Option<bool>,
3647    /// Filter by status ids
3648    pub status_ids: Option<Vec<i64>>,
3649}
3650
3651impl GetPersonsBirthdaysQuery {
3652    pub(crate) fn to_query(&self) -> Query {
3653        let mut q = Query::new();
3654        self.start_date.push_query("start_date", &mut q);
3655        self.end_date.push_query("end_date", &mut q);
3656        self.direction.push_query("direction", &mut q);
3657        self.limit.push_query("limit", &mut q);
3658        self.campus_ids.push_query("campus_ids[]", &mut q);
3659        self.group_ids.push_query("group_ids[]", &mut q);
3660        self.my_groups.push_query("my_groups", &mut q);
3661        self.status_ids.push_query("status_ids[]", &mut q);
3662        q
3663    }
3664}
3665
3666/// Query parameters for `GET /persons/duplicates`.
3667#[derive(Debug, Clone, Default)]
3668pub struct GetPersonsDuplicatesQuery {
3669    pub reset_cache: Option<bool>,
3670}
3671
3672impl GetPersonsDuplicatesQuery {
3673    pub(crate) fn to_query(&self) -> Query {
3674        let mut q = Query::new();
3675        self.reset_cache.push_query("reset_cache", &mut q);
3676        q
3677    }
3678}
3679
3680/// Query parameters for `GET /persons/{personId}/groups`.
3681#[derive(Debug, Clone, Default)]
3682pub struct GetPersonsIdGroupsQuery {
3683    /// If set groups that reached their enddate +x days configured in the admin settings, are also shown.
3684    pub show_overdue_groups: Option<bool>,
3685    /// If set groups that have the status 'archived' are shown
3686    pub show_inactive_groups: Option<bool>,
3687    /// If set groups were the user has the group member status 'to_deleted' are shown.
3688    pub show_to_delete_memberships: Option<bool>,
3689    /// If set groups were the user has the group member status 'requested' or 'waiting' are shown.
3690    pub show_requested_or_waiting_memberships: Option<bool>,
3691}
3692
3693impl GetPersonsIdGroupsQuery {
3694    pub(crate) fn to_query(&self) -> Query {
3695        let mut q = Query::new();
3696        self.show_overdue_groups.push_query("show_overdue_groups", &mut q);
3697        self.show_inactive_groups.push_query("show_inactive_groups", &mut q);
3698        self.show_to_delete_memberships.push_query("show_to_delete_memberships", &mut q);
3699        self.show_requested_or_waiting_memberships.push_query("show_requested_or_waiting_memberships", &mut q);
3700        q
3701    }
3702}
3703
3704/// Query parameters for `GET /persons/{personId}/posts`.
3705#[derive(Debug, Clone, Default)]
3706pub struct GetPersonsPersonIdPostsQuery {
3707    /// Can only be used if the endpoint is called with the personId of the currently logged in user. If a different personId is used in combination with filter\[\] the result will be empty.
3708    /// Allowed values: `banned`, `expiration_future`, `expiration_past`, `publication_future`, `published`.
3709    pub filter: Option<Vec<String>>,
3710    /// Number of results per page.
3711    pub limit: Option<i64>,
3712    /// If set, only posts created before this date are returned. The date must be in RFC3339 format (Zulu-Date).
3713    pub before: Option<chrono::DateTime<chrono::Utc>>,
3714    /// If set, posts created at the "before" date are included in the result, if the guids of the posts are lexically smaller than the last_post_indentifier. Will be ignored if "before" is not set.
3715    pub last_post_indentifier: Option<String>,
3716    /// If set, only posts created after this date are returned. The date must be in RFC3339 format (Zulu-Date).
3717    pub after: Option<chrono::DateTime<chrono::Utc>>,
3718}
3719
3720impl GetPersonsPersonIdPostsQuery {
3721    pub(crate) fn to_query(&self) -> Query {
3722        let mut q = Query::new();
3723        self.filter.push_query("filter[]", &mut q);
3724        self.limit.push_query("limit", &mut q);
3725        self.before.push_query("before", &mut q);
3726        self.last_post_indentifier.push_query("last_post_indentifier", &mut q);
3727        self.after.push_query("after", &mut q);
3728        q
3729    }
3730}
3731
3732/// Query parameters for `DELETE /persons/{personId}/absences/{id}`.
3733#[derive(Debug, Clone, Default)]
3734pub struct DeletePersonsPersonIdAbsencesIdQuery {
3735    /// Perform the lookup without removing the absence.
3736    pub dry_run: Option<bool>,
3737}
3738
3739impl DeletePersonsPersonIdAbsencesIdQuery {
3740    pub(crate) fn to_query(&self) -> Query {
3741        let mut q = Query::new();
3742        self.dry_run.push_query("dry_run", &mut q);
3743        q
3744    }
3745}
3746
3747/// Query parameters for `GET /persons/{personId}/absences`.
3748#[derive(Debug, Clone, Default)]
3749pub struct GetPersonsPersonIdAbsencesQuery {
3750    /// Start of the overlap window. Defaults to midnight two weeks ago.
3751    pub from: Option<serde_json::Value>,
3752    /// End of the overlap window. Defaults to midnight two weeks from today.
3753    pub to: Option<serde_json::Value>,
3754    /// Order by absence start.
3755    /// Allowed values: `ASC`, `DESC`.
3756    pub order_direction: Option<String>,
3757}
3758
3759impl GetPersonsPersonIdAbsencesQuery {
3760    pub(crate) fn to_query(&self) -> Query {
3761        let mut q = Query::new();
3762        self.from.push_query("from", &mut q);
3763        self.to.push_query("to", &mut q);
3764        self.order_direction.push_query("order_direction", &mut q);
3765        q
3766    }
3767}
3768
3769/// Query parameters for `GET /persons/{personId}/events`.
3770#[derive(Debug, Clone, Default)]
3771pub struct GetPersonsIdEventsQuery {
3772    /// Lower bound, strictly after midnight on this date. Defaults to today.
3773    pub from: Option<chrono::NaiveDate>,
3774}
3775
3776impl GetPersonsIdEventsQuery {
3777    pub(crate) fn to_query(&self) -> Query {
3778        let mut q = Query::new();
3779        self.from.push_query("from", &mut q);
3780        q
3781    }
3782}
3783
3784/// Query parameters for `DELETE /persons/{personId}/events/{eventId}/services/{serviceId}/exchangerequests/{requestId}`.
3785#[derive(Debug, Clone, Default)]
3786pub struct DeletePersonsIdEventsIdServicesIdExchangerequestsIdQuery {
3787    /// Permanently remove the request instead of changing its status to `CANCELLED`.
3788    pub hard_delete: Option<bool>,
3789}
3790
3791impl DeletePersonsIdEventsIdServicesIdExchangerequestsIdQuery {
3792    pub(crate) fn to_query(&self) -> Query {
3793        let mut q = Query::new();
3794        self.hard_delete.push_query("hardDelete", &mut q);
3795        q
3796    }
3797}
3798
3799/// Query parameters for `GET /persons/{personId}/events/{eventId}/services/{serviceId}/exchangerequests`.
3800#[derive(Debug, Clone, Default)]
3801pub struct GetPersonsIdEventsIdServicesIdExchangerequestsQuery {
3802    /// `false` selects exchanges initiated from this assignment; `true` selects exchanges targeting it.
3803    pub incoming: Option<bool>,
3804}
3805
3806impl GetPersonsIdEventsIdServicesIdExchangerequestsQuery {
3807    pub(crate) fn to_query(&self) -> Query {
3808        let mut q = Query::new();
3809        self.incoming.push_query("incoming", &mut q);
3810        q
3811    }
3812}
3813
3814/// Query parameters for `GET /persons/{personId}/exchangerequests`.
3815#[derive(Debug, Clone, Default)]
3816pub struct GetPersonsIdExchangerequestsQuery {
3817    /// `false` selects exchanges received by the person; `true` selects exchanges initiated by the person.
3818    pub person_is_requester: Option<bool>,
3819}
3820
3821impl GetPersonsIdExchangerequestsQuery {
3822    pub(crate) fn to_query(&self) -> Query {
3823        let mut q = Query::new();
3824        self.person_is_requester.push_query("personIsRequester", &mut q);
3825        q
3826    }
3827}
3828
3829/// Query parameters for `GET /persons/{personId}/followups`.
3830#[derive(Debug, Clone, Default)]
3831pub struct GetPersonsPersonIdFollowupsQuery {
3832    /// Repeat to select any of the listed states; omitted/empty includes all states.
3833    /// Allowed values: `done`, `due-after-today`, `due-before-today`, `due-today`, `due-unspecified`.
3834    pub filter: Option<Vec<String>>,
3835    /// Maximum results in this page.
3836    pub limit: Option<i64>,
3837}
3838
3839impl GetPersonsPersonIdFollowupsQuery {
3840    pub(crate) fn to_query(&self) -> Query {
3841        let mut q = Query::new();
3842        self.filter.push_query("filter[]", &mut q);
3843        self.limit.push_query("limit", &mut q);
3844        q
3845    }
3846}
3847
3848/// Query parameters for `DELETE /persons/{personId}/servicerequests/{requestId}`.
3849#[derive(Debug, Clone, Default)]
3850pub struct DeletePersonsIdServicerequestsIdQuery {
3851    /// Optional decline comment.
3852    pub comment: Option<String>,
3853}
3854
3855impl DeletePersonsIdServicerequestsIdQuery {
3856    pub(crate) fn to_query(&self) -> Query {
3857        let mut q = Query::new();
3858        self.comment.push_query("comment", &mut q);
3859        q
3860    }
3861}
3862
3863/// Query parameters for `GET /persons/{personId}/servicerequests`.
3864#[derive(Debug, Clone, Default)]
3865pub struct GetPersonsIdServicerequestsQuery {
3866    /// Include only events starting at or after midnight today. Both outstanding and confirmed valid assignments are included.
3867    pub only_future: Option<bool>,
3868    /// Deprecated. Legacy alias for only_future.
3869    #[deprecated = "deprecated in the ChurchTools API"]
3870    pub get_all_in_future: Option<bool>,
3871}
3872
3873impl GetPersonsIdServicerequestsQuery {
3874    pub(crate) fn to_query(&self) -> Query {
3875        let mut q = Query::new();
3876        self.only_future.push_query("only_future", &mut q);
3877        self.get_all_in_future.push_query("getAllInFuture", &mut q);
3878        q
3879    }
3880}
3881
3882/// Query parameters for `GET /pollfornews`.
3883#[derive(Debug, Clone, Default)]
3884pub struct GetPollfornewsQuery {
3885    /// Filters for which domain types the changes should be checked.
3886    pub domain_types: Option<Vec<String>>,
3887    /// The date when you last called the API.
3888    pub since: Option<chrono::DateTime<chrono::Utc>>,
3889}
3890
3891impl GetPollfornewsQuery {
3892    pub(crate) fn to_query(&self) -> Query {
3893        let mut q = Query::new();
3894        self.domain_types.push_query("domain_types[]", &mut q);
3895        self.since.push_query("since", &mut q);
3896        q
3897    }
3898}
3899
3900/// Query parameters for `GET /post/linkings`.
3901#[derive(Debug, Clone, Default)]
3902pub struct GetPostLinkingsQuery {
3903    /// Filters for which posts the linkings should be loaded.
3904    pub post_ids: Option<Vec<i64>>,
3905}
3906
3907impl GetPostLinkingsQuery {
3908    pub(crate) fn to_query(&self) -> Query {
3909        let mut q = Query::new();
3910        self.post_ids.push_query("post_ids[]", &mut q);
3911        q
3912    }
3913}
3914
3915/// Query parameters for `GET /post/search`.
3916#[derive(Debug, Clone, Default)]
3917pub struct GetPostSearchQuery {
3918    /// The query string to search for in post title and content
3919    pub query: Option<String>,
3920    /// The order the posts are returned in.
3921    /// Allowed values: `publishedDate`, `relevance`.
3922    pub order_by: Option<String>,
3923    /// The order direction. Only works for order_by publishedDate.
3924    /// Allowed values: `ASC`, `DESC`.
3925    pub order_direction: Option<String>,
3926    /// If set, only posts created before this date are returned. The date must be in RFC3339 format (Zulu-Date).
3927    pub before: Option<chrono::DateTime<chrono::Utc>>,
3928    /// If set, only posts created after this date are returned. The date must be in RFC3339 format (Zulu-Date).
3929    pub after: Option<chrono::DateTime<chrono::Utc>>,
3930    /// If set, only posts of these campuses are returned. If not set, posts of all campuses are returned.
3931    pub campus_ids: Option<Vec<i64>>,
3932    /// If set, only posts by these persons are returned. If not set, posts by all persons are returned.
3933    pub actor_ids: Option<Vec<i64>>,
3934    /// If set, only posts are returned that belong to groups with this visibility.
3935    /// Allowed values: `hidden`, `intern`, `public`, `restricted`.
3936    pub group_visibility: Option<String>,
3937    /// If set, only posts with that visibility are returned.
3938    /// Allowed values: `group_intern`, `group_visible`.
3939    pub post_visibility: Option<String>,
3940    /// If set, only posts of these groups are returned. If not set, posts of all groups are returned.
3941    pub group_ids: Option<Vec<i64>>,
3942    /// If set, the response will include the specified data.
3943    /// Allowed values: `comments`, `linkings`, `reactions`.
3944    pub include: Option<Vec<String>>,
3945    /// If set to true, only posts of groups the user is member of are returned. If not set, posts of all groups are returned.
3946    pub only_my_groups: Option<bool>,
3947}
3948
3949impl GetPostSearchQuery {
3950    pub(crate) fn to_query(&self) -> Query {
3951        let mut q = Query::new();
3952        self.query.push_query("query", &mut q);
3953        self.order_by.push_query("order_by", &mut q);
3954        self.order_direction.push_query("order_direction", &mut q);
3955        self.before.push_query("before", &mut q);
3956        self.after.push_query("after", &mut q);
3957        self.campus_ids.push_query("campus_ids[]", &mut q);
3958        self.actor_ids.push_query("actor_ids[]", &mut q);
3959        self.group_visibility.push_query("group_visibility", &mut q);
3960        self.post_visibility.push_query("post_visibility", &mut q);
3961        self.group_ids.push_query("group_ids[]", &mut q);
3962        self.include.push_query("include[]", &mut q);
3963        self.only_my_groups.push_query("only_my_groups", &mut q);
3964        q
3965    }
3966}
3967
3968/// Query parameters for `GET /post/reports`.
3969#[derive(Debug, Clone, Default)]
3970pub struct GetPostReportsQuery {
3971    /// Allowed values: `post`, `post_comment`.
3972    pub domain_type: Option<String>,
3973    pub domain_id: Option<i64>,
3974    /// Allowed values: `accepted`, `declined`, `pending`, `pending-again`.
3975    pub status: Option<String>,
3976}
3977
3978impl GetPostReportsQuery {
3979    pub(crate) fn to_query(&self) -> Query {
3980        let mut q = Query::new();
3981        self.domain_type.push_query("domain_type", &mut q);
3982        self.domain_id.push_query("domain_id", &mut q);
3983        self.status.push_query("status", &mut q);
3984        q
3985    }
3986}
3987
3988/// Query parameters for `DELETE /posts/{postId}`.
3989#[derive(Debug, Clone, Default)]
3990pub struct DeletePostsPostIdQuery {
3991    /// If set to true, the post will not be deleted but the response will contain the result of the deletion.
3992    pub dry_run: Option<bool>,
3993}
3994
3995impl DeletePostsPostIdQuery {
3996    pub(crate) fn to_query(&self) -> Query {
3997        let mut q = Query::new();
3998        self.dry_run.push_query("dryRun", &mut q);
3999        q
4000    }
4001}
4002
4003/// Query parameters for `GET /posts/{postId}`.
4004#[derive(Debug, Clone, Default)]
4005pub struct GetPostsPostIdQuery {
4006    /// If set, the response will include the specified data.
4007    /// Allowed values: `comments`, `reactions`.
4008    pub include: Option<Vec<String>>,
4009}
4010
4011impl GetPostsPostIdQuery {
4012    pub(crate) fn to_query(&self) -> Query {
4013        let mut q = Query::new();
4014        self.include.push_query("include[]", &mut q);
4015        q
4016    }
4017}
4018
4019/// Query parameters for `GET /posts`.
4020#[derive(Debug, Clone, Default)]
4021pub struct GetPostsQuery {
4022    /// If set, only posts published before this date are returned. The date must be in RFC3339 format (Zulu-Date).
4023    pub before: Option<chrono::DateTime<chrono::Utc>>,
4024    /// If set, posts published at the `before` date are included in the result, if the guids of the posts are lexically smaller than the `last_post_identifier`. Will be ignored if `before` is not set.
4025    pub last_post_identifier: Option<String>,
4026    /// If set, only posts published at or after this date are returned. The date must be in RFC3339 format (Zulu-Date).
4027    pub after: Option<chrono::DateTime<chrono::Utc>>,
4028    /// Deprecated. If set, only posts of this campus are returned. If not set, posts of all campuses are returned.
4029    #[deprecated = "deprecated in the ChurchTools API"]
4030    pub campus_id: Option<i64>,
4031    /// If set, only posts of these campuses are returned. If not set, posts of all campuses are returned.
4032    pub campus_ids: Option<Vec<i64>>,
4033    /// If set, only posts by these persons are returned. If not set, posts by all persons are returned.
4034    pub actor_ids: Option<Vec<i64>>,
4035    /// If set, only posts are returned that belong to groups with this visibility.
4036    /// Allowed values: `hidden`, `intern`, `public`, `restricted`.
4037    pub group_visibility: Option<String>,
4038    /// If set, only posts with that visibility are returned.
4039    /// Allowed values: `group_intern`, `group_visible`.
4040    pub post_visibility: Option<String>,
4041    /// If set, only posts of these groups are returned. If not set, posts of all groups are returned.
4042    pub group_ids: Option<Vec<i64>>,
4043    /// If set, the response will include the specified data.
4044    /// Allowed values: `comments`, `linkings`, `reactions`.
4045    pub include: Option<Vec<String>>,
4046    /// Number of results per page.
4047    pub limit: Option<i64>,
4048    /// If set to true, only posts of groups the user is member of are returned. If not set, posts of all groups are returned.
4049    pub only_my_groups: Option<bool>,
4050}
4051
4052impl GetPostsQuery {
4053    pub(crate) fn to_query(&self) -> Query {
4054        let mut q = Query::new();
4055        self.before.push_query("before", &mut q);
4056        self.last_post_identifier.push_query("last_post_identifier", &mut q);
4057        self.after.push_query("after", &mut q);
4058        self.campus_id.push_query("campus_id", &mut q);
4059        self.campus_ids.push_query("campus_ids[]", &mut q);
4060        self.actor_ids.push_query("actor_ids[]", &mut q);
4061        self.group_visibility.push_query("group_visibility", &mut q);
4062        self.post_visibility.push_query("post_visibility", &mut q);
4063        self.group_ids.push_query("group_ids[]", &mut q);
4064        self.include.push_query("include[]", &mut q);
4065        self.limit.push_query("limit", &mut q);
4066        self.only_my_groups.push_query("only_my_groups", &mut q);
4067        q
4068    }
4069}
4070
4071/// Query parameters for `GET /profiles/slugcheck/{slug}`.
4072#[derive(Debug, Clone, Default)]
4073pub struct GetProfilesSlugcheckSlugQuery {
4074    /// GUID of the profile currently being edited. If this profile already uses the slug, the slug is considered available.
4075    pub guid: Option<String>,
4076}
4077
4078impl GetProfilesSlugcheckSlugQuery {
4079    pub(crate) fn to_query(&self) -> Query {
4080        let mut q = Query::new();
4081        self.guid.push_query("guid", &mut q);
4082        q
4083    }
4084}
4085
4086/// Query parameters for `GET /publicgroups/{groupId}`.
4087#[derive(Debug, Clone, Default)]
4088pub struct GetPublicgroupsIdQuery {
4089    /// Optional group-homepage hash.
4090    pub hash: Option<String>,
4091}
4092
4093impl GetPublicgroupsIdQuery {
4094    pub(crate) fn to_query(&self) -> Query {
4095        let mut q = Query::new();
4096        self.hash.push_query("hash", &mut q);
4097        q
4098    }
4099}
4100
4101/// Query parameters for `GET /publicgroups/{groupId}/form`.
4102#[derive(Debug, Clone, Default)]
4103pub struct GetPublicgroupsGroupIdFormQuery {
4104    /// Sign Up Token
4105    pub token: Option<String>,
4106    /// Optional requester selection; updates the token’s requester and clicked selection.
4107    pub person_id: Option<i64>,
4108}
4109
4110impl GetPublicgroupsGroupIdFormQuery {
4111    pub(crate) fn to_query(&self) -> Query {
4112        let mut q = Query::new();
4113        self.token.push_query("token", &mut q);
4114        self.person_id.push_query("personId", &mut q);
4115        q
4116    }
4117}
4118
4119/// Query parameters for `GET /publicgroups/{groupId}/possiblerequesters`.
4120#[derive(Debug, Clone, Default)]
4121pub struct GetPublicgroupsGroupIdPossiblerequestersQuery {
4122    /// The signup token for the registration
4123    pub token: Option<String>,
4124}
4125
4126impl GetPublicgroupsGroupIdPossiblerequestersQuery {
4127    pub(crate) fn to_query(&self) -> Query {
4128        let mut q = Query::new();
4129        self.token.push_query("token", &mut q);
4130        q
4131    }
4132}
4133
4134/// Query parameters for `GET /publicgroups/{groupId}/signoutdata`.
4135#[derive(Debug, Clone, Default)]
4136pub struct GetPublicgroupsIdSignoutdataQuery {
4137    /// Optional signup token; omit to use the current user.
4138    pub token: Option<String>,
4139}
4140
4141impl GetPublicgroupsIdSignoutdataQuery {
4142    pub(crate) fn to_query(&self) -> Query {
4143        let mut q = Query::new();
4144        self.token.push_query("token", &mut q);
4145        q
4146    }
4147}
4148
4149/// Query parameters for `GET /repeatcalculation`.
4150#[derive(Debug, Clone, Default)]
4151pub struct GetRepeatcalculationQuery {
4152    /// Indexed entries encoded with PHP bracket notation, for example additionals\[0\]\[date\]=2026-10-01 and additionals\[0\]\[isRepeated\]=false.
4153    pub additionals: Option<serde_json::Value>,
4154    /// Recurrence input: endDate.
4155    pub end_date: Option<serde_json::Value>,
4156    /// Indexed entries encoded with PHP bracket notation, for example exceptions\[0\]\[date\]=2026-10-01.
4157    pub exceptions: Option<serde_json::Value>,
4158    /// Recurrence input: repeatFrequency.
4159    pub repeat_frequency: Option<i64>,
4160    /// Recurrence input: repeatId.
4161    /// Allowed values: `0`, `1`, `31`, `32`, `365`, `7`, `999`.
4162    pub repeat_id: Option<i64>,
4163    /// Recurrence input: repeatOption.
4164    pub repeat_option: Option<i64>,
4165    /// Recurrence input: repeatUntil.
4166    pub repeat_until: Option<chrono::NaiveDate>,
4167    /// Recurrence input: startDate.
4168    pub start_date: Option<serde_json::Value>,
4169}
4170
4171impl GetRepeatcalculationQuery {
4172    pub(crate) fn to_query(&self) -> Query {
4173        let mut q = Query::new();
4174        self.additionals.push_query("additionals", &mut q);
4175        self.end_date.push_query("endDate", &mut q);
4176        self.exceptions.push_query("exceptions", &mut q);
4177        self.repeat_frequency.push_query("repeatFrequency", &mut q);
4178        self.repeat_id.push_query("repeatId", &mut q);
4179        self.repeat_option.push_query("repeatOption", &mut q);
4180        self.repeat_until.push_query("repeatUntil", &mut q);
4181        self.start_date.push_query("startDate", &mut q);
4182        q
4183    }
4184}
4185
4186/// Query parameters for `GET /resource/masterdata`.
4187#[derive(Debug, Clone, Default)]
4188pub struct GetResourceMasterdataQuery {
4189    /// Optional enrichment with person references for resource administrators.
4190    /// Allowed values: `involvedPersonsDomainObjects`.
4191    pub include: Option<Vec<String>>,
4192}
4193
4194impl GetResourceMasterdataQuery {
4195    pub(crate) fn to_query(&self) -> Query {
4196        let mut q = Query::new();
4197        self.include.push_query("include[]", &mut q);
4198        q
4199    }
4200}
4201
4202/// Query parameters for `GET /resources/{resourceId}`.
4203#[derive(Debug, Clone, Default)]
4204pub struct GetResourcesResourceIdQuery {
4205    /// Optional enrichment with person references for resource administrators.
4206    /// Allowed values: `involvedPersonsDomainObjects`.
4207    pub include: Option<Vec<String>>,
4208}
4209
4210impl GetResourcesResourceIdQuery {
4211    pub(crate) fn to_query(&self) -> Query {
4212        let mut q = Query::new();
4213        self.include.push_query("include[]", &mut q);
4214        q
4215    }
4216}
4217
4218/// Query parameters for `GET /resources`.
4219#[derive(Debug, Clone, Default)]
4220pub struct GetResourcesQuery {
4221    /// Optional enrichment with person references for resource administrators.
4222    /// Allowed values: `involvedPersonsDomainObjects`.
4223    pub include: Option<Vec<String>>,
4224}
4225
4226impl GetResourcesQuery {
4227    pub(crate) fn to_query(&self) -> Query {
4228        let mut q = Query::new();
4229        self.include.push_query("include[]", &mut q);
4230        q
4231    }
4232}
4233
4234/// Query parameters for `GET /routines`.
4235#[derive(Debug, Clone, Default)]
4236pub struct GetRoutinesQuery {
4237    /// Optional domain filter; group_membership is the currently registered handler.
4238    /// Allowed values: `group_membership`.
4239    pub domain_type: Option<String>,
4240}
4241
4242impl GetRoutinesQuery {
4243    pub(crate) fn to_query(&self) -> Query {
4244        let mut q = Query::new();
4245        self.domain_type.push_query("domain_type", &mut q);
4246        q
4247    }
4248}
4249
4250/// Query parameters for `PATCH /routines/{routineId}`.
4251#[derive(Debug, Clone, Default)]
4252pub struct PatchRoutinesRoutineIdQuery {
4253    /// Validate controller-level input/permissions without persisting; returns 204.
4254    pub dry_run: Option<bool>,
4255}
4256
4257impl PatchRoutinesRoutineIdQuery {
4258    pub(crate) fn to_query(&self) -> Query {
4259        let mut q = Query::new();
4260        self.dry_run.push_query("dry_run", &mut q);
4261        q
4262    }
4263}
4264
4265/// Query parameters for `GET /routines/{routineId}/runs`.
4266#[derive(Debug, Clone, Default)]
4267pub struct GetRoutinesRoutineIdRunsQuery {
4268    /// Include additional information
4269    /// Allowed values: `domainObject`.
4270    pub include: Option<Vec<String>>,
4271    /// Append unpersisted candidate runs with null IDs.
4272    pub with_potential_domain_objects: Option<bool>,
4273}
4274
4275impl GetRoutinesRoutineIdRunsQuery {
4276    pub(crate) fn to_query(&self) -> Query {
4277        let mut q = Query::new();
4278        self.include.push_query("include[]", &mut q);
4279        self.with_potential_domain_objects.push_query("with_potential_domain_objects", &mut q);
4280        q
4281    }
4282}
4283
4284/// Query parameters for `GET /saml/login`.
4285#[derive(Debug, Clone, Default)]
4286pub struct GetSamlLoginQuery {
4287    /// Absolute same-origin destination after successful login.
4288    pub redirect: Option<String>,
4289}
4290
4291impl GetSamlLoginQuery {
4292    pub(crate) fn to_query(&self) -> Query {
4293        let mut q = Query::new();
4294        self.redirect.push_query("redirect", &mut q);
4295        q
4296    }
4297}
4298
4299/// Query parameters for `GET /search`.
4300#[derive(Debug, Clone, Default)]
4301pub struct GetSearchQuery {
4302    pub query: Option<String>,
4303    /// Allowed values: `action`, `group`, `person`, `song`, `wiki_page`.
4304    pub domain_types: Option<Vec<String>>,
4305}
4306
4307impl GetSearchQuery {
4308    pub(crate) fn to_query(&self) -> Query {
4309        let mut q = Query::new();
4310        self.query.push_query("query", &mut q);
4311        self.domain_types.push_query("domain_types[]", &mut q);
4312        q
4313    }
4314}
4315
4316/// Query parameters for `DELETE /securitylevels/{id}`.
4317#[derive(Debug, Clone, Default)]
4318pub struct DeleteSecuritylevelsIdQuery {
4319    /// If set to true, the deletion is simulated but nothing will be deleted.
4320    pub dry_run: Option<bool>,
4321}
4322
4323impl DeleteSecuritylevelsIdQuery {
4324    pub(crate) fn to_query(&self) -> Query {
4325        let mut q = Query::new();
4326        self.dry_run.push_query("dry_run", &mut q);
4327        q
4328    }
4329}
4330
4331/// Query parameters for `PATCH /securitylevels/{id}`.
4332#[derive(Debug, Clone, Default)]
4333pub struct PatchSecuritylevelsIdQuery {
4334    /// Need to be true, if securitylevel shall be reordered
4335    pub forcereorder: Option<bool>,
4336}
4337
4338impl PatchSecuritylevelsIdQuery {
4339    pub(crate) fn to_query(&self) -> Query {
4340        let mut q = Query::new();
4341        self.forcereorder.push_query("forcereorder", &mut q);
4342        q
4343    }
4344}
4345
4346/// Query parameters for `GET /songs/{songId}`.
4347#[derive(Debug, Clone, Default)]
4348pub struct GetSongsSongIdQuery {
4349    /// Optional enrichments. Use include=tags for tags, or include\[\]=tags&include\[\]=arrangements for multiple values. Comma-separated values are not supported. Arrangements are already returned without this option by the current API, but this will change in a future release. Omitted requests no enrichment.
4350    /// Allowed values: `arrangements`, `tags`.
4351    pub include: Option<Vec<String>>,
4352}
4353
4354impl GetSongsSongIdQuery {
4355    pub(crate) fn to_query(&self) -> Query {
4356        let mut q = Query::new();
4357        self.include.push_query("include[]", &mut q);
4358        q
4359    }
4360}
4361
4362/// Query parameters for `GET /songs`.
4363#[derive(Debug, Clone, Default)]
4364pub struct GetSongsQuery {
4365    /// Restrict to these song category IDs, intersected with permitted categories.
4366    pub song_category_ids: Option<Vec<i64>>,
4367    /// Restrict to these song IDs. An empty array matches no songs.
4368    pub ids: Option<Vec<i64>>,
4369    /// Filter the rehearsal flag: `true` selects songs marked for practice, false selects those not marked.
4370    pub practice: Option<bool>,
4371    /// Filter by arrangement key. Song plus all its arrangements are returned if one arrangement meets the filter criterion.
4372    /// Allowed values: `A`, `A#`, `A#m`, `Ab`, `Abm`, `Am`, `B`, `B#`, `B#m`, `Bb`, `Bbm`, `Bm`, `C`, `C#`, `C#m`, `Cb`, `Cbm`, `Cm`, `D`, `D#`, `D#m`, `Db`, `Dbm`, `Dm`, `E`, `E#`, `E#m`, `Eb`, `Ebm`, `Em`, ….
4373    pub key_of_arrangement: Option<String>,
4374    /// Substring filter on the song title, combined with query and the other filters.
4375    pub name: Option<String>,
4376    /// Substring search in either title or author, combined with name and the other filters.
4377    pub query: Option<String>,
4378    /// Optional enrichments. Use include=tags for tags, or include\[\]=tags&include\[\]=arrangements for multiple values. Comma-separated values are not supported. Arrangements are already returned without this option by the current API, but this will change in a future release. Omitted requests no enrichment.
4379    /// Allowed values: `arrangements`, `tags`.
4380    pub include: Option<Vec<String>>,
4381    /// Number of songs per page, from 1 to 200.
4382    pub limit: Option<i64>,
4383}
4384
4385impl GetSongsQuery {
4386    pub(crate) fn to_query(&self) -> Query {
4387        let mut q = Query::new();
4388        self.song_category_ids.push_query("song_category_ids[]", &mut q);
4389        self.ids.push_query("ids[]", &mut q);
4390        self.practice.push_query("practice", &mut q);
4391        self.key_of_arrangement.push_query("key_of_arrangement", &mut q);
4392        self.name.push_query("name", &mut q);
4393        self.query.push_query("query", &mut q);
4394        self.include.push_query("include[]", &mut q);
4395        self.limit.push_query("limit", &mut q);
4396        q
4397    }
4398}
4399
4400/// Query parameters for `GET /sync/executions`.
4401#[derive(Debug, Clone, Default)]
4402pub struct GetSyncExecutionsQuery {
4403    /// Number of results per page.
4404    pub limit: Option<i64>,
4405    /// Filter by external connection IDs.
4406    pub es_ids: Option<Vec<i64>>,
4407    /// Filter by job configuration IDs.
4408    pub job_ids: Option<Vec<i64>>,
4409    /// First included log day.
4410    pub start_date: Option<chrono::NaiveDate>,
4411    /// Last included log day.
4412    pub end_date: Option<chrono::NaiveDate>,
4413    /// Background execution statuses.
4414    /// Allowed values: `CANCELED`, `DONE`, `ERROR`, `IN_PROGRESS`, `QUEUED`.
4415    pub statuses: Option<Vec<String>>,
4416    /// Filter by dry-run mode.
4417    pub is_dry_run: Option<bool>,
4418}
4419
4420impl GetSyncExecutionsQuery {
4421    pub(crate) fn to_query(&self) -> Query {
4422        let mut q = Query::new();
4423        self.limit.push_query("limit", &mut q);
4424        self.es_ids.push_query("es_ids[]", &mut q);
4425        self.job_ids.push_query("job_ids[]", &mut q);
4426        self.start_date.push_query("start_date", &mut q);
4427        self.end_date.push_query("end_date", &mut q);
4428        self.statuses.push_query("statuses[]", &mut q);
4429        self.is_dry_run.push_query("is_dry_run", &mut q);
4430        q
4431    }
4432}
4433
4434/// Query parameters for `GET /sync/jobconfigs`.
4435#[derive(Debug, Clone, Default)]
4436pub struct GetSyncJobconfigsQuery {
4437    /// Restrict to these external connection IDs.
4438    pub external_system_ids: Option<Vec<i64>>,
4439}
4440
4441impl GetSyncJobconfigsQuery {
4442    pub(crate) fn to_query(&self) -> Query {
4443        let mut q = Query::new();
4444        self.external_system_ids.push_query("external_system_ids[]", &mut q);
4445        q
4446    }
4447}
4448
4449/// Query parameters for `GET /sync/logs`.
4450#[derive(Debug, Clone, Default)]
4451pub struct GetSyncLogsQuery {
4452    /// Number of results per page.
4453    pub limit: Option<i64>,
4454    /// Filter by external connection IDs.
4455    pub es_ids: Option<Vec<i64>>,
4456    /// Filter by job configuration IDs.
4457    pub job_ids: Option<Vec<i64>>,
4458    /// Filter by background execution IDs.
4459    pub execution_ids: Option<Vec<String>>,
4460    /// First included log day.
4461    pub start_date: Option<chrono::NaiveDate>,
4462    /// Last included log day.
4463    pub end_date: Option<chrono::NaiveDate>,
4464    /// Operation types.
4465    /// Allowed values: `create`, `delete`, `execution`, `link`, `update`.
4466    pub types: Option<Vec<String>>,
4467    /// Log severities.
4468    /// Allowed values: `alert`, `critical`, `debug`, `emergency`, `error`, `info`, `notice`, `warning`.
4469    pub levels: Option<Vec<String>>,
4470    /// Substring search in rendered log messages.
4471    pub query: Option<String>,
4472    /// Select dry-run or actual-execution logs.
4473    pub is_dry_run: Option<bool>,
4474}
4475
4476impl GetSyncLogsQuery {
4477    pub(crate) fn to_query(&self) -> Query {
4478        let mut q = Query::new();
4479        self.limit.push_query("limit", &mut q);
4480        self.es_ids.push_query("es_ids[]", &mut q);
4481        self.job_ids.push_query("job_ids[]", &mut q);
4482        self.execution_ids.push_query("execution_ids[]", &mut q);
4483        self.start_date.push_query("start_date", &mut q);
4484        self.end_date.push_query("end_date", &mut q);
4485        self.types.push_query("types[]", &mut q);
4486        self.levels.push_query("levels[]", &mut q);
4487        self.query.push_query("query", &mut q);
4488        self.is_dry_run.push_query("is_dry_run", &mut q);
4489        q
4490    }
4491}
4492
4493/// Query parameters for `DELETE /sync/adapters/{id}`.
4494#[derive(Debug, Clone, Default)]
4495pub struct DeleteSyncAdaptersIdQuery {
4496    /// Return a deletion report without deleting.
4497    pub dry_run: Option<bool>,
4498}
4499
4500impl DeleteSyncAdaptersIdQuery {
4501    pub(crate) fn to_query(&self) -> Query {
4502        let mut q = Query::new();
4503        self.dry_run.push_query("dry_run", &mut q);
4504        q
4505    }
4506}
4507
4508/// Query parameters for `GET /sync/conflicts`.
4509#[derive(Debug, Clone, Default)]
4510pub struct GetSyncConflictsQuery {
4511    /// Number of results per page.
4512    pub limit: Option<i64>,
4513    /// Conflict categories.
4514    /// Allowed values: `create`, `delete_or_create`, `duplicate_in_CT`, `duplicate_in_source`, `link_and_update`, `update`.
4515    pub types: Option<Vec<String>>,
4516    /// Domains of linked entity mappings.
4517    /// Allowed values: `account`, `account_class`, `account_group`, `account_type`, `accounting_period`, `agenda`, `agenda_item`, `appointment`, `appointment_image`, `appointment_occurrence`, `appointment_template_image`, `attachments`, `avatar`, `booking`, `bulkletter_template`, `client`, `cost_center`, `custom_module`, `donation_attachment_template`, `donation_cover_letter_template`, `eubp_attachment`, `eubp_submission`, `event`, `eventchat`, `familyavatar`, `file`, `finance_template`, `follow_up`, `further_link`, `group`, ….
4518    pub domain_types: Option<Vec<String>>,
4519    /// External connection IDs of linked entity mappings.
4520    pub source_ids: Option<Vec<i64>>,
4521}
4522
4523impl GetSyncConflictsQuery {
4524    pub(crate) fn to_query(&self) -> Query {
4525        let mut q = Query::new();
4526        self.limit.push_query("limit", &mut q);
4527        self.types.push_query("types[]", &mut q);
4528        self.domain_types.push_query("domain_types[]", &mut q);
4529        self.source_ids.push_query("source_ids[]", &mut q);
4530        q
4531    }
4532}
4533
4534/// Query parameters for `GET /sync/entitymappings`.
4535#[derive(Debug, Clone, Default)]
4536pub struct GetSyncEntitymappingsQuery {
4537    /// Number of results per page.
4538    pub limit: Option<i64>,
4539    /// Restrict to these ChurchTools domains.
4540    /// Allowed values: `account`, `account_class`, `account_group`, `account_type`, `accounting_period`, `agenda`, `agenda_item`, `appointment`, `appointment_image`, `appointment_occurrence`, `appointment_template_image`, `attachments`, `avatar`, `booking`, `bulkletter_template`, `client`, `cost_center`, `custom_module`, `donation_attachment_template`, `donation_cover_letter_template`, `eubp_attachment`, `eubp_submission`, `event`, `eventchat`, `familyavatar`, `file`, `finance_template`, `follow_up`, `further_link`, `group`, ….
4541    pub domain_type: Option<Vec<String>>,
4542    /// Filter ChurchTools record IDs, represented as strings.
4543    pub domain_id: Option<Vec<String>>,
4544    /// Filter external record IDs.
4545    pub source_entity_id: Option<Vec<String>>,
4546    /// External connection ID as a string.
4547    pub source_id: Option<String>,
4548    /// Adapter-specific context key.
4549    pub scope: Option<String>,
4550}
4551
4552impl GetSyncEntitymappingsQuery {
4553    pub(crate) fn to_query(&self) -> Query {
4554        let mut q = Query::new();
4555        self.limit.push_query("limit", &mut q);
4556        self.domain_type.push_query("domain_type[]", &mut q);
4557        self.domain_id.push_query("domain_id[]", &mut q);
4558        self.source_entity_id.push_query("source_entity_id[]", &mut q);
4559        self.source_id.push_query("source_id", &mut q);
4560        self.scope.push_query("scope", &mut q);
4561        q
4562    }
4563}
4564
4565/// Query parameters for `GET /translations`.
4566#[derive(Debug, Clone, Default)]
4567pub struct GetTranslationsQuery {
4568    /// Filter if church has updated this translation by themselves.
4569    pub updated_by_church: Option<bool>,
4570    /// Filter if translation has to be checked.
4571    pub needs_check: Option<bool>,
4572}
4573
4574impl GetTranslationsQuery {
4575    pub(crate) fn to_query(&self) -> Query {
4576        let mut q = Query::new();
4577        self.updated_by_church.push_query("updated_by_church", &mut q);
4578        self.needs_check.push_query("needs_check", &mut q);
4579        q
4580    }
4581}
4582
4583/// Query parameters for `GET /translations/keysbytext`.
4584#[derive(Debug, Clone, Default)]
4585pub struct GetTranslationsKeysbytextQuery {
4586    /// Translated text string
4587    pub query: Option<String>,
4588}
4589
4590impl GetTranslationsKeysbytextQuery {
4591    pub(crate) fn to_query(&self) -> Query {
4592        let mut q = Query::new();
4593        self.query.push_query("query", &mut q);
4594        q
4595    }
4596}
4597
4598/// Query parameters for `GET /website/data`.
4599#[derive(Debug, Clone, Default)]
4600pub struct GetWebsiteDataQuery {
4601    /// Include additional information
4602    /// Allowed values: `domainData`.
4603    pub include: Option<Vec<String>>,
4604}
4605
4606impl GetWebsiteDataQuery {
4607    pub(crate) fn to_query(&self) -> Query {
4608        let mut q = Query::new();
4609        self.include.push_query("include[]", &mut q);
4610        q
4611    }
4612}
4613
4614/// Query parameters for `GET /whoami`.
4615#[derive(Debug, Clone, Default)]
4616pub struct GetWhoamiQuery {
4617    /// If set to `true` the route will return 401 Unauthorized if the user is not logged in.
4618    pub only_allow_authenticated: Option<bool>,
4619}
4620
4621impl GetWhoamiQuery {
4622    pub(crate) fn to_query(&self) -> Query {
4623        let mut q = Query::new();
4624        self.only_allow_authenticated.push_query("only_allow_authenticated", &mut q);
4625        q
4626    }
4627}
4628
4629/// Query parameters for `GET /wiki/pages`.
4630#[derive(Debug, Clone, Default)]
4631pub struct GetWikiPagesQuery {
4632    /// Maximum page size.
4633    pub limit: Option<i64>,
4634    /// Trimmed search term. SQL LIKE wildcard characters % and _ are interpreted by the backend.
4635    pub query: Option<String>,
4636    /// Wiki category IDs that should be included. If none are given, all categories the user can view are included. Categories the user is not allowed to view are silently filtered out.
4637    pub wiki_category_ids: Option<Vec<i64>>,
4638    /// Fields used to sort the result. Multiple fields are applied in the given order. If omitted while `query` is present, results are sorted by search relevance.
4639    /// Allowed values: `createdDate`, `modifiedDate`, `modifiedPerson`, `title`, `wikiCategoryId`, `wikiCategoryName`.
4640    pub order_fields: Option<Vec<String>>,
4641    /// Sort directions matching `order_fields[]` by position. Missing directions default to `ASC`.
4642    /// Allowed values: `ASC`, `DESC`.
4643    pub order_directions: Option<Vec<String>>,
4644    /// text returns Markdown or sanitized HTML; preview returns a raw stored-text prefix without HTML sanitization.
4645    /// Allowed values: `preview`, `text`.
4646    pub include: Option<Vec<String>>,
4647    /// Maximum number of characters returned in `textPreview` when `include[]=preview` is requested. Ignored without `include[]=preview`.
4648    pub preview_length: Option<i64>,
4649}
4650
4651impl GetWikiPagesQuery {
4652    pub(crate) fn to_query(&self) -> Query {
4653        let mut q = Query::new();
4654        self.limit.push_query("limit", &mut q);
4655        self.query.push_query("query", &mut q);
4656        self.wiki_category_ids.push_query("wiki_category_ids[]", &mut q);
4657        self.order_fields.push_query("order_fields[]", &mut q);
4658        self.order_directions.push_query("order_directions[]", &mut q);
4659        self.include.push_query("include[]", &mut q);
4660        self.preview_length.push_query("preview_length", &mut q);
4661        q
4662    }
4663}
4664
4665/// Query parameters for `GET /wiki/search`.
4666#[derive(Debug, Clone, Default)]
4667pub struct GetWikiSearchQuery {
4668    /// Search term. Must contain at least one character.
4669    pub query: Option<String>,
4670    /// Wiki categories that should be searched. If none are given, all categories the user can view are searched. Categories the user is not allowed to view are silently filtered out.
4671    pub wiki_category_ids: Option<Vec<i64>>,
4672}
4673
4674impl GetWikiSearchQuery {
4675    pub(crate) fn to_query(&self) -> Query {
4676        let mut q = Query::new();
4677        self.query.push_query("query", &mut q);
4678        self.wiki_category_ids.push_query("wiki_category_ids[]", &mut q);
4679        q
4680    }
4681}
4682
4683/// Query parameters for `GET /wiki/categories/{wikiCategoryId}/pages/{identifier}`.
4684#[derive(Debug, Clone, Default)]
4685pub struct GetWikiCategoriesIdPagesIdentifierQuery {
4686    /// Revision number; omission or 0 selects the latest revision. A nonexistent nonzero revision returns 404.
4687    pub version: Option<i64>,
4688}
4689
4690impl GetWikiCategoriesIdPagesIdentifierQuery {
4691    pub(crate) fn to_query(&self) -> Query {
4692        let mut q = Query::new();
4693        self.version.push_query("version", &mut q);
4694        q
4695    }
4696}