Skip to content
This repository has been archived by the owner on Oct 5, 2020. It is now read-only.

rhases/rh-transformer

Repository files navigation

Rh-transformer

Specify schema transformations with JSON. Transform in both directions. Transform and check for updates then patch locally.

var transformations = { Persons:{ local:'Deal', remote: 'Persons', fields: [ {local: 'pipedrive.person_id', remote:'id', policy: 'remote', isId:true}, //to pipedrive {local: 'name', remote:'name', policy: 'local'}, {local: 'phone', remote:'phone', policy: 'local', createOnly:true}, {local: 'email', remote:'email', policy: 'local', createOnly:true}, {local: 'pipedrive.deal_owner_id', remote:'owner_id', policy: 'local', createOnly:true}, {local: 'pipedrive.followers', remote: 'followers', policy: 'local', createOnly:true } ] },

transformOut

var transport = transportOut(transformations.Persons.fields, localDeal, {}); });

transformIn

var transport = transportIn(model.Persons.fields, pdDeal, {});

Rhases - Encontre, compare contrate o melhor plano de saúde pra você

About

Transformer between JSON schemas/APIs

Resources

License

Stars

Watchers

Forks

Packages

No packages published