| ... | @@ -1,5 +1,5 @@ | ... | @@ -1,5 +1,5 @@ |
| 1 | import * as Schema from "effect/Schema"; | | |
| 2 | import * as Context from "effect/Context"; | 1 | import * as Context from "effect/Context"; |
| | 2 | import * as Schema from "effect/Schema"; |
| 3 | import * as HttpApi from "effect/unstable/httpapi/HttpApi"; | 3 | import * as HttpApi from "effect/unstable/httpapi/HttpApi"; |
| 4 | import * as HttpApiEndpoint from "effect/unstable/httpapi/HttpApiEndpoint"; | 4 | import * as HttpApiEndpoint from "effect/unstable/httpapi/HttpApiEndpoint"; |
| 5 | import * as HttpApiGroup from "effect/unstable/httpapi/HttpApiGroup"; | 5 | import * as HttpApiGroup from "effect/unstable/httpapi/HttpApiGroup"; |
| ... | @@ -512,26 +512,22 @@ const RelayAgentActivityPublishErrors = [ | ... | @@ -512,26 +512,22 @@ const RelayAgentActivityPublishErrors = [ |
| 512 | RelayInternalError, | 512 | RelayInternalError, |
| 513 | ] as const; | 513 | ] as const; |
| 514 | | 514 | |
| 515 | export interface RelayClientPrincipalShape { | | |
| 516 | readonly userId: string; | | |
| 517 | readonly token: string; | | |
| 518 | readonly proofKeyThumbprint?: string; | | |
| 519 | readonly dpopScopes?: ReadonlyArray<RelayDpopAccessTokenScope>; | | |
| 520 | } | | |
| 521 | | | |
| 522 | export class RelayClientPrincipal extends Context.Service< | 515 | export class RelayClientPrincipal extends Context.Service< |
| 523 | RelayClientPrincipal, | 516 | RelayClientPrincipal, |
| 524 | RelayClientPrincipalShape | 517 | { |
| | 518 | readonly userId: string; |
| | 519 | readonly token: string; |
| | 520 | readonly proofKeyThumbprint?: string; |
| | 521 | readonly dpopScopes?: ReadonlyArray<RelayDpopAccessTokenScope>; |
| | 522 | } |
| 525 | >()("@t3tools/contracts/relay/RelayClientPrincipal") {} | 523 | >()("@t3tools/contracts/relay/RelayClientPrincipal") {} |
| 526 | | 524 | |
| 527 | export interface RelayEnvironmentPrincipalShape { | | |
| 528 | readonly environmentId: string; | | |
| 529 | readonly environmentPublicKey: string; | | |
| 530 | } | | |
| 531 | | | |
| 532 | export class RelayEnvironmentPrincipal extends Context.Service< | 525 | export class RelayEnvironmentPrincipal extends Context.Service< |
| 533 | RelayEnvironmentPrincipal, | 526 | RelayEnvironmentPrincipal, |
| 534 | RelayEnvironmentPrincipalShape | 527 | { |
| | 528 | readonly environmentId: string; |
| | 529 | readonly environmentPublicKey: string; |
| | 530 | } |
| 535 | >()("@t3tools/contracts/relay/RelayEnvironmentPrincipal") {} | 531 | >()("@t3tools/contracts/relay/RelayEnvironmentPrincipal") {} |
| 536 | | 532 | |
| 537 | const RelayClientBearerAuthorization = HttpApiSecurity.http({ scheme: "bearer" }).pipe( | 533 | const RelayClientBearerAuthorization = HttpApiSecurity.http({ scheme: "bearer" }).pipe( |