@voquill/functions 0.1.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.
@@ -0,0 +1,1248 @@
1
+ import { FullConfig, Member, Term, Tone, type Auth, type EmptyObject, type EnterpriseConfig, type EnterpriseLicense, type FlaggedAudio, type JsonResponse, type LlmProvider, type LlmProviderInput, type MetricsDaily, type MetricsPerProvider, type MetricsPerUser, type MetricsRange, type MetricsSummary, type LlmMessage, type LlmTool, type LlmToolChoice, type Nullable, type OidcProvider, type OidcProviderInput, type SttProvider, type SttProviderInput, type User, type UserWithAuth } from "@voquill/types";
2
+ import { z } from "zod";
3
+ export declare const CLOUD_MODELS: readonly ["low", "medium", "large"];
4
+ export type CloudModel = (typeof CLOUD_MODELS)[number];
5
+ export declare const CloudModelZod: z.ZodEnum<["low", "medium", "large"]>;
6
+ type HandlerDefinitions = {
7
+ "auth/register": {
8
+ input: {
9
+ email: string;
10
+ password: string;
11
+ };
12
+ output: {
13
+ token: string;
14
+ refreshToken: string;
15
+ auth: Auth;
16
+ };
17
+ };
18
+ "auth/login": {
19
+ input: {
20
+ email: string;
21
+ password: string;
22
+ };
23
+ output: {
24
+ token: string;
25
+ refreshToken: string;
26
+ auth: Auth;
27
+ };
28
+ };
29
+ "auth/logout": {
30
+ input: EmptyObject;
31
+ output: EmptyObject;
32
+ };
33
+ "auth/refresh": {
34
+ input: {
35
+ refreshToken: string;
36
+ };
37
+ output: {
38
+ token: string;
39
+ refreshToken: string;
40
+ auth: Auth;
41
+ };
42
+ };
43
+ "auth/makeAdmin": {
44
+ input: {
45
+ userId: string;
46
+ isAdmin: boolean;
47
+ };
48
+ output: EmptyObject;
49
+ };
50
+ "auth/createApiToken": {
51
+ input: EmptyObject;
52
+ output: {
53
+ apiToken: string;
54
+ apiRefreshToken: string;
55
+ };
56
+ };
57
+ "auth/refreshApiToken": {
58
+ input: {
59
+ apiRefreshToken: string;
60
+ };
61
+ output: {
62
+ apiToken: string;
63
+ };
64
+ };
65
+ "auth/deleteUser": {
66
+ input: {
67
+ userId: string;
68
+ };
69
+ output: EmptyObject;
70
+ };
71
+ "auth/resetPassword": {
72
+ input: {
73
+ userId: string;
74
+ password: string;
75
+ };
76
+ output: EmptyObject;
77
+ };
78
+ "emulator/resetWordsToday": {
79
+ input: EmptyObject;
80
+ output: EmptyObject;
81
+ };
82
+ "emulator/resetWordsThisMonth": {
83
+ input: EmptyObject;
84
+ output: EmptyObject;
85
+ };
86
+ "emulator/clearRateLimits": {
87
+ input: EmptyObject;
88
+ output: EmptyObject;
89
+ };
90
+ "emulator/cancelProTrials": {
91
+ input: EmptyObject;
92
+ output: EmptyObject;
93
+ };
94
+ "term/listMyTerms": {
95
+ input: EmptyObject;
96
+ output: {
97
+ terms: Term[];
98
+ };
99
+ };
100
+ "term/upsertMyTerm": {
101
+ input: {
102
+ term: Term;
103
+ };
104
+ output: EmptyObject;
105
+ };
106
+ "term/deleteMyTerm": {
107
+ input: {
108
+ termId: string;
109
+ };
110
+ output: EmptyObject;
111
+ };
112
+ "term/listGlobalTerms": {
113
+ input: EmptyObject;
114
+ output: {
115
+ terms: Term[];
116
+ };
117
+ };
118
+ "term/upsertGlobalTerm": {
119
+ input: {
120
+ term: Term;
121
+ };
122
+ output: EmptyObject;
123
+ };
124
+ "term/deleteGlobalTerm": {
125
+ input: {
126
+ termId: string;
127
+ };
128
+ output: EmptyObject;
129
+ };
130
+ "tone/listMyTones": {
131
+ input: EmptyObject;
132
+ output: {
133
+ tones: Tone[];
134
+ };
135
+ };
136
+ "tone/upsertMyTone": {
137
+ input: {
138
+ tone: Tone;
139
+ };
140
+ output: EmptyObject;
141
+ };
142
+ "tone/deleteMyTone": {
143
+ input: {
144
+ toneId: string;
145
+ };
146
+ output: EmptyObject;
147
+ };
148
+ "tone/listGlobalTones": {
149
+ input: EmptyObject;
150
+ output: {
151
+ tones: Tone[];
152
+ };
153
+ };
154
+ "tone/upsertGlobalTone": {
155
+ input: {
156
+ tone: Tone;
157
+ };
158
+ output: EmptyObject;
159
+ };
160
+ "tone/deleteGlobalTone": {
161
+ input: {
162
+ toneId: string;
163
+ };
164
+ output: EmptyObject;
165
+ };
166
+ "flaggedAudio/upsert": {
167
+ input: {
168
+ flaggedAudio: FlaggedAudio;
169
+ };
170
+ output: EmptyObject;
171
+ };
172
+ "member/tryInitialize": {
173
+ input: EmptyObject;
174
+ output: EmptyObject;
175
+ };
176
+ "member/getMyMember": {
177
+ input: EmptyObject;
178
+ output: {
179
+ member: Nullable<Member>;
180
+ };
181
+ };
182
+ "ai/transcribeAudio": {
183
+ input: {
184
+ prompt?: Nullable<string>;
185
+ audioBase64: string;
186
+ audioMimeType: string;
187
+ simulate?: Nullable<boolean>;
188
+ language?: string;
189
+ };
190
+ output: {
191
+ text: string;
192
+ };
193
+ };
194
+ "ai/generateText": {
195
+ input: {
196
+ system?: Nullable<string>;
197
+ prompt: string;
198
+ simulate?: Nullable<boolean>;
199
+ jsonResponse?: Nullable<JsonResponse>;
200
+ model?: Nullable<CloudModel>;
201
+ };
202
+ output: {
203
+ text: string;
204
+ };
205
+ };
206
+ "user/setMyUser": {
207
+ input: {
208
+ value: Partial<User>;
209
+ };
210
+ output: EmptyObject;
211
+ };
212
+ "user/getMyUser": {
213
+ input: EmptyObject;
214
+ output: {
215
+ user: Nullable<User>;
216
+ };
217
+ };
218
+ "user/listAllUsers": {
219
+ input: EmptyObject;
220
+ output: {
221
+ users: UserWithAuth[];
222
+ };
223
+ };
224
+ "user/incrementWordCount": {
225
+ input: {
226
+ wordCount: number;
227
+ timezone?: Nullable<string>;
228
+ };
229
+ output: EmptyObject;
230
+ };
231
+ "user/trackStreak": {
232
+ input: {
233
+ timezone?: Nullable<string>;
234
+ };
235
+ output: EmptyObject;
236
+ };
237
+ "stripe/createCheckoutSession": {
238
+ input: {
239
+ priceId: string;
240
+ };
241
+ output: {
242
+ sessionId: string;
243
+ clientSecret: string;
244
+ };
245
+ };
246
+ "stripe/getPrices": {
247
+ input: {
248
+ priceIds: string[];
249
+ };
250
+ output: {
251
+ prices: Record<string, {
252
+ unitAmount: Nullable<number>;
253
+ unitAmountDecimal: Nullable<string>;
254
+ currency: string;
255
+ }>;
256
+ };
257
+ };
258
+ "stripe/createCustomerPortalSession": {
259
+ input: EmptyObject;
260
+ output: {
261
+ url: string;
262
+ };
263
+ };
264
+ "sttProvider/list": {
265
+ input: EmptyObject;
266
+ output: {
267
+ providers: SttProvider[];
268
+ };
269
+ };
270
+ "sttProvider/upsert": {
271
+ input: {
272
+ provider: SttProviderInput;
273
+ };
274
+ output: EmptyObject;
275
+ };
276
+ "sttProvider/delete": {
277
+ input: {
278
+ providerId: string;
279
+ };
280
+ output: EmptyObject;
281
+ };
282
+ "sttProvider/pull": {
283
+ input: {
284
+ providerId: string;
285
+ };
286
+ output: {
287
+ provider: Nullable<SttProvider>;
288
+ };
289
+ };
290
+ "llmProvider/list": {
291
+ input: EmptyObject;
292
+ output: {
293
+ providers: LlmProvider[];
294
+ };
295
+ };
296
+ "llmProvider/upsert": {
297
+ input: {
298
+ provider: LlmProviderInput;
299
+ };
300
+ output: EmptyObject;
301
+ };
302
+ "llmProvider/delete": {
303
+ input: {
304
+ providerId: string;
305
+ };
306
+ output: EmptyObject;
307
+ };
308
+ "llmProvider/pull": {
309
+ input: {
310
+ providerId: string;
311
+ };
312
+ output: {
313
+ provider: Nullable<LlmProvider>;
314
+ };
315
+ };
316
+ "system/getVersion": {
317
+ input: EmptyObject;
318
+ output: {
319
+ version: string;
320
+ };
321
+ };
322
+ "enterprise/getConfig": {
323
+ input: EmptyObject;
324
+ output: {
325
+ config: EnterpriseConfig;
326
+ license: EnterpriseLicense;
327
+ };
328
+ };
329
+ "enterprise/upsertConfig": {
330
+ input: {
331
+ config: EnterpriseConfig;
332
+ };
333
+ output: EmptyObject;
334
+ };
335
+ "oidcProvider/list": {
336
+ input: EmptyObject;
337
+ output: {
338
+ providers: OidcProvider[];
339
+ };
340
+ };
341
+ "oidcProvider/upsert": {
342
+ input: {
343
+ provider: OidcProviderInput;
344
+ };
345
+ output: EmptyObject;
346
+ };
347
+ "oidcProvider/delete": {
348
+ input: {
349
+ providerId: string;
350
+ };
351
+ output: EmptyObject;
352
+ };
353
+ "oidcProvider/listEnabled": {
354
+ input: EmptyObject;
355
+ output: {
356
+ providers: OidcProvider[];
357
+ };
358
+ };
359
+ "config/getFullConfig": {
360
+ input: EmptyObject;
361
+ output: {
362
+ config: FullConfig;
363
+ };
364
+ };
365
+ "metrics/getSummary": {
366
+ input: {
367
+ range: MetricsRange;
368
+ };
369
+ output: {
370
+ summary: MetricsSummary;
371
+ daily: MetricsDaily[];
372
+ perUser: MetricsPerUser[];
373
+ perProvider: MetricsPerProvider[];
374
+ };
375
+ };
376
+ };
377
+ export type HandlerName = keyof HandlerDefinitions;
378
+ export type HandlerInput<N extends HandlerName> = HandlerDefinitions[N]["input"];
379
+ export type HandlerOutput<N extends HandlerName> = HandlerDefinitions[N]["output"];
380
+ export declare const HANDLER_NAMES: string[];
381
+ export declare const EmptyObjectZod: z.ZodObject<{}, "strict", z.ZodTypeAny, {}, {}>;
382
+ export declare const JsonResponseZod: z.ZodObject<{
383
+ name: z.ZodString;
384
+ description: z.ZodOptional<z.ZodString>;
385
+ schema: z.ZodRecord<z.ZodString, z.ZodUnknown>;
386
+ }, "strict", z.ZodTypeAny, {
387
+ name: string;
388
+ schema: Record<string, unknown>;
389
+ description?: string | undefined;
390
+ }, {
391
+ name: string;
392
+ schema: Record<string, unknown>;
393
+ description?: string | undefined;
394
+ }>;
395
+ export declare const AiTranscribeAudioInputZod: z.ZodObject<{
396
+ prompt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
397
+ audioBase64: z.ZodString;
398
+ audioMimeType: z.ZodString;
399
+ simulate: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
400
+ language: z.ZodOptional<z.ZodString>;
401
+ }, "strict", z.ZodTypeAny, {
402
+ audioBase64: string;
403
+ audioMimeType: string;
404
+ prompt?: string | null | undefined;
405
+ simulate?: boolean | null | undefined;
406
+ language?: string | undefined;
407
+ }, {
408
+ audioBase64: string;
409
+ audioMimeType: string;
410
+ prompt?: string | null | undefined;
411
+ simulate?: boolean | null | undefined;
412
+ language?: string | undefined;
413
+ }>;
414
+ export declare const AiGenerateTextInputZod: z.ZodObject<{
415
+ system: z.ZodOptional<z.ZodNullable<z.ZodString>>;
416
+ prompt: z.ZodString;
417
+ simulate: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
418
+ jsonResponse: z.ZodOptional<z.ZodNullable<z.ZodObject<{
419
+ name: z.ZodString;
420
+ description: z.ZodOptional<z.ZodString>;
421
+ schema: z.ZodRecord<z.ZodString, z.ZodUnknown>;
422
+ }, "strict", z.ZodTypeAny, {
423
+ name: string;
424
+ schema: Record<string, unknown>;
425
+ description?: string | undefined;
426
+ }, {
427
+ name: string;
428
+ schema: Record<string, unknown>;
429
+ description?: string | undefined;
430
+ }>>>;
431
+ model: z.ZodOptional<z.ZodNullable<z.ZodEnum<["low", "medium", "large"]>>>;
432
+ }, "strict", z.ZodTypeAny, {
433
+ prompt: string;
434
+ simulate?: boolean | null | undefined;
435
+ system?: string | null | undefined;
436
+ jsonResponse?: {
437
+ name: string;
438
+ schema: Record<string, unknown>;
439
+ description?: string | undefined;
440
+ } | null | undefined;
441
+ model?: "low" | "medium" | "large" | null | undefined;
442
+ }, {
443
+ prompt: string;
444
+ simulate?: boolean | null | undefined;
445
+ system?: string | null | undefined;
446
+ jsonResponse?: {
447
+ name: string;
448
+ schema: Record<string, unknown>;
449
+ description?: string | undefined;
450
+ } | null | undefined;
451
+ model?: "low" | "medium" | "large" | null | undefined;
452
+ }>;
453
+ export declare const StripeCreateCheckoutSessionInputZod: z.ZodObject<{
454
+ priceId: z.ZodString;
455
+ }, "strict", z.ZodTypeAny, {
456
+ priceId: string;
457
+ }, {
458
+ priceId: string;
459
+ }>;
460
+ export declare const StripeGetPricesInputZod: z.ZodObject<{
461
+ priceIds: z.ZodArray<z.ZodString, "many">;
462
+ }, "strict", z.ZodTypeAny, {
463
+ priceIds: string[];
464
+ }, {
465
+ priceIds: string[];
466
+ }>;
467
+ export declare const SetMyUserInputZod: z.ZodObject<{
468
+ value: z.ZodObject<{
469
+ id: z.ZodString;
470
+ createdAt: z.ZodString;
471
+ updatedAt: z.ZodString;
472
+ name: z.ZodString;
473
+ bio: z.ZodOptional<z.ZodNullable<z.ZodString>>;
474
+ company: z.ZodOptional<z.ZodNullable<z.ZodString>>;
475
+ title: z.ZodOptional<z.ZodNullable<z.ZodString>>;
476
+ onboarded: z.ZodBoolean;
477
+ onboardedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
478
+ timezone: z.ZodOptional<z.ZodNullable<z.ZodString>>;
479
+ preferredLanguage: z.ZodOptional<z.ZodNullable<z.ZodString>>;
480
+ preferredMicrophone: z.ZodOptional<z.ZodNullable<z.ZodString>>;
481
+ playInteractionChime: z.ZodBoolean;
482
+ hasFinishedTutorial: z.ZodBoolean;
483
+ wordsThisMonth: z.ZodNumber;
484
+ wordsThisMonthMonth: z.ZodOptional<z.ZodNullable<z.ZodString>>;
485
+ wordsTotal: z.ZodNumber;
486
+ hasMigratedPreferredMicrophone: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
487
+ cohort: z.ZodOptional<z.ZodNullable<z.ZodString>>;
488
+ shouldShowUpgradeDialog: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
489
+ stylingMode: z.ZodOptional<z.ZodNullable<z.ZodEnum<["app", "manual"]>>>;
490
+ selectedToneId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
491
+ activeToneIds: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString, "many">>>;
492
+ streak: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
493
+ streakRecordedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
494
+ referralSource: z.ZodOptional<z.ZodNullable<z.ZodString>>;
495
+ }, "strict", z.ZodTypeAny, {
496
+ id: string;
497
+ name: string;
498
+ createdAt: string;
499
+ updatedAt: string;
500
+ onboarded: boolean;
501
+ playInteractionChime: boolean;
502
+ hasFinishedTutorial: boolean;
503
+ wordsThisMonth: number;
504
+ wordsTotal: number;
505
+ stylingMode?: "app" | "manual" | null | undefined;
506
+ bio?: string | null | undefined;
507
+ company?: string | null | undefined;
508
+ title?: string | null | undefined;
509
+ onboardedAt?: string | null | undefined;
510
+ timezone?: string | null | undefined;
511
+ preferredLanguage?: string | null | undefined;
512
+ preferredMicrophone?: string | null | undefined;
513
+ wordsThisMonthMonth?: string | null | undefined;
514
+ hasMigratedPreferredMicrophone?: boolean | null | undefined;
515
+ cohort?: string | null | undefined;
516
+ shouldShowUpgradeDialog?: boolean | null | undefined;
517
+ selectedToneId?: string | null | undefined;
518
+ activeToneIds?: string[] | null | undefined;
519
+ streak?: number | null | undefined;
520
+ streakRecordedAt?: string | null | undefined;
521
+ referralSource?: string | null | undefined;
522
+ }, {
523
+ id: string;
524
+ name: string;
525
+ createdAt: string;
526
+ updatedAt: string;
527
+ onboarded: boolean;
528
+ playInteractionChime: boolean;
529
+ hasFinishedTutorial: boolean;
530
+ wordsThisMonth: number;
531
+ wordsTotal: number;
532
+ stylingMode?: "app" | "manual" | null | undefined;
533
+ bio?: string | null | undefined;
534
+ company?: string | null | undefined;
535
+ title?: string | null | undefined;
536
+ onboardedAt?: string | null | undefined;
537
+ timezone?: string | null | undefined;
538
+ preferredLanguage?: string | null | undefined;
539
+ preferredMicrophone?: string | null | undefined;
540
+ wordsThisMonthMonth?: string | null | undefined;
541
+ hasMigratedPreferredMicrophone?: boolean | null | undefined;
542
+ cohort?: string | null | undefined;
543
+ shouldShowUpgradeDialog?: boolean | null | undefined;
544
+ selectedToneId?: string | null | undefined;
545
+ activeToneIds?: string[] | null | undefined;
546
+ streak?: number | null | undefined;
547
+ streakRecordedAt?: string | null | undefined;
548
+ referralSource?: string | null | undefined;
549
+ }>;
550
+ }, "strict", z.ZodTypeAny, {
551
+ value: {
552
+ id: string;
553
+ name: string;
554
+ createdAt: string;
555
+ updatedAt: string;
556
+ onboarded: boolean;
557
+ playInteractionChime: boolean;
558
+ hasFinishedTutorial: boolean;
559
+ wordsThisMonth: number;
560
+ wordsTotal: number;
561
+ stylingMode?: "app" | "manual" | null | undefined;
562
+ bio?: string | null | undefined;
563
+ company?: string | null | undefined;
564
+ title?: string | null | undefined;
565
+ onboardedAt?: string | null | undefined;
566
+ timezone?: string | null | undefined;
567
+ preferredLanguage?: string | null | undefined;
568
+ preferredMicrophone?: string | null | undefined;
569
+ wordsThisMonthMonth?: string | null | undefined;
570
+ hasMigratedPreferredMicrophone?: boolean | null | undefined;
571
+ cohort?: string | null | undefined;
572
+ shouldShowUpgradeDialog?: boolean | null | undefined;
573
+ selectedToneId?: string | null | undefined;
574
+ activeToneIds?: string[] | null | undefined;
575
+ streak?: number | null | undefined;
576
+ streakRecordedAt?: string | null | undefined;
577
+ referralSource?: string | null | undefined;
578
+ };
579
+ }, {
580
+ value: {
581
+ id: string;
582
+ name: string;
583
+ createdAt: string;
584
+ updatedAt: string;
585
+ onboarded: boolean;
586
+ playInteractionChime: boolean;
587
+ hasFinishedTutorial: boolean;
588
+ wordsThisMonth: number;
589
+ wordsTotal: number;
590
+ stylingMode?: "app" | "manual" | null | undefined;
591
+ bio?: string | null | undefined;
592
+ company?: string | null | undefined;
593
+ title?: string | null | undefined;
594
+ onboardedAt?: string | null | undefined;
595
+ timezone?: string | null | undefined;
596
+ preferredLanguage?: string | null | undefined;
597
+ preferredMicrophone?: string | null | undefined;
598
+ wordsThisMonthMonth?: string | null | undefined;
599
+ hasMigratedPreferredMicrophone?: boolean | null | undefined;
600
+ cohort?: string | null | undefined;
601
+ shouldShowUpgradeDialog?: boolean | null | undefined;
602
+ selectedToneId?: string | null | undefined;
603
+ activeToneIds?: string[] | null | undefined;
604
+ streak?: number | null | undefined;
605
+ streakRecordedAt?: string | null | undefined;
606
+ referralSource?: string | null | undefined;
607
+ };
608
+ }>;
609
+ export declare const IncrementWordCountInputZod: z.ZodObject<{
610
+ wordCount: z.ZodNumber;
611
+ timezone: z.ZodOptional<z.ZodNullable<z.ZodString>>;
612
+ }, "strict", z.ZodTypeAny, {
613
+ wordCount: number;
614
+ timezone?: string | null | undefined;
615
+ }, {
616
+ wordCount: number;
617
+ timezone?: string | null | undefined;
618
+ }>;
619
+ export declare const TrackStreakInputZod: z.ZodObject<{
620
+ timezone: z.ZodOptional<z.ZodNullable<z.ZodString>>;
621
+ }, "strict", z.ZodTypeAny, {
622
+ timezone?: string | null | undefined;
623
+ }, {
624
+ timezone?: string | null | undefined;
625
+ }>;
626
+ export declare const UpsertTermInputZod: z.ZodObject<{
627
+ term: z.ZodObject<{
628
+ id: z.ZodString;
629
+ createdAt: z.ZodString;
630
+ sourceValue: z.ZodString;
631
+ destinationValue: z.ZodString;
632
+ isReplacement: z.ZodBoolean;
633
+ isGlobal: z.ZodOptional<z.ZodBoolean>;
634
+ }, "strict", z.ZodTypeAny, {
635
+ id: string;
636
+ createdAt: string;
637
+ sourceValue: string;
638
+ destinationValue: string;
639
+ isReplacement: boolean;
640
+ isGlobal?: boolean | undefined;
641
+ }, {
642
+ id: string;
643
+ createdAt: string;
644
+ sourceValue: string;
645
+ destinationValue: string;
646
+ isReplacement: boolean;
647
+ isGlobal?: boolean | undefined;
648
+ }>;
649
+ }, "strict", z.ZodTypeAny, {
650
+ term: {
651
+ id: string;
652
+ createdAt: string;
653
+ sourceValue: string;
654
+ destinationValue: string;
655
+ isReplacement: boolean;
656
+ isGlobal?: boolean | undefined;
657
+ };
658
+ }, {
659
+ term: {
660
+ id: string;
661
+ createdAt: string;
662
+ sourceValue: string;
663
+ destinationValue: string;
664
+ isReplacement: boolean;
665
+ isGlobal?: boolean | undefined;
666
+ };
667
+ }>;
668
+ export declare const DeleteTermInputZod: z.ZodObject<{
669
+ termId: z.ZodString;
670
+ }, "strict", z.ZodTypeAny, {
671
+ termId: string;
672
+ }, {
673
+ termId: string;
674
+ }>;
675
+ export declare const UpsertToneInputZod: z.ZodObject<{
676
+ tone: z.ZodObject<{
677
+ id: z.ZodString;
678
+ name: z.ZodString;
679
+ description: z.ZodOptional<z.ZodString>;
680
+ promptTemplate: z.ZodString;
681
+ isSystem: z.ZodBoolean;
682
+ createdAt: z.ZodNumber;
683
+ sortOrder: z.ZodNumber;
684
+ isGlobal: z.ZodOptional<z.ZodBoolean>;
685
+ isDeprecated: z.ZodOptional<z.ZodBoolean>;
686
+ shouldDisablePostProcessing: z.ZodOptional<z.ZodBoolean>;
687
+ systemPromptTemplate: z.ZodOptional<z.ZodString>;
688
+ isTemplateTone: z.ZodOptional<z.ZodBoolean>;
689
+ }, "strict", z.ZodTypeAny, {
690
+ id: string;
691
+ name: string;
692
+ createdAt: number;
693
+ promptTemplate: string;
694
+ isSystem: boolean;
695
+ sortOrder: number;
696
+ isGlobal?: boolean | undefined;
697
+ description?: string | undefined;
698
+ isDeprecated?: boolean | undefined;
699
+ shouldDisablePostProcessing?: boolean | undefined;
700
+ systemPromptTemplate?: string | undefined;
701
+ isTemplateTone?: boolean | undefined;
702
+ }, {
703
+ id: string;
704
+ name: string;
705
+ createdAt: number;
706
+ promptTemplate: string;
707
+ isSystem: boolean;
708
+ sortOrder: number;
709
+ isGlobal?: boolean | undefined;
710
+ description?: string | undefined;
711
+ isDeprecated?: boolean | undefined;
712
+ shouldDisablePostProcessing?: boolean | undefined;
713
+ systemPromptTemplate?: string | undefined;
714
+ isTemplateTone?: boolean | undefined;
715
+ }>;
716
+ }, "strict", z.ZodTypeAny, {
717
+ tone: {
718
+ id: string;
719
+ name: string;
720
+ createdAt: number;
721
+ promptTemplate: string;
722
+ isSystem: boolean;
723
+ sortOrder: number;
724
+ isGlobal?: boolean | undefined;
725
+ description?: string | undefined;
726
+ isDeprecated?: boolean | undefined;
727
+ shouldDisablePostProcessing?: boolean | undefined;
728
+ systemPromptTemplate?: string | undefined;
729
+ isTemplateTone?: boolean | undefined;
730
+ };
731
+ }, {
732
+ tone: {
733
+ id: string;
734
+ name: string;
735
+ createdAt: number;
736
+ promptTemplate: string;
737
+ isSystem: boolean;
738
+ sortOrder: number;
739
+ isGlobal?: boolean | undefined;
740
+ description?: string | undefined;
741
+ isDeprecated?: boolean | undefined;
742
+ shouldDisablePostProcessing?: boolean | undefined;
743
+ systemPromptTemplate?: string | undefined;
744
+ isTemplateTone?: boolean | undefined;
745
+ };
746
+ }>;
747
+ export declare const DeleteToneInputZod: z.ZodObject<{
748
+ toneId: z.ZodString;
749
+ }, "strict", z.ZodTypeAny, {
750
+ toneId: string;
751
+ }, {
752
+ toneId: string;
753
+ }>;
754
+ export declare const AuthRegisterInputZod: z.ZodObject<{
755
+ email: z.ZodString;
756
+ password: z.ZodString;
757
+ }, "strict", z.ZodTypeAny, {
758
+ email: string;
759
+ password: string;
760
+ }, {
761
+ email: string;
762
+ password: string;
763
+ }>;
764
+ export declare const AuthMakeAdminInputZod: z.ZodObject<{
765
+ userId: z.ZodString;
766
+ isAdmin: z.ZodBoolean;
767
+ }, "strict", z.ZodTypeAny, {
768
+ userId: string;
769
+ isAdmin: boolean;
770
+ }, {
771
+ userId: string;
772
+ isAdmin: boolean;
773
+ }>;
774
+ export declare const AuthLoginInputZod: z.ZodObject<{
775
+ email: z.ZodString;
776
+ password: z.ZodString;
777
+ }, "strict", z.ZodTypeAny, {
778
+ email: string;
779
+ password: string;
780
+ }, {
781
+ email: string;
782
+ password: string;
783
+ }>;
784
+ export declare const AuthResetPasswordInputZod: z.ZodObject<{
785
+ userId: z.ZodString;
786
+ password: z.ZodString;
787
+ }, "strict", z.ZodTypeAny, {
788
+ password: string;
789
+ userId: string;
790
+ }, {
791
+ password: string;
792
+ userId: string;
793
+ }>;
794
+ export declare const AuthDeleteUserInputZod: z.ZodObject<{
795
+ userId: z.ZodString;
796
+ }, "strict", z.ZodTypeAny, {
797
+ userId: string;
798
+ }, {
799
+ userId: string;
800
+ }>;
801
+ export declare const AuthRefreshInputZod: z.ZodObject<{
802
+ refreshToken: z.ZodString;
803
+ }, "strict", z.ZodTypeAny, {
804
+ refreshToken: string;
805
+ }, {
806
+ refreshToken: string;
807
+ }>;
808
+ export declare const UpsertSttProviderInputZod: z.ZodObject<{
809
+ provider: z.ZodObject<{
810
+ id: z.ZodOptional<z.ZodString>;
811
+ provider: z.ZodString;
812
+ name: z.ZodString;
813
+ url: z.ZodString;
814
+ apiKey: z.ZodDefault<z.ZodString>;
815
+ model: z.ZodString;
816
+ tier: z.ZodNumber;
817
+ }, "strict", z.ZodTypeAny, {
818
+ name: string;
819
+ provider: string;
820
+ url: string;
821
+ apiKey: string;
822
+ model: string;
823
+ tier: number;
824
+ id?: string | undefined;
825
+ }, {
826
+ name: string;
827
+ provider: string;
828
+ url: string;
829
+ model: string;
830
+ tier: number;
831
+ id?: string | undefined;
832
+ apiKey?: string | undefined;
833
+ }>;
834
+ }, "strict", z.ZodTypeAny, {
835
+ provider: {
836
+ name: string;
837
+ provider: string;
838
+ url: string;
839
+ apiKey: string;
840
+ model: string;
841
+ tier: number;
842
+ id?: string | undefined;
843
+ };
844
+ }, {
845
+ provider: {
846
+ name: string;
847
+ provider: string;
848
+ url: string;
849
+ model: string;
850
+ tier: number;
851
+ id?: string | undefined;
852
+ apiKey?: string | undefined;
853
+ };
854
+ }>;
855
+ export declare const DeleteSttProviderInputZod: z.ZodObject<{
856
+ providerId: z.ZodString;
857
+ }, "strict", z.ZodTypeAny, {
858
+ providerId: string;
859
+ }, {
860
+ providerId: string;
861
+ }>;
862
+ export declare const PullSttProviderInputZod: z.ZodObject<{
863
+ providerId: z.ZodString;
864
+ }, "strict", z.ZodTypeAny, {
865
+ providerId: string;
866
+ }, {
867
+ providerId: string;
868
+ }>;
869
+ export declare const UpsertLlmProviderInputZod: z.ZodObject<{
870
+ provider: z.ZodObject<{
871
+ id: z.ZodOptional<z.ZodString>;
872
+ provider: z.ZodString;
873
+ name: z.ZodString;
874
+ url: z.ZodString;
875
+ apiKey: z.ZodDefault<z.ZodString>;
876
+ model: z.ZodString;
877
+ tier: z.ZodNumber;
878
+ }, "strict", z.ZodTypeAny, {
879
+ name: string;
880
+ provider: string;
881
+ url: string;
882
+ apiKey: string;
883
+ model: string;
884
+ tier: number;
885
+ id?: string | undefined;
886
+ }, {
887
+ name: string;
888
+ provider: string;
889
+ url: string;
890
+ model: string;
891
+ tier: number;
892
+ id?: string | undefined;
893
+ apiKey?: string | undefined;
894
+ }>;
895
+ }, "strict", z.ZodTypeAny, {
896
+ provider: {
897
+ name: string;
898
+ provider: string;
899
+ url: string;
900
+ apiKey: string;
901
+ model: string;
902
+ tier: number;
903
+ id?: string | undefined;
904
+ };
905
+ }, {
906
+ provider: {
907
+ name: string;
908
+ provider: string;
909
+ url: string;
910
+ model: string;
911
+ tier: number;
912
+ id?: string | undefined;
913
+ apiKey?: string | undefined;
914
+ };
915
+ }>;
916
+ export declare const DeleteLlmProviderInputZod: z.ZodObject<{
917
+ providerId: z.ZodString;
918
+ }, "strict", z.ZodTypeAny, {
919
+ providerId: string;
920
+ }, {
921
+ providerId: string;
922
+ }>;
923
+ export declare const PullLlmProviderInputZod: z.ZodObject<{
924
+ providerId: z.ZodString;
925
+ }, "strict", z.ZodTypeAny, {
926
+ providerId: string;
927
+ }, {
928
+ providerId: string;
929
+ }>;
930
+ export declare const UpsertEnterpriseConfigInputZod: z.ZodObject<{
931
+ config: z.ZodObject<{
932
+ allowPostProcessing: z.ZodBoolean;
933
+ allowChangePostProcessing: z.ZodBoolean;
934
+ allowChangeTranscriptionMethod: z.ZodBoolean;
935
+ assistantModeEnabled: z.ZodBoolean;
936
+ powerModeEnabled: z.ZodBoolean;
937
+ allowMultiDeviceMode: z.ZodBoolean;
938
+ allowEmailSignIn: z.ZodBoolean;
939
+ allowDevTools: z.ZodBoolean;
940
+ stylingMode: z.ZodType<"app" | "manual" | "any", z.ZodTypeDef, "app" | "manual" | "any">;
941
+ }, "strict", z.ZodTypeAny, {
942
+ allowPostProcessing: boolean;
943
+ allowChangePostProcessing: boolean;
944
+ allowChangeTranscriptionMethod: boolean;
945
+ assistantModeEnabled: boolean;
946
+ powerModeEnabled: boolean;
947
+ allowMultiDeviceMode: boolean;
948
+ allowEmailSignIn: boolean;
949
+ allowDevTools: boolean;
950
+ stylingMode: "app" | "manual" | "any";
951
+ }, {
952
+ allowPostProcessing: boolean;
953
+ allowChangePostProcessing: boolean;
954
+ allowChangeTranscriptionMethod: boolean;
955
+ assistantModeEnabled: boolean;
956
+ powerModeEnabled: boolean;
957
+ allowMultiDeviceMode: boolean;
958
+ allowEmailSignIn: boolean;
959
+ allowDevTools: boolean;
960
+ stylingMode: "app" | "manual" | "any";
961
+ }>;
962
+ }, "strict", z.ZodTypeAny, {
963
+ config: {
964
+ allowPostProcessing: boolean;
965
+ allowChangePostProcessing: boolean;
966
+ allowChangeTranscriptionMethod: boolean;
967
+ assistantModeEnabled: boolean;
968
+ powerModeEnabled: boolean;
969
+ allowMultiDeviceMode: boolean;
970
+ allowEmailSignIn: boolean;
971
+ allowDevTools: boolean;
972
+ stylingMode: "app" | "manual" | "any";
973
+ };
974
+ }, {
975
+ config: {
976
+ allowPostProcessing: boolean;
977
+ allowChangePostProcessing: boolean;
978
+ allowChangeTranscriptionMethod: boolean;
979
+ assistantModeEnabled: boolean;
980
+ powerModeEnabled: boolean;
981
+ allowMultiDeviceMode: boolean;
982
+ allowEmailSignIn: boolean;
983
+ allowDevTools: boolean;
984
+ stylingMode: "app" | "manual" | "any";
985
+ };
986
+ }>;
987
+ export declare const UpsertOidcProviderInputZod: z.ZodObject<{
988
+ provider: z.ZodObject<{
989
+ id: z.ZodOptional<z.ZodString>;
990
+ name: z.ZodString;
991
+ issuerUrl: z.ZodString;
992
+ clientId: z.ZodString;
993
+ clientSecret: z.ZodOptional<z.ZodString>;
994
+ isEnabled: z.ZodBoolean;
995
+ }, "strict", z.ZodTypeAny, {
996
+ name: string;
997
+ issuerUrl: string;
998
+ clientId: string;
999
+ isEnabled: boolean;
1000
+ id?: string | undefined;
1001
+ clientSecret?: string | undefined;
1002
+ }, {
1003
+ name: string;
1004
+ issuerUrl: string;
1005
+ clientId: string;
1006
+ isEnabled: boolean;
1007
+ id?: string | undefined;
1008
+ clientSecret?: string | undefined;
1009
+ }>;
1010
+ }, "strict", z.ZodTypeAny, {
1011
+ provider: {
1012
+ name: string;
1013
+ issuerUrl: string;
1014
+ clientId: string;
1015
+ isEnabled: boolean;
1016
+ id?: string | undefined;
1017
+ clientSecret?: string | undefined;
1018
+ };
1019
+ }, {
1020
+ provider: {
1021
+ name: string;
1022
+ issuerUrl: string;
1023
+ clientId: string;
1024
+ isEnabled: boolean;
1025
+ id?: string | undefined;
1026
+ clientSecret?: string | undefined;
1027
+ };
1028
+ }>;
1029
+ export declare const DeleteOidcProviderInputZod: z.ZodObject<{
1030
+ providerId: z.ZodString;
1031
+ }, "strict", z.ZodTypeAny, {
1032
+ providerId: string;
1033
+ }, {
1034
+ providerId: string;
1035
+ }>;
1036
+ export declare const RefreshApiTokenInputZod: z.ZodObject<{
1037
+ apiRefreshToken: z.ZodString;
1038
+ }, "strict", z.ZodTypeAny, {
1039
+ apiRefreshToken: string;
1040
+ }, {
1041
+ apiRefreshToken: string;
1042
+ }>;
1043
+ export declare const FlaggedAudioZod: z.ZodObject<{
1044
+ id: z.ZodString;
1045
+ filePath: z.ZodString;
1046
+ feedback: z.ZodString;
1047
+ transcriptionPrompt: z.ZodNullable<z.ZodString>;
1048
+ postProcessingPrompt: z.ZodNullable<z.ZodString>;
1049
+ rawTranscription: z.ZodString;
1050
+ postProcessedTranscription: z.ZodNullable<z.ZodString>;
1051
+ transcriptionProvider: z.ZodString;
1052
+ postProcessingProvider: z.ZodNullable<z.ZodString>;
1053
+ sampleRate: z.ZodNullable<z.ZodNumber>;
1054
+ }, "strict", z.ZodTypeAny, {
1055
+ id: string;
1056
+ filePath: string;
1057
+ feedback: string;
1058
+ transcriptionPrompt: string | null;
1059
+ postProcessingPrompt: string | null;
1060
+ rawTranscription: string;
1061
+ postProcessedTranscription: string | null;
1062
+ transcriptionProvider: string;
1063
+ postProcessingProvider: string | null;
1064
+ sampleRate: number | null;
1065
+ }, {
1066
+ id: string;
1067
+ filePath: string;
1068
+ feedback: string;
1069
+ transcriptionPrompt: string | null;
1070
+ postProcessingPrompt: string | null;
1071
+ rawTranscription: string;
1072
+ postProcessedTranscription: string | null;
1073
+ transcriptionProvider: string;
1074
+ postProcessingProvider: string | null;
1075
+ sampleRate: number | null;
1076
+ }>;
1077
+ export declare const UpsertFlaggedAudioInputZod: z.ZodObject<{
1078
+ flaggedAudio: z.ZodObject<{
1079
+ id: z.ZodString;
1080
+ filePath: z.ZodString;
1081
+ feedback: z.ZodString;
1082
+ transcriptionPrompt: z.ZodNullable<z.ZodString>;
1083
+ postProcessingPrompt: z.ZodNullable<z.ZodString>;
1084
+ rawTranscription: z.ZodString;
1085
+ postProcessedTranscription: z.ZodNullable<z.ZodString>;
1086
+ transcriptionProvider: z.ZodString;
1087
+ postProcessingProvider: z.ZodNullable<z.ZodString>;
1088
+ sampleRate: z.ZodNullable<z.ZodNumber>;
1089
+ }, "strict", z.ZodTypeAny, {
1090
+ id: string;
1091
+ filePath: string;
1092
+ feedback: string;
1093
+ transcriptionPrompt: string | null;
1094
+ postProcessingPrompt: string | null;
1095
+ rawTranscription: string;
1096
+ postProcessedTranscription: string | null;
1097
+ transcriptionProvider: string;
1098
+ postProcessingProvider: string | null;
1099
+ sampleRate: number | null;
1100
+ }, {
1101
+ id: string;
1102
+ filePath: string;
1103
+ feedback: string;
1104
+ transcriptionPrompt: string | null;
1105
+ postProcessingPrompt: string | null;
1106
+ rawTranscription: string;
1107
+ postProcessedTranscription: string | null;
1108
+ transcriptionProvider: string;
1109
+ postProcessingProvider: string | null;
1110
+ sampleRate: number | null;
1111
+ }>;
1112
+ }, "strict", z.ZodTypeAny, {
1113
+ flaggedAudio: {
1114
+ id: string;
1115
+ filePath: string;
1116
+ feedback: string;
1117
+ transcriptionPrompt: string | null;
1118
+ postProcessingPrompt: string | null;
1119
+ rawTranscription: string;
1120
+ postProcessedTranscription: string | null;
1121
+ transcriptionProvider: string;
1122
+ postProcessingProvider: string | null;
1123
+ sampleRate: number | null;
1124
+ };
1125
+ }, {
1126
+ flaggedAudio: {
1127
+ id: string;
1128
+ filePath: string;
1129
+ feedback: string;
1130
+ transcriptionPrompt: string | null;
1131
+ postProcessingPrompt: string | null;
1132
+ rawTranscription: string;
1133
+ postProcessedTranscription: string | null;
1134
+ transcriptionProvider: string;
1135
+ postProcessingProvider: string | null;
1136
+ sampleRate: number | null;
1137
+ };
1138
+ }>;
1139
+ export declare const MetricsRangeZod: z.ZodEnum<["today", "7d", "30d", "all"]>;
1140
+ export declare const GetMetricsSummaryInputZod: z.ZodObject<{
1141
+ range: z.ZodEnum<["today", "7d", "30d", "all"]>;
1142
+ }, "strict", z.ZodTypeAny, {
1143
+ range: "today" | "7d" | "30d" | "all";
1144
+ }, {
1145
+ range: "today" | "7d" | "30d" | "all";
1146
+ }>;
1147
+ type StreamHandlerDefinitions = {
1148
+ "ai/streamChat": {
1149
+ input: {
1150
+ messages: LlmMessage[];
1151
+ tools?: LlmTool[];
1152
+ toolChoice?: LlmToolChoice;
1153
+ maxTokens?: Nullable<number>;
1154
+ temperature?: Nullable<number>;
1155
+ stopSequences?: string[];
1156
+ topP?: Nullable<number>;
1157
+ frequencyPenalty?: Nullable<number>;
1158
+ presencePenalty?: Nullable<number>;
1159
+ seed?: Nullable<number>;
1160
+ model?: Nullable<CloudModel>;
1161
+ simulate?: Nullable<boolean>;
1162
+ };
1163
+ };
1164
+ };
1165
+ export type StreamHandlerName = keyof StreamHandlerDefinitions;
1166
+ export type StreamHandlerInput<N extends StreamHandlerName> = StreamHandlerDefinitions[N]["input"];
1167
+ export declare const AiStreamChatInputZod: z.ZodObject<{
1168
+ messages: z.ZodArray<z.ZodObject<{
1169
+ role: z.ZodEnum<["system", "user", "assistant", "tool"]>;
1170
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1171
+ role: z.ZodEnum<["system", "user", "assistant", "tool"]>;
1172
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1173
+ role: z.ZodEnum<["system", "user", "assistant", "tool"]>;
1174
+ }, z.ZodTypeAny, "passthrough">>, "many">;
1175
+ tools: z.ZodOptional<z.ZodArray<z.ZodObject<{
1176
+ name: z.ZodString;
1177
+ description: z.ZodOptional<z.ZodString>;
1178
+ parameters: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1179
+ }, "strip", z.ZodTypeAny, {
1180
+ name: string;
1181
+ description?: string | undefined;
1182
+ parameters?: Record<string, unknown> | undefined;
1183
+ }, {
1184
+ name: string;
1185
+ description?: string | undefined;
1186
+ parameters?: Record<string, unknown> | undefined;
1187
+ }>, "many">>;
1188
+ toolChoice: z.ZodOptional<z.ZodUnion<[z.ZodEnum<["auto", "none", "required"]>, z.ZodObject<{
1189
+ name: z.ZodString;
1190
+ }, "strip", z.ZodTypeAny, {
1191
+ name: string;
1192
+ }, {
1193
+ name: string;
1194
+ }>]>>;
1195
+ maxTokens: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1196
+ temperature: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1197
+ stopSequences: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1198
+ topP: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1199
+ frequencyPenalty: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1200
+ presencePenalty: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1201
+ seed: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1202
+ model: z.ZodOptional<z.ZodNullable<z.ZodEnum<["low", "medium", "large"]>>>;
1203
+ simulate: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
1204
+ }, "strip", z.ZodTypeAny, {
1205
+ messages: z.objectOutputType<{
1206
+ role: z.ZodEnum<["system", "user", "assistant", "tool"]>;
1207
+ }, z.ZodTypeAny, "passthrough">[];
1208
+ simulate?: boolean | null | undefined;
1209
+ model?: "low" | "medium" | "large" | null | undefined;
1210
+ tools?: {
1211
+ name: string;
1212
+ description?: string | undefined;
1213
+ parameters?: Record<string, unknown> | undefined;
1214
+ }[] | undefined;
1215
+ toolChoice?: "auto" | "none" | "required" | {
1216
+ name: string;
1217
+ } | undefined;
1218
+ maxTokens?: number | null | undefined;
1219
+ temperature?: number | null | undefined;
1220
+ stopSequences?: string[] | undefined;
1221
+ topP?: number | null | undefined;
1222
+ frequencyPenalty?: number | null | undefined;
1223
+ presencePenalty?: number | null | undefined;
1224
+ seed?: number | null | undefined;
1225
+ }, {
1226
+ messages: z.objectInputType<{
1227
+ role: z.ZodEnum<["system", "user", "assistant", "tool"]>;
1228
+ }, z.ZodTypeAny, "passthrough">[];
1229
+ simulate?: boolean | null | undefined;
1230
+ model?: "low" | "medium" | "large" | null | undefined;
1231
+ tools?: {
1232
+ name: string;
1233
+ description?: string | undefined;
1234
+ parameters?: Record<string, unknown> | undefined;
1235
+ }[] | undefined;
1236
+ toolChoice?: "auto" | "none" | "required" | {
1237
+ name: string;
1238
+ } | undefined;
1239
+ maxTokens?: number | null | undefined;
1240
+ temperature?: number | null | undefined;
1241
+ stopSequences?: string[] | undefined;
1242
+ topP?: number | null | undefined;
1243
+ frequencyPenalty?: number | null | undefined;
1244
+ presencePenalty?: number | null | undefined;
1245
+ seed?: number | null | undefined;
1246
+ }>;
1247
+ export {};
1248
+ //# sourceMappingURL=types.d.ts.map