chore: updatae documentation for api trigger

This commit is contained in:
Abhishek Kumar 2026-05-04 12:46:11 +05:30
parent 5ad5bbd985
commit 0d7b225f76
12 changed files with 120 additions and 39 deletions

View file

@ -2,6 +2,7 @@
import {
ArrowLeft,
Copy,
ExternalLink,
Pencil,
Plus,
@ -212,6 +213,20 @@ export default function TelephonyConfigurationDetailPage() {
<CardDescription>
Updated {new Date(config.updated_at).toLocaleString()}
</CardDescription>
<button
type="button"
onClick={() => {
navigator.clipboard
.writeText(String(config.id))
.then(() => toast.success("Configuration ID copied"))
.catch(() => toast.error("Failed to copy ID"));
}}
title="Click to copy"
className="inline-flex items-center gap-1 self-start rounded font-mono text-xs text-muted-foreground hover:text-foreground"
>
<span className="truncate">Configuration ID: {config.id}</span>
<Copy className="h-3 w-3 shrink-0" />
</button>
</div>
<div className="flex items-center gap-2 shrink-0">
{!config.is_default_outbound && (

View file

@ -2,6 +2,7 @@
import {
ChevronRight,
Copy,
ExternalLink,
Pencil,
Plus,
@ -198,6 +199,22 @@ export default function TelephonyConfigurationsPage() {
{item.phone_number_count} phone{" "}
{item.phone_number_count === 1 ? "number" : "numbers"}
</span>
<button
type="button"
onClick={(e) => {
e.preventDefault();
e.stopPropagation();
navigator.clipboard
.writeText(String(item.id))
.then(() => toast.success("Configuration ID copied"))
.catch(() => toast.error("Failed to copy ID"));
}}
title="Click to copy"
className="inline-flex items-center gap-1 self-start rounded font-mono text-xs text-muted-foreground hover:text-foreground"
>
<span className="truncate">Configuration ID: {item.id}</span>
<Copy className="h-3 w-3 shrink-0" />
</button>
</div>
</Link>
<div className="flex items-center gap-1">

View file

@ -3714,6 +3714,10 @@ export type TriggerCallRequest = {
initial_context?: {
[key: string]: unknown;
} | null;
/**
* Telephony Configuration Id
*/
telephony_configuration_id?: number | null;
};
/**

View file

@ -1,6 +1,6 @@
"use client";
import { ExternalLink } from "lucide-react";
import { Copy, ExternalLink } from "lucide-react";
import { useEffect, useMemo, useState } from "react";
import { toast } from "sonner";
@ -172,6 +172,26 @@ export function ConfigFormDialog({
</DialogHeader>
<div className="space-y-4">
{isEdit && existing && (
<div className="space-y-1">
<Label>Configuration ID</Label>
<button
type="button"
onClick={() => {
navigator.clipboard
.writeText(String(existing.id))
.then(() => toast.success("Configuration ID copied"))
.catch(() => toast.error("Failed to copy ID"));
}}
title="Click to copy"
className="group flex w-full items-center gap-2 rounded-md border bg-muted/20 p-2 text-left font-mono text-xs transition-colors hover:bg-muted/40"
>
<code className="flex-1 truncate">{existing.id}</code>
<Copy className="h-3 w-3 shrink-0 text-muted-foreground group-hover:text-foreground" />
</button>
</div>
)}
<div className="space-y-2">
<Label htmlFor="cfg-name">Name</Label>
<Input