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 🙏

© 2026 – Pkg Stats / Ryan Hefner

@astralibx/call-log-types

v0.3.0

Published

Shared TypeScript type definitions, enums, and contracts for the call-log module

Readme

@astralibx/call-log-types

npm version License: MIT

Shared TypeScript type definitions, enums, and contracts for the call-log module.

Install

npm install @astralibx/call-log-types

No runtime dependencies -- pure TypeScript declarations and enums.

Enums

| Enum | Values | Description | |------|--------|-------------| | CallDirection | Inbound, Outbound | Direction of the call | | CallPriority | Low, Medium, High, Urgent | Priority level for a call log | | TimelineEntryType | Note, StageChange, Assignment, FollowUpSet, FollowUpCompleted, System | Type of timeline entry |

Enum values

import { CallDirection, CallPriority, TimelineEntryType } from '@astralibx/call-log-types';

CallDirection.Inbound    // 'inbound'
CallDirection.Outbound   // 'outbound'

CallPriority.Low         // 'low'
CallPriority.Medium      // 'medium'
CallPriority.High        // 'high'
CallPriority.Urgent      // 'urgent'

TimelineEntryType.Note              // 'note'
TimelineEntryType.StageChange       // 'stage_change'
TimelineEntryType.Assignment        // 'assignment'
TimelineEntryType.FollowUpSet       // 'follow_up_set'
TimelineEntryType.FollowUpCompleted // 'follow_up_completed'
TimelineEntryType.System            // 'system'

Interfaces

| Interface | Source | Description | |-----------|--------|-------------| | IPipeline | pipeline.types | Pipeline with stages, active/default flags, tenant scoping | | IPipelineStage | pipeline.types | Single stage: name, color, order, isTerminal, isDefault | | ICallLog | call-log.types | Call log with contact ref, pipeline/stage, timeline, stage history, follow-up, channel, outcome, isFollowUp, soft delete | | IContactRef | call-log.types | Embedded contact reference: externalId, displayName, phone, email | | IStageChange | call-log.types | Stage transition record with from/to IDs, names, timestamps, time-in-stage | | ITimelineEntry | call-log.types | Single timeline entry: type, content, author, stage/agent change details | | ICallLogSettings | settings.types | Global settings: tags, categories, priority levels, follow-up defaults, availableChannels, availableOutcomes | | IPriorityConfig | settings.types | Priority level config: value, label, color, order | | AgentInfo | adapter.types | Agent reference: agentId, displayName, avatar, teamId | | ContactInfo | adapter.types | Contact lookup result: externalId, displayName, phone, email | | AuthResult | adapter.types | Authentication result: adminUserId, displayName, role (optional, for agent-scoping bypass) | | CallLogEngineConfig | config.types | Full engine configuration: db, logger, agents, adapters, hooks, options (includes enableAgentScoping) | | ResolvedOptions | config.types | Resolved options with defaults applied | | CallLogMetric | analytics.types | Metric event: name, labels, value | | DateRange | analytics.types | Date range filter: from, to | | AgentCallStats | analytics.types | Agent performance stats | | PipelineStageStats | analytics.types | Per-stage stats with avg time and conversion rate | | PipelineReport | analytics.types | Pipeline report with stage breakdown and bottleneck | | PipelineFunnel | analytics.types | Pipeline funnel with entered/exited/dropOff per stage | | DailyReport | analytics.types | Daily report by direction, pipeline, agent | | OverallCallReport | analytics.types | Overall stats: totals, avg close time, compliance, distributions | | WeeklyTrend | analytics.types | Weekly trend with direction and pipeline breakdown | | DashboardStats | analytics.types | Quick dashboard counters: open, closed today, overdue, agents | | ExportFilter | analytics.types | Export filter options | | ExportFormat | analytics.types | Export format type: 'json' \| 'csv' | | ChannelDistribution | analytics.types | Channel breakdown entry: { channel: string, count: number } | | OutcomeDistribution | analytics.types | Outcome breakdown entry: { outcome: string, count: number } | | FollowUpStats | analytics.types | Follow-up ratio stats: { followUpCalls: number, totalCalls: number, followUpRatio: number } |

Phase 2 Fields

ICallLog

| Field | Type | Description | |-------|------|-------------| | channel | string | Communication channel for the call (phone, whatsapp, telegram, etc.) | | outcome | string | Result of the call (interested, not_interested, no_answer, etc.) | | isFollowUp | boolean | Marks the call as a follow-up rather than a fresh outreach | | isDeleted | boolean | Soft delete flag — excluded from all queries and analytics by default | | deletedAt | Date? | Timestamp set when the call is soft-deleted |

ICallLogSettings

| Field | Type | Description | |-------|------|-------------| | availableChannels | string[] | Admin-configurable list of channel options shown in the UI | | availableOutcomes | string[] | Admin-configurable list of outcome options shown in the UI |

CallLogEngineConfig options

| Option | Type | Default | Description | |--------|------|---------|-------------| | enableAgentScoping | boolean | true | When true, non-owner staff see only their own calls; owners see everything |

AuthResult

| Field | Type | Description | |-------|------|-------------| | role | string? | Agent role returned by authenticateAgent. Owners are excluded from agent-scoped filtering when role indicates ownership. |

Usage

import type { ICallLog, IPipeline, ITimelineEntry, CallLogEngineConfig } from '@astralibx/call-log-types';
import { CallDirection, CallPriority, TimelineEntryType } from '@astralibx/call-log-types';

// Type a call log
const call: ICallLog = {
  callLogId: '...',
  pipelineId: '...',
  currentStageId: '...',
  contactRef: { externalId: 'c1', displayName: 'John Doe' },
  direction: CallDirection.Inbound,
  callDate: new Date(),
  priority: CallPriority.High,
  agentId: '...',
  tags: ['vip'],
  timeline: [],
  stageHistory: [],
  isClosed: false,
  createdAt: new Date(),
  updatedAt: new Date(),
};

Links

License

MIT