@pinecall/protocol 0.4.0 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/generated/commands.d.ts +9 -8
- package/dist/generated/commands.js +1 -0
- package/dist/generated/defs.d.ts +41 -41
- package/dist/generated/events.d.ts +58 -58
- package/dist/generated/registry.d.ts +73 -72
- package/dist/generated/rest.d.ts +110 -57
- package/dist/generated/rest.js +29 -0
- package/dist/generated/room.d.ts +7 -7
- package/dist/generated/state.d.ts +29 -29
- package/package.json +1 -1
package/dist/generated/rest.d.ts
CHANGED
|
@@ -6,11 +6,11 @@ export declare const CallStateSchema: z.ZodObject<{
|
|
|
6
6
|
agent: z.ZodString;
|
|
7
7
|
call: z.ZodNullable<z.ZodString>;
|
|
8
8
|
status: z.ZodEnum<{
|
|
9
|
-
active: "active";
|
|
10
|
-
dialing: "dialing";
|
|
11
|
-
ended: "ended";
|
|
12
9
|
idle: "idle";
|
|
13
10
|
ringing: "ringing";
|
|
11
|
+
dialing: "dialing";
|
|
12
|
+
active: "active";
|
|
13
|
+
ended: "ended";
|
|
14
14
|
}>;
|
|
15
15
|
channel: z.ZodNullable<z.ZodEnum<{
|
|
16
16
|
phone: "phone";
|
|
@@ -38,9 +38,9 @@ export declare const CallStateSchema: z.ZodObject<{
|
|
|
38
38
|
kind: z.ZodEnum<{
|
|
39
39
|
agent: "agent";
|
|
40
40
|
caller: "caller";
|
|
41
|
+
supervisor: "supervisor";
|
|
41
42
|
listener: "listener";
|
|
42
43
|
sip: "sip";
|
|
43
|
-
supervisor: "supervisor";
|
|
44
44
|
}>;
|
|
45
45
|
name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
46
46
|
joined_at: z.ZodNumber;
|
|
@@ -52,29 +52,29 @@ export declare const CallStateSchema: z.ZodObject<{
|
|
|
52
52
|
started_at: z.ZodNullable<z.ZodNumber>;
|
|
53
53
|
ended_at: z.ZodNullable<z.ZodNumber>;
|
|
54
54
|
end_reason: z.ZodNullable<z.ZodEnum<{
|
|
55
|
+
caller_hung_up: "caller_hung_up";
|
|
55
56
|
agent_hung_up: "agent_hung_up";
|
|
56
|
-
|
|
57
|
+
supervisor_ended: "supervisor_ended";
|
|
58
|
+
transferred: "transferred";
|
|
59
|
+
no_answer: "no_answer";
|
|
57
60
|
busy: "busy";
|
|
58
|
-
caller_hung_up: "caller_hung_up";
|
|
59
61
|
dial_failed: "dial_failed";
|
|
62
|
+
timeout: "timeout";
|
|
60
63
|
drained: "drained";
|
|
64
|
+
app_detached: "app_detached";
|
|
61
65
|
error: "error";
|
|
62
|
-
no_answer: "no_answer";
|
|
63
|
-
supervisor_ended: "supervisor_ended";
|
|
64
|
-
timeout: "timeout";
|
|
65
|
-
transferred: "transferred";
|
|
66
66
|
}>>;
|
|
67
67
|
outcome: z.ZodNullable<z.ZodString>;
|
|
68
68
|
user_state: z.ZodNullable<z.ZodEnum<{
|
|
69
|
-
away: "away";
|
|
70
69
|
listening: "listening";
|
|
71
70
|
speaking: "speaking";
|
|
71
|
+
away: "away";
|
|
72
72
|
}>>;
|
|
73
73
|
agent_state: z.ZodNullable<z.ZodEnum<{
|
|
74
|
-
idle: "idle";
|
|
75
|
-
initializing: "initializing";
|
|
76
74
|
listening: "listening";
|
|
77
75
|
speaking: "speaking";
|
|
76
|
+
initializing: "initializing";
|
|
77
|
+
idle: "idle";
|
|
78
78
|
thinking: "thinking";
|
|
79
79
|
}>>;
|
|
80
80
|
live: z.ZodObject<{
|
|
@@ -290,9 +290,9 @@ export declare const CallStateSchema: z.ZodObject<{
|
|
|
290
290
|
arguments: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
291
291
|
speech_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
292
292
|
status: z.ZodEnum<{
|
|
293
|
+
running: "running";
|
|
293
294
|
done: "done";
|
|
294
295
|
failed: "failed";
|
|
295
|
-
running: "running";
|
|
296
296
|
}>;
|
|
297
297
|
output: z.ZodOptional<z.ZodNullable<z.ZodUnknown>>;
|
|
298
298
|
error: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
@@ -322,18 +322,18 @@ export declare const CallStateSchema: z.ZodObject<{
|
|
|
322
322
|
audience: z.ZodString;
|
|
323
323
|
phrase: z.ZodString;
|
|
324
324
|
status: z.ZodEnum<{
|
|
325
|
-
declined: "declined";
|
|
326
|
-
granted: "granted";
|
|
327
325
|
pending: "pending";
|
|
326
|
+
granted: "granted";
|
|
327
|
+
declined: "declined";
|
|
328
328
|
}>;
|
|
329
329
|
said: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
330
330
|
reason: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
331
331
|
}, z.core.$strict>>;
|
|
332
332
|
memory: z.ZodArray<z.ZodObject<{
|
|
333
333
|
op: z.ZodEnum<{
|
|
334
|
-
forget: "forget";
|
|
335
334
|
recall: "recall";
|
|
336
335
|
remember: "remember";
|
|
336
|
+
forget: "forget";
|
|
337
337
|
}>;
|
|
338
338
|
contact: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
339
339
|
query: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
@@ -433,12 +433,12 @@ export declare const CallStateSchema: z.ZodObject<{
|
|
|
433
433
|
provider: z.ZodString;
|
|
434
434
|
model: z.ZodString;
|
|
435
435
|
unit: z.ZodEnum<{
|
|
436
|
-
audio_seconds: "audio_seconds";
|
|
437
|
-
cache_creation_tokens: "cache_creation_tokens";
|
|
438
|
-
cached_input_tokens: "cached_input_tokens";
|
|
439
|
-
characters: "characters";
|
|
440
436
|
input_tokens: "input_tokens";
|
|
437
|
+
cached_input_tokens: "cached_input_tokens";
|
|
438
|
+
cache_creation_tokens: "cache_creation_tokens";
|
|
441
439
|
output_tokens: "output_tokens";
|
|
440
|
+
characters: "characters";
|
|
441
|
+
audio_seconds: "audio_seconds";
|
|
442
442
|
requests: "requests";
|
|
443
443
|
session_seconds: "session_seconds";
|
|
444
444
|
}>;
|
|
@@ -511,9 +511,9 @@ export type SessionScore = z.infer<typeof SessionScoreSchema>;
|
|
|
511
511
|
* committing the business to something no tool call records.
|
|
512
512
|
*/
|
|
513
513
|
export declare const SessionFlagSchema: z.ZodEnum<{
|
|
514
|
+
promise: "promise";
|
|
514
515
|
escalated: "escalated";
|
|
515
516
|
low_score: "low_score";
|
|
516
|
-
promise: "promise";
|
|
517
517
|
}>;
|
|
518
518
|
export type SessionFlag = z.infer<typeof SessionFlagSchema>;
|
|
519
519
|
/** One call as a list draws it: which call, how far the log got, and the state's own fields. */
|
|
@@ -523,11 +523,11 @@ export declare const SessionLineSchema: z.ZodObject<{
|
|
|
523
523
|
live: z.ZodBoolean;
|
|
524
524
|
last_seq: z.ZodInt;
|
|
525
525
|
status: z.ZodEnum<{
|
|
526
|
-
active: "active";
|
|
527
|
-
dialing: "dialing";
|
|
528
|
-
ended: "ended";
|
|
529
526
|
idle: "idle";
|
|
530
527
|
ringing: "ringing";
|
|
528
|
+
dialing: "dialing";
|
|
529
|
+
active: "active";
|
|
530
|
+
ended: "ended";
|
|
531
531
|
}>;
|
|
532
532
|
channel: z.ZodNullable<z.ZodEnum<{
|
|
533
533
|
phone: "phone";
|
|
@@ -550,17 +550,17 @@ export declare const SessionLineSchema: z.ZodObject<{
|
|
|
550
550
|
started_at: z.ZodNullable<z.ZodNumber>;
|
|
551
551
|
ended_at: z.ZodNullable<z.ZodNumber>;
|
|
552
552
|
end_reason: z.ZodNullable<z.ZodEnum<{
|
|
553
|
+
caller_hung_up: "caller_hung_up";
|
|
553
554
|
agent_hung_up: "agent_hung_up";
|
|
554
|
-
|
|
555
|
+
supervisor_ended: "supervisor_ended";
|
|
556
|
+
transferred: "transferred";
|
|
557
|
+
no_answer: "no_answer";
|
|
555
558
|
busy: "busy";
|
|
556
|
-
caller_hung_up: "caller_hung_up";
|
|
557
559
|
dial_failed: "dial_failed";
|
|
560
|
+
timeout: "timeout";
|
|
558
561
|
drained: "drained";
|
|
562
|
+
app_detached: "app_detached";
|
|
559
563
|
error: "error";
|
|
560
|
-
no_answer: "no_answer";
|
|
561
|
-
supervisor_ended: "supervisor_ended";
|
|
562
|
-
timeout: "timeout";
|
|
563
|
-
transferred: "transferred";
|
|
564
564
|
}>>;
|
|
565
565
|
outcome: z.ZodNullable<z.ZodString>;
|
|
566
566
|
cost: z.ZodNullable<z.ZodObject<{
|
|
@@ -574,12 +574,12 @@ export declare const SessionLineSchema: z.ZodObject<{
|
|
|
574
574
|
provider: z.ZodString;
|
|
575
575
|
model: z.ZodString;
|
|
576
576
|
unit: z.ZodEnum<{
|
|
577
|
-
audio_seconds: "audio_seconds";
|
|
578
|
-
cache_creation_tokens: "cache_creation_tokens";
|
|
579
|
-
cached_input_tokens: "cached_input_tokens";
|
|
580
|
-
characters: "characters";
|
|
581
577
|
input_tokens: "input_tokens";
|
|
578
|
+
cached_input_tokens: "cached_input_tokens";
|
|
579
|
+
cache_creation_tokens: "cache_creation_tokens";
|
|
582
580
|
output_tokens: "output_tokens";
|
|
581
|
+
characters: "characters";
|
|
582
|
+
audio_seconds: "audio_seconds";
|
|
583
583
|
requests: "requests";
|
|
584
584
|
session_seconds: "session_seconds";
|
|
585
585
|
}>;
|
|
@@ -599,9 +599,9 @@ export declare const SessionLineSchema: z.ZodObject<{
|
|
|
599
599
|
reason: z.ZodNullable<z.ZodString>;
|
|
600
600
|
}, z.core.$strict>>>>;
|
|
601
601
|
flags: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodEnum<{
|
|
602
|
+
promise: "promise";
|
|
602
603
|
escalated: "escalated";
|
|
603
604
|
low_score: "low_score";
|
|
604
|
-
promise: "promise";
|
|
605
605
|
}>>>>;
|
|
606
606
|
}, z.core.$strict>;
|
|
607
607
|
export type SessionLine = z.infer<typeof SessionLineSchema>;
|
|
@@ -616,11 +616,11 @@ export declare const SessionListSchema: z.ZodObject<{
|
|
|
616
616
|
live: z.ZodBoolean;
|
|
617
617
|
last_seq: z.ZodInt;
|
|
618
618
|
status: z.ZodEnum<{
|
|
619
|
-
active: "active";
|
|
620
|
-
dialing: "dialing";
|
|
621
|
-
ended: "ended";
|
|
622
619
|
idle: "idle";
|
|
623
620
|
ringing: "ringing";
|
|
621
|
+
dialing: "dialing";
|
|
622
|
+
active: "active";
|
|
623
|
+
ended: "ended";
|
|
624
624
|
}>;
|
|
625
625
|
channel: z.ZodNullable<z.ZodEnum<{
|
|
626
626
|
phone: "phone";
|
|
@@ -643,17 +643,17 @@ export declare const SessionListSchema: z.ZodObject<{
|
|
|
643
643
|
started_at: z.ZodNullable<z.ZodNumber>;
|
|
644
644
|
ended_at: z.ZodNullable<z.ZodNumber>;
|
|
645
645
|
end_reason: z.ZodNullable<z.ZodEnum<{
|
|
646
|
+
caller_hung_up: "caller_hung_up";
|
|
646
647
|
agent_hung_up: "agent_hung_up";
|
|
647
|
-
|
|
648
|
+
supervisor_ended: "supervisor_ended";
|
|
649
|
+
transferred: "transferred";
|
|
650
|
+
no_answer: "no_answer";
|
|
648
651
|
busy: "busy";
|
|
649
|
-
caller_hung_up: "caller_hung_up";
|
|
650
652
|
dial_failed: "dial_failed";
|
|
653
|
+
timeout: "timeout";
|
|
651
654
|
drained: "drained";
|
|
655
|
+
app_detached: "app_detached";
|
|
652
656
|
error: "error";
|
|
653
|
-
no_answer: "no_answer";
|
|
654
|
-
supervisor_ended: "supervisor_ended";
|
|
655
|
-
timeout: "timeout";
|
|
656
|
-
transferred: "transferred";
|
|
657
657
|
}>>;
|
|
658
658
|
outcome: z.ZodNullable<z.ZodString>;
|
|
659
659
|
cost: z.ZodNullable<z.ZodObject<{
|
|
@@ -667,12 +667,12 @@ export declare const SessionListSchema: z.ZodObject<{
|
|
|
667
667
|
provider: z.ZodString;
|
|
668
668
|
model: z.ZodString;
|
|
669
669
|
unit: z.ZodEnum<{
|
|
670
|
-
audio_seconds: "audio_seconds";
|
|
671
|
-
cache_creation_tokens: "cache_creation_tokens";
|
|
672
|
-
cached_input_tokens: "cached_input_tokens";
|
|
673
|
-
characters: "characters";
|
|
674
670
|
input_tokens: "input_tokens";
|
|
671
|
+
cached_input_tokens: "cached_input_tokens";
|
|
672
|
+
cache_creation_tokens: "cache_creation_tokens";
|
|
675
673
|
output_tokens: "output_tokens";
|
|
674
|
+
characters: "characters";
|
|
675
|
+
audio_seconds: "audio_seconds";
|
|
676
676
|
requests: "requests";
|
|
677
677
|
session_seconds: "session_seconds";
|
|
678
678
|
}>;
|
|
@@ -692,9 +692,9 @@ export declare const SessionListSchema: z.ZodObject<{
|
|
|
692
692
|
reason: z.ZodNullable<z.ZodString>;
|
|
693
693
|
}, z.core.$strict>>>>;
|
|
694
694
|
flags: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodEnum<{
|
|
695
|
+
promise: "promise";
|
|
695
696
|
escalated: "escalated";
|
|
696
697
|
low_score: "low_score";
|
|
697
|
-
promise: "promise";
|
|
698
698
|
}>>>>;
|
|
699
699
|
}, z.core.$strict>>;
|
|
700
700
|
total: z.ZodOptional<z.ZodNullable<z.ZodNullable<z.ZodInt>>>;
|
|
@@ -779,8 +779,8 @@ export type JudgingWanted = z.infer<typeof JudgingWantedSchema>;
|
|
|
779
779
|
*/
|
|
780
780
|
export declare const ThreadKindSchema: z.ZodEnum<{
|
|
781
781
|
call: "call";
|
|
782
|
-
in: "in";
|
|
783
782
|
out: "out";
|
|
783
|
+
in: "in";
|
|
784
784
|
}>;
|
|
785
785
|
export type ThreadKind = z.infer<typeof ThreadKindSchema>;
|
|
786
786
|
/** The newest thing on a contact's thread. */
|
|
@@ -789,8 +789,8 @@ export declare const ThreadLastSchema: z.ZodObject<{
|
|
|
789
789
|
at: z.ZodNumber;
|
|
790
790
|
kind: z.ZodEnum<{
|
|
791
791
|
call: "call";
|
|
792
|
-
in: "in";
|
|
793
792
|
out: "out";
|
|
793
|
+
in: "in";
|
|
794
794
|
}>;
|
|
795
795
|
}, z.core.$strict>;
|
|
796
796
|
export type ThreadLast = z.infer<typeof ThreadLastSchema>;
|
|
@@ -808,8 +808,8 @@ export declare const ThreadLineSchema: z.ZodObject<{
|
|
|
808
808
|
at: z.ZodNumber;
|
|
809
809
|
kind: z.ZodEnum<{
|
|
810
810
|
call: "call";
|
|
811
|
-
in: "in";
|
|
812
811
|
out: "out";
|
|
812
|
+
in: "in";
|
|
813
813
|
}>;
|
|
814
814
|
}, z.core.$strict>;
|
|
815
815
|
unread: z.ZodInt;
|
|
@@ -831,8 +831,8 @@ export declare const ThreadListSchema: z.ZodObject<{
|
|
|
831
831
|
at: z.ZodNumber;
|
|
832
832
|
kind: z.ZodEnum<{
|
|
833
833
|
call: "call";
|
|
834
|
-
in: "in";
|
|
835
834
|
out: "out";
|
|
835
|
+
in: "in";
|
|
836
836
|
}>;
|
|
837
837
|
}, z.core.$strict>;
|
|
838
838
|
unread: z.ZodInt;
|
|
@@ -845,8 +845,8 @@ export type ThreadList = z.infer<typeof ThreadListSchema>;
|
|
|
845
845
|
export declare const ThreadMessageSchema: z.ZodObject<{
|
|
846
846
|
kind: z.ZodEnum<{
|
|
847
847
|
call: "call";
|
|
848
|
-
in: "in";
|
|
849
848
|
out: "out";
|
|
849
|
+
in: "in";
|
|
850
850
|
}>;
|
|
851
851
|
text: z.ZodNullable<z.ZodString>;
|
|
852
852
|
at: z.ZodNumber;
|
|
@@ -867,8 +867,8 @@ export declare const ThreadSchema: z.ZodObject<{
|
|
|
867
867
|
messages: z.ZodArray<z.ZodObject<{
|
|
868
868
|
kind: z.ZodEnum<{
|
|
869
869
|
call: "call";
|
|
870
|
-
in: "in";
|
|
871
870
|
out: "out";
|
|
871
|
+
in: "in";
|
|
872
872
|
}>;
|
|
873
873
|
text: z.ZodNullable<z.ZodString>;
|
|
874
874
|
at: z.ZodNumber;
|
|
@@ -982,9 +982,9 @@ export declare const OrgMailWantedSchema: z.ZodObject<{
|
|
|
982
982
|
host: z.ZodString;
|
|
983
983
|
port: z.ZodInt;
|
|
984
984
|
security: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
985
|
-
none: "none";
|
|
986
985
|
starttls: "starttls";
|
|
987
986
|
tls: "tls";
|
|
987
|
+
none: "none";
|
|
988
988
|
}>>>;
|
|
989
989
|
username: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
990
990
|
password: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
@@ -1128,6 +1128,59 @@ export declare const AgentListSchema: z.ZodObject<{
|
|
|
1128
1128
|
}, z.core.$strict>>;
|
|
1129
1129
|
}, z.core.$strict>;
|
|
1130
1130
|
export type AgentList = z.infer<typeof AgentListSchema>;
|
|
1131
|
+
/**
|
|
1132
|
+
* One app connected to the gateway right now: one process on one machine, holding one or more
|
|
1133
|
+
* agents in one world.
|
|
1134
|
+
*/
|
|
1135
|
+
export declare const AppProcessSchema: z.ZodObject<{
|
|
1136
|
+
app: z.ZodString;
|
|
1137
|
+
agents: z.ZodArray<z.ZodString>;
|
|
1138
|
+
env: z.ZodEnum<{
|
|
1139
|
+
production: "production";
|
|
1140
|
+
sandbox: "sandbox";
|
|
1141
|
+
}>;
|
|
1142
|
+
host: z.ZodNullable<z.ZodString>;
|
|
1143
|
+
address: z.ZodNullable<z.ZodString>;
|
|
1144
|
+
sdk: z.ZodNullable<z.ZodString>;
|
|
1145
|
+
holder: z.ZodNullable<z.ZodObject<{
|
|
1146
|
+
holder: z.ZodNullable<z.ZodString>;
|
|
1147
|
+
name: z.ZodNullable<z.ZodString>;
|
|
1148
|
+
}, z.core.$strict>>;
|
|
1149
|
+
connected_at: z.ZodNumber;
|
|
1150
|
+
}, z.core.$strict>;
|
|
1151
|
+
export type AppProcess = z.infer<typeof AppProcessSchema>;
|
|
1152
|
+
/**
|
|
1153
|
+
* GET /v1/apps: every app connected in the request's world that this key may see — its own
|
|
1154
|
+
* corner's and the org's, every corner's with `team`.
|
|
1155
|
+
*/
|
|
1156
|
+
export declare const AppListSchema: z.ZodObject<{
|
|
1157
|
+
apps: z.ZodArray<z.ZodObject<{
|
|
1158
|
+
app: z.ZodString;
|
|
1159
|
+
agents: z.ZodArray<z.ZodString>;
|
|
1160
|
+
env: z.ZodEnum<{
|
|
1161
|
+
production: "production";
|
|
1162
|
+
sandbox: "sandbox";
|
|
1163
|
+
}>;
|
|
1164
|
+
host: z.ZodNullable<z.ZodString>;
|
|
1165
|
+
address: z.ZodNullable<z.ZodString>;
|
|
1166
|
+
sdk: z.ZodNullable<z.ZodString>;
|
|
1167
|
+
holder: z.ZodNullable<z.ZodObject<{
|
|
1168
|
+
holder: z.ZodNullable<z.ZodString>;
|
|
1169
|
+
name: z.ZodNullable<z.ZodString>;
|
|
1170
|
+
}, z.core.$strict>>;
|
|
1171
|
+
connected_at: z.ZodNumber;
|
|
1172
|
+
}, z.core.$strict>>;
|
|
1173
|
+
}, z.core.$strict>;
|
|
1174
|
+
export type AppList = z.infer<typeof AppListSchema>;
|
|
1175
|
+
/**
|
|
1176
|
+
* POST /v1/apps/{app}/stop, the answer: the socket was closed with the stop code, and the app
|
|
1177
|
+
* exits rather than reconnect.
|
|
1178
|
+
*/
|
|
1179
|
+
export declare const AppStoppedSchema: z.ZodObject<{
|
|
1180
|
+
app: z.ZodString;
|
|
1181
|
+
stopped: z.ZodBoolean;
|
|
1182
|
+
}, z.core.$strict>;
|
|
1183
|
+
export type AppStopped = z.infer<typeof AppStoppedSchema>;
|
|
1131
1184
|
/**
|
|
1132
1185
|
* GET /v1/agents/{slug}/line: whose terminal a call that RINGS at this agent's doors lands in. An
|
|
1133
1186
|
* org shares one sandbox number, so it rings in one place and which one is claimed.
|
package/dist/generated/rest.js
CHANGED
|
@@ -340,6 +340,35 @@ export const HeldAgentSchema = z.strictObject({
|
|
|
340
340
|
export const AgentListSchema = z.strictObject({
|
|
341
341
|
agents: z.array(HeldAgentSchema),
|
|
342
342
|
});
|
|
343
|
+
/**
|
|
344
|
+
* One app connected to the gateway right now: one process on one machine, holding one or more
|
|
345
|
+
* agents in one world.
|
|
346
|
+
*/
|
|
347
|
+
export const AppProcessSchema = z.strictObject({
|
|
348
|
+
app: z.string(),
|
|
349
|
+
agents: z.array(z.string()),
|
|
350
|
+
env: EnvSchema,
|
|
351
|
+
host: z.string().nullable(),
|
|
352
|
+
address: z.string().nullable(),
|
|
353
|
+
sdk: z.string().nullable(),
|
|
354
|
+
holder: LineHolderSchema.nullable(),
|
|
355
|
+
connected_at: z.number(),
|
|
356
|
+
});
|
|
357
|
+
/**
|
|
358
|
+
* GET /v1/apps: every app connected in the request's world that this key may see — its own
|
|
359
|
+
* corner's and the org's, every corner's with `team`.
|
|
360
|
+
*/
|
|
361
|
+
export const AppListSchema = z.strictObject({
|
|
362
|
+
apps: z.array(AppProcessSchema),
|
|
363
|
+
});
|
|
364
|
+
/**
|
|
365
|
+
* POST /v1/apps/{app}/stop, the answer: the socket was closed with the stop code, and the app
|
|
366
|
+
* exits rather than reconnect.
|
|
367
|
+
*/
|
|
368
|
+
export const AppStoppedSchema = z.strictObject({
|
|
369
|
+
app: z.string(),
|
|
370
|
+
stopped: z.boolean(),
|
|
371
|
+
});
|
|
343
372
|
/**
|
|
344
373
|
* GET /v1/agents/{slug}/line: whose terminal a call that RINGS at this agent's doors lands in. An
|
|
345
374
|
* org shares one sandbox number, so it rings in one place and which one is claimed.
|
package/dist/generated/room.d.ts
CHANGED
|
@@ -23,9 +23,9 @@ export declare const ParticipantJoinedSchema: z.ZodObject<{
|
|
|
23
23
|
kind: z.ZodEnum<{
|
|
24
24
|
agent: "agent";
|
|
25
25
|
caller: "caller";
|
|
26
|
+
supervisor: "supervisor";
|
|
26
27
|
listener: "listener";
|
|
27
28
|
sip: "sip";
|
|
28
|
-
supervisor: "supervisor";
|
|
29
29
|
}>;
|
|
30
30
|
name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
31
31
|
attributes: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
@@ -51,15 +51,15 @@ export declare const TrackPublishedSchema: z.ZodObject<{
|
|
|
51
51
|
identity: z.ZodString;
|
|
52
52
|
kind: z.ZodEnum<{
|
|
53
53
|
audio: "audio";
|
|
54
|
-
screen: "screen";
|
|
55
54
|
video: "video";
|
|
55
|
+
screen: "screen";
|
|
56
56
|
}>;
|
|
57
57
|
source: z.ZodEnum<{
|
|
58
|
-
|
|
58
|
+
unknown: "unknown";
|
|
59
59
|
microphone: "microphone";
|
|
60
|
+
camera: "camera";
|
|
60
61
|
screen_share: "screen_share";
|
|
61
62
|
screen_share_audio: "screen_share_audio";
|
|
62
|
-
unknown: "unknown";
|
|
63
63
|
}>;
|
|
64
64
|
}, z.core.$strict>;
|
|
65
65
|
export type TrackPublished = z.infer<typeof TrackPublishedSchema>;
|
|
@@ -71,15 +71,15 @@ export declare const TrackUnpublishedSchema: z.ZodObject<{
|
|
|
71
71
|
identity: z.ZodString;
|
|
72
72
|
kind: z.ZodEnum<{
|
|
73
73
|
audio: "audio";
|
|
74
|
-
screen: "screen";
|
|
75
74
|
video: "video";
|
|
75
|
+
screen: "screen";
|
|
76
76
|
}>;
|
|
77
77
|
source: z.ZodEnum<{
|
|
78
|
-
|
|
78
|
+
unknown: "unknown";
|
|
79
79
|
microphone: "microphone";
|
|
80
|
+
camera: "camera";
|
|
80
81
|
screen_share: "screen_share";
|
|
81
82
|
screen_share_audio: "screen_share_audio";
|
|
82
|
-
unknown: "unknown";
|
|
83
83
|
}>;
|
|
84
84
|
}, z.core.$strict>;
|
|
85
85
|
export type TrackUnpublished = z.infer<typeof TrackUnpublishedSchema>;
|
|
@@ -4,11 +4,11 @@ import { z } from "zod";
|
|
|
4
4
|
* looks like.
|
|
5
5
|
*/
|
|
6
6
|
export declare const CallStatusSchema: z.ZodEnum<{
|
|
7
|
-
active: "active";
|
|
8
|
-
dialing: "dialing";
|
|
9
|
-
ended: "ended";
|
|
10
7
|
idle: "idle";
|
|
11
8
|
ringing: "ringing";
|
|
9
|
+
dialing: "dialing";
|
|
10
|
+
active: "active";
|
|
11
|
+
ended: "ended";
|
|
12
12
|
}>;
|
|
13
13
|
export type CallStatus = z.infer<typeof CallStatusSchema>;
|
|
14
14
|
/** One finished turn of the caller, with what the session measured about it. */
|
|
@@ -277,9 +277,9 @@ export declare const ToolRunSchema: z.ZodObject<{
|
|
|
277
277
|
arguments: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
278
278
|
speech_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
279
279
|
status: z.ZodEnum<{
|
|
280
|
+
running: "running";
|
|
280
281
|
done: "done";
|
|
281
282
|
failed: "failed";
|
|
282
|
-
running: "running";
|
|
283
283
|
}>;
|
|
284
284
|
output: z.ZodOptional<z.ZodNullable<z.ZodUnknown>>;
|
|
285
285
|
error: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
@@ -312,9 +312,9 @@ export declare const ConfirmSchema: z.ZodObject<{
|
|
|
312
312
|
audience: z.ZodString;
|
|
313
313
|
phrase: z.ZodString;
|
|
314
314
|
status: z.ZodEnum<{
|
|
315
|
-
declined: "declined";
|
|
316
|
-
granted: "granted";
|
|
317
315
|
pending: "pending";
|
|
316
|
+
granted: "granted";
|
|
317
|
+
declined: "declined";
|
|
318
318
|
}>;
|
|
319
319
|
said: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
320
320
|
reason: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
@@ -372,9 +372,9 @@ export declare const ParticipantSchema: z.ZodObject<{
|
|
|
372
372
|
kind: z.ZodEnum<{
|
|
373
373
|
agent: "agent";
|
|
374
374
|
caller: "caller";
|
|
375
|
+
supervisor: "supervisor";
|
|
375
376
|
listener: "listener";
|
|
376
377
|
sip: "sip";
|
|
377
|
-
supervisor: "supervisor";
|
|
378
378
|
}>;
|
|
379
379
|
name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
380
380
|
joined_at: z.ZodNumber;
|
|
@@ -391,9 +391,9 @@ export declare const RoomSchema: z.ZodObject<{
|
|
|
391
391
|
kind: z.ZodEnum<{
|
|
392
392
|
agent: "agent";
|
|
393
393
|
caller: "caller";
|
|
394
|
+
supervisor: "supervisor";
|
|
394
395
|
listener: "listener";
|
|
395
396
|
sip: "sip";
|
|
396
|
-
supervisor: "supervisor";
|
|
397
397
|
}>;
|
|
398
398
|
name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
399
399
|
joined_at: z.ZodNumber;
|
|
@@ -430,11 +430,11 @@ export declare const StateSchema: z.ZodObject<{
|
|
|
430
430
|
agent: z.ZodString;
|
|
431
431
|
call: z.ZodNullable<z.ZodString>;
|
|
432
432
|
status: z.ZodEnum<{
|
|
433
|
-
active: "active";
|
|
434
|
-
dialing: "dialing";
|
|
435
|
-
ended: "ended";
|
|
436
433
|
idle: "idle";
|
|
437
434
|
ringing: "ringing";
|
|
435
|
+
dialing: "dialing";
|
|
436
|
+
active: "active";
|
|
437
|
+
ended: "ended";
|
|
438
438
|
}>;
|
|
439
439
|
channel: z.ZodNullable<z.ZodEnum<{
|
|
440
440
|
phone: "phone";
|
|
@@ -462,9 +462,9 @@ export declare const StateSchema: z.ZodObject<{
|
|
|
462
462
|
kind: z.ZodEnum<{
|
|
463
463
|
agent: "agent";
|
|
464
464
|
caller: "caller";
|
|
465
|
+
supervisor: "supervisor";
|
|
465
466
|
listener: "listener";
|
|
466
467
|
sip: "sip";
|
|
467
|
-
supervisor: "supervisor";
|
|
468
468
|
}>;
|
|
469
469
|
name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
470
470
|
joined_at: z.ZodNumber;
|
|
@@ -476,29 +476,29 @@ export declare const StateSchema: z.ZodObject<{
|
|
|
476
476
|
started_at: z.ZodNullable<z.ZodNumber>;
|
|
477
477
|
ended_at: z.ZodNullable<z.ZodNumber>;
|
|
478
478
|
end_reason: z.ZodNullable<z.ZodEnum<{
|
|
479
|
+
caller_hung_up: "caller_hung_up";
|
|
479
480
|
agent_hung_up: "agent_hung_up";
|
|
480
|
-
|
|
481
|
+
supervisor_ended: "supervisor_ended";
|
|
482
|
+
transferred: "transferred";
|
|
483
|
+
no_answer: "no_answer";
|
|
481
484
|
busy: "busy";
|
|
482
|
-
caller_hung_up: "caller_hung_up";
|
|
483
485
|
dial_failed: "dial_failed";
|
|
486
|
+
timeout: "timeout";
|
|
484
487
|
drained: "drained";
|
|
488
|
+
app_detached: "app_detached";
|
|
485
489
|
error: "error";
|
|
486
|
-
no_answer: "no_answer";
|
|
487
|
-
supervisor_ended: "supervisor_ended";
|
|
488
|
-
timeout: "timeout";
|
|
489
|
-
transferred: "transferred";
|
|
490
490
|
}>>;
|
|
491
491
|
outcome: z.ZodNullable<z.ZodString>;
|
|
492
492
|
user_state: z.ZodNullable<z.ZodEnum<{
|
|
493
|
-
away: "away";
|
|
494
493
|
listening: "listening";
|
|
495
494
|
speaking: "speaking";
|
|
495
|
+
away: "away";
|
|
496
496
|
}>>;
|
|
497
497
|
agent_state: z.ZodNullable<z.ZodEnum<{
|
|
498
|
-
idle: "idle";
|
|
499
|
-
initializing: "initializing";
|
|
500
498
|
listening: "listening";
|
|
501
499
|
speaking: "speaking";
|
|
500
|
+
initializing: "initializing";
|
|
501
|
+
idle: "idle";
|
|
502
502
|
thinking: "thinking";
|
|
503
503
|
}>>;
|
|
504
504
|
live: z.ZodObject<{
|
|
@@ -714,9 +714,9 @@ export declare const StateSchema: z.ZodObject<{
|
|
|
714
714
|
arguments: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
715
715
|
speech_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
716
716
|
status: z.ZodEnum<{
|
|
717
|
+
running: "running";
|
|
717
718
|
done: "done";
|
|
718
719
|
failed: "failed";
|
|
719
|
-
running: "running";
|
|
720
720
|
}>;
|
|
721
721
|
output: z.ZodOptional<z.ZodNullable<z.ZodUnknown>>;
|
|
722
722
|
error: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
@@ -746,18 +746,18 @@ export declare const StateSchema: z.ZodObject<{
|
|
|
746
746
|
audience: z.ZodString;
|
|
747
747
|
phrase: z.ZodString;
|
|
748
748
|
status: z.ZodEnum<{
|
|
749
|
-
declined: "declined";
|
|
750
|
-
granted: "granted";
|
|
751
749
|
pending: "pending";
|
|
750
|
+
granted: "granted";
|
|
751
|
+
declined: "declined";
|
|
752
752
|
}>;
|
|
753
753
|
said: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
754
754
|
reason: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
755
755
|
}, z.core.$strict>>;
|
|
756
756
|
memory: z.ZodArray<z.ZodObject<{
|
|
757
757
|
op: z.ZodEnum<{
|
|
758
|
-
forget: "forget";
|
|
759
758
|
recall: "recall";
|
|
760
759
|
remember: "remember";
|
|
760
|
+
forget: "forget";
|
|
761
761
|
}>;
|
|
762
762
|
contact: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
763
763
|
query: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
@@ -857,12 +857,12 @@ export declare const StateSchema: z.ZodObject<{
|
|
|
857
857
|
provider: z.ZodString;
|
|
858
858
|
model: z.ZodString;
|
|
859
859
|
unit: z.ZodEnum<{
|
|
860
|
-
audio_seconds: "audio_seconds";
|
|
861
|
-
cache_creation_tokens: "cache_creation_tokens";
|
|
862
|
-
cached_input_tokens: "cached_input_tokens";
|
|
863
|
-
characters: "characters";
|
|
864
860
|
input_tokens: "input_tokens";
|
|
861
|
+
cached_input_tokens: "cached_input_tokens";
|
|
862
|
+
cache_creation_tokens: "cache_creation_tokens";
|
|
865
863
|
output_tokens: "output_tokens";
|
|
864
|
+
characters: "characters";
|
|
865
|
+
audio_seconds: "audio_seconds";
|
|
866
866
|
requests: "requests";
|
|
867
867
|
session_seconds: "session_seconds";
|
|
868
868
|
}>;
|
package/package.json
CHANGED