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

activitylib

v1.9.0

Published

Pacote responsável por registrar dados de atividade do usuário

Downloads

13

Readme

ActivityLib

Pacote para utilização nos sitemas para registrar atividades dos usuários

userid: UID do usuário (1)
collaboratorId: ID do colaborador
contentType: Tipo de conteúdo (7)
contentId: ID do conteúdo (4)
contentTranslated: Se o conteúdo é traduzido (true/false)
languageTranslated: Idioma para qual o conteudo foi traduzido (5)
contentPage: Tipo de página (1)
contentAction: Ação feita no conteúdo
contentTitle: Titulo do conteudo (4)
contentAuthors: Autores do conteúdo
termSearched: Termo buscado (2)
contentCategories: Categorias do conteúdo
contentTags: Tags do conteúdo
contentViewTime: Tempo de visualização do conteúdo em segundos (int) (1)
contentViewMode: Tipo de visualização da listagem de conteúdo (6)
contentSort: Conteúdo ordenado (true/false)
contentSortType: Tipo de ordenação (5)
contentFilter: Conteúdo filtrado (true/false)
contentFilterValue: Valor do filtro (5)
socialNetworkShared: Rede social que será compartilhado (3)
device: Dispositivo que ocorreu a ação (1)
deviceOS: Sistema operacional do dispositivo (1)
deviceOSVersion: Versão do sistema operacional do dispositivo (1)
createdAt: Data da criação do registro (1)
(1) Campos obrigatório
(2) Obrigatório caso PAGES_ENUM for igual a SEARCH
(3) Obrigatório caso ACTION_ENUM for igual a SHARE
(4) Obrigatório caso PAGES_ENUM for igual a VIEW
(5) Obrigatório caso campo pai booleano seja true
(6) Obrigatório caso PAGES_ENUM for igual a LIST
(7) Obrigatório caso PAGES_ENUM for diferente de STATIC

Utilização

npm i --save activitylib
const activity = require("activitylib");

activity.log("<URL>", {
  userid: "8ebb2711-e1be-4837-b5a7-e277d94bd93f",
  contentType: activity.CONTENT_ENUM.NEWS,
  contentPage: activity.PAGES_ENUM.VIEW,
  contentTitle: "Content title",
  contentViewTime: 180,
});

ENUMs:

const CONTENT_ENUM = {
  SCIENTIFIC: "SCIENTIFIC",
  NEWS: "NEWS",
  MATTERS: "MATTERS",
  COURSES: "COURSES",
  EVENTS: "EVENTS",
  PUBLIC_TENDER: "PUBLIC_TENDER",
  BULAR: "BULAR",
  CALCULATOR: "CALCULATOR",
  CID10: "CID10",
  SUS: "SUS",
  MBE_ATALLAH: "MBE_ATALLAH",
  EMC_MODULE: "EMC_MODULE",
  EMC_PAGE: "EMC_PAGE",
  EMC_QUESTION: "EMC_QUESTION",
  BOOKS: "BOOKS",
  EVERY: "EVERY",
};

const PAGES_ENUM = {
  HOME: "HOME",
  LIST: "LIST",
  VIEW: "VIEW",
  SEARCH: "SEARCH",
  FILTER: "FILTER",
  FAVORITES: "FAVORITES",
  STATIC: "STATIC",
  COLLABORATOR: "COLLABORATOR",
};

const ACTIONS_ENUM = {
  SORT: "SORT",
  FILTER: "FILTER",
  LIKE: "LIKE",
  DISLIKE: "DISLIKE",
  SHARE: "SHARE",
  FAVORITE: "FAVORITE",
  DISFAVORITE: "DISFAVORITE",
  CLICK: "CLICK",
  VIEW_MODE: "VIEW_MODE",
  CLICK_BIO: "CLICK_BIO",
};

const VIEWS_MODE_ENUM = {
  CARD: "CARD",
  LIST: "LIST",
  MAGAZINE: "MAGAZINE",
  ARTICLE: "ARTICLE",
};

const SHARED_SOCIAL_NETWORKS = {
  FACEBOOK: "FACEBOOK",
  TWITTER: "TWITTER",
  LINKEDIN: "LINKEDIN",
  WHATSAPP: "WHATSAPP",
};

const DEVICES = {
  WEB: "WEB",
  APP: "APP",
  PHONE: "PHONE",
  TABLET: "TABLET",
};

const DEVICE_OS = {
  ANDROID: "ANDROID",
  IOS: "IOS",
  OTHER: "OTHER",
};