1import * as firestore from "@distilled.cloud/gcp/firestore_v1";
2import * as Layer from "effect/Layer";
3import { makeDocumentHttpBinding } from "./DocumentHttp.ts";
4import { PatchDocument } from "./PatchDocument.ts";
5
6/**
7 * HTTP implementation of {@link PatchDocument}.
8 *
9 * @layer
10 * @provides GCP.Firestore.PatchDocument
11 */
12export const PatchDocumentHttp = Layer.effect(
13 PatchDocument,
14 makeDocumentHttpBinding({
15 tag: "GCP.Firestore.PatchDocument",
16 iam: { role: "roles/datastore.user", scopeByCondition: true },
17 operation: firestore.patchProjectsDatabasesDocuments,
18 }),
19);