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

tickety-sdk

v0.0.4

Published

Tickety SDK for sending ticket from your front end to the back end.

Downloads

6

Readme

Tickety SDK

Tickety SDK is a powerful and flexible package designed to integrate a comprehensive ticket management system into your SaaS applications. This SDK simplifies the process of adding customer support and ticket handling capabilities, allowing developers to focus on building core features. With easy-to-use methods for sending messages, fetching conversations, and managing tickets, Tickety SDK offers a seamless experience for both developers and end-users.

Features

  • Send Messages: Easily send messages from your application to the Tickety dashboard.
  • Fetch Messages: Retrieve conversation history to display in your application.
  • Real-time Updates: Stay updated with the latest messages (requires implementation of polling or another method to fetch updates).
  • Customizable: Wrap the SDK functions in any UI to match your brand and style.

Installation

Install Tickety SDK with npm:

npm install tickety-sdk

Or with yarn:

yarn add tickety-sdk

Initialisation

Before using the SDK, you must initialize it with your API key, which you can obtain from your Tickety dashboard

import Tickety from 'tickety-sdk';

const ticket = new Tickety('YOUR_API_KEY');

Usage

Sending Messages

To send a message to the Tickety dashboard:

const response = await ticket.sendMessage("Your message here", "USER_AUTH_TOKEN");
if (response.success) {
  console.log("Message sent successfully");
} else {
  console.error("Failed to send message:", response.error);
}

Fetching Message

To fetch messages between your application and a user:

const messages = await ticket.fetchMessage("USER_AUTH_TOKEN");
if (messages.success) {
  console.log("Messages fetched successfully", messages.data);
} else {
  console.error("Failed to fetch messages:", messages.error);
}

Handling Real-time Updates

Tickety's dashboard leverages Supabase Realtime to provide you with instant updates on customer interactions and ticket statuses. This means that as a developer, you can experience real-time messaging directly within the Tickety dashboard, ensuring that you're always informed about the latest customer queries and feedback without any delay.

Current Real-time Implementation

Our current implementation utilizes Supabase Realtime capabilities on the dashboard, offering:

  • Instant Notifications: Get alerted immediately when new tickets are created or when there are updates to existing tickets.
  • Live Ticket Updates: See real-time changes in ticket status, ensuring efficient tracking and management of customer support interactions.

This feature is designed to enhance your experience by providing immediate insights into customer interactions, enabling you to respond promptly and effectively.

Roadmap: Real-time Functionality in SDK

Understanding the value of real-time updates not just on the dashboard but also directly within your applications, we're excited to share that integrating real-time updates into the Tickety SDK functions is on our development roadmap. This will allow you to implement real-time messaging features directly in your SaaS applications, providing end-users with an enhanced and engaging experience.

Until this functionality is available, we recommend using the polling method as an interim solution for updating your applications with the latest messages and ticket statuses. Here's a guide to implement polling in your application:

// Example of a polling function to check for new messages every 5 seconds
function pollForUpdates() {
  setInterval(async () => {
    // Replace 'yourTicketId' with the actual ticket ID you are monitoring
    const updates = await tickety.fetchMessage('yourAuthToken', { ticketId: 'yourTicketId' });
    if (updates.success && updates.data.length > 0) {
      console.log('New updates:', updates.data);
      // Process updates here (e.g., refresh the UI)
    }
  }, 5000); // Adjust the interval as needed
}

We're committed to enhancing Tickety's capabilities and providing developers with the tools needed for seamless integration and superior user experience. Stay tuned for updates on the integration of real-time functionality into our SDK!

Support

If you encounter any issues or have questions, please file an issue on the GitHub repository.

License

Tickety SDK is MIT licensed.


This structured Markdown text includes headers, code blocks, lists, and bold text to organize the information in a way that's easy to read and understand. Make sure to replace placeholder texts like `'YOUR_API_KEY'` and `'USER_AUTH_TOKEN'` with actual values or further instructions as needed.