Using It

This page will guide you through an example, highlighting the unique aspects of Itergia Core.

Writing a YAML Schema

The schema describes the object types (also known as document types) that can be stored together. It defines intents that can be used to mutate the objects, referencing a JavaScript file.

We need to give the schema a name, and a version number to support distributed upgrades.

Stable identifiers are supported by name: these are returned to the caller, and available in the intent's mutator.

---
format: 1

name: schema.example.com/todo
version: 1
proto_file: todo.proto

mutators:
  java_script:
    script_file: todo.mutator.js
    script_type: ECMA_MODULE_2021

object_types:
- name: List
  message_name: todo.List

intents:
- name: createList
  message_name: todo.CreateListParameters
  generated_ids:
    list: { length: 16 }

- name: addItem
  message_name: todo.AddItemParameters
  generated_ids:
    item: { length: 8 }

# The other intents left out.