@digo-labs/backend 0.2.6 → 0.2.8
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/index.d.cts +67 -30
- package/package.json +3 -2
package/dist/index.d.cts
CHANGED
|
@@ -256,6 +256,42 @@ declare const bedrockRouter: hono_hono_base.HonoBase<hono_types.BlankEnv, hono_t
|
|
|
256
256
|
};
|
|
257
257
|
}, "/ai">, "/", "/">;
|
|
258
258
|
|
|
259
|
+
declare const anthropicRouter: hono_hono_base.HonoBase<hono_types.BlankEnv, hono_types.BlankSchema | hono_types.MergeSchemaPath<{
|
|
260
|
+
"anthropic-text": {
|
|
261
|
+
$post: {
|
|
262
|
+
input: {
|
|
263
|
+
json: {
|
|
264
|
+
messages: {
|
|
265
|
+
role: "user" | "assistant";
|
|
266
|
+
content: string | ({
|
|
267
|
+
type: "text";
|
|
268
|
+
text: string;
|
|
269
|
+
} | {
|
|
270
|
+
type: "image";
|
|
271
|
+
source: {
|
|
272
|
+
base64: string;
|
|
273
|
+
mediaType: string;
|
|
274
|
+
};
|
|
275
|
+
})[];
|
|
276
|
+
}[];
|
|
277
|
+
model?: string | undefined;
|
|
278
|
+
systemPrompt?: string | undefined;
|
|
279
|
+
temperature?: number | undefined;
|
|
280
|
+
maxTokens?: number | undefined;
|
|
281
|
+
stopSequences?: string[] | undefined;
|
|
282
|
+
guardrail?: {
|
|
283
|
+
id: string;
|
|
284
|
+
version: string;
|
|
285
|
+
} | undefined;
|
|
286
|
+
};
|
|
287
|
+
};
|
|
288
|
+
output: {};
|
|
289
|
+
outputFormat: string;
|
|
290
|
+
status: hono_utils_http_status.StatusCode;
|
|
291
|
+
};
|
|
292
|
+
};
|
|
293
|
+
}, "/ai">, "/", "/">;
|
|
294
|
+
|
|
259
295
|
declare const devicesRouter: hono_hono_base.HonoBase<hono_types.BlankEnv, {
|
|
260
296
|
"devices-create": {
|
|
261
297
|
$post: {
|
|
@@ -365,7 +401,7 @@ declare const aiJobsRouter: hono_hono_base.HonoBase<hono_types.BlankEnv, ((({
|
|
|
365
401
|
status: "checking" | "running" | "done" | "rejected" | "failed" | "cancelled";
|
|
366
402
|
verdict: "reject" | "review" | "pass" | null;
|
|
367
403
|
checks: {
|
|
368
|
-
type: "
|
|
404
|
+
type: "bedrock" | "rekognition";
|
|
369
405
|
target: string;
|
|
370
406
|
verdict: "reject" | "review" | "pass";
|
|
371
407
|
labels: string[];
|
|
@@ -374,13 +410,13 @@ declare const aiJobsRouter: hono_hono_base.HonoBase<hono_types.BlankEnv, ((({
|
|
|
374
410
|
}[];
|
|
375
411
|
tasks: {
|
|
376
412
|
key: string;
|
|
377
|
-
endpoint: "
|
|
413
|
+
endpoint: "fake:echo" | `fal:${string}` | `openai:${string}` | `replicate:${string}`;
|
|
378
414
|
status: "done" | "rejected" | "failed" | "cancelled" | "pending" | "submitted" | "saving";
|
|
379
415
|
attempt: number;
|
|
380
416
|
outputPath: string;
|
|
381
417
|
verdict: "reject" | "review" | "pass" | null;
|
|
382
418
|
checks: {
|
|
383
|
-
type: "
|
|
419
|
+
type: "bedrock" | "rekognition";
|
|
384
420
|
target: string;
|
|
385
421
|
verdict: "reject" | "review" | "pass";
|
|
386
422
|
labels: string[];
|
|
@@ -389,7 +425,7 @@ declare const aiJobsRouter: hono_hono_base.HonoBase<hono_types.BlankEnv, ((({
|
|
|
389
425
|
}[];
|
|
390
426
|
error: "submit failed" | "provider error" | "provider timed out" | "save failed" | null;
|
|
391
427
|
estimatedUsd: number;
|
|
392
|
-
servedBy?: "
|
|
428
|
+
servedBy?: "fake:echo" | `fal:${string}` | `openai:${string}` | `replicate:${string}` | null | undefined;
|
|
393
429
|
}[];
|
|
394
430
|
createdAt: string;
|
|
395
431
|
updatedAt: string;
|
|
@@ -407,14 +443,14 @@ declare const aiJobsRouter: hono_hono_base.HonoBase<hono_types.BlankEnv, ((({
|
|
|
407
443
|
key: string;
|
|
408
444
|
tasks: {
|
|
409
445
|
key: string;
|
|
410
|
-
endpoint: "
|
|
446
|
+
endpoint: "fake:echo" | `fal:${string}` | `openai:${string}` | `replicate:${string}`;
|
|
411
447
|
input: Record<string, unknown>;
|
|
412
448
|
output: {
|
|
413
449
|
path: string;
|
|
414
450
|
};
|
|
415
451
|
priority?: number | undefined;
|
|
416
452
|
fallbacks?: {
|
|
417
|
-
endpoint: "
|
|
453
|
+
endpoint: "fake:echo" | `fal:${string}` | `openai:${string}` | `replicate:${string}`;
|
|
418
454
|
input?: Record<string, unknown> | undefined;
|
|
419
455
|
}[] | undefined;
|
|
420
456
|
fallbackAfter?: number | undefined;
|
|
@@ -498,7 +534,7 @@ declare const aiJobsRouter: hono_hono_base.HonoBase<hono_types.BlankEnv, ((({
|
|
|
498
534
|
status: "checking" | "running" | "done" | "rejected" | "failed" | "cancelled";
|
|
499
535
|
verdict: "reject" | "review" | "pass" | null;
|
|
500
536
|
checks: {
|
|
501
|
-
type: "
|
|
537
|
+
type: "bedrock" | "rekognition";
|
|
502
538
|
target: string;
|
|
503
539
|
verdict: "reject" | "review" | "pass";
|
|
504
540
|
labels: string[];
|
|
@@ -507,13 +543,13 @@ declare const aiJobsRouter: hono_hono_base.HonoBase<hono_types.BlankEnv, ((({
|
|
|
507
543
|
}[];
|
|
508
544
|
tasks: {
|
|
509
545
|
key: string;
|
|
510
|
-
endpoint: "
|
|
546
|
+
endpoint: "fake:echo" | `fal:${string}` | `openai:${string}` | `replicate:${string}`;
|
|
511
547
|
status: "done" | "rejected" | "failed" | "cancelled" | "pending" | "submitted" | "saving";
|
|
512
548
|
attempt: number;
|
|
513
549
|
outputPath: string;
|
|
514
550
|
verdict: "reject" | "review" | "pass" | null;
|
|
515
551
|
checks: {
|
|
516
|
-
type: "
|
|
552
|
+
type: "bedrock" | "rekognition";
|
|
517
553
|
target: string;
|
|
518
554
|
verdict: "reject" | "review" | "pass";
|
|
519
555
|
labels: string[];
|
|
@@ -522,7 +558,7 @@ declare const aiJobsRouter: hono_hono_base.HonoBase<hono_types.BlankEnv, ((({
|
|
|
522
558
|
}[];
|
|
523
559
|
error: "submit failed" | "provider error" | "provider timed out" | "save failed" | null;
|
|
524
560
|
estimatedUsd: number;
|
|
525
|
-
servedBy?: "
|
|
561
|
+
servedBy?: "fake:echo" | `fal:${string}` | `openai:${string}` | `replicate:${string}` | null | undefined;
|
|
526
562
|
}[];
|
|
527
563
|
createdAt: string;
|
|
528
564
|
updatedAt: string;
|
|
@@ -540,14 +576,14 @@ declare const aiJobsRouter: hono_hono_base.HonoBase<hono_types.BlankEnv, ((({
|
|
|
540
576
|
id: string;
|
|
541
577
|
tasks: {
|
|
542
578
|
key: string;
|
|
543
|
-
endpoint: "
|
|
579
|
+
endpoint: "fake:echo" | `fal:${string}` | `openai:${string}` | `replicate:${string}`;
|
|
544
580
|
input: Record<string, unknown>;
|
|
545
581
|
output: {
|
|
546
582
|
path: string;
|
|
547
583
|
};
|
|
548
584
|
priority?: number | undefined;
|
|
549
585
|
fallbacks?: {
|
|
550
|
-
endpoint: "
|
|
586
|
+
endpoint: "fake:echo" | `fal:${string}` | `openai:${string}` | `replicate:${string}`;
|
|
551
587
|
input?: Record<string, unknown> | undefined;
|
|
552
588
|
}[] | undefined;
|
|
553
589
|
fallbackAfter?: number | undefined;
|
|
@@ -561,7 +597,7 @@ declare const aiJobsRouter: hono_hono_base.HonoBase<hono_types.BlankEnv, ((({
|
|
|
561
597
|
status: "checking" | "running" | "done" | "rejected" | "failed" | "cancelled";
|
|
562
598
|
verdict: "reject" | "review" | "pass" | null;
|
|
563
599
|
checks: {
|
|
564
|
-
type: "
|
|
600
|
+
type: "bedrock" | "rekognition";
|
|
565
601
|
target: string;
|
|
566
602
|
verdict: "reject" | "review" | "pass";
|
|
567
603
|
labels: string[];
|
|
@@ -570,13 +606,13 @@ declare const aiJobsRouter: hono_hono_base.HonoBase<hono_types.BlankEnv, ((({
|
|
|
570
606
|
}[];
|
|
571
607
|
tasks: {
|
|
572
608
|
key: string;
|
|
573
|
-
endpoint: "
|
|
609
|
+
endpoint: "fake:echo" | `fal:${string}` | `openai:${string}` | `replicate:${string}`;
|
|
574
610
|
status: "done" | "rejected" | "failed" | "cancelled" | "pending" | "submitted" | "saving";
|
|
575
611
|
attempt: number;
|
|
576
612
|
outputPath: string;
|
|
577
613
|
verdict: "reject" | "review" | "pass" | null;
|
|
578
614
|
checks: {
|
|
579
|
-
type: "
|
|
615
|
+
type: "bedrock" | "rekognition";
|
|
580
616
|
target: string;
|
|
581
617
|
verdict: "reject" | "review" | "pass";
|
|
582
618
|
labels: string[];
|
|
@@ -585,7 +621,7 @@ declare const aiJobsRouter: hono_hono_base.HonoBase<hono_types.BlankEnv, ((({
|
|
|
585
621
|
}[];
|
|
586
622
|
error: "submit failed" | "provider error" | "provider timed out" | "save failed" | null;
|
|
587
623
|
estimatedUsd: number;
|
|
588
|
-
servedBy?: "
|
|
624
|
+
servedBy?: "fake:echo" | `fal:${string}` | `openai:${string}` | `replicate:${string}` | null | undefined;
|
|
589
625
|
}[];
|
|
590
626
|
createdAt: string;
|
|
591
627
|
updatedAt: string;
|
|
@@ -641,7 +677,7 @@ declare const aiJobsRouter: hono_hono_base.HonoBase<hono_types.BlankEnv, ((({
|
|
|
641
677
|
output: {
|
|
642
678
|
verdict: "reject" | "review" | "pass";
|
|
643
679
|
checks: {
|
|
644
|
-
type: "
|
|
680
|
+
type: "bedrock" | "rekognition";
|
|
645
681
|
target: string;
|
|
646
682
|
verdict: "reject" | "review" | "pass";
|
|
647
683
|
labels: string[];
|
|
@@ -668,7 +704,7 @@ declare const aiJobsRouter: hono_hono_base.HonoBase<hono_types.BlankEnv, ((({
|
|
|
668
704
|
status: "checking" | "running" | "done" | "rejected" | "failed" | "cancelled";
|
|
669
705
|
verdict: "reject" | "review" | "pass" | null;
|
|
670
706
|
checks: {
|
|
671
|
-
type: "
|
|
707
|
+
type: "bedrock" | "rekognition";
|
|
672
708
|
target: string;
|
|
673
709
|
verdict: "reject" | "review" | "pass";
|
|
674
710
|
labels: string[];
|
|
@@ -677,13 +713,13 @@ declare const aiJobsRouter: hono_hono_base.HonoBase<hono_types.BlankEnv, ((({
|
|
|
677
713
|
}[];
|
|
678
714
|
tasks: {
|
|
679
715
|
key: string;
|
|
680
|
-
endpoint: "
|
|
716
|
+
endpoint: "fake:echo" | `fal:${string}` | `openai:${string}` | `replicate:${string}`;
|
|
681
717
|
status: "done" | "rejected" | "failed" | "cancelled" | "pending" | "submitted" | "saving";
|
|
682
718
|
attempt: number;
|
|
683
719
|
outputPath: string;
|
|
684
720
|
verdict: "reject" | "review" | "pass" | null;
|
|
685
721
|
checks: {
|
|
686
|
-
type: "
|
|
722
|
+
type: "bedrock" | "rekognition";
|
|
687
723
|
target: string;
|
|
688
724
|
verdict: "reject" | "review" | "pass";
|
|
689
725
|
labels: string[];
|
|
@@ -692,7 +728,7 @@ declare const aiJobsRouter: hono_hono_base.HonoBase<hono_types.BlankEnv, ((({
|
|
|
692
728
|
}[];
|
|
693
729
|
error: "submit failed" | "provider error" | "provider timed out" | "save failed" | null;
|
|
694
730
|
estimatedUsd: number;
|
|
695
|
-
servedBy?: "
|
|
731
|
+
servedBy?: "fake:echo" | `fal:${string}` | `openai:${string}` | `replicate:${string}` | null | undefined;
|
|
696
732
|
}[];
|
|
697
733
|
createdAt: string;
|
|
698
734
|
updatedAt: string;
|
|
@@ -717,7 +753,7 @@ declare const aiJobsRouter: hono_hono_base.HonoBase<hono_types.BlankEnv, ((({
|
|
|
717
753
|
status: "checking" | "running" | "done" | "rejected" | "failed" | "cancelled";
|
|
718
754
|
verdict: "reject" | "review" | "pass" | null;
|
|
719
755
|
checks: {
|
|
720
|
-
type: "
|
|
756
|
+
type: "bedrock" | "rekognition";
|
|
721
757
|
target: string;
|
|
722
758
|
verdict: "reject" | "review" | "pass";
|
|
723
759
|
labels: string[];
|
|
@@ -726,13 +762,13 @@ declare const aiJobsRouter: hono_hono_base.HonoBase<hono_types.BlankEnv, ((({
|
|
|
726
762
|
}[];
|
|
727
763
|
tasks: {
|
|
728
764
|
key: string;
|
|
729
|
-
endpoint: "
|
|
765
|
+
endpoint: "fake:echo" | `fal:${string}` | `openai:${string}` | `replicate:${string}`;
|
|
730
766
|
status: "done" | "rejected" | "failed" | "cancelled" | "pending" | "submitted" | "saving";
|
|
731
767
|
attempt: number;
|
|
732
768
|
outputPath: string;
|
|
733
769
|
verdict: "reject" | "review" | "pass" | null;
|
|
734
770
|
checks: {
|
|
735
|
-
type: "
|
|
771
|
+
type: "bedrock" | "rekognition";
|
|
736
772
|
target: string;
|
|
737
773
|
verdict: "reject" | "review" | "pass";
|
|
738
774
|
labels: string[];
|
|
@@ -741,7 +777,7 @@ declare const aiJobsRouter: hono_hono_base.HonoBase<hono_types.BlankEnv, ((({
|
|
|
741
777
|
}[];
|
|
742
778
|
error: "submit failed" | "provider error" | "provider timed out" | "save failed" | null;
|
|
743
779
|
estimatedUsd: number;
|
|
744
|
-
servedBy?: "
|
|
780
|
+
servedBy?: "fake:echo" | `fal:${string}` | `openai:${string}` | `replicate:${string}` | null | undefined;
|
|
745
781
|
}[];
|
|
746
782
|
createdAt: string;
|
|
747
783
|
updatedAt: string;
|
|
@@ -770,7 +806,7 @@ declare const aiJobsRouter: hono_hono_base.HonoBase<hono_types.BlankEnv, ((({
|
|
|
770
806
|
status: "checking" | "running" | "done" | "rejected" | "failed" | "cancelled";
|
|
771
807
|
verdict: "reject" | "review" | "pass" | null;
|
|
772
808
|
checks: {
|
|
773
|
-
type: "
|
|
809
|
+
type: "bedrock" | "rekognition";
|
|
774
810
|
target: string;
|
|
775
811
|
verdict: "reject" | "review" | "pass";
|
|
776
812
|
labels: string[];
|
|
@@ -779,13 +815,13 @@ declare const aiJobsRouter: hono_hono_base.HonoBase<hono_types.BlankEnv, ((({
|
|
|
779
815
|
}[];
|
|
780
816
|
tasks: {
|
|
781
817
|
key: string;
|
|
782
|
-
endpoint: "
|
|
818
|
+
endpoint: "fake:echo" | `fal:${string}` | `openai:${string}` | `replicate:${string}`;
|
|
783
819
|
status: "done" | "rejected" | "failed" | "cancelled" | "pending" | "submitted" | "saving";
|
|
784
820
|
attempt: number;
|
|
785
821
|
outputPath: string;
|
|
786
822
|
verdict: "reject" | "review" | "pass" | null;
|
|
787
823
|
checks: {
|
|
788
|
-
type: "
|
|
824
|
+
type: "bedrock" | "rekognition";
|
|
789
825
|
target: string;
|
|
790
826
|
verdict: "reject" | "review" | "pass";
|
|
791
827
|
labels: string[];
|
|
@@ -794,7 +830,7 @@ declare const aiJobsRouter: hono_hono_base.HonoBase<hono_types.BlankEnv, ((({
|
|
|
794
830
|
}[];
|
|
795
831
|
error: "submit failed" | "provider error" | "provider timed out" | "save failed" | null;
|
|
796
832
|
estimatedUsd: number;
|
|
797
|
-
servedBy?: "
|
|
833
|
+
servedBy?: "fake:echo" | `fal:${string}` | `openai:${string}` | `replicate:${string}` | null | undefined;
|
|
798
834
|
}[];
|
|
799
835
|
createdAt: string;
|
|
800
836
|
updatedAt: string;
|
|
@@ -1059,9 +1095,10 @@ type DmxRouter = typeof dmxRouter;
|
|
|
1059
1095
|
type StorageRouter = typeof storageRouter;
|
|
1060
1096
|
type DatabaseRouter = typeof databaseRouter;
|
|
1061
1097
|
type BedrockRouter = typeof bedrockRouter;
|
|
1098
|
+
type AnthropicRouter = typeof anthropicRouter;
|
|
1062
1099
|
type DevicesRouter = typeof devicesRouter;
|
|
1063
1100
|
type AiJobsRouter = typeof aiJobsRouter;
|
|
1064
1101
|
type RealtimeRouter = typeof realtimeRouter;
|
|
1065
1102
|
type InstancesRouter = typeof instancesRouter;
|
|
1066
1103
|
|
|
1067
|
-
export { type AiJobsRouter, type BedrockRouter, type DatabaseRouter, type DevicesRouter, type DmxRouter, type InstancesRouter, type RealtimeRouter, type StorageRouter, app as default };
|
|
1104
|
+
export { type AiJobsRouter, type AnthropicRouter, type BedrockRouter, type DatabaseRouter, type DevicesRouter, type DmxRouter, type InstancesRouter, type RealtimeRouter, type StorageRouter, app as default };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@digo-labs/backend",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.8",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/index.cjs",
|
|
6
6
|
"types": "./dist/index.d.cts",
|
|
@@ -38,9 +38,10 @@
|
|
|
38
38
|
]
|
|
39
39
|
},
|
|
40
40
|
"peerDependencies": {
|
|
41
|
-
"@digo-labs/common": "^0.2.
|
|
41
|
+
"@digo-labs/common": "^0.2.16"
|
|
42
42
|
},
|
|
43
43
|
"dependencies": {
|
|
44
|
+
"@anthropic-ai/sdk": "^1.6.0",
|
|
44
45
|
"@aws-sdk/client-bedrock-runtime": "^3.1035.0",
|
|
45
46
|
"@aws-sdk/client-rekognition": "^3.1078.0",
|
|
46
47
|
"@aws-sdk/client-s3": "^3.1032.0",
|