/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod/v4-mini"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import * as types from "../../types/primitives.js"; import { AlertEntityType, AlertEntityType$inboundSchema, } from "./alert-entity-type.js"; import { AlertInfo, AlertInfo$inboundSchema } from "./alert-info.js"; import { AlertState, AlertState$inboundSchema } from "./alert-state.js"; import { AlertType, AlertType$inboundSchema } from "./alert-type.js"; import { CustomerResponse, CustomerResponse$inboundSchema, } from "./customer-response.js"; import { FeatureResponse, FeatureResponse$inboundSchema, } from "./feature-response.js"; import { SDKValidationError } from "./sdk-validation-error.js"; import { WalletResponse, WalletResponse$inboundSchema, } from "./wallet-response.js"; export type AlertLogResponse = { alertInfo?: AlertInfo | undefined; alertStatus?: AlertState | undefined; alertType?: AlertType | undefined; createdAt?: Date | undefined; createdBy?: string | undefined; /** * Customer response object containing all customer information */ customer?: CustomerResponse | undefined; customerId?: string | undefined; entityId?: string | undefined; entityType?: AlertEntityType | undefined; environmentId?: string | undefined; feature?: FeatureResponse | undefined; id?: string | undefined; parentEntityId?: string | undefined; parentEntityType?: string | undefined; status?: string | undefined; tenantId?: string | undefined; updatedAt?: Date | undefined; updatedBy?: string | undefined; wallet?: WalletResponse | undefined; }; /** @internal */ export const AlertLogResponse$inboundSchema: z.ZodMiniType< AlertLogResponse, unknown > = z.pipe( z.object({ alert_info: types.optional(AlertInfo$inboundSchema), alert_status: types.optional(AlertState$inboundSchema), alert_type: types.optional(AlertType$inboundSchema), created_at: types.optional(types.date()), created_by: types.optional(types.string()), customer: types.optional(CustomerResponse$inboundSchema), customer_id: types.optional(types.string()), entity_id: types.optional(types.string()), entity_type: types.optional(AlertEntityType$inboundSchema), environment_id: types.optional(types.string()), feature: types.optional(FeatureResponse$inboundSchema), id: types.optional(types.string()), parent_entity_id: types.optional(types.string()), parent_entity_type: types.optional(types.string()), status: types.optional(types.string()), tenant_id: types.optional(types.string()), updated_at: types.optional(types.date()), updated_by: types.optional(types.string()), wallet: types.optional(WalletResponse$inboundSchema), }), z.transform((v) => { return remap$(v, { "alert_info": "alertInfo", "alert_status": "alertStatus", "alert_type": "alertType", "created_at": "createdAt", "created_by": "createdBy", "customer_id": "customerId", "entity_id": "entityId", "entity_type": "entityType", "environment_id": "environmentId", "parent_entity_id": "parentEntityId", "parent_entity_type": "parentEntityType", "tenant_id": "tenantId", "updated_at": "updatedAt", "updated_by": "updatedBy", }); }), ); export function alertLogResponseFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => AlertLogResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'AlertLogResponse' from JSON`, ); }