From fa2d3238062c4ee540a6f1843845d4c6839e0a8e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Pfeuffer?= Date: Tue, 18 Sep 2018 11:54:59 +0200 Subject: [PATCH] Complete type Changeset with branches and parents --- .../packages/ui-types/src/Branch.js | 8 ++++++++ .../packages/ui-types/src/Changesets.js | 19 +++++++++++++------ 2 files changed, 21 insertions(+), 6 deletions(-) create mode 100644 scm-ui-components/packages/ui-types/src/Branch.js diff --git a/scm-ui-components/packages/ui-types/src/Branch.js b/scm-ui-components/packages/ui-types/src/Branch.js new file mode 100644 index 0000000000..f209de34a0 --- /dev/null +++ b/scm-ui-components/packages/ui-types/src/Branch.js @@ -0,0 +1,8 @@ +//@flow +import type {Links} from "./hal"; + +export type Branch = { + name: string, + revision: string, + _links: Links +} diff --git a/scm-ui-components/packages/ui-types/src/Changesets.js b/scm-ui-components/packages/ui-types/src/Changesets.js index 9979cf2d89..12b87173fe 100644 --- a/scm-ui-components/packages/ui-types/src/Changesets.js +++ b/scm-ui-components/packages/ui-types/src/Changesets.js @@ -1,6 +1,8 @@ //@flow -import type { Links } from "./hal"; -import type { Tag } from "./Tags"; +import type {Links} from "./hal"; +import type {Tag} from "./Tags"; +import type {Branch} from "./Branch"; + export type Changeset = { id: string, date: Date, @@ -8,11 +10,16 @@ export type Changeset = { name: string, mail: string }, - description: string + description: string, _links: Links, _embedded: { - tags: Tag[] - branches: any, //todo: Add correct type - parents: any //todo: Add correct type + tags: Tag[], + branches: Branch[], + parents: ParentChangeset[] }; } + +export type ParentChangeset = { + id: string, + _links: Links +}