@digo-labs/backend 0.2.0 → 0.2.1

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.
Files changed (2) hide show
  1. package/dist/index.d.cts +63 -7
  2. package/package.json +4 -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: {
@@ -341,7 +343,7 @@ declare const devicesRouter: hono_hono_base.HonoBase<hono_types.BlankEnv, {
341
343
  };
342
344
  }, "/", "devices-me">;
343
345
 
344
- declare const aiJobsRouter: hono_hono_base.HonoBase<hono_types.BlankEnv, {
346
+ declare const aiJobsRouter: hono_hono_base.HonoBase<hono_types.BlankEnv, (({
345
347
  "jobs-get": {
346
348
  $post: {
347
349
  input: {
@@ -376,7 +378,7 @@ declare const aiJobsRouter: hono_hono_base.HonoBase<hono_types.BlankEnv, {
376
378
  labels: string[];
377
379
  reason: string | null;
378
380
  }[];
379
- error: string | null;
381
+ error: "submit failed" | "provider error" | "provider timed out" | "save failed" | null;
380
382
  estimatedUsd: number;
381
383
  }[];
382
384
  createdAt: string;
@@ -465,7 +467,7 @@ declare const aiJobsRouter: hono_hono_base.HonoBase<hono_types.BlankEnv, {
465
467
  labels: string[];
466
468
  reason: string | null;
467
469
  }[];
468
- error: string | null;
470
+ error: "submit failed" | "provider error" | "provider timed out" | "save failed" | null;
469
471
  estimatedUsd: number;
470
472
  }[];
471
473
  createdAt: string;
@@ -520,7 +522,7 @@ declare const aiJobsRouter: hono_hono_base.HonoBase<hono_types.BlankEnv, {
520
522
  labels: string[];
521
523
  reason: string | null;
522
524
  }[];
523
- error: string | null;
525
+ error: "submit failed" | "provider error" | "provider timed out" | "save failed" | null;
524
526
  estimatedUsd: number;
525
527
  }[];
526
528
  createdAt: string;
@@ -605,7 +607,7 @@ declare const aiJobsRouter: hono_hono_base.HonoBase<hono_types.BlankEnv, {
605
607
  labels: string[];
606
608
  reason: string | null;
607
609
  }[];
608
- error: string | null;
610
+ error: "submit failed" | "provider error" | "provider timed out" | "save failed" | null;
609
611
  estimatedUsd: number;
610
612
  }[];
611
613
  createdAt: string;
@@ -651,7 +653,7 @@ declare const aiJobsRouter: hono_hono_base.HonoBase<hono_types.BlankEnv, {
651
653
  labels: string[];
652
654
  reason: string | null;
653
655
  }[];
654
- error: string | null;
656
+ error: "submit failed" | "provider error" | "provider timed out" | "save failed" | null;
655
657
  estimatedUsd: number;
656
658
  }[];
657
659
  createdAt: string;
@@ -662,7 +664,61 @@ declare const aiJobsRouter: hono_hono_base.HonoBase<hono_types.BlankEnv, {
662
664
  status: hono_utils_http_status.ContentfulStatusCode;
663
665
  };
664
666
  };
665
- }), "/", "jobs-get">;
667
+ })) & {
668
+ "ai-budget-get": {
669
+ $post: {
670
+ input: {
671
+ json: Record<string, never>;
672
+ };
673
+ output: {
674
+ budget: {
675
+ maxTasksPerJob: number | null;
676
+ maxInFlight: number | null;
677
+ hourlyUsd: number | null;
678
+ dailyUsd: number | null;
679
+ isPaused: boolean;
680
+ };
681
+ usage: {
682
+ hourlyUsd: number;
683
+ dailyUsd: number;
684
+ inFlight: number;
685
+ };
686
+ };
687
+ outputFormat: "json";
688
+ status: hono_utils_http_status.ContentfulStatusCode;
689
+ };
690
+ };
691
+ }) & {
692
+ "ai-budget-update": {
693
+ $post: {
694
+ input: {
695
+ json: {
696
+ maxTasksPerJob?: number | null | undefined;
697
+ maxInFlight?: number | null | undefined;
698
+ hourlyUsd?: number | null | undefined;
699
+ dailyUsd?: number | null | undefined;
700
+ isPaused?: boolean | undefined;
701
+ };
702
+ };
703
+ output: {
704
+ budget: {
705
+ maxTasksPerJob: number | null;
706
+ maxInFlight: number | null;
707
+ hourlyUsd: number | null;
708
+ dailyUsd: number | null;
709
+ isPaused: boolean;
710
+ };
711
+ usage: {
712
+ hourlyUsd: number;
713
+ dailyUsd: number;
714
+ inFlight: number;
715
+ };
716
+ };
717
+ outputFormat: "json";
718
+ status: hono_utils_http_status.ContentfulStatusCode;
719
+ };
720
+ };
721
+ }, "/", "ai-budget-update">;
666
722
 
667
723
  declare const realtimeRouter: hono_hono_base.HonoBase<hono_types.BlankEnv, {
668
724
  "realtime-token": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@digo-labs/backend",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "type": "module",
5
5
  "main": "./dist/index.cjs",
6
6
  "types": "./dist/index.d.cts",
@@ -37,15 +37,15 @@
37
37
  ]
38
38
  },
39
39
  "peerDependencies": {
40
- "@digo-labs/common": "^0.2.0"
40
+ "@digo-labs/common": "^0.2.10"
41
41
  },
42
42
  "dependencies": {
43
- "@aws-sdk/client-bedrock": "^3.1035.0",
44
43
  "@aws-sdk/client-bedrock-runtime": "^3.1035.0",
45
44
  "@aws-sdk/client-rekognition": "^3.1078.0",
46
45
  "@aws-sdk/client-s3": "^3.1032.0",
46
+ "@aws-sdk/credential-providers": "^3.1078.0",
47
47
  "@aws-sdk/s3-request-presigner": "^3.1032.0",
48
- "@hono/node-server": "^1.19.14",
48
+ "@hono/node-server": "^1.19.17",
49
49
  "@hono/zod-validator": "^0.7.6",
50
50
  "@types/dmx": "^0.2.3",
51
51
  "better-auth": "^1.5.6",