@tmlmobilidade/interfaces

中文文档
20261102.1501.57发布于 2026/11/02AGPL-3.0-or-laterTypeScriptES Module

This package provides SDK-style connectors for interacting with databases (e.g., stops, plans, rides, alerts) and external providers (e.g., authentication, storage). It simplifies data access and integration across projects.

原始使用文档
文档目录4 节
  1. @tmlmobilidade/interfaces
  2. Purpose
  3. Installation
  4. Local development

@tmlmobilidade/interfaces

This package provides SDK-style connectors for interacting with databases (e.g., stops, plans, rides, alerts) and external providers (e.g., authentication, storage). It simplifies data access and integration across projects.

Purpose

  • Unified interface for accessing databases and external services
  • Reduces boilerplate by handling common queries and operations
  • Ensures consistency across different modules

Installation

npm install @tmlmobilidade/interfaces

Local development

Each interface has a given fixed port number to connect to the corresponding database instance. Use these

Interface NamePortEnv Value
auth37000mongodb://root:root@localhost:37000
files37001mongodb://root:root@localhost:37001
stops37002mongodb://root:root@localhost:37002
agencies37003mongodb://root:root@localhost:37003
plans37004mongodb://root:root@localhost:37004
alerts37005mongodb://root:root@localhost:37005
rides37006mongodb://root:root@localhost:37006
vehicle_events37007mongodb://root:root@localhost:37007
hashed_shapes37008mongodb://root:root@localhost:37008
hashed_trips37009mongodb://root:root@localhost:37009
apex_t1137010mongodb://root:root@localhost:37010
apex_t1937011mongodb://root:root@localhost:37011
locations37012mongodb://root:root@localhost:37012

版本与发布记录

@tmlmobilidade/interfaces 共发布 1,463 个版本,首次发布于 2025/03/26;过去 12 个月发布了 622 个版本。

版本发布日期距今
20261102.1501.57latest2026/11/02今天
20261030.1350.292026/10/303 天前
20261029.1015.242026/10/295 天前
20261028.1757.522026/10/295 天前
20261028.1202.422026/10/286 天前
20261027.2048.322026/10/286 天前

其他发布通道:next → 20251002.1006.46-rc.568,staging → 20251027.1155.41-staging.0。

关于 @tmlmobilidade/interfaces 的常见问题

@tmlmobilidade/interfaces 是什么?

这个包提供了sdk风格的连接器,用于与数据库(例如,停车、计划、乘车、警报)和外部提供者(例如,身份验证、存储)进行交互。它简化了跨项目的数据访问和集成。

如何安装 @tmlmobilidade/interfaces?

在项目目录运行 npm install @tmlmobilidade/interfaces,或使用 pnpm add / yarn add / bun add。

@tmlmobilidade/interfaces 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@tmlmobilidade/interfaces 支持 ESM 还是 CommonJS?

以 ES Module 形式发布,推荐使用 import 引入。在 CommonJS 项目中,Node.js 20.19+ / 22.12+ 可以直接 require() 不含顶层 await 的 ES Module,更早的版本需要改用动态 import()。

@tmlmobilidade/interfaces 可以商用吗?

@tmlmobilidade/interfaces 使用 AGPL-3.0-or-later 许可。最严格的 Copyleft:除分发外,通过网络向用户提供基于它的服务也需要开源对应源码。闭源 SaaS 使用前务必评估。以上为概括,不构成法律意见,请以许可原文为准。

@tmlmobilidade/interfaces 还在维护吗?

最新版本 20261102.1501.57 发布于 2026/11/02(今天);至今共发布 1463 个版本,其中过去 12 个月发布了 622 个;首次发布于 2025/03/26。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。