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

@tjoc/types

v4.9.0

Published

Shared TypeScript types for TJOC platform

Downloads

1,438

Readme

@tjoc/types

Shared TypeScript types for the tjoc.dev portfolio. Zero runtime dependencies — pure types and enums, dual CJS/ESM.

Installation

pnpm add @tjoc/types

Node ≥18. Published to npm.

Quick start

import { User, UserRole, Status, PaginatedResponse, ApiResponse, ErrorCode } from '@tjoc/types';

const user: User = {
  id: 'usr_123',
  email: '[email protected]',
  firstName: 'Joe',
  lastName: 'Smith',
  role: UserRole.USER,
  status: Status.ACTIVE,
  emailVerified: true,
  createdAt: new Date(),
  updatedAt: new Date(),
};

Date convention

All timestamp fields are TypeScript Date objects (createdAt, updatedAt, deletedAt, processedAt, etc.). Serialization to ISO string and parsing back to Date is a runtime concern — do it at your API boundary, not in shared types.

Module exports

common

| Export | Description | |---|---| | Status | Entity status: ACTIVE \| INACTIVE \| PENDING \| SUSPENDED \| DELETED | | Environment | development \| staging \| production | | PaginationParams | { page, limit } | | PaginatedResponse<T> | { items, total, page, limit, hasMore, totalPages } | | ApiResponse<T> | { success, data?, error? } | | ErrorResponse | { message, code, details? } | | TimestampFields | { createdAt, updatedAt, deletedAt? } |

user

| Export | Description | |---|---| | UserRole | ADMIN \| USER | | User | Core user entity | | UserSettings | Theme, notification prefs, locale prefs | | CreateUserPayload | Post-Cognito user record creation (no password — auth is Cognito's job) | | UpdateUserPayload | Partial user update |

enums

| Enum | Values | |---|---| | TierType | FREE \| BASIC \| PRO \| ENTERPRISE | | BillingCycle | monthly \| yearly \| lifetime | | Currency | USD \| EUR \| GBP \| NGN \| CAD \| AUD | | PaymentStatus | pending \| completed \| failed \| cancelled \| refunded \| processing | | PaymentProvider | stripe \| paystack \| conchpay | | TransactionType | subscription \| one_time \| upgrade \| refund | | JobStatus | SAVED \| APPLIED \| INTERVIEW \| OFFER \| REJECTED \| WITHDRAWN | | JobType | full_time \| part_time \| contract \| freelance \| internship \| temporary | | WorkLocation | remote \| on_site \| hybrid | | ExperienceLevel | entry \| junior \| mid \| senior \| lead \| executive | | SkillLevel | beginner \| intermediate \| advanced \| expert | | EducationLevel | high_school \| associate \| bachelor \| master \| doctorate \| certificate \| diploma | | NotificationType | email \| push \| sms \| in_app | | NotificationPriority | low \| medium \| high \| urgent | | NotificationCategory | system \| account \| payment \| security \| marketing | | FileType | PDF, DOCX, DOC, TXT, RTF MIME types | | UploadStatus | pending \| uploading \| processing \| completed \| failed | | ErrorCode | VALIDATION_ERROR, AUTHENTICATION_ERROR, NOT_FOUND, CONFLICT, etc. | | LogLevel | debug \| info \| warn \| error \| fatal | | Theme | light \| dark \| system | | Language | en \| es \| fr \| de \| it \| pt \| zh \| ja \| ko \| ar | | Timezone | UTC, EST, PST, GMT, CET, JST, AEST, WAT | | LoadingState | idle \| loading \| success \| error | | ComponentSize | xs \| sm \| md \| lg \| xl | | ComponentVariant | default \| primary \| secondary \| success \| warning \| error \| info |

payments

Wallet, Transaction, WithdrawalRequest, SubscriptionPlan, PaymentMethod and their create/update/search payloads. TransactionStatus: PENDING \| COMPLETED \| FAILED \| CANCELLED \| PROCESSING.

api

HttpMethod, HttpStatus, ApiErrorCode, ApiError, RequestMetadata, WebSocketEvent, WebSocketPayloads, WebSocketEventPayload<T>.

firebaseToken

FirebaseToken, FirebaseTokenChannel (WEB \| MOBILE), create/update payloads. Used by @tjoc/notifications FCM integration.

v4.0.0 breaking changes

These were removed. If you were importing them, the replacement is noted.

| Removed | Replacement | |---|---| | UserRole.INSTRUCTOR | Products define their own extended roles | | LoginPayload, RegisterPayload, AuthResponse, etc. | Use @tjoc/auth/cognito — Cognito handles auth | | trivia.ts, achievements.ts, categoryPerformance.ts | Move to product repos | | JobApplicationStatus, ResumeStatus | Move to product repos | | FeatureType, UsageAction | Move to product repos | | TriviaTransactionType | Move to product repos | | ApiEndpoints, RouteConfig | Products own their route contracts | | zod dependency | Removed — package is now zero-dependency | | password, referralCode in CreateUserPayload | Cognito handles passwords; referral is product-specific |

Development

pnpm build       # tsup → dist/
pnpm test        # jest (21 tests)
pnpm typecheck   # tsc --noEmit