Skip to content
Myr

ask.ts

This file

Path

packages/protocol/src/domain/ask.ts

67 lines · 1.6 KiB · TypeScript

Last changed by

Merge build/comments-cli-protocol-checks into mainoscabrielbefore adoptionc86204f

History of this file

Take it

The walk stopped after 200 commits: lines older than 678c8b8 point at it.

Merge build/614-env-service: deciders set write-only values for @sensitive items, the public sees the env shape, and checks see only placeholdersoscabrielbefore adoption678c8b8

lines 1–67why, one step back
1import { Schema } from "effect";
23import {4 AskId,5 Handle,6 KindName,7 LandedSha,8 ProjectName,9 RepoPath,10} from "../ids.ts";11import { CheckSpec } from "./check.ts";12import { Territory } from "./territory.ts";1314export const Brief = Schema.Struct({15 context: Schema.optionalKey(Schema.Array(Schema.NonEmptyString)),16 current: Schema.optionalKey(Schema.NonEmptyString),17 outOfScope: Schema.optionalKey(Schema.NonEmptyArray(Schema.NonEmptyString)),18 terms: Schema.optionalKey(Schema.Array(Schema.NonEmptyString)),19 want: Schema.NonEmptyString,20});2122export type Brief = typeof Brief.Type;2324export const AskState = Schema.Literals([25 "open",26 "claimed",27 "waitingOnParent",28 "closed",29]);3031export type AskState = typeof AskState.Type;3233export const Reserve = Schema.Literals(["newcomers", "people"]);3435export type Reserve = typeof Reserve.Type;3637export const Ask = Schema.Struct({38 askedBy: Handle,39 blockedBy: Schema.Array(AskId),40 brief: Brief,41 check: CheckSpec,42 file: RepoPath,43 id: AskId,44 kind: KindName,45 mentor: Schema.optionalKey(Handle),46 openedAt: Schema.DateTimeUtcFromString,47 openedIn: LandedSha,48 parent: Schema.optionalKey(AskId),49 project: ProjectName,50 reserve: Schema.optionalKey(Reserve),51 state: AskState,52 territory: Territory,53});5455export type Ask = typeof Ask.Type;5657export const AskListing = Schema.Struct({58 ask: AskId,59 blockedBy: Schema.Array(AskId),60 claimed: Schema.Boolean,61 kind: KindName,62 reserve: Schema.optionalKey(Reserve),63 territory: Schema.NonEmptyString,64 want: Schema.NonEmptyString,65});6667export type AskListing = typeof AskListing.Type;