import { IncidentioCore } from "../core.js"; import { RequestOptions } from "../lib/sdks.js"; import * as components from "../models/components/index.js"; import { ConnectionError, InvalidRequestError, RequestAbortedError, RequestTimeoutError, UnexpectedClientError } from "../models/errors/httpclienterrors.js"; import { SDKError } from "../models/errors/sdkerror.js"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; import * as operations from "../models/operations/index.js"; import { Result } from "../types/fp.js"; /** * List Incidents V2 * * @remarks * List all incidents for an organisation. * * This endpoint supports a number of filters, which can help find incidents matching certain * criteria. * * Filters are provided as query parameters, but due to the dynamic nature of what you can * query by (different accounts have different custom fields, statuses, etc) they are more * complex than most. * * To help, here are some exemplar curl requests with a human description of what they search * for. * * Note that: * - Filters may be used together, and the result will be incidents that match all filters. * - IDs are normally in UUID format, but have been replaced with shorter strings to improve * readability. * - All query parameters must be URI encoded. * * ### By status * * With status of id=ABC, find all incidents that are set to that status: * * curl --get 'https://api.incident.io/v2/incidents' \ * --data 'status[one_of]=ABC' * * Or all incidents that are not set to status with id=ABC: * * curl --get 'https://api.incident.io/v2/incidents' \ * --data 'status[not_in]=ABC' * * ### By created_at or updated_at * * Find all incidents that follow specified date parameters for created_at and updated_at fields. * Possible values are "gte" (greater than or equal to) and "lte" (less than or equal to). The * following example finds all incidents created before or on 2021-01-02T00:00:00Z: * * curl --get 'https://api.incident.io/v2/incidents' \ * --data 'created_at[lte]=2021-01-02' * * ### By status category * * Find all incidents that are in a status category. Possible values are "triage", * "declined", "merged", "canceled", "live", "learning" and "closed": * * curl --get 'https://api.incident.io/v2/incidents' \ * --data 'status_category[one_of]=live' * * Or all incidents that are not in a status category: * * curl --get 'https://api.incident.io/v2/incidents' \ * --data 'status_category[not_in]=live' * * ### By severity * * With severity of id=ABC, find all incidents that are set to that severity: * * curl --get 'https://api.incident.io/v2/incidents' \ * --data 'severity[one_of]=ABC' * * Or all incidents where severity rank is greater-than-or-equal-to the rank of severity * id=ABC: * * curl --get 'https://api.incident.io/v2/incidents' \ * --data 'severity[gte]=ABC' * * Or all incidents where severity rank is less-than-or-equal-to the rank of severity id=ABC: * * curl --get 'https://api.incident.io/v2/incidents' \ * --data 'severity[lte]=ABC' * * ### By incident type * * With incident type of id=ABC, find all incidents that are of that type: * * curl --get 'https://api.incident.io/v2/incidents' \ * --data 'incident_type[one_of]=ABC' * * Or all incidents not of that type: * * curl --get 'https://api.incident.io/v2/incidents' \ * --data 'incident_type[not_in]=ABC' * * ### By incident mode * * By default, we return standard and retrospective incidents. This means that test and * tutorial incidents are filtered out. To override this behaviour, you can use the * mode filter to specify which modes you want to get. * * To find incidents of all modes: * * curl --get 'https://api.incident.io/v2/incidents' \ * --data 'mode[one_of]=standard&mode[one_of]=retrospective&mode[one_of]=test&mode[one_of]=tutorial' * * To find just test incidents: * * curl --get 'https://api.incident.io/v2/incidents' \ * --data 'mode[one_of]=test' * * ### By incident role * * Roles and custom fields have another nested layer in the query parameter, to account for * operations against any of the roles or custom fields created in the account. * * With incident role id=ABC, find all incidents where that role is unset: * * curl --get 'https://api.incident.io/v2/incidents' \ * --data 'incident_role[ABC][is_blank]=true' * * Or where the role has been set: * * curl --get 'https://api.incident.io/v2/incidents' \ * --data 'incident_role[ABC][is_blank]=false' * * ### By option custom fields * * With an option custom field id=ABC, all incidents that have field ABC set to the custom * field option of id=XYZ: * * curl \ * --get 'https://api.incident.io/v2/incidents' \ * --data 'custom_field[ABC][one_of]=XYZ' * * Or all incidents that do not have custom field id=ABC set to option id=XYZ: * * curl \ * --get 'https://api.incident.io/v2/incidents' \ * --data 'custom_field[ABC][not_in]=XYZ' */ export declare function incidentsList(client$: IncidentioCore, request: operations.IncidentsV2NumberListRequest, options?: RequestOptions): Promise>; //# sourceMappingURL=incidentsList.d.ts.map