denwa-react-shared 1.0.2 → 1.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -12,12 +12,12 @@ interface LoadSession {
|
|
|
12
12
|
domain: string;
|
|
13
13
|
ROLE_PRIORITY: Record<string, number>;
|
|
14
14
|
navigate: UseNavigateResult<string>;
|
|
15
|
-
refresh: () => {
|
|
15
|
+
refresh: () => Promise<{
|
|
16
16
|
status: number;
|
|
17
17
|
data: {
|
|
18
18
|
data: Session;
|
|
19
19
|
};
|
|
20
|
-
}
|
|
20
|
+
}>;
|
|
21
21
|
}
|
|
22
22
|
interface SetCurrentSession {
|
|
23
23
|
domain: string;
|
|
@@ -58,3 +58,24 @@ export declare const prepareImagesToSubmit: ({ newImages, serverImages, imagesOr
|
|
|
58
58
|
* @return {boolean}
|
|
59
59
|
*/
|
|
60
60
|
export declare const isUrl: (string: string) => boolean;
|
|
61
|
+
/**
|
|
62
|
+
* @description Форматирует номер телефона в интернациональный вид
|
|
63
|
+
* @param {string} phone - Номер телефона
|
|
64
|
+
* @return {string} Возвращает либо пустую строку, либо отформатированный номер телефона
|
|
65
|
+
* @example
|
|
66
|
+
* const phone = formatPhone(+7 988 505 42 19)
|
|
67
|
+
* phone === "+7 988 505 42 19"
|
|
68
|
+
*/
|
|
69
|
+
export declare const formatPhoneToInternational: (phone: string) => string;
|
|
70
|
+
/**
|
|
71
|
+
* @description Формирует label из имени, телефона и почты
|
|
72
|
+
* @param {object} object - Объект с данными
|
|
73
|
+
* @param {string} object.fullName - ФИО
|
|
74
|
+
* @param {string} object.phone - Телефон
|
|
75
|
+
* @param {string} object.email - Email
|
|
76
|
+
*/
|
|
77
|
+
export declare const createProfileLabel: ({ fullName, phone, email, }: {
|
|
78
|
+
fullName?: string | null;
|
|
79
|
+
phone?: string | null;
|
|
80
|
+
email?: string | null;
|
|
81
|
+
}) => string;
|