-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
333005d
commit a468304
Showing
2 changed files
with
266 additions
and
310 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,46 +1,42 @@ | ||
import * as RT from 'runtypes'; | ||
import { Static } from 'runtypes/lib/runtype'; | ||
import * as RT from "runtypes"; | ||
import {Static} from "runtypes/lib/runtype"; | ||
|
||
export const Team = RT.Record({ | ||
name: RT.String, | ||
description: RT.String, | ||
}); | ||
name: RT.String, | ||
description: RT.String, | ||
}) | ||
|
||
export const Member = RT.Record({ | ||
username: RT.String, | ||
role: RT.String.optional(), | ||
membershipImport: RT.String.optional(), | ||
teamMembershipImport: RT.String.optional(), | ||
pull: RT.Array(RT.String).optional(), | ||
triage: RT.Array(RT.String).optional(), | ||
push: RT.Array(RT.String).optional(), | ||
maintain: RT.Array(RT.String).optional(), | ||
admin: RT.Array(RT.String).optional(), | ||
}); | ||
username: RT.String, | ||
role: RT.String.optional(), | ||
membershipImport: RT.String.optional(), | ||
teamMembershipImport: RT.String.optional(), | ||
pull: RT.Array(RT.String).optional(), | ||
triage: RT.Array(RT.String).optional(), | ||
push: RT.Array(RT.String).optional(), | ||
maintain: RT.Array(RT.String).optional(), | ||
admin: RT.Array(RT.String).optional(), | ||
}) | ||
|
||
export const Labels = RT.Record({ | ||
name: RT.String, | ||
color: RT.String, | ||
description: RT.String.optional(), | ||
}); | ||
name: RT.String, | ||
color: RT.String, | ||
description: RT.String.optional(), | ||
}) | ||
|
||
export const Repository = RT.Record({ | ||
name: RT.String, | ||
description: RT.String, | ||
type: RT.Union( | ||
RT.Literal('administrative'), | ||
RT.Literal('provider'), | ||
RT.Literal('information'), | ||
), | ||
teams: RT.Array(RT.String).optional(), | ||
topics: RT.Array(RT.String).optional(), | ||
labels: RT.Array(Labels).optional(), | ||
hasDownloads: RT.Boolean.optional(), | ||
import: RT.Boolean.optional(), | ||
template: RT.String.optional(), | ||
removable: RT.Boolean.optional(), | ||
}); | ||
name: RT.String, | ||
description: RT.String, | ||
type: RT.Union(RT.Literal('administrative'), RT.Literal('provider'), RT.Literal('information')), | ||
teams: RT.Array(RT.String).optional(), | ||
topics: RT.Array(RT.String).optional(), | ||
labels: RT.Array(Labels).optional(), | ||
hasDownloads: RT.Boolean.optional(), | ||
import: RT.Boolean.optional(), | ||
template: RT.String.optional(), | ||
removable: RT.Boolean.optional(), | ||
}) | ||
|
||
export type Team = Static<typeof Team>; | ||
export type Member = Static<typeof Member>; | ||
export type Repository = Static<typeof Repository>; | ||
export type Team = Static<typeof Team> | ||
export type Member = Static<typeof Member> | ||
export type Repository = Static<typeof Repository> |
Oops, something went wrong.