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

@lumir-company/lsms-server-api

v0.2.19

Published

LSMS Server API Client Library

Readme

LSMS Server API Client

LSMS (Laboratory Schedule Management System) Server API 클라이언트 라이브러리입니다.

설치

npm install @lsms/server-api

사용법

기본 사용법

import { AuthAPI, UsersAPI, ReservationsAPI } from '@lsms/server-api';

// API 클라이언트 초기화
// baseUrl은 API 서버의 기본 URL을 입력합니다 (예: https://api.lsms.example.com/api/v2)
const authAPI = new AuthAPI('https://api.lsms.example.com/api/v2');
const usersAPI = new UsersAPI('https://api.lsms.example.com/api/v2');
const reservationsAPI = new ReservationsAPI('https://api.lsms.example.com/api/v2');

// 로그인
const loginResponse = await authAPI.login({
  accountId: '[email protected]',
  password: 'password123',
});

if (loginResponse.success) {
  console.log('로그인 성공:', loginResponse.data);
  // 토큰 자동 설정됨
}

개별 API 사용

import {
  AuthAPI,
  UsersAPI,
  ReservationsAPI,
  AdminReservationsAPI,
  ResourcesAPI,
  ResourceGroupsAPI,
  NotificationsAPI,
  FilesAPI,
  ScheduleAPI,
  ConsumablesAPI,
  DepartmentsAPI,
  EmployeesAPI,
  InquiriesAPI,
  TasksAPI,
} from '@lsms/server-api';

// API 클라이언트 초기화
// baseUrl은 API 서버의 기본 URL을 입력합니다
// 예: https://api.lsms.example.com/api/v2
const authAPI = new AuthAPI('https://api.lsms.example.com/api/v2');
const usersAPI = new UsersAPI('https://api.lsms.example.com/api/v2');
const reservationsAPI = new ReservationsAPI('https://api.lsms.example.com/api/v2');
const adminReservationsAPI = new AdminReservationsAPI('https://api.lsms.example.com/api/v2');

// 토큰 설정 (로그인 후 자동으로 설정되지만 수동 설정도 가능)
authAPI.setToken('your-access-token');
usersAPI.setToken('your-access-token');
reservationsAPI.setToken('your-access-token');
adminReservationsAPI.setToken('your-access-token');

API 모듈

인증 (Auth)

  • 로그인/로그아웃
  • 토큰 갱신
  • 현재 사용자 정보 조회

사용자 (Users)

  • 사용자 목록 조회
  • 사용자 정보 조회/수정
  • 비밀번호 변경
  • 알림 설정 관리
  • 프로필 업데이트

예약 (Reservations)

  • 예약 생성/수정/삭제
  • 예약 상세 조회
  • 예약 상태 변경
  • 내 예약 목록 조회
  • 캘린더 예약 조회
  • 예약 연장/연장 가능 여부 확인
  • 스냅샷 생성/조회/삭제

관리자 예약 (Admin Reservations)

  • 관리자 예약 목록 조회
  • 확인이 필요한 예약 조회
  • 예약 검증
  • 관리자 캘린더 조회
  • 예약 승인/거부
  • 차량 반납 처리
  • 예약 통계 조회
  • 예약 일괄 처리
  • 예약 연장 (관리자 전용)

자원 (Resources)

  • 자원 목록 조회
  • 자원 상세 조회
  • 자원 생성/수정/삭제
  • 자원 그룹별 조회
  • 자원 가용성 조회
  • 자원 예약 가능 시간 조회
  • 자원 순서 변경
  • 자원 예약 가능 상태 수정
  • 월별 예약 가용성 확인

자원 그룹 (Resource Groups)

  • 부모 자원 그룹 조회 (일반/관리자)
  • 자원 그룹별 자원 조회 (일반/관리자)
  • 자원 그룹 생성/수정/삭제 (관리자)
  • 자원 그룹 순서 변경 (관리자)
  • 자원 그룹 상세 조회

일정 (Schedule)

  • 일정 생성/수정/삭제
  • 일정 캘린더 조회
  • 일정 상세 조회
  • 내 일정 조회
  • 자원별 일정 조회
  • 일정 취소/완료
  • 일정 연장/연장 가능 확인
  • 내 일정 내역 조회

알림 (Notifications)

  • 알림 목록 조회
  • 알림 상세 조회
  • 알림 읽음 처리 (단일/일괄/전체)
  • 알림 삭제 (단일/일괄)
  • 읽지 않은 알림 개수 조회
  • 알림 설정 조회/변경
  • 웹 푸시 구독/해제
  • 알림 전송 (관리자용)

파일 (Files)

  • 파일 업로드 (일반/Presigned URL)
  • 파일 목록 조회
  • 파일 상세 조회
  • 파일 다운로드 URL 조회
  • 파일 삭제 (단일/일괄)
  • 파일 메타데이터 수정
  • 파일 통계 조회

소모품 (Consumables)

  • 소모품 목록 조회
  • 소모품 상세 조회
  • 소모품 정보 수정

부서 (Departments)

  • 하위 부서 목록 조회

직원 (Employees)

  • 부서별 직원 목록 조회

문의 (Inquiries)

  • 문의 생성

태스크 (Tasks)

  • 태스크 목록 조회

타입 정의

모든 API 요청/응답에 대한 TypeScript 타입이 포함되어 있습니다:

import type {
  // 인증 관련
  LoginRequest,
  LoginResponse,

  // 사용자 관련
  User,
  UserListQueryParams,
  ChangePasswordRequest,
  NotificationSettingsRequest,

  // 예약 관련
  Reservation,
  ReservationRequest,
  ReservationUpdateRequest,
  MyReservationsQuery,
  CalendarReservationsRequest,
  ExtendReservationRequest,
  SnapshotRequest,

  // 관리자 예약 관련
  AdminReservation,
  AdminReservationsQuery,
  ReservationCheckRequest,
  ReservationApprovalRequest,
  BulkReservationAction,
  ReservationStats,

  // 자원 관련
  Resource,
  ResourceGroup,
  ResourceListQueryParams,
  CreateResourceRequest,
  ResourceAvailabilityRequest,

  // 일정 관련
  ScheduleCreateRequestDto,
  ScheduleCalendarRequest,
  ScheduleDetailRequest,
  MyScheduleRequest,
  ResourceScheduleRequest,
  ScheduleUpdateRequestDto,

  // 알림 관련
  Notification,
  NotificationListQuery,
  SendNotificationRequest,
  WebPushSubscription,

  // 파일 관련
  FileUploadRequest,
  FileUploadResponse,
  PresignedUploadRequest,
  FileListQuery,

  // 소모품 관련
  ConsumableResponseDto,
  MaintenanceResponseDto,
  ConsumableListRequest,

  // 부서 관련
  SubDepartment,
  SubDepartmentsRequest,

  // 직원 관련
  EmployeeInfo,
  EmployeesByDepartmentResponseDto,

  // 문의 관련
  InquiryCreateRequestDto,
  InquiryCreateResponseDto,

  // 태스크 관련
  TaskItem,
  TaskListResponse,
  TaskListQueryParams,
} from '@lsms/server-api';

사용 예시

예약 관리

import { ReservationsAPI } from '@lsms/server-api';

const reservationsAPI = new ReservationsAPI('https://api.lsms.example.com/api/v2');

// 예약 생성
const newReservation = await reservationsAPI.createReservation({
  resourceId: 'resource-123',
  startTime: '2024-01-15T09:00:00Z',
  endTime: '2024-01-15T10:00:00Z',
  purpose: '회의실 사용',
  participants: 5,
  notes: '중요한 회의',
});

// 내 예약 목록 조회
const myReservations = await reservationsAPI.getMyReservations({
  status: 'CONFIRMED',
  startDate: '2024-01-01',
  endDate: '2024-01-31',
});

관리자 예약 관리

import { AdminReservationsAPI } from '@lsms/server-api';

const adminReservationsAPI = new AdminReservationsAPI('https://api.lsms.example.com/api/v2');

// 확인이 필요한 예약 조회
const pendingReservations = await adminReservationsAPI.getPendingReservations();

// 예약 승인
const approvalResult = await adminReservationsAPI.approveOrRejectReservation('reservation-123', {
  action: 'approve',
  reason: '승인 완료',
  adminNotes: '관리자 승인',
});

// 예약 통계 조회
const stats = await adminReservationsAPI.getReservationStats('2024-01-01', '2024-01-31', 'department-123');

파일 관리

import { FilesAPI } from '@lsms/server-api';

const filesAPI = new FilesAPI('https://api.lsms.example.com/api/v2');

// 파일 업로드
const uploadResult = await filesAPI.uploadFile({
  file: fileObject,
  fileName: 'document.pdf',
  mimeType: 'application/pdf',
  category: 'documents',
  isPublic: false,
});

// Presigned URL을 이용한 업로드
const presignedUrl = await filesAPI.getPresignedUploadUrl({
  fileName: 'large-file.zip',
  mimeType: 'application/zip',
  fileSize: 1024000,
  category: 'uploads',
});

알림 관리

import { NotificationsAPI } from '@lsms/server-api';

const notificationsAPI = new NotificationsAPI('https://api.lsms.example.com/api/v2');

// 알림 목록 조회
const notifications = await notificationsAPI.getNotifications({
  isRead: false,
  type: 'INFO',
  category: 'RESERVATION',
});

// 알림 읽음 처리
await notificationsAPI.markAsRead('notification-123');

// 웹 푸시 구독
await notificationsAPI.subscribeWebPush({
  endpoint: 'https://fcm.googleapis.com/fcm/send/...',
  keys: {
    p256dh: 'key1',
    auth: 'key2',
  },
});

라이선스

MIT

기여

이슈나 풀 리퀘스트는 언제든 환영합니다!

📦 배포 (자동)

이 패키지(@lumir-company/lsms-server-api)는 release-please + self-hosted GitHub Actions 러너로 자동 배포됩니다. 버전을 수동으로 올리거나 npm publish를 직접 실행할 필요가 없습니다.

버전 규칙 (Semantic Versioning)

커밋 메시지(Conventional Commits)가 다음 버전을 자동 결정합니다:

| 커밋 prefix | 버전 증가 | 예시 | | --- | --- | --- | | fix: … | patch | 1.2.3 → 1.2.4 | | feat: … | minor | 1.2.3 → 1.3.0 | | feat!: … 또는 본문 BREAKING CHANGE: | major | 1.2.3 → 2.0.0 | | chore: docs: refactor: test: 등 | 릴리스 없음 | — |

배포 흐름

  1. main 브랜치에 conventional commit을 push 한다.
  2. release-pleasechore(main): release X.Y.Z 형태의 Release PR을 자동 생성한다 (버전 bump + CHANGELOG.md 갱신).
  3. 그 PR을 검토 후 머지한다. ← 사람이 하는 유일한 단계
  4. 머지되면 자동으로 Git 태그 + GitHub Release 생성 + npm publish 가 실행된다 (.github/workflows/release.yml, self-hosted 러너 lumir-ci).

npm 인증은 repo secret NPM_TOKEN(Automation/Publish 토큰), release-please는 RELEASE_PLEASE_TOKEN(PAT)을 사용한다.