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

api-gateway-react-native

v3.0.0

Published

api-gatway-react-native-sdk

Readme

api-gateway-react-native

Changelog (v2.0.2)

  • Initial integration of the API Gateway SDK.

Changelog (v2.0.0)

  • Initial integration of the API Gateway SDK.

Installation

npm install api-gateway-react-native

Usage

mi

import ApiGatway from 'api-gateway-react-native';

const nativeHeaders = await ApiGatway.getHeaders();

nativeHeaders retrun neesssary header of your applicaiotion. add your own interfaecotor or http request header or RTK or whatable.

Example with RTK quaary with Merge headers into request


import { createApi } from '@reduxjs/toolkit/query/react';
import { fetchBaseQuery } from '@reduxjs/toolkit/query/react';
import ApiGatway from 'api-gateway-react-native';

const baseQueryWithNativeHeaders = async (args: any, api: any, extraOptions: any) => {
  const baseQuery = fetchBaseQuery({
    baseUrl: 'http://example.com', //
  });

  let nativeHeaders: Record<string, string> = {};

  try {
    nativeHeaders = await ApiGatway.getHeaders();
  } catch (e: any) {
    console.warn('Failed to get native headers:', e.message || e);
  }

  // Merge headers into request
  const queryArgs =
    typeof args === 'string'
      ? { url: args, headers: nativeHeaders }
      : { ...args, headers: { ...args.headers, ...nativeHeaders } };

  return baseQuery(queryArgs, api, extraOptions);
};

export const api = createApi({
  reducerPath: 'api',
  baseQuery: baseQueryWithNativeHeaders,
  endpoints: (builder) => ({
    getAuthCasbinTest: builder.query<any, void>({
      query: () => '/exampleAPIEndpoint', // GET request
    }),
  }),
});

export const { useGetAuthCasbinTestQuery } = api;

Onboarding Process

  1. Send email mentioning all of your package names (com.example.debug, com.example.release etc) and send to [email protected] to get bind-client-config.json.
  2. Place bind-client-config.json in the root directory of your project.

Project Setup Android

Root build.gradle.kts

Add the Mapnests config-loader plugin.

Plugin: com.mapnests.config-loader:com.mapnests.config-loader.gradle.plugin:4.0.0

buildscript {
    repositories {
        mavenLocal()
        gradlePluginPortal()
        google()
        mavenCentral()
    }
    dependencies {
        classpath("com.android.tools.build:gradle:8.13.1")
        classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:2.2.21")
        classpath("com.mapnests.config-loader:com.mapnests.config-loader.gradle.plugin:4.0.0")
    }
}

Module build.gradle

Set Java and Kotlin compatibility:

plugins {
  // other gradle plugins
  id("com.mapnests.config-loader")
}

compileOptions {
    sourceCompatibility = JavaVersion.VERSION_17
    targetCompatibility = JavaVersion.VERSION_17
}

kotlin {
    compilerOptions {
        jvmTarget.set(org.jetbrains.kotlin.gradle.dsl.JvmTarget.JVM_17)
    }
}

Project Setup IOS

  1. Drag and drop the TNApiGetwaySDK.xcframework into your project’s Project Navigator (e.g., into a Frameworks group).
  2. Select your project in Xcode → TargetGeneral tab.
  3. Scroll down to Frameworks, Libraries, and Embedded Content.
  4. Click the + button → Add TNApiGetwaySDK.xcframework.
  5. Set Embed to Embed & Sign.

Root add TNApiGetwaySDKConfigFile under your Info.plist


<dict>
    <key>TNApiGetwaySDKConfigFile</key>
    <string>bind-client-config.json</string>
</dict>

#Add your URLProtocol class to URLSession


    let config = URLSessionConfiguration.default
    config.protocolClasses = [ClientNetworkProtocol.self] // Inject framework headers
    return URLSession(configuration: config)

Developer Notes

  • Keep package names consistent between JSON and Gradle.
  • HTTPS is preferred. Only enable HTTP with cleartext traffic if necessary.
  • If you receive a 401 error, recheck the app package name and make sure you are using the correct bind-client-config.json file.

Common Fixes

  • Check developers note

Support

For issues or feature requests contact us through email: [email protected]