mattermost-mobile/types/api/client.d.ts
Elias Nahum fb57c423c7
Network metrics (#8390)
* Network metrics

* update network-client ref

* fix unit tests

* missing catch error parsing

* add client tracking unit tests

* fix typos
2024-12-17 19:51:26 +08:00

28 lines
832 B
TypeScript

// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.
type logLevel = 'ERROR' | 'WARNING' | 'INFO';
type ClientOptions = {
body?: any;
method?: string;
noRetry?: boolean;
timeoutInterval?: number;
headers?: Record<string, any>;
groupLabel?: string;
};
type ClientErrorIntl =
{defaultMessage?: string; id: string; values?: Record<string, any>} |
{defaultMessage?: string; id: string; values?: Record<string, any>} |
{id: string; defaultMessage?: string; values?: Record<string, any>} |
{id: string; defaultMessage?: string; values?: Record<string, any>};
interface ClientErrorProps {
details?: unknown;
intl?: ClientErrorIntl;
url: string;
server_error_id?: string;
status_code?: number;
message: string;
}