-
Notifications
You must be signed in to change notification settings - Fork 21
Update checkly rules and TS Docs reference docs #1179
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 2 commits
40d0bae
ad07889
bdae244
8e42823
8544b9e
16a7584
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||
|---|---|---|---|---|---|---|---|---|
|
|
@@ -136,66 +136,9 @@ export interface ApiCheckProps extends RuntimeCheckProps { | |||||||
| * }) | ||||||||
| * ``` | ||||||||
| * | ||||||||
| * @see {@link https://www.checklyhq.com/docs/cli/constructs-reference/#apicheck | ApiCheck API Reference} | ||||||||
| * @see {@link https://www.checklyhq.com/docs/monitoring/api-checks/ | API Checks Documentation} | ||||||||
| */ | ||||||||
| /** | ||||||||
|
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This entire section was a duplicate of the above. |
||||||||
| * Creates an API Check to monitor HTTP endpoints and APIs. | ||||||||
| * | ||||||||
| * API checks allow you to monitor REST APIs, GraphQL endpoints, and any HTTP-based service. | ||||||||
| * You can validate response status codes, response times, headers, and response body content. | ||||||||
| * | ||||||||
| * @example | ||||||||
| * ```typescript | ||||||||
| * // Basic API check | ||||||||
| * new ApiCheck('hello-api', { | ||||||||
| * name: 'Hello API', | ||||||||
| * request: { | ||||||||
| * method: 'GET', | ||||||||
| * url: 'https://api.example.com/hello', | ||||||||
| * assertions: [ | ||||||||
| * AssertionBuilder.statusCode().equals(200) | ||||||||
| * ] | ||||||||
| * } | ||||||||
| * }) | ||||||||
| * | ||||||||
| * // Advanced API check with POST request | ||||||||
| * new ApiCheck('user-api', { | ||||||||
| * name: 'User API Check', | ||||||||
| * frequency: Frequency.EVERY_5M, | ||||||||
| * locations: ['us-east-1', 'eu-west-1'], | ||||||||
| * request: { | ||||||||
| * method: 'POST', | ||||||||
| * url: 'https://api.example.com/users', | ||||||||
| * headers: [{ key: 'Content-Type', value: 'application/json' }], | ||||||||
| * body: JSON.stringify({ name: 'test-user' }), | ||||||||
| * bodyType: 'JSON', | ||||||||
| * assertions: [ | ||||||||
| * AssertionBuilder.statusCode().equals(201), | ||||||||
| * AssertionBuilder.jsonBody('$.id').isNotNull(), | ||||||||
| * AssertionBuilder.responseTime().lessThan(1000) | ||||||||
| * ] | ||||||||
| * }, | ||||||||
| * maxResponseTime: 5000, | ||||||||
| * degradedResponseTime: 2000 | ||||||||
| * }) | ||||||||
| * | ||||||||
| * // Error validation check (shouldFail required for error status checks) | ||||||||
| * new ApiCheck('not-found-check', { | ||||||||
| * name: 'Not Found Check', | ||||||||
| * shouldFail: true, | ||||||||
| * request: { | ||||||||
| * method: 'GET', | ||||||||
| * url: 'https://api.example.com/nonexistent', | ||||||||
| * assertions: [ | ||||||||
| * AssertionBuilder.statusCode().equals(404) | ||||||||
| * ] | ||||||||
| * } | ||||||||
| * }) | ||||||||
| * ``` | ||||||||
| * | ||||||||
| * @see {@link https://www.checklyhq.com/docs/cli/constructs-reference/#apicheck | ApiCheck API Reference} | ||||||||
| * @see {@link https://www.checklyhq.com/docs/monitoring/api-checks/ | API Checks Documentation} | ||||||||
| * @see {@link https://www.checklyhq.com/docs/constructs/api-check/ | ApiCheck API Reference} | ||||||||
| * @see {@link https://www.checklyhq.com/docs/detect/synthetic-monitoring/api-checks/overview/ | ||||||||
| * API Checks Documentation} | ||||||||
|
||||||||
| * @see {@link https://www.checklyhq.com/docs/detect/synthetic-monitoring/api-checks/overview/ | |
| * API Checks Documentation} | |
| * @see {@link https://www.checklyhq.com/docs/detect/synthetic-monitoring/api-checks/overview/ API Checks Documentation} |
And then it looks like we'd have to add ignoreComments: true to aslant.config.mjs:
'max-len': ['error',
{
code: 120,
ignoreTemplateLiterals: true,
ignoreStrings: true,
ignoreComments: true,
},
],
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sorccu Here's the thing, I looked into exactly this. I had them on one line, but ESLint was complaining. Then I changed ignoreComments, but wasn't sure if that's "a bit too much of a change"? And then I saw this "multi-line @link pattern" in other places to I adjusted. :D
I'll change the ESLint config and fix these multi lines.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we have multi-line @links then they're all likely broken
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -72,8 +72,9 @@ export interface BrowserCheckProps extends RuntimeCheckProps { | |
| * }) | ||
| * ``` | ||
| * | ||
| * @see {@link https://www.checklyhq.com/docs/cli/constructs-reference/#browsercheck | BrowserCheck API Reference} | ||
| * @see {@link https://www.checklyhq.com/docs/monitoring/browser-checks/ | Browser Checks Documentation} | ||
| * @see {@link https://www.checklyhq.com/docs/constructs/browser-check/ | BrowserCheck API Reference} | ||
| * @see {@link https://www.checklyhq.com/docs/detect/synthetic-monitoring/browser-checks/overview/ | ||
| * Browser Checks Documentation} | ||
|
||
| * @see {@link https://playwright.dev/ | Playwright Documentation} | ||
| */ | ||
| export class BrowserCheck extends RuntimeCheck { | ||
|
|
@@ -86,7 +87,7 @@ export class BrowserCheck extends RuntimeCheck { | |
| * | ||
| * @param logicalId unique project-scoped resource name identification | ||
| * @param props check configuration properties | ||
| * {@link https://checklyhq.com/docs/cli/constructs-reference/#browsercheck Read more in the docs} | ||
| * {@link https://www.checklyhq.com/docs/constructs/browser-check/ Read more in the docs} | ||
| */ | ||
| constructor (logicalId: string, props: BrowserCheckProps) { | ||
| super(logicalId, props) | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -93,7 +93,7 @@ export interface CheckProps { | |
| * An array of one or more data center locations where to run this check. | ||
| * | ||
| * @example ['us-east-1', 'eu-west-1', 'ap-southeast-1'] | ||
| * @see {@link https://www.checklyhq.com/docs/monitoring/global-locations/ | Global Locations} | ||
| * @see {@link https://www.checklyhq.com/docs/concepts/locations/ | Global Locations} | ||
| */ | ||
| locations?: Array<keyof Region> | ||
|
|
||
|
|
@@ -174,7 +174,7 @@ export interface CheckProps { | |
| * // Reference the channels in your check | ||
| * alertChannels: [emailChannel, slackChannel] | ||
| * ``` | ||
| * @see {@link https://www.checklyhq.com/docs/alerting-and-retries/alert-channels/ | Alert Channels} | ||
| * @see {@link https://www.checklyhq.com/docs/communicate/alerts/channels/ | Alert Channels} | ||
| */ | ||
| alertChannels?: Array<AlertChannel | AlertChannelRef> | ||
|
|
||
|
|
@@ -218,15 +218,16 @@ export interface CheckProps { | |
| * Determines whether the check should run on all selected locations in parallel or round-robin. | ||
| * | ||
| * @defaultValue false (round-robin) | ||
| * @see {@link https://www.checklyhq.com/docs/monitoring/global-locations/ | Scheduling Strategies} | ||
| * @see {@link https://www.checklyhq.com/docs/concepts/scheduling/ | Scheduling Strategies} | ||
| */ | ||
| runParallel?: boolean | ||
|
|
||
| /** | ||
| * Determines whether the check should create and resolve an incident based on its alert configuration. | ||
| * Useful for status page automation. | ||
| * | ||
| * @see {@link https://www.checklyhq.com/docs/status-pages/incidents/#incident-automation | Incident Automation} | ||
| * @see {@link https://www.checklyhq.com/docs/communicate/status-pages/incidents/#incident-automation | ||
| * Incident Automation} | ||
|
||
| */ | ||
| triggerIncident?: IncidentTrigger | ||
| } | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -45,7 +45,8 @@ export interface DashboardProps { | |
| * This is required if 'customUrl' is not specified. | ||
| * | ||
| * @example 'status.example.com' | ||
| * @see {@link https://www.checklyhq.com/docs/dashboards/custom-domains/ | Custom Domain Setup} | ||
| * @see {@link https://www.checklyhq.com/docs/communicate/dashboards/configuration/#custom-domain | ||
| * Custom Domain Setup} | ||
|
||
| */ | ||
| customDomain?: string | ||
|
|
||
|
|
@@ -144,7 +145,7 @@ export interface DashboardProps { | |
| * | ||
| * @defaultValue false | ||
| * @remarks Only paid accounts can enable this feature | ||
| * @see {@link https://www.checklyhq.com/docs/dashboards/incidents/ | Dashboard Incidents} | ||
| * @see {@link https://www.checklyhq.com/docs/communicate/dashboards/incidents/ | Dashboard Incidents} | ||
| */ | ||
| enableIncidents?: boolean | ||
|
|
||
|
|
@@ -244,7 +245,7 @@ export class Dashboard extends Construct { | |
| * @param logicalId unique project-scoped resource name identification | ||
| * @param props dashboard configuration properties | ||
| * | ||
| * {@link https://checklyhq.com/docs/cli/constructs-reference/#dashboard Read more in the docs} | ||
| * {@link https://www.checklyhq.com/docs/constructs/dashboard/ Read more in the docs} | ||
| */ | ||
| constructor (logicalId: string, props: DashboardProps) { | ||
| super(Dashboard.__checklyType, logicalId) | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -12,7 +12,8 @@ export interface OpsgenieAlertChannelProps extends AlertChannelProps { | |
| name: string | ||
| /** | ||
| * An API key for your Opsgenie account. See our | ||
| * {@link https://www.checklyhq.com/docs/integrations/opsgenie/ docs} on where to create this API key | ||
| * {@link https://www.checklyhq.com/docs/integrations/incident-management/opsgenie/ | ||
| * docs on where to create this API key} | ||
|
||
| */ | ||
| apiKey: string | ||
| /** | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -28,8 +28,8 @@ export class PhoneCallAlertChannel extends AlertChannel { | |
| * @param logicalId unique project-scoped resource name identification | ||
| * @param props Phone Call alert channel configuration properties | ||
| * | ||
| * {@link https://checklyhq.com/docs/cli/constructs-reference/#phonecallalertchannel Read more in the docs} | ||
| * {@link https://checklyhq.com/docs/alerting/phone-calls/#supported-countries-and-regions | ||
| * {@link https://www.checklyhq.com/docs/constructs/phone-call-alert-channel/ Read more in the docs} | ||
| * {@link https://www.checklyhq.com/docs/integrations/alerts/phone-calls/#supported-countries-and-regions | ||
| * List of supported countries} | ||
|
||
| */ | ||
| constructor (logicalId: string, props: PhoneCallAlertChannelProps) { | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -119,8 +119,9 @@ export interface PlaywrightCheckProps extends Omit<RuntimeCheckProps, 'retryStra | |
| * }) | ||
| * ``` | ||
| * | ||
| * @see {@link https://www.checklyhq.com/docs/cli/constructs-reference/#playwrightcheck | PlaywrightCheck API Reference} | ||
| * @see {@link https://www.checklyhq.com/docs/playwright-checks/ | Playwright Checks Documentation} | ||
| * @see {@link https://www.checklyhq.com/docs/constructs/playwright-check/ | PlaywrightCheck API Reference} | ||
| * @see {@link https://www.checklyhq.com/docs/detect/synthetic-monitoring/playwright-checks/overview/ | ||
| * Playwright Checks Documentation} | ||
|
||
| * @see {@link https://playwright.dev/ | Playwright Documentation} | ||
| */ | ||
| export class PlaywrightCheck extends RuntimeCheck { | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's no general
alertChannelconstruct docs page anymore.