Firebase Utility Wrapper & File Generators
npx flamestore
-
$schema
: Json schema for flamestore.json. Set it to https://raw.githubusercontent.com/aabccd021/flamestore/master/flamestore-schema/v1.json -
flutterOutputPath
: Relative path where flutter file generated -
region
: Firebase region code -
project
: Firebase project configuration. You can set multiple projects in key-value pairs with project ID as key. -
collections
: Firestore collections definitions in key-value pairs with collection name as key.
-
rule
:{get
|list
|create
|update
|delete
}`: Granular update rules for the collection. Avaliable options:-
all
: Allow any requests -
authenticated
: Allow authenticated user -
owner
: Allow owner of the document -
none
: Disallow any requests
-
-
ownerField
: Name of field defines owner -
fields
: Fields definition as key-value pair with field name as key.
-
property
: Field can have properties, which can be assigned as string or array. Available options:-
isUnique
: Field value is unique across documents in the same collections -
isOptional
: The field is optional -
isNotUpdatable
: The field is not updatable
-
Firestore Document Reference (Path) Field
-
collection
: Name of referenced document's collection -
syncFields
: Array or name of field synced from reference document
Example:
{
"owner": {
"type": "path",
"collection": "users",
"syncField": "userName"
}
}
-
minLength
: Minimum length of the string -
maxLength
: Maximum length of the string
Example:
{
"tweetText": {
"type": "string",
"minLength": 1,
"maxLength": 280
}
}
-
min
: Minimum value of the integer -
max
: Maximum length of the integer -
deleteDocWhen
: The document will be deleted if the integer equals to this value
Example:
{
"likeValue": {
"type": "int",
"max": 5,
"min": 0,
"deleteDocWhen": 0
}
}
-
min
: Minimum value of the integer -
max
: Maximum length of the integer -
deleteDocWhen
: The document will be deleted if the integer equals to this value
Example:
{
"likeValue": {
"type": "float",
"max": 5,
"min": 0,
"deleteDocWhen": 0
}
}
-
metadata
: Array of values of image metadata name-
height
: Height of image -
width
: Width of image -
size
: Size of image in bytes
-
Example:
{
"image": {
"type": "image",
"metadata": [
"height",
"width"
]
}
}
-
title
: String of field used as dynamic link data-
field
: Use value of the field as dynamic link data
-
-
description
: String of field used as dynamic link data-
field
: Use value of the field as dynamic link data
-
-
imageURL
: String of field used as dynamic link data-
field
: Use value of the field as dynamic link data
-
-
isSuffixShort
: Use short suffix for dynamic Link
Example:
{
"dynamicLink": {
"type": "dynamicLink",
"isSuffixShort": true,
"title": {
"field": "tweetText"
},
"description": "tweet description"
}
}
Count certain field in documents with same reference.
-
collection
: Name of document's collection to be counted -
reference
: Name of reference field which points to counting document
Example:
{
"tweetsCount": {
"type": "count",
"collection": "tweets",
"reference": "owner"
}
}
Sums certain field in documents with same reference.
-
collection
: Name of document's collection to be summed -
reference
: Name of reference field which points to summing document -
field
: Name of field to be summed
Example:
{
"likesSum": {
"type": "sum",
"collection": "likes",
"field": "likeValue",
"reference": "tweet"
}
}
Computes field using custom function on firebase trigger.
-
compute
: Type of field to be computed. Available options areint
,float
,string
,timestamp
.
Example:
{
"hotness": {
"compute": "float"
},
}
Records time when document created
Example:
{
"creationTime": "serverTimestamp",
}