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

@sutech_jp/raas-client-for-typescript

v0.5.8

Published

RaaS client for TypeScript

Downloads

1,962

Readme

RaaS Client for TypeScript

TypeScriptで実装されたRaaS(Report as a Service)クライアントライブラリです。このライブラリを使用することで、RaaSサービスへの接続と操作を簡単に行うことができます。

インストール

npm install @sutech_jp/raas-client-for-typescript

設定

RaaSクライアントを使用するには、接続設定とユーザーコンテキストが必要です。

接続設定

import { RaasConnectionConfig } from '@sutech_jp/raas-client-for-typescript';

const config: RaasConnectionConfig = {
  app: 'your-app-name',
  token: 'your-api-token',
  landscape: 'dev' // または 'prod'
};

app / tokenはSuTech担当者より提供された値を利用して下さい

ユーザーコンテキスト

import { RaasClientContext } from '@sutech_jp/raas-client-for-typescript';

const userContext: RaasClientContext = {
  tenant: 'your-tenant-id',
  tenantAlias: 'your-tenant-alias', // 障害調査などの際に利用しますので必要に応じてセットして下さい
  tenantType: 'paid', // 'paid', 'trial', 'demo', 'dev' のいずれか(オプション)
  sub: 'user-subject-id',
  email: '[email protected]', // ワークフローオプションを利用する場合には必須です
  subAlias: 'user-alias', // ワークフローオプションを利用する場合には必須です
  subDomain: 'user-domain' // ワークフローオプションを利用する場合には必須です
};

使用方法

GETリクエスト

import { get } from '@sutech_jp/raas-client-for-typescript';

// データ取得の例
const fetchData = async () => {
  try {
    const data = await get(config, userContext, '/api/endpoint');
    console.log('取得したデータ:', data);
  } catch (error) {
    console.error('エラー:', error);
  }
};

POSTリクエスト

import { post } from '@sutech_jp/raas-client-for-typescript';

// データ送信の例
const sendData = async () => {
  const payload = {
    key1: 'value1',
    key2: 'value2'
  };

  try {
    const response = await post(config, userContext, '/api/endpoint', payload);
    console.log('レスポンス:', response);
  } catch (error) {
    console.error('エラー:', error);
  }
};

PUTリクエスト

import { put } from '@sutech_jp/raas-client-for-typescript';

// データ更新の例
const updateData = async () => {
  const payload = {
    key1: 'updated-value1',
    key2: 'updated-value2'
  };

  try {
    const response = await put(config, userContext, '/api/endpoint', payload);
    console.log('レスポンス:', response);
  } catch (error) {
    console.error('エラー:', error);
  }
};

DELETEリクエスト

import { del } from '@sutech_jp/raas-client-for-typescript';

// データ削除の例
const deleteData = async () => {
  try {
    await del(config, userContext, '/api/endpoint');
    console.log('削除成功');
  } catch (error) {
    console.error('エラー:', error);
  }
};

エラーハンドリング

すべてのAPIリクエストメソッドは、HTTPエラーが発生した場合にエラーをスローします。try/catchブロックを使用してエラーを適切に処理してください。

開発

必要条件

  • Node.js 18以上
  • npm 7以上

ライセンス

SuTech-JP社の製品を利用するのに必要です