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

@unione-repo/javascript-sdk

v1.0.0

Published

UniOne API Client Library for JavaScript

Readme

@unione-repo/javascript-sdk

UniOne - JavaScript client for @unione-repo/javascript-sdk All UniOne API methods require HTTPS connection. UniOne accepts HTTP POST requests in JSON format up to 10 megabytes long and returns HTTP response also in JSON. API endpoint (or base URL) depends on which datacenter the user is registered at.The preferred way is to use https://api.unione.io/en/transactional/api/v1 endpoint, but also you can use https://eu1.unione.io/en/transactional/api/v1 or https://us1.unione.io/en/transactional/api/v1 directly, depending on the host your account was registered at. This SDK is automatically generated by the OpenAPI Generator project:

  • API version: 1.76
  • Package version: 1.0.0
  • Generator version: 7.19.0
  • Build package: org.openapitools.codegen.languages.JavascriptClientCodegen For more information, please visit https://cp.unione.io/en/support

Installation

For Node.js

npm

Install it via:

npm install @unione-repo/javascript-sdk --save

Finally, you need to build the module:

npm run build
Local development

To use the library locally without publishing to a remote npm registry, first install the dependencies by changing into the directory containing package.json (and this README). Let's call this JAVASCRIPT_CLIENT_DIR. Then run:

npm install

Next, link it globally in npm with the following, also from JAVASCRIPT_CLIENT_DIR:

npm link

To use the link you just defined in your project, switch to the directory you want to use your @unione-repo/javascript-sdk from, and run:

npm link /path/to/<JAVASCRIPT_CLIENT_DIR>

Finally, you need to build the module:

npm run build

git

If the library is hosted at a git repository, e.g.https://github.com/unione-repo/javascript-sdk then install it via:

    npm install unione-repo/javascript-sdk --save

For browser

The library also works in the browser environment via npm and browserify. After following the above steps with Node.js and installing browserify with npm install -g browserify, perform the following (assuming main.js is your entry file):

browserify main.js > bundle.js

Then include bundle.js in the HTML pages.

Webpack Configuration

Using Webpack you may encounter the following error: "Module not found: Error: Cannot resolve module", most certainly you should disable AMD loader. Add/merge the following section to your webpack config:

module: {
  rules: [
    {
      parser: {
        amd: false
      }
    }
  ]
}

Getting Started

Please follow the installation instruction and execute the following JS code:

var UniOne = require('@unione-repo/javascript-sdk');

var defaultClient = UniOne.ApiClient('api.unione.io').instance;
// Configure API key authorization: apiKeyAuth
var apiKeyAuth = defaultClient.authentications['apiKeyAuth'];
apiKeyAuth.apiKey = "YOUR API KEY"

var api = new UniOne.EmailApi()

var bodyObject = new UniOne.BodyObject();
bodyObject.setHtml("<b>Hello, {{to_name}}</b>");

var messageObject = new UniOne.MessageObject();
messageObject.setSubject("UniOne test email");
messageObject.setFromEmail("[email protected]");
messageObject.setRecipients([{"email":"[email protected]","substitutions":{"to_name":"John Smith"},"metadata":{"campaign_id":"c77f4f4e-3561-49f7-9f07-c35be01b4f43"}}])
messageObject.setBody($bodyObject);

var emailSendRequest = new UniOne.EmailSendRequest();
emailSendRequest.setMessage(messageObject);

api.emailSend(emailSendRequest).then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

Documentation for API Endpoints

All URIs are relative to https://api.unione.io/en/transactional/api/v1

Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- UniOne.DomainApi | domainDelete | POST /domain/delete.json | Deletes a domain. Attention: you should use project's API key to delete a project's domain. UniOne.DomainApi | domainGetDnsRecords | POST /domain/get-dns-records.json | Returns info on domain DNS setup for using with UniOne. UniOne.DomainApi | domainList | POST /domain/list.json | Returns a list of all registered domains for user or project, together with statuses of last validations. UniOne.DomainApi | domainValidateDkim | POST /domain/validate-dkim.json | Validates DKIM record for domain. UniOne.DomainApi | domainValidateVerificationRecord | POST /domain/validate-verification-record.json | Triggers verification record validation for domain. UniOne.EmailApi | emailSend | POST /email/send.json | Sends an email or a bunch of emails UniOne.EmailApi | emailSubscribe | POST /email/subscribe.json | Sends an email with (re)subscribe link. UniOne.EmailValidationApi | emailValidationSingle | POST /email-validation/single.json | A maximum of two concurrent requests are allowed; if you send more requests, an error will be returned. Since the verification process should be completed promptly, we've set a time limit on email check. If we encounter a slow email server that does not respond in 5 seconds, you may get an “unknown” status. UniOne.EventDumpApi | eventDumpCreate | POST /event-dump/create.json | This asynchronous method initiates the preparation of data dump in CSV format. The number of dump files created or stored is limited to 10; to order more files, you have to delete one of the previous ones or wait until they will be deleted automatically. A newly created dump file is kept for 8 hours. If the request period is more than a day or there are too many events then several files will be generated and each file will contain no more than 100,000 events. File contains columns with the following information - 'event_time', 'job_id', 'from_email', 'email', 'status', 'delivery_status', 'metadata', 'destination_response', 'user_agent', 'url', 'ip', 'tags' and 'project_id' (for accounts with projects enabled). You can change the fields and include 'subject' field using 'dump_fileds' parameter. UniOne.EventDumpApi | eventDumpDelete | POST /event-dump/delete.json | Removes dump from queue or storage. UniOne.EventDumpApi | eventDumpGet | POST /event-dump/get.json | Returns dump properties for a given identifier UniOne.EventDumpApi | eventDumpList | POST /event-dump/list.json | This method does not require any parameters; returns the full list of existing dumps. UniOne.ObsoleteApi | unsubscribedCheck | POST /unsubscribed/check.json | Checks if an email is unsubscribed. UniOne.ObsoleteApi | unsubscribedList | POST /unsubscribed/list.json | Returns a list of all unsubscribed emails since provided date. UniOne.ObsoleteApi | unsubscribedSet | POST /unsubscribed/set.json | Registers a new unsubscribed email. UniOne.ProjectApi | projectCreate | POST /project/create.json | Creates a new project. UniOne.ProjectApi | projectDelete | POST /project/delete.json | Deletes a project. UniOne.ProjectApi | projectList | POST /project/list.json | Lists projects. UniOne.ProjectApi | projectUpdate | POST /project/update.json | Updates a project. UniOne.SuppressionApi | suppressionDelete | POST /suppression/delete.json | Deletes an email from suppression list (only records with is_deletable=true). If there are no entries of this email in the suppression list, API error 3003 is returned. If such entries exist but no one can be deleted, API error 3004 is returned. If daily limit of deletes exceeded, API error 906 is returned. UniOne.SuppressionApi | suppressionGet | POST /suppression/get.json | Gets a reason and date of email suppression. UniOne.SuppressionApi | suppressionList | POST /suppression/list.json | Returns a suppression list since provided date. UniOne.SuppressionApi | suppressionSet | POST /suppression/set.json | Adds an email address to the suppression list. You can always remove this address from the suppression list later using the suppression/delete method. UniOne.SystemApi | systemInfo | POST /system/info.json | Gets user or project info by API key. UniOne.TagApi | tagDelete | POST /tag/delete.json | Removes tag. UniOne.TagApi | tagList | POST /tag/list.json | This method returns the full list of user-defined tags. Does not receive any parameters. UniOne.TemplateApi | templateDelete | POST /template/delete.json | Deletes a template by id. UniOne.TemplateApi | templateGet | POST /template/get.json | Gets template properties by it's id. UniOne.TemplateApi | templateList | POST /template/list.json | Returns the list of all or some templates of the account. UniOne.TemplateApi | templateSet | POST /template/set.json | Creates or updates an email template. UniOne.WebhookApi | webhookDelete | POST /webhook/delete.json | Deletes an event notification handler UniOne.WebhookApi | webhookGet | POST /webhook/get.json | Gets properties of a webhook. UniOne.WebhookApi | webhookList | POST /webhook/list.json | List all or some webhooks (event notification handlers) of a user or a project. UniOne.WebhookApi | webhookSet | POST /webhook/set.json | Sets or edits a webhook, i.e. an event notification handler.

Documentation for Models

Documentation for Authorization

Authentication schemes defined for the API:

apiKeyAuth

  • Type: API key
  • API key parameter name: X-API-KEY
  • Location: HTTP header