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 🙏

© 2024 – Pkg Stats / Ryan Hefner

@paystory/capacitor-headwind-mdm

v1.0.2

Published

Capacitor wrapper for Headwind MDM

Downloads

5

Readme

Capacitor Headwind MDM

Capacitor wrapper for Headwind MDM

Install

npm install @paystory/capacitor-headwind-mdm
npx cap sync

Example

import { HeadwindMDM } from '@paystory/capacitor-headwind-mdm';

// Check if HeadwindMDM is available
if (await HeadwindMDM.isConnected()) {
    // Perfect!
}

// Getting a value from server
const value = await HeadwindMDM.get({attr: 'hello'});

// Getting the device id
const deviceId = await HeadwindMDM.getDeviceId();

API

connect()

connect() => any

Connect to Headwind MDM service and set the event handler. This method returns true on success and false if Headwind MDM is not running.

Returns: any

Since: 1.0.0


disconnect()

disconnect() => any

Disconnect from Headwind MDM

Returns: any

Since: 1.0.0


isConnected()

isConnected() => any

Check the connection status. You can use the library functions if this method returns true.

Returns: any

Since: 1.0.0


getServerHost()

getServerHost() => any

Get the host name of Headwind MDM server

Returns: any

Since: 1.0.0


getSecondaryServerHost()

getSecondaryServerHost() => any

Get the secondary host name of Headwind MDM server

Returns: any

Since: 1.0.0


getServerPath()

getServerPath() => any

Get the path of Headwind MDM web panel

Returns: any

Since: 1.0.0


getServerUrl()

getServerUrl() => any

Get the URL of Headwind MDM server

Returns: any

Since: 1.0.0


getSecondaryServerUrl()

getSecondaryServerUrl() => any

Get the secondary URL of Headwind MDM server

Returns: any

Since: 1.0.0


getDeviceId()

getDeviceId() => any

Get the device ID (number)

Returns: any

Since: 1.0.0


getCustom(...)

getCustom(options: { number: number; }) => any

Get the custom variable defined on the server (number can be from 1 to 3)

| Param | Type | | ------------- | -------------------------------- | | options | { number: number; } |

Returns: any

Since: 1.0.0


log(...)

log(options: { level: ErrorLevel; tag: string; message: string; }) => any

Sends a log message to the server

| Param | Type | | ------------- | ------------------------------------------------------------------------------------------- | | options | { level: ErrorLevel; tag: string; message: string; } |

Returns: any

Since: 1.0.0


v(...)

v(options: { tag: string; message: string; }) => any

These methods are similar to android.util.Log. They combine writing to Android internal log (logcat) and sending the log message to the server.

| Param | Type | | ------------- | ---------------------------------------------- | | options | { tag: string; message: string; } |

Returns: any

Since: 1.0.0


d(...)

d(options: { tag: string; message: string; }) => any

These methods are similar to android.util.Log. They combine writing to Android internal log (logcat) and sending the log message to the server.

| Param | Type | | ------------- | ---------------------------------------------- | | options | { tag: string; message: string; } |

Returns: any

Since: 1.0.0


i(...)

i(options: { tag: string; message: string; }) => any

These methods are similar to android.util.Log. They combine writing to Android internal log (logcat) and sending the log message to the server.

| Param | Type | | ------------- | ---------------------------------------------- | | options | { tag: string; message: string; } |

Returns: any

Since: 1.0.0


w(...)

w(options: { tag: string; message: string; }) => any

These methods are similar to android.util.Log. They combine writing to Android internal log (logcat) and sending the log message to the server.

| Param | Type | | ------------- | ---------------------------------------------- | | options | { tag: string; message: string; } |

Returns: any

Since: 1.0.0


e(...)

e(options: { tag: string; message: string; }) => any

These methods are similar to android.util.Log. They combine writing to Android internal log (logcat) and sending the log message to the server.

| Param | Type | | ------------- | ---------------------------------------------- | | options | { tag: string; message: string; } |

Returns: any

Since: 1.0.0


get(...)

get(options: { attr: string; defValue?: string; }) => any

Gets an attribute defined in “Application settings” tab of the configuration.

| Param | Type | | ------------- | ------------------------------------------------- | | options | { attr: string; defValue?: string; } |

Returns: any

Since: 1.0.0


set(...)

set(options: { attr: string; value: string; }) => any

Sets an attribute (not yet implemented)

| Param | Type | | ------------- | --------------------------------------------- | | options | { attr: string; value: string; } |

Returns: any

Since: 1.0.0


apply()

apply() => any

Forces uploading the attributes to the server (not yet implemented)

Returns: any

Since: 1.0.0


addListener(...)

addListener(eventName: 'onHeadwindMDMConnected', listenerFunc: OnHeadwindMDMConnectedListener) => Promise<PluginListenerHandle> & PluginListenerHandle

Called when the connection is established. In this method, you can retrieve your app settings from the server.

| Param | Type | | ------------------ | ------------------------------------------------------------ | | eventName | "onHeadwindMDMConnected" | | listenerFunc | (event: OnHeadwindMDMConnectedEvent) => void |

Returns: any

Since: 1.0.0


addListener(...)

addListener(eventName: 'onHeadwindMDMDisconnected', listenerFunc: OnHeadwindMDMDisconnectedListener) => Promise<PluginListenerHandle> & PluginListenerHandle

Called when the connection is interrupted. This method doesn’t require any actions and it is usually followed by onHeadwindMDMConnected() within some seconds.

| Param | Type | | ------------------ | --------------------------------------------------------------- | | eventName | "onHeadwindMDMDisconnected" | | listenerFunc | (event: OnHeadwindMDMDisconnectedEvent) => void |

Returns: any

Since: 1.0.0


addListener(...)

addListener(eventName: 'onHeadwindMDMConfigChanged', listenerFunc: OnHeadwindMDMConfigChangedListener) => Promise<PluginListenerHandle> & PluginListenerHandle

Called when the application settings were changed on the server. In this method, you need to refresh your application settings.

| Param | Type | | ------------------ | ---------------------------------------------------------------- | | eventName | "onHeadwindMDMConfigChanged" | | listenerFunc | (event: OnHeadwindMDMConfigChangedEvent) => void |

Returns: any

Since: 1.0.0


Interfaces

ConnectResult

| Prop | Type | | --------------- | -------------------- | | connected | boolean |

IsConnectedResult

| Prop | Type | | ----------------- | -------------------- | | isConnected | boolean |

GetServerHostResult

| Prop | Type | | ---------------- | ------------------- | | serverHost | string |

GetSecondaryServerHostResult

| Prop | Type | | ------------------------- | ------------------- | | secondaryServerHost | string |

GetServerPathResult

| Prop | Type | | ---------------- | ------------------- | | serverPath | string |

GetServerUrlResult

| Prop | Type | | --------------- | ------------------- | | serverUrl | string |

GetSecondaryServerUrlResult

| Prop | Type | | ------------------------ | ------------------- | | secondaryServerUrl | string |

GetDeviceIdResult

| Prop | Type | | -------------- | ------------------- | | deviceId | string |

GetCustomResult

| Prop | Type | | ------------ | ------------------- | | custom | string |

GetResult

| Prop | Type | | ----------- | ------------------- | | value | string |

SetResult

| Prop | Type | | ---------------- | -------------------- | | successful | boolean |

PluginListenerHandle

| Prop | Type | | ------------ | ------------------------- | | remove | () => any |

Enums

ErrorLevel

| Members | Value | | ------------- | -------------- | | ERROR | 1 | | WARN | 2 | | INFO | 3 | | DEBUG | 4 | | VERBOSE | 5 |