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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@growi/sdk-typescript

v1.8.0

Published

GROWI SDK for TypeScript, providing utilities and types for building applications that interact with GROWI.

Readme

@growi/sdk-typescript

npm version License: MIT

@growi/sdk-typescript is a TypeScript SDK automatically generated from the official GROWI OpenAPI specifications using orval. It supports both GROWI API v1 and v3, enabling type-safe API operations.

Key Features

  • 🏢 Official SDK by the GROWI Development Team
  • 🔄 Automatic code generation from OpenAPI specifications
  • 🛡️ Type-safe API operations with TypeScript
  • 🚀 axios-based HTTP client
  • 🔗 Support for GROWI API v1 and v3
  • 🎯 Node.js 18+ support

Supported GROWI Versions

This SDK is generated from GROWI's official OpenAPI specifications and supports the specifications obtained from the following endpoints:

  • API v1: https://docs.growi.org/openapi-spec-apiv1.json
  • API v3: https://docs.growi.org/openapi-spec-apiv3.json

The SDK's compatibility depends on the compatibility of GROWI's API specifications. When new API versions are released, the SDK will be automatically updated.

Installation

You can install it using npm, yarn, or pnpm:

# npm
npm install @growi/sdk-typescript

# yarn
yarn add @growi/sdk-typescript

# pnpm
pnpm add @growi/sdk-typescript

Basic Usage

Client Initialization

import { AXIOS_DEFAULT } from '@growi/sdk-typescript';

// Set the base URL of your GROWI instance
AXIOS_DEFAULT.setBaseURL('https://your-growi-instance.com');

// Set authentication token (if needed)
AXIOS_DEFAULT.setAuthorizationHeader('your-api-token');

API v3 Usage Example

import apiv3 from '@growi/sdk-typescript/v3';

// Get page list
try {
  const pages = await apiv3.getPagesList();
  console.log(pages);
} catch (error) {
  console.error('Failed to fetch pages:', error);
}

// Get recent pages
try {
  const recentPages = await apiv3.getPagesRecent();
  console.log(recentPages);
} catch (error) {
  console.error('Failed to fetch recent pages:', error);
}

// Using with parameters
const pagesWithParams = await apiv3.getPagesList({
  limit: 20,
  offset: 0
});

API v1 Usage Example

import apiv1 from '@growi/sdk-typescript/v1';

// Search pages
try {
  const searchResult = await apiv1.searchPages({ q: 'search term' });
  console.log(searchResult);
} catch (error) {
  console.error('Failed to search pages:', error);
}

// Get comments
try {
  const comments = await apiv1.getComments({ page_id: 'your-page-id' });
  console.log(comments);
} catch (error) {
  console.error('Failed to fetch comments:', error);
}

API Client Details

Directory Structure

src/
├── utils/
│   └── axios-instance.ts      # Axios instance factory
├── generated/                  # Codes generated by Orval
│   ├── v1/                      # API v1 client
│   │   ├── index.ts
│   │   └── index.schemas.ts
│   └── v3/                      # API v3 client
│       ├── index.ts
│       └── index.schemas.ts

API Version Selection

  • API v3: Contains new features and improved API endpoints. We recommend using v3 whenever possible.
  • API v1: Use when you need features not available in v3 or for legacy compatibility.

Type Definition

All API requests and responses are type-safe:

// Utilize auto-generated type definitions
import type { 
  Page, 
  PageInfo,
  Comment,
  SyncStatus
} from '@growi/sdk-typescript/v3';

// TypeScript's type checking detects errors at compile time
const pageInfo: PageInfo = {
  path: '/test',
  // Other required properties...
};

Code Generation and Supported GROWI Versions

This project automatically generates code from GROWI's official OpenAPI specifications:

  • Code generation command: pnpm run generate:api
  • Configuration file: orval.config.ts
  • Automatic updates: GitHub Actions periodically checks for specification updates

Contributing to Development

Development Environment Setup

  1. Clone the repository:
git clone https://github.com/weseek/growi-sdk-typescript.git
cd growi-sdk-typescript
  1. Install dependencies:
pnpm install
  1. Generate API client:
pnpm run generate:api

Development Workflow

The following workflows are automatically executed by GitHub Actions:

  1. Specification update detection: GitHub Actions periodically checks for changes in OpenAPI specifications
  2. Automatic code generation: When changes are detected, new client code is automatically generated
  3. Diff review: Review the generated code differences and check for breaking changes
  4. Pull request creation: Automatically create pull requests when changes are found

Development Guidelines

  • Coding standards: Uses Biome
  • Linting: pnpm run lint
  • Build: pnpm run build

How to Contribute

  1. Report Issues: Report bugs and feature requests on GitHub Issues
  2. Pull Requests:
    • Fork and create a branch
    • Implement changes
    • Add tests (if applicable)
    • Create a pull request

License

This project is released under the MIT License.


Notice

This SDK is under development. APIs may change without notice. Please thoroughly test before using in production environments.