@purpleschool/ai-proxy 0.1.17 → 0.2.17

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.
@@ -234,4 +234,19 @@ exports.ERRORS = {
234
234
  message: 'Задание на генерацию изображения не найдено',
235
235
  httpCode: 404,
236
236
  },
237
+ IMAGE_EDITOR_JOB_SAVE_ERROR: {
238
+ code: 'A047',
239
+ message: 'Произошла ошибка при сохранении задания на редактирование изображения',
240
+ httpCode: 500,
241
+ },
242
+ IMAGE_EDITOR_JOB_NOT_FOUND: {
243
+ code: 'A048',
244
+ message: 'Задание на редактирование изображения не найдено',
245
+ httpCode: 404,
246
+ },
247
+ IMAGE_EDITOR_JOB_FIND_ERROR: {
248
+ code: 'A049',
249
+ message: 'Ошибка при нахождении задание на редактирование изображения',
250
+ httpCode: 500,
251
+ },
237
252
  };
@@ -235,4 +235,19 @@ export const ERRORS = {
235
235
  message: 'Задание на генерацию изображения не найдено',
236
236
  httpCode: 404,
237
237
  },
238
+ IMAGE_EDITOR_JOB_SAVE_ERROR: {
239
+ code: 'A047',
240
+ message: 'Произошла ошибка при сохранении задания на редактирование изображения',
241
+ httpCode: 500,
242
+ },
243
+ IMAGE_EDITOR_JOB_NOT_FOUND: {
244
+ code: 'A048',
245
+ message: 'Задание на редактирование изображения не найдено',
246
+ httpCode: 404,
247
+ },
248
+ IMAGE_EDITOR_JOB_FIND_ERROR: {
249
+ code: 'A049',
250
+ message: 'Ошибка при нахождении задание на редактирование изображения',
251
+ httpCode: 500,
252
+ },
238
253
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@purpleschool/ai-proxy",
3
- "version": "0.1.17",
3
+ "version": "0.2.17",
4
4
  "description": "",
5
5
  "main": "build/index.js",
6
6
  "types": "build/index.d.ts",
@@ -8,6 +8,7 @@ service AiProxyService {
8
8
  rpc TextGenerationUnary (TextGenerationUnaryRequest) returns (TextGenerationUnaryResponse);
9
9
 
10
10
  rpc ImageGeneration (ImageGenerationRequest) returns (ImageGenerationResponse);
11
+ rpc ImageEditor (ImageEditorRequest) returns (ImageEditorResponse);
11
12
 
12
13
  rpc VideoGeneration (VideoGenerationRequest) returns (VideoGenerationResponse);
13
14
  rpc VideoEditor (VideoEditorRequest) returns (VideoEditorResponse);
@@ -104,6 +105,19 @@ message ImageGenerationData {
104
105
  string type = 3;
105
106
  }
106
107
 
108
+ // Image Editor
109
+ message ImageEditorRequest {
110
+ string model = 1;
111
+ string prompt = 2;
112
+ repeated string imageUrls = 3;
113
+ string callbackUrl = 4;
114
+ }
115
+
116
+ message ImageEditorResponse {
117
+ string jobId = 1;
118
+ optional string imageUrl = 2;
119
+ optional string error = 3;
120
+ }
107
121
  // Video Generation
108
122
  message VideoGenerationRequest {
109
123
  string model = 1;