@runapi.ai/seedream 0.2.13 → 0.3.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.
package/dist/index.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- import { TaskResponse, AsyncTaskStatus, TaskBillingResponse, HttpClient, RequestOptions, PollingOptions, BaseClient, ClientOptions } from '@runapi.ai/core';
1
+ import { TaskResponse, AsyncTaskStatus, HttpClient, RequestOptions, PollingOptions, BaseClient, ClientOptions } from '@runapi.ai/core';
2
2
  export { AuthenticationError, InsufficientCreditsError, NetworkError, NotFoundError, RateLimitError, RunApiError, ServiceUnavailableError, TaskFailedError, TaskTimeoutError, TimeoutError, ValidationError } from '@runapi.ai/core';
3
3
 
4
4
  /** Union of all Seedream model identifiers across text-to-image and edit endpoints. */
@@ -95,13 +95,26 @@ interface DecomposeLayersParams {
95
95
  output_format?: OutputFormat;
96
96
  callback_url?: string;
97
97
  }
98
- interface TaskCreateResponse extends TaskBillingResponse {
98
+ interface TaskCreateResponse {
99
99
  id: string;
100
100
  }
101
101
  /** A generated image with its CDN URL. */
102
102
  interface Image {
103
103
  url: string;
104
104
  }
105
+ /** Bounding box describing a layer's position within the base image. */
106
+ interface BoundingBox {
107
+ absolute?: number[];
108
+ normalized?: number[];
109
+ }
110
+ /** A decomposed layer with its position and metadata. */
111
+ interface Layer {
112
+ url: string;
113
+ z_index: number;
114
+ bounding_box?: BoundingBox;
115
+ name?: string;
116
+ description?: string;
117
+ }
105
118
  interface TextToImageResponse extends TaskResponse {
106
119
  id: string;
107
120
  status: AsyncTaskStatus;
@@ -114,7 +127,7 @@ interface DecomposeLayersResponse extends TaskResponse {
114
127
  id: string;
115
128
  status: AsyncTaskStatus;
116
129
  base_image?: Image;
117
- layers?: Image[];
130
+ layers?: Layer[];
118
131
  error?: string;
119
132
  [key: string]: unknown;
120
133
  }
@@ -134,7 +147,7 @@ type CompletedEditImageResponse = EditImageResponse & {
134
147
  type CompletedDecomposeLayersResponse = DecomposeLayersResponse & {
135
148
  status: 'completed';
136
149
  base_image: Image;
137
- layers: Image[];
150
+ layers: Layer[];
138
151
  };
139
152
 
140
153
  /**
@@ -246,4 +259,4 @@ declare class SeedreamClient extends BaseClient {
246
259
  constructor(options?: ClientOptions);
247
260
  }
248
261
 
249
- export { type AspectRatio, type CompletedDecomposeLayersResponse, type CompletedEditImageResponse, type CompletedTextToImageResponse, type DecomposeLayersModel, type DecomposeLayersParams, type DecomposeLayersResponse, type EditImageModel, type EditImageParams, type EditImageResponse, type Generation45EditImageParams, type Generation45TextParams, type Generation5LiteEditParams, type Generation5LiteTextParams, type Generation5ProEditParams, type Generation5ProTextParams, type GenerationV4EditParams, type GenerationV4TextParams, type Image, type OutputFormat, type OutputQuality, SeedreamClient, type SeedreamModel, type TaskCreateResponse, type TextToImageModel, type TextToImageParams, type TextToImageResponse, type V4OutputResolution };
262
+ export { type AspectRatio, type BoundingBox, type CompletedDecomposeLayersResponse, type CompletedEditImageResponse, type CompletedTextToImageResponse, type DecomposeLayersModel, type DecomposeLayersParams, type DecomposeLayersResponse, type EditImageModel, type EditImageParams, type EditImageResponse, type Generation45EditImageParams, type Generation45TextParams, type Generation5LiteEditParams, type Generation5LiteTextParams, type Generation5ProEditParams, type Generation5ProTextParams, type GenerationV4EditParams, type GenerationV4TextParams, type Image, type Layer, type OutputFormat, type OutputQuality, SeedreamClient, type SeedreamModel, type TaskCreateResponse, type TextToImageModel, type TextToImageParams, type TextToImageResponse, type V4OutputResolution };
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { TaskResponse, AsyncTaskStatus, TaskBillingResponse, HttpClient, RequestOptions, PollingOptions, BaseClient, ClientOptions } from '@runapi.ai/core';
1
+ import { TaskResponse, AsyncTaskStatus, HttpClient, RequestOptions, PollingOptions, BaseClient, ClientOptions } from '@runapi.ai/core';
2
2
  export { AuthenticationError, InsufficientCreditsError, NetworkError, NotFoundError, RateLimitError, RunApiError, ServiceUnavailableError, TaskFailedError, TaskTimeoutError, TimeoutError, ValidationError } from '@runapi.ai/core';
3
3
 
4
4
  /** Union of all Seedream model identifiers across text-to-image and edit endpoints. */
@@ -95,13 +95,26 @@ interface DecomposeLayersParams {
95
95
  output_format?: OutputFormat;
96
96
  callback_url?: string;
97
97
  }
98
- interface TaskCreateResponse extends TaskBillingResponse {
98
+ interface TaskCreateResponse {
99
99
  id: string;
100
100
  }
101
101
  /** A generated image with its CDN URL. */
102
102
  interface Image {
103
103
  url: string;
104
104
  }
105
+ /** Bounding box describing a layer's position within the base image. */
106
+ interface BoundingBox {
107
+ absolute?: number[];
108
+ normalized?: number[];
109
+ }
110
+ /** A decomposed layer with its position and metadata. */
111
+ interface Layer {
112
+ url: string;
113
+ z_index: number;
114
+ bounding_box?: BoundingBox;
115
+ name?: string;
116
+ description?: string;
117
+ }
105
118
  interface TextToImageResponse extends TaskResponse {
106
119
  id: string;
107
120
  status: AsyncTaskStatus;
@@ -114,7 +127,7 @@ interface DecomposeLayersResponse extends TaskResponse {
114
127
  id: string;
115
128
  status: AsyncTaskStatus;
116
129
  base_image?: Image;
117
- layers?: Image[];
130
+ layers?: Layer[];
118
131
  error?: string;
119
132
  [key: string]: unknown;
120
133
  }
@@ -134,7 +147,7 @@ type CompletedEditImageResponse = EditImageResponse & {
134
147
  type CompletedDecomposeLayersResponse = DecomposeLayersResponse & {
135
148
  status: 'completed';
136
149
  base_image: Image;
137
- layers: Image[];
150
+ layers: Layer[];
138
151
  };
139
152
 
140
153
  /**
@@ -246,4 +259,4 @@ declare class SeedreamClient extends BaseClient {
246
259
  constructor(options?: ClientOptions);
247
260
  }
248
261
 
249
- export { type AspectRatio, type CompletedDecomposeLayersResponse, type CompletedEditImageResponse, type CompletedTextToImageResponse, type DecomposeLayersModel, type DecomposeLayersParams, type DecomposeLayersResponse, type EditImageModel, type EditImageParams, type EditImageResponse, type Generation45EditImageParams, type Generation45TextParams, type Generation5LiteEditParams, type Generation5LiteTextParams, type Generation5ProEditParams, type Generation5ProTextParams, type GenerationV4EditParams, type GenerationV4TextParams, type Image, type OutputFormat, type OutputQuality, SeedreamClient, type SeedreamModel, type TaskCreateResponse, type TextToImageModel, type TextToImageParams, type TextToImageResponse, type V4OutputResolution };
262
+ export { type AspectRatio, type BoundingBox, type CompletedDecomposeLayersResponse, type CompletedEditImageResponse, type CompletedTextToImageResponse, type DecomposeLayersModel, type DecomposeLayersParams, type DecomposeLayersResponse, type EditImageModel, type EditImageParams, type EditImageResponse, type Generation45EditImageParams, type Generation45TextParams, type Generation5LiteEditParams, type Generation5LiteTextParams, type Generation5ProEditParams, type Generation5ProTextParams, type GenerationV4EditParams, type GenerationV4TextParams, type Image, type Layer, type OutputFormat, type OutputQuality, SeedreamClient, type SeedreamModel, type TaskCreateResponse, type TextToImageModel, type TextToImageParams, type TextToImageResponse, type V4OutputResolution };
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "runapi": {
4
4
  "slug": "seedream"
5
5
  },
6
- "version": "0.2.13",
6
+ "version": "0.3.1",
7
7
  "description": "RunAPI Seedream SDK for text-to-image and edit-image workflows in JavaScript, Python, Ruby, Go, Java, and PHP",
8
8
  "main": "./dist/index.js",
9
9
  "module": "./dist/index.mjs",
@@ -31,7 +31,7 @@
31
31
  "clean": "rm -rf dist"
32
32
  },
33
33
  "dependencies": {
34
- "@runapi.ai/core": "^0.3.5"
34
+ "@runapi.ai/core": "^0.4.3"
35
35
  },
36
36
  "devDependencies": {
37
37
  "@types/node": "^20.0.0",