Moved some types from short-url/data to api-contract

This commit is contained in:
Alejandro Celaya
2023-08-07 10:51:08 +02:00
parent 23daa2de72
commit d97db9e17c
35 changed files with 79 additions and 79 deletions

View File

@@ -1,10 +1,11 @@
import type { ShlinkShortUrl, ShortUrlData } from '../short-urls/data';
import type { ShortUrlData } from '../short-urls/data';
import type {
ShlinkDomainRedirects,
ShlinkDomainsResponse,
ShlinkEditDomainRedirects,
ShlinkHealth,
ShlinkMercureInfo,
ShlinkShortUrl,
ShlinkShortUrlData,
ShlinkShortUrlsListParams,
ShlinkShortUrlsResponse,

View File

@@ -1,7 +1,36 @@
import type { Order } from '@shlinkio/shlink-frontend-kit';
import type { ShlinkDeviceLongUrls, ShlinkShortUrl } from '../short-urls/data';
import type { Nullable, OptionalString } from '../utils/helpers';
import type { Visit } from '../visits/types';
export interface ShlinkDeviceLongUrls {
android?: OptionalString;
ios?: OptionalString;
desktop?: OptionalString;
}
export interface ShlinkShortUrlMeta {
validSince?: string;
validUntil?: string;
maxVisits?: number;
}
export interface ShlinkShortUrl {
shortCode: string;
shortUrl: string;
longUrl: string;
deviceLongUrls?: Required<ShlinkDeviceLongUrls>, // Optional only before Shlink 3.5.0
dateCreated: string;
/** @deprecated */
visitsCount: number; // Deprecated since Shlink 3.4.0
visitsSummary?: ShlinkVisitsSummary; // Optional only before Shlink 3.4.0
meta: Required<Nullable<ShlinkShortUrlMeta>>;
tags: string[];
domain: string | null;
title?: string | null;
crawlable?: boolean;
forwardQuery?: boolean;
}
export interface ShlinkShortUrlsResponse {
data: ShlinkShortUrl[];
pagination: ShlinkPaginator;