أسماء الحقول ورموز الأخطاء وأمثلة الشيفرة بالإنجليزية، كما تستخدمها في برنامجك.
المقابلات والمواعيد
جدول مكالمة، وأرسل لكل شخص رابطه، واعرف من حضر وكم بقي — من البداية إلى النهاية.
مقابلات العمل وجلسات التدريس والاستشارات: مكالمة بين أشخاص تعرفهم منصتك مسبقًا. هذا هو المسار كاملًا — يجدول تطبيقك المكالمة، ويرسل الروابط في رسائله، ويعرف بعدها من انضم ومتى وكم بقي. لا يحتاج أحد إلى حساب في ديوان، ومع branding: "none" لا تظهر علامة ديوان في صفحات الاجتماع.
1. أنشئ الغرفة وجدولها
import { Deewan } from "@deewanio/sdk";
const deewan = new Deewan({ apiKey: process.env.DEEWAN_API_KEY! });
// One room per interview. "members" means the room's own code doesn't let
// anyone in: only the personal links you create below do. "transcription"
// keeps what was said, with a Deewan AI summary (everyone in the call is told).
const room = await deewan.rooms.create({
name: `Interview — ${candidate.name}`,
settings: { access: "members", recordings: "workspace", transcription: true },
});
// On the workspace calendar, and in the key creator's Google or Outlook calendar.
const meeting = await deewan.meetings.create({
title: `Interview — ${candidate.name}`,
room_id: room.id,
starts_at: "2026-11-03T10:00:00+03:00",
ends_at: "2026-11-03T10:45:00+03:00",
timezone: "Asia/Riyadh",
});2. رابط لكل شخص
يحصل كل شخص على رابطه الخاص باسمه ودوره. اجعل صلاحيته تمتد حتى نهاية المكالمة (حتى 30 يومًا مقدمًا). ومع user_id الخاص بك يحمل الرد قيمة participant_ref: احفظها مع ذلك الشخص — فكل حدث ويب هوك وكل سطر حضور يخصه يحمل القيمة نفسها.
const expires_in = Math.ceil((Date.parse(meeting.ends_at) - Date.now()) / 1000) + 3600;
const common = { expires_in, branding: "none" as const, redirect_url: `https://jobs.example.com/interviews/${interview.id}/done` };
const recruiterLink = await deewan.rooms.createJoinLink(room.id, { ...common, name: recruiter.name, role: "host", user_id: recruiter.id });
const candidateLink = await deewan.rooms.createJoinLink(room.id, { ...common, name: candidate.name, user_id: candidate.id });
await db.interviews.update(interview.id, {
roomId: room.id,
recruiterRef: recruiterLink.participant_ref,
candidateRef: candidateLink.participant_ref,
});
// Your own emails, in your own words and design:
await sendEmail(candidate.email, { subject: "Your interview", joinUrl: candidateLink.url, startsAt: meeting.starts_at });3. تابعها مباشرة
اشترك في participant.joined وparticipant.left وroom.finished (راجع الويب هوك). يحمل كل حدث الغرفة، وsession_id لهذه الجلسة، وparticipant_ref للمشارك — وهذا يكفي لتعرض في تطبيقك «المرشّح بانتظارك»، أو لتنبّه مُقابِلًا لم ينضم بعد.
4. بعدها: الحضور والتسجيل
// In your webhook handler (verify the signature first — see Webhooks).
if (event.type === "room.finished") {
const interview = await db.interviews.findByRoom(event.data.room.id);
const { data: people } = await deewan.rooms.attendance(event.data.room.id, event.data.session_id);
const candidate = people.find((p) => p.participant_ref === interview.candidateRef);
await db.interviews.update(interview.id, {
candidateAttended: Boolean(candidate),
candidateMinutes: candidate ? Math.round(candidate.seconds / 60) : 0,
reconnects: candidate ? candidate.visits - 1 : 0,
});
}
// The transcript and Deewan AI's summary: what was said, how it went, follow-ups.
if (event.type === "transcript.ready") {
const interview = await db.interviews.findByRoom(event.data.room.id);
const { summary, lines } = await deewan.rooms.transcript(event.data.room.id, event.data.session_id);
await db.interviews.update(interview.id, { summary: summary?.summary, keyPoints: summary?.key_points, transcript: lines });
}
if (event.type === "recording.ready") {
// Download and decrypt it on your side (see Recordings).
}تبني شاشة المكالمة بنفسك بدل الصفحة المستضافة؟ أنشئ رموزًا (rooms.createToken) واستخدم حزمة الويب أو React Native أو Flutter. تقبل الرموز max_duration_seconds لتحديد مدة المكالمة، وكل ما سبق — الويب هوك والجلسات والحضور وparticipant_ref — يعمل بالطريقة نفسها.