@vercel/sdk
Version:
<p align="center"> <a href="https://vercel.com"> <img src="https://assets.vercel.com/image/upload/v1588805858/repositories/vercel/logo.png" height="96"> <h3 align="center">Vercel</h3> </a> <p align="center">Develop. Preview. Ship.</p> </p>
48 lines • 2.06 kB
JavaScript
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
import * as z from "zod/v3";
import { remap as remap$ } from "../lib/primitives.js";
import { safeParse } from "../lib/schemas.js";
import * as types from "../types/primitives.js";
/** @internal */
export const GetSecurityFirewallEventsRequest$outboundSchema = z.object({
projectId: z.string(),
startTimestamp: z.number().optional(),
endTimestamp: z.number().optional(),
hosts: z.string().optional(),
teamId: z.string().optional(),
slug: z.string().optional(),
});
export function getSecurityFirewallEventsRequestToJSON(getSecurityFirewallEventsRequest) {
return JSON.stringify(GetSecurityFirewallEventsRequest$outboundSchema.parse(getSecurityFirewallEventsRequest));
}
/** @internal */
export const GetSecurityFirewallEventsActions$inboundSchema = z.object({
ruleName: types.nullable(types.string()),
startTime: types.string(),
endTime: types.string(),
isActive: types.boolean(),
action_type: types.string(),
action: types.string(),
ruleId: types.nullable(types.string()),
host: types.string(),
public_ip: types.string(),
count: types.number(),
}).transform((v) => {
return remap$(v, {
"action_type": "actionType",
"public_ip": "publicIp",
});
});
export function getSecurityFirewallEventsActionsFromJSON(jsonString) {
return safeParse(jsonString, (x) => GetSecurityFirewallEventsActions$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetSecurityFirewallEventsActions' from JSON`);
}
/** @internal */
export const GetSecurityFirewallEventsResponseBody$inboundSchema = z.object({
actions: z.array(z.lazy(() => GetSecurityFirewallEventsActions$inboundSchema)),
});
export function getSecurityFirewallEventsResponseBodyFromJSON(jsonString) {
return safeParse(jsonString, (x) => GetSecurityFirewallEventsResponseBody$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetSecurityFirewallEventsResponseBody' from JSON`);
}
//# sourceMappingURL=getsecurityfirewalleventsop.js.map