@uploadista/core 0.0.18-beta.2 → 0.0.18-beta.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.
- package/dist/flow/index.cjs +1 -1
- package/dist/flow/index.d.cts +2 -2
- package/dist/flow/index.d.mts +2 -2
- package/dist/flow/index.mjs +1 -1
- package/dist/flow-NBmCjMqI.mjs +2 -0
- package/dist/flow-NBmCjMqI.mjs.map +1 -0
- package/dist/flow-yTdzjQ0k.cjs +1 -0
- package/dist/{index-DiHUjE9t.d.mts → index-BJxZyw0A.d.mts} +550 -195
- package/dist/index-BJxZyw0A.d.mts.map +1 -0
- package/dist/index-CoAMCnm6.d.cts.map +1 -1
- package/dist/{index-D5ALjvAb.d.cts → index-uOAh_6qk.d.cts} +550 -195
- package/dist/index-uOAh_6qk.d.cts.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.mts +2 -2
- package/dist/index.mjs +1 -1
- package/dist/testing/index.cjs +1 -1
- package/dist/testing/index.d.cts +1 -1
- package/dist/testing/index.d.mts +1 -1
- package/dist/testing/index.mjs +1 -1
- package/dist/types/index.d.cts +1 -1
- package/dist/types/index.d.mts +1 -1
- package/dist/upload/index.d.cts +1 -1
- package/dist/upload/index.d.mts +1 -1
- package/package.json +5 -2
- package/src/flow/index.ts +2 -0
- package/src/flow/nodes/transform-node.ts +43 -2
- package/src/flow/types/flow-types.ts +148 -0
- package/src/flow/utils/file-naming.ts +308 -0
- package/dist/flow-CAywogte.mjs +0 -2
- package/dist/flow-CAywogte.mjs.map +0 -1
- package/dist/flow-D7QeEZVs.cjs +0 -1
- package/dist/index-D5ALjvAb.d.cts.map +0 -1
- package/dist/index-DiHUjE9t.d.mts.map +0 -1
|
@@ -1049,6 +1049,143 @@ type FlowConfig<TFlowInputSchema extends z.ZodSchema<any>, TFlowOutputSchema ext
|
|
|
1049
1049
|
}) => Effect.Effect<TOutput, UploadistaError, never> | Promise<TOutput>;
|
|
1050
1050
|
};
|
|
1051
1051
|
};
|
|
1052
|
+
/**
|
|
1053
|
+
* Context provided to file naming functions and templates.
|
|
1054
|
+
*
|
|
1055
|
+
* Contains all relevant information about the current file, node, and flow
|
|
1056
|
+
* execution that can be used to generate dynamic file names.
|
|
1057
|
+
*
|
|
1058
|
+
* @property baseName - Filename without extension (e.g., "photo" from "photo.jpg")
|
|
1059
|
+
* @property extension - File extension without dot (e.g., "jpg")
|
|
1060
|
+
* @property fileName - Full original filename (e.g., "photo.jpg")
|
|
1061
|
+
* @property nodeType - Type of processing node (e.g., "resize", "optimize")
|
|
1062
|
+
* @property nodeId - Specific node instance ID
|
|
1063
|
+
* @property flowId - Flow identifier
|
|
1064
|
+
* @property jobId - Execution job ID
|
|
1065
|
+
* @property timestamp - ISO 8601 timestamp of processing
|
|
1066
|
+
* @property width - Output width (image/video nodes only)
|
|
1067
|
+
* @property height - Output height (image/video nodes only)
|
|
1068
|
+
* @property format - Output format (e.g., "webp", "mp4")
|
|
1069
|
+
* @property quality - Quality setting (e.g., 80)
|
|
1070
|
+
*
|
|
1071
|
+
* @example
|
|
1072
|
+
* ```typescript
|
|
1073
|
+
* // Available in templates as {{variable}}
|
|
1074
|
+
* const pattern = "{{baseName}}-{{width}}x{{height}}.{{extension}}";
|
|
1075
|
+
* // Result: "photo-800x600.jpg"
|
|
1076
|
+
* ```
|
|
1077
|
+
*/
|
|
1078
|
+
type NamingContext = {
|
|
1079
|
+
/** Filename without extension */
|
|
1080
|
+
baseName: string;
|
|
1081
|
+
/** File extension without dot */
|
|
1082
|
+
extension: string;
|
|
1083
|
+
/** Full original filename */
|
|
1084
|
+
fileName: string;
|
|
1085
|
+
/** Type of processing node */
|
|
1086
|
+
nodeType: string;
|
|
1087
|
+
/** Specific node instance ID */
|
|
1088
|
+
nodeId: string;
|
|
1089
|
+
/** Flow identifier */
|
|
1090
|
+
flowId: string;
|
|
1091
|
+
/** Execution job ID */
|
|
1092
|
+
jobId: string;
|
|
1093
|
+
/** ISO 8601 timestamp of processing */
|
|
1094
|
+
timestamp: string;
|
|
1095
|
+
/** Output width (image/video nodes) */
|
|
1096
|
+
width?: number;
|
|
1097
|
+
/** Output height (image/video nodes) */
|
|
1098
|
+
height?: number;
|
|
1099
|
+
/** Output format */
|
|
1100
|
+
format?: string;
|
|
1101
|
+
/** Quality setting */
|
|
1102
|
+
quality?: number;
|
|
1103
|
+
/** Page number (document nodes) */
|
|
1104
|
+
pageNumber?: number;
|
|
1105
|
+
/** Additional custom variables */
|
|
1106
|
+
[key: string]: string | number | undefined;
|
|
1107
|
+
};
|
|
1108
|
+
/**
|
|
1109
|
+
* Function type for custom file naming logic.
|
|
1110
|
+
*
|
|
1111
|
+
* @param file - The UploadFile being processed
|
|
1112
|
+
* @param context - Naming context with all available variables
|
|
1113
|
+
* @returns The new filename (including extension)
|
|
1114
|
+
*
|
|
1115
|
+
* @example
|
|
1116
|
+
* ```typescript
|
|
1117
|
+
* const customRename: FileNamingFunction = (file, ctx) =>
|
|
1118
|
+
* `${ctx.flowId}-${ctx.baseName}-${ctx.timestamp}.${ctx.extension}`;
|
|
1119
|
+
* ```
|
|
1120
|
+
*/
|
|
1121
|
+
type FileNamingFunction = (file: UploadFile, context: NamingContext) => string;
|
|
1122
|
+
/**
|
|
1123
|
+
* Function type for generating auto-naming suffixes.
|
|
1124
|
+
*
|
|
1125
|
+
* Each node type can define its own auto suffix generator that creates
|
|
1126
|
+
* a descriptive suffix based on the processing parameters.
|
|
1127
|
+
*
|
|
1128
|
+
* @param context - Naming context with all available variables
|
|
1129
|
+
* @returns The suffix to append (without leading dash)
|
|
1130
|
+
*
|
|
1131
|
+
* @example
|
|
1132
|
+
* ```typescript
|
|
1133
|
+
* // Resize node auto suffix
|
|
1134
|
+
* const resizeAutoSuffix: AutoNamingSuffixGenerator = (ctx) =>
|
|
1135
|
+
* `${ctx.width}x${ctx.height}`;
|
|
1136
|
+
* // Result: "photo-800x600.jpg"
|
|
1137
|
+
*
|
|
1138
|
+
* // Optimize node auto suffix
|
|
1139
|
+
* const optimizeAutoSuffix: AutoNamingSuffixGenerator = (ctx) =>
|
|
1140
|
+
* ctx.format ?? 'optimized';
|
|
1141
|
+
* // Result: "photo-webp.webp"
|
|
1142
|
+
* ```
|
|
1143
|
+
*/
|
|
1144
|
+
type AutoNamingSuffixGenerator = (context: NamingContext) => string;
|
|
1145
|
+
/**
|
|
1146
|
+
* Configuration for file naming behavior on a node.
|
|
1147
|
+
*
|
|
1148
|
+
* Supports three modes:
|
|
1149
|
+
* - `undefined` or no config: Preserve original filename (backward compatible)
|
|
1150
|
+
* - `mode: 'auto'`: Generate smart suffix based on node type
|
|
1151
|
+
* - `mode: 'custom'`: Use template pattern or rename function
|
|
1152
|
+
*
|
|
1153
|
+
* @property mode - Naming mode: 'auto' for smart suffixes, 'custom' for templates/functions
|
|
1154
|
+
* @property pattern - Mustache-style template string (for custom mode)
|
|
1155
|
+
* @property rename - Custom function for full control (for custom mode, SDK only)
|
|
1156
|
+
* @property autoSuffix - Generator function for auto mode suffix
|
|
1157
|
+
*
|
|
1158
|
+
* @example
|
|
1159
|
+
* ```typescript
|
|
1160
|
+
* // Auto mode with smart suffix
|
|
1161
|
+
* const autoNaming: FileNamingConfig = {
|
|
1162
|
+
* mode: 'auto',
|
|
1163
|
+
* autoSuffix: (ctx) => `${ctx.width}x${ctx.height}`
|
|
1164
|
+
* };
|
|
1165
|
+
*
|
|
1166
|
+
* // Custom mode with template
|
|
1167
|
+
* const templateNaming: FileNamingConfig = {
|
|
1168
|
+
* mode: 'custom',
|
|
1169
|
+
* pattern: '{{baseName}}-{{nodeType}}.{{extension}}'
|
|
1170
|
+
* };
|
|
1171
|
+
*
|
|
1172
|
+
* // Custom mode with function
|
|
1173
|
+
* const functionNaming: FileNamingConfig = {
|
|
1174
|
+
* mode: 'custom',
|
|
1175
|
+
* rename: (file, ctx) => `processed-${ctx.fileName}`
|
|
1176
|
+
* };
|
|
1177
|
+
* ```
|
|
1178
|
+
*/
|
|
1179
|
+
type FileNamingConfig = {
|
|
1180
|
+
/** Naming mode: 'auto' for smart suffixes, 'custom' for templates/functions */
|
|
1181
|
+
mode: "auto" | "custom";
|
|
1182
|
+
/** Mustache-style template string (for custom mode) */
|
|
1183
|
+
pattern?: string;
|
|
1184
|
+
/** Custom function for full control (for custom mode, SDK only) */
|
|
1185
|
+
rename?: FileNamingFunction;
|
|
1186
|
+
/** Generator function for auto mode suffix */
|
|
1187
|
+
autoSuffix?: AutoNamingSuffixGenerator;
|
|
1188
|
+
};
|
|
1052
1189
|
//#endregion
|
|
1053
1190
|
//#region src/flow/edge.d.ts
|
|
1054
1191
|
/**
|
|
@@ -3235,7 +3372,7 @@ declare function createUploadServer(): Effect.Effect<{
|
|
|
3235
3372
|
getCapabilities: (storageId: string, clientId: string | null) => Effect.Effect<DataStoreCapabilities, UploadistaError, never>;
|
|
3236
3373
|
subscribeToUploadEvents: (uploadId: string, connection: WebSocketConnection) => Effect.Effect<void, UploadistaError, never>;
|
|
3237
3374
|
unsubscribeFromUploadEvents: (uploadId: string) => Effect.Effect<void, UploadistaError, never>;
|
|
3238
|
-
}, never,
|
|
3375
|
+
}, never, UploadFileDataStores | UploadFileKVStore | UploadEventEmitter | GenerateId>;
|
|
3239
3376
|
/**
|
|
3240
3377
|
* Pre-built UploadServer Effect Layer.
|
|
3241
3378
|
*
|
|
@@ -3266,7 +3403,7 @@ declare function createUploadServer(): Effect.Effect<{
|
|
|
3266
3403
|
* }).pipe(Effect.provide(fullUploadSystem));
|
|
3267
3404
|
* ```
|
|
3268
3405
|
*/
|
|
3269
|
-
declare const uploadServer: Layer.Layer<UploadServer, never,
|
|
3406
|
+
declare const uploadServer: Layer.Layer<UploadServer, never, UploadFileDataStores | UploadFileKVStore | UploadEventEmitter | GenerateId>;
|
|
3270
3407
|
//#endregion
|
|
3271
3408
|
//#region src/upload/upload-strategy-negotiator.d.ts
|
|
3272
3409
|
/**
|
|
@@ -3821,8 +3958,8 @@ declare function createFlowServer(): Effect.Effect<{
|
|
|
3821
3958
|
cancelFlow: (jobId: string, clientId: string | null) => Effect.Effect<FlowJob, UploadistaError, never>;
|
|
3822
3959
|
subscribeToFlowEvents: (jobId: string, connection: WebSocketConnection) => Effect.Effect<void, UploadistaError, never>;
|
|
3823
3960
|
unsubscribeFromFlowEvents: (jobId: string) => Effect.Effect<void, UploadistaError, never>;
|
|
3824
|
-
}, never, UploadServer |
|
|
3825
|
-
declare const flowServer: Layer.Layer<FlowServer, never, UploadServer |
|
|
3961
|
+
}, never, UploadServer | FlowEventEmitter | FlowJobKVStore | FlowProvider>;
|
|
3962
|
+
declare const flowServer: Layer.Layer<FlowServer, never, UploadServer | FlowEventEmitter | FlowJobKVStore | FlowProvider>;
|
|
3826
3963
|
type FlowServerLayer = typeof flowServer;
|
|
3827
3964
|
//#endregion
|
|
3828
3965
|
//#region src/flow/nodes/input-node.d.ts
|
|
@@ -3952,6 +4089,195 @@ declare function createInputNode(id: string, params?: InputNodeParams, options?:
|
|
|
3952
4089
|
type: NodeType.input;
|
|
3953
4090
|
}, UploadistaError, UploadServer>;
|
|
3954
4091
|
//#endregion
|
|
4092
|
+
//#region src/flow/types/flow-file.d.ts
|
|
4093
|
+
/**
|
|
4094
|
+
* Conditional execution rules for flow nodes.
|
|
4095
|
+
*
|
|
4096
|
+
* Conditions allow nodes to execute conditionally based on file properties or metadata.
|
|
4097
|
+
* They are evaluated before node execution and can skip nodes that don't match.
|
|
4098
|
+
*
|
|
4099
|
+
* @module flow/types/flow-file
|
|
4100
|
+
* @see {@link FlowNode} for how conditions are used in nodes
|
|
4101
|
+
*
|
|
4102
|
+
* @example
|
|
4103
|
+
* ```typescript
|
|
4104
|
+
* // Only process images larger than 1MB
|
|
4105
|
+
* const condition: FlowCondition = {
|
|
4106
|
+
* field: "size",
|
|
4107
|
+
* operator: "greaterThan",
|
|
4108
|
+
* value: 1024 * 1024
|
|
4109
|
+
* };
|
|
4110
|
+
*
|
|
4111
|
+
* // Only process JPEG images
|
|
4112
|
+
* const jpegCondition: FlowCondition = {
|
|
4113
|
+
* field: "mimeType",
|
|
4114
|
+
* operator: "startsWith",
|
|
4115
|
+
* value: "image/jpeg"
|
|
4116
|
+
* };
|
|
4117
|
+
* ```
|
|
4118
|
+
*/
|
|
4119
|
+
/**
|
|
4120
|
+
* Represents a conditional rule for node execution.
|
|
4121
|
+
*
|
|
4122
|
+
* @property field - The file property to check
|
|
4123
|
+
* @property operator - The comparison operator to apply
|
|
4124
|
+
* @property value - The value to compare against
|
|
4125
|
+
*
|
|
4126
|
+
* @remarks
|
|
4127
|
+
* - Fields can check file metadata (mimeType, size) or image properties (width, height)
|
|
4128
|
+
* - String operators (contains, startsWith) work with string values
|
|
4129
|
+
* - Numeric operators (greaterThan, lessThan) work with numeric values
|
|
4130
|
+
* - The extension field checks the file extension without the dot
|
|
4131
|
+
*/
|
|
4132
|
+
type FlowCondition = {
|
|
4133
|
+
field: "mimeType" | "size" | "width" | "height" | "extension";
|
|
4134
|
+
operator: "equals" | "notEquals" | "greaterThan" | "lessThan" | "contains" | "startsWith";
|
|
4135
|
+
value: string | number;
|
|
4136
|
+
};
|
|
4137
|
+
//#endregion
|
|
4138
|
+
//#region src/flow/types/type-utils.d.ts
|
|
4139
|
+
/**
|
|
4140
|
+
* Extracts the service type from an Effect Layer.
|
|
4141
|
+
*
|
|
4142
|
+
* Given a Layer that provides a service, this type utility extracts
|
|
4143
|
+
* the service type from the Layer's type signature.
|
|
4144
|
+
*
|
|
4145
|
+
* @template T - The Layer type to extract from
|
|
4146
|
+
* @returns The service type provided by the layer, or never if T is not a Layer
|
|
4147
|
+
*
|
|
4148
|
+
* @example
|
|
4149
|
+
* ```typescript
|
|
4150
|
+
* type MyLayer = Layer.Layer<ServiceA, never, never>;
|
|
4151
|
+
* type Service = ExtractLayerService<MyLayer>;
|
|
4152
|
+
* // Service = ServiceA
|
|
4153
|
+
* ```
|
|
4154
|
+
*
|
|
4155
|
+
* @example
|
|
4156
|
+
* ```typescript
|
|
4157
|
+
* import { ImagePluginLayer } from '@uploadista/core';
|
|
4158
|
+
*
|
|
4159
|
+
* type ImageService = ExtractLayerService<ImagePluginLayer>;
|
|
4160
|
+
* // ImageService = ImagePlugin
|
|
4161
|
+
* ```
|
|
4162
|
+
*/
|
|
4163
|
+
type ExtractLayerService<T, TError$1 = never, TRequirements = never> = T extends Layer.Layer<infer S, TError$1, TRequirements> ? S : never;
|
|
4164
|
+
/**
|
|
4165
|
+
* Extracts all service types from a tuple of layers and returns them as a union.
|
|
4166
|
+
*
|
|
4167
|
+
* This type recursively processes a tuple of Layer types and extracts all
|
|
4168
|
+
* the services they provide, combining them into a single union type.
|
|
4169
|
+
*
|
|
4170
|
+
* @template T - A readonly tuple of Layer types
|
|
4171
|
+
* @returns A union of all service types provided by the layers, or never for empty tuples
|
|
4172
|
+
*
|
|
4173
|
+
* @example
|
|
4174
|
+
* ```typescript
|
|
4175
|
+
* type Layers = [
|
|
4176
|
+
* Layer.Layer<ServiceA, never, never>,
|
|
4177
|
+
* Layer.Layer<ServiceB, never, never>,
|
|
4178
|
+
* Layer.Layer<ServiceC, never, never>
|
|
4179
|
+
* ];
|
|
4180
|
+
* type Services = ExtractLayerServices<Layers>;
|
|
4181
|
+
* // Services = ServiceA | ServiceB | ServiceC
|
|
4182
|
+
* ```
|
|
4183
|
+
*
|
|
4184
|
+
* @example
|
|
4185
|
+
* ```typescript
|
|
4186
|
+
* import { ImagePluginLayer, ZipPluginLayer } from '@uploadista/core';
|
|
4187
|
+
*
|
|
4188
|
+
* type PluginLayers = [ImagePluginLayer, ZipPluginLayer];
|
|
4189
|
+
* type AllServices = ExtractLayerServices<PluginLayers>;
|
|
4190
|
+
* // AllServices = ImagePlugin | ZipPlugin
|
|
4191
|
+
* ```
|
|
4192
|
+
*
|
|
4193
|
+
* @example
|
|
4194
|
+
* ```typescript
|
|
4195
|
+
* type EmptyLayers = [];
|
|
4196
|
+
* type NoServices = ExtractLayerServices<EmptyLayers>;
|
|
4197
|
+
* // NoServices = never
|
|
4198
|
+
* ```
|
|
4199
|
+
*/
|
|
4200
|
+
type ExtractLayerServices<T extends readonly Layer.Layer<any, any, any>[]> = T extends readonly [] ? never : { [K in keyof T]: T[K] extends Layer.Layer<infer S, any, any> ? S : never }[number];
|
|
4201
|
+
/**
|
|
4202
|
+
* Unwraps an Effect type to extract its success value type.
|
|
4203
|
+
*
|
|
4204
|
+
* If the input type is an Effect, this extracts the success type (first type parameter).
|
|
4205
|
+
* If the input is not an Effect, it returns the type unchanged.
|
|
4206
|
+
*
|
|
4207
|
+
* @template T - The type to resolve, potentially an Effect
|
|
4208
|
+
* @returns The success type if T is an Effect, otherwise T
|
|
4209
|
+
*
|
|
4210
|
+
* @example
|
|
4211
|
+
* ```typescript
|
|
4212
|
+
* type MyEffect = Effect.Effect<string, Error, never>;
|
|
4213
|
+
* type Result = ResolveEffect<MyEffect>;
|
|
4214
|
+
* // Result = string
|
|
4215
|
+
* ```
|
|
4216
|
+
*
|
|
4217
|
+
* @example
|
|
4218
|
+
* ```typescript
|
|
4219
|
+
* type NonEffect = { data: string };
|
|
4220
|
+
* type Result = ResolveEffect<NonEffect>;
|
|
4221
|
+
* // Result = { data: string }
|
|
4222
|
+
* ```
|
|
4223
|
+
*/
|
|
4224
|
+
type ResolveEffect<T> = T extends Effect.Effect<infer S, any, any> ? S : T;
|
|
4225
|
+
/**
|
|
4226
|
+
* Extracts the error type from an Effect.
|
|
4227
|
+
*
|
|
4228
|
+
* Given an Effect type, this utility extracts the error type
|
|
4229
|
+
* (second type parameter) from the Effect's type signature.
|
|
4230
|
+
*
|
|
4231
|
+
* @template T - The Effect type to extract from
|
|
4232
|
+
* @returns The error type of the Effect, or never if T is not an Effect
|
|
4233
|
+
*
|
|
4234
|
+
* @example
|
|
4235
|
+
* ```typescript
|
|
4236
|
+
* type MyEffect = Effect.Effect<string, ValidationError, never>;
|
|
4237
|
+
* type ErrorType = ExtractEffectError<MyEffect>;
|
|
4238
|
+
* // ErrorType = ValidationError
|
|
4239
|
+
* ```
|
|
4240
|
+
*
|
|
4241
|
+
* @example
|
|
4242
|
+
* ```typescript
|
|
4243
|
+
* type SafeEffect = Effect.Effect<number, never, SomeService>;
|
|
4244
|
+
* type ErrorType = ExtractEffectError<SafeEffect>;
|
|
4245
|
+
* // ErrorType = never (no errors possible)
|
|
4246
|
+
* ```
|
|
4247
|
+
*/
|
|
4248
|
+
type ExtractEffectError<T> = T extends Effect.Effect<any, infer E, any> ? E : never;
|
|
4249
|
+
/**
|
|
4250
|
+
* Extracts the requirements (context) type from an Effect.
|
|
4251
|
+
*
|
|
4252
|
+
* Given an Effect type, this utility extracts the requirements type
|
|
4253
|
+
* (third type parameter) from the Effect's type signature. This represents
|
|
4254
|
+
* the services that must be provided for the Effect to run.
|
|
4255
|
+
*
|
|
4256
|
+
* @template T - The Effect type to extract from
|
|
4257
|
+
* @returns The requirements type of the Effect, or never if T is not an Effect
|
|
4258
|
+
*
|
|
4259
|
+
* @example
|
|
4260
|
+
* ```typescript
|
|
4261
|
+
* type MyEffect = Effect.Effect<string, Error, Database | Logger>;
|
|
4262
|
+
* type Requirements = ExtractEffectRequirements<MyEffect>;
|
|
4263
|
+
* // Requirements = Database | Logger
|
|
4264
|
+
* ```
|
|
4265
|
+
*
|
|
4266
|
+
* @example
|
|
4267
|
+
* ```typescript
|
|
4268
|
+
* import { ImagePlugin, ZipPlugin } from '@uploadista/core';
|
|
4269
|
+
*
|
|
4270
|
+
* type ProcessEffect = Effect.Effect<
|
|
4271
|
+
* ProcessedImage,
|
|
4272
|
+
* ProcessError,
|
|
4273
|
+
* ImagePlugin | ZipPlugin
|
|
4274
|
+
* >;
|
|
4275
|
+
* type Needed = ExtractEffectRequirements<ProcessEffect>;
|
|
4276
|
+
* // Needed = ImagePlugin | ZipPlugin
|
|
4277
|
+
* ```
|
|
4278
|
+
*/
|
|
4279
|
+
type ExtractEffectRequirements<T> = T extends Effect.Effect<any, any, infer R> ? R : never;
|
|
4280
|
+
//#endregion
|
|
3955
4281
|
//#region src/flow/nodes/transform-node.d.ts
|
|
3956
4282
|
/**
|
|
3957
4283
|
* Configuration object for creating a transform node.
|
|
@@ -3971,6 +4297,24 @@ interface TransformNodeConfig {
|
|
|
3971
4297
|
* Defaults to false.
|
|
3972
4298
|
*/
|
|
3973
4299
|
keepOutput?: boolean;
|
|
4300
|
+
/**
|
|
4301
|
+
* Optional file naming configuration.
|
|
4302
|
+
* - undefined: Preserve original filename (backward compatible)
|
|
4303
|
+
* - mode: 'auto': Generate smart suffix based on node type
|
|
4304
|
+
* - mode: 'custom': Use template pattern or rename function
|
|
4305
|
+
*/
|
|
4306
|
+
naming?: FileNamingConfig;
|
|
4307
|
+
/**
|
|
4308
|
+
* Node type identifier used for auto-naming context.
|
|
4309
|
+
* Defaults to "transform" if not specified.
|
|
4310
|
+
*/
|
|
4311
|
+
nodeType?: string;
|
|
4312
|
+
/**
|
|
4313
|
+
* Additional variables to include in the naming context.
|
|
4314
|
+
* These are merged with the base context (flowId, jobId, etc.)
|
|
4315
|
+
* and can be used in templates.
|
|
4316
|
+
*/
|
|
4317
|
+
namingVars?: Record<string, string | number | undefined>;
|
|
3974
4318
|
/** Function that transforms file bytes */
|
|
3975
4319
|
transform: (bytes: Uint8Array, file: UploadFile) => Effect.Effect<Uint8Array | {
|
|
3976
4320
|
bytes: Uint8Array;
|
|
@@ -4035,6 +4379,9 @@ declare function createTransformNode({
|
|
|
4035
4379
|
description,
|
|
4036
4380
|
outputTypeId,
|
|
4037
4381
|
keepOutput,
|
|
4382
|
+
naming,
|
|
4383
|
+
nodeType: nodeTypeId,
|
|
4384
|
+
namingVars,
|
|
4038
4385
|
transform
|
|
4039
4386
|
}: TransformNodeConfig): Effect.Effect<FlowNodeData & {
|
|
4040
4387
|
inputSchema: zod0.ZodType<UploadFile, unknown, zod_v4_core0.$ZodTypeInternals<UploadFile, unknown>>;
|
|
@@ -5786,195 +6133,6 @@ declare function isUploadOperation(data: InputData): data is Extract<InputData,
|
|
|
5786
6133
|
operation: "init" | "url";
|
|
5787
6134
|
}>;
|
|
5788
6135
|
//#endregion
|
|
5789
|
-
//#region src/flow/types/flow-file.d.ts
|
|
5790
|
-
/**
|
|
5791
|
-
* Conditional execution rules for flow nodes.
|
|
5792
|
-
*
|
|
5793
|
-
* Conditions allow nodes to execute conditionally based on file properties or metadata.
|
|
5794
|
-
* They are evaluated before node execution and can skip nodes that don't match.
|
|
5795
|
-
*
|
|
5796
|
-
* @module flow/types/flow-file
|
|
5797
|
-
* @see {@link FlowNode} for how conditions are used in nodes
|
|
5798
|
-
*
|
|
5799
|
-
* @example
|
|
5800
|
-
* ```typescript
|
|
5801
|
-
* // Only process images larger than 1MB
|
|
5802
|
-
* const condition: FlowCondition = {
|
|
5803
|
-
* field: "size",
|
|
5804
|
-
* operator: "greaterThan",
|
|
5805
|
-
* value: 1024 * 1024
|
|
5806
|
-
* };
|
|
5807
|
-
*
|
|
5808
|
-
* // Only process JPEG images
|
|
5809
|
-
* const jpegCondition: FlowCondition = {
|
|
5810
|
-
* field: "mimeType",
|
|
5811
|
-
* operator: "startsWith",
|
|
5812
|
-
* value: "image/jpeg"
|
|
5813
|
-
* };
|
|
5814
|
-
* ```
|
|
5815
|
-
*/
|
|
5816
|
-
/**
|
|
5817
|
-
* Represents a conditional rule for node execution.
|
|
5818
|
-
*
|
|
5819
|
-
* @property field - The file property to check
|
|
5820
|
-
* @property operator - The comparison operator to apply
|
|
5821
|
-
* @property value - The value to compare against
|
|
5822
|
-
*
|
|
5823
|
-
* @remarks
|
|
5824
|
-
* - Fields can check file metadata (mimeType, size) or image properties (width, height)
|
|
5825
|
-
* - String operators (contains, startsWith) work with string values
|
|
5826
|
-
* - Numeric operators (greaterThan, lessThan) work with numeric values
|
|
5827
|
-
* - The extension field checks the file extension without the dot
|
|
5828
|
-
*/
|
|
5829
|
-
type FlowCondition = {
|
|
5830
|
-
field: "mimeType" | "size" | "width" | "height" | "extension";
|
|
5831
|
-
operator: "equals" | "notEquals" | "greaterThan" | "lessThan" | "contains" | "startsWith";
|
|
5832
|
-
value: string | number;
|
|
5833
|
-
};
|
|
5834
|
-
//#endregion
|
|
5835
|
-
//#region src/flow/types/type-utils.d.ts
|
|
5836
|
-
/**
|
|
5837
|
-
* Extracts the service type from an Effect Layer.
|
|
5838
|
-
*
|
|
5839
|
-
* Given a Layer that provides a service, this type utility extracts
|
|
5840
|
-
* the service type from the Layer's type signature.
|
|
5841
|
-
*
|
|
5842
|
-
* @template T - The Layer type to extract from
|
|
5843
|
-
* @returns The service type provided by the layer, or never if T is not a Layer
|
|
5844
|
-
*
|
|
5845
|
-
* @example
|
|
5846
|
-
* ```typescript
|
|
5847
|
-
* type MyLayer = Layer.Layer<ServiceA, never, never>;
|
|
5848
|
-
* type Service = ExtractLayerService<MyLayer>;
|
|
5849
|
-
* // Service = ServiceA
|
|
5850
|
-
* ```
|
|
5851
|
-
*
|
|
5852
|
-
* @example
|
|
5853
|
-
* ```typescript
|
|
5854
|
-
* import { ImagePluginLayer } from '@uploadista/core';
|
|
5855
|
-
*
|
|
5856
|
-
* type ImageService = ExtractLayerService<ImagePluginLayer>;
|
|
5857
|
-
* // ImageService = ImagePlugin
|
|
5858
|
-
* ```
|
|
5859
|
-
*/
|
|
5860
|
-
type ExtractLayerService<T, TError$1 = never, TRequirements = never> = T extends Layer.Layer<infer S, TError$1, TRequirements> ? S : never;
|
|
5861
|
-
/**
|
|
5862
|
-
* Extracts all service types from a tuple of layers and returns them as a union.
|
|
5863
|
-
*
|
|
5864
|
-
* This type recursively processes a tuple of Layer types and extracts all
|
|
5865
|
-
* the services they provide, combining them into a single union type.
|
|
5866
|
-
*
|
|
5867
|
-
* @template T - A readonly tuple of Layer types
|
|
5868
|
-
* @returns A union of all service types provided by the layers, or never for empty tuples
|
|
5869
|
-
*
|
|
5870
|
-
* @example
|
|
5871
|
-
* ```typescript
|
|
5872
|
-
* type Layers = [
|
|
5873
|
-
* Layer.Layer<ServiceA, never, never>,
|
|
5874
|
-
* Layer.Layer<ServiceB, never, never>,
|
|
5875
|
-
* Layer.Layer<ServiceC, never, never>
|
|
5876
|
-
* ];
|
|
5877
|
-
* type Services = ExtractLayerServices<Layers>;
|
|
5878
|
-
* // Services = ServiceA | ServiceB | ServiceC
|
|
5879
|
-
* ```
|
|
5880
|
-
*
|
|
5881
|
-
* @example
|
|
5882
|
-
* ```typescript
|
|
5883
|
-
* import { ImagePluginLayer, ZipPluginLayer } from '@uploadista/core';
|
|
5884
|
-
*
|
|
5885
|
-
* type PluginLayers = [ImagePluginLayer, ZipPluginLayer];
|
|
5886
|
-
* type AllServices = ExtractLayerServices<PluginLayers>;
|
|
5887
|
-
* // AllServices = ImagePlugin | ZipPlugin
|
|
5888
|
-
* ```
|
|
5889
|
-
*
|
|
5890
|
-
* @example
|
|
5891
|
-
* ```typescript
|
|
5892
|
-
* type EmptyLayers = [];
|
|
5893
|
-
* type NoServices = ExtractLayerServices<EmptyLayers>;
|
|
5894
|
-
* // NoServices = never
|
|
5895
|
-
* ```
|
|
5896
|
-
*/
|
|
5897
|
-
type ExtractLayerServices<T extends readonly Layer.Layer<any, any, any>[]> = T extends readonly [] ? never : { [K in keyof T]: T[K] extends Layer.Layer<infer S, any, any> ? S : never }[number];
|
|
5898
|
-
/**
|
|
5899
|
-
* Unwraps an Effect type to extract its success value type.
|
|
5900
|
-
*
|
|
5901
|
-
* If the input type is an Effect, this extracts the success type (first type parameter).
|
|
5902
|
-
* If the input is not an Effect, it returns the type unchanged.
|
|
5903
|
-
*
|
|
5904
|
-
* @template T - The type to resolve, potentially an Effect
|
|
5905
|
-
* @returns The success type if T is an Effect, otherwise T
|
|
5906
|
-
*
|
|
5907
|
-
* @example
|
|
5908
|
-
* ```typescript
|
|
5909
|
-
* type MyEffect = Effect.Effect<string, Error, never>;
|
|
5910
|
-
* type Result = ResolveEffect<MyEffect>;
|
|
5911
|
-
* // Result = string
|
|
5912
|
-
* ```
|
|
5913
|
-
*
|
|
5914
|
-
* @example
|
|
5915
|
-
* ```typescript
|
|
5916
|
-
* type NonEffect = { data: string };
|
|
5917
|
-
* type Result = ResolveEffect<NonEffect>;
|
|
5918
|
-
* // Result = { data: string }
|
|
5919
|
-
* ```
|
|
5920
|
-
*/
|
|
5921
|
-
type ResolveEffect<T> = T extends Effect.Effect<infer S, any, any> ? S : T;
|
|
5922
|
-
/**
|
|
5923
|
-
* Extracts the error type from an Effect.
|
|
5924
|
-
*
|
|
5925
|
-
* Given an Effect type, this utility extracts the error type
|
|
5926
|
-
* (second type parameter) from the Effect's type signature.
|
|
5927
|
-
*
|
|
5928
|
-
* @template T - The Effect type to extract from
|
|
5929
|
-
* @returns The error type of the Effect, or never if T is not an Effect
|
|
5930
|
-
*
|
|
5931
|
-
* @example
|
|
5932
|
-
* ```typescript
|
|
5933
|
-
* type MyEffect = Effect.Effect<string, ValidationError, never>;
|
|
5934
|
-
* type ErrorType = ExtractEffectError<MyEffect>;
|
|
5935
|
-
* // ErrorType = ValidationError
|
|
5936
|
-
* ```
|
|
5937
|
-
*
|
|
5938
|
-
* @example
|
|
5939
|
-
* ```typescript
|
|
5940
|
-
* type SafeEffect = Effect.Effect<number, never, SomeService>;
|
|
5941
|
-
* type ErrorType = ExtractEffectError<SafeEffect>;
|
|
5942
|
-
* // ErrorType = never (no errors possible)
|
|
5943
|
-
* ```
|
|
5944
|
-
*/
|
|
5945
|
-
type ExtractEffectError<T> = T extends Effect.Effect<any, infer E, any> ? E : never;
|
|
5946
|
-
/**
|
|
5947
|
-
* Extracts the requirements (context) type from an Effect.
|
|
5948
|
-
*
|
|
5949
|
-
* Given an Effect type, this utility extracts the requirements type
|
|
5950
|
-
* (third type parameter) from the Effect's type signature. This represents
|
|
5951
|
-
* the services that must be provided for the Effect to run.
|
|
5952
|
-
*
|
|
5953
|
-
* @template T - The Effect type to extract from
|
|
5954
|
-
* @returns The requirements type of the Effect, or never if T is not an Effect
|
|
5955
|
-
*
|
|
5956
|
-
* @example
|
|
5957
|
-
* ```typescript
|
|
5958
|
-
* type MyEffect = Effect.Effect<string, Error, Database | Logger>;
|
|
5959
|
-
* type Requirements = ExtractEffectRequirements<MyEffect>;
|
|
5960
|
-
* // Requirements = Database | Logger
|
|
5961
|
-
* ```
|
|
5962
|
-
*
|
|
5963
|
-
* @example
|
|
5964
|
-
* ```typescript
|
|
5965
|
-
* import { ImagePlugin, ZipPlugin } from '@uploadista/core';
|
|
5966
|
-
*
|
|
5967
|
-
* type ProcessEffect = Effect.Effect<
|
|
5968
|
-
* ProcessedImage,
|
|
5969
|
-
* ProcessError,
|
|
5970
|
-
* ImagePlugin | ZipPlugin
|
|
5971
|
-
* >;
|
|
5972
|
-
* type Needed = ExtractEffectRequirements<ProcessEffect>;
|
|
5973
|
-
* // Needed = ImagePlugin | ZipPlugin
|
|
5974
|
-
* ```
|
|
5975
|
-
*/
|
|
5976
|
-
type ExtractEffectRequirements<T> = T extends Effect.Effect<any, any, infer R> ? R : never;
|
|
5977
|
-
//#endregion
|
|
5978
6136
|
//#region src/flow/typed-flow.d.ts
|
|
5979
6137
|
/**
|
|
5980
6138
|
* Defines a node that can be used in a typed flow.
|
|
@@ -6259,5 +6417,202 @@ type ResolvedUploadMetadata = {
|
|
|
6259
6417
|
};
|
|
6260
6418
|
declare function resolveUploadMetadata(metadata: FileMetadata): ResolvedUploadMetadata;
|
|
6261
6419
|
//#endregion
|
|
6262
|
-
|
|
6263
|
-
|
|
6420
|
+
//#region src/flow/utils/file-naming.d.ts
|
|
6421
|
+
/**
|
|
6422
|
+
* Extracts the base name (without extension) from a filename.
|
|
6423
|
+
*
|
|
6424
|
+
* @param fileName - The full filename
|
|
6425
|
+
* @returns The filename without extension
|
|
6426
|
+
*
|
|
6427
|
+
* @example
|
|
6428
|
+
* ```typescript
|
|
6429
|
+
* getBaseName("photo.jpg") // "photo"
|
|
6430
|
+
* getBaseName("document.tar.gz") // "document.tar"
|
|
6431
|
+
* getBaseName("noextension") // "noextension"
|
|
6432
|
+
* ```
|
|
6433
|
+
*/
|
|
6434
|
+
declare function getBaseName(fileName: string): string;
|
|
6435
|
+
/**
|
|
6436
|
+
* Extracts the extension (without dot) from a filename.
|
|
6437
|
+
*
|
|
6438
|
+
* @param fileName - The full filename
|
|
6439
|
+
* @returns The extension without leading dot, or empty string if none
|
|
6440
|
+
*
|
|
6441
|
+
* @example
|
|
6442
|
+
* ```typescript
|
|
6443
|
+
* getExtension("photo.jpg") // "jpg"
|
|
6444
|
+
* getExtension("document.tar.gz") // "gz"
|
|
6445
|
+
* getExtension("noextension") // ""
|
|
6446
|
+
* ```
|
|
6447
|
+
*/
|
|
6448
|
+
declare function getExtension(fileName: string): string;
|
|
6449
|
+
/**
|
|
6450
|
+
* Builds a naming context from file and flow execution information.
|
|
6451
|
+
*
|
|
6452
|
+
* @param file - The UploadFile being processed
|
|
6453
|
+
* @param flowContext - Flow execution context (flowId, jobId, nodeId, nodeType)
|
|
6454
|
+
* @param extraVars - Additional variables to include (width, height, format, etc.)
|
|
6455
|
+
* @returns Complete naming context for template interpolation
|
|
6456
|
+
*
|
|
6457
|
+
* @example
|
|
6458
|
+
* ```typescript
|
|
6459
|
+
* const context = buildNamingContext(
|
|
6460
|
+
* uploadFile,
|
|
6461
|
+
* { flowId: "flow-1", jobId: "job-1", nodeId: "resize-1", nodeType: "resize" },
|
|
6462
|
+
* { width: 800, height: 600 }
|
|
6463
|
+
* );
|
|
6464
|
+
* // context.baseName = "photo"
|
|
6465
|
+
* // context.extension = "jpg"
|
|
6466
|
+
* // context.width = 800
|
|
6467
|
+
* // context.height = 600
|
|
6468
|
+
* ```
|
|
6469
|
+
*/
|
|
6470
|
+
declare function buildNamingContext(file: UploadFile, flowContext: {
|
|
6471
|
+
flowId: string;
|
|
6472
|
+
jobId: string;
|
|
6473
|
+
nodeId: string;
|
|
6474
|
+
nodeType: string;
|
|
6475
|
+
}, extraVars?: Record<string, string | number | undefined>): NamingContext;
|
|
6476
|
+
/**
|
|
6477
|
+
* Interpolates a mustache-style template with the given context.
|
|
6478
|
+
*
|
|
6479
|
+
* Uses micromustache for fast, secure template rendering.
|
|
6480
|
+
* Unknown variables are preserved as-is (e.g., {{unknown}} stays {{unknown}}).
|
|
6481
|
+
*
|
|
6482
|
+
* @param pattern - Mustache-style template string
|
|
6483
|
+
* @param context - Variables to interpolate
|
|
6484
|
+
* @returns Interpolated string
|
|
6485
|
+
*
|
|
6486
|
+
* @example
|
|
6487
|
+
* ```typescript
|
|
6488
|
+
* interpolateFileName(
|
|
6489
|
+
* "{{baseName}}-{{width}}x{{height}}.{{extension}}",
|
|
6490
|
+
* { baseName: "photo", width: 800, height: 600, extension: "jpg" }
|
|
6491
|
+
* );
|
|
6492
|
+
* // Returns: "photo-800x600.jpg"
|
|
6493
|
+
* ```
|
|
6494
|
+
*/
|
|
6495
|
+
declare function interpolateFileName(pattern: string, context: NamingContext): string;
|
|
6496
|
+
/**
|
|
6497
|
+
* Applies file naming configuration to generate a new filename.
|
|
6498
|
+
*
|
|
6499
|
+
* Handles three modes:
|
|
6500
|
+
* - No config: Returns original filename (backward compatible)
|
|
6501
|
+
* - Auto mode: Appends auto-generated suffix based on node type
|
|
6502
|
+
* - Custom mode: Uses template pattern or rename function
|
|
6503
|
+
*
|
|
6504
|
+
* On any error, falls back to the original filename to prevent flow failures.
|
|
6505
|
+
*
|
|
6506
|
+
* @param file - The UploadFile being processed
|
|
6507
|
+
* @param context - Naming context with all available variables
|
|
6508
|
+
* @param config - Optional naming configuration
|
|
6509
|
+
* @returns The new filename (or original on error/no config)
|
|
6510
|
+
*
|
|
6511
|
+
* @example
|
|
6512
|
+
* ```typescript
|
|
6513
|
+
* // Auto mode
|
|
6514
|
+
* applyFileNaming(file, context, {
|
|
6515
|
+
* mode: 'auto',
|
|
6516
|
+
* autoSuffix: (ctx) => `${ctx.width}x${ctx.height}`
|
|
6517
|
+
* });
|
|
6518
|
+
* // Returns: "photo-800x600.jpg"
|
|
6519
|
+
*
|
|
6520
|
+
* // Custom mode with template
|
|
6521
|
+
* applyFileNaming(file, context, {
|
|
6522
|
+
* mode: 'custom',
|
|
6523
|
+
* pattern: '{{baseName}}-processed.{{extension}}'
|
|
6524
|
+
* });
|
|
6525
|
+
* // Returns: "photo-processed.jpg"
|
|
6526
|
+
*
|
|
6527
|
+
* // Custom mode with function
|
|
6528
|
+
* applyFileNaming(file, context, {
|
|
6529
|
+
* mode: 'custom',
|
|
6530
|
+
* rename: (file, ctx) => `${ctx.flowId}-${ctx.fileName}`
|
|
6531
|
+
* });
|
|
6532
|
+
* // Returns: "flow-1-photo.jpg"
|
|
6533
|
+
* ```
|
|
6534
|
+
*/
|
|
6535
|
+
declare function applyFileNaming(file: UploadFile, context: NamingContext, config?: FileNamingConfig): string;
|
|
6536
|
+
/**
|
|
6537
|
+
* Validates a template pattern for common issues.
|
|
6538
|
+
*
|
|
6539
|
+
* Checks for:
|
|
6540
|
+
* - Balanced braces
|
|
6541
|
+
* - Non-empty pattern
|
|
6542
|
+
* - Valid variable names
|
|
6543
|
+
*
|
|
6544
|
+
* @param pattern - Template pattern to validate
|
|
6545
|
+
* @returns Object with isValid flag and optional error message
|
|
6546
|
+
*
|
|
6547
|
+
* @example
|
|
6548
|
+
* ```typescript
|
|
6549
|
+
* validatePattern("{{baseName}}.{{extension}}");
|
|
6550
|
+
* // { isValid: true }
|
|
6551
|
+
*
|
|
6552
|
+
* validatePattern("{{baseName");
|
|
6553
|
+
* // { isValid: false, error: "Unbalanced braces: missing closing }}" }
|
|
6554
|
+
* ```
|
|
6555
|
+
*/
|
|
6556
|
+
declare function validatePattern(pattern: string): {
|
|
6557
|
+
isValid: boolean;
|
|
6558
|
+
error?: string;
|
|
6559
|
+
};
|
|
6560
|
+
/**
|
|
6561
|
+
* List of available template variables for documentation and UI.
|
|
6562
|
+
*/
|
|
6563
|
+
declare const AVAILABLE_TEMPLATE_VARIABLES: readonly [{
|
|
6564
|
+
readonly name: "baseName";
|
|
6565
|
+
readonly description: "Filename without extension";
|
|
6566
|
+
readonly example: "photo";
|
|
6567
|
+
}, {
|
|
6568
|
+
readonly name: "extension";
|
|
6569
|
+
readonly description: "File extension without dot";
|
|
6570
|
+
readonly example: "jpg";
|
|
6571
|
+
}, {
|
|
6572
|
+
readonly name: "fileName";
|
|
6573
|
+
readonly description: "Full original filename";
|
|
6574
|
+
readonly example: "photo.jpg";
|
|
6575
|
+
}, {
|
|
6576
|
+
readonly name: "nodeType";
|
|
6577
|
+
readonly description: "Type of processing node";
|
|
6578
|
+
readonly example: "resize";
|
|
6579
|
+
}, {
|
|
6580
|
+
readonly name: "nodeId";
|
|
6581
|
+
readonly description: "Specific node instance ID";
|
|
6582
|
+
readonly example: "resize-1";
|
|
6583
|
+
}, {
|
|
6584
|
+
readonly name: "flowId";
|
|
6585
|
+
readonly description: "Flow identifier";
|
|
6586
|
+
readonly example: "flow-abc";
|
|
6587
|
+
}, {
|
|
6588
|
+
readonly name: "jobId";
|
|
6589
|
+
readonly description: "Execution job ID";
|
|
6590
|
+
readonly example: "job-123";
|
|
6591
|
+
}, {
|
|
6592
|
+
readonly name: "timestamp";
|
|
6593
|
+
readonly description: "ISO 8601 processing time";
|
|
6594
|
+
readonly example: "2024-01-15T10:30:00Z";
|
|
6595
|
+
}, {
|
|
6596
|
+
readonly name: "width";
|
|
6597
|
+
readonly description: "Output width (image/video)";
|
|
6598
|
+
readonly example: "800";
|
|
6599
|
+
}, {
|
|
6600
|
+
readonly name: "height";
|
|
6601
|
+
readonly description: "Output height (image/video)";
|
|
6602
|
+
readonly example: "600";
|
|
6603
|
+
}, {
|
|
6604
|
+
readonly name: "format";
|
|
6605
|
+
readonly description: "Output format";
|
|
6606
|
+
readonly example: "webp";
|
|
6607
|
+
}, {
|
|
6608
|
+
readonly name: "quality";
|
|
6609
|
+
readonly description: "Quality setting";
|
|
6610
|
+
readonly example: "80";
|
|
6611
|
+
}, {
|
|
6612
|
+
readonly name: "pageNumber";
|
|
6613
|
+
readonly description: "Page number (documents)";
|
|
6614
|
+
readonly example: "1";
|
|
6615
|
+
}];
|
|
6616
|
+
//#endregion
|
|
6617
|
+
export { VideoPlugin as $, createFlowNode as $i, createUploadServer as $n, DataStoreConfig as $r, DocumentMetadata as $t, isImageDescriptionOutput as A, TypeCompatibilityChecker as Ai, createInputNode as An, OcrOutput as Ar, WatermarkTransform as At, describeImageParamsSchema as B, FlowEventFlowStart as Bi, WaitUntilCallback as Bn, InputTypeDefinition as Br, sharpenTransformSchema as Bt, createTypeGuard as C, FlowConfig as Ci, ExtractEffectRequirements as Cn, UploadEventType as Cr, RotateTransform as Ct, getSingleOutputByType as D, NodeConnectionValidator as Di, FlowCondition as Dn, IMAGE_DESCRIPTION_OUTPUT_TYPE_ID as Dr, TransformImageParams as Dt, getOutputByNodeId as E, NamingContext as Ei, ResolveEffect as En, EventBroadcasterService as Er, TextTransform as Et, isUploadOperation as F, FlowEvent as Fi, FlowServer as Fn, OutputTypeDefinition as Fr, grayscaleTransformSchema as Ft, ZipPlugin as G, FlowEventNodePause as Gi, FlowJobTask as Gn, Flow as Gr, ResizeParams as Gt, PluginLayer as H, FlowEventJobStart as Hi, flowServer as Hn, InputValidationResult as Hr, transformImageParamsSchema as Ht, isUrlOperation as I, FlowEventFlowCancel as Ii, FlowServerLayer as In, OutputTypeRegistry as Ir, logoTransformSchema as It, ScanMetadata as J, FlowEventNodeStart as Ji, UploadStrategyNegotiator as Jn, createFlowWithSchema as Jr, optimizeParamsSchema as Jt, ZipPluginLayer as K, FlowEventNodeResponse as Ki, FlowJobTaskStatus as Kn, FlowData as Kr, resizeParamsSchema as Kt, RemoveBackgroundParams as L, FlowEventFlowEnd as Li, FlowServerOptions as Ln, OutputValidationResult as Lr, resizeTransformSchema as Lt, isOcrOutput as M, completeNodeExecution as Mi, inputNodeParamsSchema as Mn, STREAMING_INPUT_TYPE_ID as Mr, brightnessTransformSchema as Mt, isStorageOutput as N, waitingNodeExecution as Ni, FlowProvider as Nn, imageDescriptionOutputSchema as Nr, contrastTransformSchema as Nt, hasOutputOfType as O, NodeExecutionResult as Oi, InputData as On, ImageDescriptionOutput as Or, Transformation as Ot, isUploadFile as P, EventType as Pi, FlowProviderShape as Pn, ocrOutputSchema as Pr, flipTransformSchema as Pt, VirusScanPluginShape as Q, NodeType as Qi, UploadServerShape as Qn, DataStoreCapabilities as Qr, ImageAiPluginShape as Qt, removeBackgroundParamsSchema as R, FlowEventFlowError as Ri, FlowServerShape as Rn, outputTypeRegistry as Rr, rotateTransformSchema as Rt, NarrowedTypedOutput as S, FileNamingFunction as Si, ExtractEffectError as Sn, UploadEvent as Sr, ResizeTransform as St, getFirstOutputByType as T, FlowNodeData as Ti, ExtractLayerServices as Tn, EventBroadcaster as Tr, SharpenTransform as Tt, ZipInput as U, FlowEventNodeEnd as Ui, FlowJob as Un, inputTypeRegistry as Ur, transformationSchema as Ut, Plugin as V, FlowEventJobEnd as Vi, createFlowServer as Vn, InputTypeRegistry as Vr, textTransformSchema as Vt, ZipParams as W, FlowEventNodeError as Wi, FlowJobStatus as Wn, validateFlowInput as Wr, watermarkTransformSchema as Wt, VirusScanPlugin as X, ConditionOperator as Xi, UploadServer as Xn, BufferedUploadFileDataStore as Xr, ImageAiPlugin as Xt, ScanResult as Y, ConditionField as Yi, UploadStrategyOptions as Yn, getFlowData as Yr, ImageAiContext as Yt, VirusScanPluginLayer as Z, ConditionValue as Zi, UploadServerOptions as Zn, DataStore as Zr, ImageAiPluginLayer as Zt, NodeDefinitionsRecord as _, createFlowEdge as _i, ExecutionLevel as _n, flowEventEmitter as _r, ContrastTransform as _t, getExtension as a, createDataStoreLayer as ai, SplitPdfResult as an, MiddlewareNext as ar, transcodeVideoParamsSchema as at, TypedFlowEdge as b, CustomTypedOutput as bi, TransformNodeConfig as bn, WebSocketMessage as br, LogoTransform as bt, ResolvedUploadMetadata as c, BaseKvStoreService as ci, DocumentAiPluginLayer as cn, InputFile as cr, ExtractFrameVideoParams as ct, runArgsSchema as d, TypedKvStore as di, OcrResolution as dn, BaseEventEmitterService as dr, describeVideoMetadataSchema as dt, getNodeData as ea, DataStoreWriteOptions as ei, DocumentPlugin as en, uploadServer as er, VideoPluginLayer as et, FlowInputMap as f, UploadFileKVStore as fi, OcrResult as fn, EventEmitter as fr, ImagePlugin as ft, NodeDefinition as g, FlowEdge as gi, CredentialProviderShape as gn, eventToMessageSerializer as gr, BrightnessTransform as gt, FlowRequirements as h, uploadFileKvStore as hi, CredentialProviderLayer as hn, UploadEventEmitter as hr, BlurTransform as ht, getBaseName as i, UploadStrategy as ii, SplitPdfParams as in, MiddlewareContext as ir, TranscodeVideoParams as it, isInitOperation as j, TypedOutput as ji, inputDataSchema as jn, STORAGE_OUTPUT_TYPE_ID as jr, blurTransformSchema as jt, isFinalizeOperation as k, NodeTypeMap as ki, InputNodeParams as kn, OCR_OUTPUT_TYPE_ID as kr, TransformationType as kt, resolveUploadMetadata as l, FlowJobKVStore as li, DocumentAiPluginShape as ln, inputFileSchema as lr, extractFrameVideoParamsSchema as lt, FlowPluginRequirements as m, jsonSerializer as mi, CredentialProvider as mn, TypedEventEmitter as mr, ImagePluginShape as mt, applyFileNaming as n, uploadFileSchema as na, UploadFileDataStores as ni, DocumentPluginShape as nn, detectMimeType as nr, TrimVideoParams as nt, interpolateFileName as o, isDataStore as oi, DocumentAiContext as on, MiddlewareService as or, ResizeVideoParams as ot, FlowOutputMap as p, flowJobKvStore as pi, OcrTaskType as pn, FlowEventEmitter as pr, ImagePluginLayer as pt, ZipPluginShape as q, FlowEventNodeResume as qi, NegotiatedStrategy as qn, FlowExecutionResult as qr, OptimizeParams as qt, buildNamingContext as r, UploadFileDataStoresShape as ri, MergePdfParams as rn, Middleware as rr, trimVideoParamsSchema as rt, validatePattern as s, BaseKvStore as si, DocumentAiPlugin as sn, MiddlewareServiceLive as sr, resizeVideoParamsSchema as st, AVAILABLE_TEMPLATE_VARIABLES as t, UploadFile as ta, UploadFileDataStore as ti, DocumentPluginLayer as tn, compareMimeTypes as tr, VideoPluginShape as tt, RunArgs as u, KvStore as ui, OcrParams as un, BaseEventEmitter as ur, DescribeVideoMetadata as ut, TypedFlow as v, AutoNamingSuffixGenerator as vi, ParallelScheduler as vn, uploadEventEmitter as vr, FlipTransform as vt, filterOutputsByType as w, FlowNode as wi, ExtractLayerService as wn, uploadEventSchema as wr, SepiaTransform as wt, createFlow as x, FileNamingConfig as xi, createTransformNode as xn, webSocketMessageSchema as xr, OverlayPosition as xt, TypedFlowConfig as y, BuiltInTypedOutput as yi, ParallelSchedulerConfig as yn, WebSocketConnection as yr, GrayscaleTransform as yt, DescribeImageParams as z, FlowEventFlowPause as zi, FlowWaitUntil as zn, validateFlowOutput as zr, sepiaTransformSchema as zt };
|
|
6618
|
+
//# sourceMappingURL=index-uOAh_6qk.d.cts.map
|