@digo-labs/backend 0.2.0 → 0.2.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/index.d.cts +245 -8
- package/package.json +5 -4
package/dist/index.d.cts
CHANGED
|
@@ -30,6 +30,7 @@ declare const storageRouter: hono_hono_base.HonoBase<hono_types.BlankEnv, {
|
|
|
30
30
|
bucket: string;
|
|
31
31
|
path: string;
|
|
32
32
|
contentType: string;
|
|
33
|
+
size?: number | undefined;
|
|
33
34
|
expiresIn?: number | undefined;
|
|
34
35
|
};
|
|
35
36
|
};
|
|
@@ -186,6 +187,7 @@ declare const databaseRouter: hono_hono_base.HonoBase<hono_types.BlankEnv, {
|
|
|
186
187
|
pk: string;
|
|
187
188
|
value: string | number | boolean | null;
|
|
188
189
|
changes: Record<string, unknown>;
|
|
190
|
+
when?: unknown;
|
|
189
191
|
};
|
|
190
192
|
};
|
|
191
193
|
output: {
|
|
@@ -264,6 +266,7 @@ declare const devicesRouter: hono_hono_base.HonoBase<hono_types.BlankEnv, {
|
|
|
264
266
|
device: {
|
|
265
267
|
id: string;
|
|
266
268
|
app: string;
|
|
269
|
+
instance: string;
|
|
267
270
|
name: string;
|
|
268
271
|
tier: "user" | "org";
|
|
269
272
|
createdBy: string;
|
|
@@ -288,6 +291,7 @@ declare const devicesRouter: hono_hono_base.HonoBase<hono_types.BlankEnv, {
|
|
|
288
291
|
devices: {
|
|
289
292
|
id: string;
|
|
290
293
|
app: string;
|
|
294
|
+
instance: string;
|
|
291
295
|
name: string;
|
|
292
296
|
tier: "user" | "org";
|
|
293
297
|
createdBy: string;
|
|
@@ -326,6 +330,7 @@ declare const devicesRouter: hono_hono_base.HonoBase<hono_types.BlankEnv, {
|
|
|
326
330
|
device: {
|
|
327
331
|
id: string;
|
|
328
332
|
app: string;
|
|
333
|
+
instance: string;
|
|
329
334
|
name: string;
|
|
330
335
|
tier: "user" | "org";
|
|
331
336
|
createdBy: string;
|
|
@@ -341,7 +346,7 @@ declare const devicesRouter: hono_hono_base.HonoBase<hono_types.BlankEnv, {
|
|
|
341
346
|
};
|
|
342
347
|
}, "/", "devices-me">;
|
|
343
348
|
|
|
344
|
-
declare const aiJobsRouter: hono_hono_base.HonoBase<hono_types.BlankEnv, {
|
|
349
|
+
declare const aiJobsRouter: hono_hono_base.HonoBase<hono_types.BlankEnv, (({
|
|
345
350
|
"jobs-get": {
|
|
346
351
|
$post: {
|
|
347
352
|
input: {
|
|
@@ -376,7 +381,7 @@ declare const aiJobsRouter: hono_hono_base.HonoBase<hono_types.BlankEnv, {
|
|
|
376
381
|
labels: string[];
|
|
377
382
|
reason: string | null;
|
|
378
383
|
}[];
|
|
379
|
-
error:
|
|
384
|
+
error: "submit failed" | "provider error" | "provider timed out" | "save failed" | null;
|
|
380
385
|
estimatedUsd: number;
|
|
381
386
|
}[];
|
|
382
387
|
createdAt: string;
|
|
@@ -465,7 +470,7 @@ declare const aiJobsRouter: hono_hono_base.HonoBase<hono_types.BlankEnv, {
|
|
|
465
470
|
labels: string[];
|
|
466
471
|
reason: string | null;
|
|
467
472
|
}[];
|
|
468
|
-
error:
|
|
473
|
+
error: "submit failed" | "provider error" | "provider timed out" | "save failed" | null;
|
|
469
474
|
estimatedUsd: number;
|
|
470
475
|
}[];
|
|
471
476
|
createdAt: string;
|
|
@@ -520,7 +525,7 @@ declare const aiJobsRouter: hono_hono_base.HonoBase<hono_types.BlankEnv, {
|
|
|
520
525
|
labels: string[];
|
|
521
526
|
reason: string | null;
|
|
522
527
|
}[];
|
|
523
|
-
error:
|
|
528
|
+
error: "submit failed" | "provider error" | "provider timed out" | "save failed" | null;
|
|
524
529
|
estimatedUsd: number;
|
|
525
530
|
}[];
|
|
526
531
|
createdAt: string;
|
|
@@ -605,7 +610,7 @@ declare const aiJobsRouter: hono_hono_base.HonoBase<hono_types.BlankEnv, {
|
|
|
605
610
|
labels: string[];
|
|
606
611
|
reason: string | null;
|
|
607
612
|
}[];
|
|
608
|
-
error:
|
|
613
|
+
error: "submit failed" | "provider error" | "provider timed out" | "save failed" | null;
|
|
609
614
|
estimatedUsd: number;
|
|
610
615
|
}[];
|
|
611
616
|
createdAt: string;
|
|
@@ -651,7 +656,7 @@ declare const aiJobsRouter: hono_hono_base.HonoBase<hono_types.BlankEnv, {
|
|
|
651
656
|
labels: string[];
|
|
652
657
|
reason: string | null;
|
|
653
658
|
}[];
|
|
654
|
-
error:
|
|
659
|
+
error: "submit failed" | "provider error" | "provider timed out" | "save failed" | null;
|
|
655
660
|
estimatedUsd: number;
|
|
656
661
|
}[];
|
|
657
662
|
createdAt: string;
|
|
@@ -662,7 +667,61 @@ declare const aiJobsRouter: hono_hono_base.HonoBase<hono_types.BlankEnv, {
|
|
|
662
667
|
status: hono_utils_http_status.ContentfulStatusCode;
|
|
663
668
|
};
|
|
664
669
|
};
|
|
665
|
-
})
|
|
670
|
+
})) & {
|
|
671
|
+
"ai-budget-get": {
|
|
672
|
+
$post: {
|
|
673
|
+
input: {
|
|
674
|
+
json: Record<string, never>;
|
|
675
|
+
};
|
|
676
|
+
output: {
|
|
677
|
+
budget: {
|
|
678
|
+
maxTasksPerJob: number | null;
|
|
679
|
+
maxInFlight: number | null;
|
|
680
|
+
hourlyUsd: number | null;
|
|
681
|
+
dailyUsd: number | null;
|
|
682
|
+
isPaused: boolean;
|
|
683
|
+
};
|
|
684
|
+
usage: {
|
|
685
|
+
hourlyUsd: number;
|
|
686
|
+
dailyUsd: number;
|
|
687
|
+
inFlight: number;
|
|
688
|
+
};
|
|
689
|
+
};
|
|
690
|
+
outputFormat: "json";
|
|
691
|
+
status: hono_utils_http_status.ContentfulStatusCode;
|
|
692
|
+
};
|
|
693
|
+
};
|
|
694
|
+
}) & {
|
|
695
|
+
"ai-budget-update": {
|
|
696
|
+
$post: {
|
|
697
|
+
input: {
|
|
698
|
+
json: {
|
|
699
|
+
maxTasksPerJob?: number | null | undefined;
|
|
700
|
+
maxInFlight?: number | null | undefined;
|
|
701
|
+
hourlyUsd?: number | null | undefined;
|
|
702
|
+
dailyUsd?: number | null | undefined;
|
|
703
|
+
isPaused?: boolean | undefined;
|
|
704
|
+
};
|
|
705
|
+
};
|
|
706
|
+
output: {
|
|
707
|
+
budget: {
|
|
708
|
+
maxTasksPerJob: number | null;
|
|
709
|
+
maxInFlight: number | null;
|
|
710
|
+
hourlyUsd: number | null;
|
|
711
|
+
dailyUsd: number | null;
|
|
712
|
+
isPaused: boolean;
|
|
713
|
+
};
|
|
714
|
+
usage: {
|
|
715
|
+
hourlyUsd: number;
|
|
716
|
+
dailyUsd: number;
|
|
717
|
+
inFlight: number;
|
|
718
|
+
};
|
|
719
|
+
};
|
|
720
|
+
outputFormat: "json";
|
|
721
|
+
status: hono_utils_http_status.ContentfulStatusCode;
|
|
722
|
+
};
|
|
723
|
+
};
|
|
724
|
+
}, "/", "ai-budget-update">;
|
|
666
725
|
|
|
667
726
|
declare const realtimeRouter: hono_hono_base.HonoBase<hono_types.BlankEnv, {
|
|
668
727
|
"realtime-token": {
|
|
@@ -680,6 +739,183 @@ declare const realtimeRouter: hono_hono_base.HonoBase<hono_types.BlankEnv, {
|
|
|
680
739
|
};
|
|
681
740
|
}, "/", "realtime-token">;
|
|
682
741
|
|
|
742
|
+
declare const instancesRouter: hono_hono_base.HonoBase<hono_types.BlankEnv, {
|
|
743
|
+
"instances-list": {
|
|
744
|
+
$post: {
|
|
745
|
+
input: {
|
|
746
|
+
json: Record<string, never>;
|
|
747
|
+
};
|
|
748
|
+
output: {
|
|
749
|
+
instances: {
|
|
750
|
+
app: string;
|
|
751
|
+
slug: string;
|
|
752
|
+
name: string;
|
|
753
|
+
status: "active" | "archived";
|
|
754
|
+
isDefault: boolean;
|
|
755
|
+
createdAt: string | null;
|
|
756
|
+
archivedAt: string | null;
|
|
757
|
+
role: "admin" | null;
|
|
758
|
+
}[];
|
|
759
|
+
};
|
|
760
|
+
outputFormat: "json";
|
|
761
|
+
status: hono_utils_http_status.ContentfulStatusCode;
|
|
762
|
+
};
|
|
763
|
+
};
|
|
764
|
+
} & {
|
|
765
|
+
"instances-current": {
|
|
766
|
+
$post: {
|
|
767
|
+
input: {
|
|
768
|
+
json: Record<string, never>;
|
|
769
|
+
};
|
|
770
|
+
output: {
|
|
771
|
+
instance: {
|
|
772
|
+
app: string;
|
|
773
|
+
slug: string;
|
|
774
|
+
name: string;
|
|
775
|
+
status: "active" | "archived";
|
|
776
|
+
isDefault: boolean;
|
|
777
|
+
createdAt: string | null;
|
|
778
|
+
archivedAt: string | null;
|
|
779
|
+
role: "admin" | null;
|
|
780
|
+
};
|
|
781
|
+
tier: "admin" | "user" | "org" | "public";
|
|
782
|
+
isReadOnly: boolean;
|
|
783
|
+
};
|
|
784
|
+
outputFormat: "json";
|
|
785
|
+
status: hono_utils_http_status.ContentfulStatusCode;
|
|
786
|
+
};
|
|
787
|
+
};
|
|
788
|
+
} & {
|
|
789
|
+
"instances-create": {
|
|
790
|
+
$post: {
|
|
791
|
+
input: {
|
|
792
|
+
json: {
|
|
793
|
+
slug: string;
|
|
794
|
+
name: string;
|
|
795
|
+
};
|
|
796
|
+
};
|
|
797
|
+
output: {
|
|
798
|
+
instance: {
|
|
799
|
+
app: string;
|
|
800
|
+
slug: string;
|
|
801
|
+
name: string;
|
|
802
|
+
status: "active" | "archived";
|
|
803
|
+
isDefault: boolean;
|
|
804
|
+
createdAt: string | null;
|
|
805
|
+
archivedAt: string | null;
|
|
806
|
+
role: "admin" | null;
|
|
807
|
+
};
|
|
808
|
+
};
|
|
809
|
+
outputFormat: "json";
|
|
810
|
+
status: hono_utils_http_status.ContentfulStatusCode;
|
|
811
|
+
};
|
|
812
|
+
};
|
|
813
|
+
} & {
|
|
814
|
+
"instances-rename": {
|
|
815
|
+
$post: {
|
|
816
|
+
input: {
|
|
817
|
+
json: {
|
|
818
|
+
slug: string;
|
|
819
|
+
name: string;
|
|
820
|
+
};
|
|
821
|
+
};
|
|
822
|
+
output: {
|
|
823
|
+
instance: {
|
|
824
|
+
app: string;
|
|
825
|
+
slug: string;
|
|
826
|
+
name: string;
|
|
827
|
+
status: "active" | "archived";
|
|
828
|
+
isDefault: boolean;
|
|
829
|
+
createdAt: string | null;
|
|
830
|
+
archivedAt: string | null;
|
|
831
|
+
role: "admin" | null;
|
|
832
|
+
};
|
|
833
|
+
};
|
|
834
|
+
outputFormat: "json";
|
|
835
|
+
status: hono_utils_http_status.ContentfulStatusCode;
|
|
836
|
+
};
|
|
837
|
+
};
|
|
838
|
+
} & {
|
|
839
|
+
"instances-archive": {
|
|
840
|
+
$post: {
|
|
841
|
+
input: {
|
|
842
|
+
json: {
|
|
843
|
+
slug: string;
|
|
844
|
+
};
|
|
845
|
+
};
|
|
846
|
+
output: {
|
|
847
|
+
instance: {
|
|
848
|
+
app: string;
|
|
849
|
+
slug: string;
|
|
850
|
+
name: string;
|
|
851
|
+
status: "active" | "archived";
|
|
852
|
+
isDefault: boolean;
|
|
853
|
+
createdAt: string | null;
|
|
854
|
+
archivedAt: string | null;
|
|
855
|
+
role: "admin" | null;
|
|
856
|
+
};
|
|
857
|
+
};
|
|
858
|
+
outputFormat: "json";
|
|
859
|
+
status: hono_utils_http_status.ContentfulStatusCode;
|
|
860
|
+
};
|
|
861
|
+
};
|
|
862
|
+
} & {
|
|
863
|
+
"instances-reopen": {
|
|
864
|
+
$post: {
|
|
865
|
+
input: {
|
|
866
|
+
json: {
|
|
867
|
+
slug: string;
|
|
868
|
+
};
|
|
869
|
+
};
|
|
870
|
+
output: {
|
|
871
|
+
instance: {
|
|
872
|
+
app: string;
|
|
873
|
+
slug: string;
|
|
874
|
+
name: string;
|
|
875
|
+
status: "active" | "archived";
|
|
876
|
+
isDefault: boolean;
|
|
877
|
+
createdAt: string | null;
|
|
878
|
+
archivedAt: string | null;
|
|
879
|
+
role: "admin" | null;
|
|
880
|
+
};
|
|
881
|
+
};
|
|
882
|
+
outputFormat: "json";
|
|
883
|
+
status: hono_utils_http_status.ContentfulStatusCode;
|
|
884
|
+
};
|
|
885
|
+
};
|
|
886
|
+
} & {
|
|
887
|
+
"instances-admins": {
|
|
888
|
+
$post: {
|
|
889
|
+
input: {
|
|
890
|
+
json: {
|
|
891
|
+
slug: string;
|
|
892
|
+
};
|
|
893
|
+
};
|
|
894
|
+
output: {
|
|
895
|
+
emails: string[];
|
|
896
|
+
};
|
|
897
|
+
outputFormat: "json";
|
|
898
|
+
status: hono_utils_http_status.ContentfulStatusCode;
|
|
899
|
+
};
|
|
900
|
+
};
|
|
901
|
+
} & {
|
|
902
|
+
"instances-set-admins": {
|
|
903
|
+
$post: {
|
|
904
|
+
input: {
|
|
905
|
+
json: {
|
|
906
|
+
slug: string;
|
|
907
|
+
emails: string[];
|
|
908
|
+
};
|
|
909
|
+
};
|
|
910
|
+
output: {
|
|
911
|
+
emails: string[];
|
|
912
|
+
};
|
|
913
|
+
outputFormat: "json";
|
|
914
|
+
status: hono_utils_http_status.ContentfulStatusCode;
|
|
915
|
+
};
|
|
916
|
+
};
|
|
917
|
+
}, "/", "instances-set-admins">;
|
|
918
|
+
|
|
683
919
|
declare const app: Hono<hono_types.BlankEnv, hono_types.BlankSchema, "/">;
|
|
684
920
|
type DmxRouter = typeof dmxRouter;
|
|
685
921
|
type StorageRouter = typeof storageRouter;
|
|
@@ -688,5 +924,6 @@ type BedrockRouter = typeof bedrockRouter;
|
|
|
688
924
|
type DevicesRouter = typeof devicesRouter;
|
|
689
925
|
type AiJobsRouter = typeof aiJobsRouter;
|
|
690
926
|
type RealtimeRouter = typeof realtimeRouter;
|
|
927
|
+
type InstancesRouter = typeof instancesRouter;
|
|
691
928
|
|
|
692
|
-
export { type AiJobsRouter, type BedrockRouter, type DatabaseRouter, type DevicesRouter, type DmxRouter, type RealtimeRouter, type StorageRouter, app as default };
|
|
929
|
+
export { type AiJobsRouter, 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.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/index.cjs",
|
|
6
6
|
"types": "./dist/index.d.cts",
|
|
@@ -33,19 +33,20 @@
|
|
|
33
33
|
"skip": [
|
|
34
34
|
"create",
|
|
35
35
|
"verify",
|
|
36
|
+
"instances",
|
|
36
37
|
"refresh"
|
|
37
38
|
]
|
|
38
39
|
},
|
|
39
40
|
"peerDependencies": {
|
|
40
|
-
"@digo-labs/common": "^0.2.
|
|
41
|
+
"@digo-labs/common": "^0.2.11"
|
|
41
42
|
},
|
|
42
43
|
"dependencies": {
|
|
43
|
-
"@aws-sdk/client-bedrock": "^3.1035.0",
|
|
44
44
|
"@aws-sdk/client-bedrock-runtime": "^3.1035.0",
|
|
45
45
|
"@aws-sdk/client-rekognition": "^3.1078.0",
|
|
46
46
|
"@aws-sdk/client-s3": "^3.1032.0",
|
|
47
|
+
"@aws-sdk/credential-providers": "^3.1078.0",
|
|
47
48
|
"@aws-sdk/s3-request-presigner": "^3.1032.0",
|
|
48
|
-
"@hono/node-server": "^1.19.
|
|
49
|
+
"@hono/node-server": "^1.19.17",
|
|
49
50
|
"@hono/zod-validator": "^0.7.6",
|
|
50
51
|
"@types/dmx": "^0.2.3",
|
|
51
52
|
"better-auth": "^1.5.6",
|