KI-AGENT: Mobile Push Registrierung anbinden
This commit is contained in:
@@ -150,6 +150,21 @@ export type PrintLabelResponse = {
|
||||
base64?: string;
|
||||
};
|
||||
|
||||
export type MobilePushRegistrationInput = {
|
||||
localDeviceId: string;
|
||||
platform: 'ios' | 'android';
|
||||
providerToken: string;
|
||||
deviceLabel?: string | null;
|
||||
meta?: Record<string, unknown>;
|
||||
};
|
||||
|
||||
export type MobilePushRegistrationResponse = {
|
||||
success: boolean;
|
||||
id?: string;
|
||||
centralDeviceId?: string;
|
||||
status?: string;
|
||||
};
|
||||
|
||||
export type WikiTreeItem = {
|
||||
id: string;
|
||||
parentId?: string | null;
|
||||
@@ -582,6 +597,24 @@ export async function fetchMe(token: string): Promise<MeResponse> {
|
||||
});
|
||||
}
|
||||
|
||||
export async function registerMobilePushDevice(
|
||||
token: string,
|
||||
payload: MobilePushRegistrationInput
|
||||
): Promise<MobilePushRegistrationResponse> {
|
||||
return apiRequest<MobilePushRegistrationResponse>('/api/notifications/push/mobile/register', {
|
||||
method: 'POST',
|
||||
token,
|
||||
body: payload,
|
||||
});
|
||||
}
|
||||
|
||||
export async function sendMobileTestPush(token: string): Promise<{ accepted: number; rejected: number; deliveryJobId: string }> {
|
||||
return apiRequest<{ accepted: number; rejected: number; deliveryJobId: string }>('/api/notifications/test-mobile-push', {
|
||||
method: 'POST',
|
||||
token,
|
||||
});
|
||||
}
|
||||
|
||||
export async function switchTenantRequest(tenantId: number, token: string): Promise<string> {
|
||||
const payload = await apiRequest<{ token?: string }>('/api/tenant/switch', {
|
||||
method: 'POST',
|
||||
|
||||
Reference in New Issue
Block a user