@gnezdo.app/shared-types

v1.0.0

Published

Shared TypeScript types for Gnezdo Afisha API and Client

Readme

@gnezdo/shared-types

Shared TypeScript types for Gnezdo Afisha API and Client. All dates in API shapes use string (JSON serialization).

Setup

Both projects reference this package via file:../gnezdo-shared-types:

  • gnezdo-afisha-api: "@gnezdo/shared-types": "file:../gnezdo-shared-types"
  • gnezdo-afisha-client: "@gnezdo/shared-types": "file:../gnezdo-shared-types"

After adding or updating the dependency, run pnpm install in the API and client roots so the package is linked.

Structure

  • enums – UserTier, ContentLanguage, DeliveryStatus, etc.
  • constants – TIER_LIMITS, TIER_NAMES, SUPPORTED_LOCALES, LOCALE_LABELS
  • common – BaseEntity, PaginationParams, PaginatedResponse, ApiErrorResponse
  • entities – User, City, Category, Event, Announcement, Organizer, InstagramAccount, TelegramChannel
  • notifications – GeneratedAnnouncement, GeneratedEventNotification, filters
  • ai – AIModel, AIProvider, capabilities, pricing, limits
  • filters – InstagramFilters, OrganizerFilters, EventFilters, UserFilters, ActivityFilters

Usage

import type { User, City, PaginatedResponse } from '@gnezdo/shared-types';
import { TIER_LIMITS } from '@gnezdo/shared-types';