airbyte-faros-destination 0.1.53

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.
Files changed (280) hide show
  1. package/README.md +161 -0
  2. package/lib/common/write-stats.d.ts +16 -0
  3. package/lib/common/write-stats.js +48 -0
  4. package/lib/community/hasura-client.d.ts +27 -0
  5. package/lib/community/hasura-client.js +278 -0
  6. package/lib/community/hasura-writer.d.ts +12 -0
  7. package/lib/community/hasura-writer.js +44 -0
  8. package/lib/community/types.d.ts +26 -0
  9. package/lib/community/types.js +9 -0
  10. package/lib/converters/agileaccelerator/agileaccelerator_types.d.ts +315 -0
  11. package/lib/converters/agileaccelerator/agileaccelerator_types.js +81 -0
  12. package/lib/converters/agileaccelerator/common.d.ts +64 -0
  13. package/lib/converters/agileaccelerator/common.js +167 -0
  14. package/lib/converters/agileaccelerator/works.d.ts +7 -0
  15. package/lib/converters/agileaccelerator/works.js +105 -0
  16. package/lib/converters/asana/common.d.ts +39 -0
  17. package/lib/converters/asana/common.js +64 -0
  18. package/lib/converters/asana/projects.d.ts +7 -0
  19. package/lib/converters/asana/projects.js +29 -0
  20. package/lib/converters/asana/sections.d.ts +7 -0
  21. package/lib/converters/asana/sections.js +28 -0
  22. package/lib/converters/asana/stories.d.ts +7 -0
  23. package/lib/converters/asana/stories.js +32 -0
  24. package/lib/converters/asana/tags.d.ts +7 -0
  25. package/lib/converters/asana/tags.js +22 -0
  26. package/lib/converters/asana/tasks.d.ts +11 -0
  27. package/lib/converters/asana/tasks.js +160 -0
  28. package/lib/converters/asana/users.d.ts +7 -0
  29. package/lib/converters/asana/users.js +16 -0
  30. package/lib/converters/backlog/common.d.ts +20 -0
  31. package/lib/converters/backlog/common.js +59 -0
  32. package/lib/converters/backlog/issues.d.ts +7 -0
  33. package/lib/converters/backlog/issues.js +119 -0
  34. package/lib/converters/backlog/models.d.ts +156 -0
  35. package/lib/converters/backlog/models.js +23 -0
  36. package/lib/converters/backlog/projects.d.ts +7 -0
  37. package/lib/converters/backlog/projects.js +78 -0
  38. package/lib/converters/backlog/users.d.ts +7 -0
  39. package/lib/converters/backlog/users.js +26 -0
  40. package/lib/converters/bitbucket/branches.d.ts +7 -0
  41. package/lib/converters/bitbucket/branches.js +31 -0
  42. package/lib/converters/bitbucket/commits.d.ts +7 -0
  43. package/lib/converters/bitbucket/commits.js +50 -0
  44. package/lib/converters/bitbucket/common.d.ts +28 -0
  45. package/lib/converters/bitbucket/common.js +56 -0
  46. package/lib/converters/bitbucket/deployments.d.ts +11 -0
  47. package/lib/converters/bitbucket/deployments.js +100 -0
  48. package/lib/converters/bitbucket/issues.d.ts +12 -0
  49. package/lib/converters/bitbucket/issues.js +111 -0
  50. package/lib/converters/bitbucket/pipeline_steps.d.ts +10 -0
  51. package/lib/converters/bitbucket/pipeline_steps.js +83 -0
  52. package/lib/converters/bitbucket/pipelines.d.ts +8 -0
  53. package/lib/converters/bitbucket/pipelines.js +90 -0
  54. package/lib/converters/bitbucket/pull_request_activities.d.ts +13 -0
  55. package/lib/converters/bitbucket/pull_request_activities.js +112 -0
  56. package/lib/converters/bitbucket/pull_requests.d.ts +10 -0
  57. package/lib/converters/bitbucket/pull_requests.js +95 -0
  58. package/lib/converters/bitbucket/repositories.d.ts +9 -0
  59. package/lib/converters/bitbucket/repositories.js +41 -0
  60. package/lib/converters/bitbucket/types.d.ts +667 -0
  61. package/lib/converters/bitbucket/types.js +2 -0
  62. package/lib/converters/bitbucket/workspace_users.d.ts +7 -0
  63. package/lib/converters/bitbucket/workspace_users.js +31 -0
  64. package/lib/converters/bitbucket/workspaces.d.ts +8 -0
  65. package/lib/converters/bitbucket/workspaces.js +61 -0
  66. package/lib/converters/converter-registry.d.ts +25 -0
  67. package/lib/converters/converter-registry.js +64 -0
  68. package/lib/converters/converter.d.ts +63 -0
  69. package/lib/converters/converter.js +122 -0
  70. package/lib/converters/datadog/common.d.ts +27 -0
  71. package/lib/converters/datadog/common.js +34 -0
  72. package/lib/converters/datadog/incidents.d.ts +9 -0
  73. package/lib/converters/datadog/incidents.js +128 -0
  74. package/lib/converters/datadog/users.d.ts +7 -0
  75. package/lib/converters/datadog/users.js +27 -0
  76. package/lib/converters/docker/common.d.ts +87 -0
  77. package/lib/converters/docker/common.js +76 -0
  78. package/lib/converters/docker/tags.d.ts +8 -0
  79. package/lib/converters/docker/tags.js +98 -0
  80. package/lib/converters/github/assignees.d.ts +7 -0
  81. package/lib/converters/github/assignees.js +16 -0
  82. package/lib/converters/github/branches.d.ts +7 -0
  83. package/lib/converters/github/branches.js +28 -0
  84. package/lib/converters/github/collaborators.d.ts +7 -0
  85. package/lib/converters/github/collaborators.js +19 -0
  86. package/lib/converters/github/commits.d.ts +7 -0
  87. package/lib/converters/github/commits.js +48 -0
  88. package/lib/converters/github/common.d.ts +37 -0
  89. package/lib/converters/github/common.js +130 -0
  90. package/lib/converters/github/issue_labels.d.ts +7 -0
  91. package/lib/converters/github/issue_labels.js +20 -0
  92. package/lib/converters/github/issue_milestones.d.ts +8 -0
  93. package/lib/converters/github/issue_milestones.js +42 -0
  94. package/lib/converters/github/issues.d.ts +9 -0
  95. package/lib/converters/github/issues.js +90 -0
  96. package/lib/converters/github/organizations.d.ts +7 -0
  97. package/lib/converters/github/organizations.js +37 -0
  98. package/lib/converters/github/projects.d.ts +7 -0
  99. package/lib/converters/github/projects.js +21 -0
  100. package/lib/converters/github/pull_request_stats.d.ts +7 -0
  101. package/lib/converters/github/pull_request_stats.js +43 -0
  102. package/lib/converters/github/pull_requests.d.ts +7 -0
  103. package/lib/converters/github/pull_requests.js +63 -0
  104. package/lib/converters/github/releases.d.ts +7 -0
  105. package/lib/converters/github/releases.js +51 -0
  106. package/lib/converters/github/repositories.d.ts +7 -0
  107. package/lib/converters/github/repositories.js +44 -0
  108. package/lib/converters/github/review_comments.d.ts +7 -0
  109. package/lib/converters/github/review_comments.js +39 -0
  110. package/lib/converters/github/reviews.d.ts +7 -0
  111. package/lib/converters/github/reviews.js +58 -0
  112. package/lib/converters/github/tags.d.ts +7 -0
  113. package/lib/converters/github/tags.js +31 -0
  114. package/lib/converters/github/users.d.ts +7 -0
  115. package/lib/converters/github/users.js +19 -0
  116. package/lib/converters/gitlab/branches.d.ts +8 -0
  117. package/lib/converters/gitlab/branches.js +44 -0
  118. package/lib/converters/gitlab/commits.d.ts +7 -0
  119. package/lib/converters/gitlab/commits.js +33 -0
  120. package/lib/converters/gitlab/common.d.ts +30 -0
  121. package/lib/converters/gitlab/common.js +70 -0
  122. package/lib/converters/gitlab/group_labels.d.ts +7 -0
  123. package/lib/converters/gitlab/group_labels.js +15 -0
  124. package/lib/converters/gitlab/group_milestones.d.ts +8 -0
  125. package/lib/converters/gitlab/group_milestones.js +41 -0
  126. package/lib/converters/gitlab/groups.d.ts +7 -0
  127. package/lib/converters/gitlab/groups.js +43 -0
  128. package/lib/converters/gitlab/issues.d.ts +10 -0
  129. package/lib/converters/gitlab/issues.js +79 -0
  130. package/lib/converters/gitlab/jobs.d.ts +11 -0
  131. package/lib/converters/gitlab/jobs.js +75 -0
  132. package/lib/converters/gitlab/merge_request_commits.d.ts +7 -0
  133. package/lib/converters/gitlab/merge_request_commits.js +34 -0
  134. package/lib/converters/gitlab/merge_requests.d.ts +10 -0
  135. package/lib/converters/gitlab/merge_requests.js +65 -0
  136. package/lib/converters/gitlab/pipelines.d.ts +7 -0
  137. package/lib/converters/gitlab/pipelines.js +41 -0
  138. package/lib/converters/gitlab/project_labels.d.ts +7 -0
  139. package/lib/converters/gitlab/project_labels.js +15 -0
  140. package/lib/converters/gitlab/project_milestones.d.ts +8 -0
  141. package/lib/converters/gitlab/project_milestones.js +41 -0
  142. package/lib/converters/gitlab/projects.d.ts +7 -0
  143. package/lib/converters/gitlab/projects.js +51 -0
  144. package/lib/converters/gitlab/releases.d.ts +10 -0
  145. package/lib/converters/gitlab/releases.js +68 -0
  146. package/lib/converters/gitlab/tags.d.ts +10 -0
  147. package/lib/converters/gitlab/tags.js +41 -0
  148. package/lib/converters/gitlab/users.d.ts +7 -0
  149. package/lib/converters/gitlab/users.js +33 -0
  150. package/lib/converters/googlecalendar/calendar_models.d.ts +618 -0
  151. package/lib/converters/googlecalendar/calendar_models.js +2 -0
  152. package/lib/converters/googlecalendar/calendars.d.ts +7 -0
  153. package/lib/converters/googlecalendar/calendars.js +29 -0
  154. package/lib/converters/googlecalendar/common.d.ts +52 -0
  155. package/lib/converters/googlecalendar/common.js +130 -0
  156. package/lib/converters/googlecalendar/events.d.ts +8 -0
  157. package/lib/converters/googlecalendar/events.js +117 -0
  158. package/lib/converters/harness/common.d.ts +105 -0
  159. package/lib/converters/harness/common.js +16 -0
  160. package/lib/converters/harness/executions.d.ts +15 -0
  161. package/lib/converters/harness/executions.js +245 -0
  162. package/lib/converters/jenkins/builds.d.ts +9 -0
  163. package/lib/converters/jenkins/builds.js +74 -0
  164. package/lib/converters/jenkins/common.d.ts +25 -0
  165. package/lib/converters/jenkins/common.js +54 -0
  166. package/lib/converters/jenkins/jobs.d.ts +8 -0
  167. package/lib/converters/jenkins/jobs.js +29 -0
  168. package/lib/converters/jira/board_issues.d.ts +7 -0
  169. package/lib/converters/jira/board_issues.js +28 -0
  170. package/lib/converters/jira/boards.d.ts +7 -0
  171. package/lib/converters/jira/boards.js +34 -0
  172. package/lib/converters/jira/common.d.ts +61 -0
  173. package/lib/converters/jira/common.js +64 -0
  174. package/lib/converters/jira/epics.d.ts +8 -0
  175. package/lib/converters/jira/epics.js +45 -0
  176. package/lib/converters/jira/issue_fields.d.ts +7 -0
  177. package/lib/converters/jira/issue_fields.js +15 -0
  178. package/lib/converters/jira/issues.d.ts +52 -0
  179. package/lib/converters/jira/issues.js +545 -0
  180. package/lib/converters/jira/project_versions.d.ts +9 -0
  181. package/lib/converters/jira/project_versions.js +48 -0
  182. package/lib/converters/jira/projects.d.ts +7 -0
  183. package/lib/converters/jira/projects.js +40 -0
  184. package/lib/converters/jira/pull_requests.d.ts +7 -0
  185. package/lib/converters/jira/pull_requests.js +15 -0
  186. package/lib/converters/jira/sprint_issues.d.ts +7 -0
  187. package/lib/converters/jira/sprint_issues.js +15 -0
  188. package/lib/converters/jira/sprints.d.ts +16 -0
  189. package/lib/converters/jira/sprints.js +80 -0
  190. package/lib/converters/jira/users.d.ts +8 -0
  191. package/lib/converters/jira/users.js +33 -0
  192. package/lib/converters/jira/workflow_statuses.d.ts +7 -0
  193. package/lib/converters/jira/workflow_statuses.js +15 -0
  194. package/lib/converters/jsonata.d.ts +17 -0
  195. package/lib/converters/jsonata.js +47 -0
  196. package/lib/converters/okta/common.d.ts +8 -0
  197. package/lib/converters/okta/common.js +17 -0
  198. package/lib/converters/okta/groups.d.ts +7 -0
  199. package/lib/converters/okta/groups.js +47 -0
  200. package/lib/converters/okta/models.d.ts +102 -0
  201. package/lib/converters/okta/models.js +2 -0
  202. package/lib/converters/okta/users.d.ts +8 -0
  203. package/lib/converters/okta/users.js +73 -0
  204. package/lib/converters/okta_faros/common.d.ts +4 -0
  205. package/lib/converters/okta_faros/common.js +11 -0
  206. package/lib/converters/okta_faros/groups.d.ts +13 -0
  207. package/lib/converters/okta_faros/groups.js +23 -0
  208. package/lib/converters/okta_faros/users.d.ts +13 -0
  209. package/lib/converters/okta_faros/users.js +23 -0
  210. package/lib/converters/pagerduty/common.d.ts +37 -0
  211. package/lib/converters/pagerduty/common.js +40 -0
  212. package/lib/converters/pagerduty/incident_log_entries.d.ts +8 -0
  213. package/lib/converters/pagerduty/incident_log_entries.js +56 -0
  214. package/lib/converters/pagerduty/incidents.d.ts +10 -0
  215. package/lib/converters/pagerduty/incidents.js +127 -0
  216. package/lib/converters/pagerduty/priorities_resource.d.ts +11 -0
  217. package/lib/converters/pagerduty/priorities_resource.js +64 -0
  218. package/lib/converters/pagerduty/users.d.ts +7 -0
  219. package/lib/converters/pagerduty/users.js +26 -0
  220. package/lib/converters/phabricator/commits.d.ts +8 -0
  221. package/lib/converters/phabricator/commits.js +75 -0
  222. package/lib/converters/phabricator/common.d.ts +40 -0
  223. package/lib/converters/phabricator/common.js +107 -0
  224. package/lib/converters/phabricator/repositories.d.ts +7 -0
  225. package/lib/converters/phabricator/repositories.js +56 -0
  226. package/lib/converters/phabricator/revisions.d.ts +7 -0
  227. package/lib/converters/phabricator/revisions.js +83 -0
  228. package/lib/converters/phabricator/users.d.ts +7 -0
  229. package/lib/converters/phabricator/users.js +39 -0
  230. package/lib/converters/shortcut/common.d.ts +16 -0
  231. package/lib/converters/shortcut/common.js +68 -0
  232. package/lib/converters/shortcut/epics.d.ts +7 -0
  233. package/lib/converters/shortcut/epics.js +29 -0
  234. package/lib/converters/shortcut/iterations.d.ts +7 -0
  235. package/lib/converters/shortcut/iterations.js +29 -0
  236. package/lib/converters/shortcut/members.d.ts +7 -0
  237. package/lib/converters/shortcut/members.js +26 -0
  238. package/lib/converters/shortcut/models.d.ts +392 -0
  239. package/lib/converters/shortcut/models.js +30 -0
  240. package/lib/converters/shortcut/projects.d.ts +7 -0
  241. package/lib/converters/shortcut/projects.js +46 -0
  242. package/lib/converters/shortcut/stories.d.ts +7 -0
  243. package/lib/converters/shortcut/stories.js +127 -0
  244. package/lib/converters/squadcast/common.d.ts +169 -0
  245. package/lib/converters/squadcast/common.js +62 -0
  246. package/lib/converters/squadcast/events.d.ts +9 -0
  247. package/lib/converters/squadcast/events.js +53 -0
  248. package/lib/converters/squadcast/incidents.d.ts +10 -0
  249. package/lib/converters/squadcast/incidents.js +141 -0
  250. package/lib/converters/squadcast/services.d.ts +7 -0
  251. package/lib/converters/squadcast/services.js +28 -0
  252. package/lib/converters/squadcast/users.d.ts +7 -0
  253. package/lib/converters/squadcast/users.js +27 -0
  254. package/lib/converters/statuspage/common.d.ts +93 -0
  255. package/lib/converters/statuspage/common.js +80 -0
  256. package/lib/converters/statuspage/incident_updates.d.ts +8 -0
  257. package/lib/converters/statuspage/incident_updates.js +45 -0
  258. package/lib/converters/statuspage/incidents.d.ts +10 -0
  259. package/lib/converters/statuspage/incidents.js +128 -0
  260. package/lib/converters/statuspage/users.d.ts +7 -0
  261. package/lib/converters/statuspage/users.js +26 -0
  262. package/lib/converters/victorops/common.d.ts +16 -0
  263. package/lib/converters/victorops/common.js +24 -0
  264. package/lib/converters/victorops/incidents.d.ts +12 -0
  265. package/lib/converters/victorops/incidents.js +209 -0
  266. package/lib/converters/victorops/teams.d.ts +8 -0
  267. package/lib/converters/victorops/teams.js +30 -0
  268. package/lib/converters/victorops/users.d.ts +8 -0
  269. package/lib/converters/victorops/users.js +33 -0
  270. package/lib/destination-runner.d.ts +12 -0
  271. package/lib/destination-runner.js +22 -0
  272. package/lib/destination.d.ts +42 -0
  273. package/lib/destination.js +508 -0
  274. package/lib/index.d.ts +16 -0
  275. package/lib/index.js +39 -0
  276. package/lib/tsconfig.tsbuildinfo +1 -0
  277. package/package.json +71 -0
  278. package/resources/fetch-primary-keys.sql +16 -0
  279. package/resources/introspection-query.gql +61 -0
  280. package/resources/spec.json +468 -0
@@ -0,0 +1,392 @@
1
+ export declare type LabelStats = {
2
+ num_epics: number;
3
+ num_points_completed: number;
4
+ num_points_in_progress: number;
5
+ num_points_total: number;
6
+ num_stories_completed: number;
7
+ num_stories_in_progress: number;
8
+ num_stories_total: number;
9
+ num_stories_unestimated: number;
10
+ };
11
+ export declare type Label = {
12
+ app_url: string;
13
+ archived: boolean;
14
+ color: string | null;
15
+ created_at: string | null;
16
+ description: string | null;
17
+ entity_type: string;
18
+ external_id: string | null;
19
+ id: number;
20
+ name: string;
21
+ stats: LabelStats;
22
+ updated_at: string | null;
23
+ };
24
+ export declare type ID = string | number;
25
+ export declare type EpicStats = {
26
+ average_cycle_time: number;
27
+ average_lead_time: number;
28
+ last_story_update: string | null;
29
+ num_points: number;
30
+ num_points_done: number;
31
+ num_points_started: number;
32
+ num_points_unstarted: number;
33
+ num_stories_done: number;
34
+ num_stories_started: number;
35
+ num_stories_unestimated: number;
36
+ num_stories_unstarted: number;
37
+ };
38
+ export declare type EpicSlim = {
39
+ id: number;
40
+ app_url: string;
41
+ archived: boolean;
42
+ completed: boolean;
43
+ completed_at: Date | null;
44
+ completed_at_override: Date | null;
45
+ created_at: Date | null;
46
+ deadline: Date | null;
47
+ entity_type: string;
48
+ epic_state_id: number;
49
+ external_id: string | null;
50
+ follower_ids: Array<ID>;
51
+ group_mention_ids: Array<ID>;
52
+ labels: Array<Label>;
53
+ member_mention_ids: Array<ID>;
54
+ mention_ids: Array<ID>;
55
+ milestone_id: number | null;
56
+ name: string;
57
+ owner_ids: Array<ID>;
58
+ planned_start_date: Date | null;
59
+ position: number;
60
+ project_ids: Array<number>;
61
+ requested_by_id: ID;
62
+ started: boolean;
63
+ started_at: Date | null;
64
+ started_at_override: Date | null;
65
+ state: string;
66
+ stats: EpicStats;
67
+ updated_at: Date | null;
68
+ };
69
+ export declare type EpicStates = 'to do' | 'in progress' | 'done';
70
+ export declare type Epic = {
71
+ app_url: string;
72
+ archived: string;
73
+ comments: Array<Record<string, any>>;
74
+ completed: boolean;
75
+ completed_at: string | null;
76
+ completed_at_override?: string | null;
77
+ created_at: string | null;
78
+ deadline: string | null;
79
+ description: string;
80
+ entity_type: string;
81
+ epic_state_id: number;
82
+ external_id: string | null;
83
+ follower_ids: Array<ID>;
84
+ group_id: string | null;
85
+ group_mention_ids: Array<ID>;
86
+ id: number;
87
+ labels: Array<Label>;
88
+ member_mention_ids: Array<ID>;
89
+ mention_ids: Array<ID>;
90
+ milestone_id: number | null;
91
+ name: string;
92
+ owner_ids: Array<ID>;
93
+ planned_start_date: string | null;
94
+ position: number;
95
+ project_ids: Array<number>;
96
+ requested_by_id: ID;
97
+ started: boolean;
98
+ started_at: string | null;
99
+ started_at_override: string | null;
100
+ state: EpicStates;
101
+ stats: EpicStats;
102
+ updated_at: string | null;
103
+ };
104
+ export declare type IterationStats = {
105
+ average_cycle_time: number;
106
+ average_lead_time: number;
107
+ num_points: number;
108
+ num_points_done: number;
109
+ num_points_started: number;
110
+ num_points_unstarted: number;
111
+ num_stories_done: number;
112
+ num_stories_started: number;
113
+ num_stories_unestimated: number;
114
+ num_stories_unstarted: number;
115
+ };
116
+ export declare type IterationStatus = 'unstarted' | 'started' | 'done';
117
+ export declare type Iteration = {
118
+ created_at: string;
119
+ description: string;
120
+ end_date: string;
121
+ entity_type: string;
122
+ follower_ids: Array<ID>;
123
+ group_mention_ids: Array<ID>;
124
+ id: number;
125
+ labels: Array<Label>;
126
+ member_mention_ids: Array<ID>;
127
+ mention_ids: Array<ID>;
128
+ name: string;
129
+ start_date: string;
130
+ stats: IterationStats;
131
+ status: IterationStatus;
132
+ updated_at: string;
133
+ };
134
+ export declare type IterationChange = {
135
+ name?: string;
136
+ description?: string;
137
+ start_date?: string;
138
+ end_date?: string;
139
+ follower_ids?: Array<ID>;
140
+ };
141
+ export declare type Repository = {
142
+ created_ad: string;
143
+ entity_type: string;
144
+ external_id?: string | null;
145
+ full_name: string;
146
+ id: number;
147
+ name: string;
148
+ type: string;
149
+ updated_at: string | null;
150
+ url: string;
151
+ };
152
+ export declare type Member = {
153
+ id: ID;
154
+ created_at: string;
155
+ updated_at: string;
156
+ role: string;
157
+ disabled: boolean;
158
+ profile: Profile;
159
+ overrides: {
160
+ email_address?: string;
161
+ gravatar_hash?: string;
162
+ display_icon?: string;
163
+ };
164
+ };
165
+ export declare type Profile = {
166
+ deactivated: boolean;
167
+ display_icon: any;
168
+ email_address: string | null;
169
+ entity_type: string;
170
+ gravatar_hash: string | null;
171
+ id: ID;
172
+ mention_name: string;
173
+ name: string | null;
174
+ two_factor_auth_activated: boolean;
175
+ };
176
+ export declare type ProjectStats = {
177
+ num_points: number;
178
+ num_stories: number;
179
+ };
180
+ export declare type Project = {
181
+ abbreviation: string | null;
182
+ archived: boolean;
183
+ color: string | null;
184
+ created_at: string | null;
185
+ days_to_thermometer: number;
186
+ description: string | null;
187
+ entity_type: string;
188
+ external_id: string | null;
189
+ follower_ids: Array<ID>;
190
+ id: number;
191
+ iteration_length: number;
192
+ name: string;
193
+ show_thermometer: boolean;
194
+ start_time: string;
195
+ stats: ProjectStats;
196
+ team_id: number;
197
+ updated_at: string | null;
198
+ };
199
+ export declare type ProjectChange = {
200
+ name?: string;
201
+ team_id?: number;
202
+ description?: string;
203
+ created_at?: string;
204
+ updated_at?: string;
205
+ color?: string;
206
+ abbreviation?: string;
207
+ archived?: boolean;
208
+ start_time?: string;
209
+ show_thermometer?: boolean;
210
+ days_to_thermometer?: string;
211
+ external_id?: string;
212
+ follower_ids?: Array<ID>;
213
+ };
214
+ export declare type StoryType = 'bug' | 'chore' | 'feature';
215
+ export interface Story {
216
+ app_url: string;
217
+ archived: boolean;
218
+ blocked: boolean;
219
+ blocker: boolean;
220
+ branches: Array<Branch>;
221
+ comments: Array<Comment>;
222
+ commits: Array<Commit>;
223
+ completed: boolean;
224
+ completed_at: string | null;
225
+ completed_at_override: string | null;
226
+ created_at: string;
227
+ cycle_time: number;
228
+ deadline: string | null;
229
+ description: string;
230
+ entity_type: string;
231
+ epic_id: number | null;
232
+ estimate: number | null;
233
+ external_id: string | null;
234
+ external_links: Array<string>;
235
+ files: Array<File>;
236
+ follower_ids: Array<ID>;
237
+ id: number;
238
+ iteration_id: number | null;
239
+ labels: Array<Label>;
240
+ lead_time: number;
241
+ linked_files: Array<LinkedFile>;
242
+ member_mention_ids: Array<ID>;
243
+ mention_ids: Array<ID>;
244
+ moved_at: string | null;
245
+ name: string;
246
+ owner_ids: Array<ID>;
247
+ position: number;
248
+ previous_iteration_ids: Array<number>;
249
+ project_id: number;
250
+ pull_requests: Array<PullRequest>;
251
+ requested_by_id: ID;
252
+ started: boolean;
253
+ started_at: string | null;
254
+ started_at_override: string | null;
255
+ story_type: StoryType;
256
+ tasks: Array<Task>;
257
+ task_ids: Array<ID>;
258
+ updated_at: string | null;
259
+ workflow_state_id: number;
260
+ readonly story_links: Array<StoryLink>;
261
+ }
262
+ export declare type StoryLinkVerb = 'blocks' | 'duplicates' | 'relates to';
263
+ export declare type StoryLink = {
264
+ id: ID;
265
+ created_at: string;
266
+ updated_at: string;
267
+ type: string;
268
+ subject_id: ID;
269
+ object_id: ID;
270
+ verb: StoryLinkVerb;
271
+ };
272
+ export declare type Branch = {
273
+ created_at: string | null;
274
+ deleted: boolean;
275
+ entity_type: string;
276
+ id: number | null;
277
+ merged_branch_ids: Array<number>;
278
+ name: string;
279
+ persistent: boolean;
280
+ pull_requests: Array<Record<string, any>>;
281
+ repository_id: number | null;
282
+ updated_at: string | null;
283
+ url: string;
284
+ };
285
+ export declare type Commit = {
286
+ author_email: string;
287
+ author_id: ID | null;
288
+ author_identity: Record<string, any>;
289
+ created_at: string;
290
+ entity_type: string;
291
+ hash: string;
292
+ id: number | null;
293
+ merged_branch_ids: Array<number>;
294
+ message: string;
295
+ repository_id: number | null;
296
+ timestamp: string;
297
+ updated_at: string | null;
298
+ url: string;
299
+ };
300
+ export declare type PullRequestLabel = {
301
+ color: string;
302
+ description: string | null;
303
+ entity_type: string;
304
+ id: number;
305
+ name: string;
306
+ };
307
+ export declare type PullRequest = {
308
+ branch_id: number;
309
+ branch_name: string;
310
+ build_status: string;
311
+ closed: boolean;
312
+ created_at: string;
313
+ draft: boolean;
314
+ entity_type: string;
315
+ id: number;
316
+ merged: boolean;
317
+ num_added: number;
318
+ num_commits: number;
319
+ num_modified: number | null;
320
+ num_removed: number;
321
+ number: number;
322
+ repository_id: number;
323
+ review_status: string;
324
+ target_branch_id: number;
325
+ target_branch_name: string;
326
+ title: string;
327
+ updated_at: string;
328
+ url: string;
329
+ vcs_labels: Array<PullRequestLabel> | null;
330
+ };
331
+ export declare type LinkedFileType = 'google url' | 'dropbox' | 'box' | 'onedrive';
332
+ export declare type LinkedFile = {
333
+ content_type: string | null;
334
+ created_at: string;
335
+ description: string | null;
336
+ entity_type: string;
337
+ group_mention_ids: Array<ID>;
338
+ id: number;
339
+ member_mention_ids: Array<ID>;
340
+ mention_ids: Array<ID>;
341
+ name: string;
342
+ size: number | null;
343
+ story_ids: Array<number>;
344
+ thumbnail_url: string | null;
345
+ type: string;
346
+ updated_at: string;
347
+ uploader_id: ID;
348
+ url: string;
349
+ };
350
+ export declare type Task = {
351
+ complete: boolean;
352
+ completed_at: string | null;
353
+ created_at: string;
354
+ description: string;
355
+ entity_type: string;
356
+ external_id?: string | null;
357
+ group_mention_ids: Array<ID>;
358
+ id: number;
359
+ member_mention_ids: Array<ID>;
360
+ mention_ids?: Array<ID>;
361
+ owner_ids: Array<ID>;
362
+ position: number;
363
+ story_id: number;
364
+ updated_at: string | null;
365
+ };
366
+ export interface TaskType {
367
+ category: string;
368
+ detail?: string;
369
+ }
370
+ export declare enum EpicStatusCategory {
371
+ Custom = "Custom",
372
+ Done = "Done",
373
+ InProgress = "InProgress",
374
+ Todo = "Todo"
375
+ }
376
+ export declare enum TaskCategory {
377
+ Bug = "Bug",
378
+ Custom = "Custom",
379
+ Story = "Story",
380
+ Task = "Task"
381
+ }
382
+ export declare enum TaskStatusCategory {
383
+ Done = "Done",
384
+ InProgress = "InProgress",
385
+ Todo = "Todo"
386
+ }
387
+ export declare enum SprintState {
388
+ Active = "Active",
389
+ Closed = "Closed",
390
+ Future = "Future",
391
+ Default = "Default"
392
+ }
@@ -0,0 +1,30 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SprintState = exports.TaskStatusCategory = exports.TaskCategory = exports.EpicStatusCategory = void 0;
4
+ var EpicStatusCategory;
5
+ (function (EpicStatusCategory) {
6
+ EpicStatusCategory["Custom"] = "Custom";
7
+ EpicStatusCategory["Done"] = "Done";
8
+ EpicStatusCategory["InProgress"] = "InProgress";
9
+ EpicStatusCategory["Todo"] = "Todo";
10
+ })(EpicStatusCategory = exports.EpicStatusCategory || (exports.EpicStatusCategory = {}));
11
+ var TaskCategory;
12
+ (function (TaskCategory) {
13
+ TaskCategory["Bug"] = "Bug";
14
+ TaskCategory["Custom"] = "Custom";
15
+ TaskCategory["Story"] = "Story";
16
+ TaskCategory["Task"] = "Task";
17
+ })(TaskCategory = exports.TaskCategory || (exports.TaskCategory = {}));
18
+ var TaskStatusCategory;
19
+ (function (TaskStatusCategory) {
20
+ TaskStatusCategory["Done"] = "Done";
21
+ TaskStatusCategory["InProgress"] = "InProgress";
22
+ TaskStatusCategory["Todo"] = "Todo";
23
+ })(TaskStatusCategory = exports.TaskStatusCategory || (exports.TaskStatusCategory = {}));
24
+ var SprintState;
25
+ (function (SprintState) {
26
+ SprintState["Active"] = "Active";
27
+ SprintState["Closed"] = "Closed";
28
+ SprintState["Future"] = "Future";
29
+ SprintState["Default"] = "Default";
30
+ })(SprintState = exports.SprintState || (exports.SprintState = {}));
@@ -0,0 +1,7 @@
1
+ import { AirbyteRecord } from 'faros-airbyte-cdk';
2
+ import { DestinationModel, DestinationRecord, StreamContext } from '../converter';
3
+ import { ShortcutConverter } from './common';
4
+ export declare class Projects extends ShortcutConverter {
5
+ readonly destinationModels: ReadonlyArray<DestinationModel>;
6
+ convert(record: AirbyteRecord, ctx: StreamContext): Promise<ReadonlyArray<DestinationRecord>>;
7
+ }
@@ -0,0 +1,46 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Projects = void 0;
4
+ const common_1 = require("./common");
5
+ class Projects extends common_1.ShortcutConverter {
6
+ constructor() {
7
+ super(...arguments);
8
+ this.destinationModels = [
9
+ 'tms_Project',
10
+ 'tms_TaskBoard',
11
+ 'tms_TaskBoardProjectRelationship',
12
+ ];
13
+ }
14
+ async convert(record, ctx) {
15
+ const source = this.streamName.source;
16
+ const project = record.record.data;
17
+ const uid = String(project.id);
18
+ const res = [];
19
+ res.push({
20
+ model: 'tms_Project',
21
+ record: {
22
+ uid,
23
+ name: project.name,
24
+ description: project.description,
25
+ source,
26
+ },
27
+ });
28
+ res.push({
29
+ model: 'tms_TaskBoard',
30
+ record: {
31
+ uid,
32
+ name: project.name,
33
+ source,
34
+ },
35
+ });
36
+ res.push({
37
+ model: 'tms_TaskBoardProjectRelationship',
38
+ record: {
39
+ board: { uid, source },
40
+ project: { uid, source },
41
+ },
42
+ });
43
+ return res;
44
+ }
45
+ }
46
+ exports.Projects = Projects;
@@ -0,0 +1,7 @@
1
+ import { AirbyteRecord } from 'faros-airbyte-cdk';
2
+ import { DestinationModel, DestinationRecord, StreamContext } from '../converter';
3
+ import { ShortcutConverter } from './common';
4
+ export declare class Stories extends ShortcutConverter {
5
+ readonly destinationModels: ReadonlyArray<DestinationModel>;
6
+ convert(record: AirbyteRecord, ctx: StreamContext): Promise<ReadonlyArray<DestinationRecord>>;
7
+ }
@@ -0,0 +1,127 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Stories = void 0;
4
+ const faros_feeds_sdk_1 = require("faros-feeds-sdk");
5
+ const common_1 = require("./common");
6
+ class Stories extends common_1.ShortcutConverter {
7
+ constructor() {
8
+ super(...arguments);
9
+ this.destinationModels = [
10
+ 'tms_TaskTag',
11
+ 'tms_Label',
12
+ 'tms_Task',
13
+ 'tms_TaskProjectRelationship',
14
+ 'tms_TaskBoardRelationship',
15
+ 'tms_TaskDependency',
16
+ ];
17
+ }
18
+ async convert(record, ctx) {
19
+ var _a, _b, _c, _d, _e;
20
+ const source = this.streamName.source;
21
+ const story = record.record.data;
22
+ const res = [];
23
+ const taskKey = { uid: String(story.id), source };
24
+ for (const label of (_a = story.labels) !== null && _a !== void 0 ? _a : []) {
25
+ const labelRef = { name: label.name };
26
+ res.push({
27
+ model: 'tms_TaskTag',
28
+ record: {
29
+ label: labelRef,
30
+ task: taskKey,
31
+ },
32
+ });
33
+ res.push({
34
+ model: 'tms_Label',
35
+ record: labelRef,
36
+ });
37
+ }
38
+ res.push({
39
+ model: 'tms_Task',
40
+ record: {
41
+ ...taskKey,
42
+ name: story.name,
43
+ description: (_b = story.description) === null || _b === void 0 ? void 0 : _b.substring(0, common_1.ShortcutCommon.MAX_DESCRIPTION_LENGTH),
44
+ type: common_1.ShortcutCommon.getTaskType(story.story_type),
45
+ status: {
46
+ category: common_1.ShortcutCommon.getTaskStatus(story),
47
+ },
48
+ createdAt: faros_feeds_sdk_1.Utils.toDate(story.created_at),
49
+ updatedAt: faros_feeds_sdk_1.Utils.toDate(story.updated_at),
50
+ creator: story.requested_by_id
51
+ ? { uid: String(story.requested_by_id), source }
52
+ : undefined,
53
+ epic: story.epic_id ? { uid: String(story.epic_id), source } : undefined,
54
+ sprint: story.iteration_id
55
+ ? { uid: String(story.iteration_id), source }
56
+ : undefined,
57
+ parent: undefined,
58
+ },
59
+ });
60
+ const projectRef = { uid: String(story.project_id), source };
61
+ res.push({
62
+ model: 'tms_TaskProjectRelationship',
63
+ record: {
64
+ task: taskKey,
65
+ project: projectRef,
66
+ },
67
+ });
68
+ res.push({
69
+ model: 'tms_TaskBoardRelationship',
70
+ record: {
71
+ task: taskKey,
72
+ board: projectRef,
73
+ },
74
+ });
75
+ for (const task of (_c = story.tasks) !== null && _c !== void 0 ? _c : []) {
76
+ const description = (_d = task.description) === null || _d === void 0 ? void 0 : _d.substring(0, common_1.ShortcutCommon.MAX_DESCRIPTION_LENGTH);
77
+ res.push({
78
+ model: 'tms_Task',
79
+ record: {
80
+ uid: String(task.id),
81
+ name: description,
82
+ description: description,
83
+ type: { category: 'Task' },
84
+ status: { category: task.complete ? 'Done' : 'Todo' },
85
+ createdAt: faros_feeds_sdk_1.Utils.toDate(task.created_at),
86
+ updatedAt: task.updated_at
87
+ ? faros_feeds_sdk_1.Utils.toDate(task.updated_at)
88
+ : undefined,
89
+ creator: story.requested_by_id
90
+ ? { uid: String(story.requested_by_id), source }
91
+ : undefined,
92
+ epic: story.epic_id
93
+ ? { uid: String(story.epic_id), source }
94
+ : undefined,
95
+ sprint: story.iteration_id
96
+ ? { uid: String(story.iteration_id), source }
97
+ : undefined,
98
+ parent: { uid: String(story.id), source },
99
+ source,
100
+ },
101
+ });
102
+ res.push({
103
+ model: 'tms_TaskDependency',
104
+ record: {
105
+ dependentTask: { uid: String(story.id), source },
106
+ fulfillingTask: { uid: String(task.id), source },
107
+ blocking: false,
108
+ },
109
+ });
110
+ }
111
+ for (const link of (_e = story.story_links) !== null && _e !== void 0 ? _e : []) {
112
+ if (link.verb !== 'blocks') {
113
+ continue;
114
+ }
115
+ res.push({
116
+ model: 'tms_TaskDependency',
117
+ record: {
118
+ dependentTask: { uid: String(link.object_id), source },
119
+ fulfillingTask: { uid: String(link.subject_id), source },
120
+ blocking: true,
121
+ },
122
+ });
123
+ }
124
+ return res;
125
+ }
126
+ }
127
+ exports.Stories = Stories;