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

@zaiusinc/app-forms-schema

v1.0.1

Published

This repo contains the schema definition for Zaius app forms.

Downloads

1,089

Readme

App Forms Schema

This repo contains the schema definition for Zaius app forms.

Usage

yarn add @zaius/app-forms-schema

Then you can reference the forms interfaces or use the JSON schema to validate a defined form.

How forms work

Apps include a definition of their form in the app package. Another Zaius forms library will render the form from the definition and populate it with data from the app install's secret store. User interactions, such as save/submit will send the updated data to the app, whos responsibility is to process and/or save that data.

See examples/

Form Submission

Overview

Apps have a lifecycle method for form submission. The method receives:

  1. The section the user is on
  2. The data entered by the user into that section
  3. The button action the user clicked to submit the section

The app also has access to all the other secret data stored by the form which can be used to validate data across sections.

Responsibility

The app is responsible for processing/saving the form data. The SDK will provide a helper to store all or a subset of the data into the secret store so that in the simplest case, the lifecycle function will simply store all the submitted data into the secret store.

When processing the form data, the app should update any other secret values needed for operation or for visual changes to the form. By simply updating a value in the secret store, the form can change it's layout/appearance.

Response

The App will return a status code to indicate success (2xx) or failure (4xx). It will also return a payload in a structure similar to the following for error handling on the form:

{
  "toast": {
    "intent": "Error",
    "message": "Authentication failed, please check your credentials and try again."
  },
  "errors": [
    {"field": "auth.secret", "message": "Your username/secret was not accepted"}
  ]
}

Populating the form with data

The backend to the app store UI will be responsible for fetching the form data and changes to the form data after each submission. This ensures the app does not need to worry about returning changes or masking sensitive information.