@llmops/core 0.1.9 → 0.2.0-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{bun-sqlite-dialect-BsBCR8hT.cjs → bun-sqlite-dialect-BxlwYxpt.cjs} +1 -1
- package/dist/db/index.cjs +2 -1
- package/dist/db/index.d.cts +2 -2
- package/dist/db/index.d.mts +2 -2
- package/dist/db/index.mjs +2 -2
- package/dist/{db-BokBhuLo.mjs → db-BCHs_i6m.mjs} +1565 -1003
- package/dist/{db-1Ar4ItM_.cjs → db-BdclKAD3.cjs} +1573 -1005
- package/dist/{index-BTE44_Jz.d.mts → index-5GfBoyiq.d.mts} +136 -33
- package/dist/{index-Dn5KseQM.d.cts → index-CV79zoS6.d.cts} +105 -2
- package/dist/index.cjs +97 -25
- package/dist/index.d.cts +628 -892
- package/dist/index.d.mts +628 -892
- package/dist/index.mjs +96 -26
- package/dist/{node-sqlite-dialect-BnUFpWfa.cjs → node-sqlite-dialect-DjW-cdIu.cjs} +1 -1
- package/package.json +2 -2
package/dist/index.d.mts
CHANGED
|
@@ -1,12 +1,51 @@
|
|
|
1
|
-
import { A as
|
|
1
|
+
import { A as SCHEMA_METADATA, B as WorkspaceSettings, C as EnvironmentSecretsTable, D as LLMRequestsTable, E as LLMRequest, F as Updateable, G as environmentsSchema, H as configVariantsSchema, I as Variant, J as schemas, K as llmRequestsSchema, L as VariantVersion, M as TableName, N as TargetingRule, O as ProviderConfig, P as TargetingRulesTable, Q as workspaceSettingsSchema, R as VariantVersionsTable, S as EnvironmentSecret, T as Insertable, U as configsSchema, V as WorkspaceSettingsTable, W as environmentSecretsSchema, X as variantVersionsSchema, Y as targetingRulesSchema, Z as variantsSchema, _ as ConfigVariant, a as createDatabaseFromConnection, b as Database, c as MigrationResult, d as runAutoMigrations, f as parsePartialTableData, g as Config, h as validateTableData, i as createDatabase, j as Selectable, k as ProviderConfigsTable, l as getMigrations, m as validatePartialTableData, n as DatabaseOptions, o as detectDatabaseType, p as parseTableData, q as providerConfigsSchema, r as DatabaseType, s as MigrationOptions, t as DatabaseConnection, u as matchType, v as ConfigVariantsTable, w as EnvironmentsTable, x as Environment, y as ConfigsTable, z as VariantsTable } from "./index-5GfBoyiq.mjs";
|
|
2
2
|
import gateway from "@llmops/gateway";
|
|
3
3
|
import { Kysely } from "kysely";
|
|
4
4
|
import pino from "pino";
|
|
5
|
-
import * as
|
|
5
|
+
import * as zod0 from "zod";
|
|
6
6
|
import z$1, { z } from "zod";
|
|
7
7
|
import * as better_auth0 from "better-auth";
|
|
8
8
|
import { BetterAuthOptions } from "better-auth";
|
|
9
9
|
|
|
10
|
+
//#region src/schemas/config.d.ts
|
|
11
|
+
declare const llmopsConfigSchema: z.ZodObject<{
|
|
12
|
+
database: z.ZodAny;
|
|
13
|
+
basePath: z.ZodString;
|
|
14
|
+
schema: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
15
|
+
}, z.core.$strip>;
|
|
16
|
+
/**
|
|
17
|
+
* Validated LLMOps configuration
|
|
18
|
+
*
|
|
19
|
+
* Note: schema is optional in input but always present after validation
|
|
20
|
+
*/
|
|
21
|
+
type ValidatedLLMOpsConfig = Omit<z.infer<typeof llmopsConfigSchema>, 'schema'> & {
|
|
22
|
+
schema: string;
|
|
23
|
+
};
|
|
24
|
+
/**
|
|
25
|
+
* Input type for LLMOps configuration (before validation)
|
|
26
|
+
* Users can omit optional fields like schema
|
|
27
|
+
*/
|
|
28
|
+
type LLMOpsConfigInput = Omit<ValidatedLLMOpsConfig, 'schema'> & {
|
|
29
|
+
schema?: string;
|
|
30
|
+
};
|
|
31
|
+
declare function validateLLMOpsConfig(config: unknown): ValidatedLLMOpsConfig;
|
|
32
|
+
//#endregion
|
|
33
|
+
//#region src/types/helper.d.ts
|
|
34
|
+
/**
|
|
35
|
+
* @references From better-auth
|
|
36
|
+
*/
|
|
37
|
+
type Prettify<T> = Omit<T, never>;
|
|
38
|
+
//#endregion
|
|
39
|
+
//#region src/types/index.d.ts
|
|
40
|
+
/**
|
|
41
|
+
* LLMOpsConfig is the user-facing config type (allows optional fields)
|
|
42
|
+
*/
|
|
43
|
+
type LLMOpsConfig = LLMOpsConfigInput;
|
|
44
|
+
type LLMOpsClient = {
|
|
45
|
+
handler: (request: Request) => Promise<Response>;
|
|
46
|
+
config: LLMOpsConfig;
|
|
47
|
+
};
|
|
48
|
+
//#endregion
|
|
10
49
|
//#region src/providers/supported-providers.d.ts
|
|
11
50
|
/**
|
|
12
51
|
* Supported providers - derived from @llmops/gateway providers
|
|
@@ -383,475 +422,6 @@ type AnyProviderConfig = ProviderConfigMap[SupportedProviders];
|
|
|
383
422
|
*/
|
|
384
423
|
type ProvidersConfig = { [K in SupportedProviders]?: ProviderConfigMap[K] };
|
|
385
424
|
//#endregion
|
|
386
|
-
//#region src/schemas/config.d.ts
|
|
387
|
-
declare const llmopsConfigSchema: z.ZodObject<{
|
|
388
|
-
database: z.ZodAny;
|
|
389
|
-
basePath: z.ZodString;
|
|
390
|
-
providers: z.ZodObject<{
|
|
391
|
-
openai: z.ZodOptional<z.ZodObject<{
|
|
392
|
-
apiKey: z.ZodString;
|
|
393
|
-
customHost: z.ZodOptional<z.ZodString>;
|
|
394
|
-
requestTimeout: z.ZodOptional<z.ZodNumber>;
|
|
395
|
-
forwardHeaders: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
396
|
-
}, z.core.$loose>>;
|
|
397
|
-
cohere: z.ZodOptional<z.ZodObject<{
|
|
398
|
-
apiKey: z.ZodString;
|
|
399
|
-
customHost: z.ZodOptional<z.ZodString>;
|
|
400
|
-
requestTimeout: z.ZodOptional<z.ZodNumber>;
|
|
401
|
-
forwardHeaders: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
402
|
-
}, z.core.$loose>>;
|
|
403
|
-
anthropic: z.ZodOptional<z.ZodObject<{
|
|
404
|
-
apiKey: z.ZodString;
|
|
405
|
-
customHost: z.ZodOptional<z.ZodString>;
|
|
406
|
-
requestTimeout: z.ZodOptional<z.ZodNumber>;
|
|
407
|
-
forwardHeaders: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
408
|
-
}, z.core.$loose>>;
|
|
409
|
-
"azure-openai": z.ZodOptional<z.ZodObject<{
|
|
410
|
-
apiKey: z.ZodString;
|
|
411
|
-
customHost: z.ZodOptional<z.ZodString>;
|
|
412
|
-
requestTimeout: z.ZodOptional<z.ZodNumber>;
|
|
413
|
-
forwardHeaders: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
414
|
-
}, z.core.$loose>>;
|
|
415
|
-
huggingface: z.ZodOptional<z.ZodObject<{
|
|
416
|
-
apiKey: z.ZodString;
|
|
417
|
-
customHost: z.ZodOptional<z.ZodString>;
|
|
418
|
-
requestTimeout: z.ZodOptional<z.ZodNumber>;
|
|
419
|
-
forwardHeaders: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
420
|
-
}, z.core.$loose>>;
|
|
421
|
-
anyscale: z.ZodOptional<z.ZodObject<{
|
|
422
|
-
apiKey: z.ZodString;
|
|
423
|
-
customHost: z.ZodOptional<z.ZodString>;
|
|
424
|
-
requestTimeout: z.ZodOptional<z.ZodNumber>;
|
|
425
|
-
forwardHeaders: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
426
|
-
}, z.core.$loose>>;
|
|
427
|
-
palm: z.ZodOptional<z.ZodObject<{
|
|
428
|
-
apiKey: z.ZodString;
|
|
429
|
-
customHost: z.ZodOptional<z.ZodString>;
|
|
430
|
-
requestTimeout: z.ZodOptional<z.ZodNumber>;
|
|
431
|
-
forwardHeaders: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
432
|
-
}, z.core.$loose>>;
|
|
433
|
-
"together-ai": z.ZodOptional<z.ZodObject<{
|
|
434
|
-
apiKey: z.ZodString;
|
|
435
|
-
customHost: z.ZodOptional<z.ZodString>;
|
|
436
|
-
requestTimeout: z.ZodOptional<z.ZodNumber>;
|
|
437
|
-
forwardHeaders: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
438
|
-
}, z.core.$loose>>;
|
|
439
|
-
google: z.ZodOptional<z.ZodObject<{
|
|
440
|
-
apiKey: z.ZodString;
|
|
441
|
-
customHost: z.ZodOptional<z.ZodString>;
|
|
442
|
-
requestTimeout: z.ZodOptional<z.ZodNumber>;
|
|
443
|
-
forwardHeaders: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
444
|
-
}, z.core.$loose>>;
|
|
445
|
-
"vertex-ai": z.ZodOptional<z.ZodObject<{
|
|
446
|
-
apiKey: z.ZodString;
|
|
447
|
-
customHost: z.ZodOptional<z.ZodString>;
|
|
448
|
-
requestTimeout: z.ZodOptional<z.ZodNumber>;
|
|
449
|
-
forwardHeaders: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
450
|
-
}, z.core.$loose>>;
|
|
451
|
-
"perplexity-ai": z.ZodOptional<z.ZodObject<{
|
|
452
|
-
apiKey: z.ZodString;
|
|
453
|
-
customHost: z.ZodOptional<z.ZodString>;
|
|
454
|
-
requestTimeout: z.ZodOptional<z.ZodNumber>;
|
|
455
|
-
forwardHeaders: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
456
|
-
}, z.core.$loose>>;
|
|
457
|
-
"mistral-ai": z.ZodOptional<z.ZodObject<{
|
|
458
|
-
apiKey: z.ZodString;
|
|
459
|
-
customHost: z.ZodOptional<z.ZodString>;
|
|
460
|
-
requestTimeout: z.ZodOptional<z.ZodNumber>;
|
|
461
|
-
forwardHeaders: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
462
|
-
}, z.core.$loose>>;
|
|
463
|
-
deepinfra: z.ZodOptional<z.ZodObject<{
|
|
464
|
-
apiKey: z.ZodString;
|
|
465
|
-
customHost: z.ZodOptional<z.ZodString>;
|
|
466
|
-
requestTimeout: z.ZodOptional<z.ZodNumber>;
|
|
467
|
-
forwardHeaders: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
468
|
-
}, z.core.$loose>>;
|
|
469
|
-
ncompass: z.ZodOptional<z.ZodObject<{
|
|
470
|
-
apiKey: z.ZodString;
|
|
471
|
-
customHost: z.ZodOptional<z.ZodString>;
|
|
472
|
-
requestTimeout: z.ZodOptional<z.ZodNumber>;
|
|
473
|
-
forwardHeaders: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
474
|
-
}, z.core.$loose>>;
|
|
475
|
-
"stability-ai": z.ZodOptional<z.ZodObject<{
|
|
476
|
-
apiKey: z.ZodString;
|
|
477
|
-
customHost: z.ZodOptional<z.ZodString>;
|
|
478
|
-
requestTimeout: z.ZodOptional<z.ZodNumber>;
|
|
479
|
-
forwardHeaders: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
480
|
-
}, z.core.$loose>>;
|
|
481
|
-
nomic: z.ZodOptional<z.ZodObject<{
|
|
482
|
-
apiKey: z.ZodString;
|
|
483
|
-
customHost: z.ZodOptional<z.ZodString>;
|
|
484
|
-
requestTimeout: z.ZodOptional<z.ZodNumber>;
|
|
485
|
-
forwardHeaders: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
486
|
-
}, z.core.$loose>>;
|
|
487
|
-
ollama: z.ZodOptional<z.ZodObject<{
|
|
488
|
-
apiKey: z.ZodString;
|
|
489
|
-
customHost: z.ZodOptional<z.ZodString>;
|
|
490
|
-
requestTimeout: z.ZodOptional<z.ZodNumber>;
|
|
491
|
-
forwardHeaders: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
492
|
-
}, z.core.$loose>>;
|
|
493
|
-
ai21: z.ZodOptional<z.ZodObject<{
|
|
494
|
-
apiKey: z.ZodString;
|
|
495
|
-
customHost: z.ZodOptional<z.ZodString>;
|
|
496
|
-
requestTimeout: z.ZodOptional<z.ZodNumber>;
|
|
497
|
-
forwardHeaders: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
498
|
-
}, z.core.$loose>>;
|
|
499
|
-
bedrock: z.ZodOptional<z.ZodObject<{
|
|
500
|
-
apiKey: z.ZodString;
|
|
501
|
-
customHost: z.ZodOptional<z.ZodString>;
|
|
502
|
-
requestTimeout: z.ZodOptional<z.ZodNumber>;
|
|
503
|
-
forwardHeaders: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
504
|
-
}, z.core.$loose>>;
|
|
505
|
-
groq: z.ZodOptional<z.ZodObject<{
|
|
506
|
-
apiKey: z.ZodString;
|
|
507
|
-
customHost: z.ZodOptional<z.ZodString>;
|
|
508
|
-
requestTimeout: z.ZodOptional<z.ZodNumber>;
|
|
509
|
-
forwardHeaders: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
510
|
-
}, z.core.$loose>>;
|
|
511
|
-
segmind: z.ZodOptional<z.ZodObject<{
|
|
512
|
-
apiKey: z.ZodString;
|
|
513
|
-
customHost: z.ZodOptional<z.ZodString>;
|
|
514
|
-
requestTimeout: z.ZodOptional<z.ZodNumber>;
|
|
515
|
-
forwardHeaders: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
516
|
-
}, z.core.$loose>>;
|
|
517
|
-
jina: z.ZodOptional<z.ZodObject<{
|
|
518
|
-
apiKey: z.ZodString;
|
|
519
|
-
customHost: z.ZodOptional<z.ZodString>;
|
|
520
|
-
requestTimeout: z.ZodOptional<z.ZodNumber>;
|
|
521
|
-
forwardHeaders: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
522
|
-
}, z.core.$loose>>;
|
|
523
|
-
"fireworks-ai": z.ZodOptional<z.ZodObject<{
|
|
524
|
-
apiKey: z.ZodString;
|
|
525
|
-
customHost: z.ZodOptional<z.ZodString>;
|
|
526
|
-
requestTimeout: z.ZodOptional<z.ZodNumber>;
|
|
527
|
-
forwardHeaders: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
528
|
-
}, z.core.$loose>>;
|
|
529
|
-
"workers-ai": z.ZodOptional<z.ZodObject<{
|
|
530
|
-
apiKey: z.ZodString;
|
|
531
|
-
customHost: z.ZodOptional<z.ZodString>;
|
|
532
|
-
requestTimeout: z.ZodOptional<z.ZodNumber>;
|
|
533
|
-
forwardHeaders: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
534
|
-
}, z.core.$loose>>;
|
|
535
|
-
"reka-ai": z.ZodOptional<z.ZodObject<{
|
|
536
|
-
apiKey: z.ZodString;
|
|
537
|
-
customHost: z.ZodOptional<z.ZodString>;
|
|
538
|
-
requestTimeout: z.ZodOptional<z.ZodNumber>;
|
|
539
|
-
forwardHeaders: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
540
|
-
}, z.core.$loose>>;
|
|
541
|
-
moonshot: z.ZodOptional<z.ZodObject<{
|
|
542
|
-
apiKey: z.ZodString;
|
|
543
|
-
customHost: z.ZodOptional<z.ZodString>;
|
|
544
|
-
requestTimeout: z.ZodOptional<z.ZodNumber>;
|
|
545
|
-
forwardHeaders: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
546
|
-
}, z.core.$loose>>;
|
|
547
|
-
openrouter: z.ZodOptional<z.ZodObject<{
|
|
548
|
-
apiKey: z.ZodString;
|
|
549
|
-
customHost: z.ZodOptional<z.ZodString>;
|
|
550
|
-
requestTimeout: z.ZodOptional<z.ZodNumber>;
|
|
551
|
-
forwardHeaders: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
552
|
-
}, z.core.$loose>>;
|
|
553
|
-
lingyi: z.ZodOptional<z.ZodObject<{
|
|
554
|
-
apiKey: z.ZodString;
|
|
555
|
-
customHost: z.ZodOptional<z.ZodString>;
|
|
556
|
-
requestTimeout: z.ZodOptional<z.ZodNumber>;
|
|
557
|
-
forwardHeaders: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
558
|
-
}, z.core.$loose>>;
|
|
559
|
-
zhipu: z.ZodOptional<z.ZodObject<{
|
|
560
|
-
apiKey: z.ZodString;
|
|
561
|
-
customHost: z.ZodOptional<z.ZodString>;
|
|
562
|
-
requestTimeout: z.ZodOptional<z.ZodNumber>;
|
|
563
|
-
forwardHeaders: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
564
|
-
}, z.core.$loose>>;
|
|
565
|
-
"novita-ai": z.ZodOptional<z.ZodObject<{
|
|
566
|
-
apiKey: z.ZodString;
|
|
567
|
-
customHost: z.ZodOptional<z.ZodString>;
|
|
568
|
-
requestTimeout: z.ZodOptional<z.ZodNumber>;
|
|
569
|
-
forwardHeaders: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
570
|
-
}, z.core.$loose>>;
|
|
571
|
-
monsterapi: z.ZodOptional<z.ZodObject<{
|
|
572
|
-
apiKey: z.ZodString;
|
|
573
|
-
customHost: z.ZodOptional<z.ZodString>;
|
|
574
|
-
requestTimeout: z.ZodOptional<z.ZodNumber>;
|
|
575
|
-
forwardHeaders: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
576
|
-
}, z.core.$loose>>;
|
|
577
|
-
deepseek: z.ZodOptional<z.ZodObject<{
|
|
578
|
-
apiKey: z.ZodString;
|
|
579
|
-
customHost: z.ZodOptional<z.ZodString>;
|
|
580
|
-
requestTimeout: z.ZodOptional<z.ZodNumber>;
|
|
581
|
-
forwardHeaders: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
582
|
-
}, z.core.$loose>>;
|
|
583
|
-
predibase: z.ZodOptional<z.ZodObject<{
|
|
584
|
-
apiKey: z.ZodString;
|
|
585
|
-
customHost: z.ZodOptional<z.ZodString>;
|
|
586
|
-
requestTimeout: z.ZodOptional<z.ZodNumber>;
|
|
587
|
-
forwardHeaders: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
588
|
-
}, z.core.$loose>>;
|
|
589
|
-
triton: z.ZodOptional<z.ZodObject<{
|
|
590
|
-
apiKey: z.ZodString;
|
|
591
|
-
customHost: z.ZodOptional<z.ZodString>;
|
|
592
|
-
requestTimeout: z.ZodOptional<z.ZodNumber>;
|
|
593
|
-
forwardHeaders: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
594
|
-
}, z.core.$loose>>;
|
|
595
|
-
voyage: z.ZodOptional<z.ZodObject<{
|
|
596
|
-
apiKey: z.ZodString;
|
|
597
|
-
customHost: z.ZodOptional<z.ZodString>;
|
|
598
|
-
requestTimeout: z.ZodOptional<z.ZodNumber>;
|
|
599
|
-
forwardHeaders: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
600
|
-
}, z.core.$loose>>;
|
|
601
|
-
"azure-ai": z.ZodOptional<z.ZodObject<{
|
|
602
|
-
apiKey: z.ZodString;
|
|
603
|
-
customHost: z.ZodOptional<z.ZodString>;
|
|
604
|
-
requestTimeout: z.ZodOptional<z.ZodNumber>;
|
|
605
|
-
forwardHeaders: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
606
|
-
}, z.core.$loose>>;
|
|
607
|
-
github: z.ZodOptional<z.ZodObject<{
|
|
608
|
-
apiKey: z.ZodString;
|
|
609
|
-
customHost: z.ZodOptional<z.ZodString>;
|
|
610
|
-
requestTimeout: z.ZodOptional<z.ZodNumber>;
|
|
611
|
-
forwardHeaders: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
612
|
-
}, z.core.$loose>>;
|
|
613
|
-
deepbricks: z.ZodOptional<z.ZodObject<{
|
|
614
|
-
apiKey: z.ZodString;
|
|
615
|
-
customHost: z.ZodOptional<z.ZodString>;
|
|
616
|
-
requestTimeout: z.ZodOptional<z.ZodNumber>;
|
|
617
|
-
forwardHeaders: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
618
|
-
}, z.core.$loose>>;
|
|
619
|
-
siliconflow: z.ZodOptional<z.ZodObject<{
|
|
620
|
-
apiKey: z.ZodString;
|
|
621
|
-
customHost: z.ZodOptional<z.ZodString>;
|
|
622
|
-
requestTimeout: z.ZodOptional<z.ZodNumber>;
|
|
623
|
-
forwardHeaders: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
624
|
-
}, z.core.$loose>>;
|
|
625
|
-
cerebras: z.ZodOptional<z.ZodObject<{
|
|
626
|
-
apiKey: z.ZodString;
|
|
627
|
-
customHost: z.ZodOptional<z.ZodString>;
|
|
628
|
-
requestTimeout: z.ZodOptional<z.ZodNumber>;
|
|
629
|
-
forwardHeaders: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
630
|
-
}, z.core.$loose>>;
|
|
631
|
-
"inference-net": z.ZodOptional<z.ZodObject<{
|
|
632
|
-
apiKey: z.ZodString;
|
|
633
|
-
customHost: z.ZodOptional<z.ZodString>;
|
|
634
|
-
requestTimeout: z.ZodOptional<z.ZodNumber>;
|
|
635
|
-
forwardHeaders: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
636
|
-
}, z.core.$loose>>;
|
|
637
|
-
sambanova: z.ZodOptional<z.ZodObject<{
|
|
638
|
-
apiKey: z.ZodString;
|
|
639
|
-
customHost: z.ZodOptional<z.ZodString>;
|
|
640
|
-
requestTimeout: z.ZodOptional<z.ZodNumber>;
|
|
641
|
-
forwardHeaders: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
642
|
-
}, z.core.$loose>>;
|
|
643
|
-
"lemonfox-ai": z.ZodOptional<z.ZodObject<{
|
|
644
|
-
apiKey: z.ZodString;
|
|
645
|
-
customHost: z.ZodOptional<z.ZodString>;
|
|
646
|
-
requestTimeout: z.ZodOptional<z.ZodNumber>;
|
|
647
|
-
forwardHeaders: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
648
|
-
}, z.core.$loose>>;
|
|
649
|
-
upstage: z.ZodOptional<z.ZodObject<{
|
|
650
|
-
apiKey: z.ZodString;
|
|
651
|
-
customHost: z.ZodOptional<z.ZodString>;
|
|
652
|
-
requestTimeout: z.ZodOptional<z.ZodNumber>;
|
|
653
|
-
forwardHeaders: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
654
|
-
}, z.core.$loose>>;
|
|
655
|
-
lambda: z.ZodOptional<z.ZodObject<{
|
|
656
|
-
apiKey: z.ZodString;
|
|
657
|
-
customHost: z.ZodOptional<z.ZodString>;
|
|
658
|
-
requestTimeout: z.ZodOptional<z.ZodNumber>;
|
|
659
|
-
forwardHeaders: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
660
|
-
}, z.core.$loose>>;
|
|
661
|
-
dashscope: z.ZodOptional<z.ZodObject<{
|
|
662
|
-
apiKey: z.ZodString;
|
|
663
|
-
customHost: z.ZodOptional<z.ZodString>;
|
|
664
|
-
requestTimeout: z.ZodOptional<z.ZodNumber>;
|
|
665
|
-
forwardHeaders: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
666
|
-
}, z.core.$loose>>;
|
|
667
|
-
"x-ai": z.ZodOptional<z.ZodObject<{
|
|
668
|
-
apiKey: z.ZodString;
|
|
669
|
-
customHost: z.ZodOptional<z.ZodString>;
|
|
670
|
-
requestTimeout: z.ZodOptional<z.ZodNumber>;
|
|
671
|
-
forwardHeaders: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
672
|
-
}, z.core.$loose>>;
|
|
673
|
-
qdrant: z.ZodOptional<z.ZodObject<{
|
|
674
|
-
apiKey: z.ZodString;
|
|
675
|
-
customHost: z.ZodOptional<z.ZodString>;
|
|
676
|
-
requestTimeout: z.ZodOptional<z.ZodNumber>;
|
|
677
|
-
forwardHeaders: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
678
|
-
}, z.core.$loose>>;
|
|
679
|
-
sagemaker: z.ZodOptional<z.ZodObject<{
|
|
680
|
-
apiKey: z.ZodString;
|
|
681
|
-
customHost: z.ZodOptional<z.ZodString>;
|
|
682
|
-
requestTimeout: z.ZodOptional<z.ZodNumber>;
|
|
683
|
-
forwardHeaders: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
684
|
-
}, z.core.$loose>>;
|
|
685
|
-
nebius: z.ZodOptional<z.ZodObject<{
|
|
686
|
-
apiKey: z.ZodString;
|
|
687
|
-
customHost: z.ZodOptional<z.ZodString>;
|
|
688
|
-
requestTimeout: z.ZodOptional<z.ZodNumber>;
|
|
689
|
-
forwardHeaders: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
690
|
-
}, z.core.$loose>>;
|
|
691
|
-
"recraft-ai": z.ZodOptional<z.ZodObject<{
|
|
692
|
-
apiKey: z.ZodString;
|
|
693
|
-
customHost: z.ZodOptional<z.ZodString>;
|
|
694
|
-
requestTimeout: z.ZodOptional<z.ZodNumber>;
|
|
695
|
-
forwardHeaders: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
696
|
-
}, z.core.$loose>>;
|
|
697
|
-
milvus: z.ZodOptional<z.ZodObject<{
|
|
698
|
-
apiKey: z.ZodString;
|
|
699
|
-
customHost: z.ZodOptional<z.ZodString>;
|
|
700
|
-
requestTimeout: z.ZodOptional<z.ZodNumber>;
|
|
701
|
-
forwardHeaders: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
702
|
-
}, z.core.$loose>>;
|
|
703
|
-
replicate: z.ZodOptional<z.ZodObject<{
|
|
704
|
-
apiKey: z.ZodString;
|
|
705
|
-
customHost: z.ZodOptional<z.ZodString>;
|
|
706
|
-
requestTimeout: z.ZodOptional<z.ZodNumber>;
|
|
707
|
-
forwardHeaders: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
708
|
-
}, z.core.$loose>>;
|
|
709
|
-
lepton: z.ZodOptional<z.ZodObject<{
|
|
710
|
-
apiKey: z.ZodString;
|
|
711
|
-
customHost: z.ZodOptional<z.ZodString>;
|
|
712
|
-
requestTimeout: z.ZodOptional<z.ZodNumber>;
|
|
713
|
-
forwardHeaders: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
714
|
-
}, z.core.$loose>>;
|
|
715
|
-
"kluster-ai": z.ZodOptional<z.ZodObject<{
|
|
716
|
-
apiKey: z.ZodString;
|
|
717
|
-
customHost: z.ZodOptional<z.ZodString>;
|
|
718
|
-
requestTimeout: z.ZodOptional<z.ZodNumber>;
|
|
719
|
-
forwardHeaders: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
720
|
-
}, z.core.$loose>>;
|
|
721
|
-
nscale: z.ZodOptional<z.ZodObject<{
|
|
722
|
-
apiKey: z.ZodString;
|
|
723
|
-
customHost: z.ZodOptional<z.ZodString>;
|
|
724
|
-
requestTimeout: z.ZodOptional<z.ZodNumber>;
|
|
725
|
-
forwardHeaders: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
726
|
-
}, z.core.$loose>>;
|
|
727
|
-
hyperbolic: z.ZodOptional<z.ZodObject<{
|
|
728
|
-
apiKey: z.ZodString;
|
|
729
|
-
customHost: z.ZodOptional<z.ZodString>;
|
|
730
|
-
requestTimeout: z.ZodOptional<z.ZodNumber>;
|
|
731
|
-
forwardHeaders: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
732
|
-
}, z.core.$loose>>;
|
|
733
|
-
bytez: z.ZodOptional<z.ZodObject<{
|
|
734
|
-
apiKey: z.ZodString;
|
|
735
|
-
customHost: z.ZodOptional<z.ZodString>;
|
|
736
|
-
requestTimeout: z.ZodOptional<z.ZodNumber>;
|
|
737
|
-
forwardHeaders: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
738
|
-
}, z.core.$loose>>;
|
|
739
|
-
"featherless-ai": z.ZodOptional<z.ZodObject<{
|
|
740
|
-
apiKey: z.ZodString;
|
|
741
|
-
customHost: z.ZodOptional<z.ZodString>;
|
|
742
|
-
requestTimeout: z.ZodOptional<z.ZodNumber>;
|
|
743
|
-
forwardHeaders: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
744
|
-
}, z.core.$loose>>;
|
|
745
|
-
krutrim: z.ZodOptional<z.ZodObject<{
|
|
746
|
-
apiKey: z.ZodString;
|
|
747
|
-
customHost: z.ZodOptional<z.ZodString>;
|
|
748
|
-
requestTimeout: z.ZodOptional<z.ZodNumber>;
|
|
749
|
-
forwardHeaders: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
750
|
-
}, z.core.$loose>>;
|
|
751
|
-
"302ai": z.ZodOptional<z.ZodObject<{
|
|
752
|
-
apiKey: z.ZodString;
|
|
753
|
-
customHost: z.ZodOptional<z.ZodString>;
|
|
754
|
-
requestTimeout: z.ZodOptional<z.ZodNumber>;
|
|
755
|
-
forwardHeaders: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
756
|
-
}, z.core.$loose>>;
|
|
757
|
-
cometapi: z.ZodOptional<z.ZodObject<{
|
|
758
|
-
apiKey: z.ZodString;
|
|
759
|
-
customHost: z.ZodOptional<z.ZodString>;
|
|
760
|
-
requestTimeout: z.ZodOptional<z.ZodNumber>;
|
|
761
|
-
forwardHeaders: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
762
|
-
}, z.core.$loose>>;
|
|
763
|
-
matterai: z.ZodOptional<z.ZodObject<{
|
|
764
|
-
apiKey: z.ZodString;
|
|
765
|
-
customHost: z.ZodOptional<z.ZodString>;
|
|
766
|
-
requestTimeout: z.ZodOptional<z.ZodNumber>;
|
|
767
|
-
forwardHeaders: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
768
|
-
}, z.core.$loose>>;
|
|
769
|
-
meshy: z.ZodOptional<z.ZodObject<{
|
|
770
|
-
apiKey: z.ZodString;
|
|
771
|
-
customHost: z.ZodOptional<z.ZodString>;
|
|
772
|
-
requestTimeout: z.ZodOptional<z.ZodNumber>;
|
|
773
|
-
forwardHeaders: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
774
|
-
}, z.core.$loose>>;
|
|
775
|
-
nextbit: z.ZodOptional<z.ZodObject<{
|
|
776
|
-
apiKey: z.ZodString;
|
|
777
|
-
customHost: z.ZodOptional<z.ZodString>;
|
|
778
|
-
requestTimeout: z.ZodOptional<z.ZodNumber>;
|
|
779
|
-
forwardHeaders: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
780
|
-
}, z.core.$loose>>;
|
|
781
|
-
tripo3d: z.ZodOptional<z.ZodObject<{
|
|
782
|
-
apiKey: z.ZodString;
|
|
783
|
-
customHost: z.ZodOptional<z.ZodString>;
|
|
784
|
-
requestTimeout: z.ZodOptional<z.ZodNumber>;
|
|
785
|
-
forwardHeaders: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
786
|
-
}, z.core.$loose>>;
|
|
787
|
-
modal: z.ZodOptional<z.ZodObject<{
|
|
788
|
-
apiKey: z.ZodString;
|
|
789
|
-
customHost: z.ZodOptional<z.ZodString>;
|
|
790
|
-
requestTimeout: z.ZodOptional<z.ZodNumber>;
|
|
791
|
-
forwardHeaders: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
792
|
-
}, z.core.$loose>>;
|
|
793
|
-
"z-ai": z.ZodOptional<z.ZodObject<{
|
|
794
|
-
apiKey: z.ZodString;
|
|
795
|
-
customHost: z.ZodOptional<z.ZodString>;
|
|
796
|
-
requestTimeout: z.ZodOptional<z.ZodNumber>;
|
|
797
|
-
forwardHeaders: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
798
|
-
}, z.core.$loose>>;
|
|
799
|
-
oracle: z.ZodOptional<z.ZodObject<{
|
|
800
|
-
apiKey: z.ZodString;
|
|
801
|
-
customHost: z.ZodOptional<z.ZodString>;
|
|
802
|
-
requestTimeout: z.ZodOptional<z.ZodNumber>;
|
|
803
|
-
forwardHeaders: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
804
|
-
}, z.core.$loose>>;
|
|
805
|
-
iointelligence: z.ZodOptional<z.ZodObject<{
|
|
806
|
-
apiKey: z.ZodString;
|
|
807
|
-
customHost: z.ZodOptional<z.ZodString>;
|
|
808
|
-
requestTimeout: z.ZodOptional<z.ZodNumber>;
|
|
809
|
-
forwardHeaders: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
810
|
-
}, z.core.$loose>>;
|
|
811
|
-
aibadgr: z.ZodOptional<z.ZodObject<{
|
|
812
|
-
apiKey: z.ZodString;
|
|
813
|
-
customHost: z.ZodOptional<z.ZodString>;
|
|
814
|
-
requestTimeout: z.ZodOptional<z.ZodNumber>;
|
|
815
|
-
forwardHeaders: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
816
|
-
}, z.core.$loose>>;
|
|
817
|
-
}, z.core.$strip>;
|
|
818
|
-
schema: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
819
|
-
}, z.core.$strip>;
|
|
820
|
-
/**
|
|
821
|
-
* Validated LLMOps configuration with typed providers
|
|
822
|
-
* Uses ProvidersConfig for proper provider-specific typing
|
|
823
|
-
*
|
|
824
|
-
* Note: schema is optional in input but always present after validation
|
|
825
|
-
*/
|
|
826
|
-
type ValidatedLLMOpsConfig = Omit<z.infer<typeof llmopsConfigSchema>, 'providers' | 'schema'> & {
|
|
827
|
-
providers: ProvidersConfig;
|
|
828
|
-
schema: string;
|
|
829
|
-
};
|
|
830
|
-
/**
|
|
831
|
-
* Input type for LLMOps configuration (before validation)
|
|
832
|
-
* Users can omit optional fields like schema
|
|
833
|
-
*/
|
|
834
|
-
type LLMOpsConfigInput = Omit<ValidatedLLMOpsConfig, 'schema'> & {
|
|
835
|
-
schema?: string;
|
|
836
|
-
};
|
|
837
|
-
declare function validateLLMOpsConfig(config: unknown): ValidatedLLMOpsConfig;
|
|
838
|
-
//#endregion
|
|
839
|
-
//#region src/types/helper.d.ts
|
|
840
|
-
/**
|
|
841
|
-
* @references From better-auth
|
|
842
|
-
*/
|
|
843
|
-
type Prettify<T> = Omit<T, never>;
|
|
844
|
-
//#endregion
|
|
845
|
-
//#region src/types/index.d.ts
|
|
846
|
-
/**
|
|
847
|
-
* LLMOpsConfig is the user-facing config type (allows optional fields)
|
|
848
|
-
*/
|
|
849
|
-
type LLMOpsConfig = LLMOpsConfigInput;
|
|
850
|
-
type LLMOpsClient = {
|
|
851
|
-
handler: (request: Request) => Promise<Response>;
|
|
852
|
-
config: LLMOpsConfig;
|
|
853
|
-
};
|
|
854
|
-
//#endregion
|
|
855
425
|
//#region src/schemas/openai.d.ts
|
|
856
426
|
declare const chatCompletionCreateParamsBaseSchema: z.ZodObject<{
|
|
857
427
|
messages: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
@@ -1564,13 +1134,11 @@ declare const createLLMRequestsDataLayer: (db: Kysely<Database>) => {
|
|
|
1564
1134
|
* Insert a single LLM request log
|
|
1565
1135
|
*/
|
|
1566
1136
|
insertRequest: (request: LLMRequestInsert) => Promise<{
|
|
1567
|
-
|
|
1568
|
-
createdAt: Date;
|
|
1569
|
-
updatedAt: Date;
|
|
1137
|
+
configId: string | null;
|
|
1570
1138
|
variantId: string | null;
|
|
1139
|
+
id: string;
|
|
1571
1140
|
provider: string;
|
|
1572
1141
|
environmentId: string | null;
|
|
1573
|
-
configId: string | null;
|
|
1574
1142
|
requestId: string;
|
|
1575
1143
|
model: string;
|
|
1576
1144
|
promptTokens: number;
|
|
@@ -1586,6 +1154,8 @@ declare const createLLMRequestsDataLayer: (db: Kysely<Database>) => {
|
|
|
1586
1154
|
isStreaming: boolean;
|
|
1587
1155
|
userId: string | null;
|
|
1588
1156
|
tags: Record<string, string>;
|
|
1157
|
+
createdAt: Date;
|
|
1158
|
+
updatedAt: Date;
|
|
1589
1159
|
} | undefined>;
|
|
1590
1160
|
/**
|
|
1591
1161
|
* List LLM requests with filtering and pagination
|
|
@@ -1593,13 +1163,11 @@ declare const createLLMRequestsDataLayer: (db: Kysely<Database>) => {
|
|
|
1593
1163
|
*/
|
|
1594
1164
|
listRequests: (params?: z$1.infer<typeof listRequestsSchema>) => Promise<{
|
|
1595
1165
|
data: {
|
|
1596
|
-
|
|
1597
|
-
createdAt: Date;
|
|
1598
|
-
updatedAt: Date;
|
|
1166
|
+
configId: string | null;
|
|
1599
1167
|
variantId: string | null;
|
|
1168
|
+
id: string;
|
|
1600
1169
|
provider: string;
|
|
1601
1170
|
environmentId: string | null;
|
|
1602
|
-
configId: string | null;
|
|
1603
1171
|
requestId: string;
|
|
1604
1172
|
model: string;
|
|
1605
1173
|
promptTokens: number;
|
|
@@ -1615,6 +1183,8 @@ declare const createLLMRequestsDataLayer: (db: Kysely<Database>) => {
|
|
|
1615
1183
|
isStreaming: boolean;
|
|
1616
1184
|
userId: string | null;
|
|
1617
1185
|
tags: Record<string, string>;
|
|
1186
|
+
createdAt: Date;
|
|
1187
|
+
updatedAt: Date;
|
|
1618
1188
|
}[];
|
|
1619
1189
|
total: number;
|
|
1620
1190
|
limit: number;
|
|
@@ -1624,13 +1194,11 @@ declare const createLLMRequestsDataLayer: (db: Kysely<Database>) => {
|
|
|
1624
1194
|
* Get a single request by requestId
|
|
1625
1195
|
*/
|
|
1626
1196
|
getRequestByRequestId: (requestId: string) => Promise<{
|
|
1627
|
-
|
|
1628
|
-
createdAt: Date;
|
|
1629
|
-
updatedAt: Date;
|
|
1197
|
+
configId: string | null;
|
|
1630
1198
|
variantId: string | null;
|
|
1199
|
+
id: string;
|
|
1631
1200
|
provider: string;
|
|
1632
1201
|
environmentId: string | null;
|
|
1633
|
-
configId: string | null;
|
|
1634
1202
|
requestId: string;
|
|
1635
1203
|
model: string;
|
|
1636
1204
|
promptTokens: number;
|
|
@@ -1646,6 +1214,8 @@ declare const createLLMRequestsDataLayer: (db: Kysely<Database>) => {
|
|
|
1646
1214
|
isStreaming: boolean;
|
|
1647
1215
|
userId: string | null;
|
|
1648
1216
|
tags: Record<string, string>;
|
|
1217
|
+
createdAt: Date;
|
|
1218
|
+
updatedAt: Date;
|
|
1649
1219
|
} | undefined>;
|
|
1650
1220
|
/**
|
|
1651
1221
|
* Get total cost for a date range with optional filters
|
|
@@ -1751,10 +1321,10 @@ declare const createWorkspaceSettingsDataLayer: (db: Kysely<Database>) => {
|
|
|
1751
1321
|
getWorkspaceSettings: () => Promise<{
|
|
1752
1322
|
name: string | null;
|
|
1753
1323
|
id: string;
|
|
1754
|
-
createdAt: Date;
|
|
1755
|
-
updatedAt: Date;
|
|
1756
1324
|
setupComplete: boolean;
|
|
1757
1325
|
superAdminId: string | null;
|
|
1326
|
+
createdAt: Date;
|
|
1327
|
+
updatedAt: Date;
|
|
1758
1328
|
} | undefined>;
|
|
1759
1329
|
/**
|
|
1760
1330
|
* Update workspace settings
|
|
@@ -1762,10 +1332,10 @@ declare const createWorkspaceSettingsDataLayer: (db: Kysely<Database>) => {
|
|
|
1762
1332
|
updateWorkspaceSettings: (params: z$1.infer<typeof updateWorkspaceSettings>) => Promise<{
|
|
1763
1333
|
name: string | null;
|
|
1764
1334
|
id: string;
|
|
1765
|
-
createdAt: Date;
|
|
1766
|
-
updatedAt: Date;
|
|
1767
1335
|
setupComplete: boolean;
|
|
1768
1336
|
superAdminId: string | null;
|
|
1337
|
+
createdAt: Date;
|
|
1338
|
+
updatedAt: Date;
|
|
1769
1339
|
} | undefined>;
|
|
1770
1340
|
/**
|
|
1771
1341
|
* Get the super admin user ID
|
|
@@ -1785,10 +1355,98 @@ declare const createWorkspaceSettingsDataLayer: (db: Kysely<Database>) => {
|
|
|
1785
1355
|
markSetupComplete: () => Promise<{
|
|
1786
1356
|
name: string | null;
|
|
1787
1357
|
id: string;
|
|
1788
|
-
createdAt: Date;
|
|
1789
|
-
updatedAt: Date;
|
|
1790
1358
|
setupComplete: boolean;
|
|
1791
1359
|
superAdminId: string | null;
|
|
1360
|
+
createdAt: Date;
|
|
1361
|
+
updatedAt: Date;
|
|
1362
|
+
} | undefined>;
|
|
1363
|
+
};
|
|
1364
|
+
//#endregion
|
|
1365
|
+
//#region src/datalayer/providerConfigs.d.ts
|
|
1366
|
+
declare const createProviderConfig: z$1.ZodObject<{
|
|
1367
|
+
providerId: z$1.ZodString;
|
|
1368
|
+
config: z$1.ZodRecord<z$1.ZodString, z$1.ZodUnknown>;
|
|
1369
|
+
enabled: z$1.ZodDefault<z$1.ZodOptional<z$1.ZodBoolean>>;
|
|
1370
|
+
}, z$1.core.$strip>;
|
|
1371
|
+
declare const updateProviderConfig: z$1.ZodObject<{
|
|
1372
|
+
id: z$1.ZodUUID;
|
|
1373
|
+
config: z$1.ZodOptional<z$1.ZodRecord<z$1.ZodString, z$1.ZodUnknown>>;
|
|
1374
|
+
enabled: z$1.ZodOptional<z$1.ZodBoolean>;
|
|
1375
|
+
}, z$1.core.$strip>;
|
|
1376
|
+
declare const getProviderConfigById: z$1.ZodObject<{
|
|
1377
|
+
id: z$1.ZodUUID;
|
|
1378
|
+
}, z$1.core.$strip>;
|
|
1379
|
+
declare const getProviderConfigByProviderId: z$1.ZodObject<{
|
|
1380
|
+
providerId: z$1.ZodString;
|
|
1381
|
+
}, z$1.core.$strip>;
|
|
1382
|
+
declare const deleteProviderConfig: z$1.ZodObject<{
|
|
1383
|
+
id: z$1.ZodUUID;
|
|
1384
|
+
}, z$1.core.$strip>;
|
|
1385
|
+
declare const listProviderConfigs: z$1.ZodObject<{
|
|
1386
|
+
limit: z$1.ZodOptional<z$1.ZodNumber>;
|
|
1387
|
+
offset: z$1.ZodOptional<z$1.ZodNumber>;
|
|
1388
|
+
}, z$1.core.$strip>;
|
|
1389
|
+
declare const createProviderConfigsDataLayer: (db: Kysely<Database>) => {
|
|
1390
|
+
createProviderConfig: (params: z$1.infer<typeof createProviderConfig>) => Promise<{
|
|
1391
|
+
id: string;
|
|
1392
|
+
config: Record<string, unknown>;
|
|
1393
|
+
providerId: string;
|
|
1394
|
+
enabled: boolean;
|
|
1395
|
+
createdAt: Date;
|
|
1396
|
+
updatedAt: Date;
|
|
1397
|
+
} | undefined>;
|
|
1398
|
+
updateProviderConfig: (params: z$1.infer<typeof updateProviderConfig>) => Promise<{
|
|
1399
|
+
id: string;
|
|
1400
|
+
config: Record<string, unknown>;
|
|
1401
|
+
providerId: string;
|
|
1402
|
+
enabled: boolean;
|
|
1403
|
+
createdAt: Date;
|
|
1404
|
+
updatedAt: Date;
|
|
1405
|
+
} | undefined>;
|
|
1406
|
+
getProviderConfigById: (params: z$1.infer<typeof getProviderConfigById>) => Promise<{
|
|
1407
|
+
id: string;
|
|
1408
|
+
config: Record<string, unknown>;
|
|
1409
|
+
providerId: string;
|
|
1410
|
+
enabled: boolean;
|
|
1411
|
+
createdAt: Date;
|
|
1412
|
+
updatedAt: Date;
|
|
1413
|
+
} | undefined>;
|
|
1414
|
+
getProviderConfigByProviderId: (params: z$1.infer<typeof getProviderConfigByProviderId>) => Promise<{
|
|
1415
|
+
id: string;
|
|
1416
|
+
config: Record<string, unknown>;
|
|
1417
|
+
providerId: string;
|
|
1418
|
+
enabled: boolean;
|
|
1419
|
+
createdAt: Date;
|
|
1420
|
+
updatedAt: Date;
|
|
1421
|
+
} | undefined>;
|
|
1422
|
+
deleteProviderConfig: (params: z$1.infer<typeof deleteProviderConfig>) => Promise<{
|
|
1423
|
+
id: string;
|
|
1424
|
+
config: Record<string, unknown>;
|
|
1425
|
+
providerId: string;
|
|
1426
|
+
enabled: boolean;
|
|
1427
|
+
createdAt: Date;
|
|
1428
|
+
updatedAt: Date;
|
|
1429
|
+
} | undefined>;
|
|
1430
|
+
listProviderConfigs: (params?: z$1.infer<typeof listProviderConfigs>) => Promise<{
|
|
1431
|
+
id: string;
|
|
1432
|
+
config: Record<string, unknown>;
|
|
1433
|
+
providerId: string;
|
|
1434
|
+
enabled: boolean;
|
|
1435
|
+
createdAt: Date;
|
|
1436
|
+
updatedAt: Date;
|
|
1437
|
+
}[]>;
|
|
1438
|
+
countProviderConfigs: () => Promise<number>;
|
|
1439
|
+
/**
|
|
1440
|
+
* Upsert provider config - creates if not exists, updates if exists
|
|
1441
|
+
* Useful for the dashboard UI where you want to set/update a provider config
|
|
1442
|
+
*/
|
|
1443
|
+
upsertProviderConfig: (params: z$1.infer<typeof createProviderConfig>) => Promise<{
|
|
1444
|
+
id: string;
|
|
1445
|
+
config: Record<string, unknown>;
|
|
1446
|
+
providerId: string;
|
|
1447
|
+
enabled: boolean;
|
|
1448
|
+
createdAt: Date;
|
|
1449
|
+
updatedAt: Date;
|
|
1792
1450
|
} | undefined>;
|
|
1793
1451
|
};
|
|
1794
1452
|
//#endregion
|
|
@@ -1797,22 +1455,22 @@ declare const createDataLayer: (db: Kysely<Database>) => Promise<{
|
|
|
1797
1455
|
getWorkspaceSettings: () => Promise<{
|
|
1798
1456
|
name: string | null;
|
|
1799
1457
|
id: string;
|
|
1800
|
-
createdAt: Date;
|
|
1801
|
-
updatedAt: Date;
|
|
1802
1458
|
setupComplete: boolean;
|
|
1803
1459
|
superAdminId: string | null;
|
|
1460
|
+
createdAt: Date;
|
|
1461
|
+
updatedAt: Date;
|
|
1804
1462
|
} | undefined>;
|
|
1805
|
-
updateWorkspaceSettings: (params:
|
|
1806
|
-
name:
|
|
1807
|
-
setupComplete:
|
|
1808
|
-
superAdminId:
|
|
1463
|
+
updateWorkspaceSettings: (params: zod0.infer<zod0.ZodObject<{
|
|
1464
|
+
name: zod0.ZodOptional<zod0.ZodNullable<zod0.ZodString>>;
|
|
1465
|
+
setupComplete: zod0.ZodOptional<zod0.ZodBoolean>;
|
|
1466
|
+
superAdminId: zod0.ZodOptional<zod0.ZodNullable<zod0.ZodString>>;
|
|
1809
1467
|
}, better_auth0.$strip>>) => Promise<{
|
|
1810
1468
|
name: string | null;
|
|
1811
1469
|
id: string;
|
|
1812
|
-
createdAt: Date;
|
|
1813
|
-
updatedAt: Date;
|
|
1814
1470
|
setupComplete: boolean;
|
|
1815
1471
|
superAdminId: string | null;
|
|
1472
|
+
createdAt: Date;
|
|
1473
|
+
updatedAt: Date;
|
|
1816
1474
|
} | undefined>;
|
|
1817
1475
|
getSuperAdminId: () => Promise<string | null>;
|
|
1818
1476
|
setSuperAdminId: (userId: string) => Promise<boolean>;
|
|
@@ -1820,430 +1478,506 @@ declare const createDataLayer: (db: Kysely<Database>) => Promise<{
|
|
|
1820
1478
|
markSetupComplete: () => Promise<{
|
|
1821
1479
|
name: string | null;
|
|
1822
1480
|
id: string;
|
|
1823
|
-
createdAt: Date;
|
|
1824
|
-
updatedAt: Date;
|
|
1825
1481
|
setupComplete: boolean;
|
|
1826
1482
|
superAdminId: string | null;
|
|
1483
|
+
createdAt: Date;
|
|
1484
|
+
updatedAt: Date;
|
|
1827
1485
|
} | undefined>;
|
|
1828
|
-
createVariantVersion: (params:
|
|
1829
|
-
variantId:
|
|
1830
|
-
provider:
|
|
1831
|
-
modelName:
|
|
1832
|
-
jsonData:
|
|
1486
|
+
createVariantVersion: (params: zod0.infer<zod0.ZodObject<{
|
|
1487
|
+
variantId: zod0.ZodString;
|
|
1488
|
+
provider: zod0.ZodString;
|
|
1489
|
+
modelName: zod0.ZodString;
|
|
1490
|
+
jsonData: zod0.ZodDefault<zod0.ZodOptional<zod0.ZodRecord<zod0.ZodString, zod0.ZodUnknown>>>;
|
|
1833
1491
|
}, better_auth0.$strip>>) => Promise<{
|
|
1834
1492
|
version: number;
|
|
1835
|
-
id: string;
|
|
1836
|
-
createdAt: Date;
|
|
1837
|
-
updatedAt: Date;
|
|
1838
1493
|
variantId: string;
|
|
1494
|
+
id: string;
|
|
1839
1495
|
provider: string;
|
|
1840
1496
|
modelName: string;
|
|
1841
1497
|
jsonData: Record<string, unknown>;
|
|
1498
|
+
createdAt: Date;
|
|
1499
|
+
updatedAt: Date;
|
|
1842
1500
|
} | undefined>;
|
|
1843
|
-
getVariantVersionById: (params:
|
|
1844
|
-
id:
|
|
1501
|
+
getVariantVersionById: (params: zod0.infer<zod0.ZodObject<{
|
|
1502
|
+
id: zod0.ZodString;
|
|
1845
1503
|
}, better_auth0.$strip>>) => Promise<{
|
|
1846
1504
|
version: number;
|
|
1847
|
-
id: string;
|
|
1848
|
-
createdAt: Date;
|
|
1849
|
-
updatedAt: Date;
|
|
1850
1505
|
variantId: string;
|
|
1506
|
+
id: string;
|
|
1851
1507
|
provider: string;
|
|
1852
1508
|
modelName: string;
|
|
1853
1509
|
jsonData: Record<string, unknown>;
|
|
1510
|
+
createdAt: Date;
|
|
1511
|
+
updatedAt: Date;
|
|
1854
1512
|
} | undefined>;
|
|
1855
|
-
getVariantVersionsByVariantId: (params:
|
|
1856
|
-
variantId:
|
|
1857
|
-
limit:
|
|
1858
|
-
offset:
|
|
1513
|
+
getVariantVersionsByVariantId: (params: zod0.infer<zod0.ZodObject<{
|
|
1514
|
+
variantId: zod0.ZodString;
|
|
1515
|
+
limit: zod0.ZodOptional<zod0.ZodNumber>;
|
|
1516
|
+
offset: zod0.ZodOptional<zod0.ZodNumber>;
|
|
1859
1517
|
}, better_auth0.$strip>>) => Promise<{
|
|
1860
1518
|
version: number;
|
|
1861
|
-
id: string;
|
|
1862
|
-
createdAt: Date;
|
|
1863
|
-
updatedAt: Date;
|
|
1864
1519
|
variantId: string;
|
|
1520
|
+
id: string;
|
|
1865
1521
|
provider: string;
|
|
1866
1522
|
modelName: string;
|
|
1867
1523
|
jsonData: Record<string, unknown>;
|
|
1524
|
+
createdAt: Date;
|
|
1525
|
+
updatedAt: Date;
|
|
1868
1526
|
}[]>;
|
|
1869
|
-
getLatestVariantVersion: (params:
|
|
1870
|
-
variantId:
|
|
1527
|
+
getLatestVariantVersion: (params: zod0.infer<zod0.ZodObject<{
|
|
1528
|
+
variantId: zod0.ZodString;
|
|
1871
1529
|
}, better_auth0.$strip>>) => Promise<{
|
|
1872
1530
|
version: number;
|
|
1873
|
-
id: string;
|
|
1874
|
-
createdAt: Date;
|
|
1875
|
-
updatedAt: Date;
|
|
1876
1531
|
variantId: string;
|
|
1532
|
+
id: string;
|
|
1877
1533
|
provider: string;
|
|
1878
1534
|
modelName: string;
|
|
1879
1535
|
jsonData: Record<string, unknown>;
|
|
1536
|
+
createdAt: Date;
|
|
1537
|
+
updatedAt: Date;
|
|
1880
1538
|
} | undefined>;
|
|
1881
|
-
getVariantVersionByNumber: (params:
|
|
1882
|
-
variantId:
|
|
1883
|
-
version:
|
|
1539
|
+
getVariantVersionByNumber: (params: zod0.infer<zod0.ZodObject<{
|
|
1540
|
+
variantId: zod0.ZodString;
|
|
1541
|
+
version: zod0.ZodNumber;
|
|
1884
1542
|
}, better_auth0.$strip>>) => Promise<{
|
|
1885
1543
|
version: number;
|
|
1886
|
-
id: string;
|
|
1887
|
-
createdAt: Date;
|
|
1888
|
-
updatedAt: Date;
|
|
1889
1544
|
variantId: string;
|
|
1545
|
+
id: string;
|
|
1890
1546
|
provider: string;
|
|
1891
1547
|
modelName: string;
|
|
1892
1548
|
jsonData: Record<string, unknown>;
|
|
1549
|
+
createdAt: Date;
|
|
1550
|
+
updatedAt: Date;
|
|
1893
1551
|
} | undefined>;
|
|
1894
|
-
deleteVariantVersion: (params:
|
|
1895
|
-
id:
|
|
1552
|
+
deleteVariantVersion: (params: zod0.infer<zod0.ZodObject<{
|
|
1553
|
+
id: zod0.ZodString;
|
|
1896
1554
|
}, better_auth0.$strip>>) => Promise<{
|
|
1897
1555
|
version: number;
|
|
1898
|
-
id: string;
|
|
1899
|
-
createdAt: Date;
|
|
1900
|
-
updatedAt: Date;
|
|
1901
1556
|
variantId: string;
|
|
1557
|
+
id: string;
|
|
1902
1558
|
provider: string;
|
|
1903
1559
|
modelName: string;
|
|
1904
1560
|
jsonData: Record<string, unknown>;
|
|
1561
|
+
createdAt: Date;
|
|
1562
|
+
updatedAt: Date;
|
|
1905
1563
|
} | undefined>;
|
|
1906
|
-
deleteVariantVersionsByVariantId: (params:
|
|
1907
|
-
variantId:
|
|
1564
|
+
deleteVariantVersionsByVariantId: (params: zod0.infer<zod0.ZodObject<{
|
|
1565
|
+
variantId: zod0.ZodString;
|
|
1908
1566
|
}, better_auth0.$strip>>) => Promise<{
|
|
1909
1567
|
version: number;
|
|
1910
|
-
id: string;
|
|
1911
|
-
createdAt: Date;
|
|
1912
|
-
updatedAt: Date;
|
|
1913
1568
|
variantId: string;
|
|
1569
|
+
id: string;
|
|
1914
1570
|
provider: string;
|
|
1915
1571
|
modelName: string;
|
|
1916
1572
|
jsonData: Record<string, unknown>;
|
|
1573
|
+
createdAt: Date;
|
|
1574
|
+
updatedAt: Date;
|
|
1917
1575
|
}[]>;
|
|
1918
|
-
getVariantVersionWithVariant: (params:
|
|
1919
|
-
id:
|
|
1576
|
+
getVariantVersionWithVariant: (params: zod0.infer<zod0.ZodObject<{
|
|
1577
|
+
id: zod0.ZodString;
|
|
1920
1578
|
}, better_auth0.$strip>>) => Promise<{
|
|
1921
1579
|
version: number;
|
|
1922
|
-
id: string;
|
|
1923
|
-
createdAt: Date;
|
|
1924
|
-
updatedAt: Date;
|
|
1925
1580
|
variantId: string;
|
|
1581
|
+
id: string;
|
|
1926
1582
|
provider: string;
|
|
1927
1583
|
modelName: string;
|
|
1928
1584
|
jsonData: Record<string, unknown>;
|
|
1585
|
+
createdAt: Date;
|
|
1586
|
+
updatedAt: Date;
|
|
1929
1587
|
variantName: string;
|
|
1930
1588
|
} | undefined>;
|
|
1931
|
-
getVariantVersionsWithVariantByVariantId: (params:
|
|
1932
|
-
variantId:
|
|
1933
|
-
limit:
|
|
1934
|
-
offset:
|
|
1589
|
+
getVariantVersionsWithVariantByVariantId: (params: zod0.infer<zod0.ZodObject<{
|
|
1590
|
+
variantId: zod0.ZodString;
|
|
1591
|
+
limit: zod0.ZodOptional<zod0.ZodNumber>;
|
|
1592
|
+
offset: zod0.ZodOptional<zod0.ZodNumber>;
|
|
1935
1593
|
}, better_auth0.$strip>>) => Promise<{
|
|
1936
1594
|
version: number;
|
|
1937
|
-
id: string;
|
|
1938
|
-
createdAt: Date;
|
|
1939
|
-
updatedAt: Date;
|
|
1940
1595
|
variantId: string;
|
|
1596
|
+
id: string;
|
|
1941
1597
|
provider: string;
|
|
1942
1598
|
modelName: string;
|
|
1943
1599
|
jsonData: Record<string, unknown>;
|
|
1600
|
+
createdAt: Date;
|
|
1601
|
+
updatedAt: Date;
|
|
1944
1602
|
variantName: string;
|
|
1945
1603
|
}[]>;
|
|
1946
|
-
createVariant: (params:
|
|
1947
|
-
name:
|
|
1604
|
+
createVariant: (params: zod0.infer<zod0.ZodObject<{
|
|
1605
|
+
name: zod0.ZodString;
|
|
1948
1606
|
}, better_auth0.$strip>>) => Promise<{
|
|
1949
1607
|
name: string;
|
|
1950
1608
|
id: string;
|
|
1951
1609
|
createdAt: Date;
|
|
1952
1610
|
updatedAt: Date;
|
|
1953
1611
|
} | undefined>;
|
|
1954
|
-
updateVariant: (params:
|
|
1955
|
-
variantId:
|
|
1956
|
-
name:
|
|
1612
|
+
updateVariant: (params: zod0.infer<zod0.ZodObject<{
|
|
1613
|
+
variantId: zod0.ZodString;
|
|
1614
|
+
name: zod0.ZodOptional<zod0.ZodString>;
|
|
1957
1615
|
}, better_auth0.$strip>>) => Promise<{
|
|
1958
1616
|
name: string;
|
|
1959
1617
|
id: string;
|
|
1960
1618
|
createdAt: Date;
|
|
1961
1619
|
updatedAt: Date;
|
|
1962
1620
|
} | undefined>;
|
|
1963
|
-
getVariantById: (params:
|
|
1964
|
-
variantId:
|
|
1621
|
+
getVariantById: (params: zod0.infer<zod0.ZodObject<{
|
|
1622
|
+
variantId: zod0.ZodString;
|
|
1965
1623
|
}, better_auth0.$strip>>) => Promise<{
|
|
1966
1624
|
name: string;
|
|
1967
1625
|
id: string;
|
|
1968
1626
|
createdAt: Date;
|
|
1969
1627
|
updatedAt: Date;
|
|
1970
1628
|
} | undefined>;
|
|
1971
|
-
getVariantWithLatestVersion: (params:
|
|
1972
|
-
variantId:
|
|
1629
|
+
getVariantWithLatestVersion: (params: zod0.infer<zod0.ZodObject<{
|
|
1630
|
+
variantId: zod0.ZodString;
|
|
1973
1631
|
}, better_auth0.$strip>>) => Promise<{
|
|
1974
1632
|
latestVersion: {
|
|
1975
1633
|
version: number;
|
|
1976
|
-
id: string;
|
|
1977
|
-
createdAt: Date;
|
|
1978
|
-
updatedAt: Date;
|
|
1979
1634
|
variantId: string;
|
|
1635
|
+
id: string;
|
|
1980
1636
|
provider: string;
|
|
1981
1637
|
modelName: string;
|
|
1982
1638
|
jsonData: Record<string, unknown>;
|
|
1639
|
+
createdAt: Date;
|
|
1640
|
+
updatedAt: Date;
|
|
1983
1641
|
} | null;
|
|
1984
1642
|
name: string;
|
|
1985
1643
|
id: string;
|
|
1986
1644
|
createdAt: Date;
|
|
1987
1645
|
updatedAt: Date;
|
|
1988
1646
|
} | undefined>;
|
|
1989
|
-
deleteVariant: (params:
|
|
1990
|
-
variantId:
|
|
1647
|
+
deleteVariant: (params: zod0.infer<zod0.ZodObject<{
|
|
1648
|
+
variantId: zod0.ZodString;
|
|
1991
1649
|
}, better_auth0.$strip>>) => Promise<{
|
|
1992
1650
|
name: string;
|
|
1993
1651
|
id: string;
|
|
1994
1652
|
createdAt: Date;
|
|
1995
1653
|
updatedAt: Date;
|
|
1996
1654
|
} | undefined>;
|
|
1997
|
-
listVariants: (params?:
|
|
1998
|
-
limit:
|
|
1999
|
-
offset:
|
|
1655
|
+
listVariants: (params?: zod0.infer<zod0.ZodObject<{
|
|
1656
|
+
limit: zod0.ZodOptional<zod0.ZodNumber>;
|
|
1657
|
+
offset: zod0.ZodOptional<zod0.ZodNumber>;
|
|
2000
1658
|
}, better_auth0.$strip>>) => Promise<{
|
|
2001
1659
|
name: string;
|
|
2002
1660
|
id: string;
|
|
2003
1661
|
createdAt: Date;
|
|
2004
1662
|
updatedAt: Date;
|
|
2005
1663
|
}[]>;
|
|
2006
|
-
listVariantsWithLatestVersion: (params?:
|
|
2007
|
-
limit:
|
|
2008
|
-
offset:
|
|
1664
|
+
listVariantsWithLatestVersion: (params?: zod0.infer<zod0.ZodObject<{
|
|
1665
|
+
limit: zod0.ZodOptional<zod0.ZodNumber>;
|
|
1666
|
+
offset: zod0.ZodOptional<zod0.ZodNumber>;
|
|
2009
1667
|
}, better_auth0.$strip>>) => Promise<{
|
|
2010
1668
|
latestVersion: {
|
|
2011
1669
|
version: number;
|
|
2012
|
-
id: string;
|
|
2013
|
-
createdAt: Date;
|
|
2014
|
-
updatedAt: Date;
|
|
2015
1670
|
variantId: string;
|
|
1671
|
+
id: string;
|
|
2016
1672
|
provider: string;
|
|
2017
1673
|
modelName: string;
|
|
2018
1674
|
jsonData: Record<string, unknown>;
|
|
1675
|
+
createdAt: Date;
|
|
1676
|
+
updatedAt: Date;
|
|
2019
1677
|
} | null;
|
|
2020
1678
|
name: string;
|
|
2021
1679
|
id: string;
|
|
2022
1680
|
createdAt: Date;
|
|
2023
1681
|
updatedAt: Date;
|
|
2024
1682
|
}[]>;
|
|
2025
|
-
createTargetingRule: (params:
|
|
2026
|
-
environmentId:
|
|
2027
|
-
configId:
|
|
2028
|
-
configVariantId:
|
|
2029
|
-
variantVersionId:
|
|
2030
|
-
weight:
|
|
2031
|
-
priority:
|
|
2032
|
-
enabled:
|
|
2033
|
-
conditions:
|
|
1683
|
+
createTargetingRule: (params: zod0.infer<zod0.ZodObject<{
|
|
1684
|
+
environmentId: zod0.ZodString;
|
|
1685
|
+
configId: zod0.ZodString;
|
|
1686
|
+
configVariantId: zod0.ZodString;
|
|
1687
|
+
variantVersionId: zod0.ZodOptional<zod0.ZodNullable<zod0.ZodString>>;
|
|
1688
|
+
weight: zod0.ZodDefault<zod0.ZodOptional<zod0.ZodNumber>>;
|
|
1689
|
+
priority: zod0.ZodDefault<zod0.ZodOptional<zod0.ZodNumber>>;
|
|
1690
|
+
enabled: zod0.ZodDefault<zod0.ZodOptional<zod0.ZodBoolean>>;
|
|
1691
|
+
conditions: zod0.ZodOptional<zod0.ZodNullable<zod0.ZodRecord<zod0.ZodString, zod0.ZodUnknown>>>;
|
|
2034
1692
|
}, better_auth0.$strip>>) => Promise<{
|
|
1693
|
+
configId: string;
|
|
2035
1694
|
id: string;
|
|
2036
|
-
createdAt: Date;
|
|
2037
|
-
updatedAt: Date;
|
|
2038
1695
|
environmentId: string;
|
|
2039
|
-
|
|
1696
|
+
enabled: boolean;
|
|
2040
1697
|
configVariantId: string;
|
|
2041
1698
|
variantVersionId: string | null;
|
|
2042
1699
|
weight: number;
|
|
2043
1700
|
priority: number;
|
|
2044
|
-
enabled: boolean;
|
|
2045
1701
|
conditions: Record<string, unknown>;
|
|
1702
|
+
createdAt: Date;
|
|
1703
|
+
updatedAt: Date;
|
|
2046
1704
|
} | undefined>;
|
|
2047
|
-
updateTargetingRule: (params:
|
|
2048
|
-
id:
|
|
2049
|
-
variantVersionId:
|
|
2050
|
-
weight:
|
|
2051
|
-
priority:
|
|
2052
|
-
enabled:
|
|
2053
|
-
conditions:
|
|
1705
|
+
updateTargetingRule: (params: zod0.infer<zod0.ZodObject<{
|
|
1706
|
+
id: zod0.ZodString;
|
|
1707
|
+
variantVersionId: zod0.ZodOptional<zod0.ZodNullable<zod0.ZodString>>;
|
|
1708
|
+
weight: zod0.ZodOptional<zod0.ZodNumber>;
|
|
1709
|
+
priority: zod0.ZodOptional<zod0.ZodNumber>;
|
|
1710
|
+
enabled: zod0.ZodOptional<zod0.ZodBoolean>;
|
|
1711
|
+
conditions: zod0.ZodOptional<zod0.ZodNullable<zod0.ZodRecord<zod0.ZodString, zod0.ZodUnknown>>>;
|
|
2054
1712
|
}, better_auth0.$strip>>) => Promise<{
|
|
1713
|
+
configId: string;
|
|
2055
1714
|
id: string;
|
|
2056
|
-
createdAt: Date;
|
|
2057
|
-
updatedAt: Date;
|
|
2058
1715
|
environmentId: string;
|
|
2059
|
-
|
|
1716
|
+
enabled: boolean;
|
|
2060
1717
|
configVariantId: string;
|
|
2061
1718
|
variantVersionId: string | null;
|
|
2062
1719
|
weight: number;
|
|
2063
1720
|
priority: number;
|
|
2064
|
-
enabled: boolean;
|
|
2065
1721
|
conditions: Record<string, unknown>;
|
|
1722
|
+
createdAt: Date;
|
|
1723
|
+
updatedAt: Date;
|
|
2066
1724
|
} | undefined>;
|
|
2067
|
-
getTargetingRuleById: (params:
|
|
2068
|
-
id:
|
|
1725
|
+
getTargetingRuleById: (params: zod0.infer<zod0.ZodObject<{
|
|
1726
|
+
id: zod0.ZodString;
|
|
2069
1727
|
}, better_auth0.$strip>>) => Promise<{
|
|
1728
|
+
configId: string;
|
|
2070
1729
|
id: string;
|
|
2071
|
-
createdAt: Date;
|
|
2072
|
-
updatedAt: Date;
|
|
2073
1730
|
environmentId: string;
|
|
2074
|
-
|
|
1731
|
+
enabled: boolean;
|
|
2075
1732
|
configVariantId: string;
|
|
2076
1733
|
variantVersionId: string | null;
|
|
2077
1734
|
weight: number;
|
|
2078
1735
|
priority: number;
|
|
2079
|
-
enabled: boolean;
|
|
2080
1736
|
conditions: Record<string, unknown>;
|
|
2081
|
-
} | undefined>;
|
|
2082
|
-
getTargetingRulesByConfigId: (params: zod29.infer<zod29.ZodObject<{
|
|
2083
|
-
configId: zod29.ZodString;
|
|
2084
|
-
limit: zod29.ZodOptional<zod29.ZodNumber>;
|
|
2085
|
-
offset: zod29.ZodOptional<zod29.ZodNumber>;
|
|
2086
|
-
}, better_auth0.$strip>>) => Promise<{
|
|
2087
|
-
id: string;
|
|
2088
1737
|
createdAt: Date;
|
|
2089
1738
|
updatedAt: Date;
|
|
2090
|
-
|
|
1739
|
+
} | undefined>;
|
|
1740
|
+
getTargetingRulesByConfigId: (params: zod0.infer<zod0.ZodObject<{
|
|
1741
|
+
configId: zod0.ZodString;
|
|
1742
|
+
limit: zod0.ZodOptional<zod0.ZodNumber>;
|
|
1743
|
+
offset: zod0.ZodOptional<zod0.ZodNumber>;
|
|
1744
|
+
}, better_auth0.$strip>>) => Promise<{
|
|
2091
1745
|
configId: string;
|
|
1746
|
+
id: string;
|
|
1747
|
+
environmentId: string;
|
|
1748
|
+
enabled: boolean;
|
|
2092
1749
|
configVariantId: string;
|
|
2093
1750
|
variantVersionId: string | null;
|
|
2094
1751
|
weight: number;
|
|
2095
1752
|
priority: number;
|
|
2096
|
-
enabled: boolean;
|
|
2097
1753
|
conditions: Record<string, unknown>;
|
|
1754
|
+
createdAt: Date;
|
|
1755
|
+
updatedAt: Date;
|
|
2098
1756
|
}[]>;
|
|
2099
|
-
getTargetingRulesByEnvironmentId: (params:
|
|
2100
|
-
environmentId:
|
|
2101
|
-
limit:
|
|
2102
|
-
offset:
|
|
1757
|
+
getTargetingRulesByEnvironmentId: (params: zod0.infer<zod0.ZodObject<{
|
|
1758
|
+
environmentId: zod0.ZodString;
|
|
1759
|
+
limit: zod0.ZodOptional<zod0.ZodNumber>;
|
|
1760
|
+
offset: zod0.ZodOptional<zod0.ZodNumber>;
|
|
2103
1761
|
}, better_auth0.$strip>>) => Promise<{
|
|
1762
|
+
configId: string;
|
|
2104
1763
|
id: string;
|
|
2105
|
-
createdAt: Date;
|
|
2106
|
-
updatedAt: Date;
|
|
2107
1764
|
environmentId: string;
|
|
2108
|
-
|
|
1765
|
+
enabled: boolean;
|
|
2109
1766
|
configVariantId: string;
|
|
2110
1767
|
variantVersionId: string | null;
|
|
2111
1768
|
weight: number;
|
|
2112
1769
|
priority: number;
|
|
2113
|
-
enabled: boolean;
|
|
2114
1770
|
conditions: Record<string, unknown>;
|
|
1771
|
+
createdAt: Date;
|
|
1772
|
+
updatedAt: Date;
|
|
2115
1773
|
}[]>;
|
|
2116
|
-
getTargetingRulesByConfigAndEnvironment: (params:
|
|
2117
|
-
configId:
|
|
2118
|
-
environmentId:
|
|
1774
|
+
getTargetingRulesByConfigAndEnvironment: (params: zod0.infer<zod0.ZodObject<{
|
|
1775
|
+
configId: zod0.ZodString;
|
|
1776
|
+
environmentId: zod0.ZodString;
|
|
2119
1777
|
}, better_auth0.$strip>>) => Promise<{
|
|
1778
|
+
configId: string;
|
|
2120
1779
|
id: string;
|
|
2121
|
-
createdAt: Date;
|
|
2122
|
-
updatedAt: Date;
|
|
2123
1780
|
environmentId: string;
|
|
2124
|
-
|
|
1781
|
+
enabled: boolean;
|
|
2125
1782
|
configVariantId: string;
|
|
2126
1783
|
variantVersionId: string | null;
|
|
2127
1784
|
weight: number;
|
|
2128
1785
|
priority: number;
|
|
2129
|
-
enabled: boolean;
|
|
2130
1786
|
conditions: Record<string, unknown>;
|
|
1787
|
+
createdAt: Date;
|
|
1788
|
+
updatedAt: Date;
|
|
2131
1789
|
}[]>;
|
|
2132
|
-
deleteTargetingRule: (params:
|
|
2133
|
-
id:
|
|
1790
|
+
deleteTargetingRule: (params: zod0.infer<zod0.ZodObject<{
|
|
1791
|
+
id: zod0.ZodString;
|
|
2134
1792
|
}, better_auth0.$strip>>) => Promise<{
|
|
1793
|
+
configId: string;
|
|
2135
1794
|
id: string;
|
|
2136
|
-
createdAt: Date;
|
|
2137
|
-
updatedAt: Date;
|
|
2138
1795
|
environmentId: string;
|
|
2139
|
-
|
|
1796
|
+
enabled: boolean;
|
|
2140
1797
|
configVariantId: string;
|
|
2141
1798
|
variantVersionId: string | null;
|
|
2142
1799
|
weight: number;
|
|
2143
1800
|
priority: number;
|
|
2144
|
-
enabled: boolean;
|
|
2145
1801
|
conditions: Record<string, unknown>;
|
|
1802
|
+
createdAt: Date;
|
|
1803
|
+
updatedAt: Date;
|
|
2146
1804
|
} | undefined>;
|
|
2147
|
-
deleteTargetingRulesByConfigId: (params:
|
|
2148
|
-
configId:
|
|
1805
|
+
deleteTargetingRulesByConfigId: (params: zod0.infer<zod0.ZodObject<{
|
|
1806
|
+
configId: zod0.ZodString;
|
|
2149
1807
|
}, better_auth0.$strip>>) => Promise<{
|
|
1808
|
+
configId: string;
|
|
2150
1809
|
id: string;
|
|
2151
|
-
createdAt: Date;
|
|
2152
|
-
updatedAt: Date;
|
|
2153
1810
|
environmentId: string;
|
|
2154
|
-
|
|
1811
|
+
enabled: boolean;
|
|
2155
1812
|
configVariantId: string;
|
|
2156
1813
|
variantVersionId: string | null;
|
|
2157
1814
|
weight: number;
|
|
2158
1815
|
priority: number;
|
|
2159
|
-
enabled: boolean;
|
|
2160
1816
|
conditions: Record<string, unknown>;
|
|
1817
|
+
createdAt: Date;
|
|
1818
|
+
updatedAt: Date;
|
|
2161
1819
|
}[]>;
|
|
2162
|
-
deleteTargetingRulesByEnvironmentId: (params:
|
|
2163
|
-
environmentId:
|
|
1820
|
+
deleteTargetingRulesByEnvironmentId: (params: zod0.infer<zod0.ZodObject<{
|
|
1821
|
+
environmentId: zod0.ZodString;
|
|
2164
1822
|
}, better_auth0.$strip>>) => Promise<{
|
|
1823
|
+
configId: string;
|
|
2165
1824
|
id: string;
|
|
2166
|
-
createdAt: Date;
|
|
2167
|
-
updatedAt: Date;
|
|
2168
1825
|
environmentId: string;
|
|
2169
|
-
|
|
1826
|
+
enabled: boolean;
|
|
2170
1827
|
configVariantId: string;
|
|
2171
1828
|
variantVersionId: string | null;
|
|
2172
1829
|
weight: number;
|
|
2173
1830
|
priority: number;
|
|
2174
|
-
enabled: boolean;
|
|
2175
1831
|
conditions: Record<string, unknown>;
|
|
1832
|
+
createdAt: Date;
|
|
1833
|
+
updatedAt: Date;
|
|
2176
1834
|
}[]>;
|
|
2177
|
-
listTargetingRules: (params?:
|
|
2178
|
-
limit:
|
|
2179
|
-
offset:
|
|
1835
|
+
listTargetingRules: (params?: zod0.infer<zod0.ZodObject<{
|
|
1836
|
+
limit: zod0.ZodOptional<zod0.ZodNumber>;
|
|
1837
|
+
offset: zod0.ZodOptional<zod0.ZodNumber>;
|
|
2180
1838
|
}, better_auth0.$strip>>) => Promise<{
|
|
1839
|
+
configId: string;
|
|
2181
1840
|
id: string;
|
|
2182
|
-
createdAt: Date;
|
|
2183
|
-
updatedAt: Date;
|
|
2184
1841
|
environmentId: string;
|
|
2185
|
-
|
|
1842
|
+
enabled: boolean;
|
|
2186
1843
|
configVariantId: string;
|
|
2187
1844
|
variantVersionId: string | null;
|
|
2188
1845
|
weight: number;
|
|
2189
1846
|
priority: number;
|
|
2190
|
-
enabled: boolean;
|
|
2191
1847
|
conditions: Record<string, unknown>;
|
|
1848
|
+
createdAt: Date;
|
|
1849
|
+
updatedAt: Date;
|
|
2192
1850
|
}[]>;
|
|
2193
|
-
getTargetingRulesWithDetailsByConfigId: (params:
|
|
2194
|
-
configId:
|
|
2195
|
-
limit:
|
|
2196
|
-
offset:
|
|
1851
|
+
getTargetingRulesWithDetailsByConfigId: (params: zod0.infer<zod0.ZodObject<{
|
|
1852
|
+
configId: zod0.ZodString;
|
|
1853
|
+
limit: zod0.ZodOptional<zod0.ZodNumber>;
|
|
1854
|
+
offset: zod0.ZodOptional<zod0.ZodNumber>;
|
|
2197
1855
|
}, better_auth0.$strip>>) => Promise<{
|
|
2198
1856
|
variantProvider: string | null;
|
|
2199
1857
|
variantModelName: string | null;
|
|
2200
1858
|
pinnedVersion: number | null | undefined;
|
|
2201
1859
|
latestVersion: number | null | undefined;
|
|
2202
1860
|
variantName: string | null;
|
|
1861
|
+
configId: string;
|
|
2203
1862
|
id: string;
|
|
2204
|
-
createdAt: Date;
|
|
2205
|
-
updatedAt: Date;
|
|
2206
1863
|
environmentId: string;
|
|
2207
|
-
|
|
1864
|
+
enabled: boolean;
|
|
2208
1865
|
configVariantId: string;
|
|
2209
1866
|
variantVersionId: string | null;
|
|
2210
1867
|
weight: number;
|
|
2211
1868
|
priority: number;
|
|
2212
|
-
enabled: boolean;
|
|
2213
1869
|
conditions: Record<string, unknown>;
|
|
1870
|
+
createdAt: Date;
|
|
1871
|
+
updatedAt: Date;
|
|
2214
1872
|
variantId: string | null;
|
|
2215
1873
|
environmentName: string | null;
|
|
2216
1874
|
environmentSlug: string | null;
|
|
2217
1875
|
}[]>;
|
|
2218
|
-
setTargetingForEnvironment: (params:
|
|
2219
|
-
environmentId:
|
|
2220
|
-
configId:
|
|
2221
|
-
configVariantId:
|
|
2222
|
-
variantVersionId:
|
|
1876
|
+
setTargetingForEnvironment: (params: zod0.infer<zod0.ZodObject<{
|
|
1877
|
+
environmentId: zod0.ZodString;
|
|
1878
|
+
configId: zod0.ZodString;
|
|
1879
|
+
configVariantId: zod0.ZodString;
|
|
1880
|
+
variantVersionId: zod0.ZodOptional<zod0.ZodNullable<zod0.ZodString>>;
|
|
2223
1881
|
}, better_auth0.$strip>>) => Promise<{
|
|
1882
|
+
configId: string;
|
|
2224
1883
|
id: string;
|
|
2225
|
-
createdAt: Date;
|
|
2226
|
-
updatedAt: Date;
|
|
2227
1884
|
environmentId: string;
|
|
2228
|
-
|
|
1885
|
+
enabled: boolean;
|
|
2229
1886
|
configVariantId: string;
|
|
2230
1887
|
variantVersionId: string | null;
|
|
2231
1888
|
weight: number;
|
|
2232
1889
|
priority: number;
|
|
2233
|
-
enabled: boolean;
|
|
2234
1890
|
conditions: Record<string, unknown>;
|
|
1891
|
+
createdAt: Date;
|
|
1892
|
+
updatedAt: Date;
|
|
1893
|
+
} | undefined>;
|
|
1894
|
+
createProviderConfig: (params: zod0.infer<zod0.ZodObject<{
|
|
1895
|
+
providerId: zod0.ZodString;
|
|
1896
|
+
config: zod0.ZodRecord<zod0.ZodString, zod0.ZodUnknown>;
|
|
1897
|
+
enabled: zod0.ZodDefault<zod0.ZodOptional<zod0.ZodBoolean>>;
|
|
1898
|
+
}, better_auth0.$strip>>) => Promise<{
|
|
1899
|
+
id: string;
|
|
1900
|
+
config: Record<string, unknown>;
|
|
1901
|
+
providerId: string;
|
|
1902
|
+
enabled: boolean;
|
|
1903
|
+
createdAt: Date;
|
|
1904
|
+
updatedAt: Date;
|
|
1905
|
+
} | undefined>;
|
|
1906
|
+
updateProviderConfig: (params: zod0.infer<zod0.ZodObject<{
|
|
1907
|
+
id: zod0.ZodUUID;
|
|
1908
|
+
config: zod0.ZodOptional<zod0.ZodRecord<zod0.ZodString, zod0.ZodUnknown>>;
|
|
1909
|
+
enabled: zod0.ZodOptional<zod0.ZodBoolean>;
|
|
1910
|
+
}, better_auth0.$strip>>) => Promise<{
|
|
1911
|
+
id: string;
|
|
1912
|
+
config: Record<string, unknown>;
|
|
1913
|
+
providerId: string;
|
|
1914
|
+
enabled: boolean;
|
|
1915
|
+
createdAt: Date;
|
|
1916
|
+
updatedAt: Date;
|
|
1917
|
+
} | undefined>;
|
|
1918
|
+
getProviderConfigById: (params: zod0.infer<zod0.ZodObject<{
|
|
1919
|
+
id: zod0.ZodUUID;
|
|
1920
|
+
}, better_auth0.$strip>>) => Promise<{
|
|
1921
|
+
id: string;
|
|
1922
|
+
config: Record<string, unknown>;
|
|
1923
|
+
providerId: string;
|
|
1924
|
+
enabled: boolean;
|
|
1925
|
+
createdAt: Date;
|
|
1926
|
+
updatedAt: Date;
|
|
1927
|
+
} | undefined>;
|
|
1928
|
+
getProviderConfigByProviderId: (params: zod0.infer<zod0.ZodObject<{
|
|
1929
|
+
providerId: zod0.ZodString;
|
|
1930
|
+
}, better_auth0.$strip>>) => Promise<{
|
|
1931
|
+
id: string;
|
|
1932
|
+
config: Record<string, unknown>;
|
|
1933
|
+
providerId: string;
|
|
1934
|
+
enabled: boolean;
|
|
1935
|
+
createdAt: Date;
|
|
1936
|
+
updatedAt: Date;
|
|
1937
|
+
} | undefined>;
|
|
1938
|
+
deleteProviderConfig: (params: zod0.infer<zod0.ZodObject<{
|
|
1939
|
+
id: zod0.ZodUUID;
|
|
1940
|
+
}, better_auth0.$strip>>) => Promise<{
|
|
1941
|
+
id: string;
|
|
1942
|
+
config: Record<string, unknown>;
|
|
1943
|
+
providerId: string;
|
|
1944
|
+
enabled: boolean;
|
|
1945
|
+
createdAt: Date;
|
|
1946
|
+
updatedAt: Date;
|
|
1947
|
+
} | undefined>;
|
|
1948
|
+
listProviderConfigs: (params?: zod0.infer<zod0.ZodObject<{
|
|
1949
|
+
limit: zod0.ZodOptional<zod0.ZodNumber>;
|
|
1950
|
+
offset: zod0.ZodOptional<zod0.ZodNumber>;
|
|
1951
|
+
}, better_auth0.$strip>>) => Promise<{
|
|
1952
|
+
id: string;
|
|
1953
|
+
config: Record<string, unknown>;
|
|
1954
|
+
providerId: string;
|
|
1955
|
+
enabled: boolean;
|
|
1956
|
+
createdAt: Date;
|
|
1957
|
+
updatedAt: Date;
|
|
1958
|
+
}[]>;
|
|
1959
|
+
countProviderConfigs: () => Promise<number>;
|
|
1960
|
+
upsertProviderConfig: (params: zod0.infer<zod0.ZodObject<{
|
|
1961
|
+
providerId: zod0.ZodString;
|
|
1962
|
+
config: zod0.ZodRecord<zod0.ZodString, zod0.ZodUnknown>;
|
|
1963
|
+
enabled: zod0.ZodDefault<zod0.ZodOptional<zod0.ZodBoolean>>;
|
|
1964
|
+
}, better_auth0.$strip>>) => Promise<{
|
|
1965
|
+
id: string;
|
|
1966
|
+
config: Record<string, unknown>;
|
|
1967
|
+
providerId: string;
|
|
1968
|
+
enabled: boolean;
|
|
1969
|
+
createdAt: Date;
|
|
1970
|
+
updatedAt: Date;
|
|
2235
1971
|
} | undefined>;
|
|
2236
1972
|
batchInsertRequests: (requests: LLMRequestInsert[]) => Promise<{
|
|
2237
1973
|
count: number;
|
|
2238
1974
|
}>;
|
|
2239
1975
|
insertRequest: (request: LLMRequestInsert) => Promise<{
|
|
2240
|
-
|
|
2241
|
-
createdAt: Date;
|
|
2242
|
-
updatedAt: Date;
|
|
1976
|
+
configId: string | null;
|
|
2243
1977
|
variantId: string | null;
|
|
1978
|
+
id: string;
|
|
2244
1979
|
provider: string;
|
|
2245
1980
|
environmentId: string | null;
|
|
2246
|
-
configId: string | null;
|
|
2247
1981
|
requestId: string;
|
|
2248
1982
|
model: string;
|
|
2249
1983
|
promptTokens: number;
|
|
@@ -2259,27 +1993,27 @@ declare const createDataLayer: (db: Kysely<Database>) => Promise<{
|
|
|
2259
1993
|
isStreaming: boolean;
|
|
2260
1994
|
userId: string | null;
|
|
2261
1995
|
tags: Record<string, string>;
|
|
1996
|
+
createdAt: Date;
|
|
1997
|
+
updatedAt: Date;
|
|
2262
1998
|
} | undefined>;
|
|
2263
|
-
listRequests: (params?:
|
|
2264
|
-
limit:
|
|
2265
|
-
offset:
|
|
2266
|
-
configId:
|
|
2267
|
-
variantId:
|
|
2268
|
-
environmentId:
|
|
2269
|
-
provider:
|
|
2270
|
-
model:
|
|
2271
|
-
startDate:
|
|
2272
|
-
endDate:
|
|
2273
|
-
tags:
|
|
1999
|
+
listRequests: (params?: zod0.infer<zod0.ZodObject<{
|
|
2000
|
+
limit: zod0.ZodDefault<zod0.ZodNumber>;
|
|
2001
|
+
offset: zod0.ZodDefault<zod0.ZodNumber>;
|
|
2002
|
+
configId: zod0.ZodOptional<zod0.ZodString>;
|
|
2003
|
+
variantId: zod0.ZodOptional<zod0.ZodString>;
|
|
2004
|
+
environmentId: zod0.ZodOptional<zod0.ZodString>;
|
|
2005
|
+
provider: zod0.ZodOptional<zod0.ZodString>;
|
|
2006
|
+
model: zod0.ZodOptional<zod0.ZodString>;
|
|
2007
|
+
startDate: zod0.ZodOptional<zod0.ZodDate>;
|
|
2008
|
+
endDate: zod0.ZodOptional<zod0.ZodDate>;
|
|
2009
|
+
tags: zod0.ZodOptional<zod0.ZodRecord<zod0.ZodString, zod0.ZodArray<zod0.ZodString>>>;
|
|
2274
2010
|
}, better_auth0.$strip>>) => Promise<{
|
|
2275
2011
|
data: {
|
|
2276
|
-
|
|
2277
|
-
createdAt: Date;
|
|
2278
|
-
updatedAt: Date;
|
|
2012
|
+
configId: string | null;
|
|
2279
2013
|
variantId: string | null;
|
|
2014
|
+
id: string;
|
|
2280
2015
|
provider: string;
|
|
2281
2016
|
environmentId: string | null;
|
|
2282
|
-
configId: string | null;
|
|
2283
2017
|
requestId: string;
|
|
2284
2018
|
model: string;
|
|
2285
2019
|
promptTokens: number;
|
|
@@ -2295,19 +2029,19 @@ declare const createDataLayer: (db: Kysely<Database>) => Promise<{
|
|
|
2295
2029
|
isStreaming: boolean;
|
|
2296
2030
|
userId: string | null;
|
|
2297
2031
|
tags: Record<string, string>;
|
|
2032
|
+
createdAt: Date;
|
|
2033
|
+
updatedAt: Date;
|
|
2298
2034
|
}[];
|
|
2299
2035
|
total: number;
|
|
2300
2036
|
limit: number;
|
|
2301
2037
|
offset: number;
|
|
2302
2038
|
}>;
|
|
2303
2039
|
getRequestByRequestId: (requestId: string) => Promise<{
|
|
2304
|
-
|
|
2305
|
-
createdAt: Date;
|
|
2306
|
-
updatedAt: Date;
|
|
2040
|
+
configId: string | null;
|
|
2307
2041
|
variantId: string | null;
|
|
2042
|
+
id: string;
|
|
2308
2043
|
provider: string;
|
|
2309
2044
|
environmentId: string | null;
|
|
2310
|
-
configId: string | null;
|
|
2311
2045
|
requestId: string;
|
|
2312
2046
|
model: string;
|
|
2313
2047
|
promptTokens: number;
|
|
@@ -2323,14 +2057,16 @@ declare const createDataLayer: (db: Kysely<Database>) => Promise<{
|
|
|
2323
2057
|
isStreaming: boolean;
|
|
2324
2058
|
userId: string | null;
|
|
2325
2059
|
tags: Record<string, string>;
|
|
2060
|
+
createdAt: Date;
|
|
2061
|
+
updatedAt: Date;
|
|
2326
2062
|
} | undefined>;
|
|
2327
|
-
getTotalCost: (params:
|
|
2328
|
-
startDate:
|
|
2329
|
-
endDate:
|
|
2330
|
-
configId:
|
|
2331
|
-
variantId:
|
|
2332
|
-
environmentId:
|
|
2333
|
-
tags:
|
|
2063
|
+
getTotalCost: (params: zod0.infer<zod0.ZodObject<{
|
|
2064
|
+
startDate: zod0.ZodDate;
|
|
2065
|
+
endDate: zod0.ZodDate;
|
|
2066
|
+
configId: zod0.ZodOptional<zod0.ZodString>;
|
|
2067
|
+
variantId: zod0.ZodOptional<zod0.ZodString>;
|
|
2068
|
+
environmentId: zod0.ZodOptional<zod0.ZodString>;
|
|
2069
|
+
tags: zod0.ZodOptional<zod0.ZodRecord<zod0.ZodString, zod0.ZodArray<zod0.ZodString>>>;
|
|
2334
2070
|
}, better_auth0.$strip>>) => Promise<{
|
|
2335
2071
|
totalCost: number;
|
|
2336
2072
|
totalInputCost: number;
|
|
@@ -2340,13 +2076,13 @@ declare const createDataLayer: (db: Kysely<Database>) => Promise<{
|
|
|
2340
2076
|
totalTokens: number;
|
|
2341
2077
|
requestCount: number;
|
|
2342
2078
|
} | undefined>;
|
|
2343
|
-
getCostByModel: (params:
|
|
2344
|
-
startDate:
|
|
2345
|
-
endDate:
|
|
2346
|
-
configId:
|
|
2347
|
-
variantId:
|
|
2348
|
-
environmentId:
|
|
2349
|
-
tags:
|
|
2079
|
+
getCostByModel: (params: zod0.infer<zod0.ZodObject<{
|
|
2080
|
+
startDate: zod0.ZodDate;
|
|
2081
|
+
endDate: zod0.ZodDate;
|
|
2082
|
+
configId: zod0.ZodOptional<zod0.ZodString>;
|
|
2083
|
+
variantId: zod0.ZodOptional<zod0.ZodString>;
|
|
2084
|
+
environmentId: zod0.ZodOptional<zod0.ZodString>;
|
|
2085
|
+
tags: zod0.ZodOptional<zod0.ZodRecord<zod0.ZodString, zod0.ZodArray<zod0.ZodString>>>;
|
|
2350
2086
|
}, better_auth0.$strip>>) => Promise<{
|
|
2351
2087
|
provider: string;
|
|
2352
2088
|
model: string;
|
|
@@ -2357,13 +2093,13 @@ declare const createDataLayer: (db: Kysely<Database>) => Promise<{
|
|
|
2357
2093
|
requestCount: number;
|
|
2358
2094
|
avgLatencyMs: number;
|
|
2359
2095
|
}[]>;
|
|
2360
|
-
getCostByProvider: (params:
|
|
2361
|
-
startDate:
|
|
2362
|
-
endDate:
|
|
2363
|
-
configId:
|
|
2364
|
-
variantId:
|
|
2365
|
-
environmentId:
|
|
2366
|
-
tags:
|
|
2096
|
+
getCostByProvider: (params: zod0.infer<zod0.ZodObject<{
|
|
2097
|
+
startDate: zod0.ZodDate;
|
|
2098
|
+
endDate: zod0.ZodDate;
|
|
2099
|
+
configId: zod0.ZodOptional<zod0.ZodString>;
|
|
2100
|
+
variantId: zod0.ZodOptional<zod0.ZodString>;
|
|
2101
|
+
environmentId: zod0.ZodOptional<zod0.ZodString>;
|
|
2102
|
+
tags: zod0.ZodOptional<zod0.ZodRecord<zod0.ZodString, zod0.ZodArray<zod0.ZodString>>>;
|
|
2367
2103
|
}, better_auth0.$strip>>) => Promise<{
|
|
2368
2104
|
provider: string;
|
|
2369
2105
|
totalCost: number;
|
|
@@ -2373,13 +2109,13 @@ declare const createDataLayer: (db: Kysely<Database>) => Promise<{
|
|
|
2373
2109
|
requestCount: number;
|
|
2374
2110
|
avgLatencyMs: number;
|
|
2375
2111
|
}[]>;
|
|
2376
|
-
getCostByConfig: (params:
|
|
2377
|
-
startDate:
|
|
2378
|
-
endDate:
|
|
2379
|
-
configId:
|
|
2380
|
-
variantId:
|
|
2381
|
-
environmentId:
|
|
2382
|
-
tags:
|
|
2112
|
+
getCostByConfig: (params: zod0.infer<zod0.ZodObject<{
|
|
2113
|
+
startDate: zod0.ZodDate;
|
|
2114
|
+
endDate: zod0.ZodDate;
|
|
2115
|
+
configId: zod0.ZodOptional<zod0.ZodString>;
|
|
2116
|
+
variantId: zod0.ZodOptional<zod0.ZodString>;
|
|
2117
|
+
environmentId: zod0.ZodOptional<zod0.ZodString>;
|
|
2118
|
+
tags: zod0.ZodOptional<zod0.ZodRecord<zod0.ZodString, zod0.ZodArray<zod0.ZodString>>>;
|
|
2383
2119
|
}, better_auth0.$strip>>) => Promise<{
|
|
2384
2120
|
configId: string | null;
|
|
2385
2121
|
totalCost: number;
|
|
@@ -2390,13 +2126,13 @@ declare const createDataLayer: (db: Kysely<Database>) => Promise<{
|
|
|
2390
2126
|
configName: string | null | undefined;
|
|
2391
2127
|
configSlug: string | null;
|
|
2392
2128
|
}[]>;
|
|
2393
|
-
getDailyCosts: (params:
|
|
2394
|
-
startDate:
|
|
2395
|
-
endDate:
|
|
2396
|
-
configId:
|
|
2397
|
-
variantId:
|
|
2398
|
-
environmentId:
|
|
2399
|
-
tags:
|
|
2129
|
+
getDailyCosts: (params: zod0.infer<zod0.ZodObject<{
|
|
2130
|
+
startDate: zod0.ZodDate;
|
|
2131
|
+
endDate: zod0.ZodDate;
|
|
2132
|
+
configId: zod0.ZodOptional<zod0.ZodString>;
|
|
2133
|
+
variantId: zod0.ZodOptional<zod0.ZodString>;
|
|
2134
|
+
environmentId: zod0.ZodOptional<zod0.ZodString>;
|
|
2135
|
+
tags: zod0.ZodOptional<zod0.ZodRecord<zod0.ZodString, zod0.ZodArray<zod0.ZodString>>>;
|
|
2400
2136
|
}, better_auth0.$strip>>) => Promise<{
|
|
2401
2137
|
totalCost: number;
|
|
2402
2138
|
totalInputCost: number;
|
|
@@ -2405,14 +2141,14 @@ declare const createDataLayer: (db: Kysely<Database>) => Promise<{
|
|
|
2405
2141
|
requestCount: number;
|
|
2406
2142
|
date: string;
|
|
2407
2143
|
}[]>;
|
|
2408
|
-
getCostSummary: (params:
|
|
2409
|
-
startDate:
|
|
2410
|
-
endDate:
|
|
2411
|
-
configId:
|
|
2412
|
-
variantId:
|
|
2413
|
-
environmentId:
|
|
2414
|
-
tags:
|
|
2415
|
-
groupBy:
|
|
2144
|
+
getCostSummary: (params: zod0.infer<zod0.ZodObject<{
|
|
2145
|
+
startDate: zod0.ZodDate;
|
|
2146
|
+
endDate: zod0.ZodDate;
|
|
2147
|
+
configId: zod0.ZodOptional<zod0.ZodString>;
|
|
2148
|
+
variantId: zod0.ZodOptional<zod0.ZodString>;
|
|
2149
|
+
environmentId: zod0.ZodOptional<zod0.ZodString>;
|
|
2150
|
+
tags: zod0.ZodOptional<zod0.ZodRecord<zod0.ZodString, zod0.ZodArray<zod0.ZodString>>>;
|
|
2151
|
+
groupBy: zod0.ZodOptional<zod0.ZodEnum<{
|
|
2416
2152
|
provider: "provider";
|
|
2417
2153
|
model: "model";
|
|
2418
2154
|
day: "day";
|
|
@@ -2424,13 +2160,13 @@ declare const createDataLayer: (db: Kysely<Database>) => Promise<{
|
|
|
2424
2160
|
requestCount: number;
|
|
2425
2161
|
groupKey: string;
|
|
2426
2162
|
}[]>;
|
|
2427
|
-
getRequestStats: (params:
|
|
2428
|
-
startDate:
|
|
2429
|
-
endDate:
|
|
2430
|
-
configId:
|
|
2431
|
-
variantId:
|
|
2432
|
-
environmentId:
|
|
2433
|
-
tags:
|
|
2163
|
+
getRequestStats: (params: zod0.infer<zod0.ZodObject<{
|
|
2164
|
+
startDate: zod0.ZodDate;
|
|
2165
|
+
endDate: zod0.ZodDate;
|
|
2166
|
+
configId: zod0.ZodOptional<zod0.ZodString>;
|
|
2167
|
+
variantId: zod0.ZodOptional<zod0.ZodString>;
|
|
2168
|
+
environmentId: zod0.ZodOptional<zod0.ZodString>;
|
|
2169
|
+
tags: zod0.ZodOptional<zod0.ZodRecord<zod0.ZodString, zod0.ZodArray<zod0.ZodString>>>;
|
|
2434
2170
|
}, better_auth0.$strip>>) => Promise<{
|
|
2435
2171
|
avgLatencyMs: number;
|
|
2436
2172
|
totalRequests: number;
|
|
@@ -2444,270 +2180,270 @@ declare const createDataLayer: (db: Kysely<Database>) => Promise<{
|
|
|
2444
2180
|
key: string;
|
|
2445
2181
|
value: string;
|
|
2446
2182
|
}[]>;
|
|
2447
|
-
createEnvironmentSecret: (params:
|
|
2448
|
-
environmentId:
|
|
2449
|
-
keyName:
|
|
2450
|
-
keyValue:
|
|
2183
|
+
createEnvironmentSecret: (params: zod0.infer<zod0.ZodObject<{
|
|
2184
|
+
environmentId: zod0.ZodUUID;
|
|
2185
|
+
keyName: zod0.ZodString;
|
|
2186
|
+
keyValue: zod0.ZodString;
|
|
2451
2187
|
}, better_auth0.$strip>>) => Promise<{
|
|
2452
2188
|
id: string;
|
|
2453
|
-
createdAt: Date;
|
|
2454
|
-
updatedAt: Date;
|
|
2455
2189
|
environmentId: string;
|
|
2456
2190
|
keyName: string;
|
|
2457
2191
|
keyValue: string;
|
|
2192
|
+
createdAt: Date;
|
|
2193
|
+
updatedAt: Date;
|
|
2458
2194
|
} | undefined>;
|
|
2459
|
-
updateEnvironmentSecret: (params:
|
|
2460
|
-
secretId:
|
|
2461
|
-
keyName:
|
|
2462
|
-
keyValue:
|
|
2195
|
+
updateEnvironmentSecret: (params: zod0.infer<zod0.ZodObject<{
|
|
2196
|
+
secretId: zod0.ZodUUID;
|
|
2197
|
+
keyName: zod0.ZodOptional<zod0.ZodString>;
|
|
2198
|
+
keyValue: zod0.ZodOptional<zod0.ZodString>;
|
|
2463
2199
|
}, better_auth0.$strip>>) => Promise<{
|
|
2464
2200
|
id: string;
|
|
2465
|
-
createdAt: Date;
|
|
2466
|
-
updatedAt: Date;
|
|
2467
2201
|
environmentId: string;
|
|
2468
2202
|
keyName: string;
|
|
2469
2203
|
keyValue: string;
|
|
2204
|
+
createdAt: Date;
|
|
2205
|
+
updatedAt: Date;
|
|
2470
2206
|
} | undefined>;
|
|
2471
|
-
getEnvironmentSecretById: (params:
|
|
2472
|
-
secretId:
|
|
2207
|
+
getEnvironmentSecretById: (params: zod0.infer<zod0.ZodObject<{
|
|
2208
|
+
secretId: zod0.ZodUUID;
|
|
2473
2209
|
}, better_auth0.$strip>>) => Promise<{
|
|
2474
2210
|
id: string;
|
|
2475
|
-
createdAt: Date;
|
|
2476
|
-
updatedAt: Date;
|
|
2477
2211
|
environmentId: string;
|
|
2478
2212
|
keyName: string;
|
|
2479
2213
|
keyValue: string;
|
|
2214
|
+
createdAt: Date;
|
|
2215
|
+
updatedAt: Date;
|
|
2480
2216
|
} | undefined>;
|
|
2481
|
-
getSecretsByEnvironmentId: (params:
|
|
2482
|
-
environmentId:
|
|
2217
|
+
getSecretsByEnvironmentId: (params: zod0.infer<zod0.ZodObject<{
|
|
2218
|
+
environmentId: zod0.ZodUUID;
|
|
2483
2219
|
}, better_auth0.$strip>>) => Promise<{
|
|
2484
2220
|
id: string;
|
|
2485
|
-
createdAt: Date;
|
|
2486
|
-
updatedAt: Date;
|
|
2487
2221
|
environmentId: string;
|
|
2488
2222
|
keyName: string;
|
|
2489
2223
|
keyValue: string;
|
|
2224
|
+
createdAt: Date;
|
|
2225
|
+
updatedAt: Date;
|
|
2490
2226
|
}[]>;
|
|
2491
|
-
deleteEnvironmentSecret: (params:
|
|
2492
|
-
secretId:
|
|
2227
|
+
deleteEnvironmentSecret: (params: zod0.infer<zod0.ZodObject<{
|
|
2228
|
+
secretId: zod0.ZodUUID;
|
|
2493
2229
|
}, better_auth0.$strip>>) => Promise<{
|
|
2494
2230
|
id: string;
|
|
2495
|
-
createdAt: Date;
|
|
2496
|
-
updatedAt: Date;
|
|
2497
2231
|
environmentId: string;
|
|
2498
2232
|
keyName: string;
|
|
2499
2233
|
keyValue: string;
|
|
2234
|
+
createdAt: Date;
|
|
2235
|
+
updatedAt: Date;
|
|
2500
2236
|
} | undefined>;
|
|
2501
|
-
deleteSecretsByEnvironmentId: (params:
|
|
2502
|
-
environmentId:
|
|
2237
|
+
deleteSecretsByEnvironmentId: (params: zod0.infer<zod0.ZodObject<{
|
|
2238
|
+
environmentId: zod0.ZodUUID;
|
|
2503
2239
|
}, better_auth0.$strip>>) => Promise<{
|
|
2504
2240
|
id: string;
|
|
2505
|
-
createdAt: Date;
|
|
2506
|
-
updatedAt: Date;
|
|
2507
2241
|
environmentId: string;
|
|
2508
2242
|
keyName: string;
|
|
2509
2243
|
keyValue: string;
|
|
2244
|
+
createdAt: Date;
|
|
2245
|
+
updatedAt: Date;
|
|
2510
2246
|
}[]>;
|
|
2511
|
-
listEnvironmentSecrets: (params?:
|
|
2512
|
-
limit:
|
|
2513
|
-
offset:
|
|
2247
|
+
listEnvironmentSecrets: (params?: zod0.infer<zod0.ZodObject<{
|
|
2248
|
+
limit: zod0.ZodOptional<zod0.ZodNumber>;
|
|
2249
|
+
offset: zod0.ZodOptional<zod0.ZodNumber>;
|
|
2514
2250
|
}, better_auth0.$strip>>) => Promise<{
|
|
2515
2251
|
id: string;
|
|
2516
|
-
createdAt: Date;
|
|
2517
|
-
updatedAt: Date;
|
|
2518
2252
|
environmentId: string;
|
|
2519
2253
|
keyName: string;
|
|
2520
2254
|
keyValue: string;
|
|
2255
|
+
createdAt: Date;
|
|
2256
|
+
updatedAt: Date;
|
|
2521
2257
|
}[]>;
|
|
2522
2258
|
countEnvironmentSecrets: () => Promise<number>;
|
|
2523
|
-
createNewEnvironment: (params:
|
|
2524
|
-
name:
|
|
2525
|
-
slug:
|
|
2526
|
-
isProd:
|
|
2259
|
+
createNewEnvironment: (params: zod0.infer<zod0.ZodObject<{
|
|
2260
|
+
name: zod0.ZodString;
|
|
2261
|
+
slug: zod0.ZodString;
|
|
2262
|
+
isProd: zod0.ZodDefault<zod0.ZodOptional<zod0.ZodBoolean>>;
|
|
2527
2263
|
}, better_auth0.$strip>>) => Promise<{
|
|
2528
|
-
slug: string;
|
|
2529
2264
|
name: string;
|
|
2530
2265
|
id: string;
|
|
2266
|
+
slug: string;
|
|
2267
|
+
isProd: boolean;
|
|
2531
2268
|
createdAt: Date;
|
|
2532
2269
|
updatedAt: Date;
|
|
2533
|
-
isProd: boolean;
|
|
2534
2270
|
} | undefined>;
|
|
2535
|
-
updateEnvironment: (params:
|
|
2536
|
-
environmentId:
|
|
2537
|
-
name:
|
|
2538
|
-
slug:
|
|
2271
|
+
updateEnvironment: (params: zod0.infer<zod0.ZodObject<{
|
|
2272
|
+
environmentId: zod0.ZodUUID;
|
|
2273
|
+
name: zod0.ZodOptional<zod0.ZodString>;
|
|
2274
|
+
slug: zod0.ZodOptional<zod0.ZodString>;
|
|
2539
2275
|
}, better_auth0.$strip>>) => Promise<{
|
|
2540
|
-
slug: string;
|
|
2541
2276
|
name: string;
|
|
2542
2277
|
id: string;
|
|
2278
|
+
slug: string;
|
|
2279
|
+
isProd: boolean;
|
|
2543
2280
|
createdAt: Date;
|
|
2544
2281
|
updatedAt: Date;
|
|
2545
|
-
isProd: boolean;
|
|
2546
2282
|
} | undefined>;
|
|
2547
|
-
getEnvironmentById: (params:
|
|
2548
|
-
environmentId:
|
|
2283
|
+
getEnvironmentById: (params: zod0.infer<zod0.ZodObject<{
|
|
2284
|
+
environmentId: zod0.ZodUUID;
|
|
2549
2285
|
}, better_auth0.$strip>>) => Promise<{
|
|
2550
|
-
slug: string;
|
|
2551
2286
|
name: string;
|
|
2552
2287
|
id: string;
|
|
2288
|
+
slug: string;
|
|
2289
|
+
isProd: boolean;
|
|
2553
2290
|
createdAt: Date;
|
|
2554
2291
|
updatedAt: Date;
|
|
2555
|
-
isProd: boolean;
|
|
2556
2292
|
} | undefined>;
|
|
2557
|
-
getEnvironmentBySlug: (params:
|
|
2558
|
-
slug:
|
|
2293
|
+
getEnvironmentBySlug: (params: zod0.infer<zod0.ZodObject<{
|
|
2294
|
+
slug: zod0.ZodString;
|
|
2559
2295
|
}, better_auth0.$strip>>) => Promise<{
|
|
2560
|
-
slug: string;
|
|
2561
2296
|
name: string;
|
|
2562
2297
|
id: string;
|
|
2298
|
+
slug: string;
|
|
2299
|
+
isProd: boolean;
|
|
2563
2300
|
createdAt: Date;
|
|
2564
2301
|
updatedAt: Date;
|
|
2565
|
-
isProd: boolean;
|
|
2566
2302
|
} | undefined>;
|
|
2567
|
-
deleteEnvironment: (params:
|
|
2568
|
-
environmentId:
|
|
2303
|
+
deleteEnvironment: (params: zod0.infer<zod0.ZodObject<{
|
|
2304
|
+
environmentId: zod0.ZodUUID;
|
|
2569
2305
|
}, better_auth0.$strip>>) => Promise<{
|
|
2570
|
-
slug: string;
|
|
2571
2306
|
name: string;
|
|
2572
2307
|
id: string;
|
|
2308
|
+
slug: string;
|
|
2309
|
+
isProd: boolean;
|
|
2573
2310
|
createdAt: Date;
|
|
2574
2311
|
updatedAt: Date;
|
|
2575
|
-
isProd: boolean;
|
|
2576
2312
|
} | undefined>;
|
|
2577
|
-
listEnvironments: (params?:
|
|
2578
|
-
limit:
|
|
2579
|
-
offset:
|
|
2313
|
+
listEnvironments: (params?: zod0.infer<zod0.ZodObject<{
|
|
2314
|
+
limit: zod0.ZodOptional<zod0.ZodNumber>;
|
|
2315
|
+
offset: zod0.ZodOptional<zod0.ZodNumber>;
|
|
2580
2316
|
}, better_auth0.$strip>>) => Promise<{
|
|
2581
|
-
slug: string;
|
|
2582
2317
|
name: string;
|
|
2583
2318
|
id: string;
|
|
2319
|
+
slug: string;
|
|
2320
|
+
isProd: boolean;
|
|
2584
2321
|
createdAt: Date;
|
|
2585
2322
|
updatedAt: Date;
|
|
2586
|
-
isProd: boolean;
|
|
2587
2323
|
}[]>;
|
|
2588
2324
|
countEnvironments: () => Promise<number>;
|
|
2589
|
-
createConfigVariant: (params:
|
|
2590
|
-
configId:
|
|
2591
|
-
variantId:
|
|
2325
|
+
createConfigVariant: (params: zod0.infer<zod0.ZodObject<{
|
|
2326
|
+
configId: zod0.ZodString;
|
|
2327
|
+
variantId: zod0.ZodString;
|
|
2592
2328
|
}, better_auth0.$strip>>) => Promise<{
|
|
2329
|
+
configId: string;
|
|
2330
|
+
variantId: string;
|
|
2593
2331
|
id: string;
|
|
2594
2332
|
createdAt: Date;
|
|
2595
2333
|
updatedAt: Date;
|
|
2596
|
-
variantId: string;
|
|
2597
|
-
configId: string;
|
|
2598
2334
|
} | undefined>;
|
|
2599
|
-
getConfigVariantById: (params:
|
|
2600
|
-
id:
|
|
2335
|
+
getConfigVariantById: (params: zod0.infer<zod0.ZodObject<{
|
|
2336
|
+
id: zod0.ZodString;
|
|
2601
2337
|
}, better_auth0.$strip>>) => Promise<{
|
|
2338
|
+
configId: string;
|
|
2339
|
+
variantId: string;
|
|
2602
2340
|
id: string;
|
|
2603
2341
|
createdAt: Date;
|
|
2604
2342
|
updatedAt: Date;
|
|
2605
|
-
variantId: string;
|
|
2606
|
-
configId: string;
|
|
2607
2343
|
} | undefined>;
|
|
2608
|
-
getConfigVariantsByConfigId: (params:
|
|
2609
|
-
configId:
|
|
2610
|
-
limit:
|
|
2611
|
-
offset:
|
|
2344
|
+
getConfigVariantsByConfigId: (params: zod0.infer<zod0.ZodObject<{
|
|
2345
|
+
configId: zod0.ZodString;
|
|
2346
|
+
limit: zod0.ZodOptional<zod0.ZodNumber>;
|
|
2347
|
+
offset: zod0.ZodOptional<zod0.ZodNumber>;
|
|
2612
2348
|
}, better_auth0.$strip>>) => Promise<{
|
|
2349
|
+
configId: string;
|
|
2350
|
+
variantId: string;
|
|
2613
2351
|
id: string;
|
|
2614
2352
|
createdAt: Date;
|
|
2615
2353
|
updatedAt: Date;
|
|
2616
|
-
variantId: string;
|
|
2617
|
-
configId: string;
|
|
2618
2354
|
}[]>;
|
|
2619
|
-
getConfigVariantsByVariantId: (params:
|
|
2620
|
-
variantId:
|
|
2621
|
-
limit:
|
|
2622
|
-
offset:
|
|
2355
|
+
getConfigVariantsByVariantId: (params: zod0.infer<zod0.ZodObject<{
|
|
2356
|
+
variantId: zod0.ZodString;
|
|
2357
|
+
limit: zod0.ZodOptional<zod0.ZodNumber>;
|
|
2358
|
+
offset: zod0.ZodOptional<zod0.ZodNumber>;
|
|
2623
2359
|
}, better_auth0.$strip>>) => Promise<{
|
|
2360
|
+
configId: string;
|
|
2361
|
+
variantId: string;
|
|
2624
2362
|
id: string;
|
|
2625
2363
|
createdAt: Date;
|
|
2626
2364
|
updatedAt: Date;
|
|
2627
|
-
variantId: string;
|
|
2628
|
-
configId: string;
|
|
2629
2365
|
}[]>;
|
|
2630
|
-
deleteConfigVariant: (params:
|
|
2631
|
-
id:
|
|
2366
|
+
deleteConfigVariant: (params: zod0.infer<zod0.ZodObject<{
|
|
2367
|
+
id: zod0.ZodString;
|
|
2632
2368
|
}, better_auth0.$strip>>) => Promise<{
|
|
2369
|
+
configId: string;
|
|
2370
|
+
variantId: string;
|
|
2633
2371
|
id: string;
|
|
2634
2372
|
createdAt: Date;
|
|
2635
2373
|
updatedAt: Date;
|
|
2636
|
-
variantId: string;
|
|
2637
|
-
configId: string;
|
|
2638
2374
|
} | undefined>;
|
|
2639
|
-
deleteConfigVariantByIds: (params:
|
|
2640
|
-
configId:
|
|
2641
|
-
variantId:
|
|
2375
|
+
deleteConfigVariantByIds: (params: zod0.infer<zod0.ZodObject<{
|
|
2376
|
+
configId: zod0.ZodString;
|
|
2377
|
+
variantId: zod0.ZodString;
|
|
2642
2378
|
}, better_auth0.$strip>>) => Promise<{
|
|
2379
|
+
configId: string;
|
|
2380
|
+
variantId: string;
|
|
2643
2381
|
id: string;
|
|
2644
2382
|
createdAt: Date;
|
|
2645
2383
|
updatedAt: Date;
|
|
2646
|
-
variantId: string;
|
|
2647
|
-
configId: string;
|
|
2648
2384
|
} | undefined>;
|
|
2649
|
-
listConfigVariants: (params?:
|
|
2650
|
-
limit:
|
|
2651
|
-
offset:
|
|
2385
|
+
listConfigVariants: (params?: zod0.infer<zod0.ZodObject<{
|
|
2386
|
+
limit: zod0.ZodOptional<zod0.ZodNumber>;
|
|
2387
|
+
offset: zod0.ZodOptional<zod0.ZodNumber>;
|
|
2652
2388
|
}, better_auth0.$strip>>) => Promise<{
|
|
2389
|
+
configId: string;
|
|
2390
|
+
variantId: string;
|
|
2653
2391
|
id: string;
|
|
2654
2392
|
createdAt: Date;
|
|
2655
2393
|
updatedAt: Date;
|
|
2656
|
-
variantId: string;
|
|
2657
|
-
configId: string;
|
|
2658
2394
|
}[]>;
|
|
2659
|
-
getConfigVariantWithDetails: (params:
|
|
2660
|
-
id:
|
|
2395
|
+
getConfigVariantWithDetails: (params: zod0.infer<zod0.ZodObject<{
|
|
2396
|
+
id: zod0.ZodString;
|
|
2661
2397
|
}, better_auth0.$strip>>) => Promise<{
|
|
2662
2398
|
latestVersion: {
|
|
2663
2399
|
version: number;
|
|
2664
|
-
id: string;
|
|
2665
|
-
createdAt: Date;
|
|
2666
|
-
updatedAt: Date;
|
|
2667
2400
|
variantId: string;
|
|
2401
|
+
id: string;
|
|
2668
2402
|
provider: string;
|
|
2669
2403
|
modelName: string;
|
|
2670
2404
|
jsonData: Record<string, unknown>;
|
|
2405
|
+
createdAt: Date;
|
|
2406
|
+
updatedAt: Date;
|
|
2671
2407
|
} | null;
|
|
2672
2408
|
variantName: string | null;
|
|
2673
2409
|
id: string;
|
|
2410
|
+
configId: string;
|
|
2411
|
+
variantId: string;
|
|
2674
2412
|
createdAt: Date;
|
|
2675
2413
|
updatedAt: Date;
|
|
2676
|
-
variantId: string;
|
|
2677
|
-
configId: string;
|
|
2678
2414
|
configName: string | null | undefined;
|
|
2679
2415
|
} | undefined>;
|
|
2680
|
-
getConfigVariantsWithDetailsByConfigId: (params:
|
|
2681
|
-
configId:
|
|
2682
|
-
limit:
|
|
2683
|
-
offset:
|
|
2416
|
+
getConfigVariantsWithDetailsByConfigId: (params: zod0.infer<zod0.ZodObject<{
|
|
2417
|
+
configId: zod0.ZodString;
|
|
2418
|
+
limit: zod0.ZodOptional<zod0.ZodNumber>;
|
|
2419
|
+
offset: zod0.ZodOptional<zod0.ZodNumber>;
|
|
2684
2420
|
}, better_auth0.$strip>>) => Promise<{
|
|
2685
2421
|
provider: string | null;
|
|
2686
2422
|
modelName: string | null;
|
|
2687
2423
|
jsonData: Record<string, unknown> | null;
|
|
2688
2424
|
latestVersion: {
|
|
2689
2425
|
version: number;
|
|
2690
|
-
id: string;
|
|
2691
|
-
createdAt: Date;
|
|
2692
|
-
updatedAt: Date;
|
|
2693
2426
|
variantId: string;
|
|
2427
|
+
id: string;
|
|
2694
2428
|
provider: string;
|
|
2695
2429
|
modelName: string;
|
|
2696
2430
|
jsonData: Record<string, unknown>;
|
|
2431
|
+
createdAt: Date;
|
|
2432
|
+
updatedAt: Date;
|
|
2697
2433
|
} | null;
|
|
2698
2434
|
name: string | null;
|
|
2699
2435
|
id: string;
|
|
2436
|
+
configId: string;
|
|
2437
|
+
variantId: string;
|
|
2700
2438
|
createdAt: Date;
|
|
2701
2439
|
updatedAt: Date;
|
|
2702
|
-
variantId: string;
|
|
2703
|
-
configId: string;
|
|
2704
2440
|
}[]>;
|
|
2705
|
-
createVariantAndLinkToConfig: (params:
|
|
2706
|
-
configId:
|
|
2707
|
-
name:
|
|
2708
|
-
provider:
|
|
2709
|
-
modelName:
|
|
2710
|
-
jsonData:
|
|
2441
|
+
createVariantAndLinkToConfig: (params: zod0.infer<zod0.ZodObject<{
|
|
2442
|
+
configId: zod0.ZodString;
|
|
2443
|
+
name: zod0.ZodString;
|
|
2444
|
+
provider: zod0.ZodString;
|
|
2445
|
+
modelName: zod0.ZodString;
|
|
2446
|
+
jsonData: zod0.ZodDefault<zod0.ZodOptional<zod0.ZodRecord<zod0.ZodString, zod0.ZodUnknown>>>;
|
|
2711
2447
|
}, better_auth0.$strip>>) => Promise<{
|
|
2712
2448
|
variant: {
|
|
2713
2449
|
name: string;
|
|
@@ -2717,25 +2453,25 @@ declare const createDataLayer: (db: Kysely<Database>) => Promise<{
|
|
|
2717
2453
|
};
|
|
2718
2454
|
version: {
|
|
2719
2455
|
version: number;
|
|
2720
|
-
id: string;
|
|
2721
|
-
createdAt: Date;
|
|
2722
|
-
updatedAt: Date;
|
|
2723
2456
|
variantId: string;
|
|
2457
|
+
id: string;
|
|
2724
2458
|
provider: string;
|
|
2725
2459
|
modelName: string;
|
|
2726
2460
|
jsonData: Record<string, unknown>;
|
|
2461
|
+
createdAt: Date;
|
|
2462
|
+
updatedAt: Date;
|
|
2727
2463
|
};
|
|
2728
2464
|
configVariant: {
|
|
2465
|
+
configId: string;
|
|
2466
|
+
variantId: string;
|
|
2729
2467
|
id: string;
|
|
2730
2468
|
createdAt: Date;
|
|
2731
2469
|
updatedAt: Date;
|
|
2732
|
-
variantId: string;
|
|
2733
|
-
configId: string;
|
|
2734
2470
|
};
|
|
2735
2471
|
}>;
|
|
2736
|
-
getVariantJsonDataForConfig: (params:
|
|
2737
|
-
configId:
|
|
2738
|
-
envSecret:
|
|
2472
|
+
getVariantJsonDataForConfig: (params: zod0.infer<zod0.ZodObject<{
|
|
2473
|
+
configId: zod0.ZodString;
|
|
2474
|
+
envSecret: zod0.ZodOptional<zod0.ZodString>;
|
|
2739
2475
|
}, better_auth0.$strip>>) => Promise<{
|
|
2740
2476
|
configId: string;
|
|
2741
2477
|
variantId: string;
|
|
@@ -2745,63 +2481,63 @@ declare const createDataLayer: (db: Kysely<Database>) => Promise<{
|
|
|
2745
2481
|
modelName: string;
|
|
2746
2482
|
jsonData: Record<string, unknown>;
|
|
2747
2483
|
}>;
|
|
2748
|
-
createNewConfig: (params:
|
|
2749
|
-
name:
|
|
2484
|
+
createNewConfig: (params: zod0.infer<zod0.ZodObject<{
|
|
2485
|
+
name: zod0.ZodString;
|
|
2750
2486
|
}, better_auth0.$strip>>) => Promise<{
|
|
2751
|
-
slug: string;
|
|
2752
2487
|
name: string | undefined;
|
|
2753
2488
|
id: string;
|
|
2489
|
+
slug: string;
|
|
2754
2490
|
createdAt: Date;
|
|
2755
2491
|
updatedAt: Date;
|
|
2756
2492
|
} | undefined>;
|
|
2757
|
-
updateConfigName: (params:
|
|
2758
|
-
configId:
|
|
2759
|
-
newName:
|
|
2493
|
+
updateConfigName: (params: zod0.infer<zod0.ZodObject<{
|
|
2494
|
+
configId: zod0.ZodUUID;
|
|
2495
|
+
newName: zod0.ZodString;
|
|
2760
2496
|
}, better_auth0.$strip>>) => Promise<{
|
|
2761
|
-
slug: string;
|
|
2762
2497
|
name: string | undefined;
|
|
2763
2498
|
id: string;
|
|
2499
|
+
slug: string;
|
|
2764
2500
|
createdAt: Date;
|
|
2765
2501
|
updatedAt: Date;
|
|
2766
2502
|
} | undefined>;
|
|
2767
|
-
getConfigById: (params:
|
|
2768
|
-
configId:
|
|
2503
|
+
getConfigById: (params: zod0.infer<zod0.ZodObject<{
|
|
2504
|
+
configId: zod0.ZodUUID;
|
|
2769
2505
|
}, better_auth0.$strip>>) => Promise<{
|
|
2770
|
-
slug: string;
|
|
2771
2506
|
name: string | undefined;
|
|
2772
2507
|
id: string;
|
|
2508
|
+
slug: string;
|
|
2773
2509
|
createdAt: Date;
|
|
2774
2510
|
updatedAt: Date;
|
|
2775
2511
|
} | undefined>;
|
|
2776
|
-
deleteConfig: (params:
|
|
2777
|
-
configId:
|
|
2512
|
+
deleteConfig: (params: zod0.infer<zod0.ZodObject<{
|
|
2513
|
+
configId: zod0.ZodUUID;
|
|
2778
2514
|
}, better_auth0.$strip>>) => Promise<{
|
|
2779
|
-
slug: string;
|
|
2780
2515
|
name: string | undefined;
|
|
2781
2516
|
id: string;
|
|
2517
|
+
slug: string;
|
|
2782
2518
|
createdAt: Date;
|
|
2783
2519
|
updatedAt: Date;
|
|
2784
2520
|
} | undefined>;
|
|
2785
|
-
listConfigs: (params?:
|
|
2786
|
-
limit:
|
|
2787
|
-
offset:
|
|
2521
|
+
listConfigs: (params?: zod0.infer<zod0.ZodObject<{
|
|
2522
|
+
limit: zod0.ZodOptional<zod0.ZodNumber>;
|
|
2523
|
+
offset: zod0.ZodOptional<zod0.ZodNumber>;
|
|
2788
2524
|
}, better_auth0.$strip>>) => Promise<{
|
|
2789
|
-
slug: string;
|
|
2790
2525
|
name: string | undefined;
|
|
2791
2526
|
id: string;
|
|
2527
|
+
slug: string;
|
|
2792
2528
|
createdAt: Date;
|
|
2793
2529
|
updatedAt: Date;
|
|
2794
2530
|
}[]>;
|
|
2795
|
-
getConfigWithVariants: (params:
|
|
2796
|
-
configId:
|
|
2531
|
+
getConfigWithVariants: (params: zod0.infer<zod0.ZodObject<{
|
|
2532
|
+
configId: zod0.ZodUUID;
|
|
2797
2533
|
}, better_auth0.$strip>>) => Promise<{
|
|
2798
2534
|
provider: string | null;
|
|
2799
2535
|
modelName: string | null;
|
|
2800
2536
|
jsonData: Record<string, unknown> | null;
|
|
2801
2537
|
variantName: string | null;
|
|
2802
2538
|
id: string;
|
|
2803
|
-
slug: string;
|
|
2804
2539
|
name: string | undefined;
|
|
2540
|
+
slug: string;
|
|
2805
2541
|
createdAt: Date;
|
|
2806
2542
|
updatedAt: Date;
|
|
2807
2543
|
variantId: string | null;
|
|
@@ -3020,4 +2756,4 @@ interface AuthClientOptions {
|
|
|
3020
2756
|
*/
|
|
3021
2757
|
declare const getAuthClientOptions: (options: AuthClientOptions) => BetterAuthOptions;
|
|
3022
2758
|
//#endregion
|
|
3023
|
-
export { type AnthropicProviderConfig, type AnyProviderConfig, AuthClientDatabaseConfig, AuthClientOptions, type AzureAIProviderConfig, type AzureOpenAIProviderConfig, BaseCacheConfig, type BaseProviderConfig, type BedrockProviderConfig, CacheBackend, CacheBackendType, CacheConfig, CacheEntry, CacheOptions, CacheService, CacheStats, ChatCompletionCreateParamsBase, Config, ConfigVariant, type ConfigVariantsTable, type ConfigsTable, type CortexProviderConfig, CostResult, type Database, DatabaseConnection, DatabaseOptions, DatabaseType, Environment, EnvironmentSecret, type EnvironmentSecretsTable, type EnvironmentsTable, FileCacheBackend, FileCacheConfig, type FireworksAIProviderConfig, type GoogleProviderConfig, type HuggingFaceProviderConfig, Insertable, LLMOpsClient, LLMOpsConfig, type LLMOpsConfigInput, LLMRequest, type LLMRequestInsert, LLMRequestsTable, MS, MemoryCacheBackend, MemoryCacheConfig, MigrationOptions, MigrationResult, type MistralAIProviderConfig, ModelPricing, ModelsDevPricingProvider, type OpenAIProviderConfig, type OracleProviderConfig, Prettify, PricingProvider, type ProviderConfigMap, type ProvidersConfig, SCHEMA_METADATA, type SagemakerProviderConfig, Selectable, type StabilityAIProviderConfig, SupportedProviders, type TableName, TargetingRule, type TargetingRulesTable, Updateable, UsageData, type ValidatedLLMOpsConfig, Variant, VariantJsonData, VariantVersion, VariantVersionsTable, type VariantsTable, type VertexAIProviderConfig, type WorkersAIProviderConfig, WorkspaceSettings, WorkspaceSettingsTable, calculateCost, chatCompletionCreateParamsBaseSchema, configVariantsSchema, configsSchema, createDataLayer, createDatabase, createDatabaseFromConnection, createLLMRequestsDataLayer, createWorkspaceSettingsDataLayer, detectDatabaseType, dollarsToMicroDollars, environmentSecretsSchema, environmentsSchema, formatCost, gateway, generateId, getAuthClientOptions, getDefaultPricingProvider, getMigrations, llmRequestsSchema, llmopsConfigSchema, logger, matchType, microDollarsToDollars, parsePartialTableData, parseTableData, runAutoMigrations, schemas, targetingRulesSchema, validateLLMOpsConfig, validatePartialTableData, validateTableData, variantJsonDataSchema, variantVersionsSchema, variantsSchema, workspaceSettingsSchema };
|
|
2759
|
+
export { type AnthropicProviderConfig, type AnyProviderConfig, AuthClientDatabaseConfig, AuthClientOptions, type AzureAIProviderConfig, type AzureOpenAIProviderConfig, BaseCacheConfig, type BaseProviderConfig, type BedrockProviderConfig, CacheBackend, CacheBackendType, CacheConfig, CacheEntry, CacheOptions, CacheService, CacheStats, ChatCompletionCreateParamsBase, Config, ConfigVariant, type ConfigVariantsTable, type ConfigsTable, type CortexProviderConfig, CostResult, type Database, DatabaseConnection, DatabaseOptions, DatabaseType, Environment, EnvironmentSecret, type EnvironmentSecretsTable, type EnvironmentsTable, FileCacheBackend, FileCacheConfig, type FireworksAIProviderConfig, type GoogleProviderConfig, type HuggingFaceProviderConfig, Insertable, LLMOpsClient, LLMOpsConfig, type LLMOpsConfigInput, LLMRequest, type LLMRequestInsert, LLMRequestsTable, MS, MemoryCacheBackend, MemoryCacheConfig, MigrationOptions, MigrationResult, type MistralAIProviderConfig, ModelPricing, ModelsDevPricingProvider, type OpenAIProviderConfig, type OracleProviderConfig, Prettify, PricingProvider, ProviderConfig, type ProviderConfigMap, ProviderConfigsTable, type ProvidersConfig, SCHEMA_METADATA, type SagemakerProviderConfig, Selectable, type StabilityAIProviderConfig, SupportedProviders, type TableName, TargetingRule, type TargetingRulesTable, Updateable, UsageData, type ValidatedLLMOpsConfig, Variant, VariantJsonData, VariantVersion, VariantVersionsTable, type VariantsTable, type VertexAIProviderConfig, type WorkersAIProviderConfig, WorkspaceSettings, WorkspaceSettingsTable, calculateCost, chatCompletionCreateParamsBaseSchema, configVariantsSchema, configsSchema, createDataLayer, createDatabase, createDatabaseFromConnection, createLLMRequestsDataLayer, createProviderConfigsDataLayer, createWorkspaceSettingsDataLayer, detectDatabaseType, dollarsToMicroDollars, environmentSecretsSchema, environmentsSchema, formatCost, gateway, generateId, getAuthClientOptions, getDefaultPricingProvider, getMigrations, llmRequestsSchema, llmopsConfigSchema, logger, matchType, microDollarsToDollars, parsePartialTableData, parseTableData, providerConfigsSchema, runAutoMigrations, schemas, targetingRulesSchema, validateLLMOpsConfig, validatePartialTableData, validateTableData, variantJsonDataSchema, variantVersionsSchema, variantsSchema, workspaceSettingsSchema };
|