@activepieces/piece-coralogix 0.1.2 → 0.1.4
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/package.json +7 -12
- package/src/index.js +22 -61
- package/src/index.d.ts +0 -6
- package/src/index.d.ts.map +0 -1
- package/src/index.js.map +0 -1
- package/src/lib/actions/acknowledge-incidents.d.ts +0 -8
- package/src/lib/actions/acknowledge-incidents.d.ts.map +0 -1
- package/src/lib/actions/acknowledge-incidents.js +0 -36
- package/src/lib/actions/acknowledge-incidents.js.map +0 -1
- package/src/lib/actions/assign-incidents.d.ts +0 -9
- package/src/lib/actions/assign-incidents.d.ts.map +0 -1
- package/src/lib/actions/assign-incidents.js +0 -39
- package/src/lib/actions/assign-incidents.js.map +0 -1
- package/src/lib/actions/close-incidents.d.ts +0 -8
- package/src/lib/actions/close-incidents.d.ts.map +0 -1
- package/src/lib/actions/close-incidents.js +0 -34
- package/src/lib/actions/close-incidents.js.map +0 -1
- package/src/lib/actions/get-incident-by-id.d.ts +0 -8
- package/src/lib/actions/get-incident-by-id.d.ts.map +0 -1
- package/src/lib/actions/get-incident-by-id.js +0 -30
- package/src/lib/actions/get-incident-by-id.js.map +0 -1
- package/src/lib/actions/get-incident-events.d.ts +0 -8
- package/src/lib/actions/get-incident-events.d.ts.map +0 -1
- package/src/lib/actions/get-incident-events.js +0 -28
- package/src/lib/actions/get-incident-events.js.map +0 -1
- package/src/lib/actions/list-incidents.d.ts +0 -12
- package/src/lib/actions/list-incidents.d.ts.map +0 -1
- package/src/lib/actions/list-incidents.js +0 -83
- package/src/lib/actions/list-incidents.js.map +0 -1
- package/src/lib/actions/resolve-incidents.d.ts +0 -8
- package/src/lib/actions/resolve-incidents.d.ts.map +0 -1
- package/src/lib/actions/resolve-incidents.js +0 -34
- package/src/lib/actions/resolve-incidents.js.map +0 -1
- package/src/lib/actions/send-logs.d.ts +0 -18
- package/src/lib/actions/send-logs.d.ts.map +0 -1
- package/src/lib/actions/send-logs.js +0 -111
- package/src/lib/actions/send-logs.js.map +0 -1
- package/src/lib/actions/set-alert-active.d.ts +0 -9
- package/src/lib/actions/set-alert-active.d.ts.map +0 -1
- package/src/lib/actions/set-alert-active.js +0 -35
- package/src/lib/actions/set-alert-active.js.map +0 -1
- package/src/lib/common/auth.d.ts +0 -6
- package/src/lib/common/auth.d.ts.map +0 -1
- package/src/lib/common/auth.js +0 -39
- package/src/lib/common/auth.js.map +0 -1
- package/src/lib/common/client.d.ts +0 -8
- package/src/lib/common/client.d.ts.map +0 -1
- package/src/lib/common/client.js +0 -39
- package/src/lib/common/client.js.map +0 -1
- package/src/lib/triggers/new-alert-event.d.ts +0 -27
- package/src/lib/triggers/new-alert-event.d.ts.map +0 -1
- package/src/lib/triggers/new-alert-event.js +0 -95
- package/src/lib/triggers/new-alert-event.js.map +0 -1
- package/src/lib/triggers/new-incident.d.ts +0 -27
- package/src/lib/triggers/new-incident.d.ts.map +0 -1
- package/src/lib/triggers/new-incident.js +0 -78
- package/src/lib/triggers/new-incident.js.map +0 -1
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.closeIncidents = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
6
|
-
const pieces_common_1 = require("@activepieces/pieces-common");
|
|
7
|
-
const auth_1 = require("../common/auth");
|
|
8
|
-
const client_1 = require("../common/client");
|
|
9
|
-
exports.closeIncidents = (0, pieces_framework_1.createAction)({
|
|
10
|
-
auth: auth_1.coralogixAuth,
|
|
11
|
-
name: 'closeIncidents',
|
|
12
|
-
displayName: 'Close Incidents',
|
|
13
|
-
description: 'Close one or more Coralogix incidents (e.g. false positives or noise). Use Resolve for incidents that were actually fixed.',
|
|
14
|
-
requireAuth: true,
|
|
15
|
-
props: {
|
|
16
|
-
incidentIds: pieces_framework_1.Property.Array({
|
|
17
|
-
displayName: 'Incident IDs',
|
|
18
|
-
description: 'List of incident IDs to close. Find the ID in Coralogix → Alerts → Incidents → click an incident → copy the ID from the URL.',
|
|
19
|
-
required: true,
|
|
20
|
-
defaultValue: [],
|
|
21
|
-
}),
|
|
22
|
-
},
|
|
23
|
-
run(_a) {
|
|
24
|
-
return tslib_1.__awaiter(this, arguments, void 0, function* ({ auth, propsValue }) {
|
|
25
|
-
var _b;
|
|
26
|
-
const incidentIds = ((_b = propsValue.incidentIds) !== null && _b !== void 0 ? _b : []);
|
|
27
|
-
const queryString = incidentIds
|
|
28
|
-
.map((id) => `incident_ids=${encodeURIComponent(id)}`)
|
|
29
|
-
.join('&');
|
|
30
|
-
return yield (0, client_1.makeRequest)(auth, 'management', pieces_common_1.HttpMethod.POST, `/mgmt/openapi/latest/incidents/incidents/v1/close?${queryString}`);
|
|
31
|
-
});
|
|
32
|
-
},
|
|
33
|
-
});
|
|
34
|
-
//# sourceMappingURL=close-incidents.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"close-incidents.js","sourceRoot":"","sources":["../../../../src/lib/actions/close-incidents.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,+DAAyD;AACzD,yCAA+C;AAC/C,6CAA+C;AAElC,QAAA,cAAc,GAAG,IAAA,+BAAY,EAAC;IACzC,IAAI,EAAE,oBAAa;IACnB,IAAI,EAAE,gBAAgB;IACtB,WAAW,EAAE,iBAAiB;IAC9B,WAAW,EAAE,4HAA4H;IACzI,WAAW,EAAE,IAAI;IACjB,KAAK,EAAE;QACL,WAAW,EAAE,2BAAQ,CAAC,KAAK,CAAC;YAC1B,WAAW,EAAE,cAAc;YAC3B,WAAW,EAAE,8HAA8H;YAC3I,QAAQ,EAAE,IAAI;YACd,YAAY,EAAE,EAAE;SACjB,CAAC;KACH;IACK,GAAG;qEAAC,EAAE,IAAI,EAAE,UAAU,EAAE;;YAC5B,MAAM,WAAW,GAAG,CAAC,MAAA,UAAU,CAAC,WAAW,mCAAI,EAAE,CAAa,CAAC;YAE/D,MAAM,WAAW,GAAG,WAAW;iBAC5B,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,gBAAgB,kBAAkB,CAAC,EAAE,CAAC,EAAE,CAAC;iBACrD,IAAI,CAAC,GAAG,CAAC,CAAC;YAEb,OAAO,MAAM,IAAA,oBAAW,EACtB,IAAI,EACJ,YAAY,EACZ,0BAAU,CAAC,IAAI,EACf,qDAAqD,WAAW,EAAE,CACnE,CAAC;QACJ,CAAC;KAAA;CACF,CAAC,CAAC"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
export declare const getIncidentById: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
2
|
-
personalOrTeamApiKey: import("@activepieces/pieces-framework").SecretTextProperty<true>;
|
|
3
|
-
sendYourDataApiKey: import("@activepieces/pieces-framework").SecretTextProperty<false>;
|
|
4
|
-
coralogixDomain: import("@activepieces/pieces-framework").StaticDropdownProperty<string, true>;
|
|
5
|
-
}>, {
|
|
6
|
-
incidentId: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
7
|
-
}>;
|
|
8
|
-
//# sourceMappingURL=get-incident-by-id.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"get-incident-by-id.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/get-incident-by-id.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,eAAe;;;;;;EA2B1B,CAAC"}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getIncidentById = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
6
|
-
const pieces_common_1 = require("@activepieces/pieces-common");
|
|
7
|
-
const auth_1 = require("../common/auth");
|
|
8
|
-
const client_1 = require("../common/client");
|
|
9
|
-
exports.getIncidentById = (0, pieces_framework_1.createAction)({
|
|
10
|
-
auth: auth_1.coralogixAuth,
|
|
11
|
-
name: 'getIncidentById',
|
|
12
|
-
displayName: 'Get Incident By ID',
|
|
13
|
-
description: 'Retrieve a Coralogix incident by its incident ID.',
|
|
14
|
-
requireAuth: true,
|
|
15
|
-
props: {
|
|
16
|
-
incidentId: pieces_framework_1.Property.ShortText({
|
|
17
|
-
displayName: 'Incident ID',
|
|
18
|
-
description: 'The Coralogix incident ID to retrieve.',
|
|
19
|
-
required: true,
|
|
20
|
-
}),
|
|
21
|
-
},
|
|
22
|
-
run(_a) {
|
|
23
|
-
return tslib_1.__awaiter(this, arguments, void 0, function* ({ auth, propsValue }) {
|
|
24
|
-
const incidentId = propsValue.incidentId;
|
|
25
|
-
const response = yield (0, client_1.makeRequest)(auth, 'management', pieces_common_1.HttpMethod.GET, `/mgmt/openapi/latest/incidents/incidents/v1/${encodeURIComponent(incidentId)}`);
|
|
26
|
-
return response;
|
|
27
|
-
});
|
|
28
|
-
},
|
|
29
|
-
});
|
|
30
|
-
//# sourceMappingURL=get-incident-by-id.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"get-incident-by-id.js","sourceRoot":"","sources":["../../../../src/lib/actions/get-incident-by-id.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,+DAAyD;AACzD,yCAA+C;AAC/C,6CAA+C;AAElC,QAAA,eAAe,GAAG,IAAA,+BAAY,EAAC;IAC1C,IAAI,EAAE,oBAAa;IACnB,IAAI,EAAE,iBAAiB;IACvB,WAAW,EAAE,oBAAoB;IACjC,WAAW,EAAE,mDAAmD;IAChE,WAAW,EAAE,IAAI;IACjB,KAAK,EAAE;QACL,UAAU,EAAE,2BAAQ,CAAC,SAAS,CAAC;YAC7B,WAAW,EAAE,aAAa;YAC1B,WAAW,EAAE,wCAAwC;YACrD,QAAQ,EAAE,IAAI;SACf,CAAC;KACH;IACK,GAAG;qEAAC,EAAE,IAAI,EAAE,UAAU,EAAE;YAC5B,MAAM,UAAU,GAAG,UAAU,CAAC,UAAU,CAAC;YAEzC,MAAM,QAAQ,GAAG,MAAM,IAAA,oBAAW,EAChC,IAAI,EACJ,YAAY,EACZ,0BAAU,CAAC,GAAG,EACd,+CAA+C,kBAAkB,CAC/D,UAAU,CACX,EAAE,CACJ,CAAC;YAEF,OAAO,QAAQ,CAAC;QAClB,CAAC;KAAA;CACF,CAAC,CAAC"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
export declare const getIncidentEvents: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
2
|
-
personalOrTeamApiKey: import("@activepieces/pieces-framework").SecretTextProperty<true>;
|
|
3
|
-
sendYourDataApiKey: import("@activepieces/pieces-framework").SecretTextProperty<false>;
|
|
4
|
-
coralogixDomain: import("@activepieces/pieces-framework").StaticDropdownProperty<string, true>;
|
|
5
|
-
}>, {
|
|
6
|
-
incidentId: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
7
|
-
}>;
|
|
8
|
-
//# sourceMappingURL=get-incident-events.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"get-incident-events.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/get-incident-events.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,iBAAiB;;;;;;EAwB5B,CAAC"}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getIncidentEvents = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const pieces_common_1 = require("@activepieces/pieces-common");
|
|
6
|
-
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
7
|
-
const auth_1 = require("../common/auth");
|
|
8
|
-
const client_1 = require("../common/client");
|
|
9
|
-
exports.getIncidentEvents = (0, pieces_framework_1.createAction)({
|
|
10
|
-
auth: auth_1.coralogixAuth,
|
|
11
|
-
name: 'getIncidentEvents',
|
|
12
|
-
displayName: 'Get Incident Events',
|
|
13
|
-
description: 'Get related events for a specific incident.',
|
|
14
|
-
requireAuth: true,
|
|
15
|
-
props: {
|
|
16
|
-
incidentId: pieces_framework_1.Property.ShortText({
|
|
17
|
-
displayName: 'Incident ID',
|
|
18
|
-
required: true,
|
|
19
|
-
}),
|
|
20
|
-
},
|
|
21
|
-
run(_a) {
|
|
22
|
-
return tslib_1.__awaiter(this, arguments, void 0, function* ({ auth, propsValue }) {
|
|
23
|
-
const incidentId = propsValue.incidentId;
|
|
24
|
-
return yield (0, client_1.makeRequest)(auth, 'management', pieces_common_1.HttpMethod.GET, `/mgmt/openapi/latest/incidents/incidents/v1/${encodeURIComponent(incidentId)}/events`);
|
|
25
|
-
});
|
|
26
|
-
},
|
|
27
|
-
});
|
|
28
|
-
//# sourceMappingURL=get-incident-events.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"get-incident-events.js","sourceRoot":"","sources":["../../../../src/lib/actions/get-incident-events.ts"],"names":[],"mappings":";;;;AAAA,+DAAyD;AACzD,qEAAwE;AACxE,yCAA+C;AAC/C,6CAA+C;AAElC,QAAA,iBAAiB,GAAG,IAAA,+BAAY,EAAC;IAC5C,IAAI,EAAE,oBAAa;IACnB,IAAI,EAAE,mBAAmB;IACzB,WAAW,EAAE,qBAAqB;IAClC,WAAW,EAAE,6CAA6C;IAC1D,WAAW,EAAE,IAAI;IACjB,KAAK,EAAE;QACL,UAAU,EAAE,2BAAQ,CAAC,SAAS,CAAC;YAC7B,WAAW,EAAE,aAAa;YAC1B,QAAQ,EAAE,IAAI;SACf,CAAC;KACH;IACK,GAAG;qEAAC,EAAE,IAAI,EAAE,UAAU,EAAE;YAC5B,MAAM,UAAU,GAAG,UAAU,CAAC,UAAU,CAAC;YAEzC,OAAO,MAAM,IAAA,oBAAW,EACtB,IAAI,EACJ,YAAY,EACZ,0BAAU,CAAC,GAAG,EACd,+CAA+C,kBAAkB,CAC/D,UAAU,CACX,SAAS,CACX,CAAC;QACJ,CAAC;KAAA;CACF,CAAC,CAAC"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
export declare const listIncidents: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
2
|
-
personalOrTeamApiKey: import("@activepieces/pieces-framework").SecretTextProperty<true>;
|
|
3
|
-
sendYourDataApiKey: import("@activepieces/pieces-framework").SecretTextProperty<false>;
|
|
4
|
-
coralogixDomain: import("@activepieces/pieces-framework").StaticDropdownProperty<string, true>;
|
|
5
|
-
}>, {
|
|
6
|
-
status: import("@activepieces/pieces-framework").StaticMultiSelectDropdownProperty<string, false>;
|
|
7
|
-
severity: import("@activepieces/pieces-framework").StaticMultiSelectDropdownProperty<string, false>;
|
|
8
|
-
applicationName: import("@activepieces/pieces-framework").ArrayProperty<false>;
|
|
9
|
-
subsystemName: import("@activepieces/pieces-framework").ArrayProperty<false>;
|
|
10
|
-
pageSize: import("@activepieces/pieces-framework").NumberProperty<false>;
|
|
11
|
-
}>;
|
|
12
|
-
//# sourceMappingURL=list-incidents.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"list-incidents.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/list-incidents.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,aAAa;;;;;;;;;;EAyFxB,CAAC"}
|
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.listIncidents = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
6
|
-
const pieces_common_1 = require("@activepieces/pieces-common");
|
|
7
|
-
const auth_1 = require("../common/auth");
|
|
8
|
-
const client_1 = require("../common/client");
|
|
9
|
-
exports.listIncidents = (0, pieces_framework_1.createAction)({
|
|
10
|
-
auth: auth_1.coralogixAuth,
|
|
11
|
-
name: 'listIncidents',
|
|
12
|
-
displayName: 'List Incidents',
|
|
13
|
-
description: 'Retrieve a filtered list of Coralogix incidents.',
|
|
14
|
-
requireAuth: true,
|
|
15
|
-
props: {
|
|
16
|
-
status: pieces_framework_1.Property.StaticMultiSelectDropdown({
|
|
17
|
-
displayName: 'Status',
|
|
18
|
-
description: 'Filter by incident status. Leave empty to return all.',
|
|
19
|
-
required: false,
|
|
20
|
-
options: {
|
|
21
|
-
options: [
|
|
22
|
-
{ label: 'Triggered', value: 'INCIDENT_STATUS_TRIGGERED' },
|
|
23
|
-
{ label: 'Acknowledged', value: 'INCIDENT_STATUS_ACKNOWLEDGED' },
|
|
24
|
-
{ label: 'Resolved', value: 'INCIDENT_STATUS_RESOLVED' },
|
|
25
|
-
],
|
|
26
|
-
},
|
|
27
|
-
}),
|
|
28
|
-
severity: pieces_framework_1.Property.StaticMultiSelectDropdown({
|
|
29
|
-
displayName: 'Severity',
|
|
30
|
-
description: 'Filter by incident severity. Leave empty to return all.',
|
|
31
|
-
required: false,
|
|
32
|
-
options: {
|
|
33
|
-
options: [
|
|
34
|
-
{ label: 'Critical', value: 'INCIDENT_SEVERITY_CRITICAL' },
|
|
35
|
-
{ label: 'Error', value: 'INCIDENT_SEVERITY_ERROR' },
|
|
36
|
-
{ label: 'Warning', value: 'INCIDENT_SEVERITY_WARNING' },
|
|
37
|
-
{ label: 'Info', value: 'INCIDENT_SEVERITY_INFO' },
|
|
38
|
-
{ label: 'Low', value: 'INCIDENT_SEVERITY_LOW' },
|
|
39
|
-
],
|
|
40
|
-
},
|
|
41
|
-
}),
|
|
42
|
-
applicationName: pieces_framework_1.Property.Array({
|
|
43
|
-
displayName: 'Application Names',
|
|
44
|
-
description: 'Filter by application name(s). Leave empty to return all.',
|
|
45
|
-
required: false,
|
|
46
|
-
defaultValue: [],
|
|
47
|
-
}),
|
|
48
|
-
subsystemName: pieces_framework_1.Property.Array({
|
|
49
|
-
displayName: 'Subsystem Names',
|
|
50
|
-
description: 'Filter by subsystem name(s). Leave empty to return all.',
|
|
51
|
-
required: false,
|
|
52
|
-
defaultValue: [],
|
|
53
|
-
}),
|
|
54
|
-
pageSize: pieces_framework_1.Property.Number({
|
|
55
|
-
displayName: 'Page Size',
|
|
56
|
-
description: 'Maximum number of incidents to return.',
|
|
57
|
-
required: false,
|
|
58
|
-
defaultValue: 20,
|
|
59
|
-
}),
|
|
60
|
-
},
|
|
61
|
-
run(_a) {
|
|
62
|
-
return tslib_1.__awaiter(this, arguments, void 0, function* ({ auth, propsValue }) {
|
|
63
|
-
const { status, severity, applicationName, subsystemName, pageSize } = propsValue;
|
|
64
|
-
const params = [];
|
|
65
|
-
if (status && status.length > 0) {
|
|
66
|
-
status.forEach((s) => params.push(`filter.status=${encodeURIComponent(s)}`));
|
|
67
|
-
}
|
|
68
|
-
if (severity && severity.length > 0) {
|
|
69
|
-
severity.forEach((s) => params.push(`filter.severity=${encodeURIComponent(s)}`));
|
|
70
|
-
}
|
|
71
|
-
if (applicationName && applicationName.length > 0) {
|
|
72
|
-
applicationName.forEach((a) => params.push(`filter.applicationName=${encodeURIComponent(a)}`));
|
|
73
|
-
}
|
|
74
|
-
if (subsystemName && subsystemName.length > 0) {
|
|
75
|
-
subsystemName.forEach((s) => params.push(`filter.subsystemName=${encodeURIComponent(s)}`));
|
|
76
|
-
}
|
|
77
|
-
params.push(`pagination.pageSize=${pageSize !== null && pageSize !== void 0 ? pageSize : 20}`);
|
|
78
|
-
const queryString = params.join('&');
|
|
79
|
-
return yield (0, client_1.makeRequest)(auth, 'management', pieces_common_1.HttpMethod.POST, `/mgmt/openapi/latest/incidents/incidents/v1?${queryString}`);
|
|
80
|
-
});
|
|
81
|
-
},
|
|
82
|
-
});
|
|
83
|
-
//# sourceMappingURL=list-incidents.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"list-incidents.js","source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AC,CAAC,CAAC,EAAE,CAAC,CAC/D,CAAC;YACJ,CAAC;YACD,IAAI,aAAa,IAAK,aAA0B,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;gBAC3D,aAA0B,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE,CACxC,MAAM,CAAC,IAAI,CAAC,wBAAwB,kBAAkB,CAAC,CAAC,CAAC,EAAE,CAAC,CAC7D,CAAC;YACJ,CAAC;YACD,MAAM,CAAC,IAAI,CAAC,uBAAuB,QAAQ,aAAR,QAAQ,cAAR,QAAQ,GAAI,EAAE,EAAE,CAAC,CAAC;YAErD,MAAM,WAAW,GAAG,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;YAErC,OAAO,MAAM,IAAA,oBAAW,EACtB,IAAI,EACJ,YAAY,EACZ,0BAAU,CAAC,IAAI,EACf,+CAA+C,WAAW,EAAE,CAC7D,CAAC;QACJ,CAAC;KAAA;CACF,CAAC,CAAC"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
export declare const resolveIncidents: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
2
|
-
personalOrTeamApiKey: import("@activepieces/pieces-framework").SecretTextProperty<true>;
|
|
3
|
-
sendYourDataApiKey: import("@activepieces/pieces-framework").SecretTextProperty<false>;
|
|
4
|
-
coralogixDomain: import("@activepieces/pieces-framework").StaticDropdownProperty<string, true>;
|
|
5
|
-
}>, {
|
|
6
|
-
incidentIds: import("@activepieces/pieces-framework").ArrayProperty<true>;
|
|
7
|
-
}>;
|
|
8
|
-
//# sourceMappingURL=resolve-incidents.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"resolve-incidents.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/resolve-incidents.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,gBAAgB;;;;;;EA4B3B,CAAC"}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.resolveIncidents = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
6
|
-
const pieces_common_1 = require("@activepieces/pieces-common");
|
|
7
|
-
const auth_1 = require("../common/auth");
|
|
8
|
-
const client_1 = require("../common/client");
|
|
9
|
-
exports.resolveIncidents = (0, pieces_framework_1.createAction)({
|
|
10
|
-
auth: auth_1.coralogixAuth,
|
|
11
|
-
name: 'resolveIncidents',
|
|
12
|
-
displayName: 'Resolve Incidents',
|
|
13
|
-
description: 'Mark one or more Coralogix incidents as resolved.',
|
|
14
|
-
requireAuth: true,
|
|
15
|
-
props: {
|
|
16
|
-
incidentIds: pieces_framework_1.Property.Array({
|
|
17
|
-
displayName: 'Incident IDs',
|
|
18
|
-
description: 'List of incident IDs to resolve. Find the ID in Coralogix → Alerts → Incidents → click an incident → copy the ID from the URL.',
|
|
19
|
-
required: true,
|
|
20
|
-
defaultValue: [],
|
|
21
|
-
}),
|
|
22
|
-
},
|
|
23
|
-
run(_a) {
|
|
24
|
-
return tslib_1.__awaiter(this, arguments, void 0, function* ({ auth, propsValue }) {
|
|
25
|
-
var _b;
|
|
26
|
-
const incidentIds = ((_b = propsValue.incidentIds) !== null && _b !== void 0 ? _b : []);
|
|
27
|
-
const queryString = incidentIds
|
|
28
|
-
.map((id) => `incident_ids=${encodeURIComponent(id)}`)
|
|
29
|
-
.join('&');
|
|
30
|
-
return yield (0, client_1.makeRequest)(auth, 'management', pieces_common_1.HttpMethod.POST, `/mgmt/openapi/latest/incidents/incidents/v1/resolve?${queryString}`);
|
|
31
|
-
});
|
|
32
|
-
},
|
|
33
|
-
});
|
|
34
|
-
//# sourceMappingURL=resolve-incidents.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"resolve-incidents.js","sourceRoot":"","sources":["../../../../src/lib/actions/resolve-incidents.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,+DAAyD;AACzD,yCAA+C;AAC/C,6CAA+C;AAElC,QAAA,gBAAgB,GAAG,IAAA,+BAAY,EAAC;IAC3C,IAAI,EAAE,oBAAa;IACnB,IAAI,EAAE,kBAAkB;IACxB,WAAW,EAAE,mBAAmB;IAChC,WAAW,EAAE,mDAAmD;IAChE,WAAW,EAAE,IAAI;IACjB,KAAK,EAAE;QACL,WAAW,EAAE,2BAAQ,CAAC,KAAK,CAAC;YAC1B,WAAW,EAAE,cAAc;YAC3B,WAAW,EAAE,gIAAgI;YAC7I,QAAQ,EAAE,IAAI;YACd,YAAY,EAAE,EAAE;SACjB,CAAC;KACH;IACK,GAAG;qEAAC,EAAE,IAAI,EAAE,UAAU,EAAE;;YAC5B,MAAM,WAAW,GAAG,CAAC,MAAA,UAAU,CAAC,WAAW,mCAAI,EAAE,CAAa,CAAC;YAE/D,MAAM,WAAW,GAAG,WAAW;iBAC5B,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,gBAAgB,kBAAkB,CAAC,EAAE,CAAC,EAAE,CAAC;iBACrD,IAAI,CAAC,GAAG,CAAC,CAAC;YAEb,OAAO,MAAM,IAAA,oBAAW,EACtB,IAAI,EACJ,YAAY,EACZ,0BAAU,CAAC,IAAI,EACf,uDAAuD,WAAW,EAAE,CACrE,CAAC;QACJ,CAAC;KAAA;CACF,CAAC,CAAC"}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
export declare const sendLogs: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
2
|
-
personalOrTeamApiKey: import("@activepieces/pieces-framework").SecretTextProperty<true>;
|
|
3
|
-
sendYourDataApiKey: import("@activepieces/pieces-framework").SecretTextProperty<false>;
|
|
4
|
-
coralogixDomain: import("@activepieces/pieces-framework").StaticDropdownProperty<string, true>;
|
|
5
|
-
}>, {
|
|
6
|
-
text: import("@activepieces/pieces-framework").LongTextProperty<true>;
|
|
7
|
-
applicationName: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
8
|
-
subsystemName: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
9
|
-
severity: import("@activepieces/pieces-framework").StaticDropdownProperty<number, false>;
|
|
10
|
-
category: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
11
|
-
className: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
12
|
-
computerName: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
13
|
-
methodName: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
14
|
-
threadId: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
15
|
-
timestamp: import("@activepieces/pieces-framework").NumberProperty<false>;
|
|
16
|
-
hiResTimestamp: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
17
|
-
}>;
|
|
18
|
-
//# sourceMappingURL=send-logs.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"send-logs.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/send-logs.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;;EAoHnB,CAAC"}
|
|
@@ -1,111 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.sendLogs = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
6
|
-
const pieces_common_1 = require("@activepieces/pieces-common");
|
|
7
|
-
const auth_1 = require("../common/auth");
|
|
8
|
-
const client_1 = require("../common/client");
|
|
9
|
-
exports.sendLogs = (0, pieces_framework_1.createAction)({
|
|
10
|
-
auth: auth_1.coralogixAuth,
|
|
11
|
-
name: 'sendLogs',
|
|
12
|
-
displayName: 'Send Logs',
|
|
13
|
-
description: 'Send a single log to Coralogix Log Ingestion API.',
|
|
14
|
-
requireAuth: true,
|
|
15
|
-
props: {
|
|
16
|
-
text: pieces_framework_1.Property.LongText({
|
|
17
|
-
displayName: 'Log Message',
|
|
18
|
-
description: 'The log message text or a JSON string.',
|
|
19
|
-
required: true,
|
|
20
|
-
}),
|
|
21
|
-
applicationName: pieces_framework_1.Property.ShortText({
|
|
22
|
-
displayName: 'Application Name',
|
|
23
|
-
description: 'The application name for this log.',
|
|
24
|
-
required: true,
|
|
25
|
-
defaultValue: 'my-app',
|
|
26
|
-
}),
|
|
27
|
-
subsystemName: pieces_framework_1.Property.ShortText({
|
|
28
|
-
displayName: 'Subsystem Name',
|
|
29
|
-
description: 'The subsystem name for this log.',
|
|
30
|
-
required: true,
|
|
31
|
-
defaultValue: 'auth-service',
|
|
32
|
-
}),
|
|
33
|
-
severity: pieces_framework_1.Property.StaticDropdown({
|
|
34
|
-
displayName: 'Severity',
|
|
35
|
-
required: false,
|
|
36
|
-
options: {
|
|
37
|
-
options: [
|
|
38
|
-
{ label: 'Debug (1)', value: 1 },
|
|
39
|
-
{ label: 'Verbose (2)', value: 2 },
|
|
40
|
-
{ label: 'Info (3)', value: 3 },
|
|
41
|
-
{ label: 'Warn (4)', value: 4 },
|
|
42
|
-
{ label: 'Error (5)', value: 5 },
|
|
43
|
-
{ label: 'Critical (6)', value: 6 },
|
|
44
|
-
],
|
|
45
|
-
},
|
|
46
|
-
}),
|
|
47
|
-
category: pieces_framework_1.Property.ShortText({
|
|
48
|
-
displayName: 'Category',
|
|
49
|
-
required: false,
|
|
50
|
-
}),
|
|
51
|
-
className: pieces_framework_1.Property.ShortText({
|
|
52
|
-
displayName: 'Class Name',
|
|
53
|
-
required: false,
|
|
54
|
-
}),
|
|
55
|
-
computerName: pieces_framework_1.Property.ShortText({
|
|
56
|
-
displayName: 'Computer Name',
|
|
57
|
-
required: false,
|
|
58
|
-
}),
|
|
59
|
-
methodName: pieces_framework_1.Property.ShortText({
|
|
60
|
-
displayName: 'Method Name',
|
|
61
|
-
required: false,
|
|
62
|
-
}),
|
|
63
|
-
threadId: pieces_framework_1.Property.ShortText({
|
|
64
|
-
displayName: 'Thread ID',
|
|
65
|
-
required: false,
|
|
66
|
-
}),
|
|
67
|
-
timestamp: pieces_framework_1.Property.Number({
|
|
68
|
-
displayName: 'Timestamp',
|
|
69
|
-
description: 'UTC milliseconds since 1970. Leave empty to use ingestion time.',
|
|
70
|
-
required: false,
|
|
71
|
-
}),
|
|
72
|
-
hiResTimestamp: pieces_framework_1.Property.ShortText({
|
|
73
|
-
displayName: 'High Resolution Timestamp',
|
|
74
|
-
description: 'UTC nanoseconds since 1970 as a string. Optional alternative to timestamp.',
|
|
75
|
-
required: false,
|
|
76
|
-
}),
|
|
77
|
-
},
|
|
78
|
-
run(_a) {
|
|
79
|
-
return tslib_1.__awaiter(this, arguments, void 0, function* ({ auth, propsValue }) {
|
|
80
|
-
const { text, applicationName, subsystemName, severity, category, className, computerName, methodName, threadId, timestamp, hiResTimestamp, } = propsValue;
|
|
81
|
-
const logRecord = {
|
|
82
|
-
applicationName,
|
|
83
|
-
subsystemName,
|
|
84
|
-
};
|
|
85
|
-
logRecord['text'] = text;
|
|
86
|
-
if (severity !== undefined && severity !== null)
|
|
87
|
-
logRecord['severity'] = Number(severity);
|
|
88
|
-
if (category)
|
|
89
|
-
logRecord['category'] = category;
|
|
90
|
-
if (className)
|
|
91
|
-
logRecord['className'] = className;
|
|
92
|
-
if (computerName)
|
|
93
|
-
logRecord['computerName'] = computerName;
|
|
94
|
-
if (methodName)
|
|
95
|
-
logRecord['methodName'] = methodName;
|
|
96
|
-
if (threadId)
|
|
97
|
-
logRecord['threadId'] = threadId;
|
|
98
|
-
if (timestamp !== undefined)
|
|
99
|
-
logRecord['timestamp'] = timestamp;
|
|
100
|
-
if (hiResTimestamp)
|
|
101
|
-
logRecord['hiResTimestamp'] = hiResTimestamp;
|
|
102
|
-
const response = yield (0, client_1.makeRequest)(auth, 'ingestion', pieces_common_1.HttpMethod.POST, `/logs/v1/singles`, [logRecord]);
|
|
103
|
-
return {
|
|
104
|
-
success: true,
|
|
105
|
-
sent: 1,
|
|
106
|
-
response,
|
|
107
|
-
};
|
|
108
|
-
});
|
|
109
|
-
},
|
|
110
|
-
});
|
|
111
|
-
//# sourceMappingURL=send-logs.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"send-logs.js","sourceRoot":"","sources":["../../../../src/lib/actions/send-logs.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,+DAAyD;AACzD,yCAA+C;AAC/C,6CAA+C;AAElC,QAAA,QAAQ,GAAG,IAAA,+BAAY,EAAC;IACnC,IAAI,EAAE,oBAAa;IACnB,IAAI,EAAE,UAAU;IAChB,WAAW,EAAE,WAAW;IACxB,WAAW,EAAE,mDAAmD;IAChE,WAAW,EAAE,IAAI;IACjB,KAAK,EAAE;QACL,IAAI,EAAE,2BAAQ,CAAC,QAAQ,CAAC;YACtB,WAAW,EAAE,aAAa;YAC1B,WAAW,EAAE,wCAAwC;YACrD,QAAQ,EAAE,IAAI;SACf,CAAC;QACF,eAAe,EAAE,2BAAQ,CAAC,SAAS,CAAC;YAClC,WAAW,EAAE,kBAAkB;YAC/B,WAAW,EAAE,oCAAoC;YACjD,QAAQ,EAAE,IAAI;YACd,YAAY,EAAE,QAAQ;SACvB,CAAC;QACF,aAAa,EAAE,2BAAQ,CAAC,SAAS,CAAC;YAChC,WAAW,EAAE,gBAAgB;YAC7B,WAAW,EAAE,kCAAkC;YAC/C,QAAQ,EAAE,IAAI;YACd,YAAY,EAAE,cAAc;SAC7B,CAAC;QACF,QAAQ,EAAE,2BAAQ,CAAC,cAAc,CAAC;YAChC,WAAW,EAAE,UAAU;YACvB,QAAQ,EAAE,KAAK;YACf,OAAO,EAAE;gBACP,OAAO,EAAE;oBACP,EAAE,KAAK,EAAE,WAAW,EAAE,KAAK,EAAE,CAAC,EAAE;oBAChC,EAAE,KAAK,EAAE,aAAa,EAAE,KAAK,EAAE,CAAC,EAAE;oBAClC,E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ACR,SAAS,EACT,cAAc,GACf,GAAG,UAAU,CAAC;YAEf,MAAM,SAAS,GAA4B;gBACzC,eAAe;gBACf,aAAa;aACd,CAAC;YAEF,SAAS,CAAC,MAAM,CAAC,GAAI,IAAI,CAAC;YAE1B,IAAI,QAAQ,KAAK,SAAS,IAAI,QAAQ,KAAK,IAAI;gBAAE,SAAS,CAAC,UAAU,CAAC,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAC;YAC1F,IAAI,QAAQ;gBAAE,SAAS,CAAC,UAAU,CAAC,GAAG,QAAQ,CAAC;YAC/C,IAAI,SAAS;gBAAE,SAAS,CAAC,WAAW,CAAC,GAAG,SAAS,CAAC;YAClD,IAAI,YAAY;gBAAE,SAAS,CAAC,cAAc,CAAC,GAAG,YAAY,CAAC;YAC3D,IAAI,UAAU;gBAAE,SAAS,CAAC,YAAY,CAAC,GAAG,UAAU,CAAC;YACrD,IAAI,QAAQ;gBAAE,SAAS,CAAC,UAAU,CAAC,GAAG,QAAQ,CAAC;YAC/C,IAAI,SAAS,KAAK,SAAS;gBAAE,SAAS,CAAC,WAAW,CAAC,GAAG,SAAS,CAAC;YAChE,IAAI,cAAc;gBAAE,SAAS,CAAC,gBAAgB,CAAC,GAAG,cAAc,CAAC;YAEjE,MAAM,QAAQ,GAAG,MAAM,IAAA,oBAAW,EAChC,IAAI,EACJ,WAAW,EACX,0BAAU,CAAC,IAAI,EACf,kBAAkB,EAClB,CAAC,SAAS,CAAC,CACZ,CAAC;YAEF,OAAO;gBACL,OAAO,EAAE,IAAI;gBACb,IAAI,EAAE,CAAC;gBACP,QAAQ;aACT,CAAC;QACJ,CAAC;KAAA;CACF,CAAC,CAAC"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
export declare const setAlertActive: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
2
|
-
personalOrTeamApiKey: import("@activepieces/pieces-framework").SecretTextProperty<true>;
|
|
3
|
-
sendYourDataApiKey: import("@activepieces/pieces-framework").SecretTextProperty<false>;
|
|
4
|
-
coralogixDomain: import("@activepieces/pieces-framework").StaticDropdownProperty<string, true>;
|
|
5
|
-
}>, {
|
|
6
|
-
alertId: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
7
|
-
active: import("@activepieces/pieces-framework").CheckboxProperty<true>;
|
|
8
|
-
}>;
|
|
9
|
-
//# sourceMappingURL=set-alert-active.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"set-alert-active.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/set-alert-active.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,cAAc;;;;;;;EA+BzB,CAAC"}
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.setAlertActive = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
6
|
-
const pieces_common_1 = require("@activepieces/pieces-common");
|
|
7
|
-
const auth_1 = require("../common/auth");
|
|
8
|
-
const client_1 = require("../common/client");
|
|
9
|
-
exports.setAlertActive = (0, pieces_framework_1.createAction)({
|
|
10
|
-
auth: auth_1.coralogixAuth,
|
|
11
|
-
name: 'setAlertActive',
|
|
12
|
-
displayName: 'Enable / Disable Alert',
|
|
13
|
-
description: 'Enable or disable a Coralogix alert definition. Use this to mute alerts during maintenance windows.',
|
|
14
|
-
requireAuth: true,
|
|
15
|
-
props: {
|
|
16
|
-
alertId: pieces_framework_1.Property.ShortText({
|
|
17
|
-
displayName: 'Alert ID',
|
|
18
|
-
description: 'The ID of the alert to enable or disable. Use the "List Alert Definitions" action to find IDs.',
|
|
19
|
-
required: true,
|
|
20
|
-
}),
|
|
21
|
-
active: pieces_framework_1.Property.Checkbox({
|
|
22
|
-
displayName: 'Enable Alert',
|
|
23
|
-
description: 'Turn ON to enable the alert, turn OFF to disable it.',
|
|
24
|
-
required: true,
|
|
25
|
-
defaultValue: true,
|
|
26
|
-
}),
|
|
27
|
-
},
|
|
28
|
-
run(_a) {
|
|
29
|
-
return tslib_1.__awaiter(this, arguments, void 0, function* ({ auth, propsValue }) {
|
|
30
|
-
const { alertId, active } = propsValue;
|
|
31
|
-
return yield (0, client_1.makeRequest)(auth, 'management', pieces_common_1.HttpMethod.POST, `/mgmt/openapi/latest/alerts/alerts-general/v3/${encodeURIComponent(alertId)}:setActive?active=${active}`);
|
|
32
|
-
});
|
|
33
|
-
},
|
|
34
|
-
});
|
|
35
|
-
//# sourceMappingURL=set-alert-active.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"set-alert-active.js","sourceRoot":"","sources":["../../../../src/lib/actions/set-alert-active.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,+DAAyD;AACzD,yCAA+C;AAC/C,6CAA+C;AAElC,QAAA,cAAc,GAAG,IAAA,+BAAY,EAAC;IACzC,IAAI,EAAE,oBAAa;IACnB,IAAI,EAAE,gBAAgB;IACtB,WAAW,EAAE,wBAAwB;IACrC,WAAW,EACT,qGAAqG;IACvG,WAAW,EAAE,IAAI;IACjB,KAAK,EAAE;QACL,OAAO,EAAE,2BAAQ,CAAC,SAAS,CAAC;YAC1B,WAAW,EAAE,UAAU;YACvB,WAAW,EACT,gGAAgG;YAClG,QAAQ,EAAE,IAAI;SACf,CAAC;QACF,MAAM,EAAE,2BAAQ,CAAC,QAAQ,CAAC;YACxB,WAAW,EAAE,cAAc;YAC3B,WAAW,EAAE,sDAAsD;YACnE,QAAQ,EAAE,IAAI;YACd,YAAY,EAAE,IAAI;SACnB,CAAC;KACH;IACK,GAAG;qEAAC,EAAE,IAAI,EAAE,UAAU,EAAE;YAC5B,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,UAAU,CAAC;YAEvC,OAAO,MAAM,IAAA,oBAAW,EACtB,IAAI,EACJ,YAAY,EACZ,0BAAU,CAAC,IAAI,EACf,iDAAiD,kBAAkB,CAAC,OAAO,CAAC,qBAAqB,MAAM,EAAE,CAC1G,CAAC;QACJ,CAAC;KAAA;CACF,CAAC,CAAC"}
|
package/src/lib/common/auth.d.ts
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
export declare const coralogixAuth: import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
2
|
-
personalOrTeamApiKey: import("@activepieces/pieces-framework").SecretTextProperty<true>;
|
|
3
|
-
sendYourDataApiKey: import("@activepieces/pieces-framework").SecretTextProperty<false>;
|
|
4
|
-
coralogixDomain: import("@activepieces/pieces-framework").StaticDropdownProperty<string, true>;
|
|
5
|
-
}>;
|
|
6
|
-
//# sourceMappingURL=auth.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../../../../src/lib/common/auth.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,aAAa;;;;EAqCxB,CAAC"}
|
package/src/lib/common/auth.js
DELETED
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.coralogixAuth = void 0;
|
|
4
|
-
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
5
|
-
exports.coralogixAuth = pieces_framework_1.PieceAuth.CustomAuth({
|
|
6
|
-
displayName: 'Coralogix Credentials',
|
|
7
|
-
description: 'Management API uses api.coralogix.com. Select ingestion region domain and provide both API keys.',
|
|
8
|
-
required: true,
|
|
9
|
-
props: {
|
|
10
|
-
personalOrTeamApiKey: pieces_framework_1.PieceAuth.SecretText({
|
|
11
|
-
displayName: 'Personal/Team API Key',
|
|
12
|
-
description: 'Used for Coralogix management APIs (for example alert definitions, incidents, dashboards).',
|
|
13
|
-
required: true,
|
|
14
|
-
}),
|
|
15
|
-
sendYourDataApiKey: pieces_framework_1.PieceAuth.SecretText({
|
|
16
|
-
displayName: 'Send-Your-Data API Key',
|
|
17
|
-
description: 'Used for Coralogix ingestion APIs (for example /logs/v1/singles). Find it in Settings → API Keys → Send Your Data.',
|
|
18
|
-
required: false,
|
|
19
|
-
}),
|
|
20
|
-
coralogixDomain: pieces_framework_1.Property.StaticDropdown({
|
|
21
|
-
displayName: 'Ingestion Region Domain',
|
|
22
|
-
description: 'Select your Coralogix regional domain for ingestion endpoints.',
|
|
23
|
-
required: true,
|
|
24
|
-
defaultValue: 'eu1.coralogix.com',
|
|
25
|
-
options: {
|
|
26
|
-
options: [
|
|
27
|
-
{ label: 'EU1 (<team>.coralogix.com)', value: 'eu1.coralogix.com' },
|
|
28
|
-
{ label: 'EU2 (<team>.app.eu2.coralogix.com)', value: 'eu2.coralogix.com' },
|
|
29
|
-
{ label: 'US1 (<team>.app.coralogix.us)', value: 'us1.coralogix.com' },
|
|
30
|
-
{ label: 'US2 (<team>.app.cx498.coralogix.com)', value: 'us2.coralogix.com' },
|
|
31
|
-
{ label: 'AP1 (<team>.app.coralogix.in)', value: 'ap1.coralogix.com' },
|
|
32
|
-
{ label: 'AP2 (<team>.app.coralogixsg.com)', value: 'ap2.coralogix.com' },
|
|
33
|
-
{ label: 'AP3 (<team>.app.ap3.coralogix.com)', value: 'ap3.coralogix.com' },
|
|
34
|
-
],
|
|
35
|
-
},
|
|
36
|
-
}),
|
|
37
|
-
},
|
|
38
|
-
});
|
|
39
|
-
//# sourceMappingURL=auth.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"auth.js","sourceRoot":"","sources":["../../../../src/lib/common/auth.ts"],"names":[],"mappings":";;;AAAA,qEAAqE;AAExD,QAAA,aAAa,GAAG,4BAAS,CAAC,UAAU,CAAC;IAChD,WAAW,EAAE,uBAAuB;IACpC,WAAW,EACT,kGAAkG;IACpG,QAAQ,EAAE,IAAI;IACd,KAAK,EAAE;QACL,oBAAoB,EAAE,4BAAS,CAAC,UAAU,CAAC;YACzC,WAAW,EAAE,uBAAuB;YACpC,WAAW,EACT,4FAA4F;YAC9F,QAAQ,EAAE,IAAI;SACf,CAAC;QACF,kBAAkB,EAAE,4BAAS,CAAC,UAAU,CAAC;YACvC,WAAW,EAAE,wBAAwB;YACrC,WAAW,EACT,oHAAoH;YACtH,QAAQ,EAAE,KAAK;SAChB,CAAC;QACF,eAAe,EAAE,2BAAQ,CAAC,cAAc,CAAC;YACvC,WAAW,EAAE,yBAAyB;YACtC,WAAW,EACT,gEAAgE;YAClE,QAAQ,EAAE,IAAI;YACd,YAAY,EAAE,mBAAmB;YACjC,OAAO,EAAE;gBACP,OAAO,EAAE;oBACP,EAAE,KAAK,EAAE,4BAA4B,EAAE,KAAK,EAAE,mBAAmB,EAAE;oBACnE,EAAE,KAAK,EAAE,oCAAoC,EAAE,KAAK,EAAE,mBAAmB,EAAE;oBAC3E,EAAE,KAAK,EAAE,+BAA+B,EAAE,KAAK,EAAE,mBAAmB,EAAE;oBACtE,EAAE,KAAK,EAAE,sCAAsC,EAAE,KAAK,EAAE,mBAAmB,EAAE;oBAC7E,EAAE,KAAK,EAAE,+BAA+B,EAAE,KAAK,EAAE,mBAAmB,EAAE;oBACtE,EAAE,KAAK,EAAE,kCAAkC,EAAE,KAAK,EAAE,mBAAmB,EAAE;oBACzE,EAAE,KAAK,EAAE,oCAAoC,EAAE,KAAK,EAAE,mBAAmB,EAAE;iBAC5E;aACF;SACF,CAAC;KACH;CACF,CAAC,CAAC"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { HttpMethod, QueryParams } from '@activepieces/pieces-common';
|
|
2
|
-
import { coralogixAuth } from './auth';
|
|
3
|
-
import { AppConnectionValueForAuthProperty } from '@activepieces/pieces-framework';
|
|
4
|
-
type CoralogixApiType = 'management' | 'ingestion';
|
|
5
|
-
export declare const MANAGEMENT_DOMAIN: Record<string, string>;
|
|
6
|
-
export declare function makeRequest(auth: AppConnectionValueForAuthProperty<typeof coralogixAuth>, apiType: CoralogixApiType, method: HttpMethod, path: string, body?: unknown, queryParams?: QueryParams): Promise<any>;
|
|
7
|
-
export {};
|
|
8
|
-
//# sourceMappingURL=client.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../../src/lib/common/client.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EACV,WAAW,EAEZ,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAC;AACvC,OAAO,EAAE,iCAAiC,EAAE,MAAM,gCAAgC,CAAC;AAEnF,KAAK,gBAAgB,GAAG,YAAY,GAAG,WAAW,CAAC;AAEnD,eAAO,MAAM,iBAAiB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAQpD,CAAC;AAEF,wBAAsB,WAAW,CAC/B,IAAI,EAAE,iCAAiC,CAAC,OAAO,aAAa,CAAC,EAC7D,OAAO,EAAE,gBAAgB,EACzB,MAAM,EAAE,UAAU,EAClB,IAAI,EAAE,MAAM,EACZ,IAAI,CAAC,EAAE,OAAO,EACd,WAAW,CAAC,EAAE,WAAW,gBAuB1B"}
|
package/src/lib/common/client.js
DELETED
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.MANAGEMENT_DOMAIN = void 0;
|
|
4
|
-
exports.makeRequest = makeRequest;
|
|
5
|
-
const tslib_1 = require("tslib");
|
|
6
|
-
const pieces_common_1 = require("@activepieces/pieces-common");
|
|
7
|
-
exports.MANAGEMENT_DOMAIN = {
|
|
8
|
-
'eu1.coralogix.com': 'api.coralogix.com',
|
|
9
|
-
'eu2.coralogix.com': 'api.eu2.coralogix.com',
|
|
10
|
-
'us1.coralogix.com': 'api.coralogix.us',
|
|
11
|
-
'us2.coralogix.com': 'api.cx498.coralogix.com',
|
|
12
|
-
'ap1.coralogix.com': 'api.coralogix.in',
|
|
13
|
-
'ap2.coralogix.com': 'api.coralogixsg.com',
|
|
14
|
-
'ap3.coralogix.com': 'api.ap3.coralogix.com',
|
|
15
|
-
};
|
|
16
|
-
function makeRequest(auth, apiType, method, path, body, queryParams) {
|
|
17
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
18
|
-
var _a;
|
|
19
|
-
const coralogixDomain = auth.props.coralogixDomain;
|
|
20
|
-
const domain = apiType === 'management'
|
|
21
|
-
? (_a = exports.MANAGEMENT_DOMAIN[coralogixDomain]) !== null && _a !== void 0 ? _a : 'api.coralogix.com'
|
|
22
|
-
: `ingress.${coralogixDomain}`;
|
|
23
|
-
const apiKey = apiType === 'management'
|
|
24
|
-
? auth.props.personalOrTeamApiKey
|
|
25
|
-
: auth.props.sendYourDataApiKey;
|
|
26
|
-
const response = yield pieces_common_1.httpClient.sendRequest({
|
|
27
|
-
method,
|
|
28
|
-
url: `https://${domain}${path}`,
|
|
29
|
-
headers: {
|
|
30
|
-
Authorization: `Bearer ${apiKey}`,
|
|
31
|
-
'Content-Type': 'application/json',
|
|
32
|
-
},
|
|
33
|
-
queryParams,
|
|
34
|
-
body,
|
|
35
|
-
});
|
|
36
|
-
return response.body;
|
|
37
|
-
});
|
|
38
|
-
}
|
|
39
|
-
//# sourceMappingURL=client.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"client.js","sourceRoot":"","sources":["../../../../src/lib/common/client.ts"],"names":[],"mappings":";;;AAoBA,kCA6BC;;AAjDD,+DAIqC;AAMxB,QAAA,iBAAiB,GAA2B;IACvD,mBAAmB,EAAE,mBAAmB;IACxC,mBAAmB,EAAE,uBAAuB;IAC5C,mBAAmB,EAAE,kBAAkB;IACvC,mBAAmB,EAAE,yBAAyB;IAC9C,mBAAmB,EAAE,kBAAkB;IACvC,mBAAmB,EAAE,qBAAqB;IAC1C,mBAAmB,EAAE,uBAAuB;CAC7C,CAAC;AAEF,SAAsB,WAAW,CAC/B,IAA6D,EAC7D,OAAyB,EACzB,MAAkB,EAClB,IAAY,EACZ,IAAc,EACd,WAAyB;;;QAEzB,MAAM,eAAe,GAAG,IAAI,CAAC,KAAK,CAAC,eAAe,CAAC;QACnD,MAAM,MAAM,GACV,OAAO,KAAK,YAAY;YACtB,CAAC,CAAC,MAAA,yBAAiB,CAAC,eAAe,CAAC,mCAAI,mBAAmB;YAC3D,CAAC,CAAC,WAAW,eAAe,EAAE,CAAC;QACnC,MAAM,MAAM,GACV,OAAO,KAAK,YAAY;YACtB,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,oBAAoB;YACjC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,kBAAkB,CAAC;QACpC,MAAM,QAAQ,GAAG,MAAM,0BAAU,CAAC,WAAW,CAAC;YAC5C,MAAM;YACN,GAAG,EAAE,WAAW,MAAM,GAAG,IAAI,EAAE;YAC/B,OAAO,EAAE;gBACP,aAAa,EAAE,UAAU,MAAM,EAAE;gBACjC,cAAc,EAAE,kBAAkB;aACnC;YACD,WAAW;YACX,IAAI;SACL,CAAC,CAAC;QAEH,OAAO,QAAQ,CAAC,IAAI,CAAC;IACvB,CAAC;CAAA"}
|