The "date" property on returned invoices has a TypeScript type of "string" but is in fact a "Date"
Bewertung
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Anfängerfreundlichkeit
- 18/100
- Issue-Typ
- Bug
- Klarheit
- Größtenteils klar
- Aktivitätsstatus
- Veraltet
- Tech-Stack
- nodejs, openapi, typescript
- Bereich
- api
Rechercherichtung
Start with the linked open pull request #811, since the work is already under way there, and check whether it covers date, dueDate and the payment date fields. The repository description says the SDK is generated from the Xero OpenAPI spec, so the type change probably belongs in the spec or generator rather than in hand-edited models. Done means the affected date fields are typed consistently and the maintainers have settled whether they should be string or Date. The issue has no maintainer decision yet, so confirm that before writing code.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
SDK you're using (please complete the following information):
- Version 10.0.0
Describe the bug
When making a paged request for Invoices, the "date" property on returned invoices has a TypeScript type of "string" but is in fact a "Date". I think string is preferable since there can be timezone ambiguity with Date - for example, was the date string parsed in the context of the server timezone (using standard Date() constructor) or was it parsed using Date.UTC(). Also, thee same thing seems to be happening with the "dueDate" as well as the date on payments.
To Reproduce
Steps to reproduce the behavior:
- Fetch a paged list of invoices
- See that Invoice.date is actually a date - but it should be a string
Expected behavior
The date property should be a string
- Vorherrschende Sprache
- TypeScript
- Sterne
- 264
- Forks
- 177
- Ø Merge
- 10 Std. 5 Min.
- Gemergte PRs (30 T.)
- 5
Entwicklungsumgebung
- Kein Dockerfile und keine Docker-Compose-Datei
- Keine Pull-Request-Vorlage
- Beitragsleitfaden lesen
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus XeroAPI/xero-node
-
`getClientCredentialsToken()` sends `scopes` (comma-joined) instead of the OAuth `scope` parameterOffen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 82/100
-
Schwierigkeit 3/5 Ein halber Tag Anfängerfreundlichkeit 55/100
-
TrackingOptionId value missing from accountingApi.getInvoices()Evtl. vergeben @miachillgood hat das vor 152 Tagen übernommen. Offen
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 18/100
-
BankTransaction type is missing the batchPayment object.Evtl. vergeben @miachillgood hat das vor 171 Tagen übernommen. Offen
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 22/100
-
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 25/100
Alle Issues in XeroAPI/xero-node
Ähnliche Issues
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
super-productivity/super-productivity#12128 · 2 Kommentare ·
Maintainer antworten meist innerhalb von 1 Tag
-
A docs change can fail pnpm check, because outreach lint and gen:types both write .astro/ at onceEvtl. vergeben @2389400626lh-ops hat das heute übernommen. OffenArea: Infrastructure Area: Outreach Bug Difficulty: Low Good First Issue Priority: Low
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
DouglasNeuroInformatics/OpenDataCapture#1956 ·
Maintainer antworten meist innerhalb von 1 Tag
-
enhancement
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 77/100
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 1/5 1-3 Stunden Anfängerfreundlichkeit 72/100
justyns/silverbullet-ai#199 ·
-
bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 83/100
spartan-ng/spartan#1931 ·
Maintainer antworten meist innerhalb von 2 Tagen