feat(voip): add Daftaresoma provider tab with webhook and click-to-call
Map portal call events into CRM logs, store the API token for OutgoingCall, and surface a dedicated settings tab for wiring the webhook URL. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -5511,13 +5511,21 @@ export type VoipCallStatus =
|
||||
| "completed"
|
||||
| "failed";
|
||||
|
||||
export type VoipProvider = "generic" | "daftareshoma";
|
||||
|
||||
export interface VoipConnectionDto {
|
||||
id: string;
|
||||
label: string;
|
||||
provider: VoipProvider;
|
||||
enabled: boolean;
|
||||
webhookSecretSet: boolean;
|
||||
apiTokenSet: boolean;
|
||||
/** قالب URL برای شروع تماس؛ {number} جایگزین میشود */
|
||||
clickToCallUrl: string | null;
|
||||
/** شماره مبدأ تماس خروجی (دفتر شما) */
|
||||
fromNumber: string | null;
|
||||
/** خط/داخلی سازمان (دفتر شما) */
|
||||
callerExtension: string | null;
|
||||
lastEventAt: string | null;
|
||||
lastError: string | null;
|
||||
callCount: number;
|
||||
@@ -5527,8 +5535,13 @@ export interface VoipConnectionDto {
|
||||
|
||||
export interface CreateVoipConnectionRequest {
|
||||
label: string;
|
||||
provider?: VoipProvider;
|
||||
webhookSecret?: string;
|
||||
clickToCallUrl?: string | null;
|
||||
/** توکن Bearer API دفتر شما */
|
||||
apiToken?: string;
|
||||
fromNumber?: string | null;
|
||||
callerExtension?: string | null;
|
||||
enabled?: boolean;
|
||||
}
|
||||
|
||||
@@ -5536,6 +5549,9 @@ export interface UpdateVoipConnectionRequest {
|
||||
label?: string;
|
||||
webhookSecret?: string | null;
|
||||
clickToCallUrl?: string | null;
|
||||
apiToken?: string | null;
|
||||
fromNumber?: string | null;
|
||||
callerExtension?: string | null;
|
||||
enabled?: boolean;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user