@digo-labs/common 0.1.11 → 0.1.13

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.
@@ -6,46 +6,89 @@ export interface ModelMetadata {
6
6
  version: string;
7
7
  description: string;
8
8
  }
9
- export declare const BEDROCK_MODELS: readonly [{
10
- readonly id: "us.anthropic.claude-haiku-4-5-20251001-v1:0";
11
- readonly provider: "Anthropic";
12
- readonly name: "Claude Haiku";
13
- readonly version: "4.5";
14
- readonly description: "Fastest and cheapest, good for short replies.";
15
- }, {
16
- readonly id: "us.anthropic.claude-sonnet-4-6";
17
- readonly provider: "Anthropic";
18
- readonly name: "Claude Sonnet";
19
- readonly version: "4.6";
20
- readonly description: "Balanced quality and speed for most tasks.";
21
- }, {
22
- readonly id: "us.anthropic.claude-opus-4-7";
23
- readonly provider: "Anthropic";
24
- readonly name: "Claude Opus";
25
- readonly version: "4.7";
26
- readonly description: "Highest quality, slower and more expensive.";
27
- }, {
28
- readonly id: "us.amazon.nova-micro-v1:0";
29
- readonly provider: "Amazon";
30
- readonly name: "Nova Micro";
31
- readonly version: "1";
32
- readonly description: "Text-only, extremely fast and cheap.";
33
- }, {
34
- readonly id: "us.amazon.nova-lite-v1:0";
35
- readonly provider: "Amazon";
36
- readonly name: "Nova Lite";
37
- readonly version: "1";
38
- readonly description: "Fast multimodal with image and video input.";
39
- }, {
40
- readonly id: "us.amazon.nova-pro-v1:0";
41
- readonly provider: "Amazon";
42
- readonly name: "Nova Pro";
43
- readonly version: "1";
44
- readonly description: "Higher-quality multimodal, slower than Lite.";
45
- }];
46
- export type KnownTextModel = (typeof BEDROCK_MODELS)[number]['id'];
47
- export type TextModel = KnownTextModel | (string & {});
48
- export declare const DEFAULT_TEXT_MODEL: TextModel;
9
+ export declare const imageGenerateBodySchema: z.ZodObject<{
10
+ prompt: z.ZodString;
11
+ aspectRatio: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<`${number}:${number}`, string>>>;
12
+ seed: z.ZodOptional<z.ZodNumber>;
13
+ }, z.core.$strip>;
14
+ export type ImageGenerateBody = z.infer<typeof imageGenerateBodySchema>;
15
+ export declare const imageEditBodySchema: z.ZodObject<{
16
+ prompt: z.ZodString;
17
+ image: z.ZodString;
18
+ strength: z.ZodOptional<z.ZodNumber>;
19
+ }, z.core.$strip>;
20
+ export type ImageEditBody = z.infer<typeof imageEditBodySchema>;
21
+ export declare const imageUpscaleBodySchema: z.ZodObject<{
22
+ image: z.ZodString;
23
+ factor: z.ZodOptional<z.ZodNumber>;
24
+ }, z.core.$strip>;
25
+ export type ImageUpscaleBody = z.infer<typeof imageUpscaleBodySchema>;
26
+ export declare const imageRemoveBackgroundBodySchema: z.ZodObject<{
27
+ image: z.ZodString;
28
+ }, z.core.$strip>;
29
+ export type ImageRemoveBackgroundBody = z.infer<typeof imageRemoveBackgroundBodySchema>;
30
+ export declare const generatedImageSchema: z.ZodObject<{
31
+ url: z.ZodString;
32
+ contentType: z.ZodOptional<z.ZodString>;
33
+ width: z.ZodOptional<z.ZodNumber>;
34
+ height: z.ZodOptional<z.ZodNumber>;
35
+ seed: z.ZodOptional<z.ZodNumber>;
36
+ model: z.ZodOptional<z.ZodString>;
37
+ }, z.core.$strip>;
38
+ export type GeneratedImage = z.infer<typeof generatedImageSchema>;
39
+ export declare const videoGenerateBodySchema: z.ZodObject<{
40
+ prompt: z.ZodString;
41
+ aspectRatio: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<`${number}:${number}`, string>>>;
42
+ durationSeconds: z.ZodOptional<z.ZodNumber>;
43
+ }, z.core.$strip>;
44
+ export type VideoGenerateBody = z.infer<typeof videoGenerateBodySchema>;
45
+ export declare const generatedVideoSchema: z.ZodObject<{
46
+ url: z.ZodString;
47
+ contentType: z.ZodOptional<z.ZodString>;
48
+ durationSeconds: z.ZodOptional<z.ZodNumber>;
49
+ model: z.ZodOptional<z.ZodString>;
50
+ }, z.core.$strip>;
51
+ export type GeneratedVideo = z.infer<typeof generatedVideoSchema>;
52
+ export declare const audioSpeechBodySchema: z.ZodObject<{
53
+ text: z.ZodString;
54
+ voice: z.ZodOptional<z.ZodString>;
55
+ speed: z.ZodOptional<z.ZodNumber>;
56
+ }, z.core.$strip>;
57
+ export type AudioSpeechBody = z.infer<typeof audioSpeechBodySchema>;
58
+ export declare const audioMusicBodySchema: z.ZodObject<{
59
+ prompt: z.ZodString;
60
+ durationSeconds: z.ZodOptional<z.ZodNumber>;
61
+ }, z.core.$strip>;
62
+ export type AudioMusicBody = z.infer<typeof audioMusicBodySchema>;
63
+ export declare const audioTranscribeBodySchema: z.ZodObject<{
64
+ audio: z.ZodString;
65
+ language: z.ZodOptional<z.ZodString>;
66
+ }, z.core.$strip>;
67
+ export type AudioTranscribeBody = z.infer<typeof audioTranscribeBodySchema>;
68
+ export declare const generatedAudioSchema: z.ZodObject<{
69
+ url: z.ZodString;
70
+ contentType: z.ZodOptional<z.ZodString>;
71
+ durationSeconds: z.ZodOptional<z.ZodNumber>;
72
+ model: z.ZodOptional<z.ZodString>;
73
+ }, z.core.$strip>;
74
+ export type GeneratedAudio = z.infer<typeof generatedAudioSchema>;
75
+ export declare const transcriptionSegmentSchema: z.ZodObject<{
76
+ text: z.ZodString;
77
+ startSecond: z.ZodNumber;
78
+ endSecond: z.ZodNumber;
79
+ }, z.core.$strip>;
80
+ export type TranscriptionSegment = z.infer<typeof transcriptionSegmentSchema>;
81
+ export declare const transcriptionSchema: z.ZodObject<{
82
+ text: z.ZodString;
83
+ segments: z.ZodOptional<z.ZodArray<z.ZodObject<{
84
+ text: z.ZodString;
85
+ startSecond: z.ZodNumber;
86
+ endSecond: z.ZodNumber;
87
+ }, z.core.$strip>>>;
88
+ language: z.ZodOptional<z.ZodString>;
89
+ model: z.ZodOptional<z.ZodString>;
90
+ }, z.core.$strip>;
91
+ export type Transcription = z.infer<typeof transcriptionSchema>;
49
92
  export declare const textMessageSchema: z.ZodObject<{
50
93
  role: z.ZodEnum<{
51
94
  user: "user";
@@ -88,6 +131,28 @@ export declare const textBodySchema: z.ZodObject<{
88
131
  providerOptions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodAny>>>;
89
132
  }, z.core.$strip>;
90
133
  export type TextBody = z.infer<typeof textBodySchema>;
134
+ export declare const textGenerateBodySchema: z.ZodObject<{
135
+ messages: z.ZodArray<z.ZodObject<{
136
+ role: z.ZodEnum<{
137
+ user: "user";
138
+ assistant: "assistant";
139
+ }>;
140
+ content: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
141
+ type: z.ZodLiteral<"text">;
142
+ text: z.ZodString;
143
+ }, z.core.$strip>, z.ZodObject<{
144
+ type: z.ZodLiteral<"image">;
145
+ source: z.ZodObject<{
146
+ base64: z.ZodString;
147
+ mediaType: z.ZodString;
148
+ }, z.core.$strip>;
149
+ }, z.core.$strip>]>>]>;
150
+ }, z.core.$strip>>;
151
+ systemPrompt: z.ZodOptional<z.ZodString>;
152
+ temperature: z.ZodOptional<z.ZodNumber>;
153
+ maxTokens: z.ZodOptional<z.ZodNumber>;
154
+ }, z.core.$strip>;
155
+ export type TextGenerateBody = z.infer<typeof textGenerateBodySchema>;
91
156
  export type TextStreamChunk = {
92
157
  text: string;
93
158
  };
@@ -1,7 +1,7 @@
1
1
  import { z } from 'zod';
2
2
  export declare const databaseGetAllBodySchema: z.ZodObject<{
3
3
  table: z.ZodString;
4
- limit: z.ZodOptional<z.ZodNumber>;
4
+ limit: z.ZodDefault<z.ZodNumber>;
5
5
  offset: z.ZodOptional<z.ZodNumber>;
6
6
  }, z.core.$strip>;
7
7
  export type DatabaseGetAllBody = z.infer<typeof databaseGetAllBodySchema>;
@@ -23,6 +23,8 @@ export declare const databaseGetByBodySchema: z.ZodObject<{
23
23
  table: z.ZodString;
24
24
  column: z.ZodString;
25
25
  value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>;
26
+ limit: z.ZodDefault<z.ZodNumber>;
27
+ offset: z.ZodOptional<z.ZodNumber>;
26
28
  }, z.core.$strip>;
27
29
  export type DatabaseGetByBody = z.infer<typeof databaseGetByBodySchema>;
28
30
  export declare const databaseGetByResponseSchema: z.ZodObject<{
@@ -0,0 +1,4 @@
1
+ export declare class SessionStorage {
2
+ static setValue<T>(key: string, value: T): void;
3
+ static loadValue<T>(key: string, defaultValue: T): T;
4
+ }
@@ -4,6 +4,7 @@ export interface Time {
4
4
  seconds: number;
5
5
  }
6
6
  export type Vector3 = [number, number, number];
7
+ export type Side = 'top' | 'right' | 'bottom' | 'left';
7
8
  export declare enum BedrockStyle {
8
9
  ANIMATED_FILM = "3D_ANIMATED_FAMILY_FILM",
9
10
  FLAT_VECTOR_ILLUSTRATION = "FLAT_VECTOR_ILLUSTRATION",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@digo-labs/common",
3
- "version": "0.1.11",
3
+ "version": "0.1.13",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",
@@ -1,2 +0,0 @@
1
- import { FontFaceData } from './font-types';
2
- export declare const FONT_FACES: FontFaceData[];
@@ -1,11 +0,0 @@
1
- export type FontFormat = 'ttf' | 'otf';
2
- export interface FontFaceData {
3
- family: string;
4
- weightMin: number;
5
- weightMax: number;
6
- style: string;
7
- format: FontFormat;
8
- filePath: string;
9
- fileName: string;
10
- cssVariable: string | null;
11
- }