1import * as cw from "@distilled.cloud/gcp/contentwarehouse_v1";
2import * as Layer from "effect/Layer";
3import { makeSynonymSetHttpBinding } from "./BindingHttp.ts";
4import { 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 */
15export 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);