.ts
TypeScript
(application/typescript)
// 1st-party
import { makeService } from "@ethicdevs/react-monolith";
// service types
import type { PullRequestServiceDeps, PullRequestServiceAPI } from "./types";
// service methods
import { default as makeCreatePullRequest } from "./createPullRequest";
import { default as makeGetPullRequestById } from "./getPullRequestById";
import { default as makeGetPullRequestByUid } from "./getPullRequestByUid";
import { default as makeGetPullRequestsInRepository } from "./getPullRequestsInRepository";

export const makePullRequestService = makeService<
  PullRequestServiceAPI,
  PullRequestServiceDeps
>({
  createPullRequest: makeCreatePullRequest,
  getPullRequestById: makeGetPullRequestById,
  getPullRequestByUid: makeGetPullRequestByUid,
  getPullRequestsInRepository: makeGetPullRequestsInRepository,
});