From 2e4803426f33f921dcab1bfa63333f74074a8672 Mon Sep 17 00:00:00 2001 From: nicosammito Date: Mon, 13 Jul 2026 15:21:37 +0200 Subject: [PATCH 1/2] feat: add file.proto.json definition with localization and type specifications --- .../taurus/file/data_types/file.proto.json | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 definitions/taurus/file/data_types/file.proto.json diff --git a/definitions/taurus/file/data_types/file.proto.json b/definitions/taurus/file/data_types/file.proto.json new file mode 100644 index 0000000..9733b4a --- /dev/null +++ b/definitions/taurus/file/data_types/file.proto.json @@ -0,0 +1,26 @@ +{ + "identifier": "FILE", + "name": [ + { + "code": "en-US", + "content": "File" + } + ], + "alias": [ + { + "code": "en-US", + "content": "file;document;blob;attachment;binary" + } + ], + "displayMessage": [ + { + "code": "en-US", + "content": "File" + } + ], + "genericKeys": [ + "M" + ], + "type": "{ contentType: M; valueType: 'base64'; value: string }", + "rules": [] +} From f8fa04b833e24fb7287139c1be131864e8940806 Mon Sep 17 00:00:00 2001 From: nicosammito Date: Tue, 28 Jul 2026 18:13:50 +0200 Subject: [PATCH 2/2] feat: add module and proto definitions for file handling and size retrieval --- .../taurus/file/data_types/file.proto.json | 5 +- definitions/taurus/file/module.json | 18 ++++++ .../std_file_size.proto.json | 56 +++++++++++++++++++ 3 files changed, 78 insertions(+), 1 deletion(-) create mode 100644 definitions/taurus/file/module.json create mode 100644 definitions/taurus/file/runtime_functions/std_file_size.proto.json diff --git a/definitions/taurus/file/data_types/file.proto.json b/definitions/taurus/file/data_types/file.proto.json index 9733b4a..3d95405 100644 --- a/definitions/taurus/file/data_types/file.proto.json +++ b/definitions/taurus/file/data_types/file.proto.json @@ -19,8 +19,11 @@ } ], "genericKeys": [ - "M" + "M extends TEXT" ], "type": "{ contentType: M; valueType: 'base64'; value: string }", + "linkedDataTypeIdentifiers": [ + "TEXT" + ], "rules": [] } diff --git a/definitions/taurus/file/module.json b/definitions/taurus/file/module.json new file mode 100644 index 0000000..064d879 --- /dev/null +++ b/definitions/taurus/file/module.json @@ -0,0 +1,18 @@ +{ + "identifier": "taurus-file", + "name": [ + { + "code": "en-US", + "content": "File" + } + ], + "description": [ + { + "code": "en-US", + "content": "Work with Files." + } + ], + "documentation": "", + "author": "CodeZero", + "icon": "tabler:file" +} diff --git a/definitions/taurus/file/runtime_functions/std_file_size.proto.json b/definitions/taurus/file/runtime_functions/std_file_size.proto.json new file mode 100644 index 0000000..50c7ebe --- /dev/null +++ b/definitions/taurus/file/runtime_functions/std_file_size.proto.json @@ -0,0 +1,56 @@ +{ + "runtimeName": "std::file::size", + "runtimeParameterDefinitions": [ + { + "runtimeName": "file", + "defaultValue": null, + "name": [ + { + "code": "en-US", + "content": "File" + } + ], + "description": [ + { + "code": "en-US", + "content": "The file whose size in bytes is to be returned." + } + ], + "documentation": [] + } + ], + "throwsError": false, + "name": [ + { + "code": "en-US", + "content": "File Size" + } + ], + "description": [ + { + "code": "en-US", + "content": "Returns the size of the given file in bytes." + } + ], + "documentation": [], + "alias": [ + { + "code": "en-US", + "content": "size;file;bytes;length;document;blob;std" + } + ], + "displayMessage": [ + { + "code": "en-US", + "content": "Size of ${file}" + } + ], + "deprecationMessage": [], + "displayIcon": "tabler:file", + "signature": "(file: FILE): NUMBER", + "linkedDataTypeIdentifiers": [ + "FILE", + "NUMBER", + "TEXT" + ] +}