diff --git a/file-formats/smtg/README.md b/file-formats/smtg/README.md new file mode 100644 index 000000000..564ad9f06 --- /dev/null +++ b/file-formats/smtg/README.md @@ -0,0 +1,5 @@ +# SMTG File Format + +File | Cardinality | Definition | Schema | Example +:--- | :--- | :--- | :--- | :--- +`.smtg.json` | 1 | [`zif_aff_smtg_v1.intf.abap`](./type/zif_aff_smtg_v1.intf.abap) | [`smtg-v1.json`](./smtg-v1.json) diff --git a/file-formats/smtg/smtg-v1.json b/file-formats/smtg/smtg-v1.json new file mode 100644 index 000000000..c342009eb --- /dev/null +++ b/file-formats/smtg/smtg-v1.json @@ -0,0 +1,107 @@ +{ + "$comment": "This file is autogenerated, do not edit manually, see https://github.com/SAP/abap-file-formats for more information.", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://github.com/SAP/abap-file-formats/blob/main/file-formats/smtg/smtg-v1.json", + "title": "Email Template", + "description": "Email Template", + "type": "object", + "properties": { + "formatVersion": { + "title": "Format Version", + "description": "Format version", + "type": "string", + "const": "1" + }, + "header": { + "title": "Header", + "description": "Header", + "type": "object", + "properties": { + "description": { + "title": "Description", + "description": "Description of the ABAP object", + "type": "string", + "maxLength": 60 + }, + "originalLanguage": { + "title": "Original Language", + "description": "Original language of the ABAP object", + "type": "string", + "minLength": 2 + }, + "abapLanguageVersion": { + "title": "ABAP Language Version", + "description": "ABAP language version", + "type": "string", + "enum": [ + "standard", + "keyUser", + "cloudDevelopment" + ], + "enumTitles": [ + "Standard", + "ABAP for Key Users", + "ABAP Cloud Development" + ], + "enumDescriptions": [ + "Standard", + "ABAP for key user extensibility", + "ABAP cloud development" + ], + "default": "standard" + } + }, + "additionalProperties": false, + "required": [ + "description", + "originalLanguage" + ] + }, + "generalInformation": { + "title": "General Information", + "description": "General information", + "type": "object", + "properties": { + "longDescription": { + "title": "Template Description", + "description": "Long description to that email template", + "type": "string", + "maxLength": 255 + }, + "isPredelivered": { + "title": "Predelivered", + "description": "Indicator if the template is predelivered", + "type": "boolean" + }, + "isPlaintextAutoGenerated": { + "title": "Generate Plain Text from HTML", + "description": "Indicator if the template text body is generated automatically from html body", + "type": "boolean" + }, + "cdsView": { + "title": "CDS View", + "description": "The corresponding CDS view name for the template", + "type": "string", + "maxLength": 30 + }, + "emailSubject": { + "title": "Subject", + "description": "The subject of the email template", + "type": "string", + "maxLength": 255 + } + }, + "additionalProperties": false, + "required": [ + "cdsView", + "emailSubject" + ] + } + }, + "additionalProperties": false, + "required": [ + "formatVersion", + "header", + "generalInformation" + ] +} diff --git a/file-formats/smtg/type/zif_aff_smtg_v1.intf.abap b/file-formats/smtg/type/zif_aff_smtg_v1.intf.abap new file mode 100644 index 000000000..0003bb422 --- /dev/null +++ b/file-formats/smtg/type/zif_aff_smtg_v1.intf.abap @@ -0,0 +1,47 @@ +INTERFACE zif_aff_smtg_v1 + PUBLIC. + + TYPES: + "!

General Information

+ "! Combines template header and administrative data. + BEGIN OF ty_general_information, + "!

Template Description

+ "! Long description to that email template + long_description TYPE c LENGTH 255, + "!

Predelivered

+ "! Indicator if the template is predelivered + is_predelivered TYPE abap_bool, + "!

Generate Plain Text from HTML

+ "! Indicator if the template text body is generated automatically from html body + is_plaintext_auto_generated TYPE abap_bool, + "!

CDS View

+ "! The corresponding CDS view name for the template + "! $required + cds_view TYPE zif_aff_types_v1=>ty_object_name_30, + "!

Subject

+ "! The subject of the email template + "! $required + email_subject TYPE c LENGTH 255, + END OF ty_general_information. + " Corresponding content ist stored in a separate file and implemented as action + + + TYPES: + "!

Email Template

+ "! Email Template + BEGIN OF ty_main, + "!

Format Version

+ "! Format version + "! $required + format_version TYPE zif_aff_types_v1=>ty_format_version, + "!

Header

+ "! Header + "! $required + header TYPE zif_aff_types_v1=>ty_header_60, + "!

General Information

+ "! General information + "! $required + general_information TYPE ty_general_information, + END OF ty_main. + +ENDINTERFACE. diff --git a/file-formats/smtg/type/zif_aff_smtg_v1.intf.json b/file-formats/smtg/type/zif_aff_smtg_v1.intf.json new file mode 100644 index 000000000..48bbb42ec --- /dev/null +++ b/file-formats/smtg/type/zif_aff_smtg_v1.intf.json @@ -0,0 +1,7 @@ +{ + "formatVersion": "1", + "header": { + "description": "test email template file format", + "originalLanguage": "en" + } +}