Integreat
  • Integreat
  • Introduction
    • Motivation
    • Philosophy
    • Core Concepts
    • Examples
  • Basics
  • Advanced topics
    • Writing adapters
      • Adapter interface
      • Request objects
      • Response objects
    • Writing authenticators
      • Authenticator interface
  • Reference
    • Schema definitions
    • Service definitions
    • Mapping definitions
    • Endpoint definitions
Powered by GitBook
On this page
  • Mapping defintion properties
  • id
  • schema
  • mapping
  1. Reference

Mapping definitions

PreviousService definitionsNextEndpoint definitions

Last updated 5 years ago

To specify how data from a service is mapped and transformed to a schema – and how to map and transform it back to the service – you set up a mapping definition, potentially with transform functions.

Note that mappings will be used to map data both from and to a service, and in the description below, we'll explain how this happens.

This is the full mapping definition:

{
  id: <string>,
  schema: <schema id>,
  mapping: <mapping definition>
}

Mapping defintion properties

id

Optional unique id for a mapping definition. This is the id referenced from a service definition, but is not needed when a mapping is defined directly on the service.

schema

The id of the target schema. Optional at this point, might be required in the future.

mapping

This is the actual mapping definition, in the format of , either a mutation object or a mutation pipeline.

<examples>

This mapping definition may reference transform functions and mapping pipelines. These are provided to Integreat.create() as transforms and mappings.

MapTransform