sailfork / t3code-github / .repos/ alchemy-effect/ packages/ aws/ src/ NeptuneGraph/ ResetGraph.ts

import type * as neptunegraph from "@distilled.cloud/aws/neptune-graph";
import * as Binding from "alchemy/Binding";
import type * as Effect from "effect/Effect";
import type { Graph } from "./Graph.ts";

/**
 * Runtime binding for the `ResetGraph` operation (IAM action `neptune-graph:ResetGraph`),
 * scoped to one {@link Graph}.
 *
 * Empties all data from the bound graph while keeping the graph itself (and optionally snapshotting first) — e.g. refresh a demo or staging dataset before a re-import. Provide the implementation with
 * `Effect.provide(AWS.NeptuneGraph.ResetGraphHttp)`.
 * ### Resetting a Graph
 * **Example:** Wipe all data from a graph
 * ```typescript
 * const resetGraph = yield* NeptuneGraph.ResetGraph(graph);
 *
 * yield* resetGraph({ skipSnapshot: true });
 * ```
 *
 * @binding
 */
export interface ResetGraph extends Binding.Service<
  ResetGraph,
  "AWS.NeptuneGraph.ResetGraph",
  (
    graph: Graph,
  ) => Effect.Effect<
    (
      request: Omit<neptunegraph.ResetGraphInput, "graphIdentifier">,
    ) => Effect.Effect<neptunegraph.ResetGraphOutput, neptunegraph.ResetGraphError>
  >
> {}
export const ResetGraph = Binding.Service<ResetGraph>("AWS.NeptuneGraph.ResetGraph");