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

fetch-appwrite-types

Package Overview
Dependencies
Maintainers
1
Versions
51
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fetch-appwrite-types

Appwrite types file maker

  • 1.7.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
4
decreased by-63.64%
Maintainers
1
Weekly downloads
 
Created
Source

fetch-appwrite-types banner

Generate Typesript types from Appwrite Databases

npm npm

Quick usage

Make sure ton add the following values to your .env : APPWRITE_ENDPOINT APPWRITE_PROJECT_ID APPWRITE_API_KEY

Then run the following command :

npx fetch-appwrite-types

Installation

# yarn
yarn add fetch-appwrite-types

# npm
npm install fetch-appwrite-types

Make sure ton add the following values to your .env : APPWRITE_ENDPOINT APPWRITE_PROJECT_ID APPWRITE_API_KEY

import { FetchNewTypes } from "fetch-appwrite-types/dist/main";

await FetchNewTypes();

Parameters

NameDefault valueDescription
outDir"/types"The folder where the type file will be generated
outFileName"appwrite"The name of the generated type file
includeDBNamefalseAdd the collection name at start of types
hardTypesfalseCreates an Email type and an URL types. More.

Usage

CLI

Params can be passed as arguments in any order, except for the outDir which might be followed by the path.

npx fetch-appwrite-types includeDBName outDir /types outFileName appwrite hardTypes
Library
await FetchNewTypes({
    outDir: "/types",
    outFileName: "appwrite",
    includeDBName: true,
    hardTypes: true
})

Handled types

Appwrite typeGenerated type (simple)Generated type (hard)
Stringstringstring
Integerintegerinteger
Floatintegerinteger
Booleanbooleanboolean
DateTimestringDate
EmailstringEmail
IPstringstring
URLstringURL
EnumEnumEnum
RelationshipReference to TypeReference to Type

Hard types

The hard types are types that are not native to typescript, but are often used in the context of a web application. They are generated as classes with methods to validate and parse the data.

NameValue
Email${string}@${string}.${string}
URL${string}://${string}.${string}

Keywords

FAQs

Package last updated on 16 Apr 2024

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