@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 threshold: {
50
- readonly type: "integer";
51
- readonly title: "Threshold";
52
- readonly description: "Threshold value (0-255)";
53
- readonly minimum: 0;
54
- readonly maximum: 255;
55
- readonly default: 128;
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 ImageThresholdTaskInput = ImageFromSchema<typeof inputSchema>;
107
- export type ImageThresholdTaskOutput = ImageFromSchema<typeof outputSchema>;
108
- export declare class ImageThresholdTask<Input extends ImageThresholdTaskInput = ImageThresholdTaskInput, Output extends ImageThresholdTaskOutput = ImageThresholdTaskOutput, Config extends TaskConfig = TaskConfig> extends Task<Input, Output, Config> {
109
- static readonly type = "ImageThresholdTask";
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 ImageThresholdTask<Input extends ImageThresholdTaskInput =
150
46
  readonly format: "image:ImageBinary";
151
47
  readonly title: "Image";
152
48
  readonly description: "Raw pixel image data";
153
- };
154
- readonly threshold: {
155
- readonly type: "integer";
156
- readonly title: "Threshold";
157
- readonly description: "Threshold value (0-255)";
158
- readonly minimum: 0;
159
- readonly maximum: 255;
160
- readonly default: 128;
161
- };
49
+ }, {
50
+ readonly type: "string";
51
+ readonly format: "image:data-uri";
52
+ readonly title: string;
53
+ readonly description: string;
54
+ }];
55
+ };
56
+ readonly threshold: {
57
+ readonly type: "integer";
58
+ readonly title: "Threshold";
59
+ readonly description: "Threshold value (0-255)";
60
+ readonly minimum: 0;
61
+ readonly maximum: 255;
62
+ readonly default: 128;
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 ImageThresholdTask<Input extends ImageThresholdTaskInput =
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 ImageThresholdTaskInput = ImageFromSchema<typeof inputSchema>;
121
+ export type ImageThresholdTaskOutput = ImageFromSchema<typeof outputSchema>;
122
+ export declare class ImageThresholdTask<Input extends ImageThresholdTaskInput = ImageThresholdTaskInput, Output extends ImageThresholdTaskOutput = ImageThresholdTaskOutput, Config extends TaskConfig = TaskConfig> extends Task<Input, Output, Config> {
123
+ static readonly type = "ImageThresholdTask";
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 threshold: {
176
+ readonly type: "integer";
177
+ readonly title: "Threshold";
178
+ readonly description: "Threshold value (0-255)";
179
+ readonly minimum: 0;
180
+ readonly maximum: 255;
181
+ readonly default: 128;
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":"ImageThresholdTask.d.ts","sourceRoot":"","sources":["../../../src/task/image/ImageThresholdTask.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,SAAS;qBACP,IAAI,EAAE,SAAS;qBACf,KAAK,EAAE,WAAW;qBAClB,WAAW,EAAE,yBAAyB;qBACtC,OAAO,EAAE,CAAC;qBACV,OAAO,EAAE,GAAG;qBAC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;;;;;;;;;;;;;;;;;;;;qBACL,SAAS;yBACP,IAAI,EAAE,SAAS;yBACf,KAAK,EAAE,WAAW;yBAClB,WAAW,EAAE,yBAAyB;yBACtC,OAAO,EAAE,CAAC;yBACV,OAAO,EAAE,GAAG;yBACZ,OAAO,EAAE,GAAG;;;;;MA+Bf;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,CAqBjB;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 color: {
50
57
  readonly type: "object";
@@ -94,58 +101,7 @@ declare const outputSchema: {
94
101
  readonly type: "object";
95
102
  readonly properties: {
96
103
  readonly image: {
97
- readonly type: "object";
98
- readonly properties: {
99
- readonly data: {
100
- readonly type: "array";
101
- readonly items: {
102
- readonly type: "number";
103
- readonly format: "Uint8Clamped";
104
- };
105
- readonly format: "Uint8ClampedArray";
106
- readonly title: "Data";
107
- readonly description: "Pixel data of the image";
108
- };
109
- readonly width: {
110
- readonly type: "integer";
111
- readonly minimum: 1;
112
- readonly title: "Width";
113
- readonly description: "Width in pixels";
114
- };
115
- readonly height: {
116
- readonly type: "integer";
117
- readonly minimum: 1;
118
- readonly title: "Height";
119
- readonly description: "Height in pixels";
120
- };
121
- readonly channels: {
122
- readonly type: "integer";
123
- readonly enum: readonly [1, 3, 4];
124
- readonly title: "Channels";
125
- readonly description: "1 (gray), 3 (RGB), or 4 (RGBA)";
126
- };
127
- };
128
- readonly additionalProperties: false;
129
- readonly required: readonly ["data", "width", "height", "channels"];
130
- readonly format: "image:ImageBinary";
131
- readonly title: "Image";
132
- readonly description: "Raw pixel image data";
133
- };
134
- };
135
- readonly required: readonly ["image"];
136
- readonly additionalProperties: false;
137
- };
138
- export type ImageTintTaskInput = ImageFromSchema<typeof inputSchema>;
139
- export type ImageTintTaskOutput = ImageFromSchema<typeof outputSchema>;
140
- export declare class ImageTintTask<Input extends ImageTintTaskInput = ImageTintTaskInput, Output extends ImageTintTaskOutput = ImageTintTaskOutput, Config extends TaskConfig = TaskConfig> extends Task<Input, Output, Config> {
141
- static readonly type = "ImageTintTask";
142
- static readonly category = "Image";
143
- static title: string;
144
- static description: string;
145
- static inputSchema(): {
146
- readonly type: "object";
147
- readonly properties: {
148
- readonly image: {
104
+ readonly oneOf: readonly [{
149
105
  readonly type: "object";
150
106
  readonly properties: {
151
107
  readonly data: {
@@ -182,6 +138,71 @@ export declare class ImageTintTask<Input extends ImageTintTaskInput = ImageTintT
182
138
  readonly format: "image:ImageBinary";
183
139
  readonly title: "Image";
184
140
  readonly description: "Raw pixel image data";
141
+ }, {
142
+ readonly type: "string";
143
+ readonly format: "image:data-uri";
144
+ readonly title: string;
145
+ readonly description: string;
146
+ }];
147
+ };
148
+ };
149
+ readonly required: readonly ["image"];
150
+ readonly additionalProperties: false;
151
+ };
152
+ export type ImageTintTaskInput = ImageFromSchema<typeof inputSchema>;
153
+ export type ImageTintTaskOutput = ImageFromSchema<typeof outputSchema>;
154
+ export declare class ImageTintTask<Input extends ImageTintTaskInput = ImageTintTaskInput, Output extends ImageTintTaskOutput = ImageTintTaskOutput, Config extends TaskConfig = TaskConfig> extends Task<Input, Output, Config> {
155
+ static readonly type = "ImageTintTask";
156
+ static readonly category = "Image";
157
+ static title: string;
158
+ static description: string;
159
+ static inputSchema(): {
160
+ readonly type: "object";
161
+ readonly properties: {
162
+ readonly image: {
163
+ readonly oneOf: readonly [{
164
+ readonly type: "object";
165
+ readonly properties: {
166
+ readonly data: {
167
+ readonly type: "array";
168
+ readonly items: {
169
+ readonly type: "number";
170
+ readonly format: "Uint8Clamped";
171
+ };
172
+ readonly format: "Uint8ClampedArray";
173
+ readonly title: "Data";
174
+ readonly description: "Pixel data of the image";
175
+ };
176
+ readonly width: {
177
+ readonly type: "integer";
178
+ readonly minimum: 1;
179
+ readonly title: "Width";
180
+ readonly description: "Width in pixels";
181
+ };
182
+ readonly height: {
183
+ readonly type: "integer";
184
+ readonly minimum: 1;
185
+ readonly title: "Height";
186
+ readonly description: "Height in pixels";
187
+ };
188
+ readonly channels: {
189
+ readonly type: "integer";
190
+ readonly enum: readonly [1, 3, 4];
191
+ readonly title: "Channels";
192
+ readonly description: "1 (gray), 3 (RGB), or 4 (RGBA)";
193
+ };
194
+ };
195
+ readonly additionalProperties: false;
196
+ readonly required: readonly ["data", "width", "height", "channels"];
197
+ readonly format: "image:ImageBinary";
198
+ readonly title: "Image";
199
+ readonly description: "Raw pixel image data";
200
+ }, {
201
+ readonly type: "string";
202
+ readonly format: "image:data-uri";
203
+ readonly title: string;
204
+ readonly description: string;
205
+ }];
185
206
  };
186
207
  readonly color: {
187
208
  readonly type: "object";
@@ -231,42 +252,49 @@ export declare class ImageTintTask<Input extends ImageTintTaskInput = ImageTintT
231
252
  readonly type: "object";
232
253
  readonly properties: {
233
254
  readonly image: {
234
- readonly type: "object";
235
- readonly properties: {
236
- readonly data: {
237
- readonly type: "array";
238
- readonly items: {
239
- readonly type: "number";
240
- readonly format: "Uint8Clamped";
255
+ readonly oneOf: readonly [{
256
+ readonly type: "object";
257
+ readonly properties: {
258
+ readonly data: {
259
+ readonly type: "array";
260
+ readonly items: {
261
+ readonly type: "number";
262
+ readonly format: "Uint8Clamped";
263
+ };
264
+ readonly format: "Uint8ClampedArray";
265
+ readonly title: "Data";
266
+ readonly description: "Pixel data of the image";
267
+ };
268
+ readonly width: {
269
+ readonly type: "integer";
270
+ readonly minimum: 1;
271
+ readonly title: "Width";
272
+ readonly description: "Width in pixels";
273
+ };
274
+ readonly height: {
275
+ readonly type: "integer";
276
+ readonly minimum: 1;
277
+ readonly title: "Height";
278
+ readonly description: "Height in pixels";
279
+ };
280
+ readonly channels: {
281
+ readonly type: "integer";
282
+ readonly enum: readonly [1, 3, 4];
283
+ readonly title: "Channels";
284
+ readonly description: "1 (gray), 3 (RGB), or 4 (RGBA)";
241
285
  };
242
- readonly format: "Uint8ClampedArray";
243
- readonly title: "Data";
244
- readonly description: "Pixel data of the image";
245
- };
246
- readonly width: {
247
- readonly type: "integer";
248
- readonly minimum: 1;
249
- readonly title: "Width";
250
- readonly description: "Width in pixels";
251
- };
252
- readonly height: {
253
- readonly type: "integer";
254
- readonly minimum: 1;
255
- readonly title: "Height";
256
- readonly description: "Height in pixels";
257
- };
258
- readonly channels: {
259
- readonly type: "integer";
260
- readonly enum: readonly [1, 3, 4];
261
- readonly title: "Channels";
262
- readonly description: "1 (gray), 3 (RGB), or 4 (RGBA)";
263
286
  };
264
- };
265
- readonly additionalProperties: false;
266
- readonly required: readonly ["data", "width", "height", "channels"];
267
- readonly format: "image:ImageBinary";
268
- readonly title: "Image";
269
- readonly description: "Raw pixel image data";
287
+ readonly additionalProperties: false;
288
+ readonly required: readonly ["data", "width", "height", "channels"];
289
+ readonly format: "image:ImageBinary";
290
+ readonly title: "Image";
291
+ readonly description: "Raw pixel image data";
292
+ }, {
293
+ readonly type: "string";
294
+ readonly format: "image:data-uri";
295
+ readonly title: string;
296
+ readonly description: string;
297
+ }];
270
298
  };
271
299
  };
272
300
  readonly required: readonly ["image"];
@@ -1 +1 @@
1
- {"version":3,"file":"ImageTintTask.d.ts","sourceRoot":"","sources":["../../../src/task/image/ImageTintTask.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,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