Return a wrong type getEventDataEvents: object instead of object[]

Open Beginner friendly
#11 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
1/5
Estimated time
Under an hour
Newbie friendliness
68/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Stale
Tech stack
typescript
Domain
api

Research direction

Start at the TypeScript declaration for getEventDataEvents(websiteId, params) and inspect its current ApiResponse type. Confirm that the event result is an array, then update the return type to ApiResponse<Umami.WebsiteEventData[]> and verify the declaration compiles.

Written by the indexing model from the issue text.

Description

Hi,
thank you for your work.
I think the types on getEventDataEvents should get Umami.WebsiteEventData[]
instead of Umami.WebsiteEventData to return a right type?

getEventDataEvents(websiteId: string, params: { startAt: number; endAt: number; event?: string; }): Promise<ApiResponse<Umami.WebsiteEventData[]>>;

Dominant language
TypeScript
Stars
47
Forks
18
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from umami-software/api-client

All issues in umami-software/api-client

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.