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

@anygridtech/frappe-agt-types

v4.0.1

Published

<h1 align="center"> πŸš€ Frappe AGT Typescript </h1>

Downloads

147

Readme

Status License npm version



πŸ“ Table of Contents


🧐 About

While @anygridtech/frappe-types provides core types for the Frappe framework, custom applications introduce their own set of DocTypes and APIs. This package bridges that gap for AnyGrid Tech's specific modules.

Developing without it leads to common issues:

  • ❌ Typing mistakes in custom DocType fields (e.g., frm.doc.custom_field vs frm.doc.custom_feild)
  • ❌ No clarity on the shape of custom API responses
  • ❌ Fragile code during refactors of custom scripts
  • ❌ Poor autocomplete for proprietary functions

With @anygridtech/frappe-agt-types, you get:

  • βœ… Accurate autocompletion for custom DocTypes and agt namespaces.
  • βœ… Compile-time error checking for your client and server scripts.
  • βœ… Inline documentation for custom modules.
  • βœ… Improved code maintainability and developer experience.

πŸ“¦ What’s Included?

Type definitions for AnyGrid Tech's custom modules, including:

  • Custom DocTypes (26 total):

    • BrazilianInvoiceTaxes
    • ChecklistBattery
    • ChecklistEVCharger
    • ChecklistInverter
    • ChecklistSmartEnergyManager
    • ChecklistSmartMeter
    • ChecklistTable
    • ChecklistTracker
    • ChecklistTransformer
    • Company
    • ComplianceStatement
    • CorrectionsChildList
    • CorrectionsTracker
    • ExternalIssueCode
    • Index
    • InitialAnalysis
    • InvoiceTaxes
    • IssueInverters
    • Item
    • PurchaseOrder
    • SalesOrder
    • SerialNo
    • SerialNoWorkflow
    • StockEntry
    • Ticket
    • Workflow
  • Client-side agt namespace:

    • agt.setup – General setup utility
    • agt.checklist – Checklist management
      • agt.checklist.table
    • agt.corrections_tracker – Corrections tracking
      • agt.corrections_tracker.run
      • agt.corrections_tracker.table
    • agt.growatt – Growatt integrations
    • agt.metadata – Metadata constants
      • agt.metadata.doctype.checklist
      • agt.metadata.doctype.compliance_statement
      • agt.metadata.doctype.initial_analysis
      • agt.metadata.doctype.ticket
    • agt.ui – UI utilities
      • agt.ui.ultra_dialog
    • agt.utils – Utility functions
      • agt.utils.brazil
      • agt.utils.core
      • agt.utils.db
      • agt.utils.dialog
      • agt.utils.doc
      • agt.utils.form
      • agt.utils.table
      • agt.utils.text
    • agt.workflow – Workflow utilities
      • agt.workflow.before_workflow_action
  • Server-side agt.server namespace:

    • agt.server.growatt_oss_api
    • agt.server.growatt_public_api

🧩 The list is continuously expanding as the custom application evolves.


🏁 Getting Started

These instructions will help you integrate the custom types into your Frappe TypeScript project.

Prerequisites

  • Firstly, you need a working Frappe development environment.

In case you're not familiar, we recommend using our Frappe Custom Apps Development Environment for easier setup.

  • After having your working Frappe development environment, you must create a new custom app or use an existing one.

Our Frappe Custom Apps Development Environment includes helper functions for quickly scaffolding apps using create-app.sh or install-app.sh.


πŸ“₯ Installation

  • Create a ts folder at your_custom_app/your_custom_app/public/ to hold your TypeScript files.

  • Install Typescript and our package via your package manager of choice:

# npm
npm install typescript @anygridtech/frappe-agt-types

# yarn
yarn add typescript @anygridtech/frappe-agt-types

# pnpm
pnpm add typescript @anygridtech/frappe-agt-types

Notice: @anygridtech/frappe-types is a dependency of this project. You do not need to install it separately to have access to frappe type definitions. Installing this package is sufficient to have type definitions for both frappe and agt globals.

This package is designed to work with @anygridtech/frappe-ts-tools. You must set up frappe-ts-tools first:

πŸ‘‰ Follow @anygridtech/frappe-ts-tools Setup Instructions

The frappe-ts-tools package handles all TypeScript compilation and build configuration automatically.

  • Reload the TypeScript server to ensure the editor picks up the new types: Hit Ctrl+Shift+P (or Cmd+Shift+P on Mac) in VSCode and select TypeScript: Restart TS Server. For other editors, consult your editor's documentation on reloading the language server.

  • Finally, your app folder structure should look similiar to this:

your_custom_app/
β”œβ”€β”€ your_custom_app/
β”‚   β”œβ”€β”€ public/
|   |   β”œβ”€β”€ css/
β”‚   β”‚   β”œβ”€β”€ js/
β”‚   β”‚   β”œβ”€β”€ ts/
β”‚   β”‚   β”œβ”€β”€ node_modules/
β”‚   β”‚   β”œβ”€β”€ package-lock.json
β”‚   β”‚   β”œβ”€β”€ package.json
β”‚   β”‚   └── tsconfig.json
β”‚   └── ...
└── ...

🎈 Usage

After setup, you can use the custom DocType and namespace types with full TypeScript support in your client scripts:

// Example: strong-typed form script while using metadata constants 

import { CorrectionsTracker } from "@anygridtech/frappe-agt-types/agt/doctype/CorrectionsTracker";

const status_options = agt.metadata.doctype.corrections_tracker.status;

frappe.ui.form.on<CorrectionsTracker>('Corrections Tracker', {
  refresh(frm) {
    if (frm.doc.status === status_options.PENDING) {
      // ...
    }
  }
});

🀝 Contributing

This project is maintained internally by AnyGrid Tech. If you are a developer at AnyGrid, please follow the internal contribution guidelines. For external users, feel free to open an issue if you believe there is a bug.


✍️ Authors