style(frontend): apply ultracite 7.12 formatting and lint rules
This commit is contained in:
1 parent
fc4758aa0b
commit
c8e5cff871
109 files changed
+845
-817
No files matched your search
@@ -49,8 +49,8 @@ export function listAccounts(): Promise<Account[]> {
|
||||
|
||||
export function startLogin(phone: string): Promise<LoginState> {
|
||||
return request<LoginState>("/accounts/login", {
|
||||
method: "POST",
|
||||
body: { phone },
|
||||
method: "POST",
|
||||
});
|
||||
}
|
||||
|
||||
@@ -67,8 +67,8 @@ export function submitLoginCode(
|
||||
code: string
|
||||
): Promise<LoginState> {
|
||||
return request<LoginState>(`/accounts/login/${loginId}/code`, {
|
||||
method: "POST",
|
||||
body: { code },
|
||||
method: "POST",
|
||||
});
|
||||
}
|
||||
|
||||
@@ -77,8 +77,8 @@ export function submitLoginPassword(
|
||||
password: string
|
||||
): Promise<LoginState> {
|
||||
return request<LoginState>(`/accounts/login/${loginId}/password`, {
|
||||
method: "POST",
|
||||
body: { password },
|
||||
method: "POST",
|
||||
});
|
||||
}
|
||||
|
||||
@@ -91,8 +91,8 @@ export function renameAccountDevice(
|
||||
deviceModel: string
|
||||
): Promise<Account> {
|
||||
return request<Account>(`/accounts/${accountId}/device`, {
|
||||
method: "PATCH",
|
||||
body: { device_model: deviceModel },
|
||||
method: "PATCH",
|
||||
});
|
||||
}
|
||||
|
||||
@@ -123,8 +123,8 @@ export function listPolicies(): Promise<PolicyRecord[]> {
|
||||
|
||||
export function createPolicy(body: PolicyCreate): Promise<PolicyRecord> {
|
||||
return request<PolicyRecord>("/policy", {
|
||||
method: "POST",
|
||||
body: { ...body, account_id: accounts.selectedId },
|
||||
method: "POST",
|
||||
});
|
||||
}
|
||||
|
||||
@@ -133,9 +133,9 @@ export function updatePolicy(
|
||||
toggles: CaptureToggles
|
||||
): Promise<PolicyRecord> {
|
||||
return request<PolicyRecord>(`/policy/${id}`, {
|
||||
method: "PUT",
|
||||
account: true,
|
||||
body: toggles,
|
||||
method: "PUT",
|
||||
});
|
||||
}
|
||||
|
||||
@@ -353,8 +353,8 @@ export function getChatsBatch(ids: number[]): Promise<Chat[]> {
|
||||
|
||||
export function enrichChat(chatId: number): Promise<{ job_id: number }> {
|
||||
return request<{ job_id: number }>(`/chats/${chatId}/enrich`, {
|
||||
method: "POST",
|
||||
body: { account_id: accounts.selectedId },
|
||||
method: "POST",
|
||||
});
|
||||
}
|
||||
|
||||
@@ -379,8 +379,8 @@ export function enqueueBackfill(
|
||||
full = false
|
||||
): Promise<{ job_id: number }> {
|
||||
return request<{ job_id: number }>("/backfill", {
|
||||
body: { account_id: accounts.selectedId, chat_id: chatId, full, media },
|
||||
method: "POST",
|
||||
body: { account_id: accounts.selectedId, chat_id: chatId, media, full },
|
||||
});
|
||||
}
|
||||
|
||||
@@ -388,8 +388,8 @@ export function enqueueStoriesBackfill(
|
||||
peerId: number
|
||||
): Promise<{ job_id: number }> {
|
||||
return request<{ job_id: number }>("/stories/backfill", {
|
||||
method: "POST",
|
||||
body: { account_id: accounts.selectedId, peer_id: peerId },
|
||||
method: "POST",
|
||||
});
|
||||
}
|
||||
|
||||
@@ -412,22 +412,22 @@ export function trackChat(
|
||||
backfill = true
|
||||
): Promise<DiscoverItem> {
|
||||
return request<DiscoverItem>(`/chats/${chatId}/track`, {
|
||||
method: "POST",
|
||||
body: { account_id: accounts.selectedId, backfill },
|
||||
method: "POST",
|
||||
});
|
||||
}
|
||||
|
||||
export function syncContacts(): Promise<{ job_id: number }> {
|
||||
return request<{ job_id: number }>("/contacts/sync", {
|
||||
method: "POST",
|
||||
body: { account_id: accounts.selectedId },
|
||||
method: "POST",
|
||||
});
|
||||
}
|
||||
|
||||
export function syncDialogs(): Promise<{ job_id: number }> {
|
||||
return request<{ job_id: number }>("/dialogs/sync", {
|
||||
method: "POST",
|
||||
body: { account_id: accounts.selectedId },
|
||||
method: "POST",
|
||||
});
|
||||
}
|
||||
|
||||
@@ -468,12 +468,12 @@ export function fetchMedia(
|
||||
messageId: number
|
||||
): Promise<{ job_id: number }> {
|
||||
return request<{ job_id: number }>("/media/fetch", {
|
||||
method: "POST",
|
||||
body: {
|
||||
account_id: accounts.selectedId,
|
||||
chat_id: chatId,
|
||||
message_id: messageId,
|
||||
},
|
||||
method: "POST",
|
||||
});
|
||||
}
|
||||
|
||||
@@ -482,12 +482,12 @@ export function transcribeMedia(
|
||||
messageId: number
|
||||
): Promise<{ job_id: number }> {
|
||||
return request<{ job_id: number }>("/media/transcribe", {
|
||||
method: "POST",
|
||||
body: {
|
||||
account_id: accounts.selectedId,
|
||||
chat_id: chatId,
|
||||
message_id: messageId,
|
||||
},
|
||||
method: "POST",
|
||||
});
|
||||
}
|
||||
|
||||
@@ -501,8 +501,8 @@ export function createWatch(
|
||||
enabled: boolean
|
||||
): Promise<Watch> {
|
||||
return request<Watch>("/watches", {
|
||||
body: { account_id: accounts.selectedId, enabled, kind, params },
|
||||
method: "POST",
|
||||
body: { account_id: accounts.selectedId, kind, params, enabled },
|
||||
});
|
||||
}
|
||||
|
||||
@@ -512,8 +512,8 @@ export function updateWatch(
|
||||
enabled: boolean
|
||||
): Promise<Watch> {
|
||||
return request<Watch>(`/watches/${id}`, {
|
||||
body: { enabled, params },
|
||||
method: "PUT",
|
||||
body: { params, enabled },
|
||||
});
|
||||
}
|
||||
|
||||
@@ -546,13 +546,13 @@ export function createAnnotation(
|
||||
text: string
|
||||
): Promise<Annotation> {
|
||||
return request<Annotation>("/annotations", {
|
||||
method: "POST",
|
||||
body: {
|
||||
account_id: accounts.selectedId,
|
||||
chat_id: chatId,
|
||||
message_id: messageId,
|
||||
text,
|
||||
},
|
||||
method: "POST",
|
||||
});
|
||||
}
|
||||
|
||||
@@ -561,8 +561,8 @@ export function updateAnnotation(
|
||||
text: string
|
||||
): Promise<Annotation> {
|
||||
return request<Annotation>(`/annotations/${id}`, {
|
||||
method: "PUT",
|
||||
body: { text },
|
||||
method: "PUT",
|
||||
});
|
||||
}
|
||||
|
||||
@@ -575,7 +575,7 @@ export function listWatchedBots(): Promise<WatchedBot[]> {
|
||||
}
|
||||
|
||||
export function addWatchedBot(token: string): Promise<WatchedBot> {
|
||||
return request<WatchedBot>("/bots", { method: "POST", body: { token } });
|
||||
return request<WatchedBot>("/bots", { body: { token }, method: "POST" });
|
||||
}
|
||||
|
||||
export function removeWatchedBot(botId: number): Promise<void> {
|
||||
|
||||
Reference in new issue
Block a user