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 🙏

© 2026 – Pkg Stats / Ryan Hefner

@ominity/api-module-forms

v1.1.0

Published

TypeScript SDK module for the Ominity Forms API.

Readme

@ominity/api-module-forms

TypeScript SDK module for the Ominity Forms API.

This package plugs into @ominity/api-typescript and adds typed access to:

  • forms list
  • form get
  • form submissions list
  • form submission get
  • form submission create
  • form submission update
  • form submission delete

Install

npm install @ominity/api-typescript @ominity/api-module-forms

Usage

import { Ominity } from "@ominity/api-typescript";
import { formsModule } from "@ominity/api-module-forms";

const ominity = new Ominity({
  serverURL: "https://tenant-a.ominity.com/api",
  security: {
    apiKey: process.env.OMINITY_API_KEY ?? "",
  },
  modules: [formsModule()],
});

You can also register the module after construction:

import { Ominity } from "@ominity/api-typescript";
import { FormsModule } from "@ominity/api-module-forms";

const ominity = new Ominity({
  serverURL: "https://tenant-a.ominity.com/api",
  security: {
    apiKey: process.env.OMINITY_API_KEY ?? "",
  },
});

ominity.use(FormsModule);

Forms

List forms

const forms = await ominity.modules.forms.forms.list({
  page: 1,
  limit: 20,
  filter: {
    id: 2,
  },
});

console.log(forms.items);
console.log(forms.count);

Get form

const form = await ominity.modules.forms.forms.get({
  id: 2,
});

console.log(form.id);
console.log(form.name);

Form resources can include embedded field definitions from the HAL payload:

const fields = form.embedded?.form_fields ?? [];

for (const field of fields) {
  console.log(field.name, field.type);
}

Submissions

List submissions

const submissions = await ominity.modules.forms.submissions.list({
  page: 1,
  limit: 20,
  filter: {
    form_id: 2,
  },
  sort: "-id",
});

console.log(submissions.items);

Get submission

const submission = await ominity.modules.forms.submissions.get({
  id: 15,
});

console.log(submission.formId);
console.log(submission.data);

Create submission

const created = await ominity.modules.forms.submissions.create({
  formId: 2,
  userId: null,
  recaptchaToken: null,
  data: {
    name: "John Doe",
    email: "[email protected]",
    phone: "+1234567890",
    service: [],
    metadata: {
      locale: "en-US",
      page_url: "https://example.com/contact",
    },
  },
});

console.log(created.id);

Update submission

const updated = await ominity.modules.forms.submissions.update({
  id: 15,
  body: {
    data: {
        name: "Jane Doe",
        email: "[email protected]"
    },
  },
});

console.log(updated.updatedAt);

Delete submission

await ominity.modules.forms.submissions.delete({
  id: 15,
});

Exported Types

This package exports the public models and operation types for forms and submissions, for example:

import type {
  Form,
  FormField,
  Submission,
  CreateSubmissionRequest,
  UpdateSubmissionRequest,
  ListSubmissionsResponse,
} from "@ominity/api-module-forms";

Resource Shape Notes

  • HAL _links are mapped to links
  • HAL _embedded.form_fields is mapped to embedded.form_fields
  • paginated collections are exposed as { items, count, links, ...pagination }
  • submission data is intentionally typed as Record<string, unknown> because form payloads are schema-driven

Current Scope

This package currently exposes:

  • ominity.modules.forms.forms
  • ominity.modules.forms.submissions

The backend Forms module also has standalone form-field endpoints, but this package does not expose a dedicated fields SDK resource yet.

Development

npm run lint
npm run build