UNPKG

nestwhats

Version:

A whatsapp-web.js wrapper for NestJS to create WhatsApp bots

20 lines (19 loc) 670 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.NestWhatsParamsFactory = void 0; const nestwhats_paramtype_enum_1 = require("./nestwhats-paramtype.enum"); class NestWhatsParamsFactory { exchangeKeyForValue(type, data, args) { if (!args) return null; switch (type) { case nestwhats_paramtype_enum_1.NestWhatsParamType.CONTEXT: return args[0]; case nestwhats_paramtype_enum_1.NestWhatsParamType.DISCOVERY: return args[1]; default: return null; } } } exports.NestWhatsParamsFactory = NestWhatsParamsFactory;