checkly 3.1.1 → 4.0.1
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 +42 -110
- package/bin/dev +17 -0
- package/bin/run +5 -0
- package/bin/run.cmd +3 -0
- package/constructs.d.ts +1 -0
- package/constructs.js +1 -0
- package/dist/auth/index.d.ts +15 -0
- package/dist/auth/index.js +228 -0
- package/dist/auth/index.js.map +1 -0
- package/dist/commands/authCommand.d.ts +5 -0
- package/dist/commands/authCommand.js +14 -0
- package/dist/commands/authCommand.js.map +1 -0
- package/dist/commands/baseCommand.d.ts +9 -0
- package/dist/commands/baseCommand.js +21 -0
- package/dist/commands/baseCommand.js.map +1 -0
- package/dist/commands/deploy.d.ts +13 -0
- package/dist/commands/deploy.js +171 -0
- package/dist/commands/deploy.js.map +1 -0
- package/dist/commands/destroy.d.ts +10 -0
- package/dist/commands/destroy.js +47 -0
- package/dist/commands/destroy.js.map +1 -0
- package/dist/commands/env/add.d.ts +13 -0
- package/dist/commands/env/add.js +54 -0
- package/dist/commands/env/add.js.map +1 -0
- package/dist/commands/env/ls.d.ts +6 -0
- package/dist/commands/env/ls.js +21 -0
- package/dist/commands/env/ls.js.map +1 -0
- package/dist/commands/env/pull.d.ts +12 -0
- package/dist/commands/env/pull.js +63 -0
- package/dist/commands/env/pull.js.map +1 -0
- package/dist/commands/env/rm.d.ts +12 -0
- package/dist/commands/env/rm.js +56 -0
- package/dist/commands/env/rm.js.map +1 -0
- package/dist/commands/env/update.d.ts +13 -0
- package/dist/commands/env/update.js +54 -0
- package/dist/commands/env/update.js.map +1 -0
- package/dist/commands/login.d.ts +13 -0
- package/dist/commands/login.js +129 -0
- package/dist/commands/login.js.map +1 -0
- package/dist/commands/logout.d.ts +9 -0
- package/dist/commands/logout.js +40 -0
- package/dist/commands/logout.js.map +1 -0
- package/dist/commands/runtimes.d.ts +6 -0
- package/dist/commands/runtimes.js +26 -0
- package/dist/commands/runtimes.js.map +1 -0
- package/dist/commands/switch.d.ts +9 -0
- package/dist/commands/switch.js +59 -0
- package/dist/commands/switch.js.map +1 -0
- package/dist/commands/test.d.ts +36 -0
- package/dist/commands/test.js +237 -0
- package/dist/commands/test.js.map +1 -0
- package/dist/commands/trigger.d.ts +32 -0
- package/dist/commands/trigger.js +173 -0
- package/dist/commands/trigger.js.map +1 -0
- package/dist/commands/whoami.d.ts +6 -0
- package/dist/commands/whoami.js +16 -0
- package/dist/commands/whoami.js.map +1 -0
- package/dist/config.d.ts +31 -0
- package/dist/config.js +8 -0
- package/dist/config.js.map +1 -0
- package/dist/constructs/alert-channel-subscription.d.ts +44 -0
- package/dist/constructs/alert-channel-subscription.js +39 -0
- package/dist/constructs/alert-channel-subscription.js.map +1 -0
- package/dist/constructs/alert-channel.d.ts +53 -0
- package/dist/constructs/alert-channel.js +55 -0
- package/dist/constructs/alert-channel.js.map +1 -0
- package/dist/constructs/api-check.d.ts +179 -0
- package/dist/constructs/api-check.js +248 -0
- package/dist/constructs/api-check.js.map +1 -0
- package/dist/constructs/browser-check.d.ts +59 -0
- package/dist/constructs/browser-check.js +102 -0
- package/dist/constructs/browser-check.js.map +1 -0
- package/dist/constructs/check-group.d.ts +116 -0
- package/dist/constructs/check-group.js +113 -0
- package/dist/constructs/check-group.js.map +1 -0
- package/dist/constructs/check.d.ts +111 -0
- package/dist/constructs/check.js +88 -0
- package/dist/constructs/check.js.map +1 -0
- package/dist/constructs/construct.d.ts +17 -0
- package/dist/constructs/construct.js +22 -0
- package/dist/constructs/construct.js.map +1 -0
- package/dist/constructs/email-alert-channel.d.ts +26 -0
- package/dist/constructs/email-alert-channel.js +37 -0
- package/dist/constructs/email-alert-channel.js.map +1 -0
- package/dist/constructs/environment-variable.d.ts +2 -0
- package/dist/constructs/environment-variable.js +3 -0
- package/dist/constructs/environment-variable.js.map +1 -0
- package/dist/constructs/frequency.d.ts +20 -0
- package/dist/constructs/frequency.js +26 -0
- package/dist/constructs/frequency.js.map +1 -0
- package/dist/constructs/http-header.d.ts +2 -0
- package/dist/constructs/http-header.js +3 -0
- package/dist/constructs/http-header.js.map +1 -0
- package/dist/constructs/index.d.ts +15 -0
- package/dist/constructs/index.js +32 -0
- package/dist/constructs/index.js.map +1 -0
- package/dist/constructs/key-value-pair.d.ts +5 -0
- package/dist/constructs/key-value-pair.js +3 -0
- package/dist/constructs/key-value-pair.js.map +1 -0
- package/dist/constructs/opsgenie-alert-channel.d.ts +45 -0
- package/dist/constructs/opsgenie-alert-channel.js +44 -0
- package/dist/constructs/opsgenie-alert-channel.js.map +1 -0
- package/dist/constructs/pagerduty-alert-channel.d.ts +39 -0
- package/dist/constructs/pagerduty-alert-channel.js +42 -0
- package/dist/constructs/pagerduty-alert-channel.js.map +1 -0
- package/dist/constructs/project.d.ts +57 -0
- package/dist/constructs/project.js +100 -0
- package/dist/constructs/project.js.map +1 -0
- package/dist/constructs/query-param.d.ts +2 -0
- package/dist/constructs/query-param.js +3 -0
- package/dist/constructs/query-param.js.map +1 -0
- package/dist/constructs/ref.d.ts +5 -0
- package/dist/constructs/ref.js +13 -0
- package/dist/constructs/ref.js.map +1 -0
- package/dist/constructs/slack-alert-channel.d.ts +26 -0
- package/dist/constructs/slack-alert-channel.js +40 -0
- package/dist/constructs/slack-alert-channel.js.map +1 -0
- package/dist/constructs/sms-alert-channel.d.ts +27 -0
- package/dist/constructs/sms-alert-channel.js +38 -0
- package/dist/constructs/sms-alert-channel.js.map +1 -0
- package/dist/constructs/validator-error.d.ts +2 -0
- package/dist/constructs/validator-error.js +7 -0
- package/dist/constructs/validator-error.js.map +1 -0
- package/dist/constructs/webhook-alert-channel.d.ts +59 -0
- package/dist/constructs/webhook-alert-channel.js +50 -0
- package/dist/constructs/webhook-alert-channel.js.map +1 -0
- package/dist/help/examples.d.ts +6 -0
- package/dist/help/examples.js +22 -0
- package/dist/help/examples.js.map +1 -0
- package/dist/help/help-extension.d.ts +4 -0
- package/dist/help/help-extension.js +41 -0
- package/dist/help/help-extension.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +7 -0
- package/dist/index.js.map +1 -0
- package/dist/messages/common-messages.d.ts +5 -0
- package/dist/messages/common-messages.js +9 -0
- package/dist/messages/common-messages.js.map +1 -0
- package/dist/reporters/abstract-list.d.ts +34 -0
- package/dist/reporters/abstract-list.js +128 -0
- package/dist/reporters/abstract-list.js.map +1 -0
- package/dist/reporters/ci.d.ts +12 -0
- package/dist/reporters/ci.js +29 -0
- package/dist/reporters/ci.js.map +1 -0
- package/dist/reporters/dot.d.ts +12 -0
- package/dist/reporters/dot.js +28 -0
- package/dist/reporters/dot.js.map +1 -0
- package/dist/reporters/github.d.ts +34 -0
- package/dist/reporters/github.js +103 -0
- package/dist/reporters/github.js.map +1 -0
- package/dist/reporters/list.d.ts +13 -0
- package/dist/reporters/list.js +57 -0
- package/dist/reporters/list.js.map +1 -0
- package/dist/reporters/reporter.d.ts +14 -0
- package/dist/reporters/reporter.js +23 -0
- package/dist/reporters/reporter.js.map +1 -0
- package/dist/reporters/util.d.ts +15 -0
- package/dist/reporters/util.js +283 -0
- package/dist/reporters/util.js.map +1 -0
- package/dist/rest/accounts.d.ts +12 -0
- package/dist/rest/accounts.js +15 -0
- package/dist/rest/accounts.js.map +1 -0
- package/dist/rest/api.d.ts +27 -0
- package/dist/rest/api.js +90 -0
- package/dist/rest/api.js.map +1 -0
- package/dist/rest/assets.d.ts +13 -0
- package/dist/rest/assets.js +30 -0
- package/dist/rest/assets.js.map +1 -0
- package/dist/rest/environment-variables.d.ts +16 -0
- package/dist/rest/environment-variables.js +25 -0
- package/dist/rest/environment-variables.js.map +1 -0
- package/dist/rest/locations.d.ts +11 -0
- package/dist/rest/locations.js +12 -0
- package/dist/rest/locations.js.map +1 -0
- package/dist/rest/private-locations.d.ts +11 -0
- package/dist/rest/private-locations.js +12 -0
- package/dist/rest/private-locations.js.map +1 -0
- package/dist/rest/projects.d.ts +43 -0
- package/dist/rest/projects.js +24 -0
- package/dist/rest/projects.js.map +1 -0
- package/dist/rest/runtimes.d.ts +15 -0
- package/dist/rest/runtimes.js +15 -0
- package/dist/rest/runtimes.js.map +1 -0
- package/dist/rest/test-sessions.d.ts +47 -0
- package/dist/rest/test-sessions.js +15 -0
- package/dist/rest/test-sessions.js.map +1 -0
- package/dist/rest/users.d.ts +12 -0
- package/dist/rest/users.js +12 -0
- package/dist/rest/users.js.map +1 -0
- package/dist/services/abstract-check-runner.d.ts +50 -0
- package/dist/services/abstract-check-runner.js +151 -0
- package/dist/services/abstract-check-runner.js.map +1 -0
- package/dist/services/check-parser/collector.d.ts +33 -0
- package/dist/services/check-parser/collector.js +48 -0
- package/dist/services/check-parser/collector.js.map +1 -0
- package/dist/services/check-parser/errors.d.ts +8 -0
- package/dist/services/check-parser/errors.js +45 -0
- package/dist/services/check-parser/errors.js.map +1 -0
- package/dist/services/check-parser/parser.d.ts +39 -0
- package/dist/services/check-parser/parser.js +296 -0
- package/dist/services/check-parser/parser.js.map +1 -0
- package/dist/services/checkly-config-loader.d.ts +54 -0
- package/dist/services/checkly-config-loader.js +55 -0
- package/dist/services/checkly-config-loader.js.map +1 -0
- package/dist/services/config.d.ts +24 -0
- package/dist/services/config.js +75 -0
- package/dist/services/config.js.map +1 -0
- package/dist/services/project-parser.d.ts +19 -0
- package/dist/services/project-parser.js +87 -0
- package/dist/services/project-parser.js.map +1 -0
- package/dist/services/socket-client.d.ts +4 -0
- package/dist/services/socket-client.js +20 -0
- package/dist/services/socket-client.js.map +1 -0
- package/dist/services/test-filters.d.ts +2 -0
- package/dist/services/test-filters.js +16 -0
- package/dist/services/test-filters.js.map +1 -0
- package/dist/services/test-runner.d.ts +21 -0
- package/dist/services/test-runner.js +50 -0
- package/dist/services/test-runner.js.map +1 -0
- package/dist/services/trigger-runner.d.ts +26 -0
- package/dist/services/trigger-runner.js +47 -0
- package/dist/services/trigger-runner.js.map +1 -0
- package/dist/services/util.d.ts +30 -0
- package/dist/services/util.js +157 -0
- package/dist/services/util.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/oclif.manifest.json +527 -0
- package/package.json +163 -18
- package/LICENSE +0 -121
- package/dist/checkly.min.js +0 -1
- package/index.js +0 -285
- package/logo.png +0 -0
- package/test.js +0 -183
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import { Ref } from './ref';
|
|
2
|
+
import { Frequency } from './frequency';
|
|
3
|
+
import { Construct } from './construct';
|
|
4
|
+
import { AlertChannel } from './alert-channel';
|
|
5
|
+
import { EnvironmentVariable } from './environment-variable';
|
|
6
|
+
import type { Region } from '..';
|
|
7
|
+
import { CheckGroup } from './check-group';
|
|
8
|
+
export interface CheckProps {
|
|
9
|
+
/**
|
|
10
|
+
* The name of the check.
|
|
11
|
+
*/
|
|
12
|
+
name: string;
|
|
13
|
+
/**
|
|
14
|
+
* Determines if the check is running or not.
|
|
15
|
+
*/
|
|
16
|
+
activated?: boolean;
|
|
17
|
+
/**
|
|
18
|
+
* Determines if any notifications will be sent out when a check fails and/or recovers.
|
|
19
|
+
*/
|
|
20
|
+
muted?: boolean;
|
|
21
|
+
/**
|
|
22
|
+
* Setting this to "true" will trigger a retry when a check fails from the failing region and another,
|
|
23
|
+
* randomly selected region before marking the check as failed.
|
|
24
|
+
*/
|
|
25
|
+
doubleCheck?: boolean;
|
|
26
|
+
/**
|
|
27
|
+
* Allows to invert the behaviour of when a check is considered to fail. Allows for validating error status like 404.
|
|
28
|
+
* This only applies to API Checks.
|
|
29
|
+
*/
|
|
30
|
+
shouldFail?: boolean;
|
|
31
|
+
/**
|
|
32
|
+
* The runtime version, i.e. fixed set of runtime dependencies, used to execute this check.
|
|
33
|
+
*/
|
|
34
|
+
runtimeId?: string;
|
|
35
|
+
/**
|
|
36
|
+
* An array of one or more data center locations where to run this check. The supported regions are:
|
|
37
|
+
* us-east-1, us-east-2, us-west-1, us-west-2, ca-central-1, sa-east-1,
|
|
38
|
+
* eu-west-1, eu-central-1, eu-west-2, eu-west-3, eu-north-1, eu-south-1, me-south-1,
|
|
39
|
+
* ap-southeast-1, ap-northeast-1, ap-east-1, ap-southeast-2, ap-southeast-3, ap-northeast-2, ap-northeast-3,
|
|
40
|
+
* ap-south-1, af-south-1
|
|
41
|
+
*/
|
|
42
|
+
locations?: Array<keyof Region>;
|
|
43
|
+
/**
|
|
44
|
+
* An array of one or more private locations where to run the check.
|
|
45
|
+
*/
|
|
46
|
+
privateLocations?: Array<string>;
|
|
47
|
+
/**
|
|
48
|
+
* Tags for organizing and filtering checks.
|
|
49
|
+
*/
|
|
50
|
+
tags?: Array<string>;
|
|
51
|
+
/**
|
|
52
|
+
* How often the check should run in minutes.
|
|
53
|
+
*/
|
|
54
|
+
frequency?: number | Frequency;
|
|
55
|
+
environmentVariables?: Array<EnvironmentVariable>;
|
|
56
|
+
/**
|
|
57
|
+
* The id of the check group this check is part of. Set this by calling `someGroup.ref()`
|
|
58
|
+
* @deprecated Use {@link CheckProps.group} instead.
|
|
59
|
+
*/
|
|
60
|
+
groupId?: Ref;
|
|
61
|
+
/**
|
|
62
|
+
* The CheckGroup that this check is part of.
|
|
63
|
+
*/
|
|
64
|
+
group?: CheckGroup;
|
|
65
|
+
/**
|
|
66
|
+
* List of alert channels to notify when the check fails or recovers.
|
|
67
|
+
*/
|
|
68
|
+
alertChannels?: Array<AlertChannel>;
|
|
69
|
+
/**
|
|
70
|
+
* Determines if the check is available only when 'test' runs (not included when 'deploy' is executed).
|
|
71
|
+
*/
|
|
72
|
+
testOnly?: boolean;
|
|
73
|
+
}
|
|
74
|
+
export declare abstract class Check extends Construct {
|
|
75
|
+
name: string;
|
|
76
|
+
activated?: boolean;
|
|
77
|
+
muted?: boolean;
|
|
78
|
+
doubleCheck?: boolean;
|
|
79
|
+
shouldFail?: boolean;
|
|
80
|
+
runtimeId?: string;
|
|
81
|
+
locations?: Array<keyof Region>;
|
|
82
|
+
privateLocations?: Array<string>;
|
|
83
|
+
tags?: Array<string>;
|
|
84
|
+
frequency?: number;
|
|
85
|
+
frequencyOffset?: number;
|
|
86
|
+
environmentVariables?: Array<EnvironmentVariable>;
|
|
87
|
+
groupId?: Ref;
|
|
88
|
+
alertChannels?: Array<AlertChannel>;
|
|
89
|
+
testOnly?: boolean;
|
|
90
|
+
__checkFilePath?: string;
|
|
91
|
+
static readonly __checklyType = "check";
|
|
92
|
+
constructor(logicalId: string, props: CheckProps);
|
|
93
|
+
private static applyDefaultCheckConfig;
|
|
94
|
+
addSubscriptions(): void;
|
|
95
|
+
getSourceFile(): string | undefined;
|
|
96
|
+
synthesize(): {
|
|
97
|
+
name: string;
|
|
98
|
+
activated: boolean | undefined;
|
|
99
|
+
muted: boolean | undefined;
|
|
100
|
+
doubleCheck: boolean | undefined;
|
|
101
|
+
shouldFail: boolean | undefined;
|
|
102
|
+
runtimeId: string | undefined;
|
|
103
|
+
locations: (keyof Region)[] | undefined;
|
|
104
|
+
privateLocations: string[] | undefined;
|
|
105
|
+
tags: string[] | undefined;
|
|
106
|
+
frequency: number | undefined;
|
|
107
|
+
frequencyOffset: number | undefined;
|
|
108
|
+
groupId: Ref | undefined;
|
|
109
|
+
environmentVariables: import("./key-value-pair").default[] | undefined;
|
|
110
|
+
};
|
|
111
|
+
}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Check = void 0;
|
|
4
|
+
const ref_1 = require("./ref");
|
|
5
|
+
const frequency_1 = require("./frequency");
|
|
6
|
+
const construct_1 = require("./construct");
|
|
7
|
+
const alert_channel_subscription_1 = require("./alert-channel-subscription");
|
|
8
|
+
const project_1 = require("./project");
|
|
9
|
+
// This is an abstract class. It shouldn't be used directly.
|
|
10
|
+
class Check extends construct_1.Construct {
|
|
11
|
+
constructor(logicalId, props) {
|
|
12
|
+
var _a, _b, _c, _d, _e;
|
|
13
|
+
super(Check.__checklyType, logicalId);
|
|
14
|
+
Check.applyDefaultCheckConfig(props);
|
|
15
|
+
// TODO: Throw an error if required properties are still missing after applying the defaults.
|
|
16
|
+
this.name = props.name;
|
|
17
|
+
this.activated = props.activated;
|
|
18
|
+
this.muted = props.muted;
|
|
19
|
+
this.doubleCheck = props.doubleCheck;
|
|
20
|
+
this.shouldFail = props.shouldFail;
|
|
21
|
+
this.locations = props.locations;
|
|
22
|
+
this.privateLocations = props.privateLocations;
|
|
23
|
+
this.tags = props.tags;
|
|
24
|
+
if (props.frequency instanceof frequency_1.Frequency) {
|
|
25
|
+
this.frequency = props.frequency.frequency;
|
|
26
|
+
this.frequencyOffset = props.frequency.frequencyOffset;
|
|
27
|
+
}
|
|
28
|
+
else {
|
|
29
|
+
this.frequency = props.frequency;
|
|
30
|
+
}
|
|
31
|
+
this.runtimeId = props.runtimeId;
|
|
32
|
+
this.environmentVariables = (_a = props.environmentVariables) !== null && _a !== void 0 ? _a : [];
|
|
33
|
+
// Alert channel subscriptions will be synthesized separately in the Project construct.
|
|
34
|
+
// This is due to the way things are organized on the BE.
|
|
35
|
+
this.alertChannels = (_b = props.alertChannels) !== null && _b !== void 0 ? _b : [];
|
|
36
|
+
// Prefer the `group` parameter, but support groupId for backwards compatibility.
|
|
37
|
+
this.groupId = (_d = (_c = props.group) === null || _c === void 0 ? void 0 : _c.ref()) !== null && _d !== void 0 ? _d : props.groupId;
|
|
38
|
+
// alertSettings, useGlobalAlertSettings, groupId, groupOrder
|
|
39
|
+
this.testOnly = (_e = props.testOnly) !== null && _e !== void 0 ? _e : false;
|
|
40
|
+
this.__checkFilePath = project_1.Session.checkFilePath;
|
|
41
|
+
}
|
|
42
|
+
static applyDefaultCheckConfig(props) {
|
|
43
|
+
var _a;
|
|
44
|
+
if (!project_1.Session.checkDefaults) {
|
|
45
|
+
return;
|
|
46
|
+
}
|
|
47
|
+
let configKey;
|
|
48
|
+
for (configKey in project_1.Session.checkDefaults) {
|
|
49
|
+
const newVal = (_a = props[configKey]) !== null && _a !== void 0 ? _a : project_1.Session.checkDefaults[configKey];
|
|
50
|
+
props[configKey] = newVal;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
addSubscriptions() {
|
|
54
|
+
if (!this.alertChannels || this.testOnly) {
|
|
55
|
+
return;
|
|
56
|
+
}
|
|
57
|
+
for (const alertChannel of this.alertChannels) {
|
|
58
|
+
const subscription = new alert_channel_subscription_1.AlertChannelSubscription(`check-alert-channel-subscription#${this.logicalId}#${alertChannel.logicalId}`, {
|
|
59
|
+
alertChannelId: ref_1.Ref.from(alertChannel.logicalId),
|
|
60
|
+
checkId: ref_1.Ref.from(this.logicalId),
|
|
61
|
+
activated: true,
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
getSourceFile() {
|
|
66
|
+
return this.__checkFilePath;
|
|
67
|
+
}
|
|
68
|
+
synthesize() {
|
|
69
|
+
return {
|
|
70
|
+
name: this.name,
|
|
71
|
+
activated: this.activated,
|
|
72
|
+
muted: this.muted,
|
|
73
|
+
doubleCheck: this.doubleCheck,
|
|
74
|
+
shouldFail: this.shouldFail,
|
|
75
|
+
runtimeId: this.runtimeId,
|
|
76
|
+
locations: this.locations,
|
|
77
|
+
privateLocations: this.privateLocations,
|
|
78
|
+
tags: this.tags,
|
|
79
|
+
frequency: this.frequency,
|
|
80
|
+
frequencyOffset: this.frequencyOffset,
|
|
81
|
+
groupId: this.groupId,
|
|
82
|
+
environmentVariables: this.environmentVariables,
|
|
83
|
+
};
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
exports.Check = Check;
|
|
87
|
+
Check.__checklyType = 'check';
|
|
88
|
+
//# sourceMappingURL=check.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"check.js","sourceRoot":"","sources":["../../src/constructs/check.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Ref } from './ref';
|
|
2
|
+
export declare abstract class Construct {
|
|
3
|
+
type: string;
|
|
4
|
+
logicalId: string;
|
|
5
|
+
physicalId?: string | number;
|
|
6
|
+
member: boolean;
|
|
7
|
+
constructor(type: string, logicalId: string, physicalId?: string | number, member?: boolean);
|
|
8
|
+
ref(): Ref;
|
|
9
|
+
allowInChecklyConfig(): boolean;
|
|
10
|
+
abstract synthesize(): any | null;
|
|
11
|
+
}
|
|
12
|
+
export interface Entrypoint {
|
|
13
|
+
entrypoint: string;
|
|
14
|
+
}
|
|
15
|
+
export interface Content {
|
|
16
|
+
content: string;
|
|
17
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Construct = void 0;
|
|
4
|
+
const project_1 = require("./project");
|
|
5
|
+
const ref_1 = require("./ref");
|
|
6
|
+
class Construct {
|
|
7
|
+
constructor(type, logicalId, physicalId, member) {
|
|
8
|
+
this.logicalId = logicalId;
|
|
9
|
+
this.type = type;
|
|
10
|
+
this.physicalId = physicalId;
|
|
11
|
+
this.member = member !== null && member !== void 0 ? member : true;
|
|
12
|
+
project_1.Session.validateCreateConstruct(this);
|
|
13
|
+
}
|
|
14
|
+
ref() {
|
|
15
|
+
return ref_1.Ref.from(this.logicalId);
|
|
16
|
+
}
|
|
17
|
+
allowInChecklyConfig() {
|
|
18
|
+
return false;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
exports.Construct = Construct;
|
|
22
|
+
//# sourceMappingURL=construct.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"construct.js","sourceRoot":"","sources":["../../src/constructs/construct.ts"],"names":[],"mappings":";;;AAAA,uCAAmC;AACnC,+BAA2B;AAE3B,MAAsB,SAAS;IAK7B,YAAa,IAAY,EAAE,SAAiB,EAAE,UAA0B,EAAE,MAAgB;QACxF,IAAI,CAAC,SAAS,GAAG,SAAS,CAAA;QAC1B,IAAI,CAAC,IAAI,GAAG,IAAI,CAAA;QAChB,IAAI,CAAC,UAAU,GAAG,UAAU,CAAA;QAC5B,IAAI,CAAC,MAAM,GAAG,MAAM,aAAN,MAAM,cAAN,MAAM,GAAI,IAAI,CAAA;QAC5B,iBAAO,CAAC,uBAAuB,CAAC,IAAI,CAAC,CAAA;IACvC,CAAC;IAED,GAAG;QACD,OAAO,SAAG,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,CAAA;IACjC,CAAC;IAED,oBAAoB;QAClB,OAAO,KAAK,CAAA;IACd,CAAC;CAGF;AAtBD,8BAsBC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { AlertChannel, AlertChannelProps } from './alert-channel';
|
|
2
|
+
export interface EmailAlertChannelProps extends AlertChannelProps {
|
|
3
|
+
/**
|
|
4
|
+
* The email address where to send the alert notifications.
|
|
5
|
+
*/
|
|
6
|
+
address: string;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Creates an Email Alert Channel
|
|
10
|
+
*
|
|
11
|
+
* @remarks
|
|
12
|
+
*
|
|
13
|
+
* This class make use of the Alert Channel endpoints.
|
|
14
|
+
*/
|
|
15
|
+
export declare class EmailAlertChannel extends AlertChannel {
|
|
16
|
+
address: string;
|
|
17
|
+
/**
|
|
18
|
+
* Constructs the Email Alert Channel instance
|
|
19
|
+
*
|
|
20
|
+
* @param logicalId unique project-scoped resource name identification
|
|
21
|
+
* @param props email alert channel configuration properties
|
|
22
|
+
* {@link https://checklyhq.com/docs/cli/constructs/#emailalertchannel Read more in the docs}
|
|
23
|
+
*/
|
|
24
|
+
constructor(logicalId: string, props: EmailAlertChannelProps);
|
|
25
|
+
synthesize(): any;
|
|
26
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.EmailAlertChannel = void 0;
|
|
4
|
+
const alert_channel_1 = require("./alert-channel");
|
|
5
|
+
const project_1 = require("./project");
|
|
6
|
+
/**
|
|
7
|
+
* Creates an Email Alert Channel
|
|
8
|
+
*
|
|
9
|
+
* @remarks
|
|
10
|
+
*
|
|
11
|
+
* This class make use of the Alert Channel endpoints.
|
|
12
|
+
*/
|
|
13
|
+
class EmailAlertChannel extends alert_channel_1.AlertChannel {
|
|
14
|
+
/**
|
|
15
|
+
* Constructs the Email Alert Channel instance
|
|
16
|
+
*
|
|
17
|
+
* @param logicalId unique project-scoped resource name identification
|
|
18
|
+
* @param props email alert channel configuration properties
|
|
19
|
+
* {@link https://checklyhq.com/docs/cli/constructs/#emailalertchannel Read more in the docs}
|
|
20
|
+
*/
|
|
21
|
+
constructor(logicalId, props) {
|
|
22
|
+
super(logicalId, props);
|
|
23
|
+
this.address = props.address;
|
|
24
|
+
project_1.Session.registerConstruct(this);
|
|
25
|
+
}
|
|
26
|
+
synthesize() {
|
|
27
|
+
return {
|
|
28
|
+
...super.synthesize(),
|
|
29
|
+
type: 'EMAIL',
|
|
30
|
+
config: {
|
|
31
|
+
address: this.address,
|
|
32
|
+
},
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
exports.EmailAlertChannel = EmailAlertChannel;
|
|
37
|
+
//# sourceMappingURL=email-alert-channel.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"email-alert-channel.js","sourceRoot":"","sources":["../../src/constructs/email-alert-channel.ts"],"names":[],"mappings":";;;AAAA,mDAAiE;AACjE,uCAAmC;AASnC;;;;;;GAMG;AACH,MAAa,iBAAkB,SAAQ,4BAAY;IAEjD;;;;;;OAMG;IACH,YAAa,SAAiB,EAAE,KAA6B;QAC3D,KAAK,CAAC,SAAS,EAAE,KAAK,CAAC,CAAA;QACvB,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC,OAAO,CAAA;QAC5B,iBAAO,CAAC,iBAAiB,CAAC,IAAI,CAAC,CAAA;IACjC,CAAC;IAED,UAAU;QACR,OAAO;YACL,GAAG,KAAK,CAAC,UAAU,EAAE;YACrB,IAAI,EAAE,OAAO;YACb,MAAM,EAAE;gBACN,OAAO,EAAE,IAAI,CAAC,OAAO;aACtB;SACF,CAAA;IACH,CAAC;CACF;AAxBD,8CAwBC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"environment-variable.js","sourceRoot":"","sources":["../../src/constructs/environment-variable.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export declare class Frequency {
|
|
2
|
+
static EVERY_10S: Frequency;
|
|
3
|
+
static EVERY_20S: Frequency;
|
|
4
|
+
static EVERY_30S: Frequency;
|
|
5
|
+
static EVERY_1M: Frequency;
|
|
6
|
+
static EVERY_2M: Frequency;
|
|
7
|
+
static EVERY_5M: Frequency;
|
|
8
|
+
static EVERY_10M: Frequency;
|
|
9
|
+
static EVERY_15M: Frequency;
|
|
10
|
+
static EVERY_30M: Frequency;
|
|
11
|
+
static EVERY_1H: Frequency;
|
|
12
|
+
static EVERY_2H: Frequency;
|
|
13
|
+
static EVERY_3M: Frequency;
|
|
14
|
+
static EVERY_6H: Frequency;
|
|
15
|
+
static EVERY_12H: Frequency;
|
|
16
|
+
static EVERY_24H: Frequency;
|
|
17
|
+
frequency: number;
|
|
18
|
+
frequencyOffset?: number;
|
|
19
|
+
private constructor();
|
|
20
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Frequency = void 0;
|
|
4
|
+
class Frequency {
|
|
5
|
+
constructor(frequency, frequencyOffset) {
|
|
6
|
+
this.frequency = frequency;
|
|
7
|
+
this.frequencyOffset = frequencyOffset;
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
exports.Frequency = Frequency;
|
|
11
|
+
Frequency.EVERY_10S = new Frequency(0, 10);
|
|
12
|
+
Frequency.EVERY_20S = new Frequency(0, 20);
|
|
13
|
+
Frequency.EVERY_30S = new Frequency(0, 30);
|
|
14
|
+
Frequency.EVERY_1M = new Frequency(1);
|
|
15
|
+
Frequency.EVERY_2M = new Frequency(2);
|
|
16
|
+
Frequency.EVERY_5M = new Frequency(5);
|
|
17
|
+
Frequency.EVERY_10M = new Frequency(10);
|
|
18
|
+
Frequency.EVERY_15M = new Frequency(15);
|
|
19
|
+
Frequency.EVERY_30M = new Frequency(30);
|
|
20
|
+
Frequency.EVERY_1H = new Frequency(1 * 60);
|
|
21
|
+
Frequency.EVERY_2H = new Frequency(2 * 60);
|
|
22
|
+
Frequency.EVERY_3M = new Frequency(3 * 60);
|
|
23
|
+
Frequency.EVERY_6H = new Frequency(6 * 60);
|
|
24
|
+
Frequency.EVERY_12H = new Frequency(12 * 60);
|
|
25
|
+
Frequency.EVERY_24H = new Frequency(24 * 60);
|
|
26
|
+
//# sourceMappingURL=frequency.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"frequency.js","sourceRoot":"","sources":["../../src/constructs/frequency.ts"],"names":[],"mappings":";;;AAAA,MAAa,SAAS;IAqBpB,YAAqB,SAAiB,EAAE,eAAwB;QAC9D,IAAI,CAAC,SAAS,GAAG,SAAS,CAAA;QAC1B,IAAI,CAAC,eAAe,GAAG,eAAe,CAAA;IACxC,CAAC;;AAxBH,8BAyBC;AAxBQ,mBAAS,GAAG,IAAI,SAAS,CAAC,CAAC,EAAE,EAAE,CAAC,CAAA;AAChC,mBAAS,GAAG,IAAI,SAAS,CAAC,CAAC,EAAE,EAAE,CAAC,CAAA;AAChC,mBAAS,GAAG,IAAI,SAAS,CAAC,CAAC,EAAE,EAAE,CAAC,CAAA;AAEhC,kBAAQ,GAAG,IAAI,SAAS,CAAC,CAAC,CAAC,CAAA;AAC3B,kBAAQ,GAAG,IAAI,SAAS,CAAC,CAAC,CAAC,CAAA;AAC3B,kBAAQ,GAAG,IAAI,SAAS,CAAC,CAAC,CAAC,CAAA;AAC3B,mBAAS,GAAG,IAAI,SAAS,CAAC,EAAE,CAAC,CAAA;AAC7B,mBAAS,GAAG,IAAI,SAAS,CAAC,EAAE,CAAC,CAAA;AAC7B,mBAAS,GAAG,IAAI,SAAS,CAAC,EAAE,CAAC,CAAA;AAE7B,kBAAQ,GAAG,IAAI,SAAS,CAAC,CAAC,GAAG,EAAE,CAAC,CAAA;AAChC,kBAAQ,GAAG,IAAI,SAAS,CAAC,CAAC,GAAG,EAAE,CAAC,CAAA;AAChC,kBAAQ,GAAG,IAAI,SAAS,CAAC,CAAC,GAAG,EAAE,CAAC,CAAA;AAChC,kBAAQ,GAAG,IAAI,SAAS,CAAC,CAAC,GAAG,EAAE,CAAC,CAAA;AAChC,mBAAS,GAAG,IAAI,SAAS,CAAC,EAAE,GAAG,EAAE,CAAC,CAAA;AAClC,mBAAS,GAAG,IAAI,SAAS,CAAC,EAAE,GAAG,EAAE,CAAC,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"http-header.js","sourceRoot":"","sources":["../../src/constructs/http-header.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export * from './project';
|
|
2
|
+
export * from './sms-alert-channel';
|
|
3
|
+
export * from './email-alert-channel';
|
|
4
|
+
export * from './slack-alert-channel';
|
|
5
|
+
export * from './opsgenie-alert-channel';
|
|
6
|
+
export * from './pagerduty-alert-channel';
|
|
7
|
+
export * from './webhook-alert-channel';
|
|
8
|
+
export * from './api-check';
|
|
9
|
+
export * from './browser-check';
|
|
10
|
+
export * from './check-group';
|
|
11
|
+
export * from './alert-channel-subscription';
|
|
12
|
+
export * from './environment-variable';
|
|
13
|
+
export * from './http-header';
|
|
14
|
+
export * from './query-param';
|
|
15
|
+
export * from './frequency';
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./project"), exports);
|
|
18
|
+
__exportStar(require("./sms-alert-channel"), exports);
|
|
19
|
+
__exportStar(require("./email-alert-channel"), exports);
|
|
20
|
+
__exportStar(require("./slack-alert-channel"), exports);
|
|
21
|
+
__exportStar(require("./opsgenie-alert-channel"), exports);
|
|
22
|
+
__exportStar(require("./pagerduty-alert-channel"), exports);
|
|
23
|
+
__exportStar(require("./webhook-alert-channel"), exports);
|
|
24
|
+
__exportStar(require("./api-check"), exports);
|
|
25
|
+
__exportStar(require("./browser-check"), exports);
|
|
26
|
+
__exportStar(require("./check-group"), exports);
|
|
27
|
+
__exportStar(require("./alert-channel-subscription"), exports);
|
|
28
|
+
__exportStar(require("./environment-variable"), exports);
|
|
29
|
+
__exportStar(require("./http-header"), exports);
|
|
30
|
+
__exportStar(require("./query-param"), exports);
|
|
31
|
+
__exportStar(require("./frequency"), exports);
|
|
32
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/constructs/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,4CAAyB;AACzB,sDAAmC;AACnC,wDAAqC;AACrC,wDAAqC;AACrC,2DAAwC;AACxC,4DAAyC;AACzC,0DAAuC;AACvC,8CAA2B;AAC3B,kDAA+B;AAC/B,gDAA6B;AAC7B,+DAA4C;AAC5C,yDAAsC;AACtC,gDAA6B;AAC7B,gDAA6B;AAC7B,8CAA2B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"key-value-pair.js","sourceRoot":"","sources":["../../src/constructs/key-value-pair.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { AlertChannel, AlertChannelProps } from './alert-channel';
|
|
2
|
+
export type OpsgeniePriority = 'P1' | 'P2' | 'P3' | 'P4' | 'P5';
|
|
3
|
+
export type OpsgenieRegion = 'EU' | 'US';
|
|
4
|
+
export interface OpsgenieAlertChannelProps extends AlertChannelProps {
|
|
5
|
+
/**
|
|
6
|
+
* Friendly name to recognise the integration.
|
|
7
|
+
*/
|
|
8
|
+
name: string;
|
|
9
|
+
/**
|
|
10
|
+
* An API key for your Opsgenie account. See our
|
|
11
|
+
* {@link https://www.checklyhq.com/docs/integrations/opsgenie/ docs} on where to create this API key
|
|
12
|
+
*/
|
|
13
|
+
apiKey: string;
|
|
14
|
+
/**
|
|
15
|
+
* Configure the Opsgenie location, either `EU` or `US`.
|
|
16
|
+
*/
|
|
17
|
+
region: OpsgenieRegion;
|
|
18
|
+
/**
|
|
19
|
+
* Configure the severity level, `P1` to `P5`.
|
|
20
|
+
*/
|
|
21
|
+
priority: OpsgeniePriority;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Creates an Opsgenie Alert Channel
|
|
25
|
+
*
|
|
26
|
+
* @remarks
|
|
27
|
+
*
|
|
28
|
+
* This class make use of the Alert Channel endpoints.
|
|
29
|
+
*/
|
|
30
|
+
export declare class OpsgenieAlertChannel extends AlertChannel {
|
|
31
|
+
name: string;
|
|
32
|
+
apiKey: string;
|
|
33
|
+
region: OpsgenieRegion;
|
|
34
|
+
priority: OpsgeniePriority;
|
|
35
|
+
/**
|
|
36
|
+
* Constructs the Opsgenie Alert Channel instance
|
|
37
|
+
*
|
|
38
|
+
* @param logicalId unique project-scoped resource name identification
|
|
39
|
+
* @param props Opsgenie alert channel configuration properties
|
|
40
|
+
*
|
|
41
|
+
* {@link https://checklyhq.com/docs/cli/constructs/#opsgeniealertchannel Read more in the docs}
|
|
42
|
+
*/
|
|
43
|
+
constructor(logicalId: string, props: OpsgenieAlertChannelProps);
|
|
44
|
+
synthesize(): any;
|
|
45
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.OpsgenieAlertChannel = void 0;
|
|
4
|
+
const alert_channel_1 = require("./alert-channel");
|
|
5
|
+
const project_1 = require("./project");
|
|
6
|
+
/**
|
|
7
|
+
* Creates an Opsgenie Alert Channel
|
|
8
|
+
*
|
|
9
|
+
* @remarks
|
|
10
|
+
*
|
|
11
|
+
* This class make use of the Alert Channel endpoints.
|
|
12
|
+
*/
|
|
13
|
+
class OpsgenieAlertChannel extends alert_channel_1.AlertChannel {
|
|
14
|
+
/**
|
|
15
|
+
* Constructs the Opsgenie Alert Channel instance
|
|
16
|
+
*
|
|
17
|
+
* @param logicalId unique project-scoped resource name identification
|
|
18
|
+
* @param props Opsgenie alert channel configuration properties
|
|
19
|
+
*
|
|
20
|
+
* {@link https://checklyhq.com/docs/cli/constructs/#opsgeniealertchannel Read more in the docs}
|
|
21
|
+
*/
|
|
22
|
+
constructor(logicalId, props) {
|
|
23
|
+
super(logicalId, props);
|
|
24
|
+
this.name = props.name;
|
|
25
|
+
this.apiKey = props.apiKey;
|
|
26
|
+
this.region = props.region;
|
|
27
|
+
this.priority = props.priority;
|
|
28
|
+
project_1.Session.registerConstruct(this);
|
|
29
|
+
}
|
|
30
|
+
synthesize() {
|
|
31
|
+
return {
|
|
32
|
+
...super.synthesize(),
|
|
33
|
+
type: 'OPSGENIE',
|
|
34
|
+
config: {
|
|
35
|
+
name: this.name,
|
|
36
|
+
apiKey: this.apiKey,
|
|
37
|
+
region: this.region,
|
|
38
|
+
priority: this.priority,
|
|
39
|
+
},
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
exports.OpsgenieAlertChannel = OpsgenieAlertChannel;
|
|
44
|
+
//# sourceMappingURL=opsgenie-alert-channel.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"opsgenie-alert-channel.js","sourceRoot":"","sources":["../../src/constructs/opsgenie-alert-channel.ts"],"names":[],"mappings":";;;AAAA,mDAAiE;AACjE,uCAAmC;AA0BnC;;;;;;GAMG;AACH,MAAa,oBAAqB,SAAQ,4BAAY;IAKpD;;;;;;;OAOG;IACH,YAAa,SAAiB,EAAE,KAAgC;QAC9D,KAAK,CAAC,SAAS,EAAE,KAAK,CAAC,CAAA;QACvB,IAAI,CAAC,IAAI,GAAG,KAAK,CAAC,IAAI,CAAA;QACtB,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC,MAAM,CAAA;QAC1B,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC,MAAM,CAAA;QAC1B,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC,QAAQ,CAAA;QAC9B,iBAAO,CAAC,iBAAiB,CAAC,IAAI,CAAC,CAAA;IACjC,CAAC;IAED,UAAU;QACR,OAAO;YACL,GAAG,KAAK,CAAC,UAAU,EAAE;YACrB,IAAI,EAAE,UAAU;YAChB,MAAM,EAAE;gBACN,IAAI,EAAE,IAAI,CAAC,IAAI;gBACf,MAAM,EAAE,IAAI,CAAC,MAAM;gBACnB,MAAM,EAAE,IAAI,CAAC,MAAM;gBACnB,QAAQ,EAAE,IAAI,CAAC,QAAQ;aACxB;SACF,CAAA;IACH,CAAC;CACF;AAlCD,oDAkCC"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { AlertChannel, AlertChannelProps } from './alert-channel';
|
|
2
|
+
export interface PagerdutyAlertChannelProps extends AlertChannelProps {
|
|
3
|
+
/**
|
|
4
|
+
* The name of your Pagerduty account.
|
|
5
|
+
*/
|
|
6
|
+
account?: string;
|
|
7
|
+
/**
|
|
8
|
+
* The name of your service defined in Pagerduty under which the alerts should be nested.
|
|
9
|
+
*/
|
|
10
|
+
serviceName?: string;
|
|
11
|
+
/**
|
|
12
|
+
* The API key created by installing the Checkly integration in Pagerduty. You
|
|
13
|
+
* can {@link https://app.checklyhq.com/alerts/settings/channels/new/pagerduty install the Pagerduty alert channel}
|
|
14
|
+
* first from our UI to grab the `serviceKey`
|
|
15
|
+
*/
|
|
16
|
+
serviceKey: string;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Creates an Pagerduty Alert Channel
|
|
20
|
+
*
|
|
21
|
+
* @remarks
|
|
22
|
+
*
|
|
23
|
+
* This class make use of the Alert Channel endpoints.
|
|
24
|
+
*/
|
|
25
|
+
export declare class PagerdutyAlertChannel extends AlertChannel {
|
|
26
|
+
account?: string;
|
|
27
|
+
serviceName?: string;
|
|
28
|
+
serviceKey: string;
|
|
29
|
+
/**
|
|
30
|
+
* Constructs the Pagerduty Alert Channel instance
|
|
31
|
+
*
|
|
32
|
+
* @param logicalId unique project-scoped resource name identification
|
|
33
|
+
* @param props Pagerduty alert channel configuration properties
|
|
34
|
+
*
|
|
35
|
+
* {@link https://checklyhq.com/docs/cli/constructs/#pagerdutyalertchannel Read more in the docs}
|
|
36
|
+
*/
|
|
37
|
+
constructor(logicalId: string, props: PagerdutyAlertChannelProps);
|
|
38
|
+
synthesize(): any;
|
|
39
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PagerdutyAlertChannel = void 0;
|
|
4
|
+
const alert_channel_1 = require("./alert-channel");
|
|
5
|
+
const project_1 = require("./project");
|
|
6
|
+
/**
|
|
7
|
+
* Creates an Pagerduty Alert Channel
|
|
8
|
+
*
|
|
9
|
+
* @remarks
|
|
10
|
+
*
|
|
11
|
+
* This class make use of the Alert Channel endpoints.
|
|
12
|
+
*/
|
|
13
|
+
class PagerdutyAlertChannel extends alert_channel_1.AlertChannel {
|
|
14
|
+
/**
|
|
15
|
+
* Constructs the Pagerduty Alert Channel instance
|
|
16
|
+
*
|
|
17
|
+
* @param logicalId unique project-scoped resource name identification
|
|
18
|
+
* @param props Pagerduty alert channel configuration properties
|
|
19
|
+
*
|
|
20
|
+
* {@link https://checklyhq.com/docs/cli/constructs/#pagerdutyalertchannel Read more in the docs}
|
|
21
|
+
*/
|
|
22
|
+
constructor(logicalId, props) {
|
|
23
|
+
super(logicalId, props);
|
|
24
|
+
this.account = props.account;
|
|
25
|
+
this.serviceName = props.serviceName;
|
|
26
|
+
this.serviceKey = props.serviceKey;
|
|
27
|
+
project_1.Session.registerConstruct(this);
|
|
28
|
+
}
|
|
29
|
+
synthesize() {
|
|
30
|
+
return {
|
|
31
|
+
...super.synthesize(),
|
|
32
|
+
type: 'PAGERDUTY',
|
|
33
|
+
config: {
|
|
34
|
+
account: this.account,
|
|
35
|
+
serviceName: this.serviceName,
|
|
36
|
+
serviceKey: this.serviceKey,
|
|
37
|
+
},
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
exports.PagerdutyAlertChannel = PagerdutyAlertChannel;
|
|
42
|
+
//# sourceMappingURL=pagerduty-alert-channel.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pagerduty-alert-channel.js","sourceRoot":"","sources":["../../src/constructs/pagerduty-alert-channel.ts"],"names":[],"mappings":";;;AAAA,mDAAiE;AACjE,uCAAmC;AAmBnC;;;;;;GAMG;AACH,MAAa,qBAAsB,SAAQ,4BAAY;IAIrD;;;;;;;OAOG;IACH,YAAa,SAAiB,EAAE,KAAiC;QAC/D,KAAK,CAAC,SAAS,EAAE,KAAK,CAAC,CAAA;QACvB,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC,OAAO,CAAA;QAC5B,IAAI,CAAC,WAAW,GAAG,KAAK,CAAC,WAAW,CAAA;QACpC,IAAI,CAAC,UAAU,GAAG,KAAK,CAAC,UAAU,CAAA;QAClC,iBAAO,CAAC,iBAAiB,CAAC,IAAI,CAAC,CAAA;IACjC,CAAC;IAED,UAAU;QACR,OAAO;YACL,GAAG,KAAK,CAAC,UAAU,EAAE;YACrB,IAAI,EAAE,WAAW;YACjB,MAAM,EAAE;gBACN,OAAO,EAAE,IAAI,CAAC,OAAO;gBACrB,WAAW,EAAE,IAAI,CAAC,WAAW;gBAC7B,UAAU,EAAE,IAAI,CAAC,UAAU;aAC5B;SACF,CAAA;IACH,CAAC;CACF;AA/BD,sDA+BC"}
|