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