npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@cccuno/call-widget-client

v0.3.0

Published

![Logo CCC](https://app.ccc.uno/images/LogoCCC-Landscape.png?v=2)

Downloads

983

Readme

Logo CCC

CCC Widget Client

CCC Widget Client es un plugin que te permite integrar un widget en tu aplicación para realizar llamadas a la plataforma CCC Uno. Con este widget, puedes incrustar la funcionalidad de la plataforma sin necesidad de estar directamente en la aplicación.

Instalación

Usando npm

Para instalar el plugin, usa npm:

npm install @ccc/call-widget-client

Usando yarn

Si prefieres usar yarn, puedes instalar el plugin con el siguiente comando:

yarn add @ccc/call-widget-client

Uso

Para utilizar el widget en tu aplicación, primero debes importarlo y luego inicializarlo con los parámetros deseados. A continuación se muestra un ejemplo de cómo hacerlo.

Importar el Widget

En tu archivo JavaScript o TypeScript, importa la función CCCWidgetInit del plugin:

import { CCCWidgetInit } from '@ccc/call-widget-client';

Inicializar el Widget

Llama a la función CCCWidgetInit para crear e insertar el iframe del widget en tu página. Puedes pasarle un objeto de parámetros para configurar el widget.

// Configuración del widget
CCCWidgetInit({
  top: '500px';
});

Si no proporcionas ningún parámetro, el widget utilizará los valores predeterminados:

CCCWidgetInit();

Parámetros

Parámetros de CCCWidgetInit

Parámetros de CCCWidgetInit

| Parámetro | Tipo | Valor por Defecto | Descripción | |------------|---------------------|-------------------|-----------------------------------------------------------------------------| | top | string | 50vh | Posición top del elemento en la pantalla. | | onCall | function(data: any)| undefined | Función callback que se ejecuta cuando se inicia una llamada. Recibe un objeto data con los detalles de la llamada como parámetro. |

Payload de la llamada

Detalles del Payload

  • call_details: Contiene información sobre la llamada, como el ID de usuario, ID de llamada, tipo de llamada (inbound/outbound), nombre de la campaña, etc.

  • call_notes: Es un array de objetos, cada uno representando una nota relacionada con la llamada, incluyendo la disposición, usuario que dejó la nota, y un timestamp.

  • references: Esta es una lista que puede contener los campos personalizados de la lista de leads.

Ejemplo

Usando CDN

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>CCC Widget Example</title>
</head>
<body>
  <script type="module">
    import { CCCWidgetInit } from 'https://unpkg.com/@cccuno/call-widget-client@latest/dist/widget-client.js';

    CCCWidgetInit({
      top: '500px',
      onCall: (data) => {
          console.log('call info', data)
        }
    });
  </script>
</body>
</html>