SuperAPI AI Directory

meta-compile

General & other

View repository

Updated 10-15 21:33

About this skill

/meta-compile — generation of metadata objects from JSON

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

ConfigDumpInfo.xml is intentionally left untouched: it is a service file of object versions managed by the platform (for incremental dump).

Workflow

  1. Compose JSON according to the syntax below → write it to a temporary file.
  2. Run the script.
  3. Modify the created object — /meta-edit; check — /meta-validate.
powershell.exe -NoProfile -File "${CLAUDE_SKILL_DIR}/scripts/meta-compile.ps1" -JsonPath "<json>" -OutputDir "<ConfigDir>"
Parameter Description
JsonPath Path to the JSON file
OutputDir Configuration dump root (where Configuration.xml, Catalogs/, Documents/, …)

JSON format

Single object { ... } or array of objects [{ ... }, { ... }] (batch — several objects per run).

{ "type": "Catalog", "name": "Номенклатура", "...свойства типа...": "..." }

type и name — required. The rest — by type (see the index below). synonym is by default derived from name (CamelCase → words separated by spaces); it can be set explicitly as a string or in multiple languages: "synonym": { "ru": "…", "en": "…" }.

Attributes (shorthand)

Arrays attributes, dimensions, resources and columns in tabularSections are specified as strings:

"Имя"                          → String(10)
"Имя: Тип"                     → с типом
"Имя: Тип | req, index"        → с флагами

Types: String(100), String(10, fixed) (fixed length), Number(15,2), Boolean, Date, DateTime, Time, reference CatalogRef.Xxx / DocumentRef.Xxx / EnumRef.Xxx / DefinedType.Xxx etc. Composite type — via +: "Значение: String + Number(15,2) + CatalogRef.Контрагенты".

Flags (after |, comma-separated):

Flag Value Where
req required filling attributes, dimensions, resources
index index attributes, dimensions
indexAdditional index with additional ordering attributes
multiline multiline field attributes
nonneg non-negative (Number) attributes, resources
master leading dimension dimensions (registers)
mainFilter main filter dimensions (registers)
denyIncomplete prohibit empty values dimensions
useInTotals use in totals dimensions (accumulation register)

An attribute needs properties beyond shorthand (fill value, choice parameters, format, tooltip, …) — specified by the object form, see reference/attributes.md.

Tabular sections

"tabularSections": { "Товары": ["Номенклатура: CatalogRef.Номенклатура", "Количество: Number(15,3)"] }

Key — tabular section name, value — array of columns (shorthand) OR an object with tabular section properties (see reference/attributes.md).

Index: properties by type

For each type — its own reference file with properties, defaults, and allowed values:

Type(s) File
Catalog (reference book) reference/catalog.md
Document, DocumentJournal, Sequence, DocumentNumerator reference/document.md
InformationRegister, AccumulationRegister, AccountingRegister, CalculationRegister reference/registers.md
ChartOfAccounts, ChartOfCharacteristicTypes, ChartOfCalculationTypes reference/charts.md
ExchangePlan reference/exchangeplan.md
BusinessProcess, Task reference/process.md
Report, DataProcessor reference/report-dataprocessor.md
CommonModule, ScheduledJob, EventSubscription reference/code.md
HTTPService, WebService reference/web.md
Enum, Constant, DefinedType reference/simple.md
ExternalDataSource (external data source) reference/external-data-source.md
FunctionalOption, FilterCriterion, SettingsStorage, CommonForm, CommonPicture, CommonTemplate, service ones reference/other-types.md

Cross-type details:

  • reference/attributes.md — object form of an attribute and tabular section column (fill value, choice parameters, format, tooltip, bounds, …) + properties of the tabular section itself.
  • reference/blocks.md — object blocks: representations, commands (+ characteristics/standard attributes).

This instruction and the reference files are the complete documentation. Do not look for XML examples in configuration dumps.

Examples

Catalog with attributes:

{ "type": "Catalog", "name": "Организации", "descriptionLength": 100,
  "attributes": ["ИНН: String(12)", "КПП: String(9)", "Директор: CatalogRef.ФизическиеЛица"] }

Document with movements and tabular sections:

{ "type": "Document", "name": "ПриходнаяНакладная",
  "registerRecords": ["AccumulationRegister.ОстаткиТоваров"],
  "attributes": ["Организация: CatalogRef.Организации", "Контрагент: CatalogRef.Контрагенты"],
  "tabularSections": { "Товары": ["Номенклатура: CatalogRef.Номенклатура", "Количество: Number(15,3)", "Цена: Number(15,2)"] } }

Information register:

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

Batch:

[ { "type": "Enum", "name": "Статусы", "values": ["Новый", "Закрыт"] },
  { "type": "Catalog", "name": "Валюты" },
  { "type": "Constant", "name": "ОсновнаяВалюта", "valueType": "CatalogRef.Валюты" } ]