@fonoster/common 0.27.0 → 0.30.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.
Files changed (176) hide show
  1. package/dist/assistants/index.d.ts +2 -6
  2. package/dist/assistants/index.js +2 -6
  3. package/dist/assistants/sessionAssistantSchema.d.ts +741 -0
  4. package/dist/assistants/sessionAssistantSchema.js +112 -0
  5. package/dist/assistants/testCasesSchema.d.ts +4 -4
  6. package/dist/{voice/Dial.d.ts → calls/index.d.ts} +16 -13
  7. package/dist/calls/index.js +44 -0
  8. package/dist/cellsecrets/index.d.ts +91 -0
  9. package/dist/cellsecrets/index.js +299 -0
  10. package/dist/config/cli/check.d.ts +6 -0
  11. package/dist/config/cli/check.js +202 -0
  12. package/dist/config/cli/envFile.d.ts +23 -0
  13. package/dist/config/cli/envFile.js +81 -0
  14. package/dist/config/cli/exposure.d.ts +10 -0
  15. package/dist/config/cli/exposure.js +93 -0
  16. package/dist/config/cli/index.d.ts +2 -0
  17. package/dist/{identity/tokenHasAccessKeyId.js → config/cli/index.js} +7 -8
  18. package/dist/config/cli/info.d.ts +6 -0
  19. package/dist/config/cli/info.js +62 -0
  20. package/dist/config/cli/init.d.ts +9 -0
  21. package/dist/config/cli/init.js +152 -0
  22. package/dist/config/cli/main.d.ts +11 -0
  23. package/dist/config/cli/main.js +155 -0
  24. package/dist/config/cli/render.d.ts +44 -0
  25. package/dist/config/cli/render.js +129 -0
  26. package/dist/config/cli/secrets.d.ts +21 -0
  27. package/dist/config/cli/secrets.js +117 -0
  28. package/dist/{utils/findIntegrationsCredentials.d.ts → config/cli/types.d.ts} +6 -5
  29. package/dist/config/cli/types.js +7 -0
  30. package/dist/config/configHints.d.ts +39 -0
  31. package/dist/config/configHints.js +61 -0
  32. package/dist/{voice → config}/index.d.ts +12 -13
  33. package/dist/config/index.js +46 -0
  34. package/dist/config/integrationsSchema.d.ts +32 -0
  35. package/dist/config/integrationsSchema.js +56 -0
  36. package/dist/config/interpolateEnv.d.ts +34 -0
  37. package/dist/config/interpolateEnv.js +70 -0
  38. package/dist/config/loadServiceConfig.d.ts +33 -0
  39. package/dist/config/loadServiceConfig.js +121 -0
  40. package/dist/config/logsSchema.d.ts +76 -0
  41. package/dist/config/logsSchema.js +49 -0
  42. package/dist/config/natsConnection.d.ts +53 -0
  43. package/dist/config/natsConnection.js +58 -0
  44. package/dist/config/parseConfigFile.d.ts +7 -0
  45. package/dist/config/parseConfigFile.js +60 -0
  46. package/dist/config/resolveConfigFile.d.ts +17 -0
  47. package/dist/config/resolveConfigFile.js +54 -0
  48. package/dist/config/resolveSecretRefs.d.ts +35 -0
  49. package/dist/config/resolveSecretRefs.js +129 -0
  50. package/dist/{assistants/audioFiltersSchema.d.ts → config/strictDeep.d.ts} +9 -12
  51. package/dist/config/strictDeep.js +58 -0
  52. package/dist/config/telemetrySchema.d.ts +39 -0
  53. package/dist/config/telemetrySchema.js +44 -0
  54. package/dist/config/toJsonSchema.d.ts +30 -0
  55. package/dist/config/toJsonSchema.js +161 -0
  56. package/dist/constants.d.ts +1 -4
  57. package/dist/constants.js +4 -5
  58. package/dist/envs.d.ts +2 -1
  59. package/dist/envs.js +13 -11
  60. package/dist/identity/createAuthInterceptor.d.ts +9 -2
  61. package/dist/identity/createAuthInterceptor.js +36 -30
  62. package/dist/identity/hasAccess.d.ts +9 -3
  63. package/dist/identity/hasAccess.js +32 -8
  64. package/dist/identity/index.d.ts +1 -0
  65. package/dist/identity/index.js +1 -0
  66. package/dist/identity/isValidToken.d.ts +12 -2
  67. package/dist/identity/isValidToken.js +25 -9
  68. package/dist/identity/roles.js +22 -6
  69. package/dist/identity/types.d.ts +6 -1
  70. package/dist/identity/types.js +1 -0
  71. package/dist/{assistants/LanguageModelProvider.js → identity/verifyAccessToken.d.ts} +10 -11
  72. package/dist/identity/verifyAccessToken.js +44 -0
  73. package/dist/index.d.ts +11 -1
  74. package/dist/index.js +14 -2
  75. package/dist/net/assertPublicDestination.d.ts +52 -0
  76. package/dist/net/assertPublicDestination.js +342 -0
  77. package/dist/{voice/PlayDtmf.d.ts → net/index.d.ts} +1 -5
  78. package/dist/{voice → net}/index.js +1 -13
  79. package/dist/notifications/createSendEmail.js +3 -1
  80. package/dist/protos/applications.proto +124 -3
  81. package/dist/protos/authz.proto +23 -4
  82. package/dist/protos/capabilities.proto +94 -0
  83. package/dist/protos/identity.proto +26 -1
  84. package/dist/protos/providers.proto +135 -0
  85. package/dist/protos/webhooks.proto +140 -0
  86. package/dist/{voice/StopSay.d.ts → regions/hub/index.d.ts} +1 -6
  87. package/dist/regions/hub/index.js +35 -0
  88. package/dist/regions/hub/natsJwt.d.ts +63 -0
  89. package/dist/regions/hub/natsJwt.js +195 -0
  90. package/dist/registry/Registry.d.ts +79 -0
  91. package/dist/registry/Registry.js +418 -0
  92. package/dist/registry/cli.d.ts +20 -0
  93. package/dist/registry/cli.js +424 -0
  94. package/dist/{assistants/audioFiltersSchema.js → registry/features.d.ts} +13 -14
  95. package/dist/registry/features.js +36 -0
  96. package/dist/{assistants/LanguageModelProvider.d.ts → registry/index.d.ts} +6 -8
  97. package/dist/registry/index.js +40 -0
  98. package/dist/registry/prisma.d.ts +67 -0
  99. package/dist/registry/prisma.js +391 -0
  100. package/dist/registry/stores.d.ts +21 -0
  101. package/dist/{assistants/eventsHookSchema.js → registry/stores.js} +55 -18
  102. package/dist/registry/types.d.ts +98 -0
  103. package/dist/{voice/Say.d.ts → registry/types.js} +4 -10
  104. package/dist/registry/workspaceKeys.d.ts +41 -0
  105. package/dist/registry/workspaceKeys.js +64 -0
  106. package/dist/session/index.d.ts +19 -0
  107. package/dist/session/index.js +35 -0
  108. package/dist/session/schema.d.ts +1951 -0
  109. package/dist/session/schema.js +397 -0
  110. package/dist/sessions/index.d.ts +93 -0
  111. package/dist/sessions/index.js +194 -0
  112. package/dist/telemetry.d.ts +76 -0
  113. package/dist/telemetry.js +360 -0
  114. package/dist/types.d.ts +3 -5
  115. package/dist/utils/{findIntegrationsCredentials.js → WriteBehind.d.ts} +13 -10
  116. package/dist/utils/WriteBehind.js +64 -0
  117. package/dist/utils/index.d.ts +1 -1
  118. package/dist/utils/index.js +1 -1
  119. package/dist/{voice/Play.d.ts → utils/logUnhandledRejections.d.ts} +8 -12
  120. package/dist/utils/logUnhandledRejections.js +37 -0
  121. package/dist/validators/calls.d.ts +2 -2
  122. package/dist/validators/calls.js +5 -2
  123. package/dist/validators/identity.d.ts +37 -8
  124. package/dist/validators/identity.js +22 -3
  125. package/dist/validators/index.d.ts +1 -0
  126. package/dist/validators/index.js +1 -0
  127. package/dist/validators/sip.d.ts +40 -0
  128. package/dist/validators/sip.js +99 -0
  129. package/dist/validators/sipnet/credentials.d.ts +2 -2
  130. package/dist/validators/sipnet/domains.js +7 -7
  131. package/dist/validators/sipnet/trunks.d.ts +14 -14
  132. package/dist/validators/sipnet/trunks.js +4 -2
  133. package/dist/webhooks/Dispatcher.d.ts +87 -0
  134. package/dist/webhooks/Dispatcher.js +225 -0
  135. package/dist/webhooks/bus.d.ts +49 -0
  136. package/dist/webhooks/bus.js +170 -0
  137. package/dist/webhooks/events.d.ts +66 -0
  138. package/dist/webhooks/events.js +62 -0
  139. package/dist/webhooks/index.d.ts +23 -0
  140. package/dist/webhooks/index.js +39 -0
  141. package/dist/webhooks/prisma.d.ts +55 -0
  142. package/dist/webhooks/prisma.js +242 -0
  143. package/dist/webhooks/signing.d.ts +8 -0
  144. package/dist/webhooks/signing.js +53 -0
  145. package/package.json +25 -12
  146. package/schema/session.v1.json +791 -0
  147. package/dist/assistants/assistantSchema.d.ts +0 -739
  148. package/dist/assistants/assistantSchema.js +0 -37
  149. package/dist/assistants/conversationSettingsSchema.d.ts +0 -122
  150. package/dist/assistants/conversationSettingsSchema.js +0 -133
  151. package/dist/assistants/eventsHookSchema.d.ts +0 -38
  152. package/dist/assistants/languageModelConfigSchema.d.ts +0 -206
  153. package/dist/assistants/languageModelConfigSchema.js +0 -91
  154. package/dist/identity/tokenHasAccessKeyId.d.ts +0 -2
  155. package/dist/protos/voice.proto +0 -557
  156. package/dist/voice/Dial.js +0 -20
  157. package/dist/voice/Gather.d.ts +0 -37
  158. package/dist/voice/Gather.js +0 -9
  159. package/dist/voice/Mute.d.ts +0 -31
  160. package/dist/voice/Mute.js +0 -9
  161. package/dist/voice/Play.js +0 -2
  162. package/dist/voice/PlayDtmf.js +0 -2
  163. package/dist/voice/PlaybackControl.d.ts +0 -31
  164. package/dist/voice/PlaybackControl.js +0 -11
  165. package/dist/voice/Record.d.ts +0 -36
  166. package/dist/voice/Record.js +0 -7
  167. package/dist/voice/Say.js +0 -2
  168. package/dist/voice/StopSay.js +0 -2
  169. package/dist/voice/Stream.d.ts +0 -53
  170. package/dist/voice/Stream.js +0 -19
  171. package/dist/voice/StreamGather.d.ts +0 -34
  172. package/dist/voice/StreamGather.js +0 -9
  173. package/dist/voice/Verb.d.ts +0 -27
  174. package/dist/voice/Verb.js +0 -2
  175. package/dist/voice/voice.d.ts +0 -171
  176. package/dist/voice/voice.js +0 -65
@@ -0,0 +1,1951 @@
1
+ /**
2
+ * Copyright (C) 2025 by Fonoster Inc (https://fonoster.com)
3
+ * http://github.com/fonoster/fonoster
4
+ *
5
+ * This file is part of Fonoster
6
+ *
7
+ * Licensed under the MIT License (the "License");
8
+ * you may not use this file except in compliance with
9
+ * the License. You may obtain a copy of the License at
10
+ *
11
+ * https://opensource.org/licenses/MIT
12
+ *
13
+ * Unless required by applicable law or agreed to in writing, software
14
+ * distributed under the License is distributed on an "AS IS" BASIS,
15
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
+ * See the License for the specific language governing permissions and
17
+ * limitations under the License.
18
+ */
19
+ import { FromSchema } from "json-schema-to-ts";
20
+ export declare const SESSION_PROTOCOL = "fonoster.session.v1";
21
+ export declare const sessionStartSchema: {
22
+ readonly type: "object";
23
+ readonly required: readonly ["type", "protocol", "sessionRef", "callRef", "appRef", "direction", "from", "to", "metadata", "handoff", "audio", "tracks", "speech"];
24
+ readonly properties: {
25
+ readonly type: {
26
+ readonly const: "session.start";
27
+ };
28
+ readonly protocol: {
29
+ readonly const: "fonoster.session.v1";
30
+ };
31
+ readonly sessionRef: {
32
+ readonly type: "string";
33
+ };
34
+ readonly callRef: {
35
+ readonly type: "string";
36
+ };
37
+ readonly appRef: {
38
+ readonly type: "string";
39
+ };
40
+ readonly direction: {
41
+ readonly enum: readonly ["inbound", "outbound"];
42
+ };
43
+ readonly from: {
44
+ readonly type: "string";
45
+ };
46
+ readonly to: {
47
+ readonly type: "string";
48
+ };
49
+ readonly metadata: {
50
+ readonly type: "object";
51
+ };
52
+ readonly handoff: {
53
+ readonly oneOf: readonly [{
54
+ readonly type: "null";
55
+ }, {
56
+ readonly type: "object";
57
+ }];
58
+ };
59
+ readonly audio: {
60
+ readonly type: "object";
61
+ readonly required: readonly ["codec", "rate"];
62
+ readonly properties: {
63
+ readonly codec: {
64
+ readonly enum: readonly ["pcm16", "pcmu"];
65
+ };
66
+ readonly rate: {
67
+ readonly enum: readonly [8000, 16000, 24000];
68
+ };
69
+ };
70
+ };
71
+ readonly tracks: {
72
+ readonly type: "array";
73
+ readonly items: {
74
+ readonly type: "object";
75
+ readonly required: readonly ["id", "side", "kind", "codec"];
76
+ readonly properties: {
77
+ readonly id: {
78
+ readonly type: "integer";
79
+ readonly minimum: 0;
80
+ readonly maximum: 255;
81
+ };
82
+ readonly side: {
83
+ readonly enum: readonly ["inbound", "outbound"];
84
+ };
85
+ readonly kind: {
86
+ readonly enum: readonly ["audio"];
87
+ };
88
+ readonly codec: {
89
+ readonly type: "string";
90
+ };
91
+ };
92
+ };
93
+ };
94
+ readonly speech: {
95
+ readonly type: "object";
96
+ readonly required: readonly ["voice", "language"];
97
+ readonly properties: {
98
+ readonly voice: {
99
+ readonly type: "string";
100
+ };
101
+ readonly language: {
102
+ readonly type: "string";
103
+ };
104
+ };
105
+ };
106
+ };
107
+ };
108
+ export declare const SESSION_END_REASONS: readonly ["caller_hangup", "app_hangup", "transfer", "handoff", "error", "timeout"];
109
+ export declare const sessionEndSchema: {
110
+ readonly type: "object";
111
+ readonly required: readonly ["type", "reason"];
112
+ readonly properties: {
113
+ readonly type: {
114
+ readonly const: "session.end";
115
+ };
116
+ readonly reason: {
117
+ readonly enum: readonly ["caller_hangup", "app_hangup", "transfer", "handoff", "error", "timeout"];
118
+ };
119
+ };
120
+ };
121
+ export declare const ERROR_CODES: readonly ["bad_message", "unknown_command", "read_only", "not_supported_by_protocol", "provider_unavailable", "provider_timeout", "invalid_catalog_id", "feature_not_supported", "transfer_failed", "on_hold", "queue_full", "play_fetch_failed", "internal"];
122
+ export declare const errorSchema: {
123
+ readonly type: "object";
124
+ readonly required: readonly ["type", "code", "message", "fatal"];
125
+ readonly properties: {
126
+ readonly type: {
127
+ readonly const: "error";
128
+ };
129
+ readonly code: {
130
+ readonly type: "string";
131
+ };
132
+ readonly message: {
133
+ readonly type: "string";
134
+ };
135
+ readonly fatal: {
136
+ readonly type: "boolean";
137
+ };
138
+ readonly relatesTo: {
139
+ readonly type: "string";
140
+ readonly minLength: 1;
141
+ readonly maxLength: 128;
142
+ };
143
+ };
144
+ };
145
+ export declare const turnUserStartedSchema: {
146
+ readonly type: "object";
147
+ readonly required: readonly ["type"];
148
+ readonly properties: {
149
+ readonly type: {
150
+ readonly const: "turn.user_started";
151
+ };
152
+ };
153
+ };
154
+ export declare const turnLikelyEndedSchema: {
155
+ readonly type: "object";
156
+ readonly required: readonly ["type", "text"];
157
+ readonly properties: {
158
+ readonly type: {
159
+ readonly const: "turn.likely_ended";
160
+ };
161
+ readonly text: {
162
+ readonly type: "string";
163
+ };
164
+ };
165
+ };
166
+ export declare const turnEndedSchema: {
167
+ readonly type: "object";
168
+ readonly required: readonly ["type", "text", "language", "confidence", "durationMs"];
169
+ readonly properties: {
170
+ readonly type: {
171
+ readonly const: "turn.ended";
172
+ };
173
+ readonly text: {
174
+ readonly type: "string";
175
+ };
176
+ readonly language: {
177
+ readonly type: "string";
178
+ };
179
+ readonly confidence: {
180
+ readonly type: "number";
181
+ readonly minimum: 0;
182
+ readonly maximum: 1;
183
+ };
184
+ readonly durationMs: {
185
+ readonly type: "number";
186
+ readonly minimum: 0;
187
+ };
188
+ /** No speech followed turn.user_started for 10 s (noise, a dropped line). */
189
+ readonly abandoned: {
190
+ readonly type: "boolean";
191
+ };
192
+ };
193
+ };
194
+ export declare const turnResumedSchema: {
195
+ readonly type: "object";
196
+ readonly required: readonly ["type"];
197
+ readonly properties: {
198
+ readonly type: {
199
+ readonly const: "turn.resumed";
200
+ };
201
+ };
202
+ };
203
+ export declare const turnBackchannelSchema: {
204
+ readonly type: "object";
205
+ readonly required: readonly ["type", "text"];
206
+ readonly properties: {
207
+ readonly type: {
208
+ readonly const: "turn.backchannel";
209
+ };
210
+ readonly text: {
211
+ readonly type: "string";
212
+ };
213
+ };
214
+ };
215
+ export declare const turnEstimateSchema: {
216
+ readonly type: "object";
217
+ readonly required: readonly ["type", "eot", "speaking", "kind"];
218
+ readonly properties: {
219
+ readonly type: {
220
+ readonly const: "turn.estimate";
221
+ };
222
+ readonly eot: {
223
+ readonly type: "number";
224
+ readonly minimum: 0;
225
+ readonly maximum: 1;
226
+ };
227
+ readonly speaking: {
228
+ readonly type: "boolean";
229
+ };
230
+ readonly kind: {
231
+ readonly enum: readonly ["speech", "backchannel", "interruption", "none"];
232
+ };
233
+ };
234
+ };
235
+ export declare const transcriptPartialSchema: {
236
+ readonly type: "object";
237
+ readonly required: readonly ["type", "text"];
238
+ readonly properties: {
239
+ readonly type: {
240
+ readonly const: "transcript.partial";
241
+ };
242
+ readonly text: {
243
+ readonly type: "string";
244
+ };
245
+ readonly language: {
246
+ readonly type: "string";
247
+ };
248
+ };
249
+ };
250
+ export declare const outputStartedSchema: {
251
+ readonly type: "object";
252
+ readonly required: readonly ["type", "id"];
253
+ readonly properties: {
254
+ readonly type: {
255
+ readonly const: "output.started";
256
+ };
257
+ readonly id: {
258
+ readonly type: "string";
259
+ readonly minLength: 1;
260
+ readonly maxLength: 128;
261
+ };
262
+ };
263
+ };
264
+ export declare const outputDoneSchema: {
265
+ readonly type: "object";
266
+ readonly required: readonly ["type", "id"];
267
+ readonly properties: {
268
+ readonly type: {
269
+ readonly const: "output.done";
270
+ };
271
+ readonly id: {
272
+ readonly type: "string";
273
+ readonly minLength: 1;
274
+ readonly maxLength: 128;
275
+ };
276
+ readonly heardMs: {
277
+ readonly type: "number";
278
+ readonly minimum: 0;
279
+ };
280
+ };
281
+ };
282
+ export declare const outputInterruptedSchema: {
283
+ readonly type: "object";
284
+ readonly required: readonly ["type", "id", "heardText", "heardMs"];
285
+ readonly properties: {
286
+ readonly type: {
287
+ readonly const: "output.interrupted";
288
+ };
289
+ readonly id: {
290
+ readonly type: "string";
291
+ readonly minLength: 1;
292
+ readonly maxLength: 128;
293
+ };
294
+ readonly heardText: {
295
+ readonly type: "string";
296
+ };
297
+ readonly heardMs: {
298
+ readonly type: "number";
299
+ readonly minimum: 0;
300
+ };
301
+ };
302
+ };
303
+ export declare const markEventSchema: {
304
+ readonly type: "object";
305
+ readonly required: readonly ["type", "name", "cleared"];
306
+ readonly properties: {
307
+ readonly type: {
308
+ readonly const: "mark";
309
+ };
310
+ readonly name: {
311
+ readonly type: "string";
312
+ };
313
+ readonly cleared: {
314
+ readonly type: "boolean";
315
+ };
316
+ };
317
+ };
318
+ export declare const dtmfEventSchema: {
319
+ readonly type: "object";
320
+ readonly required: readonly ["type", "digit"];
321
+ readonly properties: {
322
+ readonly type: {
323
+ readonly const: "dtmf";
324
+ };
325
+ readonly digit: {
326
+ readonly type: "string";
327
+ readonly pattern: "^[0-9A-D*#]$";
328
+ };
329
+ };
330
+ };
331
+ /** Answering-machine detection, once per call, for apps with `amd` (add-media-node 4.3). */
332
+ export declare const amdResultSchema: {
333
+ readonly type: "object";
334
+ readonly required: readonly ["type", "status", "confidence", "detector", "audioMs"];
335
+ readonly properties: {
336
+ readonly type: {
337
+ readonly const: "amd.result";
338
+ };
339
+ readonly status: {
340
+ readonly enum: readonly ["human", "voicemail", "ivr", "machine", "unknown"];
341
+ };
342
+ readonly confidence: {
343
+ readonly type: "number";
344
+ readonly minimum: 0;
345
+ readonly maximum: 1;
346
+ };
347
+ readonly detector: {
348
+ readonly type: "string";
349
+ };
350
+ /** How much caller audio the verdict is based on, from when the caller started speaking. */
351
+ readonly audioMs: {
352
+ readonly type: "number";
353
+ readonly minimum: 0;
354
+ };
355
+ /** Caller audio received before speech began (unset when the caller never spoke). */
356
+ readonly speechOnsetMs: {
357
+ readonly type: "number";
358
+ readonly minimum: 0;
359
+ };
360
+ /** Why detection could not run (status unknown): no_audio, no_speech, no_classifier, call_ended, … */
361
+ readonly reason: {
362
+ readonly type: "string";
363
+ };
364
+ };
365
+ };
366
+ export declare const speakSchema: {
367
+ readonly type: "object";
368
+ readonly required: readonly ["type", "text"];
369
+ readonly properties: {
370
+ readonly type: {
371
+ readonly const: "speak";
372
+ };
373
+ readonly id: {
374
+ readonly type: "string";
375
+ readonly minLength: 1;
376
+ readonly maxLength: 128;
377
+ };
378
+ readonly text: {
379
+ readonly type: "string";
380
+ };
381
+ readonly last: {
382
+ readonly type: "boolean";
383
+ };
384
+ readonly voice: {
385
+ readonly type: "string";
386
+ readonly minLength: 1;
387
+ };
388
+ readonly language: {
389
+ readonly type: "string";
390
+ readonly minLength: 1;
391
+ };
392
+ readonly interruptible: {
393
+ readonly type: "boolean";
394
+ };
395
+ readonly preempt: {
396
+ readonly type: "boolean";
397
+ };
398
+ };
399
+ };
400
+ export declare const playSchema: {
401
+ readonly type: "object";
402
+ readonly required: readonly ["type", "url"];
403
+ readonly properties: {
404
+ readonly type: {
405
+ readonly const: "play";
406
+ };
407
+ readonly id: {
408
+ readonly type: "string";
409
+ readonly minLength: 1;
410
+ readonly maxLength: 128;
411
+ };
412
+ readonly url: {
413
+ readonly type: "string";
414
+ readonly pattern: "^https?://";
415
+ };
416
+ readonly loop: {
417
+ readonly type: "boolean";
418
+ };
419
+ readonly interruptible: {
420
+ readonly type: "boolean";
421
+ };
422
+ readonly preempt: {
423
+ readonly type: "boolean";
424
+ };
425
+ };
426
+ };
427
+ export declare const listenUpdateSchema: {
428
+ readonly type: "object";
429
+ readonly required: readonly ["type"];
430
+ readonly properties: {
431
+ readonly type: {
432
+ readonly const: "listen.update";
433
+ };
434
+ readonly id: {
435
+ readonly type: "string";
436
+ readonly minLength: 1;
437
+ readonly maxLength: 128;
438
+ };
439
+ readonly language: {
440
+ readonly type: "string";
441
+ readonly minLength: 1;
442
+ };
443
+ readonly hints: {
444
+ readonly type: "array";
445
+ readonly items: {
446
+ readonly type: "string";
447
+ };
448
+ };
449
+ /** How long the Turn Detector waits before turn.ended. */
450
+ readonly patience: {
451
+ readonly enum: readonly ["low", "normal", "high"];
452
+ };
453
+ };
454
+ };
455
+ export declare const SUBSCRIBABLE_EVENTS: readonly ["turn.estimate", "transcript.partial"];
456
+ export declare const subscribeSchema: {
457
+ readonly type: "object";
458
+ readonly required: readonly ["type", "events"];
459
+ readonly properties: {
460
+ readonly type: {
461
+ readonly const: "subscribe";
462
+ };
463
+ readonly id: {
464
+ readonly type: "string";
465
+ readonly minLength: 1;
466
+ readonly maxLength: 128;
467
+ };
468
+ readonly events: {
469
+ readonly type: "array";
470
+ readonly items: {
471
+ readonly type: "string";
472
+ };
473
+ };
474
+ };
475
+ };
476
+ export declare const markCommandSchema: {
477
+ readonly type: "object";
478
+ readonly required: readonly ["type", "name"];
479
+ readonly properties: {
480
+ readonly type: {
481
+ readonly const: "mark";
482
+ };
483
+ readonly name: {
484
+ readonly type: "string";
485
+ readonly minLength: 1;
486
+ };
487
+ };
488
+ };
489
+ export declare const clearSchema: {
490
+ readonly type: "object";
491
+ readonly required: readonly ["type"];
492
+ readonly properties: {
493
+ readonly type: {
494
+ readonly const: "clear";
495
+ };
496
+ readonly id: {
497
+ readonly type: "string";
498
+ readonly minLength: 1;
499
+ readonly maxLength: 128;
500
+ };
501
+ };
502
+ };
503
+ export declare const hangupSchema: {
504
+ readonly type: "object";
505
+ readonly required: readonly ["type"];
506
+ readonly properties: {
507
+ readonly type: {
508
+ readonly const: "hangup";
509
+ };
510
+ readonly id: {
511
+ readonly type: "string";
512
+ readonly minLength: 1;
513
+ readonly maxLength: 128;
514
+ };
515
+ };
516
+ };
517
+ export declare const dtmfSendSchema: {
518
+ readonly type: "object";
519
+ readonly required: readonly ["type", "digits"];
520
+ readonly properties: {
521
+ readonly type: {
522
+ readonly const: "dtmf.send";
523
+ };
524
+ readonly id: {
525
+ readonly type: "string";
526
+ readonly minLength: 1;
527
+ readonly maxLength: 128;
528
+ };
529
+ readonly digits: {
530
+ readonly type: "string";
531
+ readonly pattern: "^[0-9A-D*#w]+$";
532
+ };
533
+ };
534
+ };
535
+ export declare const TRANSFER_MODES: readonly ["cold", "warm", "refer"];
536
+ export declare const transferSchema: {
537
+ readonly type: "object";
538
+ readonly required: readonly ["type", "to"];
539
+ readonly properties: {
540
+ readonly type: {
541
+ readonly const: "transfer";
542
+ };
543
+ readonly id: {
544
+ readonly type: "string";
545
+ readonly minLength: 1;
546
+ readonly maxLength: 128;
547
+ };
548
+ readonly to: {
549
+ readonly type: "string";
550
+ readonly minLength: 1;
551
+ };
552
+ readonly headers: {
553
+ readonly type: "object";
554
+ readonly additionalProperties: {
555
+ readonly type: "string";
556
+ };
557
+ };
558
+ readonly mode: {
559
+ readonly enum: readonly ["cold", "warm", "refer"];
560
+ };
561
+ /** Warm transfers: what the caller hears while waiting. */
562
+ readonly music: {
563
+ readonly type: "string";
564
+ };
565
+ };
566
+ };
567
+ export declare const transferCompleteSchema: {
568
+ readonly type: "object";
569
+ readonly required: readonly ["type", "id"];
570
+ readonly properties: {
571
+ readonly type: {
572
+ readonly const: "transfer.complete";
573
+ };
574
+ readonly id: {
575
+ readonly type: "string";
576
+ readonly minLength: 1;
577
+ readonly maxLength: 128;
578
+ };
579
+ };
580
+ };
581
+ export declare const holdSchema: {
582
+ readonly type: "object";
583
+ readonly required: readonly ["type"];
584
+ readonly properties: {
585
+ readonly type: {
586
+ readonly const: "hold";
587
+ };
588
+ readonly id: {
589
+ readonly type: "string";
590
+ readonly minLength: 1;
591
+ readonly maxLength: 128;
592
+ };
593
+ readonly music: {
594
+ readonly type: "string";
595
+ };
596
+ };
597
+ };
598
+ export declare const resumeSchema: {
599
+ readonly type: "object";
600
+ readonly required: readonly ["type"];
601
+ readonly properties: {
602
+ readonly type: {
603
+ readonly const: "resume";
604
+ };
605
+ readonly id: {
606
+ readonly type: "string";
607
+ readonly minLength: 1;
608
+ readonly maxLength: 128;
609
+ };
610
+ };
611
+ };
612
+ export declare const handoffSchema: {
613
+ readonly type: "object";
614
+ readonly required: readonly ["type", "app"];
615
+ readonly properties: {
616
+ readonly type: {
617
+ readonly const: "handoff";
618
+ };
619
+ readonly id: {
620
+ readonly type: "string";
621
+ readonly minLength: 1;
622
+ readonly maxLength: 128;
623
+ };
624
+ readonly app: {
625
+ readonly type: "string";
626
+ readonly minLength: 1;
627
+ };
628
+ readonly payload: {
629
+ readonly type: "object";
630
+ };
631
+ };
632
+ };
633
+ export declare const recordNoteSchema: {
634
+ readonly type: "object";
635
+ readonly required: readonly ["type", "data"];
636
+ readonly properties: {
637
+ readonly type: {
638
+ readonly const: "record.note";
639
+ };
640
+ readonly id: {
641
+ readonly type: "string";
642
+ readonly minLength: 1;
643
+ readonly maxLength: 128;
644
+ };
645
+ readonly data: {
646
+ readonly type: "object";
647
+ };
648
+ };
649
+ };
650
+ export type SessionStart = FromSchema<typeof sessionStartSchema>;
651
+ export type SessionEnd = FromSchema<typeof sessionEndSchema>;
652
+ export type SessionEndReason = (typeof SESSION_END_REASONS)[number];
653
+ export type SessionError = FromSchema<typeof errorSchema>;
654
+ export type ErrorCode = (typeof ERROR_CODES)[number];
655
+ export type TurnUserStarted = FromSchema<typeof turnUserStartedSchema>;
656
+ export type TurnLikelyEnded = FromSchema<typeof turnLikelyEndedSchema>;
657
+ export type TurnEnded = FromSchema<typeof turnEndedSchema>;
658
+ export type TurnResumed = FromSchema<typeof turnResumedSchema>;
659
+ export type TurnBackchannel = FromSchema<typeof turnBackchannelSchema>;
660
+ export type TurnEstimate = FromSchema<typeof turnEstimateSchema>;
661
+ export type TranscriptPartial = FromSchema<typeof transcriptPartialSchema>;
662
+ export type OutputStarted = FromSchema<typeof outputStartedSchema>;
663
+ export type OutputDone = FromSchema<typeof outputDoneSchema>;
664
+ export type OutputInterrupted = FromSchema<typeof outputInterruptedSchema>;
665
+ export type MarkEvent = FromSchema<typeof markEventSchema>;
666
+ export type DtmfEvent = FromSchema<typeof dtmfEventSchema>;
667
+ export type AmdResult = FromSchema<typeof amdResultSchema>;
668
+ export type Speak = FromSchema<typeof speakSchema>;
669
+ export type Play = FromSchema<typeof playSchema>;
670
+ export type ListenUpdate = FromSchema<typeof listenUpdateSchema>;
671
+ export type Subscribe = FromSchema<typeof subscribeSchema>;
672
+ export type MarkCommand = FromSchema<typeof markCommandSchema>;
673
+ export type Clear = FromSchema<typeof clearSchema>;
674
+ export type Hangup = FromSchema<typeof hangupSchema>;
675
+ export type DtmfSend = FromSchema<typeof dtmfSendSchema>;
676
+ export type Transfer = FromSchema<typeof transferSchema>;
677
+ export type TransferMode = (typeof TRANSFER_MODES)[number];
678
+ export type TransferComplete = FromSchema<typeof transferCompleteSchema>;
679
+ export type Hold = FromSchema<typeof holdSchema>;
680
+ export type Resume = FromSchema<typeof resumeSchema>;
681
+ export type Handoff = FromSchema<typeof handoffSchema>;
682
+ export type RecordNote = FromSchema<typeof recordNoteSchema>;
683
+ export type GatewayMessage = SessionStart | SessionEnd | SessionError | TurnUserStarted | TurnLikelyEnded | TurnEnded | TurnResumed | TurnBackchannel | TurnEstimate | TranscriptPartial | OutputStarted | OutputDone | OutputInterrupted | MarkEvent | DtmfEvent | AmdResult;
684
+ export type AppCommand = Speak | Play | ListenUpdate | Subscribe | MarkCommand | Clear | Hangup | DtmfSend | Transfer | TransferComplete | Hold | Resume | Handoff | RecordNote;
685
+ /** Schemas by message type, per direction. "mark" exists in both directions. */
686
+ export declare const GATEWAY_MESSAGE_SCHEMAS: {
687
+ readonly "session.start": {
688
+ readonly type: "object";
689
+ readonly required: readonly ["type", "protocol", "sessionRef", "callRef", "appRef", "direction", "from", "to", "metadata", "handoff", "audio", "tracks", "speech"];
690
+ readonly properties: {
691
+ readonly type: {
692
+ readonly const: "session.start";
693
+ };
694
+ readonly protocol: {
695
+ readonly const: "fonoster.session.v1";
696
+ };
697
+ readonly sessionRef: {
698
+ readonly type: "string";
699
+ };
700
+ readonly callRef: {
701
+ readonly type: "string";
702
+ };
703
+ readonly appRef: {
704
+ readonly type: "string";
705
+ };
706
+ readonly direction: {
707
+ readonly enum: readonly ["inbound", "outbound"];
708
+ };
709
+ readonly from: {
710
+ readonly type: "string";
711
+ };
712
+ readonly to: {
713
+ readonly type: "string";
714
+ };
715
+ readonly metadata: {
716
+ readonly type: "object";
717
+ };
718
+ readonly handoff: {
719
+ readonly oneOf: readonly [{
720
+ readonly type: "null";
721
+ }, {
722
+ readonly type: "object";
723
+ }];
724
+ };
725
+ readonly audio: {
726
+ readonly type: "object";
727
+ readonly required: readonly ["codec", "rate"];
728
+ readonly properties: {
729
+ readonly codec: {
730
+ readonly enum: readonly ["pcm16", "pcmu"];
731
+ };
732
+ readonly rate: {
733
+ readonly enum: readonly [8000, 16000, 24000];
734
+ };
735
+ };
736
+ };
737
+ readonly tracks: {
738
+ readonly type: "array";
739
+ readonly items: {
740
+ readonly type: "object";
741
+ readonly required: readonly ["id", "side", "kind", "codec"];
742
+ readonly properties: {
743
+ readonly id: {
744
+ readonly type: "integer";
745
+ readonly minimum: 0;
746
+ readonly maximum: 255;
747
+ };
748
+ readonly side: {
749
+ readonly enum: readonly ["inbound", "outbound"];
750
+ };
751
+ readonly kind: {
752
+ readonly enum: readonly ["audio"];
753
+ };
754
+ readonly codec: {
755
+ readonly type: "string";
756
+ };
757
+ };
758
+ };
759
+ };
760
+ readonly speech: {
761
+ readonly type: "object";
762
+ readonly required: readonly ["voice", "language"];
763
+ readonly properties: {
764
+ readonly voice: {
765
+ readonly type: "string";
766
+ };
767
+ readonly language: {
768
+ readonly type: "string";
769
+ };
770
+ };
771
+ };
772
+ };
773
+ };
774
+ readonly "session.end": {
775
+ readonly type: "object";
776
+ readonly required: readonly ["type", "reason"];
777
+ readonly properties: {
778
+ readonly type: {
779
+ readonly const: "session.end";
780
+ };
781
+ readonly reason: {
782
+ readonly enum: readonly ["caller_hangup", "app_hangup", "transfer", "handoff", "error", "timeout"];
783
+ };
784
+ };
785
+ };
786
+ readonly error: {
787
+ readonly type: "object";
788
+ readonly required: readonly ["type", "code", "message", "fatal"];
789
+ readonly properties: {
790
+ readonly type: {
791
+ readonly const: "error";
792
+ };
793
+ readonly code: {
794
+ readonly type: "string";
795
+ };
796
+ readonly message: {
797
+ readonly type: "string";
798
+ };
799
+ readonly fatal: {
800
+ readonly type: "boolean";
801
+ };
802
+ readonly relatesTo: {
803
+ readonly type: "string";
804
+ readonly minLength: 1;
805
+ readonly maxLength: 128;
806
+ };
807
+ };
808
+ };
809
+ readonly "turn.user_started": {
810
+ readonly type: "object";
811
+ readonly required: readonly ["type"];
812
+ readonly properties: {
813
+ readonly type: {
814
+ readonly const: "turn.user_started";
815
+ };
816
+ };
817
+ };
818
+ readonly "turn.likely_ended": {
819
+ readonly type: "object";
820
+ readonly required: readonly ["type", "text"];
821
+ readonly properties: {
822
+ readonly type: {
823
+ readonly const: "turn.likely_ended";
824
+ };
825
+ readonly text: {
826
+ readonly type: "string";
827
+ };
828
+ };
829
+ };
830
+ readonly "turn.ended": {
831
+ readonly type: "object";
832
+ readonly required: readonly ["type", "text", "language", "confidence", "durationMs"];
833
+ readonly properties: {
834
+ readonly type: {
835
+ readonly const: "turn.ended";
836
+ };
837
+ readonly text: {
838
+ readonly type: "string";
839
+ };
840
+ readonly language: {
841
+ readonly type: "string";
842
+ };
843
+ readonly confidence: {
844
+ readonly type: "number";
845
+ readonly minimum: 0;
846
+ readonly maximum: 1;
847
+ };
848
+ readonly durationMs: {
849
+ readonly type: "number";
850
+ readonly minimum: 0;
851
+ };
852
+ /** No speech followed turn.user_started for 10 s (noise, a dropped line). */
853
+ readonly abandoned: {
854
+ readonly type: "boolean";
855
+ };
856
+ };
857
+ };
858
+ readonly "turn.resumed": {
859
+ readonly type: "object";
860
+ readonly required: readonly ["type"];
861
+ readonly properties: {
862
+ readonly type: {
863
+ readonly const: "turn.resumed";
864
+ };
865
+ };
866
+ };
867
+ readonly "turn.backchannel": {
868
+ readonly type: "object";
869
+ readonly required: readonly ["type", "text"];
870
+ readonly properties: {
871
+ readonly type: {
872
+ readonly const: "turn.backchannel";
873
+ };
874
+ readonly text: {
875
+ readonly type: "string";
876
+ };
877
+ };
878
+ };
879
+ readonly "turn.estimate": {
880
+ readonly type: "object";
881
+ readonly required: readonly ["type", "eot", "speaking", "kind"];
882
+ readonly properties: {
883
+ readonly type: {
884
+ readonly const: "turn.estimate";
885
+ };
886
+ readonly eot: {
887
+ readonly type: "number";
888
+ readonly minimum: 0;
889
+ readonly maximum: 1;
890
+ };
891
+ readonly speaking: {
892
+ readonly type: "boolean";
893
+ };
894
+ readonly kind: {
895
+ readonly enum: readonly ["speech", "backchannel", "interruption", "none"];
896
+ };
897
+ };
898
+ };
899
+ readonly "transcript.partial": {
900
+ readonly type: "object";
901
+ readonly required: readonly ["type", "text"];
902
+ readonly properties: {
903
+ readonly type: {
904
+ readonly const: "transcript.partial";
905
+ };
906
+ readonly text: {
907
+ readonly type: "string";
908
+ };
909
+ readonly language: {
910
+ readonly type: "string";
911
+ };
912
+ };
913
+ };
914
+ readonly "output.started": {
915
+ readonly type: "object";
916
+ readonly required: readonly ["type", "id"];
917
+ readonly properties: {
918
+ readonly type: {
919
+ readonly const: "output.started";
920
+ };
921
+ readonly id: {
922
+ readonly type: "string";
923
+ readonly minLength: 1;
924
+ readonly maxLength: 128;
925
+ };
926
+ };
927
+ };
928
+ readonly "output.done": {
929
+ readonly type: "object";
930
+ readonly required: readonly ["type", "id"];
931
+ readonly properties: {
932
+ readonly type: {
933
+ readonly const: "output.done";
934
+ };
935
+ readonly id: {
936
+ readonly type: "string";
937
+ readonly minLength: 1;
938
+ readonly maxLength: 128;
939
+ };
940
+ readonly heardMs: {
941
+ readonly type: "number";
942
+ readonly minimum: 0;
943
+ };
944
+ };
945
+ };
946
+ readonly "output.interrupted": {
947
+ readonly type: "object";
948
+ readonly required: readonly ["type", "id", "heardText", "heardMs"];
949
+ readonly properties: {
950
+ readonly type: {
951
+ readonly const: "output.interrupted";
952
+ };
953
+ readonly id: {
954
+ readonly type: "string";
955
+ readonly minLength: 1;
956
+ readonly maxLength: 128;
957
+ };
958
+ readonly heardText: {
959
+ readonly type: "string";
960
+ };
961
+ readonly heardMs: {
962
+ readonly type: "number";
963
+ readonly minimum: 0;
964
+ };
965
+ };
966
+ };
967
+ readonly mark: {
968
+ readonly type: "object";
969
+ readonly required: readonly ["type", "name", "cleared"];
970
+ readonly properties: {
971
+ readonly type: {
972
+ readonly const: "mark";
973
+ };
974
+ readonly name: {
975
+ readonly type: "string";
976
+ };
977
+ readonly cleared: {
978
+ readonly type: "boolean";
979
+ };
980
+ };
981
+ };
982
+ readonly dtmf: {
983
+ readonly type: "object";
984
+ readonly required: readonly ["type", "digit"];
985
+ readonly properties: {
986
+ readonly type: {
987
+ readonly const: "dtmf";
988
+ };
989
+ readonly digit: {
990
+ readonly type: "string";
991
+ readonly pattern: "^[0-9A-D*#]$";
992
+ };
993
+ };
994
+ };
995
+ readonly "amd.result": {
996
+ readonly type: "object";
997
+ readonly required: readonly ["type", "status", "confidence", "detector", "audioMs"];
998
+ readonly properties: {
999
+ readonly type: {
1000
+ readonly const: "amd.result";
1001
+ };
1002
+ readonly status: {
1003
+ readonly enum: readonly ["human", "voicemail", "ivr", "machine", "unknown"];
1004
+ };
1005
+ readonly confidence: {
1006
+ readonly type: "number";
1007
+ readonly minimum: 0;
1008
+ readonly maximum: 1;
1009
+ };
1010
+ readonly detector: {
1011
+ readonly type: "string";
1012
+ };
1013
+ /** How much caller audio the verdict is based on, from when the caller started speaking. */
1014
+ readonly audioMs: {
1015
+ readonly type: "number";
1016
+ readonly minimum: 0;
1017
+ };
1018
+ /** Caller audio received before speech began (unset when the caller never spoke). */
1019
+ readonly speechOnsetMs: {
1020
+ readonly type: "number";
1021
+ readonly minimum: 0;
1022
+ };
1023
+ /** Why detection could not run (status unknown): no_audio, no_speech, no_classifier, call_ended, … */
1024
+ readonly reason: {
1025
+ readonly type: "string";
1026
+ };
1027
+ };
1028
+ };
1029
+ };
1030
+ export declare const APP_COMMAND_SCHEMAS: {
1031
+ readonly speak: {
1032
+ readonly type: "object";
1033
+ readonly required: readonly ["type", "text"];
1034
+ readonly properties: {
1035
+ readonly type: {
1036
+ readonly const: "speak";
1037
+ };
1038
+ readonly id: {
1039
+ readonly type: "string";
1040
+ readonly minLength: 1;
1041
+ readonly maxLength: 128;
1042
+ };
1043
+ readonly text: {
1044
+ readonly type: "string";
1045
+ };
1046
+ readonly last: {
1047
+ readonly type: "boolean";
1048
+ };
1049
+ readonly voice: {
1050
+ readonly type: "string";
1051
+ readonly minLength: 1;
1052
+ };
1053
+ readonly language: {
1054
+ readonly type: "string";
1055
+ readonly minLength: 1;
1056
+ };
1057
+ readonly interruptible: {
1058
+ readonly type: "boolean";
1059
+ };
1060
+ readonly preempt: {
1061
+ readonly type: "boolean";
1062
+ };
1063
+ };
1064
+ };
1065
+ readonly play: {
1066
+ readonly type: "object";
1067
+ readonly required: readonly ["type", "url"];
1068
+ readonly properties: {
1069
+ readonly type: {
1070
+ readonly const: "play";
1071
+ };
1072
+ readonly id: {
1073
+ readonly type: "string";
1074
+ readonly minLength: 1;
1075
+ readonly maxLength: 128;
1076
+ };
1077
+ readonly url: {
1078
+ readonly type: "string";
1079
+ readonly pattern: "^https?://";
1080
+ };
1081
+ readonly loop: {
1082
+ readonly type: "boolean";
1083
+ };
1084
+ readonly interruptible: {
1085
+ readonly type: "boolean";
1086
+ };
1087
+ readonly preempt: {
1088
+ readonly type: "boolean";
1089
+ };
1090
+ };
1091
+ };
1092
+ readonly "listen.update": {
1093
+ readonly type: "object";
1094
+ readonly required: readonly ["type"];
1095
+ readonly properties: {
1096
+ readonly type: {
1097
+ readonly const: "listen.update";
1098
+ };
1099
+ readonly id: {
1100
+ readonly type: "string";
1101
+ readonly minLength: 1;
1102
+ readonly maxLength: 128;
1103
+ };
1104
+ readonly language: {
1105
+ readonly type: "string";
1106
+ readonly minLength: 1;
1107
+ };
1108
+ readonly hints: {
1109
+ readonly type: "array";
1110
+ readonly items: {
1111
+ readonly type: "string";
1112
+ };
1113
+ };
1114
+ /** How long the Turn Detector waits before turn.ended. */
1115
+ readonly patience: {
1116
+ readonly enum: readonly ["low", "normal", "high"];
1117
+ };
1118
+ };
1119
+ };
1120
+ readonly subscribe: {
1121
+ readonly type: "object";
1122
+ readonly required: readonly ["type", "events"];
1123
+ readonly properties: {
1124
+ readonly type: {
1125
+ readonly const: "subscribe";
1126
+ };
1127
+ readonly id: {
1128
+ readonly type: "string";
1129
+ readonly minLength: 1;
1130
+ readonly maxLength: 128;
1131
+ };
1132
+ readonly events: {
1133
+ readonly type: "array";
1134
+ readonly items: {
1135
+ readonly type: "string";
1136
+ };
1137
+ };
1138
+ };
1139
+ };
1140
+ readonly mark: {
1141
+ readonly type: "object";
1142
+ readonly required: readonly ["type", "name"];
1143
+ readonly properties: {
1144
+ readonly type: {
1145
+ readonly const: "mark";
1146
+ };
1147
+ readonly name: {
1148
+ readonly type: "string";
1149
+ readonly minLength: 1;
1150
+ };
1151
+ };
1152
+ };
1153
+ readonly clear: {
1154
+ readonly type: "object";
1155
+ readonly required: readonly ["type"];
1156
+ readonly properties: {
1157
+ readonly type: {
1158
+ readonly const: "clear";
1159
+ };
1160
+ readonly id: {
1161
+ readonly type: "string";
1162
+ readonly minLength: 1;
1163
+ readonly maxLength: 128;
1164
+ };
1165
+ };
1166
+ };
1167
+ readonly hangup: {
1168
+ readonly type: "object";
1169
+ readonly required: readonly ["type"];
1170
+ readonly properties: {
1171
+ readonly type: {
1172
+ readonly const: "hangup";
1173
+ };
1174
+ readonly id: {
1175
+ readonly type: "string";
1176
+ readonly minLength: 1;
1177
+ readonly maxLength: 128;
1178
+ };
1179
+ };
1180
+ };
1181
+ readonly "dtmf.send": {
1182
+ readonly type: "object";
1183
+ readonly required: readonly ["type", "digits"];
1184
+ readonly properties: {
1185
+ readonly type: {
1186
+ readonly const: "dtmf.send";
1187
+ };
1188
+ readonly id: {
1189
+ readonly type: "string";
1190
+ readonly minLength: 1;
1191
+ readonly maxLength: 128;
1192
+ };
1193
+ readonly digits: {
1194
+ readonly type: "string";
1195
+ readonly pattern: "^[0-9A-D*#w]+$";
1196
+ };
1197
+ };
1198
+ };
1199
+ readonly transfer: {
1200
+ readonly type: "object";
1201
+ readonly required: readonly ["type", "to"];
1202
+ readonly properties: {
1203
+ readonly type: {
1204
+ readonly const: "transfer";
1205
+ };
1206
+ readonly id: {
1207
+ readonly type: "string";
1208
+ readonly minLength: 1;
1209
+ readonly maxLength: 128;
1210
+ };
1211
+ readonly to: {
1212
+ readonly type: "string";
1213
+ readonly minLength: 1;
1214
+ };
1215
+ readonly headers: {
1216
+ readonly type: "object";
1217
+ readonly additionalProperties: {
1218
+ readonly type: "string";
1219
+ };
1220
+ };
1221
+ readonly mode: {
1222
+ readonly enum: readonly ["cold", "warm", "refer"];
1223
+ };
1224
+ /** Warm transfers: what the caller hears while waiting. */
1225
+ readonly music: {
1226
+ readonly type: "string";
1227
+ };
1228
+ };
1229
+ };
1230
+ readonly "transfer.complete": {
1231
+ readonly type: "object";
1232
+ readonly required: readonly ["type", "id"];
1233
+ readonly properties: {
1234
+ readonly type: {
1235
+ readonly const: "transfer.complete";
1236
+ };
1237
+ readonly id: {
1238
+ readonly type: "string";
1239
+ readonly minLength: 1;
1240
+ readonly maxLength: 128;
1241
+ };
1242
+ };
1243
+ };
1244
+ readonly hold: {
1245
+ readonly type: "object";
1246
+ readonly required: readonly ["type"];
1247
+ readonly properties: {
1248
+ readonly type: {
1249
+ readonly const: "hold";
1250
+ };
1251
+ readonly id: {
1252
+ readonly type: "string";
1253
+ readonly minLength: 1;
1254
+ readonly maxLength: 128;
1255
+ };
1256
+ readonly music: {
1257
+ readonly type: "string";
1258
+ };
1259
+ };
1260
+ };
1261
+ readonly resume: {
1262
+ readonly type: "object";
1263
+ readonly required: readonly ["type"];
1264
+ readonly properties: {
1265
+ readonly type: {
1266
+ readonly const: "resume";
1267
+ };
1268
+ readonly id: {
1269
+ readonly type: "string";
1270
+ readonly minLength: 1;
1271
+ readonly maxLength: 128;
1272
+ };
1273
+ };
1274
+ };
1275
+ readonly handoff: {
1276
+ readonly type: "object";
1277
+ readonly required: readonly ["type", "app"];
1278
+ readonly properties: {
1279
+ readonly type: {
1280
+ readonly const: "handoff";
1281
+ };
1282
+ readonly id: {
1283
+ readonly type: "string";
1284
+ readonly minLength: 1;
1285
+ readonly maxLength: 128;
1286
+ };
1287
+ readonly app: {
1288
+ readonly type: "string";
1289
+ readonly minLength: 1;
1290
+ };
1291
+ readonly payload: {
1292
+ readonly type: "object";
1293
+ };
1294
+ };
1295
+ };
1296
+ readonly "record.note": {
1297
+ readonly type: "object";
1298
+ readonly required: readonly ["type", "data"];
1299
+ readonly properties: {
1300
+ readonly type: {
1301
+ readonly const: "record.note";
1302
+ };
1303
+ readonly id: {
1304
+ readonly type: "string";
1305
+ readonly minLength: 1;
1306
+ readonly maxLength: 128;
1307
+ };
1308
+ readonly data: {
1309
+ readonly type: "object";
1310
+ };
1311
+ };
1312
+ };
1313
+ };
1314
+ export type AppCommandType = keyof typeof APP_COMMAND_SCHEMAS;
1315
+ export type GatewayMessageType = keyof typeof GATEWAY_MESSAGE_SCHEMAS;
1316
+ /** The whole protocol as one JSON Schema document, as exported to schema/session.v1.json. */
1317
+ export declare function sessionProtocolDocument(): {
1318
+ $schema: string;
1319
+ $id: string;
1320
+ title: string;
1321
+ description: string;
1322
+ protocol: string;
1323
+ gatewayToApp: {
1324
+ readonly "session.start": {
1325
+ readonly type: "object";
1326
+ readonly required: readonly ["type", "protocol", "sessionRef", "callRef", "appRef", "direction", "from", "to", "metadata", "handoff", "audio", "tracks", "speech"];
1327
+ readonly properties: {
1328
+ readonly type: {
1329
+ readonly const: "session.start";
1330
+ };
1331
+ readonly protocol: {
1332
+ readonly const: "fonoster.session.v1";
1333
+ };
1334
+ readonly sessionRef: {
1335
+ readonly type: "string";
1336
+ };
1337
+ readonly callRef: {
1338
+ readonly type: "string";
1339
+ };
1340
+ readonly appRef: {
1341
+ readonly type: "string";
1342
+ };
1343
+ readonly direction: {
1344
+ readonly enum: readonly ["inbound", "outbound"];
1345
+ };
1346
+ readonly from: {
1347
+ readonly type: "string";
1348
+ };
1349
+ readonly to: {
1350
+ readonly type: "string";
1351
+ };
1352
+ readonly metadata: {
1353
+ readonly type: "object";
1354
+ };
1355
+ readonly handoff: {
1356
+ readonly oneOf: readonly [{
1357
+ readonly type: "null";
1358
+ }, {
1359
+ readonly type: "object";
1360
+ }];
1361
+ };
1362
+ readonly audio: {
1363
+ readonly type: "object";
1364
+ readonly required: readonly ["codec", "rate"];
1365
+ readonly properties: {
1366
+ readonly codec: {
1367
+ readonly enum: readonly ["pcm16", "pcmu"];
1368
+ };
1369
+ readonly rate: {
1370
+ readonly enum: readonly [8000, 16000, 24000];
1371
+ };
1372
+ };
1373
+ };
1374
+ readonly tracks: {
1375
+ readonly type: "array";
1376
+ readonly items: {
1377
+ readonly type: "object";
1378
+ readonly required: readonly ["id", "side", "kind", "codec"];
1379
+ readonly properties: {
1380
+ readonly id: {
1381
+ readonly type: "integer";
1382
+ readonly minimum: 0;
1383
+ readonly maximum: 255;
1384
+ };
1385
+ readonly side: {
1386
+ readonly enum: readonly ["inbound", "outbound"];
1387
+ };
1388
+ readonly kind: {
1389
+ readonly enum: readonly ["audio"];
1390
+ };
1391
+ readonly codec: {
1392
+ readonly type: "string";
1393
+ };
1394
+ };
1395
+ };
1396
+ };
1397
+ readonly speech: {
1398
+ readonly type: "object";
1399
+ readonly required: readonly ["voice", "language"];
1400
+ readonly properties: {
1401
+ readonly voice: {
1402
+ readonly type: "string";
1403
+ };
1404
+ readonly language: {
1405
+ readonly type: "string";
1406
+ };
1407
+ };
1408
+ };
1409
+ };
1410
+ };
1411
+ readonly "session.end": {
1412
+ readonly type: "object";
1413
+ readonly required: readonly ["type", "reason"];
1414
+ readonly properties: {
1415
+ readonly type: {
1416
+ readonly const: "session.end";
1417
+ };
1418
+ readonly reason: {
1419
+ readonly enum: readonly ["caller_hangup", "app_hangup", "transfer", "handoff", "error", "timeout"];
1420
+ };
1421
+ };
1422
+ };
1423
+ readonly error: {
1424
+ readonly type: "object";
1425
+ readonly required: readonly ["type", "code", "message", "fatal"];
1426
+ readonly properties: {
1427
+ readonly type: {
1428
+ readonly const: "error";
1429
+ };
1430
+ readonly code: {
1431
+ readonly type: "string";
1432
+ };
1433
+ readonly message: {
1434
+ readonly type: "string";
1435
+ };
1436
+ readonly fatal: {
1437
+ readonly type: "boolean";
1438
+ };
1439
+ readonly relatesTo: {
1440
+ readonly type: "string";
1441
+ readonly minLength: 1;
1442
+ readonly maxLength: 128;
1443
+ };
1444
+ };
1445
+ };
1446
+ readonly "turn.user_started": {
1447
+ readonly type: "object";
1448
+ readonly required: readonly ["type"];
1449
+ readonly properties: {
1450
+ readonly type: {
1451
+ readonly const: "turn.user_started";
1452
+ };
1453
+ };
1454
+ };
1455
+ readonly "turn.likely_ended": {
1456
+ readonly type: "object";
1457
+ readonly required: readonly ["type", "text"];
1458
+ readonly properties: {
1459
+ readonly type: {
1460
+ readonly const: "turn.likely_ended";
1461
+ };
1462
+ readonly text: {
1463
+ readonly type: "string";
1464
+ };
1465
+ };
1466
+ };
1467
+ readonly "turn.ended": {
1468
+ readonly type: "object";
1469
+ readonly required: readonly ["type", "text", "language", "confidence", "durationMs"];
1470
+ readonly properties: {
1471
+ readonly type: {
1472
+ readonly const: "turn.ended";
1473
+ };
1474
+ readonly text: {
1475
+ readonly type: "string";
1476
+ };
1477
+ readonly language: {
1478
+ readonly type: "string";
1479
+ };
1480
+ readonly confidence: {
1481
+ readonly type: "number";
1482
+ readonly minimum: 0;
1483
+ readonly maximum: 1;
1484
+ };
1485
+ readonly durationMs: {
1486
+ readonly type: "number";
1487
+ readonly minimum: 0;
1488
+ };
1489
+ /** No speech followed turn.user_started for 10 s (noise, a dropped line). */
1490
+ readonly abandoned: {
1491
+ readonly type: "boolean";
1492
+ };
1493
+ };
1494
+ };
1495
+ readonly "turn.resumed": {
1496
+ readonly type: "object";
1497
+ readonly required: readonly ["type"];
1498
+ readonly properties: {
1499
+ readonly type: {
1500
+ readonly const: "turn.resumed";
1501
+ };
1502
+ };
1503
+ };
1504
+ readonly "turn.backchannel": {
1505
+ readonly type: "object";
1506
+ readonly required: readonly ["type", "text"];
1507
+ readonly properties: {
1508
+ readonly type: {
1509
+ readonly const: "turn.backchannel";
1510
+ };
1511
+ readonly text: {
1512
+ readonly type: "string";
1513
+ };
1514
+ };
1515
+ };
1516
+ readonly "turn.estimate": {
1517
+ readonly type: "object";
1518
+ readonly required: readonly ["type", "eot", "speaking", "kind"];
1519
+ readonly properties: {
1520
+ readonly type: {
1521
+ readonly const: "turn.estimate";
1522
+ };
1523
+ readonly eot: {
1524
+ readonly type: "number";
1525
+ readonly minimum: 0;
1526
+ readonly maximum: 1;
1527
+ };
1528
+ readonly speaking: {
1529
+ readonly type: "boolean";
1530
+ };
1531
+ readonly kind: {
1532
+ readonly enum: readonly ["speech", "backchannel", "interruption", "none"];
1533
+ };
1534
+ };
1535
+ };
1536
+ readonly "transcript.partial": {
1537
+ readonly type: "object";
1538
+ readonly required: readonly ["type", "text"];
1539
+ readonly properties: {
1540
+ readonly type: {
1541
+ readonly const: "transcript.partial";
1542
+ };
1543
+ readonly text: {
1544
+ readonly type: "string";
1545
+ };
1546
+ readonly language: {
1547
+ readonly type: "string";
1548
+ };
1549
+ };
1550
+ };
1551
+ readonly "output.started": {
1552
+ readonly type: "object";
1553
+ readonly required: readonly ["type", "id"];
1554
+ readonly properties: {
1555
+ readonly type: {
1556
+ readonly const: "output.started";
1557
+ };
1558
+ readonly id: {
1559
+ readonly type: "string";
1560
+ readonly minLength: 1;
1561
+ readonly maxLength: 128;
1562
+ };
1563
+ };
1564
+ };
1565
+ readonly "output.done": {
1566
+ readonly type: "object";
1567
+ readonly required: readonly ["type", "id"];
1568
+ readonly properties: {
1569
+ readonly type: {
1570
+ readonly const: "output.done";
1571
+ };
1572
+ readonly id: {
1573
+ readonly type: "string";
1574
+ readonly minLength: 1;
1575
+ readonly maxLength: 128;
1576
+ };
1577
+ readonly heardMs: {
1578
+ readonly type: "number";
1579
+ readonly minimum: 0;
1580
+ };
1581
+ };
1582
+ };
1583
+ readonly "output.interrupted": {
1584
+ readonly type: "object";
1585
+ readonly required: readonly ["type", "id", "heardText", "heardMs"];
1586
+ readonly properties: {
1587
+ readonly type: {
1588
+ readonly const: "output.interrupted";
1589
+ };
1590
+ readonly id: {
1591
+ readonly type: "string";
1592
+ readonly minLength: 1;
1593
+ readonly maxLength: 128;
1594
+ };
1595
+ readonly heardText: {
1596
+ readonly type: "string";
1597
+ };
1598
+ readonly heardMs: {
1599
+ readonly type: "number";
1600
+ readonly minimum: 0;
1601
+ };
1602
+ };
1603
+ };
1604
+ readonly mark: {
1605
+ readonly type: "object";
1606
+ readonly required: readonly ["type", "name", "cleared"];
1607
+ readonly properties: {
1608
+ readonly type: {
1609
+ readonly const: "mark";
1610
+ };
1611
+ readonly name: {
1612
+ readonly type: "string";
1613
+ };
1614
+ readonly cleared: {
1615
+ readonly type: "boolean";
1616
+ };
1617
+ };
1618
+ };
1619
+ readonly dtmf: {
1620
+ readonly type: "object";
1621
+ readonly required: readonly ["type", "digit"];
1622
+ readonly properties: {
1623
+ readonly type: {
1624
+ readonly const: "dtmf";
1625
+ };
1626
+ readonly digit: {
1627
+ readonly type: "string";
1628
+ readonly pattern: "^[0-9A-D*#]$";
1629
+ };
1630
+ };
1631
+ };
1632
+ readonly "amd.result": {
1633
+ readonly type: "object";
1634
+ readonly required: readonly ["type", "status", "confidence", "detector", "audioMs"];
1635
+ readonly properties: {
1636
+ readonly type: {
1637
+ readonly const: "amd.result";
1638
+ };
1639
+ readonly status: {
1640
+ readonly enum: readonly ["human", "voicemail", "ivr", "machine", "unknown"];
1641
+ };
1642
+ readonly confidence: {
1643
+ readonly type: "number";
1644
+ readonly minimum: 0;
1645
+ readonly maximum: 1;
1646
+ };
1647
+ readonly detector: {
1648
+ readonly type: "string";
1649
+ };
1650
+ /** How much caller audio the verdict is based on, from when the caller started speaking. */
1651
+ readonly audioMs: {
1652
+ readonly type: "number";
1653
+ readonly minimum: 0;
1654
+ };
1655
+ /** Caller audio received before speech began (unset when the caller never spoke). */
1656
+ readonly speechOnsetMs: {
1657
+ readonly type: "number";
1658
+ readonly minimum: 0;
1659
+ };
1660
+ /** Why detection could not run (status unknown): no_audio, no_speech, no_classifier, call_ended, … */
1661
+ readonly reason: {
1662
+ readonly type: "string";
1663
+ };
1664
+ };
1665
+ };
1666
+ };
1667
+ appToGateway: {
1668
+ readonly speak: {
1669
+ readonly type: "object";
1670
+ readonly required: readonly ["type", "text"];
1671
+ readonly properties: {
1672
+ readonly type: {
1673
+ readonly const: "speak";
1674
+ };
1675
+ readonly id: {
1676
+ readonly type: "string";
1677
+ readonly minLength: 1;
1678
+ readonly maxLength: 128;
1679
+ };
1680
+ readonly text: {
1681
+ readonly type: "string";
1682
+ };
1683
+ readonly last: {
1684
+ readonly type: "boolean";
1685
+ };
1686
+ readonly voice: {
1687
+ readonly type: "string";
1688
+ readonly minLength: 1;
1689
+ };
1690
+ readonly language: {
1691
+ readonly type: "string";
1692
+ readonly minLength: 1;
1693
+ };
1694
+ readonly interruptible: {
1695
+ readonly type: "boolean";
1696
+ };
1697
+ readonly preempt: {
1698
+ readonly type: "boolean";
1699
+ };
1700
+ };
1701
+ };
1702
+ readonly play: {
1703
+ readonly type: "object";
1704
+ readonly required: readonly ["type", "url"];
1705
+ readonly properties: {
1706
+ readonly type: {
1707
+ readonly const: "play";
1708
+ };
1709
+ readonly id: {
1710
+ readonly type: "string";
1711
+ readonly minLength: 1;
1712
+ readonly maxLength: 128;
1713
+ };
1714
+ readonly url: {
1715
+ readonly type: "string";
1716
+ readonly pattern: "^https?://";
1717
+ };
1718
+ readonly loop: {
1719
+ readonly type: "boolean";
1720
+ };
1721
+ readonly interruptible: {
1722
+ readonly type: "boolean";
1723
+ };
1724
+ readonly preempt: {
1725
+ readonly type: "boolean";
1726
+ };
1727
+ };
1728
+ };
1729
+ readonly "listen.update": {
1730
+ readonly type: "object";
1731
+ readonly required: readonly ["type"];
1732
+ readonly properties: {
1733
+ readonly type: {
1734
+ readonly const: "listen.update";
1735
+ };
1736
+ readonly id: {
1737
+ readonly type: "string";
1738
+ readonly minLength: 1;
1739
+ readonly maxLength: 128;
1740
+ };
1741
+ readonly language: {
1742
+ readonly type: "string";
1743
+ readonly minLength: 1;
1744
+ };
1745
+ readonly hints: {
1746
+ readonly type: "array";
1747
+ readonly items: {
1748
+ readonly type: "string";
1749
+ };
1750
+ };
1751
+ /** How long the Turn Detector waits before turn.ended. */
1752
+ readonly patience: {
1753
+ readonly enum: readonly ["low", "normal", "high"];
1754
+ };
1755
+ };
1756
+ };
1757
+ readonly subscribe: {
1758
+ readonly type: "object";
1759
+ readonly required: readonly ["type", "events"];
1760
+ readonly properties: {
1761
+ readonly type: {
1762
+ readonly const: "subscribe";
1763
+ };
1764
+ readonly id: {
1765
+ readonly type: "string";
1766
+ readonly minLength: 1;
1767
+ readonly maxLength: 128;
1768
+ };
1769
+ readonly events: {
1770
+ readonly type: "array";
1771
+ readonly items: {
1772
+ readonly type: "string";
1773
+ };
1774
+ };
1775
+ };
1776
+ };
1777
+ readonly mark: {
1778
+ readonly type: "object";
1779
+ readonly required: readonly ["type", "name"];
1780
+ readonly properties: {
1781
+ readonly type: {
1782
+ readonly const: "mark";
1783
+ };
1784
+ readonly name: {
1785
+ readonly type: "string";
1786
+ readonly minLength: 1;
1787
+ };
1788
+ };
1789
+ };
1790
+ readonly clear: {
1791
+ readonly type: "object";
1792
+ readonly required: readonly ["type"];
1793
+ readonly properties: {
1794
+ readonly type: {
1795
+ readonly const: "clear";
1796
+ };
1797
+ readonly id: {
1798
+ readonly type: "string";
1799
+ readonly minLength: 1;
1800
+ readonly maxLength: 128;
1801
+ };
1802
+ };
1803
+ };
1804
+ readonly hangup: {
1805
+ readonly type: "object";
1806
+ readonly required: readonly ["type"];
1807
+ readonly properties: {
1808
+ readonly type: {
1809
+ readonly const: "hangup";
1810
+ };
1811
+ readonly id: {
1812
+ readonly type: "string";
1813
+ readonly minLength: 1;
1814
+ readonly maxLength: 128;
1815
+ };
1816
+ };
1817
+ };
1818
+ readonly "dtmf.send": {
1819
+ readonly type: "object";
1820
+ readonly required: readonly ["type", "digits"];
1821
+ readonly properties: {
1822
+ readonly type: {
1823
+ readonly const: "dtmf.send";
1824
+ };
1825
+ readonly id: {
1826
+ readonly type: "string";
1827
+ readonly minLength: 1;
1828
+ readonly maxLength: 128;
1829
+ };
1830
+ readonly digits: {
1831
+ readonly type: "string";
1832
+ readonly pattern: "^[0-9A-D*#w]+$";
1833
+ };
1834
+ };
1835
+ };
1836
+ readonly transfer: {
1837
+ readonly type: "object";
1838
+ readonly required: readonly ["type", "to"];
1839
+ readonly properties: {
1840
+ readonly type: {
1841
+ readonly const: "transfer";
1842
+ };
1843
+ readonly id: {
1844
+ readonly type: "string";
1845
+ readonly minLength: 1;
1846
+ readonly maxLength: 128;
1847
+ };
1848
+ readonly to: {
1849
+ readonly type: "string";
1850
+ readonly minLength: 1;
1851
+ };
1852
+ readonly headers: {
1853
+ readonly type: "object";
1854
+ readonly additionalProperties: {
1855
+ readonly type: "string";
1856
+ };
1857
+ };
1858
+ readonly mode: {
1859
+ readonly enum: readonly ["cold", "warm", "refer"];
1860
+ };
1861
+ /** Warm transfers: what the caller hears while waiting. */
1862
+ readonly music: {
1863
+ readonly type: "string";
1864
+ };
1865
+ };
1866
+ };
1867
+ readonly "transfer.complete": {
1868
+ readonly type: "object";
1869
+ readonly required: readonly ["type", "id"];
1870
+ readonly properties: {
1871
+ readonly type: {
1872
+ readonly const: "transfer.complete";
1873
+ };
1874
+ readonly id: {
1875
+ readonly type: "string";
1876
+ readonly minLength: 1;
1877
+ readonly maxLength: 128;
1878
+ };
1879
+ };
1880
+ };
1881
+ readonly hold: {
1882
+ readonly type: "object";
1883
+ readonly required: readonly ["type"];
1884
+ readonly properties: {
1885
+ readonly type: {
1886
+ readonly const: "hold";
1887
+ };
1888
+ readonly id: {
1889
+ readonly type: "string";
1890
+ readonly minLength: 1;
1891
+ readonly maxLength: 128;
1892
+ };
1893
+ readonly music: {
1894
+ readonly type: "string";
1895
+ };
1896
+ };
1897
+ };
1898
+ readonly resume: {
1899
+ readonly type: "object";
1900
+ readonly required: readonly ["type"];
1901
+ readonly properties: {
1902
+ readonly type: {
1903
+ readonly const: "resume";
1904
+ };
1905
+ readonly id: {
1906
+ readonly type: "string";
1907
+ readonly minLength: 1;
1908
+ readonly maxLength: 128;
1909
+ };
1910
+ };
1911
+ };
1912
+ readonly handoff: {
1913
+ readonly type: "object";
1914
+ readonly required: readonly ["type", "app"];
1915
+ readonly properties: {
1916
+ readonly type: {
1917
+ readonly const: "handoff";
1918
+ };
1919
+ readonly id: {
1920
+ readonly type: "string";
1921
+ readonly minLength: 1;
1922
+ readonly maxLength: 128;
1923
+ };
1924
+ readonly app: {
1925
+ readonly type: "string";
1926
+ readonly minLength: 1;
1927
+ };
1928
+ readonly payload: {
1929
+ readonly type: "object";
1930
+ };
1931
+ };
1932
+ };
1933
+ readonly "record.note": {
1934
+ readonly type: "object";
1935
+ readonly required: readonly ["type", "data"];
1936
+ readonly properties: {
1937
+ readonly type: {
1938
+ readonly const: "record.note";
1939
+ };
1940
+ readonly id: {
1941
+ readonly type: "string";
1942
+ readonly minLength: 1;
1943
+ readonly maxLength: 128;
1944
+ };
1945
+ readonly data: {
1946
+ readonly type: "object";
1947
+ };
1948
+ };
1949
+ };
1950
+ };
1951
+ };