Skip to content

Commit

Permalink
Fix API client contract
Browse files Browse the repository at this point in the history
  • Loading branch information
acelaya committed Jan 20, 2024
1 parent b56373f commit eb4631e
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 5 deletions.
17 changes: 17 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,23 @@ All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org).

## [0.2.2] - 2024-01-20
### Added
* *Nothing*

### Changed
* *Nothing*

### Deprecated
* *Nothing*

### Removed
* *Nothing*

### Fixed
* Fix API client contract definition.


## [0.2.1] - 2024-01-20
### Added
* Export different types for short URL visits params and other visits params.
Expand Down
11 changes: 6 additions & 5 deletions src/api-contract/ShlinkApiClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import type {
ShlinkShortUrl,
ShlinkShortUrlsListParams,
ShlinkShortUrlsResponse,
ShlinkShortUrlVisitsParams,
ShlinkTags,
ShlinkVisits,
ShlinkVisitsOverview,
Expand All @@ -21,19 +22,19 @@ export type ShlinkApiClient = {

createShortUrl(options: ShlinkCreateShortUrlData): Promise<ShlinkShortUrl>;

getShortUrlVisits(shortCode: string, query?: ShlinkVisitsParams): Promise<ShlinkVisits>;
getShortUrlVisits(shortCode: string, query?: ShlinkShortUrlVisitsParams): Promise<ShlinkVisits>;

deleteShortUrlVisits(shortCode: string, domain?: string | null): Promise<ShlinkDeleteVisitsResponse>;

getTagVisits(tag: string, query?: Omit<ShlinkVisitsParams, 'domain'>): Promise<ShlinkVisits>;
getTagVisits(tag: string, query?: ShlinkVisitsParams): Promise<ShlinkVisits>;

getDomainVisits(domain: string, query?: Omit<ShlinkVisitsParams, 'domain'>): Promise<ShlinkVisits>;
getDomainVisits(domain: string, query?: ShlinkVisitsParams): Promise<ShlinkVisits>;

getOrphanVisits(query?: Omit<ShlinkVisitsParams, 'domain'>): Promise<ShlinkVisits>;
getOrphanVisits(query?: ShlinkVisitsParams): Promise<ShlinkVisits>;

deleteOrphanVisits(): Promise<ShlinkDeleteVisitsResponse>;

getNonOrphanVisits(query?: Omit<ShlinkVisitsParams, 'domain'>): Promise<ShlinkVisits>;
getNonOrphanVisits(query?: ShlinkVisitsParams): Promise<ShlinkVisits>;

getVisitsOverview(): Promise<ShlinkVisitsOverview>;

Expand Down

0 comments on commit eb4631e

Please sign in to comment.