/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod/v4-mini"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import * as types from "../../types/primitives.js"; import { SDKValidationError } from "../errors/sdk-validation-error.js"; export type RemoveWordlistWordsRequest = { /** * ID of the wordlist to remove words from */ id: string; /** * Array of words to remove from the wordlist */ words: Array; /** * The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. */ projectId?: string | undefined; }; /** * Words successfully removed from wordlist */ export type RemoveWordlistWordsResponse = { /** * Number of words removed */ removedCount: number; /** * Total number of words in wordlist */ totalCount: number; /** * List of words removed */ removedWords: Array; }; /** @internal */ export type RemoveWordlistWordsRequest$Outbound = { id: string; words: Array; projectId?: string | undefined; }; /** @internal */ export const RemoveWordlistWordsRequest$outboundSchema: z.ZodMiniType< RemoveWordlistWordsRequest$Outbound, RemoveWordlistWordsRequest > = z.object({ id: z.string(), words: z.array(z.string()), projectId: z.optional(z.string()), }); export function removeWordlistWordsRequestToJSON( removeWordlistWordsRequest: RemoveWordlistWordsRequest, ): string { return JSON.stringify( RemoveWordlistWordsRequest$outboundSchema.parse(removeWordlistWordsRequest), ); } /** @internal */ export const RemoveWordlistWordsResponse$inboundSchema: z.ZodMiniType< RemoveWordlistWordsResponse, unknown > = z.object({ removedCount: types.number(), totalCount: types.number(), removedWords: z.array(types.string()), }); export function removeWordlistWordsResponseFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => RemoveWordlistWordsResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'RemoveWordlistWordsResponse' from JSON`, ); }