Back
Version 9
1/13/2025
import { sqlite } from "https://esm.town/v/stevekrouse/sqlite";
// Monday.com API configuration
const MONDAY_API_URL = 'https://api.monday.com/v2';
const MONDAY_API_TOKEN = Deno.env.get('MONDAY_API_TOKEN');
// Type for Monday.com board item
interface MondayBoardItem {
id: string;
name: string;
column_values: Array<{
id: string;
text: string;
value: string;
}>;
}
/**
* Fetch domains from Monday.com board with a specific status
* @param boardId - The ID of the Monday.com board
* @param statusColumnId - The column ID for the status field
* @param requiredStatus - The status value to filter by
* @returns Array of domain URLs
*/
export async function fetchDomainsFromMonday(
boardId: string,
statusColumnId: string,
requiredStatus: string
): Promise<string[]> {
if (!MONDAY_API_TOKEN) {
throw new Error('Monday.com API token is not configured');
}
const query = `
query {
boards(ids: [${boardId}]) {
Updated: January 13, 2025