UNPKG

grafo-client

Version:

Grafo Client API Library

1 lines 4.03 kB
const CrudOperand=Object.freeze({CONCEPT:{code:1,name:"Concept",name_es:"Concepto",name_fr:"Concept"},RELATIONSHIP:{code:2,name:"Relationship",name_es:"Relación",name_fr:"Relation"},ATTRIB_GROUP:{code:3,name:"Attribute Group",name_es:"Grupo de atributos",name_fr:"Pas de traduction"},CONCEPT_ATTRIB:{code:4,name:"Concept Attribute",name_es:"Atributo del concepto",name_fr:"Pas de traduction"},RELATIONSHIP_ATTRIB:{code:5,name:"Relationship Attribute",name_es:"Atributo de relación",name_fr:"Pas de traduction"},CONCEPT_FIELD:{code:6,name:"Concept Field",name_es:"Campo conceptual",name_fr:"Pas de traduction"},RELATIONSHIP_FIELD:{code:7,name:"Relationship Field",name_es:"Campo de relacion",name_fr:"Pas de traduction"},CONCEPT_ATTRIB_FIELD:{code:8,name:"Concept Attribute Field",name_es:"Campo de atributo de concepto",name_fr:"Pas de traduction"},RELATIONSHIP_ATTRIB_FIELD:{code:9,name:"Relationship Attribute Field",name_es:"Campo de atributo de relación",name_fr:"Pas de traduction"},CONCEPT_MAPPING:{code:10,name:"Concept Mapping",name_es:"Mapeo Conceptual",name_fr:"Pas de traduction"},RELATIONSHIP_MAPPING:{code:11,name:"Relationship Mapping",name_es:"Mapeo de relaciones",name_fr:"Pas de traduction"},CONCEPT_ATTRIB_MAPPING:{code:12,name:"Concept Attribute Mapping",name_es:"Mapeo de atributos conceptuales",name_fr:"Pas de traduction"},RELATIONSHIP_ATTRIB_MAPPING:{code:13,name:"Relationship Attribute Mapping",name_es:"Mapeo de atributos de relaciones",name_fr:"Pas de traduction"},MAPPING:{code:14,name:"Mapping",name_es:"Mapeo",name_fr:"Pas de traduction"}}),OpType=Object.freeze({NOP:{code:0,name:"No op"},FETCH_ONE:{code:1,name:"Fetch One"},FETCH_MANY:{code:2,name:"Fetch Many"},ADD:{code:3,name:"Add"},UPDATE:{code:4,name:"Update"},ADD_UPDATE:{code:5,name:"Add or Update"},DELETE:{code:6,name:"Delete"}}),ErrorLevel=Object.freeze({INFO:1,WARNING:2,ERROR:3,SEVERE:4}),ErrorMsgDefinition=Object.freeze({BOILERPLATE_ERROR:{code:999,messageTemplate:"Oops some error occured. Please try again"},BOILERPLATE_VALIDATION_ERROR:{code:998,messageTemplate:"There was some error in your request. We could not identify, but we are working on it"},BOILERPLATE_DUP_ENTITY_ERROR:{code:949,messageTemplate:"The entity you are trying to add/update/delete already exists"},BOILERPLATE_NONEXISTENT_ENTITY_ERROR:{code:946,messageTemplate:"The entity you are trying to update/delete does not exist"},BOILERPLATE_NONEXISTENT_SUB_ENTITY_ERROR:{code:945,messageTemplate:"The entity you are trying to update/delete does not exist"},DUPLICATE_ENTITY_ID:{code:101,messageTemplate:"The {operand} with {id} you are trying to {op} already exists"},DUPLICATE_ENTITY_NAME:{code:102,messageTemplate:"The {operand} with {name} you are trying to {op} already exists"},DUPLICATE_ENTITY_ID_NAME:{code:103,messageTemplate:"The {operand} with {name} and {id} you are trying to {op} already exists"},NONEXISTENT_ENTITY_NONE:{code:120,messageTemplate:"{operand} is invalid or {operand} does not exist"},NONEXISTENT_ENTITY_ID:{code:121,messageTemplate:"The {operand} with {id} you are trying to {op} is invalid or does not exist"},NONEXISTENT_ENTITY_NAME:{code:122,messageTemplate:"The {operand} with {name} you are trying to {op} is invalid or does not exist"},NONEXISTENT_ENTITY_ID_NAME:{code:123,messageTemplate:"The {operand} with {name} and {id} you are trying to {op} is invalid or does not exist"},NONEXISTENT_SUB_ENTITY_NONE:{code:140,messageTemplate:"No {subOperand} {subOptype}d. {operand} does not have {subOperand}"},NONEXISTENT_SUB_ENTITY_ID:{code:141,messageTemplate:"The {operand} does not have {subOperand} with {id} that you are trying to {op}"},NONEXISTENT_SUB_ENTITY_NAME:{code:142,messageTemplate:"The {operand} does not have {subOperand} with {name} you are trying to {op}"},NONEXISTENT_SUB_ENTITY_ID_NAME:{code:143,messageTemplate:"The {operand} does not have {subOperand} with {name} and {id} you are trying to {op}"}});module.exports={CrudOperand:CrudOperand,OpType:OpType,ErrorLevel:ErrorLevel,ErrorMsgDefinition:ErrorMsgDefinition};