@voice-ai-labs/web-sdk 0.9.1 → 1.0.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/README.md +170 -24
- package/dist/client/analytics.d.ts +18 -1
- package/dist/client/analytics.d.ts.map +1 -1
- package/dist/client/analytics.js +25 -0
- package/dist/client/analytics.js.map +1 -1
- package/dist/client/base.d.ts +8 -2
- package/dist/client/base.d.ts.map +1 -1
- package/dist/client/base.js +31 -13
- package/dist/client/base.js.map +1 -1
- package/dist/client/index.d.ts +1 -0
- package/dist/client/index.d.ts.map +1 -1
- package/dist/client/index.js +1 -0
- package/dist/client/index.js.map +1 -1
- package/dist/client/managed-tools.d.ts +17 -0
- package/dist/client/managed-tools.d.ts.map +1 -0
- package/dist/client/managed-tools.js +24 -0
- package/dist/client/managed-tools.js.map +1 -0
- package/dist/client/tts.d.ts +1 -1
- package/dist/client/tts.js +1 -1
- package/dist/index.d.ts +9 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.esm.js +800 -46
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +817 -45
- package/dist/index.js.map +1 -1
- package/dist/managed-tools/google.d.ts +29 -0
- package/dist/managed-tools/google.d.ts.map +1 -0
- package/dist/managed-tools/google.js +178 -0
- package/dist/managed-tools/google.js.map +1 -0
- package/dist/managed-tools/iana-timezones.d.ts +10 -0
- package/dist/managed-tools/iana-timezones.d.ts.map +1 -0
- package/dist/managed-tools/iana-timezones.js +470 -0
- package/dist/managed-tools/iana-timezones.js.map +1 -0
- package/dist/types.d.ts +87 -10
- package/dist/types.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,470 @@
|
|
|
1
|
+
const IANA_TIMEZONE_IDS = Object.freeze([
|
|
2
|
+
"Africa/Abidjan",
|
|
3
|
+
"Africa/Accra",
|
|
4
|
+
"Africa/Addis_Ababa",
|
|
5
|
+
"Africa/Algiers",
|
|
6
|
+
"Africa/Asmera",
|
|
7
|
+
"Africa/Bamako",
|
|
8
|
+
"Africa/Bangui",
|
|
9
|
+
"Africa/Banjul",
|
|
10
|
+
"Africa/Bissau",
|
|
11
|
+
"Africa/Blantyre",
|
|
12
|
+
"Africa/Brazzaville",
|
|
13
|
+
"Africa/Bujumbura",
|
|
14
|
+
"Africa/Cairo",
|
|
15
|
+
"Africa/Casablanca",
|
|
16
|
+
"Africa/Ceuta",
|
|
17
|
+
"Africa/Conakry",
|
|
18
|
+
"Africa/Dakar",
|
|
19
|
+
"Africa/Dar_es_Salaam",
|
|
20
|
+
"Africa/Djibouti",
|
|
21
|
+
"Africa/Douala",
|
|
22
|
+
"Africa/El_Aaiun",
|
|
23
|
+
"Africa/Freetown",
|
|
24
|
+
"Africa/Gaborone",
|
|
25
|
+
"Africa/Harare",
|
|
26
|
+
"Africa/Johannesburg",
|
|
27
|
+
"Africa/Juba",
|
|
28
|
+
"Africa/Kampala",
|
|
29
|
+
"Africa/Khartoum",
|
|
30
|
+
"Africa/Kigali",
|
|
31
|
+
"Africa/Kinshasa",
|
|
32
|
+
"Africa/Lagos",
|
|
33
|
+
"Africa/Libreville",
|
|
34
|
+
"Africa/Lome",
|
|
35
|
+
"Africa/Luanda",
|
|
36
|
+
"Africa/Lubumbashi",
|
|
37
|
+
"Africa/Lusaka",
|
|
38
|
+
"Africa/Malabo",
|
|
39
|
+
"Africa/Maputo",
|
|
40
|
+
"Africa/Maseru",
|
|
41
|
+
"Africa/Mbabane",
|
|
42
|
+
"Africa/Mogadishu",
|
|
43
|
+
"Africa/Monrovia",
|
|
44
|
+
"Africa/Nairobi",
|
|
45
|
+
"Africa/Ndjamena",
|
|
46
|
+
"Africa/Niamey",
|
|
47
|
+
"Africa/Nouakchott",
|
|
48
|
+
"Africa/Ouagadougou",
|
|
49
|
+
"Africa/Porto-Novo",
|
|
50
|
+
"Africa/Sao_Tome",
|
|
51
|
+
"Africa/Tripoli",
|
|
52
|
+
"Africa/Tunis",
|
|
53
|
+
"Africa/Windhoek",
|
|
54
|
+
"America/Adak",
|
|
55
|
+
"America/Anchorage",
|
|
56
|
+
"America/Anguilla",
|
|
57
|
+
"America/Antigua",
|
|
58
|
+
"America/Araguaina",
|
|
59
|
+
"America/Argentina/La_Rioja",
|
|
60
|
+
"America/Argentina/Rio_Gallegos",
|
|
61
|
+
"America/Argentina/Salta",
|
|
62
|
+
"America/Argentina/San_Juan",
|
|
63
|
+
"America/Argentina/San_Luis",
|
|
64
|
+
"America/Argentina/Tucuman",
|
|
65
|
+
"America/Argentina/Ushuaia",
|
|
66
|
+
"America/Aruba",
|
|
67
|
+
"America/Asuncion",
|
|
68
|
+
"America/Bahia",
|
|
69
|
+
"America/Bahia_Banderas",
|
|
70
|
+
"America/Barbados",
|
|
71
|
+
"America/Belem",
|
|
72
|
+
"America/Belize",
|
|
73
|
+
"America/Blanc-Sablon",
|
|
74
|
+
"America/Boa_Vista",
|
|
75
|
+
"America/Bogota",
|
|
76
|
+
"America/Boise",
|
|
77
|
+
"America/Buenos_Aires",
|
|
78
|
+
"America/Cambridge_Bay",
|
|
79
|
+
"America/Campo_Grande",
|
|
80
|
+
"America/Cancun",
|
|
81
|
+
"America/Caracas",
|
|
82
|
+
"America/Catamarca",
|
|
83
|
+
"America/Cayenne",
|
|
84
|
+
"America/Cayman",
|
|
85
|
+
"America/Chicago",
|
|
86
|
+
"America/Chihuahua",
|
|
87
|
+
"America/Ciudad_Juarez",
|
|
88
|
+
"America/Coral_Harbour",
|
|
89
|
+
"America/Cordoba",
|
|
90
|
+
"America/Costa_Rica",
|
|
91
|
+
"America/Creston",
|
|
92
|
+
"America/Cuiaba",
|
|
93
|
+
"America/Curacao",
|
|
94
|
+
"America/Danmarkshavn",
|
|
95
|
+
"America/Dawson",
|
|
96
|
+
"America/Dawson_Creek",
|
|
97
|
+
"America/Denver",
|
|
98
|
+
"America/Detroit",
|
|
99
|
+
"America/Dominica",
|
|
100
|
+
"America/Edmonton",
|
|
101
|
+
"America/Eirunepe",
|
|
102
|
+
"America/El_Salvador",
|
|
103
|
+
"America/Fort_Nelson",
|
|
104
|
+
"America/Fortaleza",
|
|
105
|
+
"America/Glace_Bay",
|
|
106
|
+
"America/Godthab",
|
|
107
|
+
"America/Goose_Bay",
|
|
108
|
+
"America/Grand_Turk",
|
|
109
|
+
"America/Grenada",
|
|
110
|
+
"America/Guadeloupe",
|
|
111
|
+
"America/Guatemala",
|
|
112
|
+
"America/Guayaquil",
|
|
113
|
+
"America/Guyana",
|
|
114
|
+
"America/Halifax",
|
|
115
|
+
"America/Havana",
|
|
116
|
+
"America/Hermosillo",
|
|
117
|
+
"America/Indiana/Knox",
|
|
118
|
+
"America/Indiana/Marengo",
|
|
119
|
+
"America/Indiana/Petersburg",
|
|
120
|
+
"America/Indiana/Tell_City",
|
|
121
|
+
"America/Indiana/Vevay",
|
|
122
|
+
"America/Indiana/Vincennes",
|
|
123
|
+
"America/Indiana/Winamac",
|
|
124
|
+
"America/Indianapolis",
|
|
125
|
+
"America/Inuvik",
|
|
126
|
+
"America/Iqaluit",
|
|
127
|
+
"America/Jamaica",
|
|
128
|
+
"America/Jujuy",
|
|
129
|
+
"America/Juneau",
|
|
130
|
+
"America/Kentucky/Monticello",
|
|
131
|
+
"America/Kralendijk",
|
|
132
|
+
"America/La_Paz",
|
|
133
|
+
"America/Lima",
|
|
134
|
+
"America/Los_Angeles",
|
|
135
|
+
"America/Louisville",
|
|
136
|
+
"America/Lower_Princes",
|
|
137
|
+
"America/Maceio",
|
|
138
|
+
"America/Managua",
|
|
139
|
+
"America/Manaus",
|
|
140
|
+
"America/Marigot",
|
|
141
|
+
"America/Martinique",
|
|
142
|
+
"America/Matamoros",
|
|
143
|
+
"America/Mazatlan",
|
|
144
|
+
"America/Mendoza",
|
|
145
|
+
"America/Menominee",
|
|
146
|
+
"America/Merida",
|
|
147
|
+
"America/Metlakatla",
|
|
148
|
+
"America/Mexico_City",
|
|
149
|
+
"America/Miquelon",
|
|
150
|
+
"America/Moncton",
|
|
151
|
+
"America/Monterrey",
|
|
152
|
+
"America/Montevideo",
|
|
153
|
+
"America/Montserrat",
|
|
154
|
+
"America/Nassau",
|
|
155
|
+
"America/New_York",
|
|
156
|
+
"America/Nome",
|
|
157
|
+
"America/Noronha",
|
|
158
|
+
"America/North_Dakota/Beulah",
|
|
159
|
+
"America/North_Dakota/Center",
|
|
160
|
+
"America/North_Dakota/New_Salem",
|
|
161
|
+
"America/Ojinaga",
|
|
162
|
+
"America/Panama",
|
|
163
|
+
"America/Paramaribo",
|
|
164
|
+
"America/Phoenix",
|
|
165
|
+
"America/Port-au-Prince",
|
|
166
|
+
"America/Port_of_Spain",
|
|
167
|
+
"America/Porto_Velho",
|
|
168
|
+
"America/Puerto_Rico",
|
|
169
|
+
"America/Punta_Arenas",
|
|
170
|
+
"America/Rankin_Inlet",
|
|
171
|
+
"America/Recife",
|
|
172
|
+
"America/Regina",
|
|
173
|
+
"America/Resolute",
|
|
174
|
+
"America/Rio_Branco",
|
|
175
|
+
"America/Santarem",
|
|
176
|
+
"America/Santiago",
|
|
177
|
+
"America/Santo_Domingo",
|
|
178
|
+
"America/Sao_Paulo",
|
|
179
|
+
"America/Scoresbysund",
|
|
180
|
+
"America/Sitka",
|
|
181
|
+
"America/St_Barthelemy",
|
|
182
|
+
"America/St_Johns",
|
|
183
|
+
"America/St_Kitts",
|
|
184
|
+
"America/St_Lucia",
|
|
185
|
+
"America/St_Thomas",
|
|
186
|
+
"America/St_Vincent",
|
|
187
|
+
"America/Swift_Current",
|
|
188
|
+
"America/Tegucigalpa",
|
|
189
|
+
"America/Thule",
|
|
190
|
+
"America/Tijuana",
|
|
191
|
+
"America/Toronto",
|
|
192
|
+
"America/Tortola",
|
|
193
|
+
"America/Vancouver",
|
|
194
|
+
"America/Whitehorse",
|
|
195
|
+
"America/Winnipeg",
|
|
196
|
+
"America/Yakutat",
|
|
197
|
+
"Antarctica/Casey",
|
|
198
|
+
"Antarctica/Davis",
|
|
199
|
+
"Antarctica/DumontDUrville",
|
|
200
|
+
"Antarctica/Macquarie",
|
|
201
|
+
"Antarctica/Mawson",
|
|
202
|
+
"Antarctica/McMurdo",
|
|
203
|
+
"Antarctica/Palmer",
|
|
204
|
+
"Antarctica/Rothera",
|
|
205
|
+
"Antarctica/Syowa",
|
|
206
|
+
"Antarctica/Troll",
|
|
207
|
+
"Antarctica/Vostok",
|
|
208
|
+
"Arctic/Longyearbyen",
|
|
209
|
+
"Asia/Aden",
|
|
210
|
+
"Asia/Almaty",
|
|
211
|
+
"Asia/Amman",
|
|
212
|
+
"Asia/Anadyr",
|
|
213
|
+
"Asia/Aqtau",
|
|
214
|
+
"Asia/Aqtobe",
|
|
215
|
+
"Asia/Ashgabat",
|
|
216
|
+
"Asia/Atyrau",
|
|
217
|
+
"Asia/Baghdad",
|
|
218
|
+
"Asia/Bahrain",
|
|
219
|
+
"Asia/Baku",
|
|
220
|
+
"Asia/Bangkok",
|
|
221
|
+
"Asia/Barnaul",
|
|
222
|
+
"Asia/Beirut",
|
|
223
|
+
"Asia/Bishkek",
|
|
224
|
+
"Asia/Brunei",
|
|
225
|
+
"Asia/Calcutta",
|
|
226
|
+
"Asia/Chita",
|
|
227
|
+
"Asia/Colombo",
|
|
228
|
+
"Asia/Damascus",
|
|
229
|
+
"Asia/Dhaka",
|
|
230
|
+
"Asia/Dili",
|
|
231
|
+
"Asia/Dubai",
|
|
232
|
+
"Asia/Dushanbe",
|
|
233
|
+
"Asia/Famagusta",
|
|
234
|
+
"Asia/Gaza",
|
|
235
|
+
"Asia/Hebron",
|
|
236
|
+
"Asia/Hong_Kong",
|
|
237
|
+
"Asia/Hovd",
|
|
238
|
+
"Asia/Irkutsk",
|
|
239
|
+
"Asia/Jakarta",
|
|
240
|
+
"Asia/Jayapura",
|
|
241
|
+
"Asia/Jerusalem",
|
|
242
|
+
"Asia/Kabul",
|
|
243
|
+
"Asia/Kamchatka",
|
|
244
|
+
"Asia/Karachi",
|
|
245
|
+
"Asia/Katmandu",
|
|
246
|
+
"Asia/Khandyga",
|
|
247
|
+
"Asia/Krasnoyarsk",
|
|
248
|
+
"Asia/Kuala_Lumpur",
|
|
249
|
+
"Asia/Kuching",
|
|
250
|
+
"Asia/Kuwait",
|
|
251
|
+
"Asia/Macau",
|
|
252
|
+
"Asia/Magadan",
|
|
253
|
+
"Asia/Makassar",
|
|
254
|
+
"Asia/Manila",
|
|
255
|
+
"Asia/Muscat",
|
|
256
|
+
"Asia/Nicosia",
|
|
257
|
+
"Asia/Novokuznetsk",
|
|
258
|
+
"Asia/Novosibirsk",
|
|
259
|
+
"Asia/Omsk",
|
|
260
|
+
"Asia/Oral",
|
|
261
|
+
"Asia/Phnom_Penh",
|
|
262
|
+
"Asia/Pontianak",
|
|
263
|
+
"Asia/Pyongyang",
|
|
264
|
+
"Asia/Qatar",
|
|
265
|
+
"Asia/Qostanay",
|
|
266
|
+
"Asia/Qyzylorda",
|
|
267
|
+
"Asia/Rangoon",
|
|
268
|
+
"Asia/Riyadh",
|
|
269
|
+
"Asia/Saigon",
|
|
270
|
+
"Asia/Sakhalin",
|
|
271
|
+
"Asia/Samarkand",
|
|
272
|
+
"Asia/Seoul",
|
|
273
|
+
"Asia/Shanghai",
|
|
274
|
+
"Asia/Singapore",
|
|
275
|
+
"Asia/Srednekolymsk",
|
|
276
|
+
"Asia/Taipei",
|
|
277
|
+
"Asia/Tashkent",
|
|
278
|
+
"Asia/Tbilisi",
|
|
279
|
+
"Asia/Tehran",
|
|
280
|
+
"Asia/Thimphu",
|
|
281
|
+
"Asia/Tokyo",
|
|
282
|
+
"Asia/Tomsk",
|
|
283
|
+
"Asia/Ulaanbaatar",
|
|
284
|
+
"Asia/Urumqi",
|
|
285
|
+
"Asia/Ust-Nera",
|
|
286
|
+
"Asia/Vientiane",
|
|
287
|
+
"Asia/Vladivostok",
|
|
288
|
+
"Asia/Yakutsk",
|
|
289
|
+
"Asia/Yekaterinburg",
|
|
290
|
+
"Asia/Yerevan",
|
|
291
|
+
"Atlantic/Azores",
|
|
292
|
+
"Atlantic/Bermuda",
|
|
293
|
+
"Atlantic/Canary",
|
|
294
|
+
"Atlantic/Cape_Verde",
|
|
295
|
+
"Atlantic/Faeroe",
|
|
296
|
+
"Atlantic/Madeira",
|
|
297
|
+
"Atlantic/Reykjavik",
|
|
298
|
+
"Atlantic/South_Georgia",
|
|
299
|
+
"Atlantic/St_Helena",
|
|
300
|
+
"Atlantic/Stanley",
|
|
301
|
+
"Australia/Adelaide",
|
|
302
|
+
"Australia/Brisbane",
|
|
303
|
+
"Australia/Broken_Hill",
|
|
304
|
+
"Australia/Darwin",
|
|
305
|
+
"Australia/Eucla",
|
|
306
|
+
"Australia/Hobart",
|
|
307
|
+
"Australia/Lindeman",
|
|
308
|
+
"Australia/Lord_Howe",
|
|
309
|
+
"Australia/Melbourne",
|
|
310
|
+
"Australia/Perth",
|
|
311
|
+
"Australia/Sydney",
|
|
312
|
+
"Europe/Amsterdam",
|
|
313
|
+
"Europe/Andorra",
|
|
314
|
+
"Europe/Astrakhan",
|
|
315
|
+
"Europe/Athens",
|
|
316
|
+
"Europe/Belgrade",
|
|
317
|
+
"Europe/Berlin",
|
|
318
|
+
"Europe/Bratislava",
|
|
319
|
+
"Europe/Brussels",
|
|
320
|
+
"Europe/Bucharest",
|
|
321
|
+
"Europe/Budapest",
|
|
322
|
+
"Europe/Busingen",
|
|
323
|
+
"Europe/Chisinau",
|
|
324
|
+
"Europe/Copenhagen",
|
|
325
|
+
"Europe/Dublin",
|
|
326
|
+
"Europe/Gibraltar",
|
|
327
|
+
"Europe/Guernsey",
|
|
328
|
+
"Europe/Helsinki",
|
|
329
|
+
"Europe/Isle_of_Man",
|
|
330
|
+
"Europe/Istanbul",
|
|
331
|
+
"Europe/Jersey",
|
|
332
|
+
"Europe/Kaliningrad",
|
|
333
|
+
"Europe/Kiev",
|
|
334
|
+
"Europe/Kirov",
|
|
335
|
+
"Europe/Lisbon",
|
|
336
|
+
"Europe/Ljubljana",
|
|
337
|
+
"Europe/London",
|
|
338
|
+
"Europe/Luxembourg",
|
|
339
|
+
"Europe/Madrid",
|
|
340
|
+
"Europe/Malta",
|
|
341
|
+
"Europe/Mariehamn",
|
|
342
|
+
"Europe/Minsk",
|
|
343
|
+
"Europe/Monaco",
|
|
344
|
+
"Europe/Moscow",
|
|
345
|
+
"Europe/Oslo",
|
|
346
|
+
"Europe/Paris",
|
|
347
|
+
"Europe/Podgorica",
|
|
348
|
+
"Europe/Prague",
|
|
349
|
+
"Europe/Riga",
|
|
350
|
+
"Europe/Rome",
|
|
351
|
+
"Europe/Samara",
|
|
352
|
+
"Europe/San_Marino",
|
|
353
|
+
"Europe/Sarajevo",
|
|
354
|
+
"Europe/Saratov",
|
|
355
|
+
"Europe/Simferopol",
|
|
356
|
+
"Europe/Skopje",
|
|
357
|
+
"Europe/Sofia",
|
|
358
|
+
"Europe/Stockholm",
|
|
359
|
+
"Europe/Tallinn",
|
|
360
|
+
"Europe/Tirane",
|
|
361
|
+
"Europe/Ulyanovsk",
|
|
362
|
+
"Europe/Vaduz",
|
|
363
|
+
"Europe/Vatican",
|
|
364
|
+
"Europe/Vienna",
|
|
365
|
+
"Europe/Vilnius",
|
|
366
|
+
"Europe/Volgograd",
|
|
367
|
+
"Europe/Warsaw",
|
|
368
|
+
"Europe/Zagreb",
|
|
369
|
+
"Europe/Zurich",
|
|
370
|
+
"Indian/Antananarivo",
|
|
371
|
+
"Indian/Chagos",
|
|
372
|
+
"Indian/Christmas",
|
|
373
|
+
"Indian/Cocos",
|
|
374
|
+
"Indian/Comoro",
|
|
375
|
+
"Indian/Kerguelen",
|
|
376
|
+
"Indian/Mahe",
|
|
377
|
+
"Indian/Maldives",
|
|
378
|
+
"Indian/Mauritius",
|
|
379
|
+
"Indian/Mayotte",
|
|
380
|
+
"Indian/Reunion",
|
|
381
|
+
"Pacific/Apia",
|
|
382
|
+
"Pacific/Auckland",
|
|
383
|
+
"Pacific/Bougainville",
|
|
384
|
+
"Pacific/Chatham",
|
|
385
|
+
"Pacific/Easter",
|
|
386
|
+
"Pacific/Efate",
|
|
387
|
+
"Pacific/Enderbury",
|
|
388
|
+
"Pacific/Fakaofo",
|
|
389
|
+
"Pacific/Fiji",
|
|
390
|
+
"Pacific/Funafuti",
|
|
391
|
+
"Pacific/Galapagos",
|
|
392
|
+
"Pacific/Gambier",
|
|
393
|
+
"Pacific/Guadalcanal",
|
|
394
|
+
"Pacific/Guam",
|
|
395
|
+
"Pacific/Honolulu",
|
|
396
|
+
"Pacific/Kiritimati",
|
|
397
|
+
"Pacific/Kosrae",
|
|
398
|
+
"Pacific/Kwajalein",
|
|
399
|
+
"Pacific/Majuro",
|
|
400
|
+
"Pacific/Marquesas",
|
|
401
|
+
"Pacific/Midway",
|
|
402
|
+
"Pacific/Nauru",
|
|
403
|
+
"Pacific/Niue",
|
|
404
|
+
"Pacific/Norfolk",
|
|
405
|
+
"Pacific/Noumea",
|
|
406
|
+
"Pacific/Pago_Pago",
|
|
407
|
+
"Pacific/Palau",
|
|
408
|
+
"Pacific/Pitcairn",
|
|
409
|
+
"Pacific/Ponape",
|
|
410
|
+
"Pacific/Port_Moresby",
|
|
411
|
+
"Pacific/Rarotonga",
|
|
412
|
+
"Pacific/Saipan",
|
|
413
|
+
"Pacific/Tahiti",
|
|
414
|
+
"Pacific/Tarawa",
|
|
415
|
+
"Pacific/Tongatapu",
|
|
416
|
+
"Pacific/Truk",
|
|
417
|
+
"Pacific/Wake",
|
|
418
|
+
"Pacific/Wallis",
|
|
419
|
+
]);
|
|
420
|
+
function parseOffsetMinutes(rawOffset) {
|
|
421
|
+
if (rawOffset === "GMT" || rawOffset === "UTC") {
|
|
422
|
+
return 0;
|
|
423
|
+
}
|
|
424
|
+
const match = rawOffset.match(/^(?:GMT|UTC)([+-])(\d{1,2})(?::?(\d{2}))?$/);
|
|
425
|
+
if (!match) {
|
|
426
|
+
return 0;
|
|
427
|
+
}
|
|
428
|
+
const sign = match[1] === "-" ? -1 : 1;
|
|
429
|
+
const hours = Number.parseInt(match[2] || "0", 10);
|
|
430
|
+
const minutes = Number.parseInt(match[3] || "0", 10);
|
|
431
|
+
return sign * (hours * 60 + minutes);
|
|
432
|
+
}
|
|
433
|
+
function getTimezoneOffsetMinutes(timezoneId, date = new Date()) {
|
|
434
|
+
try {
|
|
435
|
+
const parts = new Intl.DateTimeFormat("en-US", {
|
|
436
|
+
timeZone: timezoneId,
|
|
437
|
+
timeZoneName: "shortOffset",
|
|
438
|
+
hour: "2-digit",
|
|
439
|
+
minute: "2-digit",
|
|
440
|
+
hourCycle: "h23",
|
|
441
|
+
}).formatToParts(date);
|
|
442
|
+
const offsetPart = parts.find((part) => part.type === "timeZoneName")?.value;
|
|
443
|
+
return offsetPart ? parseOffsetMinutes(offsetPart) : 0;
|
|
444
|
+
}
|
|
445
|
+
catch {
|
|
446
|
+
return 0;
|
|
447
|
+
}
|
|
448
|
+
}
|
|
449
|
+
function formatUtcOffset(offsetMinutes) {
|
|
450
|
+
const sign = offsetMinutes >= 0 ? "+" : "-";
|
|
451
|
+
const absoluteMinutes = Math.abs(offsetMinutes);
|
|
452
|
+
const hours = String(Math.floor(absoluteMinutes / 60)).padStart(2, "0");
|
|
453
|
+
const minutes = String(absoluteMinutes % 60).padStart(2, "0");
|
|
454
|
+
return `UTC${sign}${hours}:${minutes}`;
|
|
455
|
+
}
|
|
456
|
+
export function formatIanaTimezoneLabel(timezoneId, date = new Date()) {
|
|
457
|
+
return `${formatUtcOffset(getTimezoneOffsetMinutes(timezoneId, date))} • ${timezoneId}`;
|
|
458
|
+
}
|
|
459
|
+
export const IANA_TIMEZONE_OPTIONS = Object.freeze([...IANA_TIMEZONE_IDS]
|
|
460
|
+
.map((timezoneId) => {
|
|
461
|
+
const offsetMinutes = getTimezoneOffsetMinutes(timezoneId);
|
|
462
|
+
return {
|
|
463
|
+
value: timezoneId,
|
|
464
|
+
label: `${formatUtcOffset(offsetMinutes)} • ${timezoneId}`,
|
|
465
|
+
offsetMinutes,
|
|
466
|
+
};
|
|
467
|
+
})
|
|
468
|
+
.sort((left, right) => left.offsetMinutes - right.offsetMinutes || left.value.localeCompare(right.value)));
|
|
469
|
+
export { IANA_TIMEZONE_IDS };
|
|
470
|
+
//# sourceMappingURL=iana-timezones.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"iana-timezones.js","sourceRoot":"","sources":["../../src/managed-tools/iana-timezones.ts"],"names":[],"mappings":"AAAA,MAAM,iBAAiB,GAAG,MAAM,CAAC,MAAM,CAAC;IACtC,gBAAgB;IAChB,cAAc;IACd,oBAAoB;IACpB,gBAAgB;IAChB,eAAe;IACf,eAAe;IACf,eAAe;IACf,eAAe;IACf,eAAe;IACf,iBAAiB;IACjB,oBAAoB;IACpB,kBAAkB;IAClB,cAAc;IACd,mBAAmB;IACnB,cAAc;IACd,gBAAgB;IAChB,cAAc;IACd,sBAAsB;IACtB,iBAAiB;IACjB,eAAe;IACf,iBAAiB;IACjB,iBAAiB;IACjB,iBAAiB;IACjB,eAAe;IACf,qBAAqB;IACrB,aAAa;IACb,gBAAgB;IAChB,iBAAiB;IACjB,eAAe;IACf,iBAAiB;IACjB,cAAc;IACd,mBAAmB;IACnB,aAAa;IACb,eAAe;IACf,mBAAmB;IACnB,eAAe;IACf,eAAe;IACf,eAAe;IACf,eAAe;IACf,gBAAgB;IAChB,kBAAkB;IAClB,iBAAiB;IACjB,gBAAgB;IAChB,iBAAiB;IACjB,eAAe;IACf,mBAAmB;IACnB,oBAAoB;IACpB,mBAAmB;IACnB,iBAAiB;IACjB,gBAAgB;IAChB,cAAc;IACd,iBAAiB;IACjB,cAAc;IACd,mBAAmB;IACnB,kBAAkB;IAClB,iBAAiB;IACjB,mBAAmB;IACnB,4BAA4B;IAC5B,gCAAgC;IAChC,yBAAyB;IACzB,4BAA4B;IAC5B,4BAA4B;IAC5B,2BAA2B;IAC3B,2BAA2B;IAC3B,eAAe;IACf,kBAAkB;IAClB,eAAe;IACf,wBAAwB;IACxB,kBAAkB;IAClB,eAAe;IACf,gBAAgB;IAChB,sBA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,GAAG,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,eAAe,GAAG,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC;IACxE,MAAM,OAAO,GAAG,MAAM,CAAC,eAAe,GAAG,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC;IAC9D,OAAO,MAAM,IAAI,GAAG,KAAK,IAAI,OAAO,EAAE,CAAC;AACzC,CAAC;AAED,MAAM,UAAU,uBAAuB,CAAC,UAAkB,EAAE,OAAa,IAAI,IAAI,EAAE;IACjF,OAAO,GAAG,eAAe,CAAC,wBAAwB,CAAC,UAAU,EAAE,IAAI,CAAC,CAAC,MAAM,UAAU,EAAE,CAAC;AAC1F,CAAC;AAED,MAAM,CAAC,MAAM,qBAAqB,GAAsC,MAAM,CAAC,MAAM,CACnF,CAAC,GAAG,iBAAiB,CAAC;KACnB,GAAG,CAAC,CAAC,UAAU,EAAE,EAAE;IAClB,MAAM,aAAa,GAAG,wBAAwB,CAAC,UAAU,CAAC,CAAC;IAC3D,OAAO;QACL,KAAK,EAAE,UAAU;QACjB,KAAK,EAAE,GAAG,eAAe,CAAC,aAAa,CAAC,MAAM,UAAU,EAAE;QAC1D,aAAa;KACd,CAAC;AACJ,CAAC,CAAC;KACD,IAAI,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC,IAAI,CAAC,aAAa,GAAG,KAAK,CAAC,aAAa,IAAI,IAAI,CAAC,KAAK,CAAC,aAAa,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAC5G,CAAC;AAEF,OAAO,EAAE,iBAAiB,EAAE,CAAC"}
|
package/dist/types.d.ts
CHANGED
|
@@ -22,6 +22,8 @@ export interface ConnectionOptions {
|
|
|
22
22
|
apiUrl?: string;
|
|
23
23
|
/** API key for authentication */
|
|
24
24
|
apiKey?: string;
|
|
25
|
+
/** Generic bearer auth token for authentication */
|
|
26
|
+
authToken?: string;
|
|
25
27
|
/** Agent ID to connect to. */
|
|
26
28
|
agentId?: string;
|
|
27
29
|
/** Runtime prompt variables */
|
|
@@ -162,6 +164,53 @@ export interface MCPServerConfig {
|
|
|
162
164
|
headers?: Record<string, string> | null;
|
|
163
165
|
[key: string]: any;
|
|
164
166
|
}
|
|
167
|
+
export interface ManagedToolsConfig {
|
|
168
|
+
google_calendar?: {
|
|
169
|
+
enabled?: boolean | null;
|
|
170
|
+
default_calendar_id?: string | null;
|
|
171
|
+
timezone?: string | null;
|
|
172
|
+
selected_operations?: string[] | null;
|
|
173
|
+
} | null;
|
|
174
|
+
google_sheets?: {
|
|
175
|
+
enabled?: boolean | null;
|
|
176
|
+
spreadsheet_id?: string | null;
|
|
177
|
+
sheet_name?: string | null;
|
|
178
|
+
selected_operations?: string[] | null;
|
|
179
|
+
} | null;
|
|
180
|
+
google_gmail?: {
|
|
181
|
+
enabled?: boolean | null;
|
|
182
|
+
selected_operations?: string[] | null;
|
|
183
|
+
} | null;
|
|
184
|
+
}
|
|
185
|
+
export type GoogleCalendarOperation = 'google_calendar_check_availability' | 'google_calendar_list_upcoming_events' | 'google_calendar_create_event' | 'google_calendar_update_event' | 'google_calendar_cancel_event';
|
|
186
|
+
export type GoogleSheetsOperation = 'google_sheets_append_row' | 'google_sheets_list_sheets' | 'google_sheets_read_rows';
|
|
187
|
+
export type GoogleGmailOperation = 'google_gmail_search_messages' | 'google_gmail_get_message' | 'google_gmail_send_email';
|
|
188
|
+
export type GoogleManagedToolOperation = GoogleCalendarOperation | GoogleSheetsOperation | GoogleGmailOperation;
|
|
189
|
+
export interface GoogleManagedToolOperationOption<T extends string = string> {
|
|
190
|
+
value: T;
|
|
191
|
+
label: string;
|
|
192
|
+
description: string;
|
|
193
|
+
}
|
|
194
|
+
export interface GoogleOAuthStartOptions {
|
|
195
|
+
returnUrl?: string;
|
|
196
|
+
managedTools?: ManagedToolsConfig | null;
|
|
197
|
+
}
|
|
198
|
+
export interface GoogleOAuthStartResponse {
|
|
199
|
+
auth_url: string;
|
|
200
|
+
requested_scopes: string[];
|
|
201
|
+
}
|
|
202
|
+
export interface GoogleConnectionStatus {
|
|
203
|
+
connected: boolean;
|
|
204
|
+
agent_id: string;
|
|
205
|
+
error?: string;
|
|
206
|
+
email?: string | null;
|
|
207
|
+
expires_at?: string | null;
|
|
208
|
+
granted_scopes: string[];
|
|
209
|
+
scopes: string[];
|
|
210
|
+
required_scopes: string[];
|
|
211
|
+
missing_scopes: string[];
|
|
212
|
+
reconnect_required: boolean;
|
|
213
|
+
}
|
|
165
214
|
/** Webhook event types */
|
|
166
215
|
export type WebhookEventType = 'call.started' | 'call.completed';
|
|
167
216
|
/**
|
|
@@ -173,7 +222,7 @@ export type WebhookEventType = 'call.started' | 'call.completed';
|
|
|
173
222
|
export interface WebhookEventsConfig {
|
|
174
223
|
/** Webhook endpoint URL (required) */
|
|
175
224
|
url: string;
|
|
176
|
-
/** HMAC-SHA256 signing secret for payload verification (
|
|
225
|
+
/** HMAC-SHA256 signing secret for payload verification (write-only on create/update; URL-matched when preserving secrets across full-array replacement) */
|
|
177
226
|
secret?: string | null;
|
|
178
227
|
/** Whether a signing secret is configured (returned by API) */
|
|
179
228
|
has_secret?: boolean;
|
|
@@ -228,7 +277,7 @@ export interface WebhookToolConfig {
|
|
|
228
277
|
auth_type: 'none' | 'bearer_token' | 'api_key' | 'custom_headers';
|
|
229
278
|
/** Token for bearer_token or api_key auth */
|
|
230
279
|
auth_token?: string | null;
|
|
231
|
-
/** Additional headers (also used for custom_headers auth) */
|
|
280
|
+
/** Additional headers (also used for custom_headers auth). For POST/PUT/PATCH, Content-Type is agent-managed and any configured Content-Type is ignored. */
|
|
232
281
|
headers?: Record<string, string> | null;
|
|
233
282
|
/** Request timeout in seconds */
|
|
234
283
|
timeout?: number | null;
|
|
@@ -236,8 +285,8 @@ export interface WebhookToolConfig {
|
|
|
236
285
|
}
|
|
237
286
|
/** Webhooks configuration exposed by the public API */
|
|
238
287
|
export interface WebhooksConfig {
|
|
239
|
-
/** Event notification webhook
|
|
240
|
-
events?: WebhookEventsConfig | null;
|
|
288
|
+
/** Event notification webhook endpoint configurations. On update, omit to preserve, set null to clear, or replace the entire array. */
|
|
289
|
+
events?: WebhookEventsConfig[] | null;
|
|
241
290
|
/** Inbound call webhook configuration */
|
|
242
291
|
inbound_call?: WebhookInboundCallConfig | null;
|
|
243
292
|
/** Tool webhook configurations */
|
|
@@ -263,10 +312,14 @@ export interface WebhookTestResponse {
|
|
|
263
312
|
status: 'success' | 'failed';
|
|
264
313
|
/** Human-readable result description */
|
|
265
314
|
message: string;
|
|
266
|
-
/**
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
315
|
+
/** Aggregate per-endpoint delivery results */
|
|
316
|
+
results?: Array<{
|
|
317
|
+
url: string;
|
|
318
|
+
success: boolean;
|
|
319
|
+
status_code?: number | null;
|
|
320
|
+
attempts: number;
|
|
321
|
+
error?: string | null;
|
|
322
|
+
}>;
|
|
270
323
|
}
|
|
271
324
|
/** Agent configuration */
|
|
272
325
|
export interface AgentConfig {
|
|
@@ -276,7 +329,7 @@ export interface AgentConfig {
|
|
|
276
329
|
greeting?: string | null;
|
|
277
330
|
/** LLM temperature (default: 0.7) */
|
|
278
331
|
llm_temperature?: number | null;
|
|
279
|
-
/** LLM model (default: gemini-
|
|
332
|
+
/** LLM model (default: gemini-3.1-flash-lite-preview) */
|
|
280
333
|
llm_model?: string | null;
|
|
281
334
|
/** Minimum TTS sentence length (default: 20) */
|
|
282
335
|
tts_min_sentence_len?: number | null;
|
|
@@ -310,12 +363,16 @@ export interface AgentConfig {
|
|
|
310
363
|
vad_activation_threshold?: number | null;
|
|
311
364
|
/** Phone number in E.164 format */
|
|
312
365
|
phone_number?: string | null;
|
|
366
|
+
/** Whether call recording is enabled */
|
|
367
|
+
recording_enabled?: boolean | null;
|
|
313
368
|
/** Whether agent can make outbound calls */
|
|
314
369
|
allow_outbound_calling?: boolean | null;
|
|
315
370
|
/** Webhook configuration for event notifications */
|
|
316
371
|
webhooks?: WebhooksConfig | null;
|
|
317
372
|
/** MCP servers configuration */
|
|
318
373
|
mcp_servers?: MCPServerConfig[] | null;
|
|
374
|
+
/** First-party managed tools configuration */
|
|
375
|
+
managed_tools?: ManagedToolsConfig | null;
|
|
319
376
|
[key: string]: any;
|
|
320
377
|
}
|
|
321
378
|
/** Agent object */
|
|
@@ -462,6 +519,8 @@ export interface PaginatedCallHistoryResponse {
|
|
|
462
519
|
items: CallHistoryItem[];
|
|
463
520
|
pagination: PaginationMeta;
|
|
464
521
|
}
|
|
522
|
+
export type CallHistorySortBy = 'timestamp' | 'agent' | 'call' | 'duration' | 'credits' | 'summary' | 'transcript' | 'recording';
|
|
523
|
+
export type CallHistorySortDirection = 'asc' | 'desc';
|
|
465
524
|
/** Options for getting call history */
|
|
466
525
|
export interface GetCallHistoryOptions extends PaginationOptions {
|
|
467
526
|
/** Filter calls after this date (ISO format UTC) */
|
|
@@ -470,11 +529,24 @@ export interface GetCallHistoryOptions extends PaginationOptions {
|
|
|
470
529
|
end_date?: string;
|
|
471
530
|
/** Filter calls by agent ID(s) */
|
|
472
531
|
agent_ids?: string[];
|
|
532
|
+
/** Filter calls by partial agent name match */
|
|
533
|
+
agent_name?: string;
|
|
534
|
+
/** Sort field */
|
|
535
|
+
sort_by?: CallHistorySortBy;
|
|
536
|
+
/** Sort direction */
|
|
537
|
+
sort_dir?: CallHistorySortDirection;
|
|
473
538
|
}
|
|
474
539
|
/** Transcript URL response */
|
|
475
540
|
export interface TranscriptResponse {
|
|
476
541
|
url: string;
|
|
477
542
|
}
|
|
543
|
+
/** Recording availability status */
|
|
544
|
+
export type RecordingStatus = 'ready' | 'processing' | 'not_recorded';
|
|
545
|
+
/** Recording status response */
|
|
546
|
+
export interface RecordingResponse {
|
|
547
|
+
status: RecordingStatus;
|
|
548
|
+
url?: string | null;
|
|
549
|
+
}
|
|
478
550
|
/** Document for knowledge base */
|
|
479
551
|
export interface KnowledgeBaseDocument {
|
|
480
552
|
/** Document text content (required) */
|
|
@@ -616,7 +688,7 @@ export interface SynthesizeRequest {
|
|
|
616
688
|
}
|
|
617
689
|
/** Options for cloning a voice from audio */
|
|
618
690
|
export interface CloneVoiceOptions {
|
|
619
|
-
/** Audio file (MP3, WAV, or
|
|
691
|
+
/** Audio file (MP3, WAV, or M4A format, max 7.5MB) */
|
|
620
692
|
file: Blob | File;
|
|
621
693
|
/** Name for the voice (optional) */
|
|
622
694
|
name?: string;
|
|
@@ -711,12 +783,17 @@ export interface EndCallResponse {
|
|
|
711
783
|
credits_used: number;
|
|
712
784
|
[key: string]: any;
|
|
713
785
|
}
|
|
786
|
+
export type AuthTokenProvider = () => Promise<string | null | undefined> | string | null | undefined;
|
|
714
787
|
/** Configuration for VoiceAI SDK */
|
|
715
788
|
export interface VoiceAIConfig {
|
|
716
789
|
/** API key for authentication.
|
|
717
790
|
* Required for API operations (agents, tts, analytics, etc.) and `getConnectionDetails()`.
|
|
718
791
|
* Not needed when using `connectRoom()` with pre-fetched connection details. */
|
|
719
792
|
apiKey?: string;
|
|
793
|
+
/** Generic bearer auth token for REST API operations. */
|
|
794
|
+
authToken?: string;
|
|
795
|
+
/** Lazy auth token provider for browser apps with rotating auth. */
|
|
796
|
+
getAuthToken?: AuthTokenProvider;
|
|
720
797
|
/** API base URL (optional, defaults to production) */
|
|
721
798
|
apiUrl?: string;
|
|
722
799
|
}
|