From ab0baaa88614905722a6638aa56ec858caf9c563 Mon Sep 17 00:00:00 2001 From: Julius Marminge Date: Fri, 19 Jun 2026 19:34:44 -0700 Subject: [PATCH] [codex] Inline contracts request-context service shapes (#3204) Co-authored-by: codex --- packages/contracts/src/relay.ts | 26 +++++++++++--------------- 1 file changed, 11 insertions(+), 15 deletions(-) diff --git a/packages/contracts/src/relay.ts b/packages/contracts/src/relay.ts index 8b0068e730dfcb51d7cbf8cc172c30048be85969..dea3709f488176d1b05121d78c2a2b9c77b26c69 100644 --- a/packages/contracts/src/relay.ts +++ b/packages/contracts/src/relay.ts @@ -1,5 +1,5 @@ -import * as Schema from "effect/Schema"; import * as Context from "effect/Context"; +import * as Schema from "effect/Schema"; import * as HttpApi from "effect/unstable/httpapi/HttpApi"; import * as HttpApiEndpoint from "effect/unstable/httpapi/HttpApiEndpoint"; import * as HttpApiGroup from "effect/unstable/httpapi/HttpApiGroup"; @@ -512,26 +512,22 @@ const RelayAgentActivityPublishErrors = [ RelayInternalError, ] as const; -export interface RelayClientPrincipalShape { - readonly userId: string; - readonly token: string; - readonly proofKeyThumbprint?: string; - readonly dpopScopes?: ReadonlyArray; -} - export class RelayClientPrincipal extends Context.Service< RelayClientPrincipal, - RelayClientPrincipalShape + { + readonly userId: string; + readonly token: string; + readonly proofKeyThumbprint?: string; + readonly dpopScopes?: ReadonlyArray; + } >()("@t3tools/contracts/relay/RelayClientPrincipal") {} -export interface RelayEnvironmentPrincipalShape { - readonly environmentId: string; - readonly environmentPublicKey: string; -} - export class RelayEnvironmentPrincipal extends Context.Service< RelayEnvironmentPrincipal, - RelayEnvironmentPrincipalShape + { + readonly environmentId: string; + readonly environmentPublicKey: string; + } >()("@t3tools/contracts/relay/RelayEnvironmentPrincipal") {} const RelayClientBearerAuthorization = HttpApiSecurity.http({ scheme: "bearer" }).pipe( -- 2.54.0