SuperAPI AI Directory

meta-compile

General & other

View repository

Updated 10-16 16:13

About this skill

/meta-compile — generation of metadata objects from JSON DSL

Accepts a JSON definition of a metadata object → generates XML + modules in the configuration dump structure + registers in Configuration.xml.

Parameters and command

Parameter Description
JsonPath Path to the JSON definition of the object
OutputDir Root directory of the configuration dump (where Catalogs/, Documents/ и т.д.)
powershell.exe -NoProfile -File .claude/skills/meta-compile/scripts/meta-compile.ps1 -JsonPath "<json>" -OutputDir "<ConfigDir>"

OutputDir — the directory containing type subfolders (Catalogs/, Documents/, ...) и Configuration.xml.

Supported types (23)

Reference

Catalog, Document, Enum, ExchangePlan, ChartOfAccounts, ChartOfCharacteristicTypes, ChartOfCalculationTypes, BusinessProcess, Task

Registers

InformationRegister, AccumulationRegister, AccountingRegister, CalculationRegister

Reports/DataProcessors

Report, DataProcessor

Service

Constant, DefinedType, CommonModule, ScheduledJob, EventSubscription, DocumentJournal, HTTPService, WebService

JSON DSL — quick reference

Full specification: docs/meta-dsl-spec.md.

Root structure

{
  "type": "Catalog",
  "name": "Номенклатура",
  "synonym": "авто из name",
  ...type-specific...,
  "attributes": [...],
  "tabularSections": {...}
}

Attributes — shorthand

"ИмяРеквизита"                     — String без квалификаторов
"ИмяРеквизита: Тип"                — с типом
"ИмяРеквизита: Тип | req, index"  — с флагами

Types: String(100), Number(15,2), Boolean, Date, DateTime, CatalogRef.Xxx, DocumentRef.Xxx, EnumRef.Xxx, ChartOfAccountsRef.Xxx, ChartOfCharacteristicTypesRef.Xxx, ChartOfCalculationTypesRef.Xxx, ExchangePlanRef.Xxx, BusinessProcessRef.Xxx, TaskRef.Xxx, DefinedType.Xxx.

Russian synonyms of types: Строка, Число, Булево, Дата, СправочникСсылка.Xxx, ДокументСсылка.Xxx, ПланСчетовСсылка.Xxx.

Flags: req, index, indexAdditional, nonneg, master, mainFilter, denyIncomplete, useInTotals.

Examples

Catalog

{ "type": "Catalog", "name": "Валюты" }

Enumeration

{ "type": "Enum", "name": "Статусы", "values": ["Новый", "Закрыт"] }

Constant

{ "type": "Constant", "name": "ОсновнаяВалюта", "valueType": "CatalogRef.Валюты" }

Defined type

{ "type": "DefinedType", "name": "ДенежныеСредства", "valueTypes": ["CatalogRef.БанковскиеСчета", "CatalogRef.Кассы"] }

Common module

{ "type": "CommonModule", "name": "ОбменДаннымиСервер", "context": "server", "returnValuesReuse": "DuringRequest" }

Context shortcuts: "server" → Server+ServerCall, "client" → ClientManagedApplication, "serverClient" → Server+ClientManagedApplication.

Information register

{
  "type": "InformationRegister", "name": "КурсыВалют", "periodicity": "Day",
  "dimensions": ["Валюта: CatalogRef.Валюты | master, mainFilter, denyIncomplete"],
  "resources": ["Курс: Number(15,4)", "Кратность: Number(10,0)"]
}

Exchange plan

{ "type": "ExchangePlan", "name": "ОбменССайтом", "attributes": ["АдресСервера: String(200)"] }

Document journal

{
  "type": "DocumentJournal", "name": "Взаимодействия",
  "registeredDocuments": ["Document.Встреча", "Document.ТелефонныйЗвонок"],
  "columns": [{ "name": "Организация", "indexing": "Index", "references": ["Document.Встреча.Attribute.Организация"] }]
}

HTTP service

{
  "type": "HTTPService", "name": "API", "rootURL": "api",
  "urlTemplates": { "Users": { "template": "/v1/users", "methods": { "Get": "GET", "Create": "POST" } } }
}

Web service

{
  "type": "WebService", "name": "DataExchange", "namespace": "http://www.1c.ru/DataExchange",
  "operations": { "TestConnection": { "returnType": "xs:boolean", "handler": "ПроверкаПодключения", "parameters": { "ErrorMessage": { "type": "xs:string", "direction": "Out" } } } }
}

Chart of accounts

{
  "type": "ChartOfAccounts", "name": "Хозрасчетный",
  "extDimensionTypes": "ChartOfCharacteristicTypes.ВидыСубконто", "maxExtDimensionCount": 3,
  "codeMask": "@@@.@@.@", "codeLength": 8,
  "accountingFlags": ["Валютный", "Количественный"],
  "extDimensionAccountingFlags": ["Суммовой", "Валютный"]
}

Business process

{ "type": "BusinessProcess", "name": "Задание", "attributes": ["Описание: String(200)"] }

What is generated

  • {OutputDir}/{TypePlural}/{Name}.xml — object metadata
  • {OutputDir}/{TypePlural}/{Name}/Ext/ObjectModule.bsl — object module (Catalog, Document, Report, DataProcessor, ExchangePlan, ChartOfAccounts, ChartOfCharacteristicTypes, ChartOfCalculationTypes, BusinessProcess, Task)
  • {OutputDir}/{TypePlural}/{Name}/Ext/RecordSetModule.bsl — record set module (4 register types)
  • {OutputDir}/{TypePlural}/{Name}/Ext/Module.bsl — module (CommonModule, HTTPService, WebService)
  • {OutputDir}/{TypePlural}/{Name}/Ext/Content.xml — composition of the exchange plan (ExchangePlan)
  • {OutputDir}/{TypePlural}/{Name}/Ext/Flowchart.xml — route map (BusinessProcess)
  • Configuration.xml — automatic registration in <ChildObjects>

Verification

/meta-info <OutputDir>/<TypePlural>/<Name>.xml    — проверка структуры