The API manages applicant records — referred to as postulantes — stored in theDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/Manuelfg1985/Proyecto_Final_26/llms.txt
Use this file to discover all available pages before exploring further.
postulantes collection in Firebase Firestore. Each record in that collection is modelled by the User class defined in src/models/Users.js, which handles field defaults, serialization to Firestore, and deserialization back to a JavaScript object.
Fields
Every applicant record is constructed from the following fields. Required fields must be supplied in the request body when creating or updating a record; optional fields fall back to the defaults shown.On creation (POST), omit the
id field from the request body entirely — Firestore generates the document ID automatically and it is never written as a document field. See Create Applicant for the full request schema.The Firestore document ID. Auto-generated by Firestore on creation;
null inside a User instance before the record is persisted. Populated via fromFirestore() when reading an existing document.The applicant’s first name.
The applicant’s last name.
The applicant’s email address.
The applicant’s date of birth. Stored and returned as a plain string (e.g.
"1990-05-15"); no automatic date parsing is applied to this field.The applicant’s phone number (e.g.
"+54 11 1234-5678").The city where the applicant currently resides.
The province or state where the applicant currently resides.
The job position the applicant has applied for.
The date and time the application was submitted. Defaults to
new Date() at construction time when not explicitly provided. Stored as a Firestore Timestamp and converted back to a JavaScript Date on read (see Firestore deserialization below).The current status of the application. Defaults to
"pending" when not provided. See Status values for the full list of recognised values.Firestore serialization
When an applicant record is written to Firestore (e.g. viaaddDoc), the User instance calls toFirestore() to produce the plain object that is stored as the document body. The id field is intentionally excluded from this payload — Firestore manages document IDs independently and they must not be duplicated as a document field.
Firestore deserialization
When an applicant record is read back from Firestore, the staticfromFirestore(doc) method reconstructs a User instance from a Firestore DocumentSnapshot. It handles two concerns that raw doc.data() does not:
- Document ID —
doc.idis mapped to theidfield so callers always have a single, unified object. - Timestamp conversion — Firestore stores
application_dateas aTimestampobject.fromFirestorecalls.toDate()on it to return a plain JavaScriptDate, ornullif the field is absent.
fromFirestore returns null when doc.exists is false, so callers should always guard against a null return value before accessing fields on the result.Example document
The following JSON represents a complete applicant record as returned by the API after Firestore deserialization (e.g. from GET /applicants/:id):Status values
Thestatus field is a free-form string in the data model — no server-side enum validation is enforced. The following values represent the conventional workflow stages used across the API: