The "date" property on returned invoices has a TypeScript type of "string" but is in fact a "Date"
Évaluation
- Difficulté
- 3/5
- Temps estimé
- 1-2 jours
- Accessibilité débutants
- 18/100
- Type d'issue
- Bug
- Clarté
- Plutôt claire
- Activité
- À l'abandon
- Stack technique
- nodejs, openapi, typescript
- Domaine
- api
Piste de recherche
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.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
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
- Langage dominant
- TypeScript
- Étoiles
- 264
- Forks
- 177
- Merge moyen
- 10 h 5 min
- PR mergées (30 j)
- 5
Préparer son environnement
- Aucun Dockerfile ni fichier Docker Compose
- Aucun modèle de pull request
- Lire le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de XeroAPI/xero-node
-
`getClientCredentialsToken()` sends `scopes` (comma-joined) instead of the OAuth `scope` parameterOuverte
Difficulté 2/5 1-3 heures Accessibilité débutants 82/100
-
Difficulté 3/5 Une demi-journée Accessibilité débutants 55/100
-
TrackingOptionId value missing from accountingApi.getInvoices()Peut-être pris @miachillgood l’a pris il y a 152 jours. Ouverte
Difficulté 3/5 1-2 jours Accessibilité débutants 18/100
-
BankTransaction type is missing the batchPayment object.Peut-être pris @miachillgood l’a pris il y a 171 jours. Ouverte
Difficulté 3/5 1-2 jours Accessibilité débutants 22/100
-
Difficulté 3/5 1-2 jours Accessibilité débutants 25/100
Toutes les issues de XeroAPI/xero-node
Issues similaires
-
Difficulté 2/5 1-3 heures Accessibilité débutants 68/100
super-productivity/super-productivity#12128 · 2 commentaires ·
Les mainteneurs répondent en général sous 1 jour
-
A docs change can fail pnpm check, because outreach lint and gen:types both write .astro/ at oncePeut-être pris @2389400626lh-ops l’a pris aujourd’hui. OuverteArea: Infrastructure Area: Outreach Bug Difficulty: Low Good First Issue Priority: Low
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
DouglasNeuroInformatics/OpenDataCapture#1956 ·
Les mainteneurs répondent en général sous 1 jour
-
enhancement
Difficulté 2/5 1-3 heures Accessibilité débutants 77/100
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 1/5 1-3 heures Accessibilité débutants 72/100
justyns/silverbullet-ai#199 ·
-
bug
Difficulté 2/5 1-3 heures Accessibilité débutants 83/100
spartan-ng/spartan#1931 ·
Les mainteneurs répondent en général sous 2 jours