mirror of
https://github.com/VibedByKaKi/t3-code-android-nightly.git
synced 2026-10-10 20:31:16 +02:00
24 lines
692 B
TypeScript
24 lines
692 B
TypeScript
import * as GCP from "alchemy/GCP";
|
|
|
|
/**
|
|
* Eventarc only delivers Firestore events to triggers in the database's
|
|
* own location, so the database and the trigger pin the same location.
|
|
*/
|
|
export const LOCATION = "us-central1";
|
|
|
|
/**
|
|
* A named Firestore database in Native mode. Firestore change events come
|
|
* from Native-mode databases only, and a named database keeps the
|
|
* example's triggers from firing on anything else in the project.
|
|
*/
|
|
export const Shop = GCP.Firestore.Database("Shop", {
|
|
location: LOCATION,
|
|
type: "FIRESTORE_NATIVE",
|
|
});
|
|
|
|
/** An order as the API stores it at `orders/{id}`. */
|
|
export interface Order {
|
|
item: string;
|
|
quantity: number;
|
|
createdAt: Date;
|
|
}
|