@digo-labs/backend 0.2.1 → 0.2.5
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 +238 -2
- package/package.json +3 -2
package/dist/index.d.cts
CHANGED
|
@@ -109,12 +109,14 @@ declare const databaseRouter: hono_hono_base.HonoBase<hono_types.BlankEnv, {
|
|
|
109
109
|
table: string;
|
|
110
110
|
limit?: number | undefined;
|
|
111
111
|
offset?: number | undefined;
|
|
112
|
+
after?: string | number | null | undefined;
|
|
112
113
|
};
|
|
113
114
|
};
|
|
114
115
|
output: {
|
|
115
116
|
rows: {
|
|
116
117
|
[x: string]: hono_utils_types.JSONValue;
|
|
117
118
|
}[];
|
|
119
|
+
next: string | number | null;
|
|
118
120
|
};
|
|
119
121
|
outputFormat: "json";
|
|
120
122
|
status: hono_utils_http_status.ContentfulStatusCode;
|
|
@@ -149,12 +151,14 @@ declare const databaseRouter: hono_hono_base.HonoBase<hono_types.BlankEnv, {
|
|
|
149
151
|
value: string | number | boolean | null;
|
|
150
152
|
limit?: number | undefined;
|
|
151
153
|
offset?: number | undefined;
|
|
154
|
+
after?: string | number | null | undefined;
|
|
152
155
|
};
|
|
153
156
|
};
|
|
154
157
|
output: {
|
|
155
158
|
rows: {
|
|
156
159
|
[x: string]: hono_utils_types.JSONValue;
|
|
157
160
|
}[];
|
|
161
|
+
next: string | number | null;
|
|
158
162
|
};
|
|
159
163
|
outputFormat: "json";
|
|
160
164
|
status: hono_utils_http_status.ContentfulStatusCode;
|
|
@@ -266,6 +270,7 @@ declare const devicesRouter: hono_hono_base.HonoBase<hono_types.BlankEnv, {
|
|
|
266
270
|
device: {
|
|
267
271
|
id: string;
|
|
268
272
|
app: string;
|
|
273
|
+
instance: string;
|
|
269
274
|
name: string;
|
|
270
275
|
tier: "user" | "org";
|
|
271
276
|
createdBy: string;
|
|
@@ -290,6 +295,7 @@ declare const devicesRouter: hono_hono_base.HonoBase<hono_types.BlankEnv, {
|
|
|
290
295
|
devices: {
|
|
291
296
|
id: string;
|
|
292
297
|
app: string;
|
|
298
|
+
instance: string;
|
|
293
299
|
name: string;
|
|
294
300
|
tier: "user" | "org";
|
|
295
301
|
createdBy: string;
|
|
@@ -328,6 +334,7 @@ declare const devicesRouter: hono_hono_base.HonoBase<hono_types.BlankEnv, {
|
|
|
328
334
|
device: {
|
|
329
335
|
id: string;
|
|
330
336
|
app: string;
|
|
337
|
+
instance: string;
|
|
331
338
|
name: string;
|
|
332
339
|
tier: "user" | "org";
|
|
333
340
|
createdBy: string;
|
|
@@ -343,7 +350,7 @@ declare const devicesRouter: hono_hono_base.HonoBase<hono_types.BlankEnv, {
|
|
|
343
350
|
};
|
|
344
351
|
}, "/", "devices-me">;
|
|
345
352
|
|
|
346
|
-
declare const aiJobsRouter: hono_hono_base.HonoBase<hono_types.BlankEnv, (({
|
|
353
|
+
declare const aiJobsRouter: hono_hono_base.HonoBase<hono_types.BlankEnv, ((({
|
|
347
354
|
"jobs-get": {
|
|
348
355
|
$post: {
|
|
349
356
|
input: {
|
|
@@ -665,6 +672,57 @@ declare const aiJobsRouter: hono_hono_base.HonoBase<hono_types.BlankEnv, (({
|
|
|
665
672
|
};
|
|
666
673
|
};
|
|
667
674
|
})) & {
|
|
675
|
+
"jobs-list": {
|
|
676
|
+
$post: {
|
|
677
|
+
input: {
|
|
678
|
+
json: {
|
|
679
|
+
from?: string | undefined;
|
|
680
|
+
to?: string | undefined;
|
|
681
|
+
statuses?: ("checking" | "running" | "done" | "rejected" | "failed" | "cancelled")[] | undefined;
|
|
682
|
+
cursor?: string | undefined;
|
|
683
|
+
limit?: number | undefined;
|
|
684
|
+
};
|
|
685
|
+
};
|
|
686
|
+
output: {
|
|
687
|
+
jobs: {
|
|
688
|
+
id: string;
|
|
689
|
+
key: string;
|
|
690
|
+
status: "checking" | "running" | "done" | "rejected" | "failed" | "cancelled";
|
|
691
|
+
verdict: "reject" | "review" | "pass" | null;
|
|
692
|
+
checks: {
|
|
693
|
+
type: "rekognition" | "bedrock";
|
|
694
|
+
target: string;
|
|
695
|
+
verdict: "reject" | "review" | "pass";
|
|
696
|
+
labels: string[];
|
|
697
|
+
reason: string | null;
|
|
698
|
+
}[];
|
|
699
|
+
tasks: {
|
|
700
|
+
key: string;
|
|
701
|
+
endpoint: "fal:openai/gpt-image-2.5/flare/edit" | "fal:openai/gpt-image-2.5/sunburst/edit" | "fake:echo";
|
|
702
|
+
status: "done" | "rejected" | "failed" | "cancelled" | "pending" | "submitted" | "saving";
|
|
703
|
+
attempt: number;
|
|
704
|
+
outputPath: string;
|
|
705
|
+
verdict: "reject" | "review" | "pass" | null;
|
|
706
|
+
checks: {
|
|
707
|
+
type: "rekognition" | "bedrock";
|
|
708
|
+
target: string;
|
|
709
|
+
verdict: "reject" | "review" | "pass";
|
|
710
|
+
labels: string[];
|
|
711
|
+
reason: string | null;
|
|
712
|
+
}[];
|
|
713
|
+
error: "submit failed" | "provider error" | "provider timed out" | "save failed" | null;
|
|
714
|
+
estimatedUsd: number;
|
|
715
|
+
}[];
|
|
716
|
+
createdAt: string;
|
|
717
|
+
updatedAt: string;
|
|
718
|
+
}[];
|
|
719
|
+
next: string | null;
|
|
720
|
+
};
|
|
721
|
+
outputFormat: "json";
|
|
722
|
+
status: hono_utils_http_status.ContentfulStatusCode;
|
|
723
|
+
};
|
|
724
|
+
};
|
|
725
|
+
}) & {
|
|
668
726
|
"ai-budget-get": {
|
|
669
727
|
$post: {
|
|
670
728
|
input: {
|
|
@@ -736,6 +794,183 @@ declare const realtimeRouter: hono_hono_base.HonoBase<hono_types.BlankEnv, {
|
|
|
736
794
|
};
|
|
737
795
|
}, "/", "realtime-token">;
|
|
738
796
|
|
|
797
|
+
declare const instancesRouter: hono_hono_base.HonoBase<hono_types.BlankEnv, {
|
|
798
|
+
"instances-list": {
|
|
799
|
+
$post: {
|
|
800
|
+
input: {
|
|
801
|
+
json: Record<string, never>;
|
|
802
|
+
};
|
|
803
|
+
output: {
|
|
804
|
+
instances: {
|
|
805
|
+
app: string;
|
|
806
|
+
slug: string;
|
|
807
|
+
name: string;
|
|
808
|
+
status: "active" | "archived";
|
|
809
|
+
isDefault: boolean;
|
|
810
|
+
createdAt: string | null;
|
|
811
|
+
archivedAt: string | null;
|
|
812
|
+
role: "admin" | null;
|
|
813
|
+
}[];
|
|
814
|
+
};
|
|
815
|
+
outputFormat: "json";
|
|
816
|
+
status: hono_utils_http_status.ContentfulStatusCode;
|
|
817
|
+
};
|
|
818
|
+
};
|
|
819
|
+
} & {
|
|
820
|
+
"instances-current": {
|
|
821
|
+
$post: {
|
|
822
|
+
input: {
|
|
823
|
+
json: Record<string, never>;
|
|
824
|
+
};
|
|
825
|
+
output: {
|
|
826
|
+
instance: {
|
|
827
|
+
app: string;
|
|
828
|
+
slug: string;
|
|
829
|
+
name: string;
|
|
830
|
+
status: "active" | "archived";
|
|
831
|
+
isDefault: boolean;
|
|
832
|
+
createdAt: string | null;
|
|
833
|
+
archivedAt: string | null;
|
|
834
|
+
role: "admin" | null;
|
|
835
|
+
};
|
|
836
|
+
tier: "admin" | "user" | "org" | "public";
|
|
837
|
+
isReadOnly: boolean;
|
|
838
|
+
};
|
|
839
|
+
outputFormat: "json";
|
|
840
|
+
status: hono_utils_http_status.ContentfulStatusCode;
|
|
841
|
+
};
|
|
842
|
+
};
|
|
843
|
+
} & {
|
|
844
|
+
"instances-create": {
|
|
845
|
+
$post: {
|
|
846
|
+
input: {
|
|
847
|
+
json: {
|
|
848
|
+
slug: string;
|
|
849
|
+
name: string;
|
|
850
|
+
};
|
|
851
|
+
};
|
|
852
|
+
output: {
|
|
853
|
+
instance: {
|
|
854
|
+
app: string;
|
|
855
|
+
slug: string;
|
|
856
|
+
name: string;
|
|
857
|
+
status: "active" | "archived";
|
|
858
|
+
isDefault: boolean;
|
|
859
|
+
createdAt: string | null;
|
|
860
|
+
archivedAt: string | null;
|
|
861
|
+
role: "admin" | null;
|
|
862
|
+
};
|
|
863
|
+
};
|
|
864
|
+
outputFormat: "json";
|
|
865
|
+
status: hono_utils_http_status.ContentfulStatusCode;
|
|
866
|
+
};
|
|
867
|
+
};
|
|
868
|
+
} & {
|
|
869
|
+
"instances-rename": {
|
|
870
|
+
$post: {
|
|
871
|
+
input: {
|
|
872
|
+
json: {
|
|
873
|
+
slug: string;
|
|
874
|
+
name: string;
|
|
875
|
+
};
|
|
876
|
+
};
|
|
877
|
+
output: {
|
|
878
|
+
instance: {
|
|
879
|
+
app: string;
|
|
880
|
+
slug: string;
|
|
881
|
+
name: string;
|
|
882
|
+
status: "active" | "archived";
|
|
883
|
+
isDefault: boolean;
|
|
884
|
+
createdAt: string | null;
|
|
885
|
+
archivedAt: string | null;
|
|
886
|
+
role: "admin" | null;
|
|
887
|
+
};
|
|
888
|
+
};
|
|
889
|
+
outputFormat: "json";
|
|
890
|
+
status: hono_utils_http_status.ContentfulStatusCode;
|
|
891
|
+
};
|
|
892
|
+
};
|
|
893
|
+
} & {
|
|
894
|
+
"instances-archive": {
|
|
895
|
+
$post: {
|
|
896
|
+
input: {
|
|
897
|
+
json: {
|
|
898
|
+
slug: string;
|
|
899
|
+
};
|
|
900
|
+
};
|
|
901
|
+
output: {
|
|
902
|
+
instance: {
|
|
903
|
+
app: string;
|
|
904
|
+
slug: string;
|
|
905
|
+
name: string;
|
|
906
|
+
status: "active" | "archived";
|
|
907
|
+
isDefault: boolean;
|
|
908
|
+
createdAt: string | null;
|
|
909
|
+
archivedAt: string | null;
|
|
910
|
+
role: "admin" | null;
|
|
911
|
+
};
|
|
912
|
+
};
|
|
913
|
+
outputFormat: "json";
|
|
914
|
+
status: hono_utils_http_status.ContentfulStatusCode;
|
|
915
|
+
};
|
|
916
|
+
};
|
|
917
|
+
} & {
|
|
918
|
+
"instances-reopen": {
|
|
919
|
+
$post: {
|
|
920
|
+
input: {
|
|
921
|
+
json: {
|
|
922
|
+
slug: string;
|
|
923
|
+
};
|
|
924
|
+
};
|
|
925
|
+
output: {
|
|
926
|
+
instance: {
|
|
927
|
+
app: string;
|
|
928
|
+
slug: string;
|
|
929
|
+
name: string;
|
|
930
|
+
status: "active" | "archived";
|
|
931
|
+
isDefault: boolean;
|
|
932
|
+
createdAt: string | null;
|
|
933
|
+
archivedAt: string | null;
|
|
934
|
+
role: "admin" | null;
|
|
935
|
+
};
|
|
936
|
+
};
|
|
937
|
+
outputFormat: "json";
|
|
938
|
+
status: hono_utils_http_status.ContentfulStatusCode;
|
|
939
|
+
};
|
|
940
|
+
};
|
|
941
|
+
} & {
|
|
942
|
+
"instances-admins": {
|
|
943
|
+
$post: {
|
|
944
|
+
input: {
|
|
945
|
+
json: {
|
|
946
|
+
slug: string;
|
|
947
|
+
};
|
|
948
|
+
};
|
|
949
|
+
output: {
|
|
950
|
+
emails: string[];
|
|
951
|
+
};
|
|
952
|
+
outputFormat: "json";
|
|
953
|
+
status: hono_utils_http_status.ContentfulStatusCode;
|
|
954
|
+
};
|
|
955
|
+
};
|
|
956
|
+
} & {
|
|
957
|
+
"instances-set-admins": {
|
|
958
|
+
$post: {
|
|
959
|
+
input: {
|
|
960
|
+
json: {
|
|
961
|
+
slug: string;
|
|
962
|
+
emails: string[];
|
|
963
|
+
};
|
|
964
|
+
};
|
|
965
|
+
output: {
|
|
966
|
+
emails: string[];
|
|
967
|
+
};
|
|
968
|
+
outputFormat: "json";
|
|
969
|
+
status: hono_utils_http_status.ContentfulStatusCode;
|
|
970
|
+
};
|
|
971
|
+
};
|
|
972
|
+
}, "/", "instances-set-admins">;
|
|
973
|
+
|
|
739
974
|
declare const app: Hono<hono_types.BlankEnv, hono_types.BlankSchema, "/">;
|
|
740
975
|
type DmxRouter = typeof dmxRouter;
|
|
741
976
|
type StorageRouter = typeof storageRouter;
|
|
@@ -744,5 +979,6 @@ type BedrockRouter = typeof bedrockRouter;
|
|
|
744
979
|
type DevicesRouter = typeof devicesRouter;
|
|
745
980
|
type AiJobsRouter = typeof aiJobsRouter;
|
|
746
981
|
type RealtimeRouter = typeof realtimeRouter;
|
|
982
|
+
type InstancesRouter = typeof instancesRouter;
|
|
747
983
|
|
|
748
|
-
export { type AiJobsRouter, type BedrockRouter, type DatabaseRouter, type DevicesRouter, type DmxRouter, type RealtimeRouter, type StorageRouter, app as default };
|
|
984
|
+
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.5",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/index.cjs",
|
|
6
6
|
"types": "./dist/index.d.cts",
|
|
@@ -33,11 +33,12 @@
|
|
|
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.13"
|
|
41
42
|
},
|
|
42
43
|
"dependencies": {
|
|
43
44
|
"@aws-sdk/client-bedrock-runtime": "^3.1035.0",
|