1import type * as firebasedataconnect from "@distilled.cloud/gcp/firebasedataconnect_v1";
2import type * as Effect from "effect/Effect";
3import * as Binding from "../../Binding.ts";
4import type { RuntimeContext } from "../../RuntimeContext.ts";
5import type { ServicesConnector } from "./ServicesConnector.ts";
6
7export interface ExecuteMutationRequest extends Omit<
8 firebasedataconnect.ExecuteMutationProjectsLocationsServicesConnectorsRequest,
9 "name"
10> {}
11
12/**
13 * Runtime binding for Data Connect `connectors.executeMutation`.
14 *
15 * Runs a named mutation defined on a {@link ServicesConnector}. Provide
16 * {@link ExecuteMutationHttp}.
17 *
18 * ### Executing a Mutation
19 * **Example:** Named connector mutation
20 * ```typescript
21 * const executeMutation = yield* GCP.FirebaseDataConnect.ExecuteMutation(
22 * connector,
23 * );
24 * const result = yield* executeMutation({
25 * body: {
26 * operationName: "CreateNote",
27 * variables: { title: "hello" },
28 * },
29 * });
30 * ```
31 *
32 * @binding
33 * @category FirebaseDataConnect
34 */
35export interface ExecuteMutation extends Binding.Service<
36 ExecuteMutation,
37 "GCP.FirebaseDataConnect.ExecuteMutation",
38 (
39 connector: ServicesConnector,
40 ) => Effect.Effect<
41 (
42 request: ExecuteMutationRequest,
43 ) => Effect.Effect<
44 firebasedataconnect.ExecuteMutationResponse,
45 firebasedataconnect.ExecuteMutationProjectsLocationsServicesConnectorsError,
46 RuntimeContext
47 >
48 >
49> {}
50
51export const ExecuteMutation = Binding.Service<ExecuteMutation>(
52 "GCP.FirebaseDataConnect.ExecuteMutation",
53);