t3-code-android-nightly/.repos/alchemy-effect/examples/gcp-eventarc-firestore/src/resources.ts
Julius Marminge 6f9cea00ae
chore(refs): sync Effect and Alchemy references to 4.0.1 and beta.80 (#16170)
Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-05 13:22:30 -07:00

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;
}