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

orders-sdk-rn-client

v0.1.44

Published

React native client for Orders SDK

Downloads

148

Readme

orders-sdk-rn-client

React Native client for Orders SDK, providing a way to interact with order events and synchronize them with cloud-based services.

Installation

To install the package:

npm install @oolio-group/rn-orders-sdk

or with Yarn:

yarn add @oolio-group/rn-orders-sdk

Linking the Native Module

Ensure that the package is properly linked to your React Native project. If you're using React Native 0.60 or higher, this should be done automatically.

For iOS, run:

cd ios
pod install

Requirements

  • Android Only: This SDK currently supports only Android. For iOS support, future updates will be required.

Usage

Initializing the SDK

To initialize the SDK, call the initOrdersSDK() function.

import { initOrdersSDK } from 'orders-sdk-rn-client';

initOrdersSDK();

Subscribing to Order Events

You can subscribe to order events using the subscribeOrderEvents function. This function accepts a filter (EventsFilter) and returns an OrderEventEmitter for handling event subscriptions.

import { subscribeOrderEvents } from 'orders-sdk-rn-client';

const filter = {
  orderId: '12345',
  status: 'confirmed'
};

const orderEventEmitter = await subscribeOrderEvents(filter);

orderEventEmitter.addListener('event', (event) => {
  console.log('Received event: ', event);
});

Adding Order Events

To add events to the SDK, use the addOrderEvents function. You can pass an array of events in JSON format.

import { addOrderEvents } from 'orders-sdk-rn-client';

const events = [
  { id: '1', orderId: '12345', event: 'ORDER_CONFIRMED' },
  { id: '2', orderId: '12345', event: 'ORDER_DISPATCHED' },
];

addOrderEvents(events);

Retrieving Order Events

To get the stored events based on a filter, use getOrderEvents.

import { getOrderEvents } from 'orders-sdk-rn-client';

const filter = {
  orderId: '12345',
};

const events = await getOrderEvents(JSON.stringify(filter));
console.log('Events: ', events);

Clearing Order Events

To clear all events from the SDK:

import { clearOrderEvents } from 'orders-sdk-rn-client';

clearOrderEvents();

Syncing Events with Cloud

To sync events with the cloud using a custom configuration, call syncCloudEvents.

import { syncCloudEvents } from 'orders-sdk-rn-client';

const config = {
  url: 'https://example.com/api/sync',
  headers: {
    'Authorization': 'Bearer token',
    'Content-Type': 'application/json',
  },
  body: {
    orderId: '12345',
  },
};

syncCloudEvents(config);

Error Handling for Unsupported Platforms

This SDK currently supports Android. If you call any functions on unsupported platforms, the SDK will not perform any actions. You can use the isSupported() method to check if the SDK is supported on the current platform.

import { isSupported } from 'orders-sdk-rn-client';

if (!isSupported()) {
  console.warn('Orders SDK is only supported on Android');
}

Types

EventsFilter

The EventsFilter object allows you to filter events based on criteria like orderId, status, etc.

interface EventsFilter {
  orderId?: string;
  status?: string;
}

CloudSyncConfiguration

The CloudSyncConfiguration object is used to configure cloud synchronization.

interface CloudSyncConfiguration {
  url: string;
  headers: Record<string, string>;
  body: any;
}

Contributing

Contributions are welcome! See the contributing guide to learn how to contribute to the repository and the development workflow.

License

MIT


Made with create-react-native-library