Removed no longer used dependencies

This commit is contained in:
Alejandro Celaya
2020-09-05 08:57:50 +02:00
parent d4094e66b3
commit 3cec2efbbd
5 changed files with 6 additions and 53 deletions

View File

@@ -2,7 +2,7 @@ import qs from 'qs';
import { isEmpty, isNil, reject } from 'ramda';
import { AxiosInstance, AxiosResponse, Method } from 'axios';
import { ShortUrlsListParams } from '../../short-urls/reducers/shortUrlsListParams';
import { ShortUrl } from '../../short-urls/data';
import { ShortUrl, ShortUrlData } from '../../short-urls/data';
import { OptionalString } from '../utils';
import {
ShlinkHealth,
@@ -33,8 +33,8 @@ export default class ShlinkApiClient {
this.performRequest<{ shortUrls: ShlinkShortUrlsResponse }>('/short-urls', 'GET', params)
.then(({ data }) => data.shortUrls);
public readonly createShortUrl = async (options: any): Promise<ShortUrl> => { // TODO CreateShortUrl interface
const filteredOptions = reject((value) => isEmpty(value) || isNil(value), options);
public readonly createShortUrl = async (options: ShortUrlData): Promise<ShortUrl> => {
const filteredOptions = reject((value) => isEmpty(value) || isNil(value), options as any);
return this.performRequest<ShortUrl>('/short-urls', 'POST', {}, filteredOptions)
.then((resp) => resp.data);

View File

@@ -25,12 +25,12 @@ interface ShlinkTagsStats {
export interface ShlinkTags {
tags: string[];
stats?: ShlinkTagsStats[]; // TODO Is only optional in old versions
stats?: ShlinkTagsStats[]; // Is only optional in old Shlink versions
}
export interface ShlinkTagsResponse {
data: string[];
stats?: ShlinkTagsStats[]; // TODO Is only optional in old versions
stats?: ShlinkTagsStats[]; // Is only optional in old Shlink versions
}
export interface ShlinkPaginator {
@@ -40,7 +40,7 @@ export interface ShlinkPaginator {
export interface ShlinkVisits {
data: Visit[];
pagination?: ShlinkPaginator; // TODO Is only optional in old versions
pagination?: ShlinkPaginator; // Is only optional in old Shlink versions
}
export interface ShlinkVisitsParams {