Getting Started

Getting started with the ExtraHorizon Javascript SDK

This package serves as a JavaScript wrapper around all Extra Horizonarrow-up-right cloud services providing you with fast and easy way to integrate with the Extra Horizon platform.

Installation

npm install @extrahorizon/javascript-sdk

Quick start

Please see authentication examples for more options.

import { createOAuth2Client } from "@extrahorizon/javascript-sdk";

(async () => {
  const exh = createOAuth2Client({
    host: "",
    clientId: "",
  });

  await exh.auth.authenticate({
    password: "",
    username: "",
  });

  console.log("exh.users.me()", await exh.users.me());
})();

Features

  • Autharrow-up-right: Provides authentication functionality. The Authentication service supports both OAuth 1.0a and OAuth 2.0 standards.

  • Usersarrow-up-right: The user service stands in for managing users themselves, as well as roles related to users and groups of users.

  • Dataarrow-up-right: A flexible data storage for structured data. Additionally, the service enables you to configure a state machine for instances of the structured data. You can couple actions that need to be triggered by the state machine, when/as the entities (instance of structured data) change their state. Thanks to these actions you can define automation rules (see later for more in depth description). These actions also make it possible to interact with other services.

  • Filesarrow-up-right: A service that handles file storage, metadata & file retrieval based on tokens.

  • Tasksarrow-up-right: Start functions on demand, directly or at a future moment.

  • Templates: arrow-up-rightThe template service manages templates used to build emails. It can be used to retrieve, create, update or delete templates as well as resolving them.

  • Mails:arrow-up-right Provides mail functionality for other services.

  • Configurations:arrow-up-right Provides storage for custom configuration objects. On different levels (general, groups, users, links between groups and users).

  • Dispatchers:arrow-up-right Configure actions that need to be invoked when a specific event is/was triggered.

  • Payments:arrow-up-right A service that provides payment functionality.

  • Profilesarrow-up-right: Storage service of profiles. A profile is a separate object on its own, comprising medical information like medication and medical history, as well as technical information, like what phone a user is using.

  • Notifications:arrow-up-right A service that handles push notifications.

  • Localizations:arrow-up-right Storage and retrieval of text snippets, translated into multiple languages.

  • Events:arrow-up-right Service that provides event (publish/subscribe) functionality for other services.

🔑 License

The MIT License (MIT). Please see License Filearrow-up-right for more information.

Last updated