-
Notifications
You must be signed in to change notification settings - Fork 34
Expand file tree
/
Copy pathcore.tsp
More file actions
116 lines (91 loc) · 2.73 KB
/
Copy pathcore.tsp
File metadata and controls
116 lines (91 loc) · 2.73 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
import "@typespec/http";
import "../../../types";
import "../../const.tsp";
import "../../enums.tsp";
using TypeSpec.Http;
model LogPathID {
@format("uuid")
@path
@doc("Unique ID of the log. This is the segment_id you can find in Relay call details in your Dashboard UI or in return objects when using the SDK.")
id: uuid;
}
@doc("Details on charges associated with this log.")
model ChargeDetail {
@doc("Description for this charge.")
@example("Text to Speech")
description: string;
@doc("Charged amount.")
@example(0.121176)
charge: float64;
}
@doc("Voice log entry with all activity details")
model VoiceLog {
@format("uuid")
@doc("A unique identifier for the log.")
id: uuid;
@doc("The origin phone number.")
@example("+12065551212")
from: string;
@doc("The destination phone number.")
@example("+12065553434")
to: string;
@doc("The direction of the voice activity.")
@example("inbound")
direction: "inbound" | "outbound";
@doc("The status of the voice activity.")
@example(VoiceLogStatus.completed)
status: VoiceLogStatus;
@doc("The duration of the voice activity in seconds.")
@example(9)
duration: int32;
@doc("The duration of the voice activity in milliseconds.")
@example(9638)
duration_ms: int32;
@doc("The billable duration of the voice activity in seconds.")
@example(60)
billing_ms: int32;
@doc("Source of this log entry.")
@example(VoiceSources.realtime_api)
source: VoiceSources;
@doc("Type of this log entry.")
@example(VoiceType.relay_sip_call)
type: VoiceType;
@doc("URL for the resource associated with this log entry (if available).")
@example(null)
url: url | null;
@doc("The charge in dollars.")
@example(0.01)
charge: float64;
@doc("Details on charges associated with this log.")
@example(#[])
charge_details: ChargeDetail[];
@doc("Date and time when the call entry was created.")
@example(UTC_TIME_EXAMPLE)
created_at: utcDateTime;
@doc("Parent log identifier for related call entries.")
@example(null)
parent_id: string | null;
}
@doc("Event entry for a voice log")
model LogEvent {
@doc("Timestamp when the event occurred.")
@example(UTC_TIME_EXAMPLE)
event_at: utcDateTime;
@doc("Log level of the event.")
@example("info")
level: "info" | "warning" | "error" | "debug";
@doc("Name of the event.")
@example("calling_call_initiated")
name: string;
@doc("Additional details about the event. Structure varies by event type.")
@example(#{})
details: {};
@format("uuid")
@doc("Unique identifier for the project.")
@example("b7182dc2-00f3-40e4-a5ce-20f164b329df")
project_id: uuid;
@format("uuid")
@doc("Unique identifier for the log.")
@example("b7182dc2-00f3-40e4-a5ce-20f164b329df")
log_id: uuid;
}