airbyte-faros-destination 0.10.18 → 0.10.19

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2,6 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.FarosBoards = void 0;
4
4
  const common_1 = require("./common");
5
+ const typeCategories = new Map(['Kanban', 'Scrum'].map((t) => [common_1.JiraCommon.normalize(t), t]));
5
6
  class FarosBoards extends common_1.JiraConverter {
6
7
  constructor() {
7
8
  super(...arguments);
@@ -11,13 +12,22 @@ class FarosBoards extends common_1.JiraConverter {
11
12
  ];
12
13
  }
13
14
  async convert(record, ctx) {
15
+ var _a;
14
16
  const board = record.record.data;
15
17
  const uid = board.uid;
16
18
  const source = this.streamName.source;
17
19
  return [
18
20
  {
19
21
  model: 'tms_TaskBoard',
20
- record: { uid, name: board.name, source },
22
+ record: {
23
+ uid,
24
+ name: board.name,
25
+ type: {
26
+ category: (_a = typeCategories.get(common_1.JiraCommon.normalize(board.type))) !== null && _a !== void 0 ? _a : 'Custom',
27
+ detail: board.type,
28
+ },
29
+ source,
30
+ },
21
31
  },
22
32
  {
23
33
  model: 'tms_TaskBoardProjectRelationship',
@@ -1 +1 @@
1
- {"version":3,"file":"faros_boards.js","sourceRoot":"","sources":["../../../src/converters/jira/faros_boards.ts"],"names":[],"mappings":";;;AAGA,qCAAuC;AAEvC,MAAa,WAAY,SAAQ,sBAAa;IAA9C;;QACW,sBAAiB,GAAoC;YAC5D,eAAe;YACf,kCAAkC;SACnC,CAAC;IAuBJ,CAAC;IArBC,KAAK,CAAC,OAAO,CACX,MAAqB,EACrB,GAAkB;QAElB,MAAM,KAAK,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC;QACjC,MAAM,GAAG,GAAG,KAAK,CAAC,GAAG,CAAC;QACtB,MAAM,MAAM,GAAG,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC;QACtC,OAAO;YACL;gBACE,KAAK,EA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,KAAK,CAAC,IAAI;qBACnB;oBACD,MAAM;iBACP;aACF;YACD;gBACE,KAAK,EAAE,kCAAkC;gBACzC,MAAM,EAAE;oBACN,KAAK,EAAE,EAAC,GAAG,EAAE,MAAM,EAAC;oBACpB,OAAO,EAAE,EAAC,GAAG,EAAE,KAAK,CAAC,UAAU,EAAE,MAAM,EAAC;iBACzC;aACF;SACF,CAAC;IACJ,CAAC;CACF;AApCD,kCAoCC"}
@@ -5,21 +5,30 @@ const lodash_1 = require("lodash");
5
5
  const common_1 = require("./common");
6
6
  class FarosSprintReports extends common_1.JiraConverter {
7
7
  get destinationModels() {
8
- return ['tms_SprintHistory'];
8
+ return ['tms_SprintReport'];
9
9
  }
10
10
  async convert(record, ctx) {
11
11
  const sprintReport = record.record.data;
12
- const uid = (0, lodash_1.toString)(sprintReport.sprintId);
12
+ const sprintUid = (0, lodash_1.toString)(sprintReport.sprintId);
13
+ const boardUid = (0, lodash_1.toString)(sprintReport.boardId);
13
14
  const results = [];
14
15
  const source = this.streamName.source;
15
16
  for (const issue of sprintReport.issues || []) {
16
17
  results.push({
17
- model: 'tms_SprintHistory',
18
+ model: 'tms_SprintReport',
18
19
  record: {
19
- sprint: { uid, source },
20
- task: { uid: issue.key, source },
20
+ sprintHistory: {
21
+ task: { uid: issue.key, source },
22
+ sprint: { uid: sprintUid, source },
23
+ },
24
+ board: { uid: boardUid, source },
21
25
  points: issue.points,
22
- status: { category: issue.status },
26
+ plannedPoints: issue.plannedPoints,
27
+ classification: { category: issue.classification },
28
+ status: {
29
+ category: common_1.JiraStatusCategories.get(common_1.JiraCommon.normalize(issue.status)),
30
+ detail: issue.status,
31
+ },
23
32
  addedDuringSprint: issue.addedDuringSprint,
24
33
  },
25
34
  });
@@ -1 +1 @@
1
- {"version":3,"file":"faros_sprint_reports.js","sourceRoot":"","sources":["../../../src/converters/jira/faros_sprint_reports.ts"],"names":[],"mappings":";;;AAEA,mCAAgC;AAGhC,qCAAuC;AAEvC,MAAa,kBAAmB,SAAQ,sBAAa;IACnD,IAAI,iBAAiB;QACnB,OAAO,CAAC,mBAAmB,CAAC,CAAC;IAC/B,CAAC;IACD,KAAK,CAAC,OAAO,CACX,MAAqB,EACrB,GAAkB;QAElB,MAAM,YAAY,GAAG,MAAM,CAAC,MAAM,CAAC,IAAoB,CAAC;QACxD,MAAM,GAAG,GAAG,IAAA,iBAAQ,EAAC,YAAY,CAAC,QAAQ,CAAC,CAAC;QAC5C,MAAM,OAAO,GAAwB,EAAE,CAAC;QACxC,MAAM,MAAM,GAAG,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC;QACtC,KAAK,MAAM,KAAK,IAAI,YAAY,CAAC,MAAM,IAAI,EAAE,EAAE,CAAC;YAC9C,OAAO,CAAC,IAAI,CAAC;gBACX,KAAK,EAAE,mBAAmB;gBAC1B,MAAM,EAAE;oBACN,MAAM,EAAE,EAAC,GAAG,EAAE,MAAM,EAAC;oBACrB,IAAI,EAAE,EAAC,GAAG,EAAE,KAAK,CAAC,GAAG,EAAE,MAAM,EAAC;oBAC9B,MAAM,EAAE,KAAK,CAAC,MAAM;oBACpB,MAAM,EAAE,EAAC,QAAQ,EAAE,KAAK,CAAC,MAAM,EAAC;oBAChC,iBAAiB,EAAE,KAAK,CAAC,iBAAiB;iBAC3C;aACF,CAAC,CAAC;QACL,CAAC;QACD,OAAO,OAAO,CAAC;IACjB,CAAC;CACF;AA1BD,gDA0BC"}
1
+ {"version":3,"file":"faros_sprint_reports.js","sourceRoot":"","sources":["../../../src/converters/jira/faros_sprint_reports.ts"],"names":[],"mappings":";;;AAEA,mCAAgC;AAGhC,qCAAyE;AAEzE,MAAa,kBAAmB,SAAQ,sBAAa;IACnD,IAAI,iBAAiB;QACnB,OAAO,CAAC,kBAAkB,CAAC,CAAC;IAC9B,CAAC;IACD,KAAK,CAAC,OAAO,CACX,MAAqB,EACrB,GAAkB;QAElB,MAAM,YAAY,GAAG,MAAM,CAAC,MAAM,CAAC,IAAoB,CAAC;QACxD,MAAM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