- Cria modelo LeadClick para registrar cliques das landing pages - Cria modelo LandingHost para mapear hostname → inbox_id - Endpoint público POST /track/click para receber eventos de clique - Leads::AttributionMatcherService para correlacionar clique com conversa - Integração com IncomingMessageWuzapiService para atribuição automática - API REST para gerenciar LandingHosts por inbox (index/create/destroy) - UI: nova aba 'Landing Pages' nas configurações da caixa de entrada - Dashboard API client dedicado (landingHosts.js) - RuboCop: refatora shift_signature_name, TrackingController, AttributionMatcherService e WuzapiService
22 lines
560 B
JavaScript
22 lines
560 B
JavaScript
// API client para LandingHosts da caixa de entrada
|
|
/* global axios */
|
|
|
|
export default {
|
|
getHosts(accountId, inboxId) {
|
|
return axios.get(
|
|
`/api/v1/accounts/${accountId}/inboxes/${inboxId}/landing_hosts`
|
|
);
|
|
},
|
|
createHost(accountId, inboxId, data) {
|
|
return axios.post(
|
|
`/api/v1/accounts/${accountId}/inboxes/${inboxId}/landing_hosts`,
|
|
{ landing_host: data }
|
|
);
|
|
},
|
|
deleteHost(accountId, inboxId, id) {
|
|
return axios.delete(
|
|
`/api/v1/accounts/${accountId}/inboxes/${inboxId}/landing_hosts/${id}`
|
|
);
|
|
},
|
|
};
|