mattermost-mobile/types/api/client.d.ts
Felipe Martin 432cfb08fe
feat: show pre-auth secret error on field on server create (#9102)
* feat: show potential pre-auth secret error on server create

* chroe: address comments

* chore: updated message

* feat: read response header to check error source

* fix: i18n

* chore: rename pre-auth to just auth
2025-09-17 08:04:28 +02:00

32 lines
1.1 KiB
TypeScript

// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.
type logLevel = 'ERROR' | 'WARNING' | 'INFO';
type BaseRequestGroupLabel = 'Login' | 'Cold Start' | 'Notification' | 'DeepLink' | 'WebSocket Reconnect' | 'Server Switch';
type RequestGroupLabel = BaseRequestGroupLabel | `${BaseRequestGroupLabel} Deferred`;
type ClientOptions = {
body?: any;
method?: string;
noRetry?: boolean;
timeoutInterval?: number;
headers?: Record<string, any>;
groupLabel?: RequestGroupLabel;
};
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;
headers?: Record<string, string>;
message: string;
}