airbyte-faros-destination 0.1.55 → 0.1.58

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.
package/README.md CHANGED
@@ -157,5 +157,10 @@ Example `catalog.json`
157
157
  }
158
158
  ```
159
159
 
160
+ **Tip**: you can even pipe data directly from your custom source into your custom destination without Airbyte server while prefixing your streams (as expected by Faros Destination):
161
+ ```shell
162
+ <my-source-command> | jq -c -R 'fromjson? | select(.type == "RECORD") | .record.stream = "mydatasource__CustomSource__\(.record.stream)"' | <my-destination-command>
163
+ ```
164
+
160
165
  ### Additional Commands
161
166
  Run `./bin/main --help` for detailed information on available commands.
@@ -8,7 +8,7 @@ export declare class HasuraClient {
8
8
  private readonly references;
9
9
  private readonly backReferences;
10
10
  private sortedModelDependencies;
11
- constructor(url: string);
11
+ constructor(url: string, adminSecret?: string);
12
12
  healthCheck(): Promise<void>;
13
13
  private fetchDbSource;
14
14
  loadSchema(): Promise<void>;
@@ -16,7 +16,7 @@ const traverse_1 = __importDefault(require("traverse"));
16
16
  const verror_1 = require("verror");
17
17
  const types_1 = require("./types");
18
18
  class HasuraClient {
19
- constructor(url) {
19
+ constructor(url, adminSecret) {
20
20
  this.logger = new faros_airbyte_cdk_1.AirbyteLogger();
21
21
  this.primaryKeys = {};
22
22
  this.scalars = {};
@@ -24,7 +24,10 @@ class HasuraClient {
24
24
  this.backReferences = {};
25
25
  this.api = axios_1.default.create({
26
26
  baseURL: url,
27
- headers: { 'X-Hasura-Role': 'admin' },
27
+ headers: {
28
+ 'X-Hasura-Role': 'admin',
29
+ ...(adminSecret && { 'X-Hasura-Admin-Secret': adminSecret }),
30
+ },
28
31
  });
29
32
  }
30
33
  async healthCheck() {
@@ -1,4 +1,4 @@
1
- import { AirbyteConfig, AirbyteRecord } from 'faros-airbyte-cdk';
1
+ import { AirbyteConfig, AirbyteLogger, AirbyteRecord } from 'faros-airbyte-cdk';
2
2
  import { FarosClient } from 'faros-feeds-sdk';
3
3
  import { Dictionary } from 'ts-essentials';
4
4
  /** Airbyte -> Faros record converter */
@@ -19,9 +19,10 @@ export declare abstract class Converter {
19
19
  export declare function parseObjectConfig<T>(obj: any, name: string): T | undefined;
20
20
  /** Stream context to store records by stream and other helpers */
21
21
  export declare class StreamContext {
22
+ readonly logger: AirbyteLogger;
22
23
  readonly config: AirbyteConfig;
23
24
  readonly farosClient?: FarosClient;
24
- constructor(config: AirbyteConfig, farosClient?: FarosClient);
25
+ constructor(logger: AirbyteLogger, config: AirbyteConfig, farosClient?: FarosClient);
25
26
  private readonly recordsByStreamName;
26
27
  getAll(streamName: string): Dictionary<AirbyteRecord>;
27
28
  get(streamName: string, id: string): AirbyteRecord | undefined;
@@ -44,7 +44,8 @@ function parseObjectConfig(obj, name) {
44
44
  exports.parseObjectConfig = parseObjectConfig;
45
45
  /** Stream context to store records by stream and other helpers */
46
46
  class StreamContext {
47
- constructor(config, farosClient) {
47
+ constructor(logger, config, farosClient) {
48
+ this.logger = logger;
48
49
  this.config = config;
49
50
  this.farosClient = farosClient;
50
51
  this.recordsByStreamName = {};
@@ -0,0 +1,20 @@
1
+ import { AirbyteRecord } from 'faros-airbyte-cdk';
2
+ import { Converter, StreamContext } from '../converter';
3
+ declare type ApplicationMapping = Record<string, {
4
+ name: string;
5
+ platform?: string;
6
+ }>;
7
+ interface FirehHydrantConfig {
8
+ application_mapping?: ApplicationMapping;
9
+ max_description_length?: number;
10
+ }
11
+ /** Firehydrant converter base */
12
+ export declare abstract class FireHydrantConverter extends Converter {
13
+ source: string;
14
+ /** Almost every Firehydrant record have id property */
15
+ id(record: AirbyteRecord): any;
16
+ protected firehydrantConfig(ctx: StreamContext): FirehHydrantConfig;
17
+ protected maxDescriptionLength(ctx: StreamContext): number;
18
+ protected applicationMapping(ctx: StreamContext): ApplicationMapping;
19
+ }
20
+ export {};
@@ -0,0 +1,30 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.FireHydrantConverter = void 0;
4
+ const converter_1 = require("../converter");
5
+ const MAX_DESCRIPTION_LENGTH = 1000;
6
+ /** Firehydrant converter base */
7
+ class FireHydrantConverter extends converter_1.Converter {
8
+ constructor() {
9
+ super(...arguments);
10
+ this.source = 'FireHydrant';
11
+ }
12
+ /** Almost every Firehydrant record have id property */
13
+ id(record) {
14
+ var _a, _b;
15
+ return (_b = (_a = record === null || record === void 0 ? void 0 : record.record) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.id;
16
+ }
17
+ firehydrantConfig(ctx) {
18
+ var _a, _b;
19
+ return (_b = (_a = ctx.config.source_specific_configs) === null || _a === void 0 ? void 0 : _a.firehydrant) !== null && _b !== void 0 ? _b : {};
20
+ }
21
+ maxDescriptionLength(ctx) {
22
+ var _a;
23
+ return ((_a = this.firehydrantConfig(ctx).max_description_length) !== null && _a !== void 0 ? _a : MAX_DESCRIPTION_LENGTH);
24
+ }
25
+ applicationMapping(ctx) {
26
+ var _a, _b;
27
+ return ((_b = (0, converter_1.parseObjectConfig)((_a = this.firehydrantConfig(ctx)) === null || _a === void 0 ? void 0 : _a.application_mapping, 'Application Mapping')) !== null && _b !== void 0 ? _b : {});
28
+ }
29
+ }
30
+ exports.FireHydrantConverter = FireHydrantConverter;
@@ -0,0 +1,13 @@
1
+ import { AirbyteRecord } from 'faros-airbyte-cdk';
2
+ import { DestinationModel, DestinationRecord, StreamContext } from '../converter';
3
+ import { FireHydrantConverter } from './common';
4
+ export declare class Incidents extends FireHydrantConverter {
5
+ readonly destinationModels: ReadonlyArray<DestinationModel>;
6
+ private seenTags;
7
+ convert(record: AirbyteRecord, ctx: StreamContext): Promise<ReadonlyArray<DestinationRecord>>;
8
+ private getTaskDestinationRecord;
9
+ private getPriority;
10
+ private getSeverity;
11
+ private getIncidentStatus;
12
+ private getTaskStatus;
13
+ }
@@ -0,0 +1,235 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Incidents = void 0;
4
+ const faros_feeds_sdk_1 = require("faros-feeds-sdk");
5
+ const common_1 = require("./common");
6
+ const models_1 = require("./models");
7
+ class Incidents extends common_1.FireHydrantConverter {
8
+ constructor() {
9
+ super(...arguments);
10
+ this.destinationModels = [
11
+ 'compute_Application',
12
+ 'ims_Incident',
13
+ 'ims_IncidentApplicationImpact',
14
+ 'ims_IncidentAssignment',
15
+ 'ims_IncidentEvent',
16
+ 'ims_IncidentTag',
17
+ 'ims_IncidentTasks',
18
+ 'ims_Label',
19
+ 'tms_Task',
20
+ ];
21
+ this.seenTags = new Set();
22
+ }
23
+ async convert(record, ctx) {
24
+ var _a, _b;
25
+ const source = this.streamName.source;
26
+ const incident = record.record.data;
27
+ const res = [];
28
+ const maxDescriptionLength = this.maxDescriptionLength(ctx);
29
+ const applicationMapping = this.applicationMapping(ctx);
30
+ const incidentRef = { uid: incident.id, source };
31
+ const createdAt = faros_feeds_sdk_1.Utils.toDate(incident.created_at);
32
+ const updatedAt = incident.events
33
+ ? faros_feeds_sdk_1.Utils.toDate(incident.events[incident.events.length - 1].occurred_at)
34
+ : createdAt;
35
+ let acknowledgedAt = undefined;
36
+ let resolvedAt = undefined;
37
+ for (const event of incident.events) {
38
+ const eventType = {
39
+ category: models_1.IncidentEventTypeCategory.Created,
40
+ detail: event.type,
41
+ };
42
+ const occurredAt = faros_feeds_sdk_1.Utils.toDate(event.occurred_at);
43
+ if (!resolvedAt &&
44
+ event.data.current_milestone === models_1.FirehydrantIncidentMilestone.resolved) {
45
+ resolvedAt = occurredAt;
46
+ eventType.category = models_1.IncidentEventTypeCategory.Resolved;
47
+ }
48
+ if (!acknowledgedAt &&
49
+ event.data.current_milestone ===
50
+ models_1.FirehydrantIncidentMilestone.acknowledged) {
51
+ acknowledgedAt = occurredAt;
52
+ eventType.category = models_1.IncidentEventTypeCategory.Acknowledged;
53
+ }
54
+ res.push({
55
+ model: 'ims_IncidentEvent',
56
+ record: {
57
+ uid: event.id,
58
+ type: eventType,
59
+ incident: incidentRef,
60
+ detail: JSON.stringify(event.data),
61
+ createdAt: occurredAt,
62
+ },
63
+ });
64
+ if (event.data.operation === 'created' && event.data.ticket) {
65
+ const ticket = event.data.ticket;
66
+ // TODO
67
+ res.push(this.getTaskDestinationRecord(ticket, source, maxDescriptionLength, occurredAt));
68
+ const task = { uid: ticket.id, source };
69
+ res.push({
70
+ model: 'ims_IncidentTasks',
71
+ record: {
72
+ task,
73
+ incident: incidentRef,
74
+ },
75
+ });
76
+ }
77
+ }
78
+ res.push({
79
+ model: 'ims_Incident',
80
+ record: {
81
+ ...incidentRef,
82
+ title: incident.name,
83
+ description: (_a = incident.description) === null || _a === void 0 ? void 0 : _a.substring(0, maxDescriptionLength),
84
+ url: incident.incident_url,
85
+ createdAt,
86
+ updatedAt,
87
+ acknowledgedAt,
88
+ resolvedAt,
89
+ priority: this.getPriority(incident.priority),
90
+ severity: this.getSeverity(incident.severity),
91
+ status: this.getIncidentStatus(incident.current_milestone),
92
+ },
93
+ });
94
+ for (const service of incident.services) {
95
+ if (service.name in applicationMapping &&
96
+ applicationMapping[service.name].name) {
97
+ const mappedApp = applicationMapping[service.name];
98
+ const application = {
99
+ name: mappedApp.name,
100
+ platform: (_b = mappedApp.platform) !== null && _b !== void 0 ? _b : '',
101
+ };
102
+ res.push({ model: 'compute_Application', record: application });
103
+ res.push({
104
+ model: 'ims_IncidentApplicationImpact',
105
+ record: {
106
+ incident: incidentRef,
107
+ application,
108
+ },
109
+ });
110
+ }
111
+ }
112
+ for (const assignment of incident.role_assignments) {
113
+ const assignee = { uid: assignment.user.id, source };
114
+ res.push({
115
+ model: 'ims_IncidentAssignment',
116
+ record: {
117
+ assignee,
118
+ incident: incidentRef,
119
+ },
120
+ });
121
+ }
122
+ for (const tag of incident.tag_list) {
123
+ if (!this.seenTags.has(tag)) {
124
+ this.seenTags.add(tag);
125
+ res.push({
126
+ model: 'ims_Label',
127
+ record: {
128
+ name: tag,
129
+ },
130
+ });
131
+ }
132
+ res.push({
133
+ model: 'ims_IncidentTag',
134
+ record: {
135
+ label: { name: tag },
136
+ incident: incidentRef,
137
+ },
138
+ });
139
+ }
140
+ return res;
141
+ }
142
+ getTaskDestinationRecord(ticket, source, maxDescriptionLength, occurredAt) {
143
+ var _a;
144
+ return {
145
+ model: 'tms_Task',
146
+ record: {
147
+ uid: ticket.id,
148
+ name: ticket.summary,
149
+ description: (_a = ticket.description) === null || _a === void 0 ? void 0 : _a.substring(0, maxDescriptionLength),
150
+ source,
151
+ url: undefined,
152
+ type: {
153
+ detail: ticket.type,
154
+ category: 'Task',
155
+ },
156
+ priority: undefined,
157
+ status: this.getTaskStatus(ticket.state),
158
+ points: 0,
159
+ additionalFields: [],
160
+ createdAt: occurredAt,
161
+ updatedAt: occurredAt,
162
+ statusChangedAt: undefined,
163
+ statusChangelog: undefined,
164
+ parent: undefined,
165
+ creator: { uid: ticket.created_by.id, source },
166
+ epic: undefined,
167
+ sprint: undefined,
168
+ },
169
+ };
170
+ }
171
+ getPriority(priority) {
172
+ const detail = priority;
173
+ switch (priority) {
174
+ case models_1.FirehydrantIncidentPriority.P1:
175
+ return { category: models_1.IncidentPriorityCategory.Critical, detail };
176
+ case models_1.FirehydrantIncidentPriority.P2:
177
+ return { category: models_1.IncidentPriorityCategory.High, detail };
178
+ case models_1.FirehydrantIncidentPriority.P3:
179
+ return { category: models_1.IncidentPriorityCategory.Medium, detail };
180
+ case models_1.FirehydrantIncidentPriority.P4:
181
+ return { category: models_1.IncidentPriorityCategory.Low, detail };
182
+ default:
183
+ return { category: models_1.IncidentPriorityCategory.Custom, detail };
184
+ }
185
+ }
186
+ getSeverity(severity) {
187
+ const detail = severity;
188
+ switch (severity) {
189
+ case models_1.FirehydrantIncidentSeverity.SEV1:
190
+ return { category: models_1.IncidentSeverityCategory.Sev1, detail };
191
+ case models_1.FirehydrantIncidentSeverity.SEV2:
192
+ return { category: models_1.IncidentSeverityCategory.Sev2, detail };
193
+ case models_1.FirehydrantIncidentSeverity.SEV3:
194
+ return { category: models_1.IncidentSeverityCategory.Sev3, detail };
195
+ case models_1.FirehydrantIncidentSeverity.SEV4:
196
+ return { category: models_1.IncidentSeverityCategory.Sev4, detail };
197
+ case models_1.FirehydrantIncidentSeverity.SEV5:
198
+ return { category: models_1.IncidentSeverityCategory.Sev5, detail };
199
+ default:
200
+ return { category: models_1.IncidentSeverityCategory.Custom, detail };
201
+ }
202
+ }
203
+ //https://support.firehydrant.io/hc/en-us/articles/4403969187604-Incident-Milestones
204
+ getIncidentStatus(milestone) {
205
+ const detail = milestone;
206
+ switch (milestone) {
207
+ case models_1.FirehydrantIncidentMilestone.started:
208
+ return { category: models_1.IncidentStatusCategory.Investigating, detail };
209
+ case models_1.FirehydrantIncidentMilestone.detected:
210
+ return { category: models_1.IncidentStatusCategory.Identified, detail };
211
+ case models_1.FirehydrantIncidentMilestone.acknowledged:
212
+ case models_1.FirehydrantIncidentMilestone.firstaction:
213
+ return { category: models_1.IncidentStatusCategory.Monitoring, detail };
214
+ case models_1.FirehydrantIncidentMilestone.mitigated:
215
+ case models_1.FirehydrantIncidentMilestone.resolved:
216
+ return { category: models_1.IncidentStatusCategory.Resolved, detail };
217
+ default:
218
+ return { category: models_1.IncidentStatusCategory.Custom, detail };
219
+ }
220
+ }
221
+ getTaskStatus(status) {
222
+ const detail = status;
223
+ switch (status) {
224
+ case models_1.IncidentTicketState.open:
225
+ return { category: models_1.TaskStatusCategory.Todo, detail };
226
+ case models_1.IncidentTicketState.in_progress:
227
+ return { category: models_1.TaskStatusCategory.InProgress, detail };
228
+ case models_1.IncidentTicketState.done:
229
+ return { category: models_1.TaskStatusCategory.Done, detail };
230
+ default:
231
+ return { category: models_1.TaskStatusCategory.Custom, detail };
232
+ }
233
+ }
234
+ }
235
+ exports.Incidents = Incidents;
@@ -0,0 +1,212 @@
1
+ interface ObjectBase {
2
+ id: string;
3
+ name: string;
4
+ }
5
+ interface IncidentRole extends ObjectBase {
6
+ summary: string;
7
+ description: string;
8
+ created_at: string;
9
+ updated_at: string;
10
+ discarded_at?: any;
11
+ tasks: [any];
12
+ }
13
+ interface Milestone {
14
+ id: string;
15
+ created_at: string;
16
+ updated_at: string;
17
+ type: string;
18
+ occurred_at: string;
19
+ duration: string;
20
+ }
21
+ export interface User extends ObjectBase {
22
+ email?: string;
23
+ created_at: string;
24
+ updated_at: string;
25
+ slack_linked?: boolean;
26
+ }
27
+ interface RoleAssignment {
28
+ id: string;
29
+ status: string;
30
+ created_at: string;
31
+ updated_at: string;
32
+ incident_role: IncidentRole;
33
+ user: User;
34
+ tasks: [any];
35
+ }
36
+ interface LastNote {
37
+ id: string;
38
+ body: string;
39
+ created_at: string;
40
+ }
41
+ interface Condition extends ObjectBase {
42
+ position: number;
43
+ }
44
+ interface Impact {
45
+ id: string;
46
+ type: string;
47
+ impact: ObjectBase;
48
+ condition: Condition;
49
+ }
50
+ interface CreatedBy extends ObjectBase {
51
+ source: string;
52
+ email: string;
53
+ }
54
+ export interface IncidentTicket {
55
+ id: string;
56
+ summary: string;
57
+ description?: any;
58
+ state: string;
59
+ type: string;
60
+ assignees: [any];
61
+ created_by: CreatedBy;
62
+ attachments: [any];
63
+ }
64
+ export interface IncidentEvent {
65
+ id: string;
66
+ incident_id: string;
67
+ occurred_at: string;
68
+ type: string;
69
+ visibility: string;
70
+ author: User;
71
+ data: any;
72
+ }
73
+ export interface Incident extends ObjectBase {
74
+ created_at: string;
75
+ started_at: string;
76
+ summary: string;
77
+ customer_impact_summary: string;
78
+ description: string;
79
+ current_milestone: string;
80
+ number: number;
81
+ priority: string;
82
+ severity: string;
83
+ severity_impact?: any;
84
+ severity_condition?: any;
85
+ tag_list: [string];
86
+ private_id: string;
87
+ organization_id: string;
88
+ incident_roles: [IncidentRole];
89
+ milestones: [Milestone];
90
+ active: boolean;
91
+ labels: Record<string, string>;
92
+ role_assignments: [RoleAssignment];
93
+ status_pages: [any];
94
+ incident_url: string;
95
+ private_status_page_url: string;
96
+ organization: ObjectBase;
97
+ customers_impacted: number;
98
+ monetary_impact?: any;
99
+ monetary_impact_cents?: any;
100
+ last_update: string;
101
+ last_note: LastNote;
102
+ report_id?: any;
103
+ services: ObjectBase[];
104
+ environments: ObjectBase[];
105
+ functionalities: ObjectBase[];
106
+ channel_name?: any;
107
+ channel_reference?: any;
108
+ channel_id?: any;
109
+ channel_status?: any;
110
+ incident_tickets: [IncidentTicket];
111
+ impacts: [Impact];
112
+ conference_bridges: [any];
113
+ incident_channels: [any];
114
+ retro_s: [any];
115
+ created_by: CreatedBy;
116
+ context_object?: any;
117
+ restricted: boolean;
118
+ explicit_organization_user_ids: [any];
119
+ events: IncidentEvent[];
120
+ }
121
+ interface TeamMember {
122
+ user: User;
123
+ default_incident_role: IncidentRole;
124
+ }
125
+ export interface Team extends ObjectBase {
126
+ description?: string;
127
+ slug?: string;
128
+ created_at: string;
129
+ updated_at: string;
130
+ memberships: [TeamMember];
131
+ }
132
+ export declare enum IncidentEventTypeCategory {
133
+ Created = "Created",
134
+ Acknowledged = "Acknowledged",
135
+ Resolved = "Resolved",
136
+ Custom = "Custom"
137
+ }
138
+ export interface IncidentEventType {
139
+ category: IncidentEventTypeCategory;
140
+ detail: string;
141
+ }
142
+ export declare enum FirehydrantIncidentPriority {
143
+ P1 = "P1",
144
+ P2 = "P2",
145
+ P3 = "P3",
146
+ P4 = "P4"
147
+ }
148
+ export declare enum FirehydrantIncidentMilestone {
149
+ started = "started",
150
+ detected = "detected",
151
+ acknowledged = "acknowledged",
152
+ firstaction = "firstaction",
153
+ mitigated = "mitigated",
154
+ resolved = "resolved"
155
+ }
156
+ export declare enum FirehydrantIncidentSeverity {
157
+ SEV1 = "SEV1",
158
+ SEV2 = "SEV2",
159
+ SEV3 = "SEV3",
160
+ SEV4 = "SEV4",
161
+ SEV5 = "SEV5",
162
+ GAMEDAY = "GAMEDAY",
163
+ MAINTENANCE = "MAINTENANCE",
164
+ UNSET = "UNSET"
165
+ }
166
+ export declare enum IncidentStatusCategory {
167
+ Identified = "Identified",
168
+ Investigating = "Investigating",
169
+ Monitoring = "Monitoring",
170
+ Resolved = "Resolved",
171
+ Custom = "Custom"
172
+ }
173
+ export interface IncidentPriority {
174
+ category: IncidentPriorityCategory;
175
+ detail: string;
176
+ }
177
+ export declare enum IncidentPriorityCategory {
178
+ Critical = "Critical",
179
+ High = "High",
180
+ Medium = "Medium",
181
+ Low = "Low",
182
+ Custom = "Custom"
183
+ }
184
+ export declare enum IncidentSeverityCategory {
185
+ Sev1 = "Sev1",
186
+ Sev2 = "Sev2",
187
+ Sev3 = "Sev3",
188
+ Sev4 = "Sev4",
189
+ Sev5 = "Sev5",
190
+ Custom = "Custom"
191
+ }
192
+ export interface IncidentSeverity {
193
+ category: IncidentSeverityCategory;
194
+ detail: string;
195
+ }
196
+ export declare enum IncidentTicketState {
197
+ open = "open",
198
+ in_progress = "in_progress",
199
+ cancelled = "cancelled",
200
+ done = "done"
201
+ }
202
+ export interface TaskStatus {
203
+ category: TaskStatusCategory;
204
+ detail: string;
205
+ }
206
+ export declare enum TaskStatusCategory {
207
+ Custom = "Custom",
208
+ Done = "Done",
209
+ InProgress = "InProgress",
210
+ Todo = "Todo"
211
+ }
212
+ export {};
@@ -0,0 +1,76 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TaskStatusCategory = exports.IncidentTicketState = exports.IncidentSeverityCategory = exports.IncidentPriorityCategory = exports.IncidentStatusCategory = exports.FirehydrantIncidentSeverity = exports.FirehydrantIncidentMilestone = exports.FirehydrantIncidentPriority = exports.IncidentEventTypeCategory = void 0;
4
+ var IncidentEventTypeCategory;
5
+ (function (IncidentEventTypeCategory) {
6
+ IncidentEventTypeCategory["Created"] = "Created";
7
+ IncidentEventTypeCategory["Acknowledged"] = "Acknowledged";
8
+ IncidentEventTypeCategory["Resolved"] = "Resolved";
9
+ IncidentEventTypeCategory["Custom"] = "Custom";
10
+ })(IncidentEventTypeCategory = exports.IncidentEventTypeCategory || (exports.IncidentEventTypeCategory = {}));
11
+ var FirehydrantIncidentPriority;
12
+ (function (FirehydrantIncidentPriority) {
13
+ FirehydrantIncidentPriority["P1"] = "P1";
14
+ FirehydrantIncidentPriority["P2"] = "P2";
15
+ FirehydrantIncidentPriority["P3"] = "P3";
16
+ FirehydrantIncidentPriority["P4"] = "P4";
17
+ })(FirehydrantIncidentPriority = exports.FirehydrantIncidentPriority || (exports.FirehydrantIncidentPriority = {}));
18
+ var FirehydrantIncidentMilestone;
19
+ (function (FirehydrantIncidentMilestone) {
20
+ FirehydrantIncidentMilestone["started"] = "started";
21
+ FirehydrantIncidentMilestone["detected"] = "detected";
22
+ FirehydrantIncidentMilestone["acknowledged"] = "acknowledged";
23
+ FirehydrantIncidentMilestone["firstaction"] = "firstaction";
24
+ FirehydrantIncidentMilestone["mitigated"] = "mitigated";
25
+ FirehydrantIncidentMilestone["resolved"] = "resolved";
26
+ })(FirehydrantIncidentMilestone = exports.FirehydrantIncidentMilestone || (exports.FirehydrantIncidentMilestone = {}));
27
+ var FirehydrantIncidentSeverity;
28
+ (function (FirehydrantIncidentSeverity) {
29
+ FirehydrantIncidentSeverity["SEV1"] = "SEV1";
30
+ FirehydrantIncidentSeverity["SEV2"] = "SEV2";
31
+ FirehydrantIncidentSeverity["SEV3"] = "SEV3";
32
+ FirehydrantIncidentSeverity["SEV4"] = "SEV4";
33
+ FirehydrantIncidentSeverity["SEV5"] = "SEV5";
34
+ FirehydrantIncidentSeverity["GAMEDAY"] = "GAMEDAY";
35
+ FirehydrantIncidentSeverity["MAINTENANCE"] = "MAINTENANCE";
36
+ FirehydrantIncidentSeverity["UNSET"] = "UNSET";
37
+ })(FirehydrantIncidentSeverity = exports.FirehydrantIncidentSeverity || (exports.FirehydrantIncidentSeverity = {}));
38
+ var IncidentStatusCategory;
39
+ (function (IncidentStatusCategory) {
40
+ IncidentStatusCategory["Identified"] = "Identified";
41
+ IncidentStatusCategory["Investigating"] = "Investigating";
42
+ IncidentStatusCategory["Monitoring"] = "Monitoring";
43
+ IncidentStatusCategory["Resolved"] = "Resolved";
44
+ IncidentStatusCategory["Custom"] = "Custom";
45
+ })(IncidentStatusCategory = exports.IncidentStatusCategory || (exports.IncidentStatusCategory = {}));
46
+ var IncidentPriorityCategory;
47
+ (function (IncidentPriorityCategory) {
48
+ IncidentPriorityCategory["Critical"] = "Critical";
49
+ IncidentPriorityCategory["High"] = "High";
50
+ IncidentPriorityCategory["Medium"] = "Medium";
51
+ IncidentPriorityCategory["Low"] = "Low";
52
+ IncidentPriorityCategory["Custom"] = "Custom";
53
+ })(IncidentPriorityCategory = exports.IncidentPriorityCategory || (exports.IncidentPriorityCategory = {}));
54
+ var IncidentSeverityCategory;
55
+ (function (IncidentSeverityCategory) {
56
+ IncidentSeverityCategory["Sev1"] = "Sev1";
57
+ IncidentSeverityCategory["Sev2"] = "Sev2";
58
+ IncidentSeverityCategory["Sev3"] = "Sev3";
59
+ IncidentSeverityCategory["Sev4"] = "Sev4";
60
+ IncidentSeverityCategory["Sev5"] = "Sev5";
61
+ IncidentSeverityCategory["Custom"] = "Custom";
62
+ })(IncidentSeverityCategory = exports.IncidentSeverityCategory || (exports.IncidentSeverityCategory = {}));
63
+ var IncidentTicketState;
64
+ (function (IncidentTicketState) {
65
+ IncidentTicketState["open"] = "open";
66
+ IncidentTicketState["in_progress"] = "in_progress";
67
+ IncidentTicketState["cancelled"] = "cancelled";
68
+ IncidentTicketState["done"] = "done";
69
+ })(IncidentTicketState = exports.IncidentTicketState || (exports.IncidentTicketState = {}));
70
+ var TaskStatusCategory;
71
+ (function (TaskStatusCategory) {
72
+ TaskStatusCategory["Custom"] = "Custom";
73
+ TaskStatusCategory["Done"] = "Done";
74
+ TaskStatusCategory["InProgress"] = "InProgress";
75
+ TaskStatusCategory["Todo"] = "Todo";
76
+ })(TaskStatusCategory = exports.TaskStatusCategory || (exports.TaskStatusCategory = {}));
@@ -0,0 +1,7 @@
1
+ import { AirbyteRecord } from 'faros-airbyte-cdk';
2
+ import { DestinationModel, DestinationRecord, StreamContext } from '../converter';
3
+ import { FireHydrantConverter } from './common';
4
+ export declare class Teams extends FireHydrantConverter {
5
+ readonly destinationModels: ReadonlyArray<DestinationModel>;
6
+ convert(record: AirbyteRecord, ctx: StreamContext): Promise<ReadonlyArray<DestinationRecord>>;
7
+ }