@openloaf-saas/sdk 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,3221 @@
1
+ export { PublicAppRouter } from '@openloaf-saas/api-types';
2
+ import * as zod from 'zod';
3
+ import { ZodType, z } from 'zod';
4
+ import * as _trpc_client from '@trpc/client';
5
+ import * as _trpc_server from '@trpc/server';
6
+
7
+ declare class SaaSContract {
8
+ /** Auth endpoints. */
9
+ readonly auth: {
10
+ readonly exchange: Endpoint<{
11
+ loginCode: string;
12
+ }, {
13
+ accessToken: string;
14
+ refreshToken: string;
15
+ user: {
16
+ name?: string | undefined;
17
+ email?: string | undefined;
18
+ avatarUrl?: string | undefined;
19
+ };
20
+ }>;
21
+ readonly refresh: Endpoint<{
22
+ refreshToken: string;
23
+ }, {
24
+ accessToken: string;
25
+ refreshToken: string;
26
+ user: {
27
+ name?: string | undefined;
28
+ email?: string | undefined;
29
+ avatarUrl?: string | undefined;
30
+ };
31
+ } | {
32
+ message: string;
33
+ }>;
34
+ readonly logout: Endpoint<{
35
+ refreshToken: string;
36
+ }, {
37
+ success: boolean;
38
+ }>;
39
+ };
40
+ /** AI endpoints. */
41
+ readonly ai: {
42
+ readonly image: Endpoint<{
43
+ modelId: string;
44
+ prompt: string;
45
+ negativePrompt?: string | undefined;
46
+ style?: string | undefined;
47
+ inputs?: {
48
+ images?: {
49
+ url?: string | undefined;
50
+ base64?: string | undefined;
51
+ mediaType?: string | undefined;
52
+ }[] | undefined;
53
+ mask?: {
54
+ url?: string | undefined;
55
+ base64?: string | undefined;
56
+ mediaType?: string | undefined;
57
+ } | undefined;
58
+ } | undefined;
59
+ output?: {
60
+ count?: number | undefined;
61
+ aspectRatio?: "1:1" | "16:9" | "9:16" | "4:3" | undefined;
62
+ quality?: "standard" | "hd" | undefined;
63
+ } | undefined;
64
+ parameters?: Record<string, unknown> | undefined;
65
+ }, {
66
+ success: false;
67
+ message: string;
68
+ code?: string | undefined;
69
+ } | {
70
+ success: true;
71
+ data: {
72
+ taskId: string;
73
+ };
74
+ }>;
75
+ readonly video: Endpoint<{
76
+ modelId: string;
77
+ prompt: string;
78
+ negativePrompt?: string | undefined;
79
+ style?: string | undefined;
80
+ inputs?: {
81
+ images?: {
82
+ url?: string | undefined;
83
+ base64?: string | undefined;
84
+ mediaType?: string | undefined;
85
+ }[] | undefined;
86
+ startImage?: {
87
+ url?: string | undefined;
88
+ base64?: string | undefined;
89
+ mediaType?: string | undefined;
90
+ } | undefined;
91
+ endImage?: {
92
+ url?: string | undefined;
93
+ base64?: string | undefined;
94
+ mediaType?: string | undefined;
95
+ } | undefined;
96
+ referenceVideo?: {
97
+ url?: string | undefined;
98
+ base64?: string | undefined;
99
+ mediaType?: string | undefined;
100
+ } | undefined;
101
+ } | undefined;
102
+ output?: {
103
+ aspectRatio?: string | undefined;
104
+ duration?: number | undefined;
105
+ clarity?: string | undefined;
106
+ withAudio?: boolean | undefined;
107
+ } | undefined;
108
+ parameters?: Record<string, unknown> | undefined;
109
+ }, {
110
+ success: false;
111
+ message: string;
112
+ code?: string | undefined;
113
+ } | {
114
+ success: true;
115
+ data: {
116
+ taskId: string;
117
+ };
118
+ }>;
119
+ readonly task: (taskId: string) => Endpoint<void, {
120
+ success: false;
121
+ message: string;
122
+ code?: string | undefined;
123
+ } | {
124
+ success: true;
125
+ data: {
126
+ status: "queued" | "running" | "succeeded" | "failed" | "canceled";
127
+ progress?: number | undefined;
128
+ resultType?: "image" | "video" | undefined;
129
+ resultUrls?: string[] | undefined;
130
+ error?: {
131
+ message: string;
132
+ code?: string | undefined;
133
+ } | undefined;
134
+ creditsConsumed?: number | undefined;
135
+ };
136
+ }>;
137
+ readonly cancelTask: (taskId: string) => Endpoint<void, {
138
+ success: false;
139
+ message: string;
140
+ code?: string | undefined;
141
+ } | {
142
+ success: true;
143
+ data: {
144
+ status: "canceled" | "processing";
145
+ };
146
+ }>;
147
+ readonly imageModels: Endpoint<void, {
148
+ success: false;
149
+ message: string;
150
+ code?: string | undefined;
151
+ } | {
152
+ success: true;
153
+ data: {
154
+ data: {
155
+ [x: string]: unknown;
156
+ id: string;
157
+ name?: string | undefined;
158
+ familyId?: string | undefined;
159
+ providerId?: string | undefined;
160
+ tags?: string[] | undefined;
161
+ capabilities?: {
162
+ common?: {
163
+ maxContextK?: number | undefined;
164
+ supportsStructuredOutput?: boolean | undefined;
165
+ supportsWebSearch?: boolean | undefined;
166
+ } | undefined;
167
+ params?: {
168
+ features?: string[] | undefined;
169
+ fields?: {
170
+ key: string;
171
+ title: string;
172
+ type: "number" | "boolean" | "text" | "select";
173
+ request: boolean;
174
+ description?: string | undefined;
175
+ unit?: string | undefined;
176
+ values?: (string | number | boolean)[] | undefined;
177
+ min?: number | undefined;
178
+ max?: number | undefined;
179
+ step?: number | undefined;
180
+ default?: string | number | boolean | undefined;
181
+ }[] | undefined;
182
+ } | undefined;
183
+ input?: {
184
+ maxImages?: number | undefined;
185
+ supportsMask?: boolean | undefined;
186
+ supportsReferenceVideo?: boolean | undefined;
187
+ supportsStartEnd?: boolean | undefined;
188
+ } | undefined;
189
+ output?: {
190
+ supportsMulti?: boolean | undefined;
191
+ supportsAudio?: boolean | undefined;
192
+ } | undefined;
193
+ } | undefined;
194
+ }[];
195
+ updatedAt?: string | undefined;
196
+ };
197
+ }>;
198
+ readonly videoModels: Endpoint<void, {
199
+ success: false;
200
+ message: string;
201
+ code?: string | undefined;
202
+ } | {
203
+ success: true;
204
+ data: {
205
+ data: {
206
+ [x: string]: unknown;
207
+ id: string;
208
+ name?: string | undefined;
209
+ familyId?: string | undefined;
210
+ providerId?: string | undefined;
211
+ tags?: string[] | undefined;
212
+ capabilities?: {
213
+ common?: {
214
+ maxContextK?: number | undefined;
215
+ supportsStructuredOutput?: boolean | undefined;
216
+ supportsWebSearch?: boolean | undefined;
217
+ } | undefined;
218
+ params?: {
219
+ features?: string[] | undefined;
220
+ fields?: {
221
+ key: string;
222
+ title: string;
223
+ type: "number" | "boolean" | "text" | "select";
224
+ request: boolean;
225
+ description?: string | undefined;
226
+ unit?: string | undefined;
227
+ values?: (string | number | boolean)[] | undefined;
228
+ min?: number | undefined;
229
+ max?: number | undefined;
230
+ step?: number | undefined;
231
+ default?: string | number | boolean | undefined;
232
+ }[] | undefined;
233
+ } | undefined;
234
+ input?: {
235
+ maxImages?: number | undefined;
236
+ supportsMask?: boolean | undefined;
237
+ supportsReferenceVideo?: boolean | undefined;
238
+ supportsStartEnd?: boolean | undefined;
239
+ } | undefined;
240
+ output?: {
241
+ supportsMulti?: boolean | undefined;
242
+ supportsAudio?: boolean | undefined;
243
+ } | undefined;
244
+ } | undefined;
245
+ }[];
246
+ updatedAt?: string | undefined;
247
+ };
248
+ }>;
249
+ readonly chatModels: Endpoint<void, {
250
+ success: false;
251
+ message: string;
252
+ code?: string | undefined;
253
+ } | {
254
+ success: true;
255
+ data: {
256
+ data: {
257
+ id: string;
258
+ provider: string;
259
+ displayName: string;
260
+ tags: string[];
261
+ familyId?: string | undefined;
262
+ capabilities?: {
263
+ common?: {
264
+ maxContextK?: number | undefined;
265
+ supportsStructuredOutput?: boolean | undefined;
266
+ supportsWebSearch?: boolean | undefined;
267
+ } | undefined;
268
+ params?: {
269
+ features?: string[] | undefined;
270
+ fields?: {
271
+ key: string;
272
+ title: string;
273
+ type: "number" | "boolean" | "text" | "select";
274
+ request: boolean;
275
+ description?: string | undefined;
276
+ unit?: string | undefined;
277
+ values?: (string | number | boolean)[] | undefined;
278
+ min?: number | undefined;
279
+ max?: number | undefined;
280
+ step?: number | undefined;
281
+ default?: string | number | boolean | undefined;
282
+ }[] | undefined;
283
+ } | undefined;
284
+ input?: {
285
+ maxImages?: number | undefined;
286
+ supportsMask?: boolean | undefined;
287
+ supportsReferenceVideo?: boolean | undefined;
288
+ supportsStartEnd?: boolean | undefined;
289
+ } | undefined;
290
+ output?: {
291
+ supportsMulti?: boolean | undefined;
292
+ supportsAudio?: boolean | undefined;
293
+ } | undefined;
294
+ } | undefined;
295
+ }[];
296
+ updatedAt?: string | undefined;
297
+ };
298
+ }>;
299
+ readonly modelsUpdatedAt: Endpoint<void, {
300
+ success: false;
301
+ message: string;
302
+ code?: string | undefined;
303
+ } | {
304
+ success: true;
305
+ data: {
306
+ chatUpdatedAt: string;
307
+ imageUpdatedAt: string;
308
+ videoUpdatedAt: string;
309
+ latestUpdatedAt: string;
310
+ };
311
+ }>;
312
+ readonly providerTemplates: Endpoint<void, {
313
+ success: false;
314
+ message: string;
315
+ code?: string | undefined;
316
+ } | {
317
+ success: true;
318
+ data: {
319
+ providers: {
320
+ id: string;
321
+ label: string;
322
+ adapter: string;
323
+ models: {
324
+ id: string;
325
+ providerId: string;
326
+ tags: string[];
327
+ displayName?: string | null | undefined;
328
+ description?: string | null | undefined;
329
+ familyId?: string | undefined;
330
+ capabilities?: {
331
+ common?: {
332
+ maxContextK?: number | undefined;
333
+ supportsStructuredOutput?: boolean | undefined;
334
+ supportsWebSearch?: boolean | undefined;
335
+ } | undefined;
336
+ params?: {
337
+ features?: string[] | undefined;
338
+ fields?: {
339
+ key: string;
340
+ title: string;
341
+ type: "number" | "boolean" | "text" | "select";
342
+ request: boolean;
343
+ description?: string | undefined;
344
+ unit?: string | undefined;
345
+ values?: (string | number | boolean)[] | undefined;
346
+ min?: number | undefined;
347
+ max?: number | undefined;
348
+ step?: number | undefined;
349
+ default?: string | number | boolean | undefined;
350
+ }[] | undefined;
351
+ } | undefined;
352
+ input?: {
353
+ maxImages?: number | undefined;
354
+ supportsMask?: boolean | undefined;
355
+ supportsReferenceVideo?: boolean | undefined;
356
+ supportsStartEnd?: boolean | undefined;
357
+ } | undefined;
358
+ output?: {
359
+ supportsMulti?: boolean | undefined;
360
+ supportsAudio?: boolean | undefined;
361
+ } | undefined;
362
+ } | undefined;
363
+ }[];
364
+ apiUrl?: string | undefined;
365
+ authType?: string | undefined;
366
+ websiteUrl?: string | null | undefined;
367
+ docUrl?: string | null | undefined;
368
+ }[];
369
+ updatedAt?: string | undefined;
370
+ };
371
+ }>;
372
+ };
373
+ /** AI tools endpoints. */
374
+ readonly aiTools: {
375
+ readonly analyzeSkills: Endpoint<{
376
+ skills: {
377
+ name: string;
378
+ description?: string | undefined;
379
+ }[];
380
+ }, {
381
+ success: true;
382
+ data: {
383
+ skills: {
384
+ name: string;
385
+ translatedName: string;
386
+ translatedDescription: string;
387
+ category: string;
388
+ icon: string;
389
+ }[];
390
+ };
391
+ } | {
392
+ success: false;
393
+ message: string;
394
+ }>;
395
+ readonly recommendActions: Endpoint<{
396
+ text: string;
397
+ scene: string;
398
+ }, {
399
+ success: true;
400
+ data: {
401
+ actions: {
402
+ label: string;
403
+ description: string;
404
+ action: string;
405
+ }[];
406
+ };
407
+ } | {
408
+ success: false;
409
+ message: string;
410
+ }>;
411
+ readonly summarize: Endpoint<{
412
+ text: string;
413
+ }, {
414
+ success: true;
415
+ data: {
416
+ summary: string;
417
+ };
418
+ } | {
419
+ success: false;
420
+ message: string;
421
+ }>;
422
+ };
423
+ /** Feedback endpoints. */
424
+ readonly feedback: {
425
+ readonly submit: Endpoint<{
426
+ type: "ui" | "performance" | "bug" | "feature" | "other";
427
+ content: string;
428
+ context: Record<string, unknown>;
429
+ source?: "tenas" | "openloaf-saas" | undefined;
430
+ email?: string | undefined;
431
+ }, void | {
432
+ message: string;
433
+ }>;
434
+ readonly list: Endpoint<{
435
+ page?: number | undefined;
436
+ pageSize?: number | undefined;
437
+ type?: "ui" | "performance" | "bug" | "feature" | "other" | undefined;
438
+ source?: "tenas" | "openloaf-saas" | undefined;
439
+ saasStatus?: "unread" | "read" | "resolved" | "ignored" | undefined;
440
+ keyword?: string | undefined;
441
+ startAt?: string | undefined;
442
+ endAt?: string | undefined;
443
+ }, {
444
+ message: string;
445
+ } | {
446
+ items: {
447
+ id: string;
448
+ source: "tenas" | "openloaf-saas";
449
+ type: "ui" | "performance" | "bug" | "feature" | "other";
450
+ saasStatus: "unread" | "read" | "resolved" | "ignored";
451
+ content: string;
452
+ context: Record<string, unknown>;
453
+ createdAt: string;
454
+ response?: string | undefined;
455
+ userId?: string | undefined;
456
+ email?: string | undefined;
457
+ }[];
458
+ page: number;
459
+ pageSize: number;
460
+ total: number;
461
+ }>;
462
+ readonly detail: (feedbackId: string) => Endpoint<void, {
463
+ message: string;
464
+ } | {
465
+ feedback: {
466
+ id: string;
467
+ source: "tenas" | "openloaf-saas";
468
+ type: "ui" | "performance" | "bug" | "feature" | "other";
469
+ saasStatus: "unread" | "read" | "resolved" | "ignored";
470
+ content: string;
471
+ context: Record<string, unknown>;
472
+ createdAt: string;
473
+ response?: string | undefined;
474
+ userId?: string | undefined;
475
+ email?: string | undefined;
476
+ };
477
+ }>;
478
+ };
479
+ /** User endpoints. */
480
+ readonly user: {
481
+ readonly self: Endpoint<void, {
482
+ user: {
483
+ id: string;
484
+ provider: string;
485
+ membershipLevel: "free" | "vip" | "svip" | "infinity";
486
+ createdAt: string;
487
+ updatedAt: string;
488
+ email?: string | undefined;
489
+ name?: string | undefined;
490
+ avatarUrl?: string | undefined;
491
+ };
492
+ }>;
493
+ };
494
+ }
495
+ declare const contract: SaaSContract;
496
+
497
+ type HttpMethod = "GET" | "POST" | "PUT" | "PATCH" | "DELETE";
498
+ type ResponseType = "json" | "text";
499
+ declare class Endpoint<Req, Res> {
500
+ readonly method: HttpMethod;
501
+ readonly path: string;
502
+ readonly responseType: ResponseType;
503
+ readonly request: ZodType<Req>;
504
+ readonly response: ZodType<Res>;
505
+ constructor(options: {
506
+ method: HttpMethod;
507
+ path: string;
508
+ requestSchema: ZodType<Req>;
509
+ responseSchema: ZodType<Res>;
510
+ responseType?: ResponseType;
511
+ });
512
+ parseRequest(input: unknown): Req;
513
+ parseResponse(input: unknown): Res;
514
+ safeParseRequest(input: unknown): zod.ZodSafeParseResult<Req>;
515
+ safeParseResponse(input: unknown): zod.ZodSafeParseResult<Res>;
516
+ }
517
+
518
+ type HeaderInput = Record<string, string> | Array<[string, string]> | {
519
+ forEach: (callback: (value: string, key: string) => void) => void;
520
+ };
521
+ declare function normalizeHeaders(input?: HeaderInput): Record<string, string>;
522
+ declare function mergeHeaders(...inputs: Array<HeaderInput | undefined>): Record<string, string>;
523
+
524
+ type BaseSaaSClientOptions<TContract> = {
525
+ baseUrl: string;
526
+ getAccessToken?: () => string | Promise<string>;
527
+ fetcher?: typeof fetch;
528
+ headers?: HeaderInput;
529
+ contract: TContract;
530
+ };
531
+ declare class BaseSaaSClient<TContract> {
532
+ /** Contract definitions used by the client. */
533
+ readonly contract: TContract;
534
+ /** Base URL for SaaS API calls. */
535
+ private readonly baseUrl;
536
+ /** Access token provider for Bearer auth. */
537
+ private readonly getAccessToken?;
538
+ /** Fetch implementation used for HTTP calls. */
539
+ private readonly fetcher;
540
+ /** Static headers injected into every request. */
541
+ private readonly headers?;
542
+ /** Create a base client instance. */
543
+ constructor(options: BaseSaaSClientOptions<TContract>);
544
+ /** Send a typed request to the SaaS server. */
545
+ request<Req, Res>(endpoint: Endpoint<Req, Res>, options: {
546
+ baseUrl?: string;
547
+ headers?: HeaderInput;
548
+ body?: unknown;
549
+ }): Promise<Res>;
550
+ /** Build Authorization header using the access token. */
551
+ buildAuthHeader(): Promise<Record<string, string>>;
552
+ /** Return the configured base URL. */
553
+ getBaseUrl(): string;
554
+ }
555
+
556
+ /** Request function signature shared by SDK clients. */
557
+ type SdkRequest = <Req, Res>(endpoint: Endpoint<Req, Res>, options: {
558
+ baseUrl?: string;
559
+ headers?: HeaderInput;
560
+ body?: unknown;
561
+ }) => Promise<Res>;
562
+ /** Minimal host interface expected by module clients. */
563
+ type SdkHost<TContract> = {
564
+ /** Contract subset used by the module. */
565
+ contract: TContract;
566
+ /** Request executor shared by SDK clients. */
567
+ request: SdkRequest;
568
+ /** Resolve the configured base URL. */
569
+ getBaseUrl: () => string;
570
+ /** Build Authorization header for authenticated calls. */
571
+ buildAuthHeader: () => Promise<Record<string, string>>;
572
+ };
573
+
574
+ declare const aiEndpoints: {
575
+ readonly image: Endpoint<{
576
+ modelId: string;
577
+ prompt: string;
578
+ negativePrompt?: string | undefined;
579
+ style?: string | undefined;
580
+ inputs?: {
581
+ images?: {
582
+ url?: string | undefined;
583
+ base64?: string | undefined;
584
+ mediaType?: string | undefined;
585
+ }[] | undefined;
586
+ mask?: {
587
+ url?: string | undefined;
588
+ base64?: string | undefined;
589
+ mediaType?: string | undefined;
590
+ } | undefined;
591
+ } | undefined;
592
+ output?: {
593
+ count?: number | undefined;
594
+ aspectRatio?: "1:1" | "16:9" | "9:16" | "4:3" | undefined;
595
+ quality?: "standard" | "hd" | undefined;
596
+ } | undefined;
597
+ parameters?: Record<string, unknown> | undefined;
598
+ }, {
599
+ success: false;
600
+ message: string;
601
+ code?: string | undefined;
602
+ } | {
603
+ success: true;
604
+ data: {
605
+ taskId: string;
606
+ };
607
+ }>;
608
+ readonly video: Endpoint<{
609
+ modelId: string;
610
+ prompt: string;
611
+ negativePrompt?: string | undefined;
612
+ style?: string | undefined;
613
+ inputs?: {
614
+ images?: {
615
+ url?: string | undefined;
616
+ base64?: string | undefined;
617
+ mediaType?: string | undefined;
618
+ }[] | undefined;
619
+ startImage?: {
620
+ url?: string | undefined;
621
+ base64?: string | undefined;
622
+ mediaType?: string | undefined;
623
+ } | undefined;
624
+ endImage?: {
625
+ url?: string | undefined;
626
+ base64?: string | undefined;
627
+ mediaType?: string | undefined;
628
+ } | undefined;
629
+ referenceVideo?: {
630
+ url?: string | undefined;
631
+ base64?: string | undefined;
632
+ mediaType?: string | undefined;
633
+ } | undefined;
634
+ } | undefined;
635
+ output?: {
636
+ aspectRatio?: string | undefined;
637
+ duration?: number | undefined;
638
+ clarity?: string | undefined;
639
+ withAudio?: boolean | undefined;
640
+ } | undefined;
641
+ parameters?: Record<string, unknown> | undefined;
642
+ }, {
643
+ success: false;
644
+ message: string;
645
+ code?: string | undefined;
646
+ } | {
647
+ success: true;
648
+ data: {
649
+ taskId: string;
650
+ };
651
+ }>;
652
+ readonly task: (taskId: string) => Endpoint<void, {
653
+ success: false;
654
+ message: string;
655
+ code?: string | undefined;
656
+ } | {
657
+ success: true;
658
+ data: {
659
+ status: "queued" | "running" | "succeeded" | "failed" | "canceled";
660
+ progress?: number | undefined;
661
+ resultType?: "image" | "video" | undefined;
662
+ resultUrls?: string[] | undefined;
663
+ error?: {
664
+ message: string;
665
+ code?: string | undefined;
666
+ } | undefined;
667
+ creditsConsumed?: number | undefined;
668
+ };
669
+ }>;
670
+ readonly cancelTask: (taskId: string) => Endpoint<void, {
671
+ success: false;
672
+ message: string;
673
+ code?: string | undefined;
674
+ } | {
675
+ success: true;
676
+ data: {
677
+ status: "canceled" | "processing";
678
+ };
679
+ }>;
680
+ readonly imageModels: Endpoint<void, {
681
+ success: false;
682
+ message: string;
683
+ code?: string | undefined;
684
+ } | {
685
+ success: true;
686
+ data: {
687
+ data: {
688
+ [x: string]: unknown;
689
+ id: string;
690
+ name?: string | undefined;
691
+ familyId?: string | undefined;
692
+ providerId?: string | undefined;
693
+ tags?: string[] | undefined;
694
+ capabilities?: {
695
+ common?: {
696
+ maxContextK?: number | undefined;
697
+ supportsStructuredOutput?: boolean | undefined;
698
+ supportsWebSearch?: boolean | undefined;
699
+ } | undefined;
700
+ params?: {
701
+ features?: string[] | undefined;
702
+ fields?: {
703
+ key: string;
704
+ title: string;
705
+ type: "number" | "boolean" | "text" | "select";
706
+ request: boolean;
707
+ description?: string | undefined;
708
+ unit?: string | undefined;
709
+ values?: (string | number | boolean)[] | undefined;
710
+ min?: number | undefined;
711
+ max?: number | undefined;
712
+ step?: number | undefined;
713
+ default?: string | number | boolean | undefined;
714
+ }[] | undefined;
715
+ } | undefined;
716
+ input?: {
717
+ maxImages?: number | undefined;
718
+ supportsMask?: boolean | undefined;
719
+ supportsReferenceVideo?: boolean | undefined;
720
+ supportsStartEnd?: boolean | undefined;
721
+ } | undefined;
722
+ output?: {
723
+ supportsMulti?: boolean | undefined;
724
+ supportsAudio?: boolean | undefined;
725
+ } | undefined;
726
+ } | undefined;
727
+ }[];
728
+ updatedAt?: string | undefined;
729
+ };
730
+ }>;
731
+ readonly videoModels: Endpoint<void, {
732
+ success: false;
733
+ message: string;
734
+ code?: string | undefined;
735
+ } | {
736
+ success: true;
737
+ data: {
738
+ data: {
739
+ [x: string]: unknown;
740
+ id: string;
741
+ name?: string | undefined;
742
+ familyId?: string | undefined;
743
+ providerId?: string | undefined;
744
+ tags?: string[] | undefined;
745
+ capabilities?: {
746
+ common?: {
747
+ maxContextK?: number | undefined;
748
+ supportsStructuredOutput?: boolean | undefined;
749
+ supportsWebSearch?: boolean | undefined;
750
+ } | undefined;
751
+ params?: {
752
+ features?: string[] | undefined;
753
+ fields?: {
754
+ key: string;
755
+ title: string;
756
+ type: "number" | "boolean" | "text" | "select";
757
+ request: boolean;
758
+ description?: string | undefined;
759
+ unit?: string | undefined;
760
+ values?: (string | number | boolean)[] | undefined;
761
+ min?: number | undefined;
762
+ max?: number | undefined;
763
+ step?: number | undefined;
764
+ default?: string | number | boolean | undefined;
765
+ }[] | undefined;
766
+ } | undefined;
767
+ input?: {
768
+ maxImages?: number | undefined;
769
+ supportsMask?: boolean | undefined;
770
+ supportsReferenceVideo?: boolean | undefined;
771
+ supportsStartEnd?: boolean | undefined;
772
+ } | undefined;
773
+ output?: {
774
+ supportsMulti?: boolean | undefined;
775
+ supportsAudio?: boolean | undefined;
776
+ } | undefined;
777
+ } | undefined;
778
+ }[];
779
+ updatedAt?: string | undefined;
780
+ };
781
+ }>;
782
+ readonly chatModels: Endpoint<void, {
783
+ success: false;
784
+ message: string;
785
+ code?: string | undefined;
786
+ } | {
787
+ success: true;
788
+ data: {
789
+ data: {
790
+ id: string;
791
+ provider: string;
792
+ displayName: string;
793
+ tags: string[];
794
+ familyId?: string | undefined;
795
+ capabilities?: {
796
+ common?: {
797
+ maxContextK?: number | undefined;
798
+ supportsStructuredOutput?: boolean | undefined;
799
+ supportsWebSearch?: boolean | undefined;
800
+ } | undefined;
801
+ params?: {
802
+ features?: string[] | undefined;
803
+ fields?: {
804
+ key: string;
805
+ title: string;
806
+ type: "number" | "boolean" | "text" | "select";
807
+ request: boolean;
808
+ description?: string | undefined;
809
+ unit?: string | undefined;
810
+ values?: (string | number | boolean)[] | undefined;
811
+ min?: number | undefined;
812
+ max?: number | undefined;
813
+ step?: number | undefined;
814
+ default?: string | number | boolean | undefined;
815
+ }[] | undefined;
816
+ } | undefined;
817
+ input?: {
818
+ maxImages?: number | undefined;
819
+ supportsMask?: boolean | undefined;
820
+ supportsReferenceVideo?: boolean | undefined;
821
+ supportsStartEnd?: boolean | undefined;
822
+ } | undefined;
823
+ output?: {
824
+ supportsMulti?: boolean | undefined;
825
+ supportsAudio?: boolean | undefined;
826
+ } | undefined;
827
+ } | undefined;
828
+ }[];
829
+ updatedAt?: string | undefined;
830
+ };
831
+ }>;
832
+ readonly modelsUpdatedAt: Endpoint<void, {
833
+ success: false;
834
+ message: string;
835
+ code?: string | undefined;
836
+ } | {
837
+ success: true;
838
+ data: {
839
+ chatUpdatedAt: string;
840
+ imageUpdatedAt: string;
841
+ videoUpdatedAt: string;
842
+ latestUpdatedAt: string;
843
+ };
844
+ }>;
845
+ readonly providerTemplates: Endpoint<void, {
846
+ success: false;
847
+ message: string;
848
+ code?: string | undefined;
849
+ } | {
850
+ success: true;
851
+ data: {
852
+ providers: {
853
+ id: string;
854
+ label: string;
855
+ adapter: string;
856
+ models: {
857
+ id: string;
858
+ providerId: string;
859
+ tags: string[];
860
+ displayName?: string | null | undefined;
861
+ description?: string | null | undefined;
862
+ familyId?: string | undefined;
863
+ capabilities?: {
864
+ common?: {
865
+ maxContextK?: number | undefined;
866
+ supportsStructuredOutput?: boolean | undefined;
867
+ supportsWebSearch?: boolean | undefined;
868
+ } | undefined;
869
+ params?: {
870
+ features?: string[] | undefined;
871
+ fields?: {
872
+ key: string;
873
+ title: string;
874
+ type: "number" | "boolean" | "text" | "select";
875
+ request: boolean;
876
+ description?: string | undefined;
877
+ unit?: string | undefined;
878
+ values?: (string | number | boolean)[] | undefined;
879
+ min?: number | undefined;
880
+ max?: number | undefined;
881
+ step?: number | undefined;
882
+ default?: string | number | boolean | undefined;
883
+ }[] | undefined;
884
+ } | undefined;
885
+ input?: {
886
+ maxImages?: number | undefined;
887
+ supportsMask?: boolean | undefined;
888
+ supportsReferenceVideo?: boolean | undefined;
889
+ supportsStartEnd?: boolean | undefined;
890
+ } | undefined;
891
+ output?: {
892
+ supportsMulti?: boolean | undefined;
893
+ supportsAudio?: boolean | undefined;
894
+ } | undefined;
895
+ } | undefined;
896
+ }[];
897
+ apiUrl?: string | undefined;
898
+ authType?: string | undefined;
899
+ websiteUrl?: string | null | undefined;
900
+ docUrl?: string | null | undefined;
901
+ }[];
902
+ updatedAt?: string | undefined;
903
+ };
904
+ }>;
905
+ };
906
+
907
+ declare const aiMediaInputSchema: z.ZodObject<{
908
+ url: z.ZodOptional<z.ZodString>;
909
+ base64: z.ZodOptional<z.ZodString>;
910
+ mediaType: z.ZodOptional<z.ZodString>;
911
+ }, z.core.$strip>;
912
+ declare const aiImageInputsSchema: z.ZodObject<{
913
+ images: z.ZodOptional<z.ZodArray<z.ZodObject<{
914
+ url: z.ZodOptional<z.ZodString>;
915
+ base64: z.ZodOptional<z.ZodString>;
916
+ mediaType: z.ZodOptional<z.ZodString>;
917
+ }, z.core.$strip>>>;
918
+ mask: z.ZodOptional<z.ZodObject<{
919
+ url: z.ZodOptional<z.ZodString>;
920
+ base64: z.ZodOptional<z.ZodString>;
921
+ mediaType: z.ZodOptional<z.ZodString>;
922
+ }, z.core.$strip>>;
923
+ }, z.core.$strip>;
924
+ declare const aiVideoInputsSchema: z.ZodObject<{
925
+ images: z.ZodOptional<z.ZodArray<z.ZodObject<{
926
+ url: z.ZodOptional<z.ZodString>;
927
+ base64: z.ZodOptional<z.ZodString>;
928
+ mediaType: z.ZodOptional<z.ZodString>;
929
+ }, z.core.$strip>>>;
930
+ startImage: z.ZodOptional<z.ZodObject<{
931
+ url: z.ZodOptional<z.ZodString>;
932
+ base64: z.ZodOptional<z.ZodString>;
933
+ mediaType: z.ZodOptional<z.ZodString>;
934
+ }, z.core.$strip>>;
935
+ endImage: z.ZodOptional<z.ZodObject<{
936
+ url: z.ZodOptional<z.ZodString>;
937
+ base64: z.ZodOptional<z.ZodString>;
938
+ mediaType: z.ZodOptional<z.ZodString>;
939
+ }, z.core.$strip>>;
940
+ referenceVideo: z.ZodOptional<z.ZodObject<{
941
+ url: z.ZodOptional<z.ZodString>;
942
+ base64: z.ZodOptional<z.ZodString>;
943
+ mediaType: z.ZodOptional<z.ZodString>;
944
+ }, z.core.$strip>>;
945
+ }, z.core.$strip>;
946
+ declare const aiImageOutputSchema: z.ZodObject<{
947
+ count: z.ZodOptional<z.ZodNumber>;
948
+ aspectRatio: z.ZodOptional<z.ZodEnum<{
949
+ "1:1": "1:1";
950
+ "16:9": "16:9";
951
+ "9:16": "9:16";
952
+ "4:3": "4:3";
953
+ }>>;
954
+ quality: z.ZodOptional<z.ZodEnum<{
955
+ standard: "standard";
956
+ hd: "hd";
957
+ }>>;
958
+ }, z.core.$strip>;
959
+ declare const aiVideoOutputSchema: z.ZodObject<{
960
+ aspectRatio: z.ZodOptional<z.ZodString>;
961
+ duration: z.ZodOptional<z.ZodNumber>;
962
+ clarity: z.ZodOptional<z.ZodString>;
963
+ withAudio: z.ZodOptional<z.ZodBoolean>;
964
+ }, z.core.$strip>;
965
+ declare const aiImageRequestSchema: z.ZodObject<{
966
+ modelId: z.ZodString;
967
+ prompt: z.ZodString;
968
+ negativePrompt: z.ZodOptional<z.ZodString>;
969
+ style: z.ZodOptional<z.ZodString>;
970
+ inputs: z.ZodOptional<z.ZodObject<{
971
+ images: z.ZodOptional<z.ZodArray<z.ZodObject<{
972
+ url: z.ZodOptional<z.ZodString>;
973
+ base64: z.ZodOptional<z.ZodString>;
974
+ mediaType: z.ZodOptional<z.ZodString>;
975
+ }, z.core.$strip>>>;
976
+ mask: z.ZodOptional<z.ZodObject<{
977
+ url: z.ZodOptional<z.ZodString>;
978
+ base64: z.ZodOptional<z.ZodString>;
979
+ mediaType: z.ZodOptional<z.ZodString>;
980
+ }, z.core.$strip>>;
981
+ }, z.core.$strip>>;
982
+ output: z.ZodOptional<z.ZodObject<{
983
+ count: z.ZodOptional<z.ZodNumber>;
984
+ aspectRatio: z.ZodOptional<z.ZodEnum<{
985
+ "1:1": "1:1";
986
+ "16:9": "16:9";
987
+ "9:16": "9:16";
988
+ "4:3": "4:3";
989
+ }>>;
990
+ quality: z.ZodOptional<z.ZodEnum<{
991
+ standard: "standard";
992
+ hd: "hd";
993
+ }>>;
994
+ }, z.core.$strip>>;
995
+ parameters: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
996
+ }, z.core.$strip>;
997
+ declare const aiVideoRequestSchema: z.ZodObject<{
998
+ modelId: z.ZodString;
999
+ prompt: z.ZodString;
1000
+ negativePrompt: z.ZodOptional<z.ZodString>;
1001
+ style: z.ZodOptional<z.ZodString>;
1002
+ inputs: z.ZodOptional<z.ZodObject<{
1003
+ images: z.ZodOptional<z.ZodArray<z.ZodObject<{
1004
+ url: z.ZodOptional<z.ZodString>;
1005
+ base64: z.ZodOptional<z.ZodString>;
1006
+ mediaType: z.ZodOptional<z.ZodString>;
1007
+ }, z.core.$strip>>>;
1008
+ startImage: z.ZodOptional<z.ZodObject<{
1009
+ url: z.ZodOptional<z.ZodString>;
1010
+ base64: z.ZodOptional<z.ZodString>;
1011
+ mediaType: z.ZodOptional<z.ZodString>;
1012
+ }, z.core.$strip>>;
1013
+ endImage: z.ZodOptional<z.ZodObject<{
1014
+ url: z.ZodOptional<z.ZodString>;
1015
+ base64: z.ZodOptional<z.ZodString>;
1016
+ mediaType: z.ZodOptional<z.ZodString>;
1017
+ }, z.core.$strip>>;
1018
+ referenceVideo: z.ZodOptional<z.ZodObject<{
1019
+ url: z.ZodOptional<z.ZodString>;
1020
+ base64: z.ZodOptional<z.ZodString>;
1021
+ mediaType: z.ZodOptional<z.ZodString>;
1022
+ }, z.core.$strip>>;
1023
+ }, z.core.$strip>>;
1024
+ output: z.ZodOptional<z.ZodObject<{
1025
+ aspectRatio: z.ZodOptional<z.ZodString>;
1026
+ duration: z.ZodOptional<z.ZodNumber>;
1027
+ clarity: z.ZodOptional<z.ZodString>;
1028
+ withAudio: z.ZodOptional<z.ZodBoolean>;
1029
+ }, z.core.$strip>>;
1030
+ parameters: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1031
+ }, z.core.$strip>;
1032
+ declare const aiTaskCreatedDataSchema: z.ZodObject<{
1033
+ taskId: z.ZodString;
1034
+ }, z.core.$strip>;
1035
+ declare const aiErrorResponseSchema: z.ZodObject<{
1036
+ success: z.ZodLiteral<false>;
1037
+ code: z.ZodOptional<z.ZodString>;
1038
+ message: z.ZodString;
1039
+ }, z.core.$strip>;
1040
+ declare const aiTaskCreatedSuccessSchema: z.ZodObject<{
1041
+ success: z.ZodLiteral<true>;
1042
+ data: z.ZodObject<{
1043
+ taskId: z.ZodString;
1044
+ }, z.core.$strip>;
1045
+ }, z.core.$strip>;
1046
+ declare const aiTaskCreatedResponseSchema: z.ZodUnion<readonly [z.ZodObject<{
1047
+ success: z.ZodLiteral<true>;
1048
+ data: z.ZodObject<{
1049
+ taskId: z.ZodString;
1050
+ }, z.core.$strip>;
1051
+ }, z.core.$strip>, z.ZodObject<{
1052
+ success: z.ZodLiteral<false>;
1053
+ code: z.ZodOptional<z.ZodString>;
1054
+ message: z.ZodString;
1055
+ }, z.core.$strip>]>;
1056
+ declare const aiTaskStatusSchema: z.ZodEnum<{
1057
+ queued: "queued";
1058
+ running: "running";
1059
+ succeeded: "succeeded";
1060
+ failed: "failed";
1061
+ canceled: "canceled";
1062
+ }>;
1063
+ declare const aiTaskResultTypeSchema: z.ZodEnum<{
1064
+ image: "image";
1065
+ video: "video";
1066
+ }>;
1067
+ declare const aiTaskErrorSchema: z.ZodObject<{
1068
+ code: z.ZodOptional<z.ZodString>;
1069
+ message: z.ZodString;
1070
+ }, z.core.$strip>;
1071
+ declare const aiTaskDataSchema: z.ZodObject<{
1072
+ status: z.ZodEnum<{
1073
+ queued: "queued";
1074
+ running: "running";
1075
+ succeeded: "succeeded";
1076
+ failed: "failed";
1077
+ canceled: "canceled";
1078
+ }>;
1079
+ progress: z.ZodOptional<z.ZodNumber>;
1080
+ resultType: z.ZodOptional<z.ZodEnum<{
1081
+ image: "image";
1082
+ video: "video";
1083
+ }>>;
1084
+ resultUrls: z.ZodOptional<z.ZodArray<z.ZodString>>;
1085
+ error: z.ZodOptional<z.ZodObject<{
1086
+ code: z.ZodOptional<z.ZodString>;
1087
+ message: z.ZodString;
1088
+ }, z.core.$strip>>;
1089
+ creditsConsumed: z.ZodOptional<z.ZodNumber>;
1090
+ }, z.core.$strip>;
1091
+ declare const aiTaskSuccessSchema: z.ZodObject<{
1092
+ success: z.ZodLiteral<true>;
1093
+ data: z.ZodObject<{
1094
+ status: z.ZodEnum<{
1095
+ queued: "queued";
1096
+ running: "running";
1097
+ succeeded: "succeeded";
1098
+ failed: "failed";
1099
+ canceled: "canceled";
1100
+ }>;
1101
+ progress: z.ZodOptional<z.ZodNumber>;
1102
+ resultType: z.ZodOptional<z.ZodEnum<{
1103
+ image: "image";
1104
+ video: "video";
1105
+ }>>;
1106
+ resultUrls: z.ZodOptional<z.ZodArray<z.ZodString>>;
1107
+ error: z.ZodOptional<z.ZodObject<{
1108
+ code: z.ZodOptional<z.ZodString>;
1109
+ message: z.ZodString;
1110
+ }, z.core.$strip>>;
1111
+ creditsConsumed: z.ZodOptional<z.ZodNumber>;
1112
+ }, z.core.$strip>;
1113
+ }, z.core.$strip>;
1114
+ declare const aiTaskResponseSchema: z.ZodUnion<readonly [z.ZodObject<{
1115
+ success: z.ZodLiteral<true>;
1116
+ data: z.ZodObject<{
1117
+ status: z.ZodEnum<{
1118
+ queued: "queued";
1119
+ running: "running";
1120
+ succeeded: "succeeded";
1121
+ failed: "failed";
1122
+ canceled: "canceled";
1123
+ }>;
1124
+ progress: z.ZodOptional<z.ZodNumber>;
1125
+ resultType: z.ZodOptional<z.ZodEnum<{
1126
+ image: "image";
1127
+ video: "video";
1128
+ }>>;
1129
+ resultUrls: z.ZodOptional<z.ZodArray<z.ZodString>>;
1130
+ error: z.ZodOptional<z.ZodObject<{
1131
+ code: z.ZodOptional<z.ZodString>;
1132
+ message: z.ZodString;
1133
+ }, z.core.$strip>>;
1134
+ creditsConsumed: z.ZodOptional<z.ZodNumber>;
1135
+ }, z.core.$strip>;
1136
+ }, z.core.$strip>, z.ZodObject<{
1137
+ success: z.ZodLiteral<false>;
1138
+ code: z.ZodOptional<z.ZodString>;
1139
+ message: z.ZodString;
1140
+ }, z.core.$strip>]>;
1141
+ declare const aiTaskCancelDataSchema: z.ZodObject<{
1142
+ status: z.ZodEnum<{
1143
+ canceled: "canceled";
1144
+ processing: "processing";
1145
+ }>;
1146
+ }, z.core.$strip>;
1147
+ declare const aiTaskCancelSuccessSchema: z.ZodObject<{
1148
+ success: z.ZodLiteral<true>;
1149
+ data: z.ZodObject<{
1150
+ status: z.ZodEnum<{
1151
+ canceled: "canceled";
1152
+ processing: "processing";
1153
+ }>;
1154
+ }, z.core.$strip>;
1155
+ }, z.core.$strip>;
1156
+ declare const aiTaskCancelResponseSchema: z.ZodUnion<readonly [z.ZodObject<{
1157
+ success: z.ZodLiteral<true>;
1158
+ data: z.ZodObject<{
1159
+ status: z.ZodEnum<{
1160
+ canceled: "canceled";
1161
+ processing: "processing";
1162
+ }>;
1163
+ }, z.core.$strip>;
1164
+ }, z.core.$strip>, z.ZodObject<{
1165
+ success: z.ZodLiteral<false>;
1166
+ code: z.ZodOptional<z.ZodString>;
1167
+ message: z.ZodString;
1168
+ }, z.core.$strip>]>;
1169
+ declare const aiModelCapabilitiesInputSchema: z.ZodObject<{
1170
+ maxImages: z.ZodOptional<z.ZodNumber>;
1171
+ supportsMask: z.ZodOptional<z.ZodBoolean>;
1172
+ supportsReferenceVideo: z.ZodOptional<z.ZodBoolean>;
1173
+ supportsStartEnd: z.ZodOptional<z.ZodBoolean>;
1174
+ }, z.core.$strip>;
1175
+ declare const aiModelCapabilitiesOutputSchema: z.ZodObject<{
1176
+ supportsMulti: z.ZodOptional<z.ZodBoolean>;
1177
+ supportsAudio: z.ZodOptional<z.ZodBoolean>;
1178
+ }, z.core.$strip>;
1179
+ declare const aiModelCapabilityCommonSchema: z.ZodObject<{
1180
+ maxContextK: z.ZodOptional<z.ZodNumber>;
1181
+ supportsStructuredOutput: z.ZodOptional<z.ZodBoolean>;
1182
+ supportsWebSearch: z.ZodOptional<z.ZodBoolean>;
1183
+ }, z.core.$strip>;
1184
+ declare const aiModelParameterFieldSchema: z.ZodObject<{
1185
+ key: z.ZodString;
1186
+ title: z.ZodString;
1187
+ description: z.ZodOptional<z.ZodString>;
1188
+ type: z.ZodEnum<{
1189
+ number: "number";
1190
+ boolean: "boolean";
1191
+ text: "text";
1192
+ select: "select";
1193
+ }>;
1194
+ unit: z.ZodOptional<z.ZodString>;
1195
+ values: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
1196
+ min: z.ZodOptional<z.ZodNumber>;
1197
+ max: z.ZodOptional<z.ZodNumber>;
1198
+ step: z.ZodOptional<z.ZodNumber>;
1199
+ default: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
1200
+ request: z.ZodBoolean;
1201
+ }, z.core.$strip>;
1202
+ declare const aiModelParamsSchema: z.ZodObject<{
1203
+ features: z.ZodOptional<z.ZodArray<z.ZodString>>;
1204
+ fields: z.ZodOptional<z.ZodArray<z.ZodObject<{
1205
+ key: z.ZodString;
1206
+ title: z.ZodString;
1207
+ description: z.ZodOptional<z.ZodString>;
1208
+ type: z.ZodEnum<{
1209
+ number: "number";
1210
+ boolean: "boolean";
1211
+ text: "text";
1212
+ select: "select";
1213
+ }>;
1214
+ unit: z.ZodOptional<z.ZodString>;
1215
+ values: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
1216
+ min: z.ZodOptional<z.ZodNumber>;
1217
+ max: z.ZodOptional<z.ZodNumber>;
1218
+ step: z.ZodOptional<z.ZodNumber>;
1219
+ default: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
1220
+ request: z.ZodBoolean;
1221
+ }, z.core.$strip>>>;
1222
+ }, z.core.$strip>;
1223
+ declare const aiModelCapabilitiesSchema: z.ZodObject<{
1224
+ common: z.ZodOptional<z.ZodObject<{
1225
+ maxContextK: z.ZodOptional<z.ZodNumber>;
1226
+ supportsStructuredOutput: z.ZodOptional<z.ZodBoolean>;
1227
+ supportsWebSearch: z.ZodOptional<z.ZodBoolean>;
1228
+ }, z.core.$strip>>;
1229
+ params: z.ZodOptional<z.ZodObject<{
1230
+ features: z.ZodOptional<z.ZodArray<z.ZodString>>;
1231
+ fields: z.ZodOptional<z.ZodArray<z.ZodObject<{
1232
+ key: z.ZodString;
1233
+ title: z.ZodString;
1234
+ description: z.ZodOptional<z.ZodString>;
1235
+ type: z.ZodEnum<{
1236
+ number: "number";
1237
+ boolean: "boolean";
1238
+ text: "text";
1239
+ select: "select";
1240
+ }>;
1241
+ unit: z.ZodOptional<z.ZodString>;
1242
+ values: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
1243
+ min: z.ZodOptional<z.ZodNumber>;
1244
+ max: z.ZodOptional<z.ZodNumber>;
1245
+ step: z.ZodOptional<z.ZodNumber>;
1246
+ default: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
1247
+ request: z.ZodBoolean;
1248
+ }, z.core.$strip>>>;
1249
+ }, z.core.$strip>>;
1250
+ input: z.ZodOptional<z.ZodObject<{
1251
+ maxImages: z.ZodOptional<z.ZodNumber>;
1252
+ supportsMask: z.ZodOptional<z.ZodBoolean>;
1253
+ supportsReferenceVideo: z.ZodOptional<z.ZodBoolean>;
1254
+ supportsStartEnd: z.ZodOptional<z.ZodBoolean>;
1255
+ }, z.core.$strip>>;
1256
+ output: z.ZodOptional<z.ZodObject<{
1257
+ supportsMulti: z.ZodOptional<z.ZodBoolean>;
1258
+ supportsAudio: z.ZodOptional<z.ZodBoolean>;
1259
+ }, z.core.$strip>>;
1260
+ }, z.core.$strip>;
1261
+ declare const aiModelSchema: z.ZodObject<{
1262
+ id: z.ZodString;
1263
+ name: z.ZodOptional<z.ZodString>;
1264
+ familyId: z.ZodOptional<z.ZodString>;
1265
+ providerId: z.ZodOptional<z.ZodString>;
1266
+ tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
1267
+ capabilities: z.ZodOptional<z.ZodObject<{
1268
+ common: z.ZodOptional<z.ZodObject<{
1269
+ maxContextK: z.ZodOptional<z.ZodNumber>;
1270
+ supportsStructuredOutput: z.ZodOptional<z.ZodBoolean>;
1271
+ supportsWebSearch: z.ZodOptional<z.ZodBoolean>;
1272
+ }, z.core.$strip>>;
1273
+ params: z.ZodOptional<z.ZodObject<{
1274
+ features: z.ZodOptional<z.ZodArray<z.ZodString>>;
1275
+ fields: z.ZodOptional<z.ZodArray<z.ZodObject<{
1276
+ key: z.ZodString;
1277
+ title: z.ZodString;
1278
+ description: z.ZodOptional<z.ZodString>;
1279
+ type: z.ZodEnum<{
1280
+ number: "number";
1281
+ boolean: "boolean";
1282
+ text: "text";
1283
+ select: "select";
1284
+ }>;
1285
+ unit: z.ZodOptional<z.ZodString>;
1286
+ values: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
1287
+ min: z.ZodOptional<z.ZodNumber>;
1288
+ max: z.ZodOptional<z.ZodNumber>;
1289
+ step: z.ZodOptional<z.ZodNumber>;
1290
+ default: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
1291
+ request: z.ZodBoolean;
1292
+ }, z.core.$strip>>>;
1293
+ }, z.core.$strip>>;
1294
+ input: z.ZodOptional<z.ZodObject<{
1295
+ maxImages: z.ZodOptional<z.ZodNumber>;
1296
+ supportsMask: z.ZodOptional<z.ZodBoolean>;
1297
+ supportsReferenceVideo: z.ZodOptional<z.ZodBoolean>;
1298
+ supportsStartEnd: z.ZodOptional<z.ZodBoolean>;
1299
+ }, z.core.$strip>>;
1300
+ output: z.ZodOptional<z.ZodObject<{
1301
+ supportsMulti: z.ZodOptional<z.ZodBoolean>;
1302
+ supportsAudio: z.ZodOptional<z.ZodBoolean>;
1303
+ }, z.core.$strip>>;
1304
+ }, z.core.$strip>>;
1305
+ }, z.core.$loose>;
1306
+ declare const aiModelsPayloadSchema: z.ZodObject<{
1307
+ data: z.ZodArray<z.ZodObject<{
1308
+ id: z.ZodString;
1309
+ name: z.ZodOptional<z.ZodString>;
1310
+ familyId: z.ZodOptional<z.ZodString>;
1311
+ providerId: z.ZodOptional<z.ZodString>;
1312
+ tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
1313
+ capabilities: z.ZodOptional<z.ZodObject<{
1314
+ common: z.ZodOptional<z.ZodObject<{
1315
+ maxContextK: z.ZodOptional<z.ZodNumber>;
1316
+ supportsStructuredOutput: z.ZodOptional<z.ZodBoolean>;
1317
+ supportsWebSearch: z.ZodOptional<z.ZodBoolean>;
1318
+ }, z.core.$strip>>;
1319
+ params: z.ZodOptional<z.ZodObject<{
1320
+ features: z.ZodOptional<z.ZodArray<z.ZodString>>;
1321
+ fields: z.ZodOptional<z.ZodArray<z.ZodObject<{
1322
+ key: z.ZodString;
1323
+ title: z.ZodString;
1324
+ description: z.ZodOptional<z.ZodString>;
1325
+ type: z.ZodEnum<{
1326
+ number: "number";
1327
+ boolean: "boolean";
1328
+ text: "text";
1329
+ select: "select";
1330
+ }>;
1331
+ unit: z.ZodOptional<z.ZodString>;
1332
+ values: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
1333
+ min: z.ZodOptional<z.ZodNumber>;
1334
+ max: z.ZodOptional<z.ZodNumber>;
1335
+ step: z.ZodOptional<z.ZodNumber>;
1336
+ default: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
1337
+ request: z.ZodBoolean;
1338
+ }, z.core.$strip>>>;
1339
+ }, z.core.$strip>>;
1340
+ input: z.ZodOptional<z.ZodObject<{
1341
+ maxImages: z.ZodOptional<z.ZodNumber>;
1342
+ supportsMask: z.ZodOptional<z.ZodBoolean>;
1343
+ supportsReferenceVideo: z.ZodOptional<z.ZodBoolean>;
1344
+ supportsStartEnd: z.ZodOptional<z.ZodBoolean>;
1345
+ }, z.core.$strip>>;
1346
+ output: z.ZodOptional<z.ZodObject<{
1347
+ supportsMulti: z.ZodOptional<z.ZodBoolean>;
1348
+ supportsAudio: z.ZodOptional<z.ZodBoolean>;
1349
+ }, z.core.$strip>>;
1350
+ }, z.core.$strip>>;
1351
+ }, z.core.$loose>>;
1352
+ updatedAt: z.ZodOptional<z.ZodString>;
1353
+ }, z.core.$strip>;
1354
+ declare const aiModelsSuccessSchema: z.ZodObject<{
1355
+ success: z.ZodLiteral<true>;
1356
+ data: z.ZodObject<{
1357
+ data: z.ZodArray<z.ZodObject<{
1358
+ id: z.ZodString;
1359
+ name: z.ZodOptional<z.ZodString>;
1360
+ familyId: z.ZodOptional<z.ZodString>;
1361
+ providerId: z.ZodOptional<z.ZodString>;
1362
+ tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
1363
+ capabilities: z.ZodOptional<z.ZodObject<{
1364
+ common: z.ZodOptional<z.ZodObject<{
1365
+ maxContextK: z.ZodOptional<z.ZodNumber>;
1366
+ supportsStructuredOutput: z.ZodOptional<z.ZodBoolean>;
1367
+ supportsWebSearch: z.ZodOptional<z.ZodBoolean>;
1368
+ }, z.core.$strip>>;
1369
+ params: z.ZodOptional<z.ZodObject<{
1370
+ features: z.ZodOptional<z.ZodArray<z.ZodString>>;
1371
+ fields: z.ZodOptional<z.ZodArray<z.ZodObject<{
1372
+ key: z.ZodString;
1373
+ title: z.ZodString;
1374
+ description: z.ZodOptional<z.ZodString>;
1375
+ type: z.ZodEnum<{
1376
+ number: "number";
1377
+ boolean: "boolean";
1378
+ text: "text";
1379
+ select: "select";
1380
+ }>;
1381
+ unit: z.ZodOptional<z.ZodString>;
1382
+ values: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
1383
+ min: z.ZodOptional<z.ZodNumber>;
1384
+ max: z.ZodOptional<z.ZodNumber>;
1385
+ step: z.ZodOptional<z.ZodNumber>;
1386
+ default: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
1387
+ request: z.ZodBoolean;
1388
+ }, z.core.$strip>>>;
1389
+ }, z.core.$strip>>;
1390
+ input: z.ZodOptional<z.ZodObject<{
1391
+ maxImages: z.ZodOptional<z.ZodNumber>;
1392
+ supportsMask: z.ZodOptional<z.ZodBoolean>;
1393
+ supportsReferenceVideo: z.ZodOptional<z.ZodBoolean>;
1394
+ supportsStartEnd: z.ZodOptional<z.ZodBoolean>;
1395
+ }, z.core.$strip>>;
1396
+ output: z.ZodOptional<z.ZodObject<{
1397
+ supportsMulti: z.ZodOptional<z.ZodBoolean>;
1398
+ supportsAudio: z.ZodOptional<z.ZodBoolean>;
1399
+ }, z.core.$strip>>;
1400
+ }, z.core.$strip>>;
1401
+ }, z.core.$loose>>;
1402
+ updatedAt: z.ZodOptional<z.ZodString>;
1403
+ }, z.core.$strip>;
1404
+ }, z.core.$strip>;
1405
+ declare const aiModelsResponseSchema: z.ZodUnion<readonly [z.ZodObject<{
1406
+ success: z.ZodLiteral<true>;
1407
+ data: z.ZodObject<{
1408
+ data: z.ZodArray<z.ZodObject<{
1409
+ id: z.ZodString;
1410
+ name: z.ZodOptional<z.ZodString>;
1411
+ familyId: z.ZodOptional<z.ZodString>;
1412
+ providerId: z.ZodOptional<z.ZodString>;
1413
+ tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
1414
+ capabilities: z.ZodOptional<z.ZodObject<{
1415
+ common: z.ZodOptional<z.ZodObject<{
1416
+ maxContextK: z.ZodOptional<z.ZodNumber>;
1417
+ supportsStructuredOutput: z.ZodOptional<z.ZodBoolean>;
1418
+ supportsWebSearch: z.ZodOptional<z.ZodBoolean>;
1419
+ }, z.core.$strip>>;
1420
+ params: z.ZodOptional<z.ZodObject<{
1421
+ features: z.ZodOptional<z.ZodArray<z.ZodString>>;
1422
+ fields: z.ZodOptional<z.ZodArray<z.ZodObject<{
1423
+ key: z.ZodString;
1424
+ title: z.ZodString;
1425
+ description: z.ZodOptional<z.ZodString>;
1426
+ type: z.ZodEnum<{
1427
+ number: "number";
1428
+ boolean: "boolean";
1429
+ text: "text";
1430
+ select: "select";
1431
+ }>;
1432
+ unit: z.ZodOptional<z.ZodString>;
1433
+ values: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
1434
+ min: z.ZodOptional<z.ZodNumber>;
1435
+ max: z.ZodOptional<z.ZodNumber>;
1436
+ step: z.ZodOptional<z.ZodNumber>;
1437
+ default: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
1438
+ request: z.ZodBoolean;
1439
+ }, z.core.$strip>>>;
1440
+ }, z.core.$strip>>;
1441
+ input: z.ZodOptional<z.ZodObject<{
1442
+ maxImages: z.ZodOptional<z.ZodNumber>;
1443
+ supportsMask: z.ZodOptional<z.ZodBoolean>;
1444
+ supportsReferenceVideo: z.ZodOptional<z.ZodBoolean>;
1445
+ supportsStartEnd: z.ZodOptional<z.ZodBoolean>;
1446
+ }, z.core.$strip>>;
1447
+ output: z.ZodOptional<z.ZodObject<{
1448
+ supportsMulti: z.ZodOptional<z.ZodBoolean>;
1449
+ supportsAudio: z.ZodOptional<z.ZodBoolean>;
1450
+ }, z.core.$strip>>;
1451
+ }, z.core.$strip>>;
1452
+ }, z.core.$loose>>;
1453
+ updatedAt: z.ZodOptional<z.ZodString>;
1454
+ }, z.core.$strip>;
1455
+ }, z.core.$strip>, z.ZodObject<{
1456
+ success: z.ZodLiteral<false>;
1457
+ code: z.ZodOptional<z.ZodString>;
1458
+ message: z.ZodString;
1459
+ }, z.core.$strip>]>;
1460
+ declare const aiChatModelSchema: z.ZodObject<{
1461
+ id: z.ZodString;
1462
+ provider: z.ZodString;
1463
+ displayName: z.ZodString;
1464
+ familyId: z.ZodOptional<z.ZodString>;
1465
+ tags: z.ZodArray<z.ZodString>;
1466
+ capabilities: z.ZodOptional<z.ZodObject<{
1467
+ common: z.ZodOptional<z.ZodObject<{
1468
+ maxContextK: z.ZodOptional<z.ZodNumber>;
1469
+ supportsStructuredOutput: z.ZodOptional<z.ZodBoolean>;
1470
+ supportsWebSearch: z.ZodOptional<z.ZodBoolean>;
1471
+ }, z.core.$strip>>;
1472
+ params: z.ZodOptional<z.ZodObject<{
1473
+ features: z.ZodOptional<z.ZodArray<z.ZodString>>;
1474
+ fields: z.ZodOptional<z.ZodArray<z.ZodObject<{
1475
+ key: z.ZodString;
1476
+ title: z.ZodString;
1477
+ description: z.ZodOptional<z.ZodString>;
1478
+ type: z.ZodEnum<{
1479
+ number: "number";
1480
+ boolean: "boolean";
1481
+ text: "text";
1482
+ select: "select";
1483
+ }>;
1484
+ unit: z.ZodOptional<z.ZodString>;
1485
+ values: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
1486
+ min: z.ZodOptional<z.ZodNumber>;
1487
+ max: z.ZodOptional<z.ZodNumber>;
1488
+ step: z.ZodOptional<z.ZodNumber>;
1489
+ default: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
1490
+ request: z.ZodBoolean;
1491
+ }, z.core.$strip>>>;
1492
+ }, z.core.$strip>>;
1493
+ input: z.ZodOptional<z.ZodObject<{
1494
+ maxImages: z.ZodOptional<z.ZodNumber>;
1495
+ supportsMask: z.ZodOptional<z.ZodBoolean>;
1496
+ supportsReferenceVideo: z.ZodOptional<z.ZodBoolean>;
1497
+ supportsStartEnd: z.ZodOptional<z.ZodBoolean>;
1498
+ }, z.core.$strip>>;
1499
+ output: z.ZodOptional<z.ZodObject<{
1500
+ supportsMulti: z.ZodOptional<z.ZodBoolean>;
1501
+ supportsAudio: z.ZodOptional<z.ZodBoolean>;
1502
+ }, z.core.$strip>>;
1503
+ }, z.core.$strip>>;
1504
+ }, z.core.$strip>;
1505
+ declare const aiChatModelsPayloadSchema: z.ZodObject<{
1506
+ data: z.ZodArray<z.ZodObject<{
1507
+ id: z.ZodString;
1508
+ provider: z.ZodString;
1509
+ displayName: z.ZodString;
1510
+ familyId: z.ZodOptional<z.ZodString>;
1511
+ tags: z.ZodArray<z.ZodString>;
1512
+ capabilities: z.ZodOptional<z.ZodObject<{
1513
+ common: z.ZodOptional<z.ZodObject<{
1514
+ maxContextK: z.ZodOptional<z.ZodNumber>;
1515
+ supportsStructuredOutput: z.ZodOptional<z.ZodBoolean>;
1516
+ supportsWebSearch: z.ZodOptional<z.ZodBoolean>;
1517
+ }, z.core.$strip>>;
1518
+ params: z.ZodOptional<z.ZodObject<{
1519
+ features: z.ZodOptional<z.ZodArray<z.ZodString>>;
1520
+ fields: z.ZodOptional<z.ZodArray<z.ZodObject<{
1521
+ key: z.ZodString;
1522
+ title: z.ZodString;
1523
+ description: z.ZodOptional<z.ZodString>;
1524
+ type: z.ZodEnum<{
1525
+ number: "number";
1526
+ boolean: "boolean";
1527
+ text: "text";
1528
+ select: "select";
1529
+ }>;
1530
+ unit: z.ZodOptional<z.ZodString>;
1531
+ values: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
1532
+ min: z.ZodOptional<z.ZodNumber>;
1533
+ max: z.ZodOptional<z.ZodNumber>;
1534
+ step: z.ZodOptional<z.ZodNumber>;
1535
+ default: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
1536
+ request: z.ZodBoolean;
1537
+ }, z.core.$strip>>>;
1538
+ }, z.core.$strip>>;
1539
+ input: z.ZodOptional<z.ZodObject<{
1540
+ maxImages: z.ZodOptional<z.ZodNumber>;
1541
+ supportsMask: z.ZodOptional<z.ZodBoolean>;
1542
+ supportsReferenceVideo: z.ZodOptional<z.ZodBoolean>;
1543
+ supportsStartEnd: z.ZodOptional<z.ZodBoolean>;
1544
+ }, z.core.$strip>>;
1545
+ output: z.ZodOptional<z.ZodObject<{
1546
+ supportsMulti: z.ZodOptional<z.ZodBoolean>;
1547
+ supportsAudio: z.ZodOptional<z.ZodBoolean>;
1548
+ }, z.core.$strip>>;
1549
+ }, z.core.$strip>>;
1550
+ }, z.core.$strip>>;
1551
+ updatedAt: z.ZodOptional<z.ZodString>;
1552
+ }, z.core.$strip>;
1553
+ declare const aiChatModelsSuccessSchema: z.ZodObject<{
1554
+ success: z.ZodLiteral<true>;
1555
+ data: z.ZodObject<{
1556
+ data: z.ZodArray<z.ZodObject<{
1557
+ id: z.ZodString;
1558
+ provider: z.ZodString;
1559
+ displayName: z.ZodString;
1560
+ familyId: z.ZodOptional<z.ZodString>;
1561
+ tags: z.ZodArray<z.ZodString>;
1562
+ capabilities: z.ZodOptional<z.ZodObject<{
1563
+ common: z.ZodOptional<z.ZodObject<{
1564
+ maxContextK: z.ZodOptional<z.ZodNumber>;
1565
+ supportsStructuredOutput: z.ZodOptional<z.ZodBoolean>;
1566
+ supportsWebSearch: z.ZodOptional<z.ZodBoolean>;
1567
+ }, z.core.$strip>>;
1568
+ params: z.ZodOptional<z.ZodObject<{
1569
+ features: z.ZodOptional<z.ZodArray<z.ZodString>>;
1570
+ fields: z.ZodOptional<z.ZodArray<z.ZodObject<{
1571
+ key: z.ZodString;
1572
+ title: z.ZodString;
1573
+ description: z.ZodOptional<z.ZodString>;
1574
+ type: z.ZodEnum<{
1575
+ number: "number";
1576
+ boolean: "boolean";
1577
+ text: "text";
1578
+ select: "select";
1579
+ }>;
1580
+ unit: z.ZodOptional<z.ZodString>;
1581
+ values: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
1582
+ min: z.ZodOptional<z.ZodNumber>;
1583
+ max: z.ZodOptional<z.ZodNumber>;
1584
+ step: z.ZodOptional<z.ZodNumber>;
1585
+ default: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
1586
+ request: z.ZodBoolean;
1587
+ }, z.core.$strip>>>;
1588
+ }, z.core.$strip>>;
1589
+ input: z.ZodOptional<z.ZodObject<{
1590
+ maxImages: z.ZodOptional<z.ZodNumber>;
1591
+ supportsMask: z.ZodOptional<z.ZodBoolean>;
1592
+ supportsReferenceVideo: z.ZodOptional<z.ZodBoolean>;
1593
+ supportsStartEnd: z.ZodOptional<z.ZodBoolean>;
1594
+ }, z.core.$strip>>;
1595
+ output: z.ZodOptional<z.ZodObject<{
1596
+ supportsMulti: z.ZodOptional<z.ZodBoolean>;
1597
+ supportsAudio: z.ZodOptional<z.ZodBoolean>;
1598
+ }, z.core.$strip>>;
1599
+ }, z.core.$strip>>;
1600
+ }, z.core.$strip>>;
1601
+ updatedAt: z.ZodOptional<z.ZodString>;
1602
+ }, z.core.$strip>;
1603
+ }, z.core.$strip>;
1604
+ declare const aiChatModelsResponseSchema: z.ZodUnion<readonly [z.ZodObject<{
1605
+ success: z.ZodLiteral<true>;
1606
+ data: z.ZodObject<{
1607
+ data: z.ZodArray<z.ZodObject<{
1608
+ id: z.ZodString;
1609
+ provider: z.ZodString;
1610
+ displayName: z.ZodString;
1611
+ familyId: z.ZodOptional<z.ZodString>;
1612
+ tags: z.ZodArray<z.ZodString>;
1613
+ capabilities: z.ZodOptional<z.ZodObject<{
1614
+ common: z.ZodOptional<z.ZodObject<{
1615
+ maxContextK: z.ZodOptional<z.ZodNumber>;
1616
+ supportsStructuredOutput: z.ZodOptional<z.ZodBoolean>;
1617
+ supportsWebSearch: z.ZodOptional<z.ZodBoolean>;
1618
+ }, z.core.$strip>>;
1619
+ params: z.ZodOptional<z.ZodObject<{
1620
+ features: z.ZodOptional<z.ZodArray<z.ZodString>>;
1621
+ fields: z.ZodOptional<z.ZodArray<z.ZodObject<{
1622
+ key: z.ZodString;
1623
+ title: z.ZodString;
1624
+ description: z.ZodOptional<z.ZodString>;
1625
+ type: z.ZodEnum<{
1626
+ number: "number";
1627
+ boolean: "boolean";
1628
+ text: "text";
1629
+ select: "select";
1630
+ }>;
1631
+ unit: z.ZodOptional<z.ZodString>;
1632
+ values: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
1633
+ min: z.ZodOptional<z.ZodNumber>;
1634
+ max: z.ZodOptional<z.ZodNumber>;
1635
+ step: z.ZodOptional<z.ZodNumber>;
1636
+ default: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
1637
+ request: z.ZodBoolean;
1638
+ }, z.core.$strip>>>;
1639
+ }, z.core.$strip>>;
1640
+ input: z.ZodOptional<z.ZodObject<{
1641
+ maxImages: z.ZodOptional<z.ZodNumber>;
1642
+ supportsMask: z.ZodOptional<z.ZodBoolean>;
1643
+ supportsReferenceVideo: z.ZodOptional<z.ZodBoolean>;
1644
+ supportsStartEnd: z.ZodOptional<z.ZodBoolean>;
1645
+ }, z.core.$strip>>;
1646
+ output: z.ZodOptional<z.ZodObject<{
1647
+ supportsMulti: z.ZodOptional<z.ZodBoolean>;
1648
+ supportsAudio: z.ZodOptional<z.ZodBoolean>;
1649
+ }, z.core.$strip>>;
1650
+ }, z.core.$strip>>;
1651
+ }, z.core.$strip>>;
1652
+ updatedAt: z.ZodOptional<z.ZodString>;
1653
+ }, z.core.$strip>;
1654
+ }, z.core.$strip>, z.ZodObject<{
1655
+ success: z.ZodLiteral<false>;
1656
+ code: z.ZodOptional<z.ZodString>;
1657
+ message: z.ZodString;
1658
+ }, z.core.$strip>]>;
1659
+ declare const aiModelsUpdatedAtDataSchema: z.ZodObject<{
1660
+ chatUpdatedAt: z.ZodString;
1661
+ imageUpdatedAt: z.ZodString;
1662
+ videoUpdatedAt: z.ZodString;
1663
+ latestUpdatedAt: z.ZodString;
1664
+ }, z.core.$strip>;
1665
+ declare const aiModelsUpdatedAtSuccessSchema: z.ZodObject<{
1666
+ success: z.ZodLiteral<true>;
1667
+ data: z.ZodObject<{
1668
+ chatUpdatedAt: z.ZodString;
1669
+ imageUpdatedAt: z.ZodString;
1670
+ videoUpdatedAt: z.ZodString;
1671
+ latestUpdatedAt: z.ZodString;
1672
+ }, z.core.$strip>;
1673
+ }, z.core.$strip>;
1674
+ declare const aiModelsUpdatedAtResponseSchema: z.ZodUnion<readonly [z.ZodObject<{
1675
+ success: z.ZodLiteral<true>;
1676
+ data: z.ZodObject<{
1677
+ chatUpdatedAt: z.ZodString;
1678
+ imageUpdatedAt: z.ZodString;
1679
+ videoUpdatedAt: z.ZodString;
1680
+ latestUpdatedAt: z.ZodString;
1681
+ }, z.core.$strip>;
1682
+ }, z.core.$strip>, z.ZodObject<{
1683
+ success: z.ZodLiteral<false>;
1684
+ code: z.ZodOptional<z.ZodString>;
1685
+ message: z.ZodString;
1686
+ }, z.core.$strip>]>;
1687
+ declare const aiModelsRequestSchema: z.ZodVoid;
1688
+ declare const aiTaskRequestSchema: z.ZodVoid;
1689
+ declare const aiTaskCancelRequestSchema: z.ZodVoid;
1690
+ type AiMediaInput = z.infer<typeof aiMediaInputSchema>;
1691
+ type AiImageInputs = z.infer<typeof aiImageInputsSchema>;
1692
+ type AiVideoInputs = z.infer<typeof aiVideoInputsSchema>;
1693
+ type AiImageOutput = z.infer<typeof aiImageOutputSchema>;
1694
+ type AiVideoOutput = z.infer<typeof aiVideoOutputSchema>;
1695
+ type AiModelCapabilitiesInput = z.infer<typeof aiModelCapabilitiesInputSchema>;
1696
+ type AiModelCapabilitiesOutput = z.infer<typeof aiModelCapabilitiesOutputSchema>;
1697
+ type AiModelCapabilities = z.infer<typeof aiModelCapabilitiesSchema>;
1698
+ type AiImageRequest = z.infer<typeof aiImageRequestSchema>;
1699
+ type AiVideoRequest = z.infer<typeof aiVideoRequestSchema>;
1700
+ type AiTaskCreatedResponse = z.infer<typeof aiTaskCreatedResponseSchema>;
1701
+ type AiTaskResponse = z.infer<typeof aiTaskResponseSchema>;
1702
+ type AiTaskCancelResponse = z.infer<typeof aiTaskCancelResponseSchema>;
1703
+ type AiModelsResponse = z.infer<typeof aiModelsResponseSchema>;
1704
+ type AiModelsUpdatedAtData = z.infer<typeof aiModelsUpdatedAtDataSchema>;
1705
+ type AiModelsUpdatedAtResponse = z.infer<typeof aiModelsUpdatedAtResponseSchema>;
1706
+ type AiModel = z.infer<typeof aiModelSchema>;
1707
+ type AiChatModel = z.infer<typeof aiChatModelSchema>;
1708
+ type AiChatModelsResponse = z.infer<typeof aiChatModelsResponseSchema>;
1709
+ declare const aiProviderTemplateModelSchema: z.ZodObject<{
1710
+ id: z.ZodString;
1711
+ providerId: z.ZodString;
1712
+ displayName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1713
+ description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1714
+ familyId: z.ZodOptional<z.ZodString>;
1715
+ tags: z.ZodArray<z.ZodString>;
1716
+ capabilities: z.ZodOptional<z.ZodObject<{
1717
+ common: z.ZodOptional<z.ZodObject<{
1718
+ maxContextK: z.ZodOptional<z.ZodNumber>;
1719
+ supportsStructuredOutput: z.ZodOptional<z.ZodBoolean>;
1720
+ supportsWebSearch: z.ZodOptional<z.ZodBoolean>;
1721
+ }, z.core.$strip>>;
1722
+ params: z.ZodOptional<z.ZodObject<{
1723
+ features: z.ZodOptional<z.ZodArray<z.ZodString>>;
1724
+ fields: z.ZodOptional<z.ZodArray<z.ZodObject<{
1725
+ key: z.ZodString;
1726
+ title: z.ZodString;
1727
+ description: z.ZodOptional<z.ZodString>;
1728
+ type: z.ZodEnum<{
1729
+ number: "number";
1730
+ boolean: "boolean";
1731
+ text: "text";
1732
+ select: "select";
1733
+ }>;
1734
+ unit: z.ZodOptional<z.ZodString>;
1735
+ values: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
1736
+ min: z.ZodOptional<z.ZodNumber>;
1737
+ max: z.ZodOptional<z.ZodNumber>;
1738
+ step: z.ZodOptional<z.ZodNumber>;
1739
+ default: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
1740
+ request: z.ZodBoolean;
1741
+ }, z.core.$strip>>>;
1742
+ }, z.core.$strip>>;
1743
+ input: z.ZodOptional<z.ZodObject<{
1744
+ maxImages: z.ZodOptional<z.ZodNumber>;
1745
+ supportsMask: z.ZodOptional<z.ZodBoolean>;
1746
+ supportsReferenceVideo: z.ZodOptional<z.ZodBoolean>;
1747
+ supportsStartEnd: z.ZodOptional<z.ZodBoolean>;
1748
+ }, z.core.$strip>>;
1749
+ output: z.ZodOptional<z.ZodObject<{
1750
+ supportsMulti: z.ZodOptional<z.ZodBoolean>;
1751
+ supportsAudio: z.ZodOptional<z.ZodBoolean>;
1752
+ }, z.core.$strip>>;
1753
+ }, z.core.$strip>>;
1754
+ }, z.core.$strip>;
1755
+ declare const aiProviderTemplateSchema: z.ZodObject<{
1756
+ id: z.ZodString;
1757
+ label: z.ZodString;
1758
+ adapter: z.ZodString;
1759
+ apiUrl: z.ZodOptional<z.ZodString>;
1760
+ authType: z.ZodOptional<z.ZodString>;
1761
+ websiteUrl: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1762
+ docUrl: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1763
+ models: z.ZodArray<z.ZodObject<{
1764
+ id: z.ZodString;
1765
+ providerId: z.ZodString;
1766
+ displayName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1767
+ description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1768
+ familyId: z.ZodOptional<z.ZodString>;
1769
+ tags: z.ZodArray<z.ZodString>;
1770
+ capabilities: z.ZodOptional<z.ZodObject<{
1771
+ common: z.ZodOptional<z.ZodObject<{
1772
+ maxContextK: z.ZodOptional<z.ZodNumber>;
1773
+ supportsStructuredOutput: z.ZodOptional<z.ZodBoolean>;
1774
+ supportsWebSearch: z.ZodOptional<z.ZodBoolean>;
1775
+ }, z.core.$strip>>;
1776
+ params: z.ZodOptional<z.ZodObject<{
1777
+ features: z.ZodOptional<z.ZodArray<z.ZodString>>;
1778
+ fields: z.ZodOptional<z.ZodArray<z.ZodObject<{
1779
+ key: z.ZodString;
1780
+ title: z.ZodString;
1781
+ description: z.ZodOptional<z.ZodString>;
1782
+ type: z.ZodEnum<{
1783
+ number: "number";
1784
+ boolean: "boolean";
1785
+ text: "text";
1786
+ select: "select";
1787
+ }>;
1788
+ unit: z.ZodOptional<z.ZodString>;
1789
+ values: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
1790
+ min: z.ZodOptional<z.ZodNumber>;
1791
+ max: z.ZodOptional<z.ZodNumber>;
1792
+ step: z.ZodOptional<z.ZodNumber>;
1793
+ default: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
1794
+ request: z.ZodBoolean;
1795
+ }, z.core.$strip>>>;
1796
+ }, z.core.$strip>>;
1797
+ input: z.ZodOptional<z.ZodObject<{
1798
+ maxImages: z.ZodOptional<z.ZodNumber>;
1799
+ supportsMask: z.ZodOptional<z.ZodBoolean>;
1800
+ supportsReferenceVideo: z.ZodOptional<z.ZodBoolean>;
1801
+ supportsStartEnd: z.ZodOptional<z.ZodBoolean>;
1802
+ }, z.core.$strip>>;
1803
+ output: z.ZodOptional<z.ZodObject<{
1804
+ supportsMulti: z.ZodOptional<z.ZodBoolean>;
1805
+ supportsAudio: z.ZodOptional<z.ZodBoolean>;
1806
+ }, z.core.$strip>>;
1807
+ }, z.core.$strip>>;
1808
+ }, z.core.$strip>>;
1809
+ }, z.core.$strip>;
1810
+ declare const aiProviderTemplatesPayloadSchema: z.ZodObject<{
1811
+ providers: z.ZodArray<z.ZodObject<{
1812
+ id: z.ZodString;
1813
+ label: z.ZodString;
1814
+ adapter: z.ZodString;
1815
+ apiUrl: z.ZodOptional<z.ZodString>;
1816
+ authType: z.ZodOptional<z.ZodString>;
1817
+ websiteUrl: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1818
+ docUrl: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1819
+ models: z.ZodArray<z.ZodObject<{
1820
+ id: z.ZodString;
1821
+ providerId: z.ZodString;
1822
+ displayName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1823
+ description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1824
+ familyId: z.ZodOptional<z.ZodString>;
1825
+ tags: z.ZodArray<z.ZodString>;
1826
+ capabilities: z.ZodOptional<z.ZodObject<{
1827
+ common: z.ZodOptional<z.ZodObject<{
1828
+ maxContextK: z.ZodOptional<z.ZodNumber>;
1829
+ supportsStructuredOutput: z.ZodOptional<z.ZodBoolean>;
1830
+ supportsWebSearch: z.ZodOptional<z.ZodBoolean>;
1831
+ }, z.core.$strip>>;
1832
+ params: z.ZodOptional<z.ZodObject<{
1833
+ features: z.ZodOptional<z.ZodArray<z.ZodString>>;
1834
+ fields: z.ZodOptional<z.ZodArray<z.ZodObject<{
1835
+ key: z.ZodString;
1836
+ title: z.ZodString;
1837
+ description: z.ZodOptional<z.ZodString>;
1838
+ type: z.ZodEnum<{
1839
+ number: "number";
1840
+ boolean: "boolean";
1841
+ text: "text";
1842
+ select: "select";
1843
+ }>;
1844
+ unit: z.ZodOptional<z.ZodString>;
1845
+ values: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
1846
+ min: z.ZodOptional<z.ZodNumber>;
1847
+ max: z.ZodOptional<z.ZodNumber>;
1848
+ step: z.ZodOptional<z.ZodNumber>;
1849
+ default: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
1850
+ request: z.ZodBoolean;
1851
+ }, z.core.$strip>>>;
1852
+ }, z.core.$strip>>;
1853
+ input: z.ZodOptional<z.ZodObject<{
1854
+ maxImages: z.ZodOptional<z.ZodNumber>;
1855
+ supportsMask: z.ZodOptional<z.ZodBoolean>;
1856
+ supportsReferenceVideo: z.ZodOptional<z.ZodBoolean>;
1857
+ supportsStartEnd: z.ZodOptional<z.ZodBoolean>;
1858
+ }, z.core.$strip>>;
1859
+ output: z.ZodOptional<z.ZodObject<{
1860
+ supportsMulti: z.ZodOptional<z.ZodBoolean>;
1861
+ supportsAudio: z.ZodOptional<z.ZodBoolean>;
1862
+ }, z.core.$strip>>;
1863
+ }, z.core.$strip>>;
1864
+ }, z.core.$strip>>;
1865
+ }, z.core.$strip>>;
1866
+ updatedAt: z.ZodOptional<z.ZodString>;
1867
+ }, z.core.$strip>;
1868
+ declare const aiProviderTemplatesSuccessSchema: z.ZodObject<{
1869
+ success: z.ZodLiteral<true>;
1870
+ data: z.ZodObject<{
1871
+ providers: z.ZodArray<z.ZodObject<{
1872
+ id: z.ZodString;
1873
+ label: z.ZodString;
1874
+ adapter: z.ZodString;
1875
+ apiUrl: z.ZodOptional<z.ZodString>;
1876
+ authType: z.ZodOptional<z.ZodString>;
1877
+ websiteUrl: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1878
+ docUrl: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1879
+ models: z.ZodArray<z.ZodObject<{
1880
+ id: z.ZodString;
1881
+ providerId: z.ZodString;
1882
+ displayName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1883
+ description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1884
+ familyId: z.ZodOptional<z.ZodString>;
1885
+ tags: z.ZodArray<z.ZodString>;
1886
+ capabilities: z.ZodOptional<z.ZodObject<{
1887
+ common: z.ZodOptional<z.ZodObject<{
1888
+ maxContextK: z.ZodOptional<z.ZodNumber>;
1889
+ supportsStructuredOutput: z.ZodOptional<z.ZodBoolean>;
1890
+ supportsWebSearch: z.ZodOptional<z.ZodBoolean>;
1891
+ }, z.core.$strip>>;
1892
+ params: z.ZodOptional<z.ZodObject<{
1893
+ features: z.ZodOptional<z.ZodArray<z.ZodString>>;
1894
+ fields: z.ZodOptional<z.ZodArray<z.ZodObject<{
1895
+ key: z.ZodString;
1896
+ title: z.ZodString;
1897
+ description: z.ZodOptional<z.ZodString>;
1898
+ type: z.ZodEnum<{
1899
+ number: "number";
1900
+ boolean: "boolean";
1901
+ text: "text";
1902
+ select: "select";
1903
+ }>;
1904
+ unit: z.ZodOptional<z.ZodString>;
1905
+ values: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
1906
+ min: z.ZodOptional<z.ZodNumber>;
1907
+ max: z.ZodOptional<z.ZodNumber>;
1908
+ step: z.ZodOptional<z.ZodNumber>;
1909
+ default: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
1910
+ request: z.ZodBoolean;
1911
+ }, z.core.$strip>>>;
1912
+ }, z.core.$strip>>;
1913
+ input: z.ZodOptional<z.ZodObject<{
1914
+ maxImages: z.ZodOptional<z.ZodNumber>;
1915
+ supportsMask: z.ZodOptional<z.ZodBoolean>;
1916
+ supportsReferenceVideo: z.ZodOptional<z.ZodBoolean>;
1917
+ supportsStartEnd: z.ZodOptional<z.ZodBoolean>;
1918
+ }, z.core.$strip>>;
1919
+ output: z.ZodOptional<z.ZodObject<{
1920
+ supportsMulti: z.ZodOptional<z.ZodBoolean>;
1921
+ supportsAudio: z.ZodOptional<z.ZodBoolean>;
1922
+ }, z.core.$strip>>;
1923
+ }, z.core.$strip>>;
1924
+ }, z.core.$strip>>;
1925
+ }, z.core.$strip>>;
1926
+ updatedAt: z.ZodOptional<z.ZodString>;
1927
+ }, z.core.$strip>;
1928
+ }, z.core.$strip>;
1929
+ declare const aiProviderTemplatesResponseSchema: z.ZodUnion<readonly [z.ZodObject<{
1930
+ success: z.ZodLiteral<true>;
1931
+ data: z.ZodObject<{
1932
+ providers: z.ZodArray<z.ZodObject<{
1933
+ id: z.ZodString;
1934
+ label: z.ZodString;
1935
+ adapter: z.ZodString;
1936
+ apiUrl: z.ZodOptional<z.ZodString>;
1937
+ authType: z.ZodOptional<z.ZodString>;
1938
+ websiteUrl: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1939
+ docUrl: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1940
+ models: z.ZodArray<z.ZodObject<{
1941
+ id: z.ZodString;
1942
+ providerId: z.ZodString;
1943
+ displayName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1944
+ description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1945
+ familyId: z.ZodOptional<z.ZodString>;
1946
+ tags: z.ZodArray<z.ZodString>;
1947
+ capabilities: z.ZodOptional<z.ZodObject<{
1948
+ common: z.ZodOptional<z.ZodObject<{
1949
+ maxContextK: z.ZodOptional<z.ZodNumber>;
1950
+ supportsStructuredOutput: z.ZodOptional<z.ZodBoolean>;
1951
+ supportsWebSearch: z.ZodOptional<z.ZodBoolean>;
1952
+ }, z.core.$strip>>;
1953
+ params: z.ZodOptional<z.ZodObject<{
1954
+ features: z.ZodOptional<z.ZodArray<z.ZodString>>;
1955
+ fields: z.ZodOptional<z.ZodArray<z.ZodObject<{
1956
+ key: z.ZodString;
1957
+ title: z.ZodString;
1958
+ description: z.ZodOptional<z.ZodString>;
1959
+ type: z.ZodEnum<{
1960
+ number: "number";
1961
+ boolean: "boolean";
1962
+ text: "text";
1963
+ select: "select";
1964
+ }>;
1965
+ unit: z.ZodOptional<z.ZodString>;
1966
+ values: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
1967
+ min: z.ZodOptional<z.ZodNumber>;
1968
+ max: z.ZodOptional<z.ZodNumber>;
1969
+ step: z.ZodOptional<z.ZodNumber>;
1970
+ default: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
1971
+ request: z.ZodBoolean;
1972
+ }, z.core.$strip>>>;
1973
+ }, z.core.$strip>>;
1974
+ input: z.ZodOptional<z.ZodObject<{
1975
+ maxImages: z.ZodOptional<z.ZodNumber>;
1976
+ supportsMask: z.ZodOptional<z.ZodBoolean>;
1977
+ supportsReferenceVideo: z.ZodOptional<z.ZodBoolean>;
1978
+ supportsStartEnd: z.ZodOptional<z.ZodBoolean>;
1979
+ }, z.core.$strip>>;
1980
+ output: z.ZodOptional<z.ZodObject<{
1981
+ supportsMulti: z.ZodOptional<z.ZodBoolean>;
1982
+ supportsAudio: z.ZodOptional<z.ZodBoolean>;
1983
+ }, z.core.$strip>>;
1984
+ }, z.core.$strip>>;
1985
+ }, z.core.$strip>>;
1986
+ }, z.core.$strip>>;
1987
+ updatedAt: z.ZodOptional<z.ZodString>;
1988
+ }, z.core.$strip>;
1989
+ }, z.core.$strip>, z.ZodObject<{
1990
+ success: z.ZodLiteral<false>;
1991
+ code: z.ZodOptional<z.ZodString>;
1992
+ message: z.ZodString;
1993
+ }, z.core.$strip>]>;
1994
+ declare const aiProviderTemplatesRequestSchema: z.ZodVoid;
1995
+ type AiProviderTemplateModel = z.infer<typeof aiProviderTemplateModelSchema>;
1996
+ type AiProviderTemplate = z.infer<typeof aiProviderTemplateSchema>;
1997
+ type AiProviderTemplatesResponse = z.infer<typeof aiProviderTemplatesResponseSchema>;
1998
+
1999
+ type AiSdkHost = SdkHost<{
2000
+ ai: typeof aiEndpoints;
2001
+ }>;
2002
+ declare class AiClient {
2003
+ /** SDK host used for ai requests. */
2004
+ private readonly sdk;
2005
+ /** Create AI client. */
2006
+ constructor(sdk: AiSdkHost);
2007
+ /** Submit an image generation task. */
2008
+ image(payload: AiImageRequest): Promise<{
2009
+ success: false;
2010
+ message: string;
2011
+ code?: string | undefined;
2012
+ } | {
2013
+ success: true;
2014
+ data: {
2015
+ taskId: string;
2016
+ };
2017
+ }>;
2018
+ /** Submit a video generation task. */
2019
+ video(payload: AiVideoRequest): Promise<{
2020
+ success: false;
2021
+ message: string;
2022
+ code?: string | undefined;
2023
+ } | {
2024
+ success: true;
2025
+ data: {
2026
+ taskId: string;
2027
+ };
2028
+ }>;
2029
+ /** Fetch task status by ID. */
2030
+ task(taskId: string): Promise<{
2031
+ success: false;
2032
+ message: string;
2033
+ code?: string | undefined;
2034
+ } | {
2035
+ success: true;
2036
+ data: {
2037
+ status: "queued" | "running" | "succeeded" | "failed" | "canceled";
2038
+ progress?: number | undefined;
2039
+ resultType?: "image" | "video" | undefined;
2040
+ resultUrls?: string[] | undefined;
2041
+ error?: {
2042
+ message: string;
2043
+ code?: string | undefined;
2044
+ } | undefined;
2045
+ creditsConsumed?: number | undefined;
2046
+ };
2047
+ }>;
2048
+ /** Cancel a running task by ID. */
2049
+ cancelTask(taskId: string): Promise<{
2050
+ success: false;
2051
+ message: string;
2052
+ code?: string | undefined;
2053
+ } | {
2054
+ success: true;
2055
+ data: {
2056
+ status: "canceled" | "processing";
2057
+ };
2058
+ }>;
2059
+ /** List available image models. */
2060
+ imageModels(): Promise<{
2061
+ success: false;
2062
+ message: string;
2063
+ code?: string | undefined;
2064
+ } | {
2065
+ success: true;
2066
+ data: {
2067
+ data: {
2068
+ [x: string]: unknown;
2069
+ id: string;
2070
+ name?: string | undefined;
2071
+ familyId?: string | undefined;
2072
+ providerId?: string | undefined;
2073
+ tags?: string[] | undefined;
2074
+ capabilities?: {
2075
+ common?: {
2076
+ maxContextK?: number | undefined;
2077
+ supportsStructuredOutput?: boolean | undefined;
2078
+ supportsWebSearch?: boolean | undefined;
2079
+ } | undefined;
2080
+ params?: {
2081
+ features?: string[] | undefined;
2082
+ fields?: {
2083
+ key: string;
2084
+ title: string;
2085
+ type: "number" | "boolean" | "text" | "select";
2086
+ request: boolean;
2087
+ description?: string | undefined;
2088
+ unit?: string | undefined;
2089
+ values?: (string | number | boolean)[] | undefined;
2090
+ min?: number | undefined;
2091
+ max?: number | undefined;
2092
+ step?: number | undefined;
2093
+ default?: string | number | boolean | undefined;
2094
+ }[] | undefined;
2095
+ } | undefined;
2096
+ input?: {
2097
+ maxImages?: number | undefined;
2098
+ supportsMask?: boolean | undefined;
2099
+ supportsReferenceVideo?: boolean | undefined;
2100
+ supportsStartEnd?: boolean | undefined;
2101
+ } | undefined;
2102
+ output?: {
2103
+ supportsMulti?: boolean | undefined;
2104
+ supportsAudio?: boolean | undefined;
2105
+ } | undefined;
2106
+ } | undefined;
2107
+ }[];
2108
+ updatedAt?: string | undefined;
2109
+ };
2110
+ }>;
2111
+ /** List available video models. */
2112
+ videoModels(): Promise<{
2113
+ success: false;
2114
+ message: string;
2115
+ code?: string | undefined;
2116
+ } | {
2117
+ success: true;
2118
+ data: {
2119
+ data: {
2120
+ [x: string]: unknown;
2121
+ id: string;
2122
+ name?: string | undefined;
2123
+ familyId?: string | undefined;
2124
+ providerId?: string | undefined;
2125
+ tags?: string[] | undefined;
2126
+ capabilities?: {
2127
+ common?: {
2128
+ maxContextK?: number | undefined;
2129
+ supportsStructuredOutput?: boolean | undefined;
2130
+ supportsWebSearch?: boolean | undefined;
2131
+ } | undefined;
2132
+ params?: {
2133
+ features?: string[] | undefined;
2134
+ fields?: {
2135
+ key: string;
2136
+ title: string;
2137
+ type: "number" | "boolean" | "text" | "select";
2138
+ request: boolean;
2139
+ description?: string | undefined;
2140
+ unit?: string | undefined;
2141
+ values?: (string | number | boolean)[] | undefined;
2142
+ min?: number | undefined;
2143
+ max?: number | undefined;
2144
+ step?: number | undefined;
2145
+ default?: string | number | boolean | undefined;
2146
+ }[] | undefined;
2147
+ } | undefined;
2148
+ input?: {
2149
+ maxImages?: number | undefined;
2150
+ supportsMask?: boolean | undefined;
2151
+ supportsReferenceVideo?: boolean | undefined;
2152
+ supportsStartEnd?: boolean | undefined;
2153
+ } | undefined;
2154
+ output?: {
2155
+ supportsMulti?: boolean | undefined;
2156
+ supportsAudio?: boolean | undefined;
2157
+ } | undefined;
2158
+ } | undefined;
2159
+ }[];
2160
+ updatedAt?: string | undefined;
2161
+ };
2162
+ }>;
2163
+ /** List available chat models. */
2164
+ chatModels(): Promise<{
2165
+ success: false;
2166
+ message: string;
2167
+ code?: string | undefined;
2168
+ } | {
2169
+ success: true;
2170
+ data: {
2171
+ data: {
2172
+ id: string;
2173
+ provider: string;
2174
+ displayName: string;
2175
+ tags: string[];
2176
+ familyId?: string | undefined;
2177
+ capabilities?: {
2178
+ common?: {
2179
+ maxContextK?: number | undefined;
2180
+ supportsStructuredOutput?: boolean | undefined;
2181
+ supportsWebSearch?: boolean | undefined;
2182
+ } | undefined;
2183
+ params?: {
2184
+ features?: string[] | undefined;
2185
+ fields?: {
2186
+ key: string;
2187
+ title: string;
2188
+ type: "number" | "boolean" | "text" | "select";
2189
+ request: boolean;
2190
+ description?: string | undefined;
2191
+ unit?: string | undefined;
2192
+ values?: (string | number | boolean)[] | undefined;
2193
+ min?: number | undefined;
2194
+ max?: number | undefined;
2195
+ step?: number | undefined;
2196
+ default?: string | number | boolean | undefined;
2197
+ }[] | undefined;
2198
+ } | undefined;
2199
+ input?: {
2200
+ maxImages?: number | undefined;
2201
+ supportsMask?: boolean | undefined;
2202
+ supportsReferenceVideo?: boolean | undefined;
2203
+ supportsStartEnd?: boolean | undefined;
2204
+ } | undefined;
2205
+ output?: {
2206
+ supportsMulti?: boolean | undefined;
2207
+ supportsAudio?: boolean | undefined;
2208
+ } | undefined;
2209
+ } | undefined;
2210
+ }[];
2211
+ updatedAt?: string | undefined;
2212
+ };
2213
+ }>;
2214
+ /** Fetch aggregated updatedAt timestamps for chat/image/video models. */
2215
+ modelsUpdatedAt(): Promise<{
2216
+ success: false;
2217
+ message: string;
2218
+ code?: string | undefined;
2219
+ } | {
2220
+ success: true;
2221
+ data: {
2222
+ chatUpdatedAt: string;
2223
+ imageUpdatedAt: string;
2224
+ videoUpdatedAt: string;
2225
+ latestUpdatedAt: string;
2226
+ };
2227
+ }>;
2228
+ /** Fetch provider templates (public, no auth required). */
2229
+ providerTemplates(): Promise<{
2230
+ success: false;
2231
+ message: string;
2232
+ code?: string | undefined;
2233
+ } | {
2234
+ success: true;
2235
+ data: {
2236
+ providers: {
2237
+ id: string;
2238
+ label: string;
2239
+ adapter: string;
2240
+ models: {
2241
+ id: string;
2242
+ providerId: string;
2243
+ tags: string[];
2244
+ displayName?: string | null | undefined;
2245
+ description?: string | null | undefined;
2246
+ familyId?: string | undefined;
2247
+ capabilities?: {
2248
+ common?: {
2249
+ maxContextK?: number | undefined;
2250
+ supportsStructuredOutput?: boolean | undefined;
2251
+ supportsWebSearch?: boolean | undefined;
2252
+ } | undefined;
2253
+ params?: {
2254
+ features?: string[] | undefined;
2255
+ fields?: {
2256
+ key: string;
2257
+ title: string;
2258
+ type: "number" | "boolean" | "text" | "select";
2259
+ request: boolean;
2260
+ description?: string | undefined;
2261
+ unit?: string | undefined;
2262
+ values?: (string | number | boolean)[] | undefined;
2263
+ min?: number | undefined;
2264
+ max?: number | undefined;
2265
+ step?: number | undefined;
2266
+ default?: string | number | boolean | undefined;
2267
+ }[] | undefined;
2268
+ } | undefined;
2269
+ input?: {
2270
+ maxImages?: number | undefined;
2271
+ supportsMask?: boolean | undefined;
2272
+ supportsReferenceVideo?: boolean | undefined;
2273
+ supportsStartEnd?: boolean | undefined;
2274
+ } | undefined;
2275
+ output?: {
2276
+ supportsMulti?: boolean | undefined;
2277
+ supportsAudio?: boolean | undefined;
2278
+ } | undefined;
2279
+ } | undefined;
2280
+ }[];
2281
+ apiUrl?: string | undefined;
2282
+ authType?: string | undefined;
2283
+ websiteUrl?: string | null | undefined;
2284
+ docUrl?: string | null | undefined;
2285
+ }[];
2286
+ updatedAt?: string | undefined;
2287
+ };
2288
+ }>;
2289
+ }
2290
+
2291
+ declare const AI_MODEL_TAGS: readonly ["image_generation", "image_multi_input", "image_input", "image_multi_generation", "image_edit", "video_generation", "chat", "reasoning", "tool_call", "image_analysis", "video_analysis", "audio_analysis", "code"];
2292
+ type AiModelTag = (typeof AI_MODEL_TAGS)[number];
2293
+ declare const AI_MODEL_TAG_LABELS: Record<AiModelTag, string>;
2294
+ declare const AI_MODEL_CAPABILITY_INPUT_KEYS: readonly ["maxImages", "supportsMask", "supportsReferenceVideo", "supportsStartEnd"];
2295
+ type AiModelCapabilityInputKey = (typeof AI_MODEL_CAPABILITY_INPUT_KEYS)[number];
2296
+ declare const AI_MODEL_CAPABILITY_OUTPUT_KEYS: readonly ["supportsMulti", "supportsAudio"];
2297
+ type AiModelCapabilityOutputKey = (typeof AI_MODEL_CAPABILITY_OUTPUT_KEYS)[number];
2298
+
2299
+ declare const index$4_AI_MODEL_CAPABILITY_INPUT_KEYS: typeof AI_MODEL_CAPABILITY_INPUT_KEYS;
2300
+ declare const index$4_AI_MODEL_CAPABILITY_OUTPUT_KEYS: typeof AI_MODEL_CAPABILITY_OUTPUT_KEYS;
2301
+ declare const index$4_AI_MODEL_TAGS: typeof AI_MODEL_TAGS;
2302
+ declare const index$4_AI_MODEL_TAG_LABELS: typeof AI_MODEL_TAG_LABELS;
2303
+ type index$4_AiChatModel = AiChatModel;
2304
+ type index$4_AiChatModelsResponse = AiChatModelsResponse;
2305
+ type index$4_AiClient = AiClient;
2306
+ declare const index$4_AiClient: typeof AiClient;
2307
+ type index$4_AiImageInputs = AiImageInputs;
2308
+ type index$4_AiImageOutput = AiImageOutput;
2309
+ type index$4_AiImageRequest = AiImageRequest;
2310
+ type index$4_AiMediaInput = AiMediaInput;
2311
+ type index$4_AiModel = AiModel;
2312
+ type index$4_AiModelCapabilities = AiModelCapabilities;
2313
+ type index$4_AiModelCapabilitiesInput = AiModelCapabilitiesInput;
2314
+ type index$4_AiModelCapabilitiesOutput = AiModelCapabilitiesOutput;
2315
+ type index$4_AiModelCapabilityInputKey = AiModelCapabilityInputKey;
2316
+ type index$4_AiModelCapabilityOutputKey = AiModelCapabilityOutputKey;
2317
+ type index$4_AiModelTag = AiModelTag;
2318
+ type index$4_AiModelsResponse = AiModelsResponse;
2319
+ type index$4_AiModelsUpdatedAtData = AiModelsUpdatedAtData;
2320
+ type index$4_AiModelsUpdatedAtResponse = AiModelsUpdatedAtResponse;
2321
+ type index$4_AiProviderTemplate = AiProviderTemplate;
2322
+ type index$4_AiProviderTemplateModel = AiProviderTemplateModel;
2323
+ type index$4_AiProviderTemplatesResponse = AiProviderTemplatesResponse;
2324
+ type index$4_AiTaskCancelResponse = AiTaskCancelResponse;
2325
+ type index$4_AiTaskCreatedResponse = AiTaskCreatedResponse;
2326
+ type index$4_AiTaskResponse = AiTaskResponse;
2327
+ type index$4_AiVideoInputs = AiVideoInputs;
2328
+ type index$4_AiVideoOutput = AiVideoOutput;
2329
+ type index$4_AiVideoRequest = AiVideoRequest;
2330
+ declare const index$4_aiChatModelSchema: typeof aiChatModelSchema;
2331
+ declare const index$4_aiChatModelsPayloadSchema: typeof aiChatModelsPayloadSchema;
2332
+ declare const index$4_aiChatModelsResponseSchema: typeof aiChatModelsResponseSchema;
2333
+ declare const index$4_aiChatModelsSuccessSchema: typeof aiChatModelsSuccessSchema;
2334
+ declare const index$4_aiEndpoints: typeof aiEndpoints;
2335
+ declare const index$4_aiErrorResponseSchema: typeof aiErrorResponseSchema;
2336
+ declare const index$4_aiImageInputsSchema: typeof aiImageInputsSchema;
2337
+ declare const index$4_aiImageOutputSchema: typeof aiImageOutputSchema;
2338
+ declare const index$4_aiImageRequestSchema: typeof aiImageRequestSchema;
2339
+ declare const index$4_aiMediaInputSchema: typeof aiMediaInputSchema;
2340
+ declare const index$4_aiModelCapabilitiesInputSchema: typeof aiModelCapabilitiesInputSchema;
2341
+ declare const index$4_aiModelCapabilitiesOutputSchema: typeof aiModelCapabilitiesOutputSchema;
2342
+ declare const index$4_aiModelCapabilitiesSchema: typeof aiModelCapabilitiesSchema;
2343
+ declare const index$4_aiModelCapabilityCommonSchema: typeof aiModelCapabilityCommonSchema;
2344
+ declare const index$4_aiModelParameterFieldSchema: typeof aiModelParameterFieldSchema;
2345
+ declare const index$4_aiModelParamsSchema: typeof aiModelParamsSchema;
2346
+ declare const index$4_aiModelSchema: typeof aiModelSchema;
2347
+ declare const index$4_aiModelsPayloadSchema: typeof aiModelsPayloadSchema;
2348
+ declare const index$4_aiModelsRequestSchema: typeof aiModelsRequestSchema;
2349
+ declare const index$4_aiModelsResponseSchema: typeof aiModelsResponseSchema;
2350
+ declare const index$4_aiModelsSuccessSchema: typeof aiModelsSuccessSchema;
2351
+ declare const index$4_aiModelsUpdatedAtDataSchema: typeof aiModelsUpdatedAtDataSchema;
2352
+ declare const index$4_aiModelsUpdatedAtResponseSchema: typeof aiModelsUpdatedAtResponseSchema;
2353
+ declare const index$4_aiModelsUpdatedAtSuccessSchema: typeof aiModelsUpdatedAtSuccessSchema;
2354
+ declare const index$4_aiProviderTemplateModelSchema: typeof aiProviderTemplateModelSchema;
2355
+ declare const index$4_aiProviderTemplateSchema: typeof aiProviderTemplateSchema;
2356
+ declare const index$4_aiProviderTemplatesPayloadSchema: typeof aiProviderTemplatesPayloadSchema;
2357
+ declare const index$4_aiProviderTemplatesRequestSchema: typeof aiProviderTemplatesRequestSchema;
2358
+ declare const index$4_aiProviderTemplatesResponseSchema: typeof aiProviderTemplatesResponseSchema;
2359
+ declare const index$4_aiProviderTemplatesSuccessSchema: typeof aiProviderTemplatesSuccessSchema;
2360
+ declare const index$4_aiTaskCancelDataSchema: typeof aiTaskCancelDataSchema;
2361
+ declare const index$4_aiTaskCancelRequestSchema: typeof aiTaskCancelRequestSchema;
2362
+ declare const index$4_aiTaskCancelResponseSchema: typeof aiTaskCancelResponseSchema;
2363
+ declare const index$4_aiTaskCancelSuccessSchema: typeof aiTaskCancelSuccessSchema;
2364
+ declare const index$4_aiTaskCreatedDataSchema: typeof aiTaskCreatedDataSchema;
2365
+ declare const index$4_aiTaskCreatedResponseSchema: typeof aiTaskCreatedResponseSchema;
2366
+ declare const index$4_aiTaskCreatedSuccessSchema: typeof aiTaskCreatedSuccessSchema;
2367
+ declare const index$4_aiTaskDataSchema: typeof aiTaskDataSchema;
2368
+ declare const index$4_aiTaskErrorSchema: typeof aiTaskErrorSchema;
2369
+ declare const index$4_aiTaskRequestSchema: typeof aiTaskRequestSchema;
2370
+ declare const index$4_aiTaskResponseSchema: typeof aiTaskResponseSchema;
2371
+ declare const index$4_aiTaskResultTypeSchema: typeof aiTaskResultTypeSchema;
2372
+ declare const index$4_aiTaskStatusSchema: typeof aiTaskStatusSchema;
2373
+ declare const index$4_aiTaskSuccessSchema: typeof aiTaskSuccessSchema;
2374
+ declare const index$4_aiVideoInputsSchema: typeof aiVideoInputsSchema;
2375
+ declare const index$4_aiVideoOutputSchema: typeof aiVideoOutputSchema;
2376
+ declare const index$4_aiVideoRequestSchema: typeof aiVideoRequestSchema;
2377
+ declare namespace index$4 {
2378
+ export { index$4_AI_MODEL_CAPABILITY_INPUT_KEYS as AI_MODEL_CAPABILITY_INPUT_KEYS, index$4_AI_MODEL_CAPABILITY_OUTPUT_KEYS as AI_MODEL_CAPABILITY_OUTPUT_KEYS, index$4_AI_MODEL_TAGS as AI_MODEL_TAGS, index$4_AI_MODEL_TAG_LABELS as AI_MODEL_TAG_LABELS, type index$4_AiChatModel as AiChatModel, type index$4_AiChatModelsResponse as AiChatModelsResponse, index$4_AiClient as AiClient, type index$4_AiImageInputs as AiImageInputs, type index$4_AiImageOutput as AiImageOutput, type index$4_AiImageRequest as AiImageRequest, type index$4_AiMediaInput as AiMediaInput, type index$4_AiModel as AiModel, type index$4_AiModelCapabilities as AiModelCapabilities, type index$4_AiModelCapabilitiesInput as AiModelCapabilitiesInput, type index$4_AiModelCapabilitiesOutput as AiModelCapabilitiesOutput, type index$4_AiModelCapabilityInputKey as AiModelCapabilityInputKey, type index$4_AiModelCapabilityOutputKey as AiModelCapabilityOutputKey, type index$4_AiModelTag as AiModelTag, type index$4_AiModelsResponse as AiModelsResponse, type index$4_AiModelsUpdatedAtData as AiModelsUpdatedAtData, type index$4_AiModelsUpdatedAtResponse as AiModelsUpdatedAtResponse, type index$4_AiProviderTemplate as AiProviderTemplate, type index$4_AiProviderTemplateModel as AiProviderTemplateModel, type index$4_AiProviderTemplatesResponse as AiProviderTemplatesResponse, type index$4_AiTaskCancelResponse as AiTaskCancelResponse, type index$4_AiTaskCreatedResponse as AiTaskCreatedResponse, type index$4_AiTaskResponse as AiTaskResponse, type index$4_AiVideoInputs as AiVideoInputs, type index$4_AiVideoOutput as AiVideoOutput, type index$4_AiVideoRequest as AiVideoRequest, index$4_aiChatModelSchema as aiChatModelSchema, index$4_aiChatModelsPayloadSchema as aiChatModelsPayloadSchema, index$4_aiChatModelsResponseSchema as aiChatModelsResponseSchema, index$4_aiChatModelsSuccessSchema as aiChatModelsSuccessSchema, index$4_aiEndpoints as aiEndpoints, index$4_aiErrorResponseSchema as aiErrorResponseSchema, index$4_aiImageInputsSchema as aiImageInputsSchema, index$4_aiImageOutputSchema as aiImageOutputSchema, index$4_aiImageRequestSchema as aiImageRequestSchema, index$4_aiMediaInputSchema as aiMediaInputSchema, index$4_aiModelCapabilitiesInputSchema as aiModelCapabilitiesInputSchema, index$4_aiModelCapabilitiesOutputSchema as aiModelCapabilitiesOutputSchema, index$4_aiModelCapabilitiesSchema as aiModelCapabilitiesSchema, index$4_aiModelCapabilityCommonSchema as aiModelCapabilityCommonSchema, index$4_aiModelParameterFieldSchema as aiModelParameterFieldSchema, index$4_aiModelParamsSchema as aiModelParamsSchema, index$4_aiModelSchema as aiModelSchema, index$4_aiModelsPayloadSchema as aiModelsPayloadSchema, index$4_aiModelsRequestSchema as aiModelsRequestSchema, index$4_aiModelsResponseSchema as aiModelsResponseSchema, index$4_aiModelsSuccessSchema as aiModelsSuccessSchema, index$4_aiModelsUpdatedAtDataSchema as aiModelsUpdatedAtDataSchema, index$4_aiModelsUpdatedAtResponseSchema as aiModelsUpdatedAtResponseSchema, index$4_aiModelsUpdatedAtSuccessSchema as aiModelsUpdatedAtSuccessSchema, index$4_aiProviderTemplateModelSchema as aiProviderTemplateModelSchema, index$4_aiProviderTemplateSchema as aiProviderTemplateSchema, index$4_aiProviderTemplatesPayloadSchema as aiProviderTemplatesPayloadSchema, index$4_aiProviderTemplatesRequestSchema as aiProviderTemplatesRequestSchema, index$4_aiProviderTemplatesResponseSchema as aiProviderTemplatesResponseSchema, index$4_aiProviderTemplatesSuccessSchema as aiProviderTemplatesSuccessSchema, index$4_aiTaskCancelDataSchema as aiTaskCancelDataSchema, index$4_aiTaskCancelRequestSchema as aiTaskCancelRequestSchema, index$4_aiTaskCancelResponseSchema as aiTaskCancelResponseSchema, index$4_aiTaskCancelSuccessSchema as aiTaskCancelSuccessSchema, index$4_aiTaskCreatedDataSchema as aiTaskCreatedDataSchema, index$4_aiTaskCreatedResponseSchema as aiTaskCreatedResponseSchema, index$4_aiTaskCreatedSuccessSchema as aiTaskCreatedSuccessSchema, index$4_aiTaskDataSchema as aiTaskDataSchema, index$4_aiTaskErrorSchema as aiTaskErrorSchema, index$4_aiTaskRequestSchema as aiTaskRequestSchema, index$4_aiTaskResponseSchema as aiTaskResponseSchema, index$4_aiTaskResultTypeSchema as aiTaskResultTypeSchema, index$4_aiTaskStatusSchema as aiTaskStatusSchema, index$4_aiTaskSuccessSchema as aiTaskSuccessSchema, index$4_aiVideoInputsSchema as aiVideoInputsSchema, index$4_aiVideoOutputSchema as aiVideoOutputSchema, index$4_aiVideoRequestSchema as aiVideoRequestSchema };
2379
+ }
2380
+
2381
+ declare const aiToolsEndpoints: {
2382
+ readonly analyzeSkills: Endpoint<{
2383
+ skills: {
2384
+ name: string;
2385
+ description?: string | undefined;
2386
+ }[];
2387
+ }, {
2388
+ success: true;
2389
+ data: {
2390
+ skills: {
2391
+ name: string;
2392
+ translatedName: string;
2393
+ translatedDescription: string;
2394
+ category: string;
2395
+ icon: string;
2396
+ }[];
2397
+ };
2398
+ } | {
2399
+ success: false;
2400
+ message: string;
2401
+ }>;
2402
+ readonly recommendActions: Endpoint<{
2403
+ text: string;
2404
+ scene: string;
2405
+ }, {
2406
+ success: true;
2407
+ data: {
2408
+ actions: {
2409
+ label: string;
2410
+ description: string;
2411
+ action: string;
2412
+ }[];
2413
+ };
2414
+ } | {
2415
+ success: false;
2416
+ message: string;
2417
+ }>;
2418
+ readonly summarize: Endpoint<{
2419
+ text: string;
2420
+ }, {
2421
+ success: true;
2422
+ data: {
2423
+ summary: string;
2424
+ };
2425
+ } | {
2426
+ success: false;
2427
+ message: string;
2428
+ }>;
2429
+ };
2430
+
2431
+ declare const analyzeSkillsRequestSchema: z.ZodObject<{
2432
+ skills: z.ZodArray<z.ZodObject<{
2433
+ name: z.ZodString;
2434
+ description: z.ZodOptional<z.ZodString>;
2435
+ }, z.core.$strip>>;
2436
+ }, z.core.$strip>;
2437
+ declare const analyzeSkillsResponseSchema: z.ZodUnion<readonly [z.ZodObject<{
2438
+ success: z.ZodLiteral<true>;
2439
+ data: z.ZodObject<{
2440
+ skills: z.ZodArray<z.ZodObject<{
2441
+ name: z.ZodString;
2442
+ translatedName: z.ZodString;
2443
+ translatedDescription: z.ZodString;
2444
+ category: z.ZodString;
2445
+ icon: z.ZodString;
2446
+ }, z.core.$strip>>;
2447
+ }, z.core.$strip>;
2448
+ }, z.core.$strip>, z.ZodObject<{
2449
+ success: z.ZodLiteral<false>;
2450
+ message: z.ZodString;
2451
+ }, z.core.$strip>]>;
2452
+ declare const recommendActionsRequestSchema: z.ZodObject<{
2453
+ text: z.ZodString;
2454
+ scene: z.ZodString;
2455
+ }, z.core.$strip>;
2456
+ declare const recommendActionsResponseSchema: z.ZodUnion<readonly [z.ZodObject<{
2457
+ success: z.ZodLiteral<true>;
2458
+ data: z.ZodObject<{
2459
+ actions: z.ZodArray<z.ZodObject<{
2460
+ label: z.ZodString;
2461
+ description: z.ZodString;
2462
+ action: z.ZodString;
2463
+ }, z.core.$strip>>;
2464
+ }, z.core.$strip>;
2465
+ }, z.core.$strip>, z.ZodObject<{
2466
+ success: z.ZodLiteral<false>;
2467
+ message: z.ZodString;
2468
+ }, z.core.$strip>]>;
2469
+ declare const summarizeRequestSchema: z.ZodObject<{
2470
+ text: z.ZodString;
2471
+ }, z.core.$strip>;
2472
+ declare const summarizeResponseSchema: z.ZodUnion<readonly [z.ZodObject<{
2473
+ success: z.ZodLiteral<true>;
2474
+ data: z.ZodObject<{
2475
+ summary: z.ZodString;
2476
+ }, z.core.$strip>;
2477
+ }, z.core.$strip>, z.ZodObject<{
2478
+ success: z.ZodLiteral<false>;
2479
+ message: z.ZodString;
2480
+ }, z.core.$strip>]>;
2481
+ type AnalyzeSkillsRequest = z.infer<typeof analyzeSkillsRequestSchema>;
2482
+ type AnalyzeSkillsResponse = z.infer<typeof analyzeSkillsResponseSchema>;
2483
+ type RecommendActionsRequest = z.infer<typeof recommendActionsRequestSchema>;
2484
+ type RecommendActionsResponse = z.infer<typeof recommendActionsResponseSchema>;
2485
+ type SummarizeRequest = z.infer<typeof summarizeRequestSchema>;
2486
+ type SummarizeResponse = z.infer<typeof summarizeResponseSchema>;
2487
+
2488
+ type AiToolsSdkHost = SdkHost<{
2489
+ aiTools: typeof aiToolsEndpoints;
2490
+ }>;
2491
+ declare class AiToolsClient {
2492
+ /** SDK host used for ai-tools requests. */
2493
+ private readonly sdk;
2494
+ /** Create AI tools client. */
2495
+ constructor(sdk: AiToolsSdkHost);
2496
+ /** Analyze a list of skills. */
2497
+ analyzeSkills(payload: AnalyzeSkillsRequest): Promise<{
2498
+ success: true;
2499
+ data: {
2500
+ skills: {
2501
+ name: string;
2502
+ translatedName: string;
2503
+ translatedDescription: string;
2504
+ category: string;
2505
+ icon: string;
2506
+ }[];
2507
+ };
2508
+ } | {
2509
+ success: false;
2510
+ message: string;
2511
+ }>;
2512
+ /** Recommend next actions based on text and scene. */
2513
+ recommendActions(payload: RecommendActionsRequest): Promise<{
2514
+ success: true;
2515
+ data: {
2516
+ actions: {
2517
+ label: string;
2518
+ description: string;
2519
+ action: string;
2520
+ }[];
2521
+ };
2522
+ } | {
2523
+ success: false;
2524
+ message: string;
2525
+ }>;
2526
+ /** Summarize text content. */
2527
+ summarize(payload: SummarizeRequest): Promise<{
2528
+ success: true;
2529
+ data: {
2530
+ summary: string;
2531
+ };
2532
+ } | {
2533
+ success: false;
2534
+ message: string;
2535
+ }>;
2536
+ }
2537
+
2538
+ type index$3_AiToolsClient = AiToolsClient;
2539
+ declare const index$3_AiToolsClient: typeof AiToolsClient;
2540
+ type index$3_AnalyzeSkillsRequest = AnalyzeSkillsRequest;
2541
+ type index$3_AnalyzeSkillsResponse = AnalyzeSkillsResponse;
2542
+ type index$3_RecommendActionsRequest = RecommendActionsRequest;
2543
+ type index$3_RecommendActionsResponse = RecommendActionsResponse;
2544
+ type index$3_SummarizeRequest = SummarizeRequest;
2545
+ type index$3_SummarizeResponse = SummarizeResponse;
2546
+ declare const index$3_aiToolsEndpoints: typeof aiToolsEndpoints;
2547
+ declare const index$3_analyzeSkillsRequestSchema: typeof analyzeSkillsRequestSchema;
2548
+ declare const index$3_analyzeSkillsResponseSchema: typeof analyzeSkillsResponseSchema;
2549
+ declare const index$3_recommendActionsRequestSchema: typeof recommendActionsRequestSchema;
2550
+ declare const index$3_recommendActionsResponseSchema: typeof recommendActionsResponseSchema;
2551
+ declare const index$3_summarizeRequestSchema: typeof summarizeRequestSchema;
2552
+ declare const index$3_summarizeResponseSchema: typeof summarizeResponseSchema;
2553
+ declare namespace index$3 {
2554
+ export { index$3_AiToolsClient as AiToolsClient, type index$3_AnalyzeSkillsRequest as AnalyzeSkillsRequest, type index$3_AnalyzeSkillsResponse as AnalyzeSkillsResponse, type index$3_RecommendActionsRequest as RecommendActionsRequest, type index$3_RecommendActionsResponse as RecommendActionsResponse, type index$3_SummarizeRequest as SummarizeRequest, type index$3_SummarizeResponse as SummarizeResponse, index$3_aiToolsEndpoints as aiToolsEndpoints, index$3_analyzeSkillsRequestSchema as analyzeSkillsRequestSchema, index$3_analyzeSkillsResponseSchema as analyzeSkillsResponseSchema, index$3_recommendActionsRequestSchema as recommendActionsRequestSchema, index$3_recommendActionsResponseSchema as recommendActionsResponseSchema, index$3_summarizeRequestSchema as summarizeRequestSchema, index$3_summarizeResponseSchema as summarizeResponseSchema };
2555
+ }
2556
+
2557
+ declare const authEndpoints: {
2558
+ readonly exchange: Endpoint<{
2559
+ loginCode: string;
2560
+ }, {
2561
+ accessToken: string;
2562
+ refreshToken: string;
2563
+ user: {
2564
+ name?: string | undefined;
2565
+ email?: string | undefined;
2566
+ avatarUrl?: string | undefined;
2567
+ };
2568
+ }>;
2569
+ readonly refresh: Endpoint<{
2570
+ refreshToken: string;
2571
+ }, {
2572
+ accessToken: string;
2573
+ refreshToken: string;
2574
+ user: {
2575
+ name?: string | undefined;
2576
+ email?: string | undefined;
2577
+ avatarUrl?: string | undefined;
2578
+ };
2579
+ } | {
2580
+ message: string;
2581
+ }>;
2582
+ readonly logout: Endpoint<{
2583
+ refreshToken: string;
2584
+ }, {
2585
+ success: boolean;
2586
+ }>;
2587
+ };
2588
+
2589
+ type AuthSdkHost = SdkHost<{
2590
+ auth: typeof authEndpoints;
2591
+ }>;
2592
+ declare class AuthClient {
2593
+ /** SDK host used for auth requests. */
2594
+ private readonly sdk;
2595
+ /** Create auth client. */
2596
+ constructor(sdk: AuthSdkHost);
2597
+ /** Exchange login code for access/refresh tokens. */
2598
+ exchange(loginCode: string): Promise<{
2599
+ accessToken: string;
2600
+ refreshToken: string;
2601
+ user: {
2602
+ name?: string | undefined;
2603
+ email?: string | undefined;
2604
+ avatarUrl?: string | undefined;
2605
+ };
2606
+ }>;
2607
+ /** Refresh access token with refresh token. */
2608
+ refresh(refreshToken: string): Promise<{
2609
+ accessToken: string;
2610
+ refreshToken: string;
2611
+ user: {
2612
+ name?: string | undefined;
2613
+ email?: string | undefined;
2614
+ avatarUrl?: string | undefined;
2615
+ };
2616
+ } | {
2617
+ message: string;
2618
+ }>;
2619
+ /** Logout and revoke refresh token. */
2620
+ logout(refreshToken: string): Promise<{
2621
+ success: boolean;
2622
+ }>;
2623
+ }
2624
+
2625
+ declare const authRefreshRequestSchema: z.ZodObject<{
2626
+ refreshToken: z.ZodString;
2627
+ }, z.core.$strip>;
2628
+ declare const authExchangeRequestSchema: z.ZodObject<{
2629
+ loginCode: z.ZodString;
2630
+ }, z.core.$strip>;
2631
+ declare const authRefreshUserSchema: z.ZodObject<{
2632
+ name: z.ZodOptional<z.ZodString>;
2633
+ email: z.ZodOptional<z.ZodString>;
2634
+ avatarUrl: z.ZodOptional<z.ZodString>;
2635
+ }, z.core.$strip>;
2636
+ declare const authRefreshSuccessSchema: z.ZodObject<{
2637
+ accessToken: z.ZodString;
2638
+ refreshToken: z.ZodString;
2639
+ user: z.ZodObject<{
2640
+ name: z.ZodOptional<z.ZodString>;
2641
+ email: z.ZodOptional<z.ZodString>;
2642
+ avatarUrl: z.ZodOptional<z.ZodString>;
2643
+ }, z.core.$strip>;
2644
+ }, z.core.$strip>;
2645
+ declare const authRefreshErrorSchema: z.ZodObject<{
2646
+ message: z.ZodString;
2647
+ }, z.core.$strip>;
2648
+ declare const authExchangeResponseSchema: z.ZodObject<{
2649
+ accessToken: z.ZodString;
2650
+ refreshToken: z.ZodString;
2651
+ user: z.ZodObject<{
2652
+ name: z.ZodOptional<z.ZodString>;
2653
+ email: z.ZodOptional<z.ZodString>;
2654
+ avatarUrl: z.ZodOptional<z.ZodString>;
2655
+ }, z.core.$strip>;
2656
+ }, z.core.$strip>;
2657
+ declare const authLogoutRequestSchema: z.ZodObject<{
2658
+ refreshToken: z.ZodString;
2659
+ }, z.core.$strip>;
2660
+ declare const authLogoutResponseSchema: z.ZodObject<{
2661
+ success: z.ZodBoolean;
2662
+ }, z.core.$strip>;
2663
+ declare const authRefreshResponseSchema: z.ZodUnion<readonly [z.ZodObject<{
2664
+ accessToken: z.ZodString;
2665
+ refreshToken: z.ZodString;
2666
+ user: z.ZodObject<{
2667
+ name: z.ZodOptional<z.ZodString>;
2668
+ email: z.ZodOptional<z.ZodString>;
2669
+ avatarUrl: z.ZodOptional<z.ZodString>;
2670
+ }, z.core.$strip>;
2671
+ }, z.core.$strip>, z.ZodObject<{
2672
+ message: z.ZodString;
2673
+ }, z.core.$strip>]>;
2674
+ type AuthRefreshRequest = z.infer<typeof authRefreshRequestSchema>;
2675
+ type AuthRefreshResponse = z.infer<typeof authRefreshResponseSchema>;
2676
+ type AuthRefreshSuccess = z.infer<typeof authRefreshSuccessSchema>;
2677
+ type AuthRefreshError = z.infer<typeof authRefreshErrorSchema>;
2678
+ type AuthExchangeRequest = z.infer<typeof authExchangeRequestSchema>;
2679
+ type AuthExchangeResponse = z.infer<typeof authExchangeResponseSchema>;
2680
+ type AuthLogoutRequest = z.infer<typeof authLogoutRequestSchema>;
2681
+ type AuthLogoutResponse = z.infer<typeof authLogoutResponseSchema>;
2682
+
2683
+ type index$2_AuthClient = AuthClient;
2684
+ declare const index$2_AuthClient: typeof AuthClient;
2685
+ type index$2_AuthExchangeRequest = AuthExchangeRequest;
2686
+ type index$2_AuthExchangeResponse = AuthExchangeResponse;
2687
+ type index$2_AuthLogoutRequest = AuthLogoutRequest;
2688
+ type index$2_AuthLogoutResponse = AuthLogoutResponse;
2689
+ type index$2_AuthRefreshError = AuthRefreshError;
2690
+ type index$2_AuthRefreshRequest = AuthRefreshRequest;
2691
+ type index$2_AuthRefreshResponse = AuthRefreshResponse;
2692
+ type index$2_AuthRefreshSuccess = AuthRefreshSuccess;
2693
+ declare const index$2_authEndpoints: typeof authEndpoints;
2694
+ declare const index$2_authExchangeRequestSchema: typeof authExchangeRequestSchema;
2695
+ declare const index$2_authExchangeResponseSchema: typeof authExchangeResponseSchema;
2696
+ declare const index$2_authLogoutRequestSchema: typeof authLogoutRequestSchema;
2697
+ declare const index$2_authLogoutResponseSchema: typeof authLogoutResponseSchema;
2698
+ declare const index$2_authRefreshErrorSchema: typeof authRefreshErrorSchema;
2699
+ declare const index$2_authRefreshRequestSchema: typeof authRefreshRequestSchema;
2700
+ declare const index$2_authRefreshResponseSchema: typeof authRefreshResponseSchema;
2701
+ declare const index$2_authRefreshSuccessSchema: typeof authRefreshSuccessSchema;
2702
+ declare const index$2_authRefreshUserSchema: typeof authRefreshUserSchema;
2703
+ declare namespace index$2 {
2704
+ export { index$2_AuthClient as AuthClient, type index$2_AuthExchangeRequest as AuthExchangeRequest, type index$2_AuthExchangeResponse as AuthExchangeResponse, type index$2_AuthLogoutRequest as AuthLogoutRequest, type index$2_AuthLogoutResponse as AuthLogoutResponse, type index$2_AuthRefreshError as AuthRefreshError, type index$2_AuthRefreshRequest as AuthRefreshRequest, type index$2_AuthRefreshResponse as AuthRefreshResponse, type index$2_AuthRefreshSuccess as AuthRefreshSuccess, index$2_authEndpoints as authEndpoints, index$2_authExchangeRequestSchema as authExchangeRequestSchema, index$2_authExchangeResponseSchema as authExchangeResponseSchema, index$2_authLogoutRequestSchema as authLogoutRequestSchema, index$2_authLogoutResponseSchema as authLogoutResponseSchema, index$2_authRefreshErrorSchema as authRefreshErrorSchema, index$2_authRefreshRequestSchema as authRefreshRequestSchema, index$2_authRefreshResponseSchema as authRefreshResponseSchema, index$2_authRefreshSuccessSchema as authRefreshSuccessSchema, index$2_authRefreshUserSchema as authRefreshUserSchema };
2705
+ }
2706
+
2707
+ /** Feedback API endpoints. */
2708
+ declare const feedbackEndpoints: {
2709
+ /** Submit feedback. */
2710
+ readonly submit: Endpoint<{
2711
+ type: "ui" | "performance" | "bug" | "feature" | "other";
2712
+ content: string;
2713
+ context: Record<string, unknown>;
2714
+ source?: "tenas" | "openloaf-saas" | undefined;
2715
+ email?: string | undefined;
2716
+ }, void | {
2717
+ message: string;
2718
+ }>;
2719
+ /** List feedback of current user. */
2720
+ readonly list: Endpoint<{
2721
+ page?: number | undefined;
2722
+ pageSize?: number | undefined;
2723
+ type?: "ui" | "performance" | "bug" | "feature" | "other" | undefined;
2724
+ source?: "tenas" | "openloaf-saas" | undefined;
2725
+ saasStatus?: "unread" | "read" | "resolved" | "ignored" | undefined;
2726
+ keyword?: string | undefined;
2727
+ startAt?: string | undefined;
2728
+ endAt?: string | undefined;
2729
+ }, {
2730
+ message: string;
2731
+ } | {
2732
+ items: {
2733
+ id: string;
2734
+ source: "tenas" | "openloaf-saas";
2735
+ type: "ui" | "performance" | "bug" | "feature" | "other";
2736
+ saasStatus: "unread" | "read" | "resolved" | "ignored";
2737
+ content: string;
2738
+ context: Record<string, unknown>;
2739
+ createdAt: string;
2740
+ response?: string | undefined;
2741
+ userId?: string | undefined;
2742
+ email?: string | undefined;
2743
+ }[];
2744
+ page: number;
2745
+ pageSize: number;
2746
+ total: number;
2747
+ }>;
2748
+ /** Fetch feedback detail by id. */
2749
+ readonly detail: (feedbackId: string) => Endpoint<void, {
2750
+ message: string;
2751
+ } | {
2752
+ feedback: {
2753
+ id: string;
2754
+ source: "tenas" | "openloaf-saas";
2755
+ type: "ui" | "performance" | "bug" | "feature" | "other";
2756
+ saasStatus: "unread" | "read" | "resolved" | "ignored";
2757
+ content: string;
2758
+ context: Record<string, unknown>;
2759
+ createdAt: string;
2760
+ response?: string | undefined;
2761
+ userId?: string | undefined;
2762
+ email?: string | undefined;
2763
+ };
2764
+ }>;
2765
+ };
2766
+
2767
+ /** Feedback source schema. */
2768
+ declare const feedbackSourceSchema: z.ZodEnum<{
2769
+ tenas: "tenas";
2770
+ "openloaf-saas": "openloaf-saas";
2771
+ }>;
2772
+ /** Feedback category schema. */
2773
+ declare const feedbackTypeSchema: z.ZodEnum<{
2774
+ ui: "ui";
2775
+ performance: "performance";
2776
+ bug: "bug";
2777
+ feature: "feature";
2778
+ other: "other";
2779
+ }>;
2780
+ /** Feedback SaaS status schema. */
2781
+ declare const feedbackSaasStatusSchema: z.ZodEnum<{
2782
+ unread: "unread";
2783
+ read: "read";
2784
+ resolved: "resolved";
2785
+ ignored: "ignored";
2786
+ }>;
2787
+ /** Feedback request payload schema. */
2788
+ declare const feedbackSubmitRequestSchema: z.ZodObject<{
2789
+ source: z.ZodOptional<z.ZodEnum<{
2790
+ tenas: "tenas";
2791
+ "openloaf-saas": "openloaf-saas";
2792
+ }>>;
2793
+ type: z.ZodEnum<{
2794
+ ui: "ui";
2795
+ performance: "performance";
2796
+ bug: "bug";
2797
+ feature: "feature";
2798
+ other: "other";
2799
+ }>;
2800
+ content: z.ZodString;
2801
+ context: z.ZodRecord<z.ZodString, z.ZodUnknown>;
2802
+ email: z.ZodOptional<z.ZodString>;
2803
+ }, z.core.$strip>;
2804
+ /** Feedback error response schema. */
2805
+ declare const feedbackSubmitErrorSchema: z.ZodObject<{
2806
+ message: z.ZodString;
2807
+ }, z.core.$strip>;
2808
+ /** Feedback response schema (204 no content or error). */
2809
+ declare const feedbackSubmitResponseSchema: z.ZodUnion<readonly [z.ZodVoid, z.ZodObject<{
2810
+ message: z.ZodString;
2811
+ }, z.core.$strip>]>;
2812
+ /** Feedback list request payload schema. */
2813
+ declare const feedbackListRequestSchema: z.ZodObject<{
2814
+ page: z.ZodOptional<z.ZodNumber>;
2815
+ pageSize: z.ZodOptional<z.ZodNumber>;
2816
+ type: z.ZodOptional<z.ZodEnum<{
2817
+ ui: "ui";
2818
+ performance: "performance";
2819
+ bug: "bug";
2820
+ feature: "feature";
2821
+ other: "other";
2822
+ }>>;
2823
+ source: z.ZodOptional<z.ZodEnum<{
2824
+ tenas: "tenas";
2825
+ "openloaf-saas": "openloaf-saas";
2826
+ }>>;
2827
+ saasStatus: z.ZodOptional<z.ZodEnum<{
2828
+ unread: "unread";
2829
+ read: "read";
2830
+ resolved: "resolved";
2831
+ ignored: "ignored";
2832
+ }>>;
2833
+ keyword: z.ZodOptional<z.ZodString>;
2834
+ startAt: z.ZodOptional<z.ZodString>;
2835
+ endAt: z.ZodOptional<z.ZodString>;
2836
+ }, z.core.$strip>;
2837
+ /** Feedback item payload schema. */
2838
+ declare const feedbackItemSchema: z.ZodObject<{
2839
+ id: z.ZodString;
2840
+ source: z.ZodEnum<{
2841
+ tenas: "tenas";
2842
+ "openloaf-saas": "openloaf-saas";
2843
+ }>;
2844
+ type: z.ZodEnum<{
2845
+ ui: "ui";
2846
+ performance: "performance";
2847
+ bug: "bug";
2848
+ feature: "feature";
2849
+ other: "other";
2850
+ }>;
2851
+ saasStatus: z.ZodEnum<{
2852
+ unread: "unread";
2853
+ read: "read";
2854
+ resolved: "resolved";
2855
+ ignored: "ignored";
2856
+ }>;
2857
+ response: z.ZodOptional<z.ZodString>;
2858
+ userId: z.ZodOptional<z.ZodString>;
2859
+ email: z.ZodOptional<z.ZodString>;
2860
+ content: z.ZodString;
2861
+ context: z.ZodRecord<z.ZodString, z.ZodUnknown>;
2862
+ createdAt: z.ZodString;
2863
+ }, z.core.$strip>;
2864
+ /** Feedback list response payload schema. */
2865
+ declare const feedbackListPayloadSchema: z.ZodObject<{
2866
+ items: z.ZodArray<z.ZodObject<{
2867
+ id: z.ZodString;
2868
+ source: z.ZodEnum<{
2869
+ tenas: "tenas";
2870
+ "openloaf-saas": "openloaf-saas";
2871
+ }>;
2872
+ type: z.ZodEnum<{
2873
+ ui: "ui";
2874
+ performance: "performance";
2875
+ bug: "bug";
2876
+ feature: "feature";
2877
+ other: "other";
2878
+ }>;
2879
+ saasStatus: z.ZodEnum<{
2880
+ unread: "unread";
2881
+ read: "read";
2882
+ resolved: "resolved";
2883
+ ignored: "ignored";
2884
+ }>;
2885
+ response: z.ZodOptional<z.ZodString>;
2886
+ userId: z.ZodOptional<z.ZodString>;
2887
+ email: z.ZodOptional<z.ZodString>;
2888
+ content: z.ZodString;
2889
+ context: z.ZodRecord<z.ZodString, z.ZodUnknown>;
2890
+ createdAt: z.ZodString;
2891
+ }, z.core.$strip>>;
2892
+ page: z.ZodNumber;
2893
+ pageSize: z.ZodNumber;
2894
+ total: z.ZodNumber;
2895
+ }, z.core.$strip>;
2896
+ /** Feedback list response schema. */
2897
+ declare const feedbackListResponseSchema: z.ZodUnion<readonly [z.ZodObject<{
2898
+ items: z.ZodArray<z.ZodObject<{
2899
+ id: z.ZodString;
2900
+ source: z.ZodEnum<{
2901
+ tenas: "tenas";
2902
+ "openloaf-saas": "openloaf-saas";
2903
+ }>;
2904
+ type: z.ZodEnum<{
2905
+ ui: "ui";
2906
+ performance: "performance";
2907
+ bug: "bug";
2908
+ feature: "feature";
2909
+ other: "other";
2910
+ }>;
2911
+ saasStatus: z.ZodEnum<{
2912
+ unread: "unread";
2913
+ read: "read";
2914
+ resolved: "resolved";
2915
+ ignored: "ignored";
2916
+ }>;
2917
+ response: z.ZodOptional<z.ZodString>;
2918
+ userId: z.ZodOptional<z.ZodString>;
2919
+ email: z.ZodOptional<z.ZodString>;
2920
+ content: z.ZodString;
2921
+ context: z.ZodRecord<z.ZodString, z.ZodUnknown>;
2922
+ createdAt: z.ZodString;
2923
+ }, z.core.$strip>>;
2924
+ page: z.ZodNumber;
2925
+ pageSize: z.ZodNumber;
2926
+ total: z.ZodNumber;
2927
+ }, z.core.$strip>, z.ZodObject<{
2928
+ message: z.ZodString;
2929
+ }, z.core.$strip>]>;
2930
+ /** Feedback detail request schema. */
2931
+ declare const feedbackDetailRequestSchema: z.ZodVoid;
2932
+ /** Feedback detail response payload schema. */
2933
+ declare const feedbackDetailPayloadSchema: z.ZodObject<{
2934
+ feedback: z.ZodObject<{
2935
+ id: z.ZodString;
2936
+ source: z.ZodEnum<{
2937
+ tenas: "tenas";
2938
+ "openloaf-saas": "openloaf-saas";
2939
+ }>;
2940
+ type: z.ZodEnum<{
2941
+ ui: "ui";
2942
+ performance: "performance";
2943
+ bug: "bug";
2944
+ feature: "feature";
2945
+ other: "other";
2946
+ }>;
2947
+ saasStatus: z.ZodEnum<{
2948
+ unread: "unread";
2949
+ read: "read";
2950
+ resolved: "resolved";
2951
+ ignored: "ignored";
2952
+ }>;
2953
+ response: z.ZodOptional<z.ZodString>;
2954
+ userId: z.ZodOptional<z.ZodString>;
2955
+ email: z.ZodOptional<z.ZodString>;
2956
+ content: z.ZodString;
2957
+ context: z.ZodRecord<z.ZodString, z.ZodUnknown>;
2958
+ createdAt: z.ZodString;
2959
+ }, z.core.$strip>;
2960
+ }, z.core.$strip>;
2961
+ /** Feedback detail response schema. */
2962
+ declare const feedbackDetailResponseSchema: z.ZodUnion<readonly [z.ZodObject<{
2963
+ feedback: z.ZodObject<{
2964
+ id: z.ZodString;
2965
+ source: z.ZodEnum<{
2966
+ tenas: "tenas";
2967
+ "openloaf-saas": "openloaf-saas";
2968
+ }>;
2969
+ type: z.ZodEnum<{
2970
+ ui: "ui";
2971
+ performance: "performance";
2972
+ bug: "bug";
2973
+ feature: "feature";
2974
+ other: "other";
2975
+ }>;
2976
+ saasStatus: z.ZodEnum<{
2977
+ unread: "unread";
2978
+ read: "read";
2979
+ resolved: "resolved";
2980
+ ignored: "ignored";
2981
+ }>;
2982
+ response: z.ZodOptional<z.ZodString>;
2983
+ userId: z.ZodOptional<z.ZodString>;
2984
+ email: z.ZodOptional<z.ZodString>;
2985
+ content: z.ZodString;
2986
+ context: z.ZodRecord<z.ZodString, z.ZodUnknown>;
2987
+ createdAt: z.ZodString;
2988
+ }, z.core.$strip>;
2989
+ }, z.core.$strip>, z.ZodObject<{
2990
+ message: z.ZodString;
2991
+ }, z.core.$strip>]>;
2992
+ type FeedbackSource = z.infer<typeof feedbackSourceSchema>;
2993
+ type FeedbackType = z.infer<typeof feedbackTypeSchema>;
2994
+ type FeedbackSaasStatus = z.infer<typeof feedbackSaasStatusSchema>;
2995
+ type FeedbackSubmitRequest = z.infer<typeof feedbackSubmitRequestSchema>;
2996
+ type FeedbackSubmitResponse = z.infer<typeof feedbackSubmitResponseSchema>;
2997
+ type FeedbackSubmitError = z.infer<typeof feedbackSubmitErrorSchema>;
2998
+ type FeedbackListRequest = z.infer<typeof feedbackListRequestSchema>;
2999
+ type FeedbackListResponse = z.infer<typeof feedbackListResponseSchema>;
3000
+ type FeedbackListPayload = z.infer<typeof feedbackListPayloadSchema>;
3001
+ type FeedbackDetailRequest = z.infer<typeof feedbackDetailRequestSchema>;
3002
+ type FeedbackDetailResponse = z.infer<typeof feedbackDetailResponseSchema>;
3003
+ type FeedbackDetailPayload = z.infer<typeof feedbackDetailPayloadSchema>;
3004
+
3005
+ type FeedbackSdkHost = SdkHost<{
3006
+ feedback: typeof feedbackEndpoints;
3007
+ }>;
3008
+ declare class FeedbackClient {
3009
+ /** SDK host used for feedback requests. */
3010
+ private readonly sdk;
3011
+ /** Create feedback client. */
3012
+ constructor(sdk: FeedbackSdkHost);
3013
+ /** Submit a feedback record. */
3014
+ submit(payload: FeedbackSubmitRequest): Promise<void | {
3015
+ message: string;
3016
+ }>;
3017
+ /** List feedback records for the current user. */
3018
+ list(payload?: FeedbackListRequest): Promise<FeedbackListResponse>;
3019
+ /** Fetch feedback detail by id. */
3020
+ detail(feedbackId: string): Promise<FeedbackDetailResponse>;
3021
+ }
3022
+
3023
+ type index$1_FeedbackClient = FeedbackClient;
3024
+ declare const index$1_FeedbackClient: typeof FeedbackClient;
3025
+ type index$1_FeedbackDetailPayload = FeedbackDetailPayload;
3026
+ type index$1_FeedbackDetailRequest = FeedbackDetailRequest;
3027
+ type index$1_FeedbackDetailResponse = FeedbackDetailResponse;
3028
+ type index$1_FeedbackListPayload = FeedbackListPayload;
3029
+ type index$1_FeedbackListRequest = FeedbackListRequest;
3030
+ type index$1_FeedbackListResponse = FeedbackListResponse;
3031
+ type index$1_FeedbackSaasStatus = FeedbackSaasStatus;
3032
+ type index$1_FeedbackSource = FeedbackSource;
3033
+ type index$1_FeedbackSubmitError = FeedbackSubmitError;
3034
+ type index$1_FeedbackSubmitRequest = FeedbackSubmitRequest;
3035
+ type index$1_FeedbackSubmitResponse = FeedbackSubmitResponse;
3036
+ type index$1_FeedbackType = FeedbackType;
3037
+ declare const index$1_feedbackDetailPayloadSchema: typeof feedbackDetailPayloadSchema;
3038
+ declare const index$1_feedbackDetailRequestSchema: typeof feedbackDetailRequestSchema;
3039
+ declare const index$1_feedbackDetailResponseSchema: typeof feedbackDetailResponseSchema;
3040
+ declare const index$1_feedbackEndpoints: typeof feedbackEndpoints;
3041
+ declare const index$1_feedbackItemSchema: typeof feedbackItemSchema;
3042
+ declare const index$1_feedbackListPayloadSchema: typeof feedbackListPayloadSchema;
3043
+ declare const index$1_feedbackListRequestSchema: typeof feedbackListRequestSchema;
3044
+ declare const index$1_feedbackListResponseSchema: typeof feedbackListResponseSchema;
3045
+ declare const index$1_feedbackSaasStatusSchema: typeof feedbackSaasStatusSchema;
3046
+ declare const index$1_feedbackSourceSchema: typeof feedbackSourceSchema;
3047
+ declare const index$1_feedbackSubmitErrorSchema: typeof feedbackSubmitErrorSchema;
3048
+ declare const index$1_feedbackSubmitRequestSchema: typeof feedbackSubmitRequestSchema;
3049
+ declare const index$1_feedbackSubmitResponseSchema: typeof feedbackSubmitResponseSchema;
3050
+ declare const index$1_feedbackTypeSchema: typeof feedbackTypeSchema;
3051
+ declare namespace index$1 {
3052
+ export { index$1_FeedbackClient as FeedbackClient, type index$1_FeedbackDetailPayload as FeedbackDetailPayload, type index$1_FeedbackDetailRequest as FeedbackDetailRequest, type index$1_FeedbackDetailResponse as FeedbackDetailResponse, type index$1_FeedbackListPayload as FeedbackListPayload, type index$1_FeedbackListRequest as FeedbackListRequest, type index$1_FeedbackListResponse as FeedbackListResponse, type index$1_FeedbackSaasStatus as FeedbackSaasStatus, type index$1_FeedbackSource as FeedbackSource, type index$1_FeedbackSubmitError as FeedbackSubmitError, type index$1_FeedbackSubmitRequest as FeedbackSubmitRequest, type index$1_FeedbackSubmitResponse as FeedbackSubmitResponse, type index$1_FeedbackType as FeedbackType, index$1_feedbackDetailPayloadSchema as feedbackDetailPayloadSchema, index$1_feedbackDetailRequestSchema as feedbackDetailRequestSchema, index$1_feedbackDetailResponseSchema as feedbackDetailResponseSchema, index$1_feedbackEndpoints as feedbackEndpoints, index$1_feedbackItemSchema as feedbackItemSchema, index$1_feedbackListPayloadSchema as feedbackListPayloadSchema, index$1_feedbackListRequestSchema as feedbackListRequestSchema, index$1_feedbackListResponseSchema as feedbackListResponseSchema, index$1_feedbackSaasStatusSchema as feedbackSaasStatusSchema, index$1_feedbackSourceSchema as feedbackSourceSchema, index$1_feedbackSubmitErrorSchema as feedbackSubmitErrorSchema, index$1_feedbackSubmitRequestSchema as feedbackSubmitRequestSchema, index$1_feedbackSubmitResponseSchema as feedbackSubmitResponseSchema, index$1_feedbackTypeSchema as feedbackTypeSchema };
3053
+ }
3054
+
3055
+ /** User API endpoints. */
3056
+ declare const userEndpoints: {
3057
+ /** Fetch current user profile. */
3058
+ readonly self: Endpoint<void, {
3059
+ user: {
3060
+ id: string;
3061
+ provider: string;
3062
+ membershipLevel: "free" | "vip" | "svip" | "infinity";
3063
+ createdAt: string;
3064
+ updatedAt: string;
3065
+ email?: string | undefined;
3066
+ name?: string | undefined;
3067
+ avatarUrl?: string | undefined;
3068
+ };
3069
+ }>;
3070
+ };
3071
+
3072
+ type UserSdkHost = SdkHost<{
3073
+ user: typeof userEndpoints;
3074
+ }>;
3075
+ declare class UserClient {
3076
+ /** SDK host used for user requests. */
3077
+ private readonly sdk;
3078
+ /** Create user client. */
3079
+ constructor(sdk: UserSdkHost);
3080
+ /** Fetch current user profile. */
3081
+ self(): Promise<{
3082
+ user: {
3083
+ id: string;
3084
+ provider: string;
3085
+ membershipLevel: "free" | "vip" | "svip" | "infinity";
3086
+ createdAt: string;
3087
+ updatedAt: string;
3088
+ email?: string | undefined;
3089
+ name?: string | undefined;
3090
+ avatarUrl?: string | undefined;
3091
+ };
3092
+ }>;
3093
+ }
3094
+
3095
+ /** Membership level enum schema. */
3096
+ declare const userMembershipLevelSchema: z.ZodEnum<{
3097
+ free: "free";
3098
+ vip: "vip";
3099
+ svip: "svip";
3100
+ infinity: "infinity";
3101
+ }>;
3102
+ /** Current user payload schema. */
3103
+ declare const userSelfSchema: z.ZodObject<{
3104
+ id: z.ZodString;
3105
+ email: z.ZodOptional<z.ZodString>;
3106
+ name: z.ZodOptional<z.ZodString>;
3107
+ avatarUrl: z.ZodOptional<z.ZodString>;
3108
+ provider: z.ZodString;
3109
+ membershipLevel: z.ZodEnum<{
3110
+ free: "free";
3111
+ vip: "vip";
3112
+ svip: "svip";
3113
+ infinity: "infinity";
3114
+ }>;
3115
+ createdAt: z.ZodString;
3116
+ updatedAt: z.ZodString;
3117
+ }, z.core.$strip>;
3118
+ /** Request schema for self endpoint. */
3119
+ declare const userSelfRequestSchema: z.ZodVoid;
3120
+ /** Response schema for self endpoint. */
3121
+ declare const userSelfResponseSchema: z.ZodObject<{
3122
+ user: z.ZodObject<{
3123
+ id: z.ZodString;
3124
+ email: z.ZodOptional<z.ZodString>;
3125
+ name: z.ZodOptional<z.ZodString>;
3126
+ avatarUrl: z.ZodOptional<z.ZodString>;
3127
+ provider: z.ZodString;
3128
+ membershipLevel: z.ZodEnum<{
3129
+ free: "free";
3130
+ vip: "vip";
3131
+ svip: "svip";
3132
+ infinity: "infinity";
3133
+ }>;
3134
+ createdAt: z.ZodString;
3135
+ updatedAt: z.ZodString;
3136
+ }, z.core.$strip>;
3137
+ }, z.core.$strip>;
3138
+ /** Membership level type. */
3139
+ type UserMembershipLevel = z.infer<typeof userMembershipLevelSchema>;
3140
+ /** Current user payload type. */
3141
+ type UserSelf = z.infer<typeof userSelfSchema>;
3142
+ /** Request payload type for self endpoint. */
3143
+ type UserSelfRequest = z.infer<typeof userSelfRequestSchema>;
3144
+ /** Response payload type for self endpoint. */
3145
+ type UserSelfResponse = z.infer<typeof userSelfResponseSchema>;
3146
+
3147
+ type index_UserClient = UserClient;
3148
+ declare const index_UserClient: typeof UserClient;
3149
+ type index_UserMembershipLevel = UserMembershipLevel;
3150
+ type index_UserSelf = UserSelf;
3151
+ type index_UserSelfRequest = UserSelfRequest;
3152
+ type index_UserSelfResponse = UserSelfResponse;
3153
+ declare const index_userEndpoints: typeof userEndpoints;
3154
+ declare const index_userMembershipLevelSchema: typeof userMembershipLevelSchema;
3155
+ declare const index_userSelfRequestSchema: typeof userSelfRequestSchema;
3156
+ declare const index_userSelfResponseSchema: typeof userSelfResponseSchema;
3157
+ declare const index_userSelfSchema: typeof userSelfSchema;
3158
+ declare namespace index {
3159
+ export { index_UserClient as UserClient, type index_UserMembershipLevel as UserMembershipLevel, type index_UserSelf as UserSelf, type index_UserSelfRequest as UserSelfRequest, type index_UserSelfResponse as UserSelfResponse, index_userEndpoints as userEndpoints, index_userMembershipLevelSchema as userMembershipLevelSchema, index_userSelfRequestSchema as userSelfRequestSchema, index_userSelfResponseSchema as userSelfResponseSchema, index_userSelfSchema as userSelfSchema };
3160
+ }
3161
+
3162
+ type SaaSClientOptions = Omit<BaseSaaSClientOptions<SaaSContract>, "contract"> & {
3163
+ contract?: SaaSContract;
3164
+ };
3165
+ declare class SaaSClient extends BaseSaaSClient<SaaSContract> {
3166
+ /** Auth-related APIs. */
3167
+ readonly auth: AuthClient;
3168
+ /** AI-related APIs. */
3169
+ readonly ai: AiClient;
3170
+ /** AI tools APIs. */
3171
+ readonly aiTools: AiToolsClient;
3172
+ /** Feedback-related APIs. */
3173
+ readonly feedback: FeedbackClient;
3174
+ /** User-related APIs. */
3175
+ readonly user: UserClient;
3176
+ /** Create a SaaS client with all module access. */
3177
+ constructor(options: SaaSClientOptions);
3178
+ }
3179
+
3180
+ declare class SaaSHttpError extends Error {
3181
+ readonly status: number;
3182
+ readonly statusText: string;
3183
+ readonly payload: unknown;
3184
+ constructor(message: string, options: {
3185
+ status: number;
3186
+ statusText: string;
3187
+ payload?: unknown;
3188
+ });
3189
+ }
3190
+ declare class SaaSSchemaError extends Error {
3191
+ readonly issues: unknown;
3192
+ constructor(message: string, issues: unknown);
3193
+ }
3194
+ declare class SaaSNetworkError extends Error {
3195
+ readonly cause: unknown;
3196
+ constructor(message: string, cause: unknown);
3197
+ }
3198
+
3199
+ declare function request<Req, Res>(fetcher: typeof fetch, endpoint: Endpoint<Req, Res>, options: {
3200
+ baseUrl: string;
3201
+ headers?: HeaderInput;
3202
+ body?: unknown;
3203
+ }): Promise<Res>;
3204
+
3205
+ type TrpcClientOptions = {
3206
+ /** SaaS server base URL (e.g. https://saas.example.com). */
3207
+ baseUrl: string;
3208
+ /** Access token provider for Bearer auth. */
3209
+ getAccessToken?: () => string | Promise<string>;
3210
+ /** Extra headers to send with tRPC requests. */
3211
+ headers?: HeaderInput;
3212
+ };
3213
+ /** Create a tRPC client bound to the SaaS public router. */
3214
+ declare function createTrpcClient(options: TrpcClientOptions): _trpc_client.TRPCClient<_trpc_server.TRPCBuiltRouter<{
3215
+ ctx: Record<string, unknown>;
3216
+ meta: object;
3217
+ errorShape: _trpc_server.TRPCDefaultErrorShape;
3218
+ transformer: false;
3219
+ }, _trpc_server.TRPCDecorateCreateRouterOptions<_trpc_server.TRPCCreateRouterOptions>>>;
3220
+
3221
+ export { AI_MODEL_CAPABILITY_INPUT_KEYS, AI_MODEL_CAPABILITY_OUTPUT_KEYS, AI_MODEL_TAGS, AI_MODEL_TAG_LABELS, type AiChatModel, type AiChatModelsResponse, AiClient, type AiImageInputs, type AiImageOutput, type AiImageRequest, type AiMediaInput, type AiModel, type AiModelCapabilities, type AiModelCapabilitiesInput, type AiModelCapabilitiesOutput, type AiModelCapabilityInputKey, type AiModelCapabilityOutputKey, type AiModelTag, type AiModelsResponse, type AiModelsUpdatedAtData, type AiModelsUpdatedAtResponse, type AiProviderTemplate, type AiProviderTemplateModel, type AiProviderTemplatesResponse, type AiTaskCancelResponse, type AiTaskCreatedResponse, type AiTaskResponse, AiToolsClient, type AiVideoInputs, type AiVideoOutput, type AiVideoRequest, type AnalyzeSkillsRequest, type AnalyzeSkillsResponse, AuthClient, type AuthExchangeRequest, type AuthExchangeResponse, type AuthLogoutRequest, type AuthLogoutResponse, type AuthRefreshError, type AuthRefreshRequest, type AuthRefreshResponse, type AuthRefreshSuccess, Endpoint, FeedbackClient, type FeedbackDetailPayload, type FeedbackDetailRequest, type FeedbackDetailResponse, type FeedbackListPayload, type FeedbackListRequest, type FeedbackListResponse, type FeedbackSaasStatus, type FeedbackSource, type FeedbackSubmitError, type FeedbackSubmitRequest, type FeedbackSubmitResponse, type FeedbackType, type HeaderInput, type HttpMethod, type RecommendActionsRequest, type RecommendActionsResponse, type ResponseType, SaaSClient, type SaaSClientOptions, SaaSContract, SaaSHttpError, SaaSNetworkError, SaaSSchemaError, type SummarizeRequest, type SummarizeResponse, type TrpcClientOptions, UserClient, type UserMembershipLevel, type UserSelf, type UserSelfRequest, type UserSelfResponse, aiChatModelSchema, aiChatModelsPayloadSchema, aiChatModelsResponseSchema, aiChatModelsSuccessSchema, aiEndpoints, aiErrorResponseSchema, aiImageInputsSchema, aiImageOutputSchema, aiImageRequestSchema, aiMediaInputSchema, aiModelCapabilitiesInputSchema, aiModelCapabilitiesOutputSchema, aiModelCapabilitiesSchema, aiModelCapabilityCommonSchema, aiModelParameterFieldSchema, aiModelParamsSchema, aiModelSchema, aiModelsPayloadSchema, aiModelsRequestSchema, aiModelsResponseSchema, aiModelsSuccessSchema, aiModelsUpdatedAtDataSchema, aiModelsUpdatedAtResponseSchema, aiModelsUpdatedAtSuccessSchema, index$4 as aiModule, aiProviderTemplateModelSchema, aiProviderTemplateSchema, aiProviderTemplatesPayloadSchema, aiProviderTemplatesRequestSchema, aiProviderTemplatesResponseSchema, aiProviderTemplatesSuccessSchema, aiTaskCancelDataSchema, aiTaskCancelRequestSchema, aiTaskCancelResponseSchema, aiTaskCancelSuccessSchema, aiTaskCreatedDataSchema, aiTaskCreatedResponseSchema, aiTaskCreatedSuccessSchema, aiTaskDataSchema, aiTaskErrorSchema, aiTaskRequestSchema, aiTaskResponseSchema, aiTaskResultTypeSchema, aiTaskStatusSchema, aiTaskSuccessSchema, aiToolsEndpoints, index$3 as aiToolsModule, aiVideoInputsSchema, aiVideoOutputSchema, aiVideoRequestSchema, analyzeSkillsRequestSchema, analyzeSkillsResponseSchema, authEndpoints, authExchangeRequestSchema, authExchangeResponseSchema, authLogoutRequestSchema, authLogoutResponseSchema, index$2 as authModule, authRefreshErrorSchema, authRefreshRequestSchema, authRefreshResponseSchema, authRefreshSuccessSchema, authRefreshUserSchema, contract, createTrpcClient, feedbackDetailPayloadSchema, feedbackDetailRequestSchema, feedbackDetailResponseSchema, feedbackEndpoints, feedbackItemSchema, feedbackListPayloadSchema, feedbackListRequestSchema, feedbackListResponseSchema, index$1 as feedbackModule, feedbackSaasStatusSchema, feedbackSourceSchema, feedbackSubmitErrorSchema, feedbackSubmitRequestSchema, feedbackSubmitResponseSchema, feedbackTypeSchema, mergeHeaders, normalizeHeaders, recommendActionsRequestSchema, recommendActionsResponseSchema, request, summarizeRequestSchema, summarizeResponseSchema, userEndpoints, userMembershipLevelSchema, index as userModule, userSelfRequestSchema, userSelfResponseSchema, userSelfSchema };