Expand description
Secret-free request builders for Gingr endpoints used as source evidence.
Endpoint structs describe provider requests without performing network I/O. Callers can inspect the path and parameters, attach source provenance, and only then hand the request to transport code with credentials.
use gingr::endpoint::{Date, DateRange, LocationId, Request, Reservations};
let range = DateRange::new(Date::parse("2026-06-18")?, Date::parse("2026-06-19")?)?;
let request = Reservations::for_range(range)
.location(LocationId::new(170))
.build();
let parts = request.request_parts();
assert_eq!(parts.path(), "/api/v1/reservations");
assert!(parts.form_pairs().iter().any(|(key, value)| {
key == "location_id" && value == "170"
}));
assert!(parts.form_pairs().iter().any(|(key, value)| {
key == "start_date" && value == "2026-06-18"
}));Re-exports§
pub use reservations::Reservations;
Modules§
- catalog
- Catalog request documentation for service surfaces whose DTOs are still provider gaps.
- commerce_
retail - Retail and commerce requests used to collect inventory, package, transaction, and invoice evidence.
- labor_
ops - Labor-operation requests used to collect timeclock evidence for manager review.
- owners_
animals - Owner and animal requests used to collect customer, pet, form, and care-info evidence.
- reference_
data - Reference-data requests for locations, veterinarians, immunization labels, and related lookups.
- report_
cards_ files - Report-card file requests used to retrieve provider documents for later review.
- reservations
- Reservation requests used to collect occupancy, check-in, and service-demand evidence.
Structs§
- Animal
Id - Newtype identifier shared by Gingr endpoints that pass numeric provider IDs.
- Date
- Gingr endpoint date formatted as
YYYY-MM-DDfor provider query/form parameters. - Date
Range - Inclusive Gingr date window, capped at the request range this crate explicitly validates.
- FormId
- Newtype identifier shared by Gingr endpoints that pass numeric provider IDs.
- IsoDate
- Gingr ISO-style date filter formatted as
YYYY-MM-DDwhere endpoints use nested params. - Limit
- Positive provider record limit used to bound Gingr list/search responses.
- Location
Id - Newtype identifier shared by Gingr endpoints that pass numeric provider IDs.
- OwnerId
- Newtype identifier shared by Gingr endpoints that pass numeric provider IDs.
- Path
- Static Gingr API path emitted by an endpoint descriptor.
- Reference
Id - Newtype identifier shared by Gingr endpoints that pass numeric provider IDs.
- Reservation
Id - Newtype identifier shared by Gingr endpoints that pass numeric provider IDs.
- Species
Id - Newtype identifier shared by Gingr endpoints that pass numeric provider IDs.
Enums§
- Error
- Errors raised when Gingr request inputs cannot be represented as safe endpoint parameters.
- Method
- HTTP methods used by typed Gingr endpoint descriptors.
Traits§
- Request
- Defines the behavior required from a request participant in the endpoint workflow.
Type Aliases§
- Result
- Result type returned by fallible endpoint operations.