| 1 | import * as cw from "@distilled.cloud/gcp/contentwarehouse_v1"; |
| 2 | import * as Layer from "effect/Layer"; |
| 3 | import { makeSynonymSetHttpBinding } from "./BindingHttp.ts"; |
| 4 | import { GetSynonymSet } from "./GetSynonymSet.ts"; |
| 5 | |
| 6 | /** |
| 7 | * HTTP implementation of {@link GetSynonymSet}. |
| 8 | * |
| 9 | * Grants `roles/contentwarehouse.admin` on the project because |
| 10 | * `contentwarehouse.synonymSets.get` is in no narrower predefined role. |
| 11 | * |
| 12 | * @layer |
| 13 | * @provides GCP.ContentWarehouse.GetSynonymSet |
| 14 | */ |
| 15 | export const GetSynonymSetHttp = Layer.effect( |
| 16 | GetSynonymSet, |
| 17 | makeSynonymSetHttpBinding({ |
| 18 | tag: "GCP.ContentWarehouse.GetSynonymSet", |
| 19 | operation: cw.getProjectsLocationsSynonymSets, |
| 20 | // contentwarehouse.synonymSets.get is only in contentwarehouse.admin. |
| 21 | iam: { role: "roles/contentwarehouse.admin" }, |
| 22 | }), |
| 23 | ); |