mirror of
https://github.com/shlinkio/shlink-web-client.git
synced 2026-03-10 09:33:51 +00:00
Migrated ShlinkApiClientBuilder to TS
This commit is contained in:
@@ -4,7 +4,7 @@ export interface ServerData {
|
||||
apiKey: string;
|
||||
}
|
||||
|
||||
export interface ServerWithId {
|
||||
export interface ServerWithId extends ServerData {
|
||||
id: string;
|
||||
}
|
||||
|
||||
@@ -24,3 +24,6 @@ export interface NotFoundServer {
|
||||
export type RegularServer = ReachableServer | NonReachableServer;
|
||||
|
||||
export type SelectedServer = RegularServer | NotFoundServer | null;
|
||||
|
||||
export const hasServerData = (server: ServerData | NotFoundServer | null): server is ServerData =>
|
||||
!!(server as ServerData)?.url && !!(server as ServerData)?.apiKey;
|
||||
|
||||
@@ -4,8 +4,9 @@ import { resetShortUrlParams } from '../../short-urls/reducers/shortUrlsListPara
|
||||
import { versionToPrintable, versionToSemVer as toSemVer } from '../../utils/helpers/version';
|
||||
import { SelectedServer } from '../data';
|
||||
import { GetState } from '../../container/types';
|
||||
import { ShlinkApiClientBuilder, ShlinkHealth } from '../../utils/services/types';
|
||||
import { ShlinkHealth } from '../../utils/services/types';
|
||||
import { buildActionCreator, buildReducer } from '../../utils/helpers/redux';
|
||||
import { ShlinkApiClientBuilder } from '../../utils/services/ShlinkApiClientBuilder';
|
||||
|
||||
/* eslint-disable padding-line-between-statements */
|
||||
export const SELECT_SERVER = 'shlink/selectedServer/SELECT_SERVER';
|
||||
|
||||
Reference in New Issue
Block a user