My proposal is for the API to communicate dates in UTC format.
If a one of /documents is PATCHed with issueDate: "2024-01-01" this means it was issued in any timestamp:
after 2024-01-01T00:00:00.000Z
before 2024-01-02T00:00:00.000Z
where these two are UTC dates (Z means english Grwch time)
This PR is still missing 2 key aspects:
the issueDate when present is currently in the response as an ISO date (we want UTC)
in the GET /documents with and without :id the links field is still missing (links can be retrieved from the /document/:id/links subcollection in the meantime though
This was not finished because I haven't yet decided where to define the transition from a Document object in memory to a response body. Some suitable options are:
define a toResponseBody method in the Document class
doing this operation in the route handlers
The first option forces document.ts to import link.ts
My proposal is for the API to communicate dates in UTC format. If a one of /documents is PATCHed with issueDate: "2024-01-01" this means it was issued in any timestamp:
after 2024-01-01T00:00:00.000Z before 2024-01-02T00:00:00.000Z where these two are UTC dates (Z means english Grwch time)
This PR is still missing 2 key aspects:
This was not finished because I haven't yet decided where to define the transition from a Document object in memory to a response body. Some suitable options are:
I am open to suggestions on how to proceed