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

igdb-typeorm-entities

v1.0.1

Published

TypeORM entity definitions for the IGDB (Internet Game Database) API. Provides ready-to-use entities, enums, and a NestJS module for storing IGDB data in a relational database.

Readme

igdb-typeorm-entities

TypeORM entity definitions for the IGDB (Internet Game Database) API. Provides 73 entities, 23 enums, and an optional NestJS module for storing IGDB data in a relational database.

Installation

npm install igdb-typeorm-entities

Peer Dependencies

This package requires the following peer dependencies:

| Package | Required | |---------|----------| | typeorm >= 0.3.0 | Yes | | @nestjs/common >= 9.0.0 | Only if using IgdbModule | | @nestjs/typeorm >= 9.0.0 | Only if using IgdbModule |

Usage

With NestJS

Import the IgdbModule into your application module. It registers all IGDB entities with TypeORM automatically.

import { Module } from "@nestjs/common";
import { TypeOrmModule } from "@nestjs/typeorm";
import { IgdbModule } from "igdb-typeorm-entities";

@Module({
  imports: [
    TypeOrmModule.forRoot({
      type: "postgres",
      // ...your database config
    }),
    IgdbModule,
  ],
})
export class AppModule {}

Then inject repositories as usual:

import { Injectable } from "@nestjs/common";
import { InjectRepository } from "@nestjs/typeorm";
import { Repository } from "typeorm";
import { Game } from "igdb-typeorm-entities";

@Injectable()
export class GameService {
  constructor(
    @InjectRepository(Game)
    private readonly gameRepository: Repository<Game>,
  ) {}

  findAll() {
    return this.gameRepository.find({ relations: ["genres", "platforms"] });
  }
}

Without NestJS

Use the entities directly with a TypeORM data source:

import { DataSource } from "typeorm";
import { Game, Genre, Platform } from "igdb-typeorm-entities";

const dataSource = new DataSource({
  type: "postgres",
  // ...your database config
  entities: [Game, Genre, Platform], // add the entities you need
});

Enums

Enums are provided for fields with fixed value sets:

import { GameStatusEnum, GameCategoryEnum } from "igdb-typeorm-entities";

if (game.status === GameStatusEnum.Released) {
  // ...
}

Entities

Covers the full IGDB API schema:

| Category | Entities | |----------|----------| | Games | Game, GameVersion, GameEngine, GameMode, GameVideo, GameStatus, GameType, GameLocalization, GameReleaseFormat, GameTimeToBeat, GameVersionFeature, GameVersionFeatureValue | | Platforms | Platform, PlatformVersion, PlatformFamily, PlatformLogo, PlatformType, PlatformWebsite, PlatformVersionCompany, PlatformVersionReleaseDate | | Companies | Company, CompanyLogo, CompanyStatus, CompanyWebsite, InvolvedCompany | | Media | Cover, Artwork, ArtworkType, Screenshot, GameEngineLogo | | Characters | Character, CharacterGender, CharacterSpecie, CharacterMugShot | | Releases | ReleaseDate, ReleaseDateStatus, ReleaseDateRegion, Region, DateFormat | | Classification | Genre, Keyword, Theme, PlayerPerspective, Franchise | | Collections | Collection, CollectionType, CollectionMembership, CollectionMembershipType, CollectionRelation, CollectionRelationType | | Age Ratings | AgeRating, AgeRatingCategory, AgeRatingOrganization, AgeRatingContentDescription, AgeRatingContentDescriptionType, AgeRatingContentDescriptionV2 | | Languages | Language, LanguageSupport, LanguageSupportType | | External | ExternalGame, ExternalGameSource, Website, WebsiteType | | Events | Event, EventLogo, EventNetwork, NetworkType | | Popularity | PopularityPrimitive, PopularityType | | Other | AlternativeName, MultiplayerMode, Search |

Contributing

Contributions are welcome! Please open an issue or submit a pull request.

License

MIT