@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,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 levels: {
50
- readonly type: "integer";
51
- readonly title: "Levels";
52
- readonly description: "Number of color levels per channel (2-32)";
53
- readonly minimum: 2;
54
- readonly maximum: 32;
55
- readonly default: 4;
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 ImagePosterizeTaskInput = ImageFromSchema<typeof inputSchema>;
107
- export type ImagePosterizeTaskOutput = ImageFromSchema<typeof outputSchema>;
108
- export declare class ImagePosterizeTask<Input extends ImagePosterizeTaskInput = ImagePosterizeTaskInput, Output extends ImagePosterizeTaskOutput = ImagePosterizeTaskOutput, Config extends TaskConfig = TaskConfig> extends Task<Input, Output, Config> {
109
- static readonly type = "ImagePosterizeTask";
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 ImagePosterizeTask<Input extends ImagePosterizeTaskInput =
150
46
  readonly format: "image:ImageBinary";
151
47
  readonly title: "Image";
152
48
  readonly description: "Raw pixel image data";
153
- };
154
- readonly levels: {
155
- readonly type: "integer";
156
- readonly title: "Levels";
157
- readonly description: "Number of color levels per channel (2-32)";
158
- readonly minimum: 2;
159
- readonly maximum: 32;
160
- readonly default: 4;
161
- };
49
+ }, {
50
+ readonly type: "string";
51
+ readonly format: "image:data-uri";
52
+ readonly title: string;
53
+ readonly description: string;
54
+ }];
55
+ };
56
+ readonly levels: {
57
+ readonly type: "integer";
58
+ readonly title: "Levels";
59
+ readonly description: "Number of color levels per channel (2-32)";
60
+ readonly minimum: 2;
61
+ readonly maximum: 32;
62
+ readonly default: 4;
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 ImagePosterizeTask<Input extends ImagePosterizeTaskInput =
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 ImagePosterizeTaskInput = ImageFromSchema<typeof inputSchema>;
121
+ export type ImagePosterizeTaskOutput = ImageFromSchema<typeof outputSchema>;
122
+ export declare class ImagePosterizeTask<Input extends ImagePosterizeTaskInput = ImagePosterizeTaskInput, Output extends ImagePosterizeTaskOutput = ImagePosterizeTaskOutput, Config extends TaskConfig = TaskConfig> extends Task<Input, Output, Config> {
123
+ static readonly type = "ImagePosterizeTask";
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 levels: {
176
+ readonly type: "integer";
177
+ readonly title: "Levels";
178
+ readonly description: "Number of color levels per channel (2-32)";
179
+ readonly minimum: 2;
180
+ readonly maximum: 32;
181
+ readonly default: 4;
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":"ImagePosterizeTask.d.ts","sourceRoot":"","sources":["../../../src/task/image/ImagePosterizeTask.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,SAAS;qBACf,KAAK,EAAE,QAAQ;qBACf,WAAW,EAAE,2CAA2C;qBACxD,OAAO,EA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Z,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBACL,MAAM;yBACJ,IAAI,EAAE,SAAS;yBACf,KAAK,EAAE,QAAQ;yBACf,WAAW,EAAE,2CAA2C;yBACxD,OAAO,EAAE,CAAC;yBACV,OAAO,EAAE,EAAE;yBACX,OAAO,EAAE,CAAC;;;;;MA+Bb;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,CA8BjB;CACF;AAED,OAAO,QAAQ,sBAAsB,CAAC,CAAC;IACrC,UAAU,QAAQ;QAChB,cAAc,EAAE,cAAc,CAAC,uBAAuB,EAAE,wBAAwB,EAAE,UAAU,CAAC,CAAC;KAC/F;CACF"}
@@ -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 width: {
50
57
  readonly type: "integer";
@@ -66,58 +73,7 @@ declare const outputSchema: {
66
73
  readonly type: "object";
67
74
  readonly properties: {
68
75
  readonly image: {
69
- readonly type: "object";
70
- readonly properties: {
71
- readonly data: {
72
- readonly type: "array";
73
- readonly items: {
74
- readonly type: "number";
75
- readonly format: "Uint8Clamped";
76
- };
77
- readonly format: "Uint8ClampedArray";
78
- readonly title: "Data";
79
- readonly description: "Pixel data of the image";
80
- };
81
- readonly width: {
82
- readonly type: "integer";
83
- readonly minimum: 1;
84
- readonly title: "Width";
85
- readonly description: "Width in pixels";
86
- };
87
- readonly height: {
88
- readonly type: "integer";
89
- readonly minimum: 1;
90
- readonly title: "Height";
91
- readonly description: "Height in pixels";
92
- };
93
- readonly channels: {
94
- readonly type: "integer";
95
- readonly enum: readonly [1, 3, 4];
96
- readonly title: "Channels";
97
- readonly description: "1 (gray), 3 (RGB), or 4 (RGBA)";
98
- };
99
- };
100
- readonly additionalProperties: false;
101
- readonly required: readonly ["data", "width", "height", "channels"];
102
- readonly format: "image:ImageBinary";
103
- readonly title: "Image";
104
- readonly description: "Raw pixel image data";
105
- };
106
- };
107
- readonly required: readonly ["image"];
108
- readonly additionalProperties: false;
109
- };
110
- export type ImageResizeTaskInput = ImageFromSchema<typeof inputSchema>;
111
- export type ImageResizeTaskOutput = ImageFromSchema<typeof outputSchema>;
112
- export declare class ImageResizeTask<Input extends ImageResizeTaskInput = ImageResizeTaskInput, Output extends ImageResizeTaskOutput = ImageResizeTaskOutput, Config extends TaskConfig = TaskConfig> extends Task<Input, Output, Config> {
113
- static readonly type = "ImageResizeTask";
114
- static readonly category = "Image";
115
- static title: string;
116
- static description: string;
117
- static inputSchema(): {
118
- readonly type: "object";
119
- readonly properties: {
120
- readonly image: {
76
+ readonly oneOf: readonly [{
121
77
  readonly type: "object";
122
78
  readonly properties: {
123
79
  readonly data: {
@@ -154,6 +110,71 @@ export declare class ImageResizeTask<Input extends ImageResizeTaskInput = ImageR
154
110
  readonly format: "image:ImageBinary";
155
111
  readonly title: "Image";
156
112
  readonly description: "Raw pixel image data";
113
+ }, {
114
+ readonly type: "string";
115
+ readonly format: "image:data-uri";
116
+ readonly title: string;
117
+ readonly description: string;
118
+ }];
119
+ };
120
+ };
121
+ readonly required: readonly ["image"];
122
+ readonly additionalProperties: false;
123
+ };
124
+ export type ImageResizeTaskInput = ImageFromSchema<typeof inputSchema>;
125
+ export type ImageResizeTaskOutput = ImageFromSchema<typeof outputSchema>;
126
+ export declare class ImageResizeTask<Input extends ImageResizeTaskInput = ImageResizeTaskInput, Output extends ImageResizeTaskOutput = ImageResizeTaskOutput, Config extends TaskConfig = TaskConfig> extends Task<Input, Output, Config> {
127
+ static readonly type = "ImageResizeTask";
128
+ static readonly category = "Image";
129
+ static title: string;
130
+ static description: string;
131
+ static inputSchema(): {
132
+ readonly type: "object";
133
+ readonly properties: {
134
+ readonly image: {
135
+ readonly oneOf: readonly [{
136
+ readonly type: "object";
137
+ readonly properties: {
138
+ readonly data: {
139
+ readonly type: "array";
140
+ readonly items: {
141
+ readonly type: "number";
142
+ readonly format: "Uint8Clamped";
143
+ };
144
+ readonly format: "Uint8ClampedArray";
145
+ readonly title: "Data";
146
+ readonly description: "Pixel data of the image";
147
+ };
148
+ readonly width: {
149
+ readonly type: "integer";
150
+ readonly minimum: 1;
151
+ readonly title: "Width";
152
+ readonly description: "Width in pixels";
153
+ };
154
+ readonly height: {
155
+ readonly type: "integer";
156
+ readonly minimum: 1;
157
+ readonly title: "Height";
158
+ readonly description: "Height in pixels";
159
+ };
160
+ readonly channels: {
161
+ readonly type: "integer";
162
+ readonly enum: readonly [1, 3, 4];
163
+ readonly title: "Channels";
164
+ readonly description: "1 (gray), 3 (RGB), or 4 (RGBA)";
165
+ };
166
+ };
167
+ readonly additionalProperties: false;
168
+ readonly required: readonly ["data", "width", "height", "channels"];
169
+ readonly format: "image:ImageBinary";
170
+ readonly title: "Image";
171
+ readonly description: "Raw pixel image data";
172
+ }, {
173
+ readonly type: "string";
174
+ readonly format: "image:data-uri";
175
+ readonly title: string;
176
+ readonly description: string;
177
+ }];
157
178
  };
158
179
  readonly width: {
159
180
  readonly type: "integer";
@@ -175,42 +196,49 @@ export declare class ImageResizeTask<Input extends ImageResizeTaskInput = ImageR
175
196
  readonly type: "object";
176
197
  readonly properties: {
177
198
  readonly image: {
178
- readonly type: "object";
179
- readonly properties: {
180
- readonly data: {
181
- readonly type: "array";
182
- readonly items: {
183
- readonly type: "number";
184
- readonly format: "Uint8Clamped";
199
+ readonly oneOf: readonly [{
200
+ readonly type: "object";
201
+ readonly properties: {
202
+ readonly data: {
203
+ readonly type: "array";
204
+ readonly items: {
205
+ readonly type: "number";
206
+ readonly format: "Uint8Clamped";
207
+ };
208
+ readonly format: "Uint8ClampedArray";
209
+ readonly title: "Data";
210
+ readonly description: "Pixel data of the image";
211
+ };
212
+ readonly width: {
213
+ readonly type: "integer";
214
+ readonly minimum: 1;
215
+ readonly title: "Width";
216
+ readonly description: "Width in pixels";
217
+ };
218
+ readonly height: {
219
+ readonly type: "integer";
220
+ readonly minimum: 1;
221
+ readonly title: "Height";
222
+ readonly description: "Height in pixels";
223
+ };
224
+ readonly channels: {
225
+ readonly type: "integer";
226
+ readonly enum: readonly [1, 3, 4];
227
+ readonly title: "Channels";
228
+ readonly description: "1 (gray), 3 (RGB), or 4 (RGBA)";
185
229
  };
186
- readonly format: "Uint8ClampedArray";
187
- readonly title: "Data";
188
- readonly description: "Pixel data of the image";
189
- };
190
- readonly width: {
191
- readonly type: "integer";
192
- readonly minimum: 1;
193
- readonly title: "Width";
194
- readonly description: "Width in pixels";
195
- };
196
- readonly height: {
197
- readonly type: "integer";
198
- readonly minimum: 1;
199
- readonly title: "Height";
200
- readonly description: "Height in pixels";
201
- };
202
- readonly channels: {
203
- readonly type: "integer";
204
- readonly enum: readonly [1, 3, 4];
205
- readonly title: "Channels";
206
- readonly description: "1 (gray), 3 (RGB), or 4 (RGBA)";
207
230
  };
208
- };
209
- readonly additionalProperties: false;
210
- readonly required: readonly ["data", "width", "height", "channels"];
211
- readonly format: "image:ImageBinary";
212
- readonly title: "Image";
213
- readonly description: "Raw pixel image data";
231
+ readonly additionalProperties: false;
232
+ readonly required: readonly ["data", "width", "height", "channels"];
233
+ readonly format: "image:ImageBinary";
234
+ readonly title: "Image";
235
+ readonly description: "Raw pixel image data";
236
+ }, {
237
+ readonly type: "string";
238
+ readonly format: "image:data-uri";
239
+ readonly title: string;
240
+ readonly description: string;
241
+ }];
214
242
  };
215
243
  };
216
244
  readonly required: readonly ["image"];
@@ -1 +1 @@
1
- {"version":3,"file":"ImageResizeTask.d.ts","sourceRoot":"","sources":["../../../src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