The best way to control Claude Code, Codex and more from any computer or phone
Mirrored from https://github.com/Camo67/t3code.git
Synced Nov 21, 06:00 UTC
| 1 | import type * as cw from "@distilled.cloud/gcp/contentwarehouse_v1"; |
| 2 | import * as Binding from "alchemy/Binding"; |
| 3 | import type { RuntimeContext } from "alchemy/RuntimeContext"; |
| 4 | import type * as Effect from "effect/Effect"; |
| 5 | import type { RuleSet } from "./RuleSet.ts"; |
| 6 | |
| 7 | export interface GetRuleSetRequest extends Omit<cw.GetProjectsLocationsRuleSetsRequest, "name"> {} |
| 8 | |
| 9 | /** |
| 10 | * Runtime binding for Document AI Warehouse `ruleSets.get`. |
| 11 | * |
| 12 | * Grants `roles/contentwarehouse.admin` on the project because |
| 13 | * `contentwarehouse.ruleSets.get` is only in that role and Document AI |
| 14 | * Warehouse has no per-resource IAM. |
| 15 | * |
| 16 | * Bind this operation to a {@link RuleSet} in a Function/Action init |
| 17 | * phase. Provide {@link GetRuleSetHttp}. |
| 18 | * |
| 19 | * ### Reading Rule Sets |
| 20 | * **Example:** Read the bound rule set |
| 21 | * ```typescript |
| 22 | * const getRuleSet = yield* GCP.ContentWarehouse.GetRuleSet(rules); |
| 23 | * const live = yield* getRuleSet(); |
| 24 | * ``` |
| 25 | * |
| 26 | * @binding |
| 27 | * @category ContentWarehouse |
| 28 | */ |
| 29 | export interface GetRuleSet extends Binding.Service< |
| 30 | GetRuleSet, |
| 31 | "GCP.ContentWarehouse.GetRuleSet", |
| 32 | ( |
| 33 | ruleSet: RuleSet, |
| 34 | ) => Effect.Effect< |
| 35 | ( |
| 36 | request?: GetRuleSetRequest, |
| 37 | ) => Effect.Effect< |
| 38 | cw.GoogleCloudContentwarehouseV1RuleSet, |
| 39 | cw.GetProjectsLocationsRuleSetsError, |
| 40 | RuntimeContext |
| 41 | > |
| 42 | > |
| 43 | > {} |
| 44 | |
| 45 | export const GetRuleSet = Binding.Service<GetRuleSet>("GCP.ContentWarehouse.GetRuleSet"); |