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

@kayako/apps-manifest

v1.0.3

Published

Parser and validator for apps manifest.json file

Downloads

7

Readme

Manifest parser

Manifest file

Below is a sample manifest file with description of their key/value pairs.

{
  "name": "sales-force",
  "displayName": "Sales force",
  "version": "1.0.0",
  "bundleDir": "dist",
  "slots": [
    {
      "url": "dist/index.html",
      "location": "messenger-home-screen"
    }
  ],
  "access": "public",
  "platforms": ["messenger"],
  "whiteListedDomains": ["https://{{ prompts.desk }}.salesforce.com"],
  "prompts": [
    {
      "key": "apiKey",
      "label": "Api Key",
      "description": "Api key required to authenticate with sales force",
      "type": "text",
      "access": "public",
      "required": true
    }
  ],
  "secrets": {
    "gaKey": "GA90121003"
  }
}

name (required)

The app name must be unique in the entire marketplace. We follow the npm naming rules.

displayName (optional)

Name to be used for display purpose. This will be shown in the marketplace listing.

version (required)

A valid semver version.

bundleDir (optional = dist)

Directory to be zipped and published with the apps marketplace.

slots (required)

  • An array of slots, defining the url and the location.
  • A minimum of one slot is required to render the app.
  • Since the url can be relative URL to the file-system. This package doesn't validate the type/format of the url.

Below is the list of allowed platforms.

  1. case-sidebar (agent)
  2. user-sidebar (agent)
  3. organisation-sidebar (agent)
  4. messenger-home-screen (messenger)

access (optional = private)

App access. It can be public or private.

Private apps can only be installed by the app publisher and public apsp will be available on the marketplace for everyone.

platforms (required)

An array of platforms supported by the app. An app can run on multiple platforms by defining appropriate slots.

For example, you can have 2 slots one for the agent and other for the messenger.

{
  "slots": [
    {
      "location": "case-sidebar",
      "url": "dist/agent.html"
    },
    {
      "location": "messenger-home-screen",
      "url": "dist/messenger.html"
    }
  ],
  "platforms": ["agent", "messenger"]
}

Below is the list of allowed platforms.

  1. agent
  2. messenger

whiteListedDomains (required)

An array of whitelisted domains to be available to HTTP requests.

If your app does not define whiteListedDomains, it will not be able to make an HTTP requests.

Also you can define dynamic placeholders values for runtime values. For example

{
  "whiteListedDomains": [
    "http://salesforce.com?key={{ prompts.apiKey }}"
  ]
}

prompts (optional)

An array of prompts to collect data from when someone install your app. The values for prompts can be accessed as {{prompts.<key>}} when making HTTP requests.

Each object can/must have following keys.

| Key | Required | Default value | Description | |------|------|--------|--------| | key | Yes | null | Required and must be unique | | label | No | Human readable form of key | Label to displayed next to the form field | | description | No | null | Prompt description | | access | No | private | Prompt access level. It must public or protected. The values for public prompts are passed to the app initializer. | | type | No | text | Prompt type. Must be text, secure, longtext or json.| | required | No | true | Whether or not prompt is required |

secrets (optional)

A key/value store of app secrets. Each app can save secrets to be used during the HTTP requests without exposing them to the client.