/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import * as components from "../components/index.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; export type IssueTrackingCollectionTicketCommentsDeleteGlobals = { /** * ID of the consumer which you want to get or push data from */ consumerId?: string | undefined; /** * The ID of your Unify application */ appId?: string | undefined; }; export type IssueTrackingCollectionTicketCommentsDeleteRequest = { /** * ID of the record you are acting upon. */ id: string; /** * Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. */ serviceId?: string | undefined; /** * Include raw response. Mostly used for debugging purposes */ raw?: boolean | undefined; /** * The collection ID */ collectionId: string; /** * ID of the ticket you are acting upon. */ ticketId: string; }; export type IssueTrackingCollectionTicketCommentsDeleteResponse = { httpMeta: components.HTTPMetadata; /** * Delete a Comment */ deleteCommentResponse?: components.DeleteCommentResponse | undefined; /** * Unexpected error */ unexpectedErrorResponse?: components.UnexpectedErrorResponse | undefined; }; /** @internal */ export const IssueTrackingCollectionTicketCommentsDeleteGlobals$inboundSchema: z.ZodType< IssueTrackingCollectionTicketCommentsDeleteGlobals, z.ZodTypeDef, unknown > = z.object({ consumerId: z.string().optional(), appId: z.string().optional(), }); /** @internal */ export type IssueTrackingCollectionTicketCommentsDeleteGlobals$Outbound = { consumerId?: string | undefined; appId?: string | undefined; }; /** @internal */ export const IssueTrackingCollectionTicketCommentsDeleteGlobals$outboundSchema: z.ZodType< IssueTrackingCollectionTicketCommentsDeleteGlobals$Outbound, z.ZodTypeDef, IssueTrackingCollectionTicketCommentsDeleteGlobals > = z.object({ consumerId: z.string().optional(), appId: z.string().optional(), }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace IssueTrackingCollectionTicketCommentsDeleteGlobals$ { /** @deprecated use `IssueTrackingCollectionTicketCommentsDeleteGlobals$inboundSchema` instead. */ export const inboundSchema = IssueTrackingCollectionTicketCommentsDeleteGlobals$inboundSchema; /** @deprecated use `IssueTrackingCollectionTicketCommentsDeleteGlobals$outboundSchema` instead. */ export const outboundSchema = IssueTrackingCollectionTicketCommentsDeleteGlobals$outboundSchema; /** @deprecated use `IssueTrackingCollectionTicketCommentsDeleteGlobals$Outbound` instead. */ export type Outbound = IssueTrackingCollectionTicketCommentsDeleteGlobals$Outbound; } export function issueTrackingCollectionTicketCommentsDeleteGlobalsToJSON( issueTrackingCollectionTicketCommentsDeleteGlobals: IssueTrackingCollectionTicketCommentsDeleteGlobals, ): string { return JSON.stringify( IssueTrackingCollectionTicketCommentsDeleteGlobals$outboundSchema.parse( issueTrackingCollectionTicketCommentsDeleteGlobals, ), ); } export function issueTrackingCollectionTicketCommentsDeleteGlobalsFromJSON( jsonString: string, ): SafeParseResult< IssueTrackingCollectionTicketCommentsDeleteGlobals, SDKValidationError > { return safeParse( jsonString, (x) => IssueTrackingCollectionTicketCommentsDeleteGlobals$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'IssueTrackingCollectionTicketCommentsDeleteGlobals' from JSON`, ); } /** @internal */ export const IssueTrackingCollectionTicketCommentsDeleteRequest$inboundSchema: z.ZodType< IssueTrackingCollectionTicketCommentsDeleteRequest, z.ZodTypeDef, unknown > = z.object({ id: z.string(), serviceId: z.string().optional(), raw: z.boolean().default(false), collection_id: z.string(), ticket_id: z.string(), }).transform((v) => { return remap$(v, { "collection_id": "collectionId", "ticket_id": "ticketId", }); }); /** @internal */ export type IssueTrackingCollectionTicketCommentsDeleteRequest$Outbound = { id: string; serviceId?: string | undefined; raw: boolean; collection_id: string; ticket_id: string; }; /** @internal */ export const IssueTrackingCollectionTicketCommentsDeleteRequest$outboundSchema: z.ZodType< IssueTrackingCollectionTicketCommentsDeleteRequest$Outbound, z.ZodTypeDef, IssueTrackingCollectionTicketCommentsDeleteRequest > = z.object({ id: z.string(), serviceId: z.string().optional(), raw: z.boolean().default(false), collectionId: z.string(), ticketId: z.string(), }).transform((v) => { return remap$(v, { collectionId: "collection_id", ticketId: "ticket_id", }); }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace IssueTrackingCollectionTicketCommentsDeleteRequest$ { /** @deprecated use `IssueTrackingCollectionTicketCommentsDeleteRequest$inboundSchema` instead. */ export const inboundSchema = IssueTrackingCollectionTicketCommentsDeleteRequest$inboundSchema; /** @deprecated use `IssueTrackingCollectionTicketCommentsDeleteRequest$outboundSchema` instead. */ export const outboundSchema = IssueTrackingCollectionTicketCommentsDeleteRequest$outboundSchema; /** @deprecated use `IssueTrackingCollectionTicketCommentsDeleteRequest$Outbound` instead. */ export type Outbound = IssueTrackingCollectionTicketCommentsDeleteRequest$Outbound; } export function issueTrackingCollectionTicketCommentsDeleteRequestToJSON( issueTrackingCollectionTicketCommentsDeleteRequest: IssueTrackingCollectionTicketCommentsDeleteRequest, ): string { return JSON.stringify( IssueTrackingCollectionTicketCommentsDeleteRequest$outboundSchema.parse( issueTrackingCollectionTicketCommentsDeleteRequest, ), ); } export function issueTrackingCollectionTicketCommentsDeleteRequestFromJSON( jsonString: string, ): SafeParseResult< IssueTrackingCollectionTicketCommentsDeleteRequest, SDKValidationError > { return safeParse( jsonString, (x) => IssueTrackingCollectionTicketCommentsDeleteRequest$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'IssueTrackingCollectionTicketCommentsDeleteRequest' from JSON`, ); } /** @internal */ export const IssueTrackingCollectionTicketCommentsDeleteResponse$inboundSchema: z.ZodType< IssueTrackingCollectionTicketCommentsDeleteResponse, z.ZodTypeDef, unknown > = z.object({ HttpMeta: components.HTTPMetadata$inboundSchema, DeleteCommentResponse: components.DeleteCommentResponse$inboundSchema .optional(), UnexpectedErrorResponse: components.UnexpectedErrorResponse$inboundSchema .optional(), }).transform((v) => { return remap$(v, { "HttpMeta": "httpMeta", "DeleteCommentResponse": "deleteCommentResponse", "UnexpectedErrorResponse": "unexpectedErrorResponse", }); }); /** @internal */ export type IssueTrackingCollectionTicketCommentsDeleteResponse$Outbound = { HttpMeta: components.HTTPMetadata$Outbound; DeleteCommentResponse?: components.DeleteCommentResponse$Outbound | undefined; UnexpectedErrorResponse?: | components.UnexpectedErrorResponse$Outbound | undefined; }; /** @internal */ export const IssueTrackingCollectionTicketCommentsDeleteResponse$outboundSchema: z.ZodType< IssueTrackingCollectionTicketCommentsDeleteResponse$Outbound, z.ZodTypeDef, IssueTrackingCollectionTicketCommentsDeleteResponse > = z.object({ httpMeta: components.HTTPMetadata$outboundSchema, deleteCommentResponse: components.DeleteCommentResponse$outboundSchema .optional(), unexpectedErrorResponse: components.UnexpectedErrorResponse$outboundSchema .optional(), }).transform((v) => { return remap$(v, { httpMeta: "HttpMeta", deleteCommentResponse: "DeleteCommentResponse", unexpectedErrorResponse: "UnexpectedErrorResponse", }); }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace IssueTrackingCollectionTicketCommentsDeleteResponse$ { /** @deprecated use `IssueTrackingCollectionTicketCommentsDeleteResponse$inboundSchema` instead. */ export const inboundSchema = IssueTrackingCollectionTicketCommentsDeleteResponse$inboundSchema; /** @deprecated use `IssueTrackingCollectionTicketCommentsDeleteResponse$outboundSchema` instead. */ export const outboundSchema = IssueTrackingCollectionTicketCommentsDeleteResponse$outboundSchema; /** @deprecated use `IssueTrackingCollectionTicketCommentsDeleteResponse$Outbound` instead. */ export type Outbound = IssueTrackingCollectionTicketCommentsDeleteResponse$Outbound; } export function issueTrackingCollectionTicketCommentsDeleteResponseToJSON( issueTrackingCollectionTicketCommentsDeleteResponse: IssueTrackingCollectionTicketCommentsDeleteResponse, ): string { return JSON.stringify( IssueTrackingCollectionTicketCommentsDeleteResponse$outboundSchema.parse( issueTrackingCollectionTicketCommentsDeleteResponse, ), ); } export function issueTrackingCollectionTicketCommentsDeleteResponseFromJSON( jsonString: string, ): SafeParseResult< IssueTrackingCollectionTicketCommentsDeleteResponse, SDKValidationError > { return safeParse( jsonString, (x) => IssueTrackingCollectionTicketCommentsDeleteResponse$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'IssueTrackingCollectionTicketCommentsDeleteResponse' from JSON`, ); }