/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod"; import { remap as remap$ } from "../../lib/primitives.js"; export type IncidentsV2NumberListRequest = { /** * number of records to return */ pageSize?: number | undefined; /** * An incident's ID. This endpoint will return a list of incidents after this ID in relation to the API response order. */ after?: string | undefined; /** * Filter on incident status. The accepted operators are 'one_of', or 'not_in'. */ status?: { [k: string]: Array } | undefined; /** * Filter on the category of the incidents status. The accepted operators are 'one_of', or 'not_in'. If this is not provided, this value defaults to `{"one_of": ["triage", "active", "post-incident", "closed"] }`, meaning that canceled, declined and merged incidents are not included. */ statusCategory?: { [k: string]: Array } | undefined; /** * Filter on incident created at timestamp. The accepted operators are 'gte', 'lte' and 'date_range'. */ createdAt?: { [k: string]: Array } | undefined; /** * Filter on incident updated at timestamp. The accepted operators are 'gte', 'lte' and 'date_range'. */ updatedAt?: { [k: string]: Array } | undefined; /** * Filter on incident severity. The accepted operators are 'one_of', 'not_in', 'gte', 'lte'. */ severity?: { [k: string]: Array } | undefined; /** * Filter on incident type. The accepted operators are 'one_of, or 'not_in'. */ incidentType?: { [k: string]: Array } | undefined; /** * Filter on an incident role. Role ID should be sent, followed by the operator and values. The accepted operators are 'one_of', 'is_blank'. */ incidentRole?: { [k: string]: { [k: string]: Array } } | undefined; /** * Filter on an incident custom field. Custom field ID should be sent, followed by the operator and values. Accepted operator will depend on the custom field type. */ customField?: { [k: string]: { [k: string]: Array } } | undefined; /** * Filter on incident mode. The accepted operator is 'one_of'. If this is not provided, this value defaults to `{"one_of": ["standard", "retrospective"] }`, meaning that test and tutorial incidents are not included. */ mode?: { [k: string]: Array } | undefined; }; /** @internal */ export const IncidentsV2NumberListRequest$inboundSchema: z.ZodType< IncidentsV2NumberListRequest, z.ZodTypeDef, unknown > = z.object({ page_size: z.number().int().default(25), after: z.string().optional(), status: z.record(z.array(z.string())).optional(), status_category: z.record(z.array(z.string())).optional(), created_at: z.record(z.array(z.string())).optional(), updated_at: z.record(z.array(z.string())).optional(), severity: z.record(z.array(z.string())).optional(), incident_type: z.record(z.array(z.string())).optional(), incident_role: z.record(z.record(z.array(z.string()))).optional(), custom_field: z.record(z.record(z.array(z.string()))).optional(), mode: z.record(z.array(z.string())).optional(), }).transform((v) => { return remap$(v, { "page_size": "pageSize", "status_category": "statusCategory", "created_at": "createdAt", "updated_at": "updatedAt", "incident_type": "incidentType", "incident_role": "incidentRole", "custom_field": "customField", }); }); /** @internal */ export type IncidentsV2NumberListRequest$Outbound = { page_size: number; after?: string | undefined; status?: { [k: string]: Array } | undefined; status_category?: { [k: string]: Array } | undefined; created_at?: { [k: string]: Array } | undefined; updated_at?: { [k: string]: Array } | undefined; severity?: { [k: string]: Array } | undefined; incident_type?: { [k: string]: Array } | undefined; incident_role?: { [k: string]: { [k: string]: Array } } | undefined; custom_field?: { [k: string]: { [k: string]: Array } } | undefined; mode?: { [k: string]: Array } | undefined; }; /** @internal */ export const IncidentsV2NumberListRequest$outboundSchema: z.ZodType< IncidentsV2NumberListRequest$Outbound, z.ZodTypeDef, IncidentsV2NumberListRequest > = z.object({ pageSize: z.number().int().default(25), after: z.string().optional(), status: z.record(z.array(z.string())).optional(), statusCategory: z.record(z.array(z.string())).optional(), createdAt: z.record(z.array(z.string())).optional(), updatedAt: z.record(z.array(z.string())).optional(), severity: z.record(z.array(z.string())).optional(), incidentType: z.record(z.array(z.string())).optional(), incidentRole: z.record(z.record(z.array(z.string()))).optional(), customField: z.record(z.record(z.array(z.string()))).optional(), mode: z.record(z.array(z.string())).optional(), }).transform((v) => { return remap$(v, { pageSize: "page_size", statusCategory: "status_category", createdAt: "created_at", updatedAt: "updated_at", incidentType: "incident_type", incidentRole: "incident_role", customField: "custom_field", }); }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace IncidentsV2NumberListRequest$ { /** @deprecated use `IncidentsV2NumberListRequest$inboundSchema` instead. */ export const inboundSchema = IncidentsV2NumberListRequest$inboundSchema; /** @deprecated use `IncidentsV2NumberListRequest$outboundSchema` instead. */ export const outboundSchema = IncidentsV2NumberListRequest$outboundSchema; /** @deprecated use `IncidentsV2NumberListRequest$Outbound` instead. */ export type Outbound = IncidentsV2NumberListRequest$Outbound; }