1.1.0 • Published 2 months ago

fetch-firestore-types v1.1.0

Weekly downloads
-
License
MIT
Repository
github
Last release
2 months ago

fetch-firestore-types banner

Generate Typesript types from Appwrite Databases

npm npm

Quick usage

Make sure ton add the following values to your .env : FIREBASE_PROJECT_ID FIREBASE_PRIVATE_KEY FIREBASE_CLIENT_EMAIL

Then run the following command :

npx fetch-firestore-types

Installation

# yarn
yarn add fetch-firestore-types

# npm
npm install fetch-firestore-types

Make sure ton add the following values to your .env : FIREBASE_PROJECT_ID FIREBASE_PRIVATE_KEY FIREBASE_CLIENT_EMAIL

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

await FetchNewTypes();

Parameters

NameDefault valueDescription
outDir"/types"The folder where the type file will be generated
queryResultsLength25Number of items per collection to creates types on

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 queryResultsLength 50

Library

await FetchNewTypes({
    outDir: "/types",
    queryResultsLength: 50,
})

Handled types

Appwrite typeGenerated type (simple)
Stringstring
Integer / Doubleinteger
Booleanboolean
Nullnull
ArrayArray<any>
ObjectObject
1.1.0

2 months ago

1.0.1

2 months ago

1.0.0

1 year ago

0.3.0

1 year ago

0.2.0

1 year ago