Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- type ProjectsAPI = GetProjectAPI :<|> (CreateProjectAPI :<|> (GetProjectBranchAPI :<|> (CreateProjectBranchAPI :<|> SetProjectBranchHeadAPI)))
- type GetProjectAPI = "project" :> (QueryParam "id" Text :> (QueryParam "name" Text :> Verb 'GET 200 '[JSON] GetProjectResponse))
- data GetProjectResponse
- type CreateProjectAPI = "create-project" :> (ReqBody '[JSON] CreateProjectRequest :> Verb 'POST 200 '[JSON] CreateProjectResponse)
- data CreateProjectRequest = CreateProjectRequest {
- projectName :: Text
- data CreateProjectResponse
- type GetProjectBranchAPI = "project-branch" :> (QueryParam' '[Required, Strict] "projectId" Text :> (QueryParam "branchId" Text :> (QueryParam "branchName" Text :> (QueryFlag "includeSquashed" :> Verb 'GET 200 '[JSON] GetProjectBranchResponse))))
- data GetProjectBranchResponse
- type CreateProjectBranchAPI = "create-project-branch" :> (ReqBody '[JSON] CreateProjectBranchRequest :> Verb 'POST 200 '[JSON] CreateProjectBranchResponse)
- data CreateProjectBranchRequest = CreateProjectBranchRequest {}
- data CreateProjectBranchResponse
- type SetProjectBranchHeadAPI = "set-project-branch-head" :> (ReqBody '[JSON] SetProjectBranchHeadRequest :> Verb 'POST 200 '[JSON] SetProjectBranchHeadResponse)
- data SetProjectBranchHeadRequest = SetProjectBranchHeadRequest {}
- data SetProjectBranchHeadResponse
- = SetProjectBranchHeadResponseUnauthorized Unauthorized
- | SetProjectBranchHeadResponseNotFound NotFound
- | SetProjectBranchHeadResponseMissingCausalHash !Hash32
- | SetProjectBranchHeadResponseExpectedCausalHashMismatch !Hash32 !Hash32
- | SetProjectBranchHeadResponsePublishedReleaseIsImmutable
- | SetProjectBranchHeadResponseDeprecatedReleaseIsImmutable
- | SetProjectBranchHeadResponseSuccess
- data Project = Project {
- projectId :: Text
- projectName :: Text
- latestRelease :: Maybe ReleaseVersion
- defaultBranch :: Maybe BranchName
- data ProjectBranch = ProjectBranch {}
- data ProjectBranchIds = ProjectBranchIds {}
- data NotFound = NotFound {}
- data Unauthorized = Unauthorized {}
- type BranchName = Text
API
type ProjectsAPI = GetProjectAPI :<|> (CreateProjectAPI :<|> (GetProjectBranchAPI :<|> (CreateProjectBranchAPI :<|> SetProjectBranchHeadAPI))) Source #
Get project
type GetProjectAPI = "project" :> (QueryParam "id" Text :> (QueryParam "name" Text :> Verb 'GET 200 '[JSON] GetProjectResponse)) Source #
GET /project?id=XXX
- Get a project by id.
GET /project?name=XXX
- Get a project by name.
data GetProjectResponse Source #
GET /project
response.
GetProjectResponseNotFound NotFound | |
GetProjectResponseUnauthorized Unauthorized | |
GetProjectResponseSuccess !Project |
Instances
Create project
type CreateProjectAPI = "create-project" :> (ReqBody '[JSON] CreateProjectRequest :> Verb 'POST 200 '[JSON] CreateProjectResponse) Source #
POST /create-project
- Create a project
data CreateProjectRequest Source #
POST /create-project
request.
Instances
data CreateProjectResponse Source #
POST /create-project
response.
CreateProjectResponseUnauthorized Unauthorized | |
CreateProjectResponseNotFound !NotFound | |
CreateProjectResponseSuccess !Project |
Instances
Get project branch
type GetProjectBranchAPI = "project-branch" :> (QueryParam' '[Required, Strict] "projectId" Text :> (QueryParam "branchId" Text :> (QueryParam "branchName" Text :> (QueryFlag "includeSquashed" :> Verb 'GET 200 '[JSON] GetProjectBranchResponse)))) Source #
GET /project-branch?projectId=XXX&branchId=YYY
- Get a project branch by id.
GET /project-branch?projectId=XXX&branchName=YYY
- Get a project branch by name.
data GetProjectBranchResponse Source #
GET /project-branch
response.
GetProjectBranchResponseProjectNotFound NotFound | |
GetProjectBranchResponseBranchNotFound NotFound | |
GetProjectBranchResponseUnauthorized Unauthorized | |
GetProjectBranchResponseSuccess !ProjectBranch |
Instances
Create project branch
type CreateProjectBranchAPI = "create-project-branch" :> (ReqBody '[JSON] CreateProjectBranchRequest :> Verb 'POST 200 '[JSON] CreateProjectBranchResponse) Source #
POST /create-project-branch
- Create a project branch
data CreateProjectBranchRequest Source #
POST /create-project-branch
request.
Instances
data CreateProjectBranchResponse Source #
POST /create-project-branch
response.
Instances
Set project branch head
type SetProjectBranchHeadAPI = "set-project-branch-head" :> (ReqBody '[JSON] SetProjectBranchHeadRequest :> Verb 'POST 200 '[JSON] SetProjectBranchHeadResponse) Source #
POST /set-project-branch-head
- Make a project branch point at an already-uploaded causal
data SetProjectBranchHeadRequest Source #
POST /set-project-branch-head
request.
SetProjectBranchHeadRequest | |
|
Instances
data SetProjectBranchHeadResponse Source #
POST /set-project-branch-hash
response.
Instances
Types
A project.
Project | |
|
data ProjectBranch Source #
A project branch.
ProjectBranch | |
|
Instances
data ProjectBranchIds Source #
A project id and branch id.
Instances
type BranchName = Text Source #
A project branch name segment. Does not contain a project or contributor segment.
E.g. "main"