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

@imalec/resolvai-types

v1.0.3

Published

Resolvai Types - Shared type definitions for ResolvAI ecosystem

Readme

@imalec/resolvai-types

ResolvAI Types - Shared type definitions for the ResolvAI ecosystem.

📦 Installation

npm install @imalec/resolvai-types
# or
yarn add @imalec/resolvai-types
# or
pnpm add @imalec/resolvai-types

🚀 Usage

Basic Import

import { ResolvAITask, ResolvAIMessage, ResolvAIEvent } from '@imalec/resolvai-types';

Type Definitions

ResolvAI Task

import { ResolvAITask, ResolvAITaskStatus, ResolvAITaskPriority } from '@imalec/resolvai-types';

const task: ResolvAITask = {
  id: 'task-123',
  title: 'Call Restaurant',
  description: 'Call the restaurant to make a reservation',
  status: 'completed',
  priority: 'high',
  tags: ['phone', 'reservation'],
  createdAt: new Date(),
  updatedAt: new Date(),
  completedAt: new Date(),
  toolCall: {
    id: 'tool-call-123',
    name: 'make_phone_call',
    args: {
      businessName: 'Pizza Palace',
      phoneNumber: '+1-555-0123',
      inquiryType: 'reservation',
    },
    timestamp: new Date(),
  },
  result: {
    businessName: 'Pizza Palace',
    phoneNumber: '+1-555-0123',
    inquiryType: 'reservation',
    duration: 120,
    recordingUrl: 'https://api.twilio.com/...',
  },
};

ResolvAI Message

import { ResolvAIMessage, ResolvAIMessageRole } from '@imalec/resolvai-types';

const message: ResolvAIMessage = {
  id: 'msg-123',
  role: 'user',
  parts: [
    {
      type: 'text',
      text: 'I need to call Pizza Palace to make a reservation',
    },
  ],
  createdAt: new Date(),
  turnId: 1,
  taskId: 'task-123',
};

ResolvAI Event

import { ResolvAIEvent, ResolvAIEventType } from '@imalec/resolvai-types';

const event: ResolvAIEvent = {
  id: 'event-123',
  type: 'call_started',
  title: 'Call Started',
  description: 'Started calling Pizza Palace',
  createdAt: new Date(),
  taskId: 'task-123',
  data: {
    duration: 120,
    recordingUrl: 'https://api.twilio.com/...',
  },
};

ResolvAI Google Event

import { ResolvAIGoogleEvent } from '@imalec/resolvai-types';

const googleEvent: ResolvAIGoogleEvent = {
  id: 'google-event-123',
  title: 'Team Meeting',
  description: 'Weekly team sync',
  source: 'Google Calendar',
  startTime: '2024-01-15T10:00:00Z',
  endTime: '2024-01-15T11:00:00Z',
  hasMeeting: true,
  meetingUrl: 'https://meet.google.com/abc-defg-hij',
  location: 'Conference Room A',
  attendees: ['[email protected]', '[email protected]'],
  isAllDay: false,
  isExpired: false,
  timeDistance: '2 hours ago',
  updatedAt: new Date(),
};

API Response Types

import {
  ResolvAIAPIResponse,
  ResolvAITaskListResponse,
  ResolvAITaskDetailResponse,
} from '@imalec/resolvai-types';

// Generic API response
const response: ResolvAIAPIResponse<ResolvAITask> = {
  success: true,
  data: task,
  metadata: { timestamp: new Date() },
};

// Task list response
const taskListResponse: ResolvAITaskListResponse = {
  success: true,
  data: [task1, task2, task3],
  total: 100,
  page: 1,
  limit: 10,
  hasMore: true,
};

// Task detail response
const taskDetailResponse: ResolvAITaskDetailResponse = {
  success: true,
  data: {
    task: task,
    messages: [message1, message2],
    events: [event1, event2],
  },
};

Filter and Pagination Types

import { ResolvAITaskFilterParams, ResolvAIEventFilterParams } from '@imalec/resolvai-types';

const taskFilters: ResolvAITaskFilterParams = {
  status: 'completed',
  priority: 'high',
  tags: ['phone', 'reservation'],
  startDate: new Date('2024-01-01'),
  endDate: new Date('2024-01-31'),
  query: 'restaurant',
  page: 1,
  limit: 20,
  sortBy: 'createdAt',
  sortOrder: 'desc',
};

const eventFilters: ResolvAIEventFilterParams = {
  type: 'call_started',
  taskId: 'task-123',
  startDate: new Date('2024-01-01'),
  endDate: new Date('2024-01-31'),
  page: 1,
  limit: 50,
};

📋 Available Types

Core Types

  • ResolvAITask - Main task interface
  • ResolvAIMessage - Message interface
  • ResolvAIEvent - Event interface
  • ResolvAIGoogleEvent - Google Calendar event interface

Status Types

  • ResolvAITaskStatus - Task status enum
  • ResolvAITaskPriority - Task priority enum
  • ResolvAIMessageRole - Message role enum
  • ResolvAIEventType - Event type enum

Tool Types

  • ResolvAIToolCall - Tool call interface
  • ResolvAIToolCallArgs - Tool call arguments
  • ResolvAITaskResult - Task result interface

API Types

  • ResolvAIAPIResponse<T> - Generic API response
  • ResolvAITaskListResponse - Task list response
  • ResolvAITaskDetailResponse - Task detail response

Filter Types

  • ResolvAIPaginationParams - Pagination parameters
  • ResolvAITaskFilterParams - Task filter parameters
  • ResolvAIEventFilterParams - Event filter parameters

🔧 Development

Building

# Build type declarations
npm run build

# Clean build output
npm run clean

Publishing

# Update version (patch/minor/major)
npm run version:patch
npm run version:minor
npm run version:major

# Publish to npm
npm run release

Build Process

This package uses TypeScript to generate type declarations:

  1. Source: src/index.ts - Contains all type definitions
  2. Build: npm run build - Generates dist/index.d.ts
  3. Output: dist/ directory - Contains compiled type declarations

TypeScript Configuration

This package is built with TypeScript and includes:

  • Strict type checking
  • Declaration files generation only (--emitDeclarationOnly)
  • ES2020 target
  • CommonJS module system

📄 License

ISC

🤝 Contributing

When contributing to this package:

  1. Ensure all types are properly documented with JSDoc comments
  2. Maintain backward compatibility when possible
  3. Add tests for new types if applicable
  4. Update this README when adding new types

📞 Support

For questions or issues, please contact: [email protected]