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

@infobank/infobank-omni-sdk-js

v1.1.1

Published

An ts SDK for OMNI services

Readme

infobank-omni-sdk-js v1.1.0


SDK Documentation Migration Guide API Reference Apache V2 License

infobank omni api sdk JavaScript(TypeScript) 입니다.

builder 패턴으로 파라미터를 구성할 수 있으며, JSON 으로도 구성하여 전송할 수 있습니다. node.js 와 next 환경에서 구동할 수 있으며 react 와 같은 front 환경에서는 CORS 가 발생할 수 있습니다.

바로가기 :


시작하기 (Getting Started)

## 소스 설치

## 방법 1
## 받으신 소스 파일을 원하는 경로에 설치합니다.
C:/sdk/omni-sdk-js

## 받으신 소스를 빌드합니다.
npm i
npm run build

## 사용하실 프로젝트에 SDK 를 로컬 경로로 링크합니다.
npm install ./[다운로드한 SDK의 경로]


## 방법 2
## 직접 node_module 에 복사합니다.
cp -R ./[다운로드한 SDK의 경로] ./node_modules/omni-sdk-js

## 직접 node_module 에 이동합니다.
cd ./node_modules/omni-sdk-js

## 받으신 소스를 빌드합니다.
npm i 
npm run build

## 방법 3
npm i @infobank/infobank-omni-sdk-js

사용법 (Usage)

토큰 발급

Node.js

const { OMNI, OMNIOptionsBuilder } = require('omni-sdk-js');

async function main() {
    try {
        const option = new OMNIOptionsBuilder()
            .setBaseURL(baseURL)
            .setId(userId)
            .setPassword(userPassword)
            .build();
        
        const omni = new OMNI(option);
        
        const token = await omni.auth.getToken();
        console.log('Token:', token);

    } catch (error) {
        console.error('Error:', error);
    }
}
main();

Next.js


import { NextResponse } from 'next/server';
import { OMNI, OMNIOptionsBuilder } from 'omni-sdk-js';

export async function POST() {
  try {
    const option = new OMNIOptionsBuilder()
            .setBaseURL(baseURL)
            .setId(userId)
            .setPassword(userPassword)
            .build();

    const omni = new OMNI(option);
    const response = await omni.auth?.getToken(); 
      
    return NextResponse.json(response);
  } catch {
    return NextResponse.json({ error: 'API 호출 실패' }, { status: 500 });
  }
}

File 업로드

Node.js

const { OMNI, OMNIOptionsBuilder } = require('omni-sdk-js');
const FormData = require('form-data');
const fs = require('fs');
const path = require('path'); 


const option = new OMNIOptionsBuilder()
  .setBaseURL(baseURL)
  .setToken(token)
  .build();

async function file() {
    try {
        const omni = new OMNI(option);
        
        const filePath = path.join(__dirname, './hqdefault.jpg');
        
        const formData = new FormData();
        formData.append('file', fs.createReadStream(filePath));
        
        const result = await omni.file.uploadFile({ serviceType: "MMS" }, formData);
        console.log('응답:', result);

    } catch (error) {
        console.error('Error:', error.response ? error.response.data : error.message);
    }
}

// 파일 업로드 함수 실행
file();

FORM 등록

Node.js


const { OMNI, OMNIOptionsBuilder, SMSBuilder, SMSRequestBodyBuilder, MMSRequestBodyBuilder, FormRequestBodyBuilder, AlimtalkBuilder, MessageFormBuilder, OMNIRequestBodyBuilder } = require('omni-sdk-js');

const option = new OMNIOptionsBuilder()
.setBaseURL(baseURL)
.setToken(token)
.build();


async function formPost() {
    try {
        
        const omni = new OMNI(option);
        
        /* JSON을 사용하여 생성 */
        const req ={ 
            messageForm : [
              {
                alimtalk: {
                  msgType: "AT",
                  senderKey: "{senderKey}",
                  templateCode: "{templateCode}",
                  text: "[테스트] \n알림톡 내용"
                }
              },
              {
                sms: {
                  from: "0310000000",
                  text: "test form message"
                }
              }
            ]
        };

        /* Builder를 사용하여 생성 */
        const alimtalk = new AlimtalkBuilder().setMsgType("AT").setSenderKey("senderKey").setTemplateCode("templatCode").setText("[테스트] \n알림톡 내용").build();
        const sms = new SMSBuilder().setFrom("0310000000").setText("test").build();
          
        const messageForm = new MessageFormBuilder().setAlimtalk(alimtalk).setSMS(sms).build();
        const req = new FormRequestBodyBuilder().setMessageForm(messageForm).build();
          
 

        // 비동기 함수인 getToken을 await로 호출
        const res = await omni.form.registForm(req);
        console.log('전송결과:', res);

    } catch (error) {
        console.error('Error:', error);
    }

}

formPost();

Next.js

import { NextResponse } from 'next/server';
import { OMNI, OMNIOptionsBuilder } from 'omni-sdk-ts';

const option = new OMNIOptionsBuilder()
.setBaseURL(baseURL)
.setToken(token)
.build();

export async function POST(req: Request) {
  try {
      
    const data = await req.json();
    
    const omni = new OMNI(option);
    const test = {
      messageForm: [
          {
              alimtalk : {
                  msgType: "AT",
                  senderKey: "{senderKey}",
                  templateCode: "{templateCode}",
                  text: "[테스트]\n알림톡 내용"
              }
          }, 
          {
              sms: {
                  from: "0310000000",
                  text: "test form message"
              }
          }
      ]
  }

    const response = await omni.form?.registForm(test);

    return NextResponse.json(response);
  } catch {
    return NextResponse.json({ error: 'API 호출 실패' }, { status: 500 });
  }
}

전송

Node.js

async function send() {
    try {
        const option = new OMNIOptionsBuilder()
            .setBaseURL(baseUrl)
            .setToken(token)
            .build();
        
        const omni = new OMNI(option);

        /* Builder를 사용하여 생성 */
        const req = new SMSRequestBodyBuilder()
            .setTo("01000000000")
            .setFrom("0316281500")
            .setText("테스트 발송입니다.")
            .build();

        /* JSON 사용하여 생성 */
        const req = {
            form : "0310000000",
            to : "010123455678",
            text : "test 발송입니다."
        }

        const res = await omni.send?.SNS(req);
        console.log('전송결과:', res);

        console.log(omni);
    } catch (error) {
        console.error('Error:', error);
    }

}

send();

Next.js

// src/app/api/test/route.js
import { NextResponse } from 'next/server';
import { OMNI, OMNIOptionsBuilder, SMSRequestBodyBuilder} from 'omni-sdk-js';

export async function POST() {

  const option = new OMNIOptionsBuilder().setBaseURL(baseUrl).setToken(token).build();

  const omni = new OMNI(option);

  /* Builder를 사용하여 생성 */
  const req = new SMSRequestBodyBuilder().setFrom("0310000000").setTo("01012364566").setText("test 발송입니다.").build();

  /* JSON 사용하여 생성 */
  const req = {
    form : "0310000000",
    to : "010123455678",
    text : "test 발송입니다."
  };

  const result  = await omni.send?.SNS(req);
  return NextResponse.json({ result: result });
}

리포트

Node.js

const { OMNI, OMNIOptionsBuilder } = require('omni-sdk-js');

const option = new OMNIOptionsBuilder()
.setBaseURL(baseUrl)
.setToken(token)
.build();
async function reportPolling() {
    try {
        const omni = new OMNI(option);
        
        const result = await omni.polling.getReport();
        console.log('data:', result);
    } catch (error) {
        console.error('Error:', error);
    }
}

reportPolling()

Next.js


import { NextResponse } from 'next/server';
import { OMNI, OMNIOptionsBuilder } from 'omni-sdk-ts';
const option = new OMNIOptionsBuilder()
.setBaseURL(baseUrl)
.setToken(token)
.build();


export async function GET() {
  try {

    const omni = new OMNI(option);
    let req;
    let res;
    res = await omni.polling?.getReport();
    
    return NextResponse.json(res);
  } catch  {
    return NextResponse.json({ error: 'API 호출 실패' }, { status: 500 });
  }
}

문의 (Contact)

본 문서와 관련된 기술 문의는 아래 메일 주소로 연락 바랍니다. 😄

[email protected]