diff --git a/file-formats/abiq/README.md b/file-formats/abiq/README.md new file mode 100644 index 000000000..9ad50a92d --- /dev/null +++ b/file-formats/abiq/README.md @@ -0,0 +1,13 @@ +# Analytical Quick Action File Format + +## Object Type Information + +Object Type | Description | Group +:--- | :--- | :--- +ABIQ | Analytical Quick Action | Others + +## File Structure + +File | Cardinality | Definition | Schema | Example +:--- | :--- | :--- | :--- | :--- +`.abiq.json` | 1 | [`zif_aff_abiq_v1.intf.abap`](./type/zif_aff_abiq_v1.intf.abap) | [`abiq-v1.json`](./abiq-v1.json) diff --git a/file-formats/abiq/abiq-v1.json b/file-formats/abiq/abiq-v1.json new file mode 100644 index 000000000..ba9074769 --- /dev/null +++ b/file-formats/abiq/abiq-v1.json @@ -0,0 +1,215 @@ +{ + "$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/abiq/abiq-v1.json", + "title": "Object Type ABIQ", + "description": "Object type ABIQ", + "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", + "cloudDevelopment" + ], + "enumTitles": [ + "Standard", + "ABAP Cloud Development" + ], + "enumDescriptions": [ + "Standard", + "ABAP cloud development" + ], + "default": "standard" + } + }, + "additionalProperties": false, + "required": [ + "description", + "originalLanguage" + ] + }, + "generalInformation": { + "title": "General Information", + "description": "General information", + "type": "object", + "properties": { + "type": { + "title": "Type", + "description": "Type", + "type": "string", + "enum": [ + "llm", + "json", + "pal" + ], + "enumTitles": [ + "LLM", + "JSON", + "PAL" + ], + "enumDescriptions": [ + "LLM quick action", + "JSON quick action", + "PAL quick action" + ], + "default": "llm" + }, + "scope": { + "title": "Scope", + "description": "Scope", + "type": "string", + "enum": [ + "query", + "oneDataProvider", + "multipleDataProviders" + ], + "enumTitles": [ + "Query", + "One Data Provider", + "Multiple Data Providers" + ], + "enumDescriptions": [ + "Query", + "One data provider per page", + "Multiple data providers per page" + ], + "default": "query" + }, + "consumptionVisible": { + "title": "Consumption Visible", + "description": "Visible for consumption", + "type": "boolean" + } + }, + "additionalProperties": false, + "required": [ + "type", + "scope" + ] + }, + "promptDefinition": { + "title": "Prompt Definition", + "description": "Prompt definition (used when type is LLM)", + "type": "object", + "properties": { + "systemPrompt": { + "title": "System Prompt", + "description": "System prompt", + "type": "string" + }, + "userPrompt": { + "title": "User Prompt", + "description": "User prompt", + "type": "string" + }, + "resultSetRequired": { + "title": "Result Set Required", + "description": "Result set required", + "type": "boolean" + }, + "commentsRequired": { + "title": "Comments Required", + "description": "Comments required", + "type": "boolean" + }, + "outputType": { + "title": "Output Type", + "description": "Output type", + "type": "string", + "enum": [ + "notSet", + "html", + "cardChart" + ], + "enumTitles": [ + "Not Set", + "HTML", + "Card Chart" + ], + "enumDescriptions": [ + "Not set", + "HTML", + "Card chart" + ], + "default": "notSet" + } + }, + "additionalProperties": false, + "required": [ + "systemPrompt", + "userPrompt" + ] + }, + "jsonDefinition": { + "title": "JSON Definition", + "description": "JSON definition (used when type is JSON)", + "type": "object", + "properties": { + "jsonContent": { + "title": "JSON Content", + "description": "JSON content", + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "jsonContent" + ] + }, + "assignedQueries": { + "title": "Assigned Queries", + "description": "Assigned queries", + "type": "array", + "uniqueItems": true, + "items": { + "title": "Assigned Query", + "description": "Assigned query", + "type": "object", + "properties": { + "queryName": { + "title": "Query Name", + "description": "Query name", + "type": "string", + "maxLength": 30 + } + }, + "additionalProperties": false, + "required": [ + "queryName" + ] + } + } + }, + "additionalProperties": false, + "required": [ + "formatVersion", + "header", + "generalInformation" + ] +} diff --git a/file-formats/abiq/examples/z_aff_example_abiq.abiq.json b/file-formats/abiq/examples/z_aff_example_abiq.abiq.json new file mode 100644 index 000000000..2431d987f --- /dev/null +++ b/file-formats/abiq/examples/z_aff_example_abiq.abiq.json @@ -0,0 +1,23 @@ +{ + "formatVersion": "1", + "header": { + "description": "Example Quick Action", + "originalLanguage": "en" + }, + "generalInformation": { + "type": "llm", + "scope": "oneDataProvider", + "consumptionVisible": false + }, + "promptDefinition": { + "systemPrompt": "You are uniquely qualified to navigate, comprehend, and analyze the complex hierarchies of tabular financial data. Follow the instructions carefully.", + "userPrompt": "Analyze the review booket data... {result_set}", + "resultSetRequired": true, + "outputType": "html" + }, + "assignedQueries": [ + { + "queryName": "C_MYDUMMYQUERY" + } + ] +} diff --git a/file-formats/abiq/type/zif_aff_abiq_v1.intf.abap b/file-formats/abiq/type/zif_aff_abiq_v1.intf.abap new file mode 100644 index 000000000..a5135a5da --- /dev/null +++ b/file-formats/abiq/type/zif_aff_abiq_v1.intf.abap @@ -0,0 +1,143 @@ +"! AFF type for the object ABIQ ( ABI Quick-Actions ) +INTERFACE zif_aff_abiq_v1 + PUBLIC. + + "! $values { @link zif_aff_abiq_v1.data:co_quick_action_type } + "! $default { @link zif_aff_abiq_v1.data:co_quick_action_type.llm } + TYPES ty_quick_action_type TYPE n LENGTH 2. + CONSTANTS: + BEGIN OF co_quick_action_type, + "!

LLM

+ "! LLM quick action + llm TYPE ty_quick_action_type VALUE 1, + "!

JSON

+ "! JSON quick action + json TYPE ty_quick_action_type VALUE 2, + "!

PAL

+ "! PAL quick action + pal TYPE ty_quick_action_type VALUE 3, + END OF co_quick_action_type. + + "! $values { @link zif_aff_abiq_v1.data:co_quick_action_scope } + "! $default { @link zif_aff_abiq_v1.data:co_quick_action_scope.query } + TYPES ty_quick_action_scope TYPE n LENGTH 2. + CONSTANTS: + BEGIN OF co_quick_action_scope, + "!

Query

+ "! Query + query TYPE ty_quick_action_scope VALUE 1, + "!

One Data Provider

+ "! One data provider per page + one_data_provider TYPE ty_quick_action_scope VALUE 2, + "!

Multiple Data Providers

+ "! Multiple data providers per page + multiple_data_providers TYPE ty_quick_action_scope VALUE 3, + END OF co_quick_action_scope. + + "! $values { @link zif_aff_abiq_v1.data:co_output_type } + "! $default { @link zif_aff_abiq_v1.data:co_output_type.not_set } + TYPES ty_output_type TYPE n LENGTH 2. + CONSTANTS: + BEGIN OF co_output_type, + "!

Not Set

+ "! Not set + not_set TYPE ty_output_type VALUE 0, + "!

HTML

+ "! HTML + html TYPE ty_output_type VALUE 1, + "!

Card Chart

+ "! Card chart + card_chart TYPE ty_output_type VALUE 2, + END OF co_output_type. + + TYPES: + "!

Quick Action Definition

+ "! Quick action definition + BEGIN OF ty_quick_action_definition, + "!

Type

+ "! Type + "! $required + type TYPE ty_quick_action_type, + "!

Scope

+ "! Scope + "! $required + scope TYPE ty_quick_action_scope, + "!

Consumption Visible

+ "! Visible for consumption + consumption_visible TYPE abap_bool, + END OF ty_quick_action_definition. + + TYPES: + "!

Prompt Definition

+ "! Prompt definition + BEGIN OF ty_prompt_definition, + "!

System Prompt

+ "! System prompt + "! $required + system_prompt TYPE string, + "!

User Prompt

+ "! User prompt + "! $required + user_prompt TYPE string, + "!

Result Set Required

+ "! Result set required + result_set_required TYPE abap_bool, + "!

Comments Required

+ "! Comments required + comments_required TYPE abap_bool, + "!

Output Type

+ "! Output type + output_type TYPE ty_output_type, + END OF ty_prompt_definition. + + TYPES: + "!

JSON Definition

+ "! JSON definition + BEGIN OF ty_json_definition, + "!

JSON Content

+ "! JSON content + "! $required + json_content TYPE string, + END OF ty_json_definition. + + TYPES: + "!

Assigned Query

+ "! Assigned query + BEGIN OF ty_assigned_query, + "!

Query Name

+ "! Query name + "! $required + query_name TYPE zif_aff_types_v1=>ty_object_name_30, + END OF ty_assigned_query, + "!

Assigned Queries

+ "! Assigned queries + ty_assigned_queries TYPE SORTED TABLE OF ty_assigned_query WITH UNIQUE KEY query_name. + + TYPES: + "!

Object Type ABIQ

+ "! Object type ABIQ + 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_cloud, + "!

General Information

+ "! General information + "! $required + general_information TYPE ty_quick_action_definition, + "!

Prompt Definition

+ "! Prompt definition (used when type is LLM) + prompt_definition TYPE ty_prompt_definition, + "!

JSON Definition

+ "! JSON definition (used when type is JSON) + json_definition TYPE ty_json_definition, + "!

Assigned Queries

+ "! Assigned queries + assigned_queries TYPE ty_assigned_queries, + END OF ty_main. + +ENDINTERFACE. diff --git a/file-formats/abiq/type/zif_aff_abiq_v1.intf.json b/file-formats/abiq/type/zif_aff_abiq_v1.intf.json new file mode 100644 index 000000000..4d5d47b47 --- /dev/null +++ b/file-formats/abiq/type/zif_aff_abiq_v1.intf.json @@ -0,0 +1,7 @@ +{ + "formatVersion": "1", + "header": { + "description": "AFF Type for ABIQ", + "originalLanguage": "en" + } +}