| 1 | import type * as firebaserules from "@distilled.cloud/gcp/firebaserules_v1"; |
| 2 | import type * as Effect from "effect/Effect"; |
| 3 | import * as Binding from "../../Binding.ts"; |
| 4 | import type { RuntimeContext } from "../../RuntimeContext.ts"; |
| 5 | import type { Release } from "./Release.ts"; |
| 6 | |
| 7 | export interface GetReleaseExecutableRequest extends Omit< |
| 8 | firebaserules.GetExecutableProjectsReleasesRequest, |
| 9 | "name" |
| 10 | > {} |
| 11 | |
| 12 | /** |
| 13 | * Runtime binding for Firebase Rules `releases.getExecutable`. |
| 14 | * |
| 15 | * Bind this operation to a {@link Release} in a Function/Action init |
| 16 | * phase. Provide {@link GetReleaseExecutableHttp}. |
| 17 | * |
| 18 | * ### Reading a Release Executable |
| 19 | * **Example:** Fetch the compiled executable |
| 20 | * ```typescript |
| 21 | * const getExecutable = yield* GCP.FirebaseRules.GetReleaseExecutable( |
| 22 | * release, |
| 23 | * ); |
| 24 | * const { rulesetName, executableVersion } = yield* getExecutable(); |
| 25 | * ``` |
| 26 | * |
| 27 | * @binding |
| 28 | * @category FirebaseRules |
| 29 | */ |
| 30 | export interface GetReleaseExecutable extends Binding.Service< |
| 31 | GetReleaseExecutable, |
| 32 | "GCP.FirebaseRules.GetReleaseExecutable", |
| 33 | ( |
| 34 | release: Release, |
| 35 | ) => Effect.Effect< |
| 36 | ( |
| 37 | request?: GetReleaseExecutableRequest, |
| 38 | ) => Effect.Effect< |
| 39 | firebaserules.GetReleaseExecutableResponse, |
| 40 | firebaserules.GetExecutableProjectsReleasesError, |
| 41 | RuntimeContext |
| 42 | > |
| 43 | > |
| 44 | > {} |
| 45 | |
| 46 | export const GetReleaseExecutable = Binding.Service<GetReleaseExecutable>( |
| 47 | "GCP.FirebaseRules.GetReleaseExecutable", |
| 48 | ); |