UNPKG

@targetprocess/sync-shared-model

Version:

Shared model for Targetprocess entity sync

21 lines 851 B
"use strict"; function __export(m) { for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; } Object.defineProperty(exports, "__esModule", { value: true }); __export(require("./fields")); __export(require("./constants")); var RelationDirection; (function (RelationDirection) { RelationDirection["Inbound"] = "Inbound"; RelationDirection["Outbound"] = "Outbound"; })(RelationDirection = exports.RelationDirection || (exports.RelationDirection = {})); function getEntityIdentity(entity, tool) { return `${getToolIdentity(tool)}:${entity.entityType.toLowerCase()}:${entity.sourceId.toLowerCase()}`; } exports.getEntityIdentity = getEntityIdentity; function getToolIdentity(tool) { return `${tool.type.toLowerCase()}:${tool.id.toLowerCase()}`; } exports.getToolIdentity = getToolIdentity; //# sourceMappingURL=index.js.map