0.1.0-alpha.1f • Published 2 years ago

@byteassign/freshdesk-appclient v0.1.0-alpha.1f

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

Byteassign's Freshdesk appclient is a library designed to assist in the development of front-end Freshdesk applications. It primarily provides types for the various components found within the Freshdesk eco-system.

Important
@byteassign is not affiliated with Freshworks in any way.

Installation

Install the package in your project directory as a development dependency with:

npm install @byteassign/freshdesk-appclient --save-dev

Documentation

Visit Freshdesk's app-sdk page to view the full documentation.

Examples

Subscribing to app.initialized
App initialization occurs when the page that contains your app is loaded for the first time.

import {ApplicationClient} from '@byteassign/Freshdesk';

let client: ApplicationClient;
init();

async function init() {
    client = await app.initialized();
    client.events.on("app.activated", onAppActiveHandler);
    client.events.on("app.deactivated", onAppDeactiveHandler);
}

Unless you are building an app that is completely isolated (independent of the data on the page), ensure that the core logic of the app is not placed within the app.initialized() method. Place the logic within the app.activated() method.

Click here to see more.

Contributing

We welcome contributions to improve and expand this package. Please ensure that contributions align with the latest Freshdesk appclient specifications and best practices in TypeScript.

Related Packages