@workglow/tasks 0.2.1 → 0.2.3

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 (78) hide show
  1. package/dist/browser.d.ts +4 -3
  2. package/dist/browser.d.ts.map +1 -1
  3. package/dist/browser.js +9764 -9174
  4. package/dist/browser.js.map +58 -50
  5. package/dist/bun.d.ts +5 -3
  6. package/dist/bun.d.ts.map +1 -1
  7. package/dist/bun.js +9893 -9204
  8. package/dist/bun.js.map +60 -51
  9. package/dist/common.d.ts +80 -74
  10. package/dist/common.d.ts.map +1 -1
  11. package/dist/node.d.ts +5 -3
  12. package/dist/node.d.ts.map +1 -1
  13. package/dist/node.js +9893 -9204
  14. package/dist/node.js.map +60 -51
  15. package/dist/task/FetchUrlTask.d.ts +13 -0
  16. package/dist/task/FetchUrlTask.d.ts.map +1 -1
  17. package/dist/task/FileLoaderTask.d.ts +2 -2
  18. package/dist/task/FileLoaderTask.d.ts.map +1 -1
  19. package/dist/task/FileLoaderTask.server.d.ts.map +1 -1
  20. package/dist/task/image/ImageBlurTask.d.ts +148 -120
  21. package/dist/task/image/ImageBlurTask.d.ts.map +1 -1
  22. package/dist/task/image/ImageBorderTask.d.ts +148 -120
  23. package/dist/task/image/ImageBorderTask.d.ts.map +1 -1
  24. package/dist/task/image/ImageBrightnessTask.d.ts +148 -120
  25. package/dist/task/image/ImageBrightnessTask.d.ts.map +1 -1
  26. package/dist/task/image/ImageContrastTask.d.ts +148 -120
  27. package/dist/task/image/ImageContrastTask.d.ts.map +1 -1
  28. package/dist/task/image/ImageCropTask.d.ts +148 -120
  29. package/dist/task/image/ImageCropTask.d.ts.map +1 -1
  30. package/dist/task/image/ImageFlipTask.d.ts +143 -115
  31. package/dist/task/image/ImageFlipTask.d.ts.map +1 -1
  32. package/dist/task/image/ImageGrayscaleTask.d.ts +132 -104
  33. package/dist/task/image/ImageGrayscaleTask.d.ts.map +1 -1
  34. package/dist/task/image/ImageInvertTask.d.ts +132 -104
  35. package/dist/task/image/ImageInvertTask.d.ts.map +1 -1
  36. package/dist/task/image/ImagePixelateTask.d.ts +146 -118
  37. package/dist/task/image/ImagePixelateTask.d.ts.map +1 -1
  38. package/dist/task/image/ImagePosterizeTask.d.ts +148 -120
  39. package/dist/task/image/ImagePosterizeTask.d.ts.map +1 -1
  40. package/dist/task/image/ImageResizeTask.d.ts +148 -120
  41. package/dist/task/image/ImageResizeTask.d.ts.map +1 -1
  42. package/dist/task/image/ImageRotateTask.d.ts +144 -116
  43. package/dist/task/image/ImageRotateTask.d.ts.map +1 -1
  44. package/dist/task/image/ImageSchemas.d.ts +46 -0
  45. package/dist/task/image/ImageSchemas.d.ts.map +1 -1
  46. package/dist/task/image/ImageSepiaTask.d.ts +132 -104
  47. package/dist/task/image/ImageSepiaTask.d.ts.map +1 -1
  48. package/dist/task/image/ImageThresholdTask.d.ts +148 -120
  49. package/dist/task/image/ImageThresholdTask.d.ts.map +1 -1
  50. package/dist/task/image/ImageTintTask.d.ts +148 -120
  51. package/dist/task/image/ImageTintTask.d.ts.map +1 -1
  52. package/dist/task/image/ImageTransparencyTask.d.ts +146 -118
  53. package/dist/task/image/ImageTransparencyTask.d.ts.map +1 -1
  54. package/dist/task/image/ImageWatermarkTask.d.ts +148 -120
  55. package/dist/task/image/ImageWatermarkTask.d.ts.map +1 -1
  56. package/dist/task/image/imageCodecLimits.d.ts +80 -0
  57. package/dist/task/image/imageCodecLimits.d.ts.map +1 -0
  58. package/dist/task/image/imageRasterCodecBrowser.d.ts +8 -0
  59. package/dist/task/image/imageRasterCodecBrowser.d.ts.map +1 -0
  60. package/dist/task/image/imageRasterCodecNode.d.ts +8 -0
  61. package/dist/task/image/imageRasterCodecNode.d.ts.map +1 -0
  62. package/dist/task/image/imageRasterCodecRegistry.d.ts +13 -0
  63. package/dist/task/image/imageRasterCodecRegistry.d.ts.map +1 -0
  64. package/dist/task/image/imageTaskIo.d.ts +12 -0
  65. package/dist/task/image/imageTaskIo.d.ts.map +1 -0
  66. package/dist/task/image/imageTaskTransport.d.ts +21 -0
  67. package/dist/task/image/imageTaskTransport.d.ts.map +1 -0
  68. package/dist/task/image/registerImageRasterCodec.browser.d.ts +7 -0
  69. package/dist/task/image/registerImageRasterCodec.browser.d.ts.map +1 -0
  70. package/dist/task/image/registerImageRasterCodec.node.d.ts +7 -0
  71. package/dist/task/image/registerImageRasterCodec.node.d.ts.map +1 -0
  72. package/dist/util/SafeFetch.d.ts +51 -0
  73. package/dist/util/SafeFetch.d.ts.map +1 -0
  74. package/dist/util/SafeFetch.server.d.ts +22 -0
  75. package/dist/util/SafeFetch.server.d.ts.map +1 -0
  76. package/dist/util/UrlClassifier.d.ts +64 -0
  77. package/dist/util/UrlClassifier.d.ts.map +1 -0
  78. package/package.json +18 -11
@@ -9,42 +9,49 @@ declare const inputSchema: {
9
9
  readonly type: "object";
10
10
  readonly properties: {
11
11
  readonly image: {
12
- readonly type: "object";
13
- readonly properties: {
14
- readonly data: {
15
- readonly type: "array";
16
- readonly items: {
17
- readonly type: "number";
18
- readonly format: "Uint8Clamped";
12
+ readonly oneOf: readonly [{
13
+ readonly type: "object";
14
+ readonly properties: {
15
+ readonly data: {
16
+ readonly type: "array";
17
+ readonly items: {
18
+ readonly type: "number";
19
+ readonly format: "Uint8Clamped";
20
+ };
21
+ readonly format: "Uint8ClampedArray";
22
+ readonly title: "Data";
23
+ readonly description: "Pixel data of the image";
24
+ };
25
+ readonly width: {
26
+ readonly type: "integer";
27
+ readonly minimum: 1;
28
+ readonly title: "Width";
29
+ readonly description: "Width in pixels";
30
+ };
31
+ readonly height: {
32
+ readonly type: "integer";
33
+ readonly minimum: 1;
34
+ readonly title: "Height";
35
+ readonly description: "Height in pixels";
36
+ };
37
+ readonly channels: {
38
+ readonly type: "integer";
39
+ readonly enum: readonly [1, 3, 4];
40
+ readonly title: "Channels";
41
+ readonly description: "1 (gray), 3 (RGB), or 4 (RGBA)";
19
42
  };
20
- readonly format: "Uint8ClampedArray";
21
- readonly title: "Data";
22
- readonly description: "Pixel data of the image";
23
- };
24
- readonly width: {
25
- readonly type: "integer";
26
- readonly minimum: 1;
27
- readonly title: "Width";
28
- readonly description: "Width in pixels";
29
- };
30
- readonly height: {
31
- readonly type: "integer";
32
- readonly minimum: 1;
33
- readonly title: "Height";
34
- readonly description: "Height in pixels";
35
- };
36
- readonly channels: {
37
- readonly type: "integer";
38
- readonly enum: readonly [1, 3, 4];
39
- readonly title: "Channels";
40
- readonly description: "1 (gray), 3 (RGB), or 4 (RGBA)";
41
43
  };
42
- };
43
- readonly additionalProperties: false;
44
- readonly required: readonly ["data", "width", "height", "channels"];
45
- readonly format: "image:ImageBinary";
46
- readonly title: "Image";
47
- readonly description: "Raw pixel image data";
44
+ readonly additionalProperties: false;
45
+ readonly required: readonly ["data", "width", "height", "channels"];
46
+ readonly format: "image:ImageBinary";
47
+ readonly title: "Image";
48
+ readonly description: "Raw pixel image data";
49
+ }, {
50
+ readonly type: "string";
51
+ readonly format: "image:data-uri";
52
+ readonly title: string;
53
+ readonly description: string;
54
+ }];
48
55
  };
49
56
  readonly borderWidth: {
50
57
  readonly type: "integer";
@@ -93,58 +100,7 @@ declare const outputSchema: {
93
100
  readonly type: "object";
94
101
  readonly properties: {
95
102
  readonly image: {
96
- readonly type: "object";
97
- readonly properties: {
98
- readonly data: {
99
- readonly type: "array";
100
- readonly items: {
101
- readonly type: "number";
102
- readonly format: "Uint8Clamped";
103
- };
104
- readonly format: "Uint8ClampedArray";
105
- readonly title: "Data";
106
- readonly description: "Pixel data of the image";
107
- };
108
- readonly width: {
109
- readonly type: "integer";
110
- readonly minimum: 1;
111
- readonly title: "Width";
112
- readonly description: "Width in pixels";
113
- };
114
- readonly height: {
115
- readonly type: "integer";
116
- readonly minimum: 1;
117
- readonly title: "Height";
118
- readonly description: "Height in pixels";
119
- };
120
- readonly channels: {
121
- readonly type: "integer";
122
- readonly enum: readonly [1, 3, 4];
123
- readonly title: "Channels";
124
- readonly description: "1 (gray), 3 (RGB), or 4 (RGBA)";
125
- };
126
- };
127
- readonly additionalProperties: false;
128
- readonly required: readonly ["data", "width", "height", "channels"];
129
- readonly format: "image:ImageBinary";
130
- readonly title: "Image";
131
- readonly description: "Raw pixel image data";
132
- };
133
- };
134
- readonly required: readonly ["image"];
135
- readonly additionalProperties: false;
136
- };
137
- export type ImageBorderTaskInput = ImageFromSchema<typeof inputSchema>;
138
- export type ImageBorderTaskOutput = ImageFromSchema<typeof outputSchema>;
139
- export declare class ImageBorderTask<Input extends ImageBorderTaskInput = ImageBorderTaskInput, Output extends ImageBorderTaskOutput = ImageBorderTaskOutput, Config extends TaskConfig = TaskConfig> extends Task<Input, Output, Config> {
140
- static readonly type = "ImageBorderTask";
141
- static readonly category = "Image";
142
- static title: string;
143
- static description: string;
144
- static inputSchema(): {
145
- readonly type: "object";
146
- readonly properties: {
147
- readonly image: {
103
+ readonly oneOf: readonly [{
148
104
  readonly type: "object";
149
105
  readonly properties: {
150
106
  readonly data: {
@@ -181,6 +137,71 @@ export declare class ImageBorderTask<Input extends ImageBorderTaskInput = ImageB
181
137
  readonly format: "image:ImageBinary";
182
138
  readonly title: "Image";
183
139
  readonly description: "Raw pixel image data";
140
+ }, {
141
+ readonly type: "string";
142
+ readonly format: "image:data-uri";
143
+ readonly title: string;
144
+ readonly description: string;
145
+ }];
146
+ };
147
+ };
148
+ readonly required: readonly ["image"];
149
+ readonly additionalProperties: false;
150
+ };
151
+ export type ImageBorderTaskInput = ImageFromSchema<typeof inputSchema>;
152
+ export type ImageBorderTaskOutput = ImageFromSchema<typeof outputSchema>;
153
+ export declare class ImageBorderTask<Input extends ImageBorderTaskInput = ImageBorderTaskInput, Output extends ImageBorderTaskOutput = ImageBorderTaskOutput, Config extends TaskConfig = TaskConfig> extends Task<Input, Output, Config> {
154
+ static readonly type = "ImageBorderTask";
155
+ static readonly category = "Image";
156
+ static title: string;
157
+ static description: string;
158
+ static inputSchema(): {
159
+ readonly type: "object";
160
+ readonly properties: {
161
+ readonly image: {
162
+ readonly oneOf: readonly [{
163
+ readonly type: "object";
164
+ readonly properties: {
165
+ readonly data: {
166
+ readonly type: "array";
167
+ readonly items: {
168
+ readonly type: "number";
169
+ readonly format: "Uint8Clamped";
170
+ };
171
+ readonly format: "Uint8ClampedArray";
172
+ readonly title: "Data";
173
+ readonly description: "Pixel data of the image";
174
+ };
175
+ readonly width: {
176
+ readonly type: "integer";
177
+ readonly minimum: 1;
178
+ readonly title: "Width";
179
+ readonly description: "Width in pixels";
180
+ };
181
+ readonly height: {
182
+ readonly type: "integer";
183
+ readonly minimum: 1;
184
+ readonly title: "Height";
185
+ readonly description: "Height in pixels";
186
+ };
187
+ readonly channels: {
188
+ readonly type: "integer";
189
+ readonly enum: readonly [1, 3, 4];
190
+ readonly title: "Channels";
191
+ readonly description: "1 (gray), 3 (RGB), or 4 (RGBA)";
192
+ };
193
+ };
194
+ readonly additionalProperties: false;
195
+ readonly required: readonly ["data", "width", "height", "channels"];
196
+ readonly format: "image:ImageBinary";
197
+ readonly title: "Image";
198
+ readonly description: "Raw pixel image data";
199
+ }, {
200
+ readonly type: "string";
201
+ readonly format: "image:data-uri";
202
+ readonly title: string;
203
+ readonly description: string;
204
+ }];
184
205
  };
185
206
  readonly borderWidth: {
186
207
  readonly type: "integer";
@@ -229,42 +250,49 @@ export declare class ImageBorderTask<Input extends ImageBorderTaskInput = ImageB
229
250
  readonly type: "object";
230
251
  readonly properties: {
231
252
  readonly image: {
232
- readonly type: "object";
233
- readonly properties: {
234
- readonly data: {
235
- readonly type: "array";
236
- readonly items: {
237
- readonly type: "number";
238
- readonly format: "Uint8Clamped";
253
+ readonly oneOf: readonly [{
254
+ readonly type: "object";
255
+ readonly properties: {
256
+ readonly data: {
257
+ readonly type: "array";
258
+ readonly items: {
259
+ readonly type: "number";
260
+ readonly format: "Uint8Clamped";
261
+ };
262
+ readonly format: "Uint8ClampedArray";
263
+ readonly title: "Data";
264
+ readonly description: "Pixel data of the image";
265
+ };
266
+ readonly width: {
267
+ readonly type: "integer";
268
+ readonly minimum: 1;
269
+ readonly title: "Width";
270
+ readonly description: "Width in pixels";
271
+ };
272
+ readonly height: {
273
+ readonly type: "integer";
274
+ readonly minimum: 1;
275
+ readonly title: "Height";
276
+ readonly description: "Height in pixels";
277
+ };
278
+ readonly channels: {
279
+ readonly type: "integer";
280
+ readonly enum: readonly [1, 3, 4];
281
+ readonly title: "Channels";
282
+ readonly description: "1 (gray), 3 (RGB), or 4 (RGBA)";
239
283
  };
240
- readonly format: "Uint8ClampedArray";
241
- readonly title: "Data";
242
- readonly description: "Pixel data of the image";
243
- };
244
- readonly width: {
245
- readonly type: "integer";
246
- readonly minimum: 1;
247
- readonly title: "Width";
248
- readonly description: "Width in pixels";
249
- };
250
- readonly height: {
251
- readonly type: "integer";
252
- readonly minimum: 1;
253
- readonly title: "Height";
254
- readonly description: "Height in pixels";
255
- };
256
- readonly channels: {
257
- readonly type: "integer";
258
- readonly enum: readonly [1, 3, 4];
259
- readonly title: "Channels";
260
- readonly description: "1 (gray), 3 (RGB), or 4 (RGBA)";
261
284
  };
262
- };
263
- readonly additionalProperties: false;
264
- readonly required: readonly ["data", "width", "height", "channels"];
265
- readonly format: "image:ImageBinary";
266
- readonly title: "Image";
267
- readonly description: "Raw pixel image data";
285
+ readonly additionalProperties: false;
286
+ readonly required: readonly ["data", "width", "height", "channels"];
287
+ readonly format: "image:ImageBinary";
288
+ readonly title: "Image";
289
+ readonly description: "Raw pixel image data";
290
+ }, {
291
+ readonly type: "string";
292
+ readonly format: "image:data-uri";
293
+ readonly title: string;
294
+ readonly description: string;
295
+ }];
268
296
  };
269
297
  };
270
298
  readonly required: readonly ["image"];
@@ -1 +1 @@
1
- {"version":3,"file":"ImageBorderTask.d.ts","sourceRoot":"","sources":["../../../src/task/image/ImageBorderTask.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EACL,cAAc,EACd,uBAAuB,EACvB,IAAI,EACJ,UAAU,EAEX,MAAM,sBAAsB,C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AAK,SAAS,oBAAoB,GAAG,oBAAoB,EACzD,MAAM,SAAS,qBAAqB,GAAG,qBAAqB,EAC5D,MAAM,SAAS,UAAU,GAAG,UAAU,CACtC,SAAQ,IAAI,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,CAAC;IACnC,gBAAyB,IAAI,qBAAqB;IAClD,gBAAyB,QAAQ,WAAW;IAC5C,OAAuB,KAAK,SAAgB;IAC5C,OAAuB,WAAW,SAA2C;IAE7E,OAAgB,WAAW;uBAtCrB,QAAQ;;qBAEZ,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBACL,WAAW;yBACT,IAAI,EAAE,SAAS;yBACf,KAAK,EAAE,cAAc;yBACrB,WAAW,EAAE,wBAAwB;yBACrC,OAAO,EAAE,CAAC;yBACV,OAAO,EAAE,CAAC;;qBAEZ,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MA8BN;IAED,OAAgB,YAAY;uBAzBtB,QAAQ;;qBAEZ,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAyBN;IAEc,eAAe,CAC5B,KAAK,EAAE,KAAK,EACZ,OAAO,EAAE,MAAM,EACf,QAAQ,EAAE,uBAAuB,GAChC,OAAO,CAAC,MAAM,CAAC,CAqCjB;CACF;AAED,OAAO,QAAQ,sBAAsB,CAAC,CAAC;IACrC,UAAU,QAAQ;QAChB,WAAW,EAAE,cAAc,CAAC,oBAAoB,EAAE,qBAAqB,EAAE,UAAU,CAAC,CAAC;KACtF;CACF"}
@@ -9,111 +9,7 @@ declare const inputSchema: {
9
9
  readonly type: "object";
10
10
  readonly properties: {
11
11
  readonly image: {
12
- readonly type: "object";
13
- readonly properties: {
14
- readonly data: {
15
- readonly type: "array";
16
- readonly items: {
17
- readonly type: "number";
18
- readonly format: "Uint8Clamped";
19
- };
20
- readonly format: "Uint8ClampedArray";
21
- readonly title: "Data";
22
- readonly description: "Pixel data of the image";
23
- };
24
- readonly width: {
25
- readonly type: "integer";
26
- readonly minimum: 1;
27
- readonly title: "Width";
28
- readonly description: "Width in pixels";
29
- };
30
- readonly height: {
31
- readonly type: "integer";
32
- readonly minimum: 1;
33
- readonly title: "Height";
34
- readonly description: "Height in pixels";
35
- };
36
- readonly channels: {
37
- readonly type: "integer";
38
- readonly enum: readonly [1, 3, 4];
39
- readonly title: "Channels";
40
- readonly description: "1 (gray), 3 (RGB), or 4 (RGBA)";
41
- };
42
- };
43
- readonly additionalProperties: false;
44
- readonly required: readonly ["data", "width", "height", "channels"];
45
- readonly format: "image:ImageBinary";
46
- readonly title: "Image";
47
- readonly description: "Raw pixel image data";
48
- };
49
- readonly amount: {
50
- readonly type: "number";
51
- readonly title: "Amount";
52
- readonly description: "Brightness adjustment (-255 to 255)";
53
- readonly minimum: -255;
54
- readonly maximum: 255;
55
- readonly default: 0;
56
- };
57
- };
58
- readonly required: readonly ["image"];
59
- readonly additionalProperties: false;
60
- };
61
- declare const outputSchema: {
62
- readonly type: "object";
63
- readonly properties: {
64
- readonly image: {
65
- readonly type: "object";
66
- readonly properties: {
67
- readonly data: {
68
- readonly type: "array";
69
- readonly items: {
70
- readonly type: "number";
71
- readonly format: "Uint8Clamped";
72
- };
73
- readonly format: "Uint8ClampedArray";
74
- readonly title: "Data";
75
- readonly description: "Pixel data of the image";
76
- };
77
- readonly width: {
78
- readonly type: "integer";
79
- readonly minimum: 1;
80
- readonly title: "Width";
81
- readonly description: "Width in pixels";
82
- };
83
- readonly height: {
84
- readonly type: "integer";
85
- readonly minimum: 1;
86
- readonly title: "Height";
87
- readonly description: "Height in pixels";
88
- };
89
- readonly channels: {
90
- readonly type: "integer";
91
- readonly enum: readonly [1, 3, 4];
92
- readonly title: "Channels";
93
- readonly description: "1 (gray), 3 (RGB), or 4 (RGBA)";
94
- };
95
- };
96
- readonly additionalProperties: false;
97
- readonly required: readonly ["data", "width", "height", "channels"];
98
- readonly format: "image:ImageBinary";
99
- readonly title: "Image";
100
- readonly description: "Raw pixel image data";
101
- };
102
- };
103
- readonly required: readonly ["image"];
104
- readonly additionalProperties: false;
105
- };
106
- export type ImageBrightnessTaskInput = ImageFromSchema<typeof inputSchema>;
107
- export type ImageBrightnessTaskOutput = ImageFromSchema<typeof outputSchema>;
108
- export declare class ImageBrightnessTask<Input extends ImageBrightnessTaskInput = ImageBrightnessTaskInput, Output extends ImageBrightnessTaskOutput = ImageBrightnessTaskOutput, Config extends TaskConfig = TaskConfig> extends Task<Input, Output, Config> {
109
- static readonly type = "ImageBrightnessTask";
110
- static readonly category = "Image";
111
- static title: string;
112
- static description: string;
113
- static inputSchema(): {
114
- readonly type: "object";
115
- readonly properties: {
116
- readonly image: {
12
+ readonly oneOf: readonly [{
117
13
  readonly type: "object";
118
14
  readonly properties: {
119
15
  readonly data: {
@@ -150,23 +46,30 @@ export declare class ImageBrightnessTask<Input extends ImageBrightnessTaskInput
150
46
  readonly format: "image:ImageBinary";
151
47
  readonly title: "Image";
152
48
  readonly description: "Raw pixel image data";
153
- };
154
- readonly amount: {
155
- readonly type: "number";
156
- readonly title: "Amount";
157
- readonly description: "Brightness adjustment (-255 to 255)";
158
- readonly minimum: -255;
159
- readonly maximum: 255;
160
- readonly default: 0;
161
- };
49
+ }, {
50
+ readonly type: "string";
51
+ readonly format: "image:data-uri";
52
+ readonly title: string;
53
+ readonly description: string;
54
+ }];
55
+ };
56
+ readonly amount: {
57
+ readonly type: "number";
58
+ readonly title: "Amount";
59
+ readonly description: "Brightness adjustment (-255 to 255)";
60
+ readonly minimum: -255;
61
+ readonly maximum: 255;
62
+ readonly default: 0;
162
63
  };
163
- readonly required: readonly ["image"];
164
- readonly additionalProperties: false;
165
64
  };
166
- static outputSchema(): {
167
- readonly type: "object";
168
- readonly properties: {
169
- readonly image: {
65
+ readonly required: readonly ["image"];
66
+ readonly additionalProperties: false;
67
+ };
68
+ declare const outputSchema: {
69
+ readonly type: "object";
70
+ readonly properties: {
71
+ readonly image: {
72
+ readonly oneOf: readonly [{
170
73
  readonly type: "object";
171
74
  readonly properties: {
172
75
  readonly data: {
@@ -203,6 +106,131 @@ export declare class ImageBrightnessTask<Input extends ImageBrightnessTaskInput
203
106
  readonly format: "image:ImageBinary";
204
107
  readonly title: "Image";
205
108
  readonly description: "Raw pixel image data";
109
+ }, {
110
+ readonly type: "string";
111
+ readonly format: "image:data-uri";
112
+ readonly title: string;
113
+ readonly description: string;
114
+ }];
115
+ };
116
+ };
117
+ readonly required: readonly ["image"];
118
+ readonly additionalProperties: false;
119
+ };
120
+ export type ImageBrightnessTaskInput = ImageFromSchema<typeof inputSchema>;
121
+ export type ImageBrightnessTaskOutput = ImageFromSchema<typeof outputSchema>;
122
+ export declare class ImageBrightnessTask<Input extends ImageBrightnessTaskInput = ImageBrightnessTaskInput, Output extends ImageBrightnessTaskOutput = ImageBrightnessTaskOutput, Config extends TaskConfig = TaskConfig> extends Task<Input, Output, Config> {
123
+ static readonly type = "ImageBrightnessTask";
124
+ static readonly category = "Image";
125
+ static title: string;
126
+ static description: string;
127
+ static inputSchema(): {
128
+ readonly type: "object";
129
+ readonly properties: {
130
+ readonly image: {
131
+ readonly oneOf: readonly [{
132
+ readonly type: "object";
133
+ readonly properties: {
134
+ readonly data: {
135
+ readonly type: "array";
136
+ readonly items: {
137
+ readonly type: "number";
138
+ readonly format: "Uint8Clamped";
139
+ };
140
+ readonly format: "Uint8ClampedArray";
141
+ readonly title: "Data";
142
+ readonly description: "Pixel data of the image";
143
+ };
144
+ readonly width: {
145
+ readonly type: "integer";
146
+ readonly minimum: 1;
147
+ readonly title: "Width";
148
+ readonly description: "Width in pixels";
149
+ };
150
+ readonly height: {
151
+ readonly type: "integer";
152
+ readonly minimum: 1;
153
+ readonly title: "Height";
154
+ readonly description: "Height in pixels";
155
+ };
156
+ readonly channels: {
157
+ readonly type: "integer";
158
+ readonly enum: readonly [1, 3, 4];
159
+ readonly title: "Channels";
160
+ readonly description: "1 (gray), 3 (RGB), or 4 (RGBA)";
161
+ };
162
+ };
163
+ readonly additionalProperties: false;
164
+ readonly required: readonly ["data", "width", "height", "channels"];
165
+ readonly format: "image:ImageBinary";
166
+ readonly title: "Image";
167
+ readonly description: "Raw pixel image data";
168
+ }, {
169
+ readonly type: "string";
170
+ readonly format: "image:data-uri";
171
+ readonly title: string;
172
+ readonly description: string;
173
+ }];
174
+ };
175
+ readonly amount: {
176
+ readonly type: "number";
177
+ readonly title: "Amount";
178
+ readonly description: "Brightness adjustment (-255 to 255)";
179
+ readonly minimum: -255;
180
+ readonly maximum: 255;
181
+ readonly default: 0;
182
+ };
183
+ };
184
+ readonly required: readonly ["image"];
185
+ readonly additionalProperties: false;
186
+ };
187
+ static outputSchema(): {
188
+ readonly type: "object";
189
+ readonly properties: {
190
+ readonly image: {
191
+ readonly oneOf: readonly [{
192
+ readonly type: "object";
193
+ readonly properties: {
194
+ readonly data: {
195
+ readonly type: "array";
196
+ readonly items: {
197
+ readonly type: "number";
198
+ readonly format: "Uint8Clamped";
199
+ };
200
+ readonly format: "Uint8ClampedArray";
201
+ readonly title: "Data";
202
+ readonly description: "Pixel data of the image";
203
+ };
204
+ readonly width: {
205
+ readonly type: "integer";
206
+ readonly minimum: 1;
207
+ readonly title: "Width";
208
+ readonly description: "Width in pixels";
209
+ };
210
+ readonly height: {
211
+ readonly type: "integer";
212
+ readonly minimum: 1;
213
+ readonly title: "Height";
214
+ readonly description: "Height in pixels";
215
+ };
216
+ readonly channels: {
217
+ readonly type: "integer";
218
+ readonly enum: readonly [1, 3, 4];
219
+ readonly title: "Channels";
220
+ readonly description: "1 (gray), 3 (RGB), or 4 (RGBA)";
221
+ };
222
+ };
223
+ readonly additionalProperties: false;
224
+ readonly required: readonly ["data", "width", "height", "channels"];
225
+ readonly format: "image:ImageBinary";
226
+ readonly title: "Image";
227
+ readonly description: "Raw pixel image data";
228
+ }, {
229
+ readonly type: "string";
230
+ readonly format: "image:data-uri";
231
+ readonly title: string;
232
+ readonly description: string;
233
+ }];
206
234
  };
207
235
  };
208
236
  readonly required: readonly ["image"];
@@ -1 +1 @@
1
- {"version":3,"file":"ImageBrightnessTask.d.ts","sourceRoot":"","sources":["../../../src/task/image/ImageBrightnessTask.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EACL,cAAc,EACd,uBAAuB,EACvB,IAAI,EACJ,UAAU,EAEX,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EAAqB,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAEpE,QAAA,MAAM,WAAW;mBACT,QAAQ;;iBAEZ,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBACL,MAAM;qBACJ,IAAI,EAAE,QAAQ;qBACd,KAAK,EAAE,QAAQ;qBACf,WAAW,EAAE,qCAAqC;qBAClD,OAAO,EAAE,CAAC,GAAG;qBACb,OAAO,EAAE,GAAG;qBACZ,OAAO,EAAE,CAAC;;;;;CAKmB,CAAC;AAEpC,QAAA,MAAM,YAAY;mBACV,QAAQ;;iBAEZ,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAI0B,CAAC;AAEpC,MAAM,MAAM,wBAAwB,GAAG,eAAe,CAAC,OAAO,WAAW,CAAC,CAAC;AAC3E,MAAM,MAAM,yBAAyB,GAAG,eAAe,CAAC,OAAO,YAAY,CAAC,CAAC;AAE7E,qBAAa,mBAAmB,CAC9B,KAAK,SAAS,wBAAwB,GAAG,wBAAwB,EACjE,MAAM,SAAS,yBAAyB,GAAG,yBAAyB,EACpE,MAAM,SAAS,UAAU,GAAG,UAAU,CACtC,SAAQ,IAAI,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,CAAC;IACnC,gBAAyB,IAAI,yBAAyB;IACtD,gBAAyB,QAAQ,WAAW;IAC5C,OAAuB,KAAK,SAAuB;IACnD,OAAuB,WAAW,SAAwC;IAE1E,OAAgB,WAAW;uBAtCrB,QAAQ;;qBAEZ,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;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