import { type BlockExecutor } from '../orchestration-schema.js'; /** * @serverBlockDoc * { * "version": 1, * "functionName": "randomId", * "displayName": "生成随机 ID", * "category": "utility", * "description": "按前缀、长度和字符表生成短随机字符串,适合在 API 编排里生成临时 ID 或 schema 名。", * "inputs": [ * { "key": "prefix", "type": "string", "required": false, "defaultValue": "", "description": "随机 ID 前缀。" }, * { "key": "length", "type": "number", "required": false, "defaultValue": 6, "description": "随机部分长度,最大 32。" }, * { "key": "alphabet", "type": "string", "required": false, "defaultValue": "abcdefghijklmnopqrstuvwxyz0123456789", "description": "随机字符表。" }, * { "key": "lowerCase", "type": "boolean", "required": false, "defaultValue": true, "description": "是否将前缀和字符表转为小写。" } * ], * "outputs": [ * { "key": "value", "type": "string", "description": "生成后的随机 ID。" } * ], * "errors": [ * { "code": "BLOCK_RANDOM_ID_INVALID", "description": "prefix、length 或 alphabet 配置非法。" } * ], * "config": [], * "runtime": [ * { "key": "requiresDatasource", "type": "boolean", "value": false, "description": "不需要数据库连接。" } * ], * "examples": [ * { "title": "生成企业免费 schema 名", "block": { "uuid": "generate_free_schema_name", "functionName": "randomId", "inputs": { "prefix": "e_", "length": 5, "alphabet": "abcdefghijklmnopqrstuvwxyz0123456789" }, "outputs": ["value"], "nextBlock": null } } * ] * } */ export declare const executeRandomIdBlock: BlockExecutor;