"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.setAssociationKeyword = setAssociationKeyword;
/**
 * when a child sends an "outgoing" request or accepts an
 * "incoming" request for association, the child "references"
 * the parent via a typeKeyword (ref|<type>|<id>)
 *
 * @param typeKeywords - the child entity's typeKeywords
 * @param type - the parent entity's type
 * @param id - the parent entity's id
 * @returns {string[]}
 */
function setAssociationKeyword(typeKeywords, type, id) {
    const keyword = `ref|${type}|${id}`;
    if (!typeKeywords.includes(keyword)) {
        typeKeywords = [...typeKeywords, keyword];
    }
    return typeKeywords;
}
//# sourceMappingURL=setAssociationKeyword.js.map