Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@escolalms/ts-models

Package Overview
Dependencies
Maintainers
5
Versions
32
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@escolalms/ts-models

Frontend TypeScript model definitions

  • 0.0.35
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
248
increased by58.97%
Maintainers
5
Weekly downloads
 
Created
Source

Escola LMS (Wellms) TypeScript Definitions

npm | typedoc page

Automatic transformation of Eloquent Models and Request rules to TypeScript Definition

This package transforms all Eloquent Models defined in

to Typescript definitions

Installing

  1. install dependencies npm i @escolalms/ts-models or yarn add @escolalms/ts-models
  2. import in main index.d.ts (if you have one)
import "@escolalms/ts-models";
  1. add this to tsconfig in include section
  "include": ["node_modules/@escolalms/ts-models"]

The above is declaring namespaces, example ns EscolaLms.StationaryEvents.Models.StationaryEvent that are take from PHP namespace.

Below is example

export async function stationaryEvents(
  params: API.PaginationParams & {
    name?: string;
  },
  options?: Record<string, any>
) {
  return request<
    API.DefaultMetaResponse<EscolaLms.StationaryEvents.Models.StationaryEvent>
  >(`/api/admin/stationary-events`, {
    method: "GET",
    params: {
      ...params,
    },
    ...(options || {}),
  });
}

Adding new packages

  1. Add new package to composer.json
  2. Set proper namespace and package path in the config typescript.php

Releasing new version to npm

  1. Run generate action on main branch by pressing re-run all jobs
  2. Wait until it's finished, new models.d.ts should be pushed automatically to the repository
  3. Once new models.d.ts You create new release rest should be handled by the script
  4. Release version on GH is the same as on npm (done automatically)

Keywords

FAQs

Package last updated on 25 Apr 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc