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

nortra-crm-sdk

v1.2.0

Published

Isomorphic JavaScript SDK for Nortra CRM

Downloads

423

Readme

Nortra CRM SDK

Isomorphic JavaScript SDK for Nortra CRM. Works seamlessly in the browser, Node.js, and edge runtimes.

Overview

A comprehensive SDK to integrate CRM functionalities effortlessly into your JavaScript or TypeScript applications.

Key Features

  • Isomorphic Support: Run anywhere - browsers, Node.js, and edge environments.
  • TypeScript Native: First-class TypeScript support with exported types.
  • Promise-based API: Modern async/await support out of the box.

Installation

Install using npm:

npm install nortra-crm-sdk

Or using yarn:

yarn add nortra-crm-sdk

Quick Start

Initialize the SDK and submit a lead:

import { NortraCRM } from 'nortra-crm-sdk';

// Initialize with both Workspace ID and API Key
NortraCRM.init({
  workspaceId: 'your-workspace-id',
  apiKey: 'your-api-key', // Required
});

// Submit a new lead
const result = await NortraCRM.submitLead({
  email: '[email protected]',
  fullName: 'Jane Doe',
  phone: '+1 555 000 0000',
  property: 'Contact Page',
  notes: 'Interested in the Pro plan',
});

if (result.success) {
  console.log('Lead submitted successfully!');
} else {
  console.error('Failed to submit lead:', result.error);
}

Configuration Reference

NortraCRM.init(config)

Must be called once prior to using any SDK methods (e.g., during application boot).

| Parameter | Type | Required | Description | | ------------- | -------- | -------- | ------------------------------------------------ | | workspaceId | string | Yes | Your unique Nortra workspace identifier. | | apiKey | string | Yes | API key for authenticated requests. |


API Reference

NortraCRM.submitLead(leadData)

Submits lead information to your CRM. Returns a Promise<LeadResponse>.

Note: If the SDK was not initialized with both workspaceId and apiKey, this method will return a failed LeadResponse indicating the initialization error without making a network request.

| Parameter | Type | Required | Description | | ---------------- | -------- | -------- | ------------------------------------------------ | | email | string | Yes | Lead's email address. | | fullName | string | No | Lead's full name. | | phone | string | No | Lead's phone number. | | property | string | No | Source property (default: "Website Form"). | | notes | string | No | Free-text notes or additional details. | | externalLeadId | string | No | Your own ID to correlate leads across systems. |

LeadResponse

The structure of the response returned by submitLead:

{
  success: boolean;
  error?: string;   // Present if the request fails
  status?: number;  // HTTP status code if the request fails
}

Environment Examples

React Integration

import { NortraCRM } from 'nortra-crm-sdk';

// Initialize once at the root of your application
NortraCRM.init({ 
  workspaceId: import.meta.env.VITE_WORKSPACE_ID,
  apiKey: import.meta.env.VITE_API_KEY
});

async function handleSubmit(e: React.FormEvent<HTMLFormElement>) {
  e.preventDefault();
  const form = new FormData(e.currentTarget);
  
  const result = await NortraCRM.submitLead({
    email: form.get('email') as string,
    fullName: form.get('name') as string,
  });
  
  if (!result.success) {
    alert(`Error: ${result.error}`);
  }
}

Node.js / Server-side

import { NortraCRM } from 'nortra-crm-sdk';

NortraCRM.init({ 
  workspaceId: process.env.NORTRA_WORKSPACE_ID,
  apiKey: process.env.NORTRA_API_KEY
});

const result = await NortraCRM.submitLead({ 
  email: '[email protected]' 
});

HTML + CDN (No Bundler)

<script src="https://unpkg.com/nortra-crm-sdk"></script>
<script>
  NortraCRM.NortraCRM.init({ 
    workspaceId: 'your-workspace-id',
    apiKey: 'your-api-key'
  });
</script>

TypeScript

Full TypeScript support is built-in. No external @types package is necessary.

import { NortraCRM, LeadData, LeadResponse } from 'nortra-crm-sdk';

License

MIT