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

@nol-open-platform/open-platform-connector

v1.1.3

Published

## 빌드 방법

Readme

NOL Open Platform

NOL Open Platform은 모바일 앱과 웹뷰 간의 통신을 위한 JavaScript SDK입니다. iOS와 Android 네이티브 앱에서 웹뷰로 로드되는 웹 페이지에서 사용할 수 있습니다.

주요 기능

  • 인증: 챌린지-응답에 필요한 값과 회원키를 반환
  • 로그인 상태 확인: NOL 앱의 로그인 상태를 확인
  • 결제: 결제 웹뷰 열기
  • 웹뷰 제어: 웹뷰 닫기 기능

사용 환경

이 SDK는 iOS/Android 네이티브 앱의 웹뷰 환경에서만 동작합니다.

✅ 지원 환경

  • iOS 앱 내 웹뷰
  • Android 앱 내 웹뷰

❌ 미지원 환경 (웹 브라우저)

웹 브라우저 환경에서 사용 시 다음과 같이 동작합니다:

  • 자동으로 isSuccess: false 응답 반환
  • 콘솔에 에러 메시지 출력: [NolAppBridge] 웹 환경에서는 사용할 수 없습니다. iOS/Android 앱 환경에서만 사용 가능합니다.

예시:

// 웹 브라우저에서 실행 시
const result = await NolAppBridge.setup();
// 콘솔: ❌ [NolAppBridge] 웹 환경에서는 사용할 수 없습니다. iOS/Android 앱 환경에서만 사용 가능합니다.
// result: { isSuccess: false, value: {} }

설치

npm install @nol-open-platform/open-platform-connector

API 참조

init: 기본 설정

import {NolAppBridge} from '@nol-open-platform/open-platform-connector';

// 앱 프록시 ID로 초기화
NolAppBridge.init('your-app-proxy-id');

setup: 인증 처리

챌린지-응답에 필요한 값과 회원키를 반환한다. 로그인이 되어있지 않다면 NOL 로그인 페이지로 이동합니다.

반환값: Promise<OpenPlatformBridgeCallbackResult>

예시:

try {
    const result = await NolAppBridge.setup();
    if (result.isSuccess) {
      console.log('인증 성공');
      console.log('회원 ID:', result.value.appMemberProxyId);
      console.log('챌린지 ID:', result.value.challengeId);
      console.log('챌린지 값:', result.value.challengeValue);
      console.log('상태 값:', result.value.status);
    } else {
      if (result.value.status === "CANCEL_LOGIN") {
        console.log('로그인 취소됨');
      } else if (result.value.status === "CHALLENGE_FAILED") {
        console.log('챌린지 검증 실패');
      }
      console.log('인증 실패');
    }
} catch (error) {

  console.error('인증 오류:', error);
}

isLogin: 로그인 상태 확인

NOL 앱의 로그인 상태를 확인합니다.

반환값: Promise<OpenPlatformBridgeCallbackResult>

예시:

try {
    const result = await NolAppBridge.isLogin();
    if (result.isSuccess) {
        console.log('로그인 상태 확인 성공');
        console.log('로그인 상태:', result.value.isLogin);
    } else {
        console.log('로그인 상태 확인 실패');
    }
} catch (error) {
    console.error('로그인 상태 확인 오류:', error);
}

openPayment: 결제 웹뷰 열기

결제 웹뷰를 엽니다.

파라미터:

  • param (OpenPaymentParam): 결제 파라미터
    • orderNo (string): 주문 번호

반환값: Promise<OpenPlatformBridgeCallbackResult>

예시:

// 결제 파라미터 설정
const paymentParam = {
    orderNo: '1234567890'
};

try {
    const result = await NolAppBridge.openPayment(paymentParam);
    if (result.isSuccess) {
        console.log('결제 웹뷰 열기 성공');
    } else {
        console.log('결제 웹뷰 열기 실패');
    }
} catch (error) {
    console.error('결제 웹뷰 열기 오류:', error);
}

closeWebView: 웹뷰 닫기

웹뷰를 닫을 때 사용하는 함수입니다. 결제 완료 후 또는 사용자가 취소할 때 호출합니다.

반환값: Promise<OpenPlatformBridgeCallbackResult>

예시:

try {
    const result = await NolAppBridge.closeWebView();
    if (result.isSuccess) {
        console.log('웹뷰 닫기 성공');
    } else {
        console.log('웹뷰 닫기 실패');
    }
} catch (error) {
    console.error('웹뷰 닫기 오류:', error);
}

openInAppBrowser: 브라우저 열기

인앱 브라우저를 열때 사용하는 함수입니다. 관리자에서 등록된 url만 사용할 수 있습니다.

반환값: Promise<OpenPlatformBridgeCallbackResult>

예시:

try {
  const result = await NolAppBridge.openInAppBrowser({
    url: 'https://www.example.com'
  });
  if (result.isSuccess) {
    console.log('브라우저 열기 성공');
  } else {
    console.log('브라우저 열기 실패');
  }
} catch (error) {
  console.error('브라우저 열기 오류:', error);
}

openAccountManagement: 계정 관리 페이지 열기

NOL 앱의 계정 관리 페이지 웹뷰를 엽니다.

반환값: Promise<OpenPlatformBridgeCallbackResult>

예시:

try {
  const result = await NolAppBridge.openAccountManagement();
  if (result.isSuccess) {
    console.log('웹뷰 열기 성공');
  } else {
    console.log('윕뷰 열기 실패');
  }
} catch (error) {
  console.error('웹뷰 열기 오류:', error);
}

타입 정의

interface SetupResponseSuccess {
  status: "OK";
  appMemberProxyId: string;
  challengeId: string;
  challengeValue: string;
}

interface SetupResponseCancel {
  status: "CANCEL_LOGIN";
}

interface SetupResponseChallengeFailed {
  status: "CHALLENGE_FAILED";
}

type SetupResponse = SetupResponseSuccess | SetupResponseCancel | SetupResponseChallengeFailed;

interface OpenPaymentParam {
  orderNo: string;
}

interface IsLoginResponse {
  isLogin: boolean;
}

interface OpenPlatformBridgeCallbackResult<T> {
  isSuccess: boolean;
  value: T;
}

type OpenPlatformBridgeCallbackFunction<T> = (result: OpenPlatformBridgeCallbackResult<T>) => void;

버전

현재 버전: 1.1.3