mattermost-redux
Version:
Common code (API client, Redux stores, logic, utility functions) for building a Mattermost client
42 lines (36 loc) • 898 B
text/typescript
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.
// I assume these are the log levels
export type LogLevel = 'ERROR' | 'WARNING' | 'INFO';
export type ClientResponse<T> = {
response: Response;
headers: Map<string, string>;
data: T;
};
type ErrorOffline = {
message: string;
url: string;
};
type ErrorInvalidResponse = {
intl: {
id: string;
defaultMessage: string;
};
};
export type ErrorApi = {
message: string;
server_error_id: string;
status_code: number;
url: string;
};
export type Client4Error = ErrorOffline | ErrorInvalidResponse | ErrorApi;
export type Options = {
headers?: { [x: string]: string };
method?: string;
url?: string;
credentials?: 'omit' | 'same-origin' | 'include';
body?: any;
};
export type StatusOK = {
status: 'OK';
};