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

@thalorlabs/types

v1.6.0

Published

Types for ThalorLabs projects

Downloads

19

Readme

@thalorlabs/types

A TypeScript types package for ThalorLabs projects, providing shared type definitions and Zod schemas.

Installation

npm install @thalorlabs/types

Usage

Import All Types

import {
  Address,
  Location,
  Waterfall,
  WaterfallCore,
  WaterfallPartial,
  EWaterfallTags,
  EWaterfallAccessDifficulty,
  EAustralianState,
  ECountryCode,
  MongoMeta,
} from '@thalorlabs/types';

Import Individual Types

import { Address } from '@thalorlabs/types/types/Address';
import { Location } from '@thalorlabs/types/types/Location';
import { Waterfall } from '@thalorlabs/types/types/Waterfall';
import { EWaterfallTags } from '@thalorlabs/types/types/Waterfall';
import { EAustralianState } from '@thalorlabs/types/enums/EAustralianState';
import { ECountryCode } from '@thalorlabs/types/enums/ECountryCode';

Available Types

Core Types

| Type | Description | Usage | | ----------- | ---------------------------------------------------------------- | ------------------------------ | | Address | Address schema with Australian state and country support | Address.parse(addressData) | | Location | Geographic location with coordinates and Google Maps integration | Location.parse(locationData) | | MongoMeta | MongoDB metadata fields (_id, createdAt, updatedAt) | MongoMeta.parse(metaData) |

Waterfall Types

| Type | Description | Usage | | ------------------ | -------------------------------------------- | ------------------------------------ | | WaterfallCore | Core waterfall data without MongoDB metadata | WaterfallCore.parse(waterfallData) | | Waterfall | Complete waterfall with MongoDB metadata | Waterfall.parse(waterfallData) | | WaterfallPartial | Partial waterfall for update operations | WaterfallPartial.parse(updateData) |

Enums

| Enum | Description | Values | | ---------------------------- | --------------------------------- | ------------------------------------------------------------- | | EWaterfallTags | Waterfall feature tags | DOG_FRIENDLY, KID_FRIENDLY, WHEELCHAIR_ACCESSIBLE, etc. | | EWaterfallAccessDifficulty | Access difficulty levels | EASY, MODERATE, HARD | | EAustralianState | Australian states and territories | NSW, VIC, QLD, SA, WA, TAS, NT | | ECountryCode | Supported country codes | AU, NZ |

Examples

Address Validation

import { Address } from '@thalorlabs/types';

const addressData = {
  streetNumber: '123',
  streetName: 'Main Street',
  suburb: 'Sydney',
  state: 'NSW',
  postcode: '2000',
  country: 'AU',
};

const address = Address.parse(addressData);
// Returns validated address object

Waterfall Creation

import {
  WaterfallCore,
  EWaterfallTags,
  EWaterfallAccessDifficulty,
} from '@thalorlabs/types';

const waterfallData = {
  name: 'Fitzroy Falls',
  address: {
    suburb: 'Fitzroy Falls',
    state: 'NSW',
    postcode: '2577',
    country: 'AU',
  },
  location: {
    latitude: -34.6531,
    longitude: 150.4789,
  },
  tags: [EWaterfallTags.VIEWING_PLATFORM, EWaterfallTags.KID_FRIENDLY],
  accessDifficulty: EWaterfallAccessDifficulty.EASY,
  url: 'https://example.com/fitzroy-falls',
};

const waterfall = WaterfallCore.parse(waterfallData);

MongoDB Integration

import { Waterfall, MongoMeta } from '@thalorlabs/types';
import { ObjectId } from 'bson';

const waterfallWithMeta = {
  ...waterfallData,
  _id: new ObjectId(),
  createdAt: new Date(),
  updatedAt: new Date(),
};

const fullWaterfall = Waterfall.parse(waterfallWithMeta);

Project Structure

src/
├── index.ts              # Main exports
├── types/                # Type definitions
│   ├── Address.ts        # Address schema
│   ├── Location.ts       # Location schema
│   ├── MongoMeta.ts      # MongoDB metadata
│   └── Waterfall.ts      # Waterfall schemas and enums
└── enums/                # Enum definitions
    ├── EAustralianState.ts
    └── ECountryCode.ts

TypeScript Support

This package includes full TypeScript support with:

  • Complete type definitions
  • Zod schema validation
  • IntelliSense support
  • Compile-time type checking

Third-Party Types Policy

This package only contains ThalorLabs contract types - the shapes we guarantee between our microservices and clients.

✅ What belongs here:

  • WeatherResponse - our normalized weather data contract
  • PaymentIntent - our payment processing contract
  • UserProfile - our user data contract
  • Domain-specific types like Waterfall, Address, Location

❌ What does NOT belong here:

  • OpenWeather API response types
  • Stripe webhook payload types
  • GitHub API response types
  • Any external service's raw API types

Why this matters:

  • Stable contracts - Clients consume our normalized types, not third-party APIs
  • Encapsulation - Third-party changes don't break our entire ecosystem
  • Maintainability - Update third-party integrations in one service, not everywhere

Keep third-party API types local to the service that consumes them, not in this shared types package.