1import * as Alchemy from "alchemy";
2import * as GCP from "alchemy/GCP";
3import * as Effect from "effect/Effect";
4import Admin from "./src/Admin.ts";
5import { Nightly } from "./src/Nightly.ts";
6import { Orders, Reports } from "./src/resources.ts";
7import Summarize from "./src/Summarize.ts";
8
9export default Alchemy.Stack(
10 "GcpScheduledJobExample",
11 { providers: GCP.providers(), state: Alchemy.localState() },
12 Effect.gen(function* () {
13 const orders = yield* Orders;
14 const reports = yield* Reports;
15 const job = yield* Summarize;
16 const nightly = yield* Nightly;
17 const admin = yield* Admin;
18
19 return {
20 url: admin.uri,
21 project: job.project,
22 jobName: job.name,
23 schedulerJobName: nightly.name,
24 tableName: orders.name,
25 datasetId: orders.datasetId,
26 tableId: orders.tableId,
27 bucketName: reports.bucketName,
28 };
29 }),
30);