@myko.pk/types
v1.0.5
Published
Shared TypeScript types for MYKOPK packages
Downloads
1,305
Readme
📑 Table of Contents
- Description
- Key Features
- Use Cases
- Tech Stack
- Quick Start
- Available Scripts
- Project Structure
- Contributors
- Contributing
- License
📝 Description
@myko.pk/types is the canonical source of shared TypeScript type definitions for the entire MYKO ecosystem. Every MYKO package — atlas, config, errors, logger, and the services that depend on them — imports its types from here. Instead of scattering type definitions across packages or duplicating interfaces, this package provides a single source of truth for database service types, event system types, query builder types, multi-tenancy models, migration configs, and all ecosystem-one (EO) domain types like auth, audit, OTP, avatar, and R2.
✨ Key Features
- 🔄 Single Source of Truth — Every MYKO package imports shared types from one place. No duplication, no drift.
- 🗂️ Logical Sub-path Exports — Import exactly what you need:
@myko.pk/types(all),@myko.pk/types/db(database types), or@myko.pk/types/eo(domain types). - 📘 Fully Typed — Every interface, type alias, and enum is explicitly defined with JSDoc annotations.
- 🔌 Framework Agnostic — Pure TypeScript types with zero runtime dependencies. Use in any Node.js or browser project.
🎯 Use Cases
- Importing
DatabaseService,QueryFilter, orAdapterConfigtypes across multiple MYKO backend services without redefining them. - Sharing domain-specific types between services (audit logs, auth events, OTP payloads) via the
./eosub-path. - Ensuring type consistency between Drizzle ORM table schemas and application-layer DTOs.
- Providing type-safe integration between MYKO packages and third-party APIs.
🛠️ Tech Stack
- 📘 TypeScript
Notable libraries: None — pure types, zero runtime deps.
⚡ Quick Start
npm install @myko.pk/typesimport type { DatabaseService, QueryFilter } from '@myko.pk/types';
import type { AuditLogEntry } from '@myko.pk/types/eo';
import { AuditEventType } from '@myko.pk/types/eo';🚀 Available Scripts
- build —
npm run build - typecheck —
npm run typecheck
📁 Project Structure
.
├── CHANGELOG.md
├── CONTRIBUTING.md
├── LICENSE
├── SECURITY.md
├── package.json
├── src
│ ├── db
│ │ ├── adapter.types.ts
│ │ ├── cache.types.ts
│ │ ├── cli.types.ts
│ │ ├── health.types.ts
│ │ ├── index.ts
│ │ ├── migration.types.ts
│ │ ├── pagination.types.ts
│ │ ├── query.types.ts
│ │ ├── redis.types.ts
│ │ ├── service.types.ts
│ │ ├── shard.types.ts
│ │ └── tenant.types.ts
│ ├── eo
│ │ ├── audit.types.ts
│ │ ├── auth.types.ts
│ │ ├── avatar.types.ts
│ │ ├── index.ts
│ │ ├── otp.types.ts
│ │ └── r2.types.ts
│ └── index.ts
├── tsconfig.json
└── tsup.config.mjs🛠️ Development Setup
- Install Node.js (v18+ recommended)
- Install dependencies:
npm install - Build:
npm run build
🧪 Testing
This project currently exports pure types — no runtime tests required.
👥 Contributors
See the full list of contributors →
👥 Contributing
Contributions are welcome! Here's the standard flow:
- Fork the repository
- Clone your fork:
git clone https://github.com/mykopk/types.git - Branch:
git checkout -b feature/your-feature - Commit:
git commit -m 'feat: add some feature' - Push:
git push origin feature/your-feature - Open a pull request
Please follow the existing code style and include types for new behavior where applicable.
📜 License
This project is licensed under the MIT License.
MYKO Pakistan
Detail Information Website myko.pk Email [email protected] About Building digital infrastructure and super-app experiences for millions of users across Pakistan. Built with ❤️ in Pakistan 🇵🇰
