INNER CODE UNIT · TypeScript
fetchNotificationHistoryPage
argus-sight/refund-swatter-lite · supabase/functions/apple-notification-history/index.ts:16
async function fetchNotificationHistoryPage(
jwt: string,
apiBase: string,
requestBody: any,
paginationToken: string | null,
pageNumber: number,
supabase: any,
requestId: string
): Promise<{ notifications: any[], hasMore: boolean, paginationToken: string | null }> {
// Build URL with pagination token as query parameter
let url = `${apiBase}/notifications/history`
if (paginationToken) {
url += `?paginationToken=${encodeURIComponent(paginationToken)}`
}
// Request body should NOT include paginationToken
const body = requestBody