| 1 | import * as bigquery from "@distilled.cloud/gcp/bigquery_v2"; |
| 2 | import * as Layer from "effect/Layer"; |
| 3 | import { makeTableHttpBinding } from "./BindingHttp.ts"; |
| 4 | import { InsertAll } from "./InsertAll.ts"; |
| 5 | |
| 6 | /** |
| 7 | * HTTP implementation of {@link InsertAll}. |
| 8 | * |
| 9 | * @layer |
| 10 | * @provides GCP.BigQuery.InsertAll |
| 11 | */ |
| 12 | export const InsertAllHttp = Layer.effect( |
| 13 | InsertAll, |
| 14 | makeTableHttpBinding({ |
| 15 | tag: "GCP.BigQuery.InsertAll", |
| 16 | // bigquery.tables.updateData |
| 17 | iam: { role: "roles/bigquery.dataEditor", on: "bigquery.table" }, |
| 18 | operation: bigquery.insertAllTabledata, |
| 19 | }), |
| 20 | ); |