sailfork / t3code-github / .repos/ alchemy-effect/ packages/ aws/ src/ CodeBuild/ InvalidateProjectCache.ts

import type * as SVC from "@distilled.cloud/aws/codebuild";
import * as Binding from "alchemy/Binding";
import type * as Effect from "effect/Effect";
import type { Project } from "./Project.ts";

/**
 * Runtime binding for `codebuild:InvalidateProjectCache` — resets the
 * bound project's build cache so the next build starts cold.
 * ### Project Cache
 * **Example:** Invalidate the Build Cache
 * ```typescript
 * const invalidateProjectCache = yield* AWS.CodeBuild.InvalidateProjectCache(project);
 *
 * yield* invalidateProjectCache();
 * ```
 *
 * @binding
 */
export interface InvalidateProjectCache extends Binding.Service<
  InvalidateProjectCache,
  "AWS.CodeBuild.InvalidateProjectCache",
  <P extends Project>(
    project: P,
  ) => Effect.Effect<
    () => Effect.Effect<SVC.InvalidateProjectCacheOutput, SVC.InvalidateProjectCacheError>
  >
> {}
export const InvalidateProjectCache = Binding.Service<InvalidateProjectCache>(
  "AWS.CodeBuild.InvalidateProjectCache",
);