UNPKG

attio-js

Version:

Developer-friendly & type-safe JS/TS SDK based on the official OpenAPI spec of Attio.

1,481 lines (1,333 loc) 76.4 kB
/* * 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 { ClosedEnum } from "../../types/enums.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; /** * Type of event the webhook is subscribed to. */ export const PostV2WebhooksEventTypeRequest = { CommentCreated: "comment.created", CommentResolved: "comment.resolved", CommentUnresolved: "comment.unresolved", CommentDeleted: "comment.deleted", ListCreated: "list.created", ListUpdated: "list.updated", ListDeleted: "list.deleted", ListAttributeCreated: "list-attribute.created", ListAttributeUpdated: "list-attribute.updated", ListEntryCreated: "list-entry.created", ListEntryUpdated: "list-entry.updated", ListEntryDeleted: "list-entry.deleted", ObjectAttributeCreated: "object-attribute.created", ObjectAttributeUpdated: "object-attribute.updated", NoteCreated: "note.created", NoteUpdated: "note.updated", NoteDeleted: "note.deleted", RecordCreated: "record.created", RecordMerged: "record.merged", RecordUpdated: "record.updated", RecordDeleted: "record.deleted", TaskCreated: "task.created", TaskUpdated: "task.updated", TaskDeleted: "task.deleted", WorkspaceMemberCreated: "workspace-member.created", } as const; /** * Type of event the webhook is subscribed to. */ export type PostV2WebhooksEventTypeRequest = ClosedEnum< typeof PostV2WebhooksEventTypeRequest >; export const PostV2WebhooksDollarAndOperatorNotEqualsRequest = { NotEquals: "not_equals", } as const; export type PostV2WebhooksDollarAndOperatorNotEqualsRequest = ClosedEnum< typeof PostV2WebhooksDollarAndOperatorNotEqualsRequest >; export type PostV2WebhooksDollarAndNotEqualsRequest = { field: string; operator: PostV2WebhooksDollarAndOperatorNotEqualsRequest; value: string; }; export const PostV2WebhooksDollarAndOperatorEqualsRequest = { Equals: "equals", } as const; export type PostV2WebhooksDollarAndOperatorEqualsRequest = ClosedEnum< typeof PostV2WebhooksDollarAndOperatorEqualsRequest >; export type PostV2WebhooksDollarAndEqualsRequest = { field: string; operator: PostV2WebhooksDollarAndOperatorEqualsRequest; value: string; }; export type PostV2WebhooksDollarAndRequestUnion = | PostV2WebhooksDollarAndEqualsRequest | PostV2WebhooksDollarAndNotEqualsRequest; export type PostV2WebhooksFilterRequest2 = { dollarAnd: Array< | PostV2WebhooksDollarAndEqualsRequest | PostV2WebhooksDollarAndNotEqualsRequest >; }; export const PostV2WebhooksDollarOrOperatorNotEqualsRequest = { NotEquals: "not_equals", } as const; export type PostV2WebhooksDollarOrOperatorNotEqualsRequest = ClosedEnum< typeof PostV2WebhooksDollarOrOperatorNotEqualsRequest >; export type PostV2WebhooksDollarOrNotEqualsRequest = { field: string; operator: PostV2WebhooksDollarOrOperatorNotEqualsRequest; value: string; }; export const PostV2WebhooksDollarOrOperatorEqualsRequest = { Equals: "equals", } as const; export type PostV2WebhooksDollarOrOperatorEqualsRequest = ClosedEnum< typeof PostV2WebhooksDollarOrOperatorEqualsRequest >; export type PostV2WebhooksDollarOrEqualsRequest = { field: string; operator: PostV2WebhooksDollarOrOperatorEqualsRequest; value: string; }; export type PostV2WebhooksDollarOrRequestUnion = | PostV2WebhooksDollarOrEqualsRequest | PostV2WebhooksDollarOrNotEqualsRequest; export type PostV2WebhooksFilterRequest1 = { dollarOr: Array< PostV2WebhooksDollarOrEqualsRequest | PostV2WebhooksDollarOrNotEqualsRequest >; }; /** * Filters to determine whether the webhook event should be sent. If null, the filter always passes. */ export type PostV2WebhooksFilterRequestUnion = | PostV2WebhooksFilterRequest1 | PostV2WebhooksFilterRequest2; export type PostV2WebhooksSubscriptionRequest = { /** * Type of event the webhook is subscribed to. */ eventType: PostV2WebhooksEventTypeRequest; /** * Filters to determine whether the webhook event should be sent. If null, the filter always passes. */ filter: PostV2WebhooksFilterRequest1 | PostV2WebhooksFilterRequest2 | null; }; export type PostV2WebhooksDataRequest = { /** * URL where the webhook events will be delivered to. */ targetUrl: string; /** * One or more events the webhook is subscribed to. */ subscriptions: Array<PostV2WebhooksSubscriptionRequest>; }; export type PostV2WebhooksRequest = { data: PostV2WebhooksDataRequest; }; /** * Type of event the webhook is subscribed to. */ export const PostV2WebhooksEventTypeResponse = { CommentCreated: "comment.created", CommentResolved: "comment.resolved", CommentUnresolved: "comment.unresolved", CommentDeleted: "comment.deleted", ListCreated: "list.created", ListUpdated: "list.updated", ListDeleted: "list.deleted", ListAttributeCreated: "list-attribute.created", ListAttributeUpdated: "list-attribute.updated", ListEntryCreated: "list-entry.created", ListEntryUpdated: "list-entry.updated", ListEntryDeleted: "list-entry.deleted", ObjectAttributeCreated: "object-attribute.created", ObjectAttributeUpdated: "object-attribute.updated", NoteCreated: "note.created", NoteUpdated: "note.updated", NoteDeleted: "note.deleted", RecordCreated: "record.created", RecordMerged: "record.merged", RecordUpdated: "record.updated", RecordDeleted: "record.deleted", TaskCreated: "task.created", TaskUpdated: "task.updated", TaskDeleted: "task.deleted", WorkspaceMemberCreated: "workspace-member.created", } as const; /** * Type of event the webhook is subscribed to. */ export type PostV2WebhooksEventTypeResponse = ClosedEnum< typeof PostV2WebhooksEventTypeResponse >; export const PostV2WebhooksDollarAndOperatorNotEqualsResponse = { NotEquals: "not_equals", } as const; export type PostV2WebhooksDollarAndOperatorNotEqualsResponse = ClosedEnum< typeof PostV2WebhooksDollarAndOperatorNotEqualsResponse >; export type PostV2WebhooksDollarAndNotEqualsResponse = { field: string; operator: PostV2WebhooksDollarAndOperatorNotEqualsResponse; value: string; }; export const PostV2WebhooksDollarAndOperatorEqualsResponse = { Equals: "equals", } as const; export type PostV2WebhooksDollarAndOperatorEqualsResponse = ClosedEnum< typeof PostV2WebhooksDollarAndOperatorEqualsResponse >; export type PostV2WebhooksDollarAndEqualsResponse = { field: string; operator: PostV2WebhooksDollarAndOperatorEqualsResponse; value: string; }; export type PostV2WebhooksDollarAndResponseUnion = | PostV2WebhooksDollarAndEqualsResponse | PostV2WebhooksDollarAndNotEqualsResponse; export type PostV2WebhooksFilterResponse2 = { dollarAnd: Array< | PostV2WebhooksDollarAndEqualsResponse | PostV2WebhooksDollarAndNotEqualsResponse >; }; export const PostV2WebhooksDollarOrOperatorNotEqualsResponse = { NotEquals: "not_equals", } as const; export type PostV2WebhooksDollarOrOperatorNotEqualsResponse = ClosedEnum< typeof PostV2WebhooksDollarOrOperatorNotEqualsResponse >; export type PostV2WebhooksDollarOrNotEqualsResponse = { field: string; operator: PostV2WebhooksDollarOrOperatorNotEqualsResponse; value: string; }; export const PostV2WebhooksDollarOrOperatorEqualsResponse = { Equals: "equals", } as const; export type PostV2WebhooksDollarOrOperatorEqualsResponse = ClosedEnum< typeof PostV2WebhooksDollarOrOperatorEqualsResponse >; export type PostV2WebhooksDollarOrEqualsResponse = { field: string; operator: PostV2WebhooksDollarOrOperatorEqualsResponse; value: string; }; export type PostV2WebhooksDollarOrResponseUnion = | PostV2WebhooksDollarOrEqualsResponse | PostV2WebhooksDollarOrNotEqualsResponse; export type PostV2WebhooksFilterResponse1 = { dollarOr: Array< | PostV2WebhooksDollarOrEqualsResponse | PostV2WebhooksDollarOrNotEqualsResponse >; }; /** * Filters to determine whether the webhook event should be sent. If null, the filter always passes. */ export type PostV2WebhooksFilterResponseUnion = | PostV2WebhooksFilterResponse1 | PostV2WebhooksFilterResponse2; export type PostV2WebhooksSubscriptionResponse = { /** * Type of event the webhook is subscribed to. */ eventType: PostV2WebhooksEventTypeResponse; /** * Filters to determine whether the webhook event should be sent. If null, the filter always passes. */ filter: PostV2WebhooksFilterResponse1 | PostV2WebhooksFilterResponse2 | null; }; export type PostV2WebhooksId = { /** * The ID of the workspace the webhook belongs to. */ workspaceId: string; /** * The ID of the webhook. */ webhookId: string; }; /** * The state of the webhook. Webhooks marked as active and degraded will receive events, inactive ones will not. If a webhook remains in the degraded state for 7 days, it will be marked inactive. */ export const PostV2WebhooksStatus = { Active: "active", Degraded: "degraded", Inactive: "inactive", } as const; /** * The state of the webhook. Webhooks marked as active and degraded will receive events, inactive ones will not. If a webhook remains in the degraded state for 7 days, it will be marked inactive. */ export type PostV2WebhooksStatus = ClosedEnum<typeof PostV2WebhooksStatus>; export type PostV2WebhooksDataResponse = { /** * URL where the webhook events will be delivered to. */ targetUrl: string; /** * One or more events the webhook is subscribed to. */ subscriptions: Array<PostV2WebhooksSubscriptionResponse>; id: PostV2WebhooksId; /** * The state of the webhook. Webhooks marked as active and degraded will receive events, inactive ones will not. If a webhook remains in the degraded state for 7 days, it will be marked inactive. */ status: PostV2WebhooksStatus; /** * When the webhook was created. */ createdAt: string; /** * The key which is used to sign the webhook events. This is only shown when setting up the webhook initially. */ secret: string; }; /** * Success */ export type PostV2WebhooksResponse = { data: PostV2WebhooksDataResponse; }; /** @internal */ export const PostV2WebhooksEventTypeRequest$inboundSchema: z.ZodNativeEnum< typeof PostV2WebhooksEventTypeRequest > = z.nativeEnum(PostV2WebhooksEventTypeRequest); /** @internal */ export const PostV2WebhooksEventTypeRequest$outboundSchema: z.ZodNativeEnum< typeof PostV2WebhooksEventTypeRequest > = PostV2WebhooksEventTypeRequest$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace PostV2WebhooksEventTypeRequest$ { /** @deprecated use `PostV2WebhooksEventTypeRequest$inboundSchema` instead. */ export const inboundSchema = PostV2WebhooksEventTypeRequest$inboundSchema; /** @deprecated use `PostV2WebhooksEventTypeRequest$outboundSchema` instead. */ export const outboundSchema = PostV2WebhooksEventTypeRequest$outboundSchema; } /** @internal */ export const PostV2WebhooksDollarAndOperatorNotEqualsRequest$inboundSchema: z.ZodNativeEnum<typeof PostV2WebhooksDollarAndOperatorNotEqualsRequest> = z .nativeEnum(PostV2WebhooksDollarAndOperatorNotEqualsRequest); /** @internal */ export const PostV2WebhooksDollarAndOperatorNotEqualsRequest$outboundSchema: z.ZodNativeEnum<typeof PostV2WebhooksDollarAndOperatorNotEqualsRequest> = PostV2WebhooksDollarAndOperatorNotEqualsRequest$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace PostV2WebhooksDollarAndOperatorNotEqualsRequest$ { /** @deprecated use `PostV2WebhooksDollarAndOperatorNotEqualsRequest$inboundSchema` instead. */ export const inboundSchema = PostV2WebhooksDollarAndOperatorNotEqualsRequest$inboundSchema; /** @deprecated use `PostV2WebhooksDollarAndOperatorNotEqualsRequest$outboundSchema` instead. */ export const outboundSchema = PostV2WebhooksDollarAndOperatorNotEqualsRequest$outboundSchema; } /** @internal */ export const PostV2WebhooksDollarAndNotEqualsRequest$inboundSchema: z.ZodType< PostV2WebhooksDollarAndNotEqualsRequest, z.ZodTypeDef, unknown > = z.object({ field: z.string(), operator: PostV2WebhooksDollarAndOperatorNotEqualsRequest$inboundSchema, value: z.string(), }); /** @internal */ export type PostV2WebhooksDollarAndNotEqualsRequest$Outbound = { field: string; operator: string; value: string; }; /** @internal */ export const PostV2WebhooksDollarAndNotEqualsRequest$outboundSchema: z.ZodType< PostV2WebhooksDollarAndNotEqualsRequest$Outbound, z.ZodTypeDef, PostV2WebhooksDollarAndNotEqualsRequest > = z.object({ field: z.string(), operator: PostV2WebhooksDollarAndOperatorNotEqualsRequest$outboundSchema, value: z.string(), }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace PostV2WebhooksDollarAndNotEqualsRequest$ { /** @deprecated use `PostV2WebhooksDollarAndNotEqualsRequest$inboundSchema` instead. */ export const inboundSchema = PostV2WebhooksDollarAndNotEqualsRequest$inboundSchema; /** @deprecated use `PostV2WebhooksDollarAndNotEqualsRequest$outboundSchema` instead. */ export const outboundSchema = PostV2WebhooksDollarAndNotEqualsRequest$outboundSchema; /** @deprecated use `PostV2WebhooksDollarAndNotEqualsRequest$Outbound` instead. */ export type Outbound = PostV2WebhooksDollarAndNotEqualsRequest$Outbound; } export function postV2WebhooksDollarAndNotEqualsRequestToJSON( postV2WebhooksDollarAndNotEqualsRequest: PostV2WebhooksDollarAndNotEqualsRequest, ): string { return JSON.stringify( PostV2WebhooksDollarAndNotEqualsRequest$outboundSchema.parse( postV2WebhooksDollarAndNotEqualsRequest, ), ); } export function postV2WebhooksDollarAndNotEqualsRequestFromJSON( jsonString: string, ): SafeParseResult< PostV2WebhooksDollarAndNotEqualsRequest, SDKValidationError > { return safeParse( jsonString, (x) => PostV2WebhooksDollarAndNotEqualsRequest$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'PostV2WebhooksDollarAndNotEqualsRequest' from JSON`, ); } /** @internal */ export const PostV2WebhooksDollarAndOperatorEqualsRequest$inboundSchema: z.ZodNativeEnum<typeof PostV2WebhooksDollarAndOperatorEqualsRequest> = z .nativeEnum(PostV2WebhooksDollarAndOperatorEqualsRequest); /** @internal */ export const PostV2WebhooksDollarAndOperatorEqualsRequest$outboundSchema: z.ZodNativeEnum<typeof PostV2WebhooksDollarAndOperatorEqualsRequest> = PostV2WebhooksDollarAndOperatorEqualsRequest$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace PostV2WebhooksDollarAndOperatorEqualsRequest$ { /** @deprecated use `PostV2WebhooksDollarAndOperatorEqualsRequest$inboundSchema` instead. */ export const inboundSchema = PostV2WebhooksDollarAndOperatorEqualsRequest$inboundSchema; /** @deprecated use `PostV2WebhooksDollarAndOperatorEqualsRequest$outboundSchema` instead. */ export const outboundSchema = PostV2WebhooksDollarAndOperatorEqualsRequest$outboundSchema; } /** @internal */ export const PostV2WebhooksDollarAndEqualsRequest$inboundSchema: z.ZodType< PostV2WebhooksDollarAndEqualsRequest, z.ZodTypeDef, unknown > = z.object({ field: z.string(), operator: PostV2WebhooksDollarAndOperatorEqualsRequest$inboundSchema, value: z.string(), }); /** @internal */ export type PostV2WebhooksDollarAndEqualsRequest$Outbound = { field: string; operator: string; value: string; }; /** @internal */ export const PostV2WebhooksDollarAndEqualsRequest$outboundSchema: z.ZodType< PostV2WebhooksDollarAndEqualsRequest$Outbound, z.ZodTypeDef, PostV2WebhooksDollarAndEqualsRequest > = z.object({ field: z.string(), operator: PostV2WebhooksDollarAndOperatorEqualsRequest$outboundSchema, value: z.string(), }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace PostV2WebhooksDollarAndEqualsRequest$ { /** @deprecated use `PostV2WebhooksDollarAndEqualsRequest$inboundSchema` instead. */ export const inboundSchema = PostV2WebhooksDollarAndEqualsRequest$inboundSchema; /** @deprecated use `PostV2WebhooksDollarAndEqualsRequest$outboundSchema` instead. */ export const outboundSchema = PostV2WebhooksDollarAndEqualsRequest$outboundSchema; /** @deprecated use `PostV2WebhooksDollarAndEqualsRequest$Outbound` instead. */ export type Outbound = PostV2WebhooksDollarAndEqualsRequest$Outbound; } export function postV2WebhooksDollarAndEqualsRequestToJSON( postV2WebhooksDollarAndEqualsRequest: PostV2WebhooksDollarAndEqualsRequest, ): string { return JSON.stringify( PostV2WebhooksDollarAndEqualsRequest$outboundSchema.parse( postV2WebhooksDollarAndEqualsRequest, ), ); } export function postV2WebhooksDollarAndEqualsRequestFromJSON( jsonString: string, ): SafeParseResult<PostV2WebhooksDollarAndEqualsRequest, SDKValidationError> { return safeParse( jsonString, (x) => PostV2WebhooksDollarAndEqualsRequest$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PostV2WebhooksDollarAndEqualsRequest' from JSON`, ); } /** @internal */ export const PostV2WebhooksDollarAndRequestUnion$inboundSchema: z.ZodType< PostV2WebhooksDollarAndRequestUnion, z.ZodTypeDef, unknown > = z.union([ z.lazy(() => PostV2WebhooksDollarAndEqualsRequest$inboundSchema), z.lazy(() => PostV2WebhooksDollarAndNotEqualsRequest$inboundSchema), ]); /** @internal */ export type PostV2WebhooksDollarAndRequestUnion$Outbound = | PostV2WebhooksDollarAndEqualsRequest$Outbound | PostV2WebhooksDollarAndNotEqualsRequest$Outbound; /** @internal */ export const PostV2WebhooksDollarAndRequestUnion$outboundSchema: z.ZodType< PostV2WebhooksDollarAndRequestUnion$Outbound, z.ZodTypeDef, PostV2WebhooksDollarAndRequestUnion > = z.union([ z.lazy(() => PostV2WebhooksDollarAndEqualsRequest$outboundSchema), z.lazy(() => PostV2WebhooksDollarAndNotEqualsRequest$outboundSchema), ]); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace PostV2WebhooksDollarAndRequestUnion$ { /** @deprecated use `PostV2WebhooksDollarAndRequestUnion$inboundSchema` instead. */ export const inboundSchema = PostV2WebhooksDollarAndRequestUnion$inboundSchema; /** @deprecated use `PostV2WebhooksDollarAndRequestUnion$outboundSchema` instead. */ export const outboundSchema = PostV2WebhooksDollarAndRequestUnion$outboundSchema; /** @deprecated use `PostV2WebhooksDollarAndRequestUnion$Outbound` instead. */ export type Outbound = PostV2WebhooksDollarAndRequestUnion$Outbound; } export function postV2WebhooksDollarAndRequestUnionToJSON( postV2WebhooksDollarAndRequestUnion: PostV2WebhooksDollarAndRequestUnion, ): string { return JSON.stringify( PostV2WebhooksDollarAndRequestUnion$outboundSchema.parse( postV2WebhooksDollarAndRequestUnion, ), ); } export function postV2WebhooksDollarAndRequestUnionFromJSON( jsonString: string, ): SafeParseResult<PostV2WebhooksDollarAndRequestUnion, SDKValidationError> { return safeParse( jsonString, (x) => PostV2WebhooksDollarAndRequestUnion$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PostV2WebhooksDollarAndRequestUnion' from JSON`, ); } /** @internal */ export const PostV2WebhooksFilterRequest2$inboundSchema: z.ZodType< PostV2WebhooksFilterRequest2, z.ZodTypeDef, unknown > = z.object({ $and: z.array( z.union([ z.lazy(() => PostV2WebhooksDollarAndEqualsRequest$inboundSchema), z.lazy(() => PostV2WebhooksDollarAndNotEqualsRequest$inboundSchema), ]), ), }).transform((v) => { return remap$(v, { "$and": "dollarAnd", }); }); /** @internal */ export type PostV2WebhooksFilterRequest2$Outbound = { $and: Array< | PostV2WebhooksDollarAndEqualsRequest$Outbound | PostV2WebhooksDollarAndNotEqualsRequest$Outbound >; }; /** @internal */ export const PostV2WebhooksFilterRequest2$outboundSchema: z.ZodType< PostV2WebhooksFilterRequest2$Outbound, z.ZodTypeDef, PostV2WebhooksFilterRequest2 > = z.object({ dollarAnd: z.array( z.union([ z.lazy(() => PostV2WebhooksDollarAndEqualsRequest$outboundSchema), z.lazy(() => PostV2WebhooksDollarAndNotEqualsRequest$outboundSchema), ]), ), }).transform((v) => { return remap$(v, { dollarAnd: "$and", }); }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace PostV2WebhooksFilterRequest2$ { /** @deprecated use `PostV2WebhooksFilterRequest2$inboundSchema` instead. */ export const inboundSchema = PostV2WebhooksFilterRequest2$inboundSchema; /** @deprecated use `PostV2WebhooksFilterRequest2$outboundSchema` instead. */ export const outboundSchema = PostV2WebhooksFilterRequest2$outboundSchema; /** @deprecated use `PostV2WebhooksFilterRequest2$Outbound` instead. */ export type Outbound = PostV2WebhooksFilterRequest2$Outbound; } export function postV2WebhooksFilterRequest2ToJSON( postV2WebhooksFilterRequest2: PostV2WebhooksFilterRequest2, ): string { return JSON.stringify( PostV2WebhooksFilterRequest2$outboundSchema.parse( postV2WebhooksFilterRequest2, ), ); } export function postV2WebhooksFilterRequest2FromJSON( jsonString: string, ): SafeParseResult<PostV2WebhooksFilterRequest2, SDKValidationError> { return safeParse( jsonString, (x) => PostV2WebhooksFilterRequest2$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PostV2WebhooksFilterRequest2' from JSON`, ); } /** @internal */ export const PostV2WebhooksDollarOrOperatorNotEqualsRequest$inboundSchema: z.ZodNativeEnum<typeof PostV2WebhooksDollarOrOperatorNotEqualsRequest> = z .nativeEnum(PostV2WebhooksDollarOrOperatorNotEqualsRequest); /** @internal */ export const PostV2WebhooksDollarOrOperatorNotEqualsRequest$outboundSchema: z.ZodNativeEnum<typeof PostV2WebhooksDollarOrOperatorNotEqualsRequest> = PostV2WebhooksDollarOrOperatorNotEqualsRequest$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace PostV2WebhooksDollarOrOperatorNotEqualsRequest$ { /** @deprecated use `PostV2WebhooksDollarOrOperatorNotEqualsRequest$inboundSchema` instead. */ export const inboundSchema = PostV2WebhooksDollarOrOperatorNotEqualsRequest$inboundSchema; /** @deprecated use `PostV2WebhooksDollarOrOperatorNotEqualsRequest$outboundSchema` instead. */ export const outboundSchema = PostV2WebhooksDollarOrOperatorNotEqualsRequest$outboundSchema; } /** @internal */ export const PostV2WebhooksDollarOrNotEqualsRequest$inboundSchema: z.ZodType< PostV2WebhooksDollarOrNotEqualsRequest, z.ZodTypeDef, unknown > = z.object({ field: z.string(), operator: PostV2WebhooksDollarOrOperatorNotEqualsRequest$inboundSchema, value: z.string(), }); /** @internal */ export type PostV2WebhooksDollarOrNotEqualsRequest$Outbound = { field: string; operator: string; value: string; }; /** @internal */ export const PostV2WebhooksDollarOrNotEqualsRequest$outboundSchema: z.ZodType< PostV2WebhooksDollarOrNotEqualsRequest$Outbound, z.ZodTypeDef, PostV2WebhooksDollarOrNotEqualsRequest > = z.object({ field: z.string(), operator: PostV2WebhooksDollarOrOperatorNotEqualsRequest$outboundSchema, value: z.string(), }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace PostV2WebhooksDollarOrNotEqualsRequest$ { /** @deprecated use `PostV2WebhooksDollarOrNotEqualsRequest$inboundSchema` instead. */ export const inboundSchema = PostV2WebhooksDollarOrNotEqualsRequest$inboundSchema; /** @deprecated use `PostV2WebhooksDollarOrNotEqualsRequest$outboundSchema` instead. */ export const outboundSchema = PostV2WebhooksDollarOrNotEqualsRequest$outboundSchema; /** @deprecated use `PostV2WebhooksDollarOrNotEqualsRequest$Outbound` instead. */ export type Outbound = PostV2WebhooksDollarOrNotEqualsRequest$Outbound; } export function postV2WebhooksDollarOrNotEqualsRequestToJSON( postV2WebhooksDollarOrNotEqualsRequest: PostV2WebhooksDollarOrNotEqualsRequest, ): string { return JSON.stringify( PostV2WebhooksDollarOrNotEqualsRequest$outboundSchema.parse( postV2WebhooksDollarOrNotEqualsRequest, ), ); } export function postV2WebhooksDollarOrNotEqualsRequestFromJSON( jsonString: string, ): SafeParseResult<PostV2WebhooksDollarOrNotEqualsRequest, SDKValidationError> { return safeParse( jsonString, (x) => PostV2WebhooksDollarOrNotEqualsRequest$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PostV2WebhooksDollarOrNotEqualsRequest' from JSON`, ); } /** @internal */ export const PostV2WebhooksDollarOrOperatorEqualsRequest$inboundSchema: z.ZodNativeEnum<typeof PostV2WebhooksDollarOrOperatorEqualsRequest> = z .nativeEnum(PostV2WebhooksDollarOrOperatorEqualsRequest); /** @internal */ export const PostV2WebhooksDollarOrOperatorEqualsRequest$outboundSchema: z.ZodNativeEnum<typeof PostV2WebhooksDollarOrOperatorEqualsRequest> = PostV2WebhooksDollarOrOperatorEqualsRequest$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace PostV2WebhooksDollarOrOperatorEqualsRequest$ { /** @deprecated use `PostV2WebhooksDollarOrOperatorEqualsRequest$inboundSchema` instead. */ export const inboundSchema = PostV2WebhooksDollarOrOperatorEqualsRequest$inboundSchema; /** @deprecated use `PostV2WebhooksDollarOrOperatorEqualsRequest$outboundSchema` instead. */ export const outboundSchema = PostV2WebhooksDollarOrOperatorEqualsRequest$outboundSchema; } /** @internal */ export const PostV2WebhooksDollarOrEqualsRequest$inboundSchema: z.ZodType< PostV2WebhooksDollarOrEqualsRequest, z.ZodTypeDef, unknown > = z.object({ field: z.string(), operator: PostV2WebhooksDollarOrOperatorEqualsRequest$inboundSchema, value: z.string(), }); /** @internal */ export type PostV2WebhooksDollarOrEqualsRequest$Outbound = { field: string; operator: string; value: string; }; /** @internal */ export const PostV2WebhooksDollarOrEqualsRequest$outboundSchema: z.ZodType< PostV2WebhooksDollarOrEqualsRequest$Outbound, z.ZodTypeDef, PostV2WebhooksDollarOrEqualsRequest > = z.object({ field: z.string(), operator: PostV2WebhooksDollarOrOperatorEqualsRequest$outboundSchema, value: z.string(), }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace PostV2WebhooksDollarOrEqualsRequest$ { /** @deprecated use `PostV2WebhooksDollarOrEqualsRequest$inboundSchema` instead. */ export const inboundSchema = PostV2WebhooksDollarOrEqualsRequest$inboundSchema; /** @deprecated use `PostV2WebhooksDollarOrEqualsRequest$outboundSchema` instead. */ export const outboundSchema = PostV2WebhooksDollarOrEqualsRequest$outboundSchema; /** @deprecated use `PostV2WebhooksDollarOrEqualsRequest$Outbound` instead. */ export type Outbound = PostV2WebhooksDollarOrEqualsRequest$Outbound; } export function postV2WebhooksDollarOrEqualsRequestToJSON( postV2WebhooksDollarOrEqualsRequest: PostV2WebhooksDollarOrEqualsRequest, ): string { return JSON.stringify( PostV2WebhooksDollarOrEqualsRequest$outboundSchema.parse( postV2WebhooksDollarOrEqualsRequest, ), ); } export function postV2WebhooksDollarOrEqualsRequestFromJSON( jsonString: string, ): SafeParseResult<PostV2WebhooksDollarOrEqualsRequest, SDKValidationError> { return safeParse( jsonString, (x) => PostV2WebhooksDollarOrEqualsRequest$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PostV2WebhooksDollarOrEqualsRequest' from JSON`, ); } /** @internal */ export const PostV2WebhooksDollarOrRequestUnion$inboundSchema: z.ZodType< PostV2WebhooksDollarOrRequestUnion, z.ZodTypeDef, unknown > = z.union([ z.lazy(() => PostV2WebhooksDollarOrEqualsRequest$inboundSchema), z.lazy(() => PostV2WebhooksDollarOrNotEqualsRequest$inboundSchema), ]); /** @internal */ export type PostV2WebhooksDollarOrRequestUnion$Outbound = | PostV2WebhooksDollarOrEqualsRequest$Outbound | PostV2WebhooksDollarOrNotEqualsRequest$Outbound; /** @internal */ export const PostV2WebhooksDollarOrRequestUnion$outboundSchema: z.ZodType< PostV2WebhooksDollarOrRequestUnion$Outbound, z.ZodTypeDef, PostV2WebhooksDollarOrRequestUnion > = z.union([ z.lazy(() => PostV2WebhooksDollarOrEqualsRequest$outboundSchema), z.lazy(() => PostV2WebhooksDollarOrNotEqualsRequest$outboundSchema), ]); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace PostV2WebhooksDollarOrRequestUnion$ { /** @deprecated use `PostV2WebhooksDollarOrRequestUnion$inboundSchema` instead. */ export const inboundSchema = PostV2WebhooksDollarOrRequestUnion$inboundSchema; /** @deprecated use `PostV2WebhooksDollarOrRequestUnion$outboundSchema` instead. */ export const outboundSchema = PostV2WebhooksDollarOrRequestUnion$outboundSchema; /** @deprecated use `PostV2WebhooksDollarOrRequestUnion$Outbound` instead. */ export type Outbound = PostV2WebhooksDollarOrRequestUnion$Outbound; } export function postV2WebhooksDollarOrRequestUnionToJSON( postV2WebhooksDollarOrRequestUnion: PostV2WebhooksDollarOrRequestUnion, ): string { return JSON.stringify( PostV2WebhooksDollarOrRequestUnion$outboundSchema.parse( postV2WebhooksDollarOrRequestUnion, ), ); } export function postV2WebhooksDollarOrRequestUnionFromJSON( jsonString: string, ): SafeParseResult<PostV2WebhooksDollarOrRequestUnion, SDKValidationError> { return safeParse( jsonString, (x) => PostV2WebhooksDollarOrRequestUnion$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PostV2WebhooksDollarOrRequestUnion' from JSON`, ); } /** @internal */ export const PostV2WebhooksFilterRequest1$inboundSchema: z.ZodType< PostV2WebhooksFilterRequest1, z.ZodTypeDef, unknown > = z.object({ $or: z.array( z.union([ z.lazy(() => PostV2WebhooksDollarOrEqualsRequest$inboundSchema), z.lazy(() => PostV2WebhooksDollarOrNotEqualsRequest$inboundSchema), ]), ), }).transform((v) => { return remap$(v, { "$or": "dollarOr", }); }); /** @internal */ export type PostV2WebhooksFilterRequest1$Outbound = { $or: Array< | PostV2WebhooksDollarOrEqualsRequest$Outbound | PostV2WebhooksDollarOrNotEqualsRequest$Outbound >; }; /** @internal */ export const PostV2WebhooksFilterRequest1$outboundSchema: z.ZodType< PostV2WebhooksFilterRequest1$Outbound, z.ZodTypeDef, PostV2WebhooksFilterRequest1 > = z.object({ dollarOr: z.array( z.union([ z.lazy(() => PostV2WebhooksDollarOrEqualsRequest$outboundSchema), z.lazy(() => PostV2WebhooksDollarOrNotEqualsRequest$outboundSchema), ]), ), }).transform((v) => { return remap$(v, { dollarOr: "$or", }); }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace PostV2WebhooksFilterRequest1$ { /** @deprecated use `PostV2WebhooksFilterRequest1$inboundSchema` instead. */ export const inboundSchema = PostV2WebhooksFilterRequest1$inboundSchema; /** @deprecated use `PostV2WebhooksFilterRequest1$outboundSchema` instead. */ export const outboundSchema = PostV2WebhooksFilterRequest1$outboundSchema; /** @deprecated use `PostV2WebhooksFilterRequest1$Outbound` instead. */ export type Outbound = PostV2WebhooksFilterRequest1$Outbound; } export function postV2WebhooksFilterRequest1ToJSON( postV2WebhooksFilterRequest1: PostV2WebhooksFilterRequest1, ): string { return JSON.stringify( PostV2WebhooksFilterRequest1$outboundSchema.parse( postV2WebhooksFilterRequest1, ), ); } export function postV2WebhooksFilterRequest1FromJSON( jsonString: string, ): SafeParseResult<PostV2WebhooksFilterRequest1, SDKValidationError> { return safeParse( jsonString, (x) => PostV2WebhooksFilterRequest1$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PostV2WebhooksFilterRequest1' from JSON`, ); } /** @internal */ export const PostV2WebhooksFilterRequestUnion$inboundSchema: z.ZodType< PostV2WebhooksFilterRequestUnion, z.ZodTypeDef, unknown > = z.union([ z.lazy(() => PostV2WebhooksFilterRequest1$inboundSchema), z.lazy(() => PostV2WebhooksFilterRequest2$inboundSchema), ]); /** @internal */ export type PostV2WebhooksFilterRequestUnion$Outbound = | PostV2WebhooksFilterRequest1$Outbound | PostV2WebhooksFilterRequest2$Outbound; /** @internal */ export const PostV2WebhooksFilterRequestUnion$outboundSchema: z.ZodType< PostV2WebhooksFilterRequestUnion$Outbound, z.ZodTypeDef, PostV2WebhooksFilterRequestUnion > = z.union([ z.lazy(() => PostV2WebhooksFilterRequest1$outboundSchema), z.lazy(() => PostV2WebhooksFilterRequest2$outboundSchema), ]); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace PostV2WebhooksFilterRequestUnion$ { /** @deprecated use `PostV2WebhooksFilterRequestUnion$inboundSchema` instead. */ export const inboundSchema = PostV2WebhooksFilterRequestUnion$inboundSchema; /** @deprecated use `PostV2WebhooksFilterRequestUnion$outboundSchema` instead. */ export const outboundSchema = PostV2WebhooksFilterRequestUnion$outboundSchema; /** @deprecated use `PostV2WebhooksFilterRequestUnion$Outbound` instead. */ export type Outbound = PostV2WebhooksFilterRequestUnion$Outbound; } export function postV2WebhooksFilterRequestUnionToJSON( postV2WebhooksFilterRequestUnion: PostV2WebhooksFilterRequestUnion, ): string { return JSON.stringify( PostV2WebhooksFilterRequestUnion$outboundSchema.parse( postV2WebhooksFilterRequestUnion, ), ); } export function postV2WebhooksFilterRequestUnionFromJSON( jsonString: string, ): SafeParseResult<PostV2WebhooksFilterRequestUnion, SDKValidationError> { return safeParse( jsonString, (x) => PostV2WebhooksFilterRequestUnion$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PostV2WebhooksFilterRequestUnion' from JSON`, ); } /** @internal */ export const PostV2WebhooksSubscriptionRequest$inboundSchema: z.ZodType< PostV2WebhooksSubscriptionRequest, z.ZodTypeDef, unknown > = z.object({ event_type: PostV2WebhooksEventTypeRequest$inboundSchema, filter: z.nullable( z.union([ z.lazy(() => PostV2WebhooksFilterRequest1$inboundSchema), z.lazy(() => PostV2WebhooksFilterRequest2$inboundSchema), ]), ), }).transform((v) => { return remap$(v, { "event_type": "eventType", }); }); /** @internal */ export type PostV2WebhooksSubscriptionRequest$Outbound = { event_type: string; filter: | PostV2WebhooksFilterRequest1$Outbound | PostV2WebhooksFilterRequest2$Outbound | null; }; /** @internal */ export const PostV2WebhooksSubscriptionRequest$outboundSchema: z.ZodType< PostV2WebhooksSubscriptionRequest$Outbound, z.ZodTypeDef, PostV2WebhooksSubscriptionRequest > = z.object({ eventType: PostV2WebhooksEventTypeRequest$outboundSchema, filter: z.nullable( z.union([ z.lazy(() => PostV2WebhooksFilterRequest1$outboundSchema), z.lazy(() => PostV2WebhooksFilterRequest2$outboundSchema), ]), ), }).transform((v) => { return remap$(v, { eventType: "event_type", }); }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace PostV2WebhooksSubscriptionRequest$ { /** @deprecated use `PostV2WebhooksSubscriptionRequest$inboundSchema` instead. */ export const inboundSchema = PostV2WebhooksSubscriptionRequest$inboundSchema; /** @deprecated use `PostV2WebhooksSubscriptionRequest$outboundSchema` instead. */ export const outboundSchema = PostV2WebhooksSubscriptionRequest$outboundSchema; /** @deprecated use `PostV2WebhooksSubscriptionRequest$Outbound` instead. */ export type Outbound = PostV2WebhooksSubscriptionRequest$Outbound; } export function postV2WebhooksSubscriptionRequestToJSON( postV2WebhooksSubscriptionRequest: PostV2WebhooksSubscriptionRequest, ): string { return JSON.stringify( PostV2WebhooksSubscriptionRequest$outboundSchema.parse( postV2WebhooksSubscriptionRequest, ), ); } export function postV2WebhooksSubscriptionRequestFromJSON( jsonString: string, ): SafeParseResult<PostV2WebhooksSubscriptionRequest, SDKValidationError> { return safeParse( jsonString, (x) => PostV2WebhooksSubscriptionRequest$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PostV2WebhooksSubscriptionRequest' from JSON`, ); } /** @internal */ export const PostV2WebhooksDataRequest$inboundSchema: z.ZodType< PostV2WebhooksDataRequest, z.ZodTypeDef, unknown > = z.object({ target_url: z.string(), subscriptions: z.array( z.lazy(() => PostV2WebhooksSubscriptionRequest$inboundSchema), ), }).transform((v) => { return remap$(v, { "target_url": "targetUrl", }); }); /** @internal */ export type PostV2WebhooksDataRequest$Outbound = { target_url: string; subscriptions: Array<PostV2WebhooksSubscriptionRequest$Outbound>; }; /** @internal */ export const PostV2WebhooksDataRequest$outboundSchema: z.ZodType< PostV2WebhooksDataRequest$Outbound, z.ZodTypeDef, PostV2WebhooksDataRequest > = z.object({ targetUrl: z.string(), subscriptions: z.array( z.lazy(() => PostV2WebhooksSubscriptionRequest$outboundSchema), ), }).transform((v) => { return remap$(v, { targetUrl: "target_url", }); }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace PostV2WebhooksDataRequest$ { /** @deprecated use `PostV2WebhooksDataRequest$inboundSchema` instead. */ export const inboundSchema = PostV2WebhooksDataRequest$inboundSchema; /** @deprecated use `PostV2WebhooksDataRequest$outboundSchema` instead. */ export const outboundSchema = PostV2WebhooksDataRequest$outboundSchema; /** @deprecated use `PostV2WebhooksDataRequest$Outbound` instead. */ export type Outbound = PostV2WebhooksDataRequest$Outbound; } export function postV2WebhooksDataRequestToJSON( postV2WebhooksDataRequest: PostV2WebhooksDataRequest, ): string { return JSON.stringify( PostV2WebhooksDataRequest$outboundSchema.parse(postV2WebhooksDataRequest), ); } export function postV2WebhooksDataRequestFromJSON( jsonString: string, ): SafeParseResult<PostV2WebhooksDataRequest, SDKValidationError> { return safeParse( jsonString, (x) => PostV2WebhooksDataRequest$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PostV2WebhooksDataRequest' from JSON`, ); } /** @internal */ export const PostV2WebhooksRequest$inboundSchema: z.ZodType< PostV2WebhooksRequest, z.ZodTypeDef, unknown > = z.object({ data: z.lazy(() => PostV2WebhooksDataRequest$inboundSchema), }); /** @internal */ export type PostV2WebhooksRequest$Outbound = { data: PostV2WebhooksDataRequest$Outbound; }; /** @internal */ export const PostV2WebhooksRequest$outboundSchema: z.ZodType< PostV2WebhooksRequest$Outbound, z.ZodTypeDef, PostV2WebhooksRequest > = z.object({ data: z.lazy(() => PostV2WebhooksDataRequest$outboundSchema), }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace PostV2WebhooksRequest$ { /** @deprecated use `PostV2WebhooksRequest$inboundSchema` instead. */ export const inboundSchema = PostV2WebhooksRequest$inboundSchema; /** @deprecated use `PostV2WebhooksRequest$outboundSchema` instead. */ export const outboundSchema = PostV2WebhooksRequest$outboundSchema; /** @deprecated use `PostV2WebhooksRequest$Outbound` instead. */ export type Outbound = PostV2WebhooksRequest$Outbound; } export function postV2WebhooksRequestToJSON( postV2WebhooksRequest: PostV2WebhooksRequest, ): string { return JSON.stringify( PostV2WebhooksRequest$outboundSchema.parse(postV2WebhooksRequest), ); } export function postV2WebhooksRequestFromJSON( jsonString: string, ): SafeParseResult<PostV2WebhooksRequest, SDKValidationError> { return safeParse( jsonString, (x) => PostV2WebhooksRequest$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PostV2WebhooksRequest' from JSON`, ); } /** @internal */ export const PostV2WebhooksEventTypeResponse$inboundSchema: z.ZodNativeEnum< typeof PostV2WebhooksEventTypeResponse > = z.nativeEnum(PostV2WebhooksEventTypeResponse); /** @internal */ export const PostV2WebhooksEventTypeResponse$outboundSchema: z.ZodNativeEnum< typeof PostV2WebhooksEventTypeResponse > = PostV2WebhooksEventTypeResponse$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace PostV2WebhooksEventTypeResponse$ { /** @deprecated use `PostV2WebhooksEventTypeResponse$inboundSchema` instead. */ export const inboundSchema = PostV2WebhooksEventTypeResponse$inboundSchema; /** @deprecated use `PostV2WebhooksEventTypeResponse$outboundSchema` instead. */ export const outboundSchema = PostV2WebhooksEventTypeResponse$outboundSchema; } /** @internal */ export const PostV2WebhooksDollarAndOperatorNotEqualsResponse$inboundSchema: z.ZodNativeEnum<typeof PostV2WebhooksDollarAndOperatorNotEqualsResponse> = z .nativeEnum(PostV2WebhooksDollarAndOperatorNotEqualsResponse); /** @internal */ export const PostV2WebhooksDollarAndOperatorNotEqualsResponse$outboundSchema: z.ZodNativeEnum<typeof PostV2WebhooksDollarAndOperatorNotEqualsResponse> = PostV2WebhooksDollarAndOperatorNotEqualsResponse$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace PostV2WebhooksDollarAndOperatorNotEqualsResponse$ { /** @deprecated use `PostV2WebhooksDollarAndOperatorNotEqualsResponse$inboundSchema` instead. */ export const inboundSchema = PostV2WebhooksDollarAndOperatorNotEqualsResponse$inboundSchema; /** @deprecated use `PostV2WebhooksDollarAndOperatorNotEqualsResponse$outboundSchema` instead. */ export const outboundSchema = PostV2WebhooksDollarAndOperatorNotEqualsResponse$outboundSchema; } /** @internal */ export const PostV2WebhooksDollarAndNotEqualsResponse$inboundSchema: z.ZodType< PostV2WebhooksDollarAndNotEqualsResponse, z.ZodTypeDef, unknown > = z.object({ field: z.string(), operator: PostV2WebhooksDollarAndOperatorNotEqualsResponse$inboundSchema, value: z.string(), }); /** @internal */ export type PostV2WebhooksDollarAndNotEqualsResponse$Outbound = { field: string; operator: string; value: string; }; /** @internal */ export const PostV2WebhooksDollarAndNotEqualsResponse$outboundSchema: z.ZodType< PostV2WebhooksDollarAndNotEqualsResponse$Outbound, z.ZodTypeDef, PostV2WebhooksDollarAndNotEqualsResponse > = z.object({ field: z.string(), operator: PostV2WebhooksDollarAndOperatorNotEqualsResponse$outboundSchema, value: z.string(), }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace PostV2WebhooksDollarAndNotEqualsResponse$ { /** @deprecated use `PostV2WebhooksDollarAndNotEqualsResponse$inboundSchema` instead. */ export const inboundSchema = PostV2WebhooksDollarAndNotEqualsResponse$inboundSchema; /** @deprecated use `PostV2WebhooksDollarAndNotEqualsResponse$outboundSchema` instead. */ export const outboundSchema = PostV2WebhooksDollarAndNotEqualsResponse$outboundSchema; /** @deprecated use `PostV2WebhooksDollarAndNotEqualsResponse$Outbound` instead. */ export type Outbound = PostV2WebhooksDollarAndNotEqualsResponse$Outbound; } export function postV2WebhooksDollarAndNotEqualsResponseToJSON( postV2WebhooksDollarAndNotEqualsResponse: PostV2WebhooksDollarAndNotEqualsResponse, ): string { return JSON.stringify( PostV2WebhooksDollarAndNotEqualsResponse$outboundSchema.parse( postV2WebhooksDollarAndNotEqualsResponse, ), ); } export function postV2WebhooksDollarAndNotEqualsResponseFromJSON( jsonString: string, ): SafeParseResult< PostV2WebhooksDollarAndNotEqualsResponse, SDKValidationError > { return safeParse( jsonString, (x) => PostV2WebhooksDollarAndNotEqualsResponse$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'PostV2WebhooksDollarAndNotEqualsResponse' from JSON`, ); } /** @internal */ export const PostV2WebhooksDollarAndOperatorEqualsResponse$inboundSchema: z.ZodNativeEnum<typeof PostV2WebhooksDollarAndOperatorEqualsResponse> = z .nativeEnum(PostV2WebhooksDollarAndOperatorEqualsResponse); /** @internal */ export const PostV2WebhooksDollarAndOperatorEqualsResponse$outboundSchema: z.ZodNativeEnum<typeof PostV2WebhooksDollarAndOperatorEqualsResponse> = PostV2WebhooksDollarAndOperatorEqualsResponse$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace PostV2WebhooksDollarAndOperatorEqualsResponse$ { /** @deprecated use `PostV2WebhooksDollarAndOperatorEqualsResponse$inboundSchema` instead. */ export const inboundSchema = PostV2WebhooksDollarAndOperatorEqualsResponse$inboundSchema; /** @deprecated use `PostV2WebhooksDollarAndOperatorEqualsResponse$outboundSchema` instead. */ export const outboundSchema = PostV2WebhooksDollarAndOperatorEqualsResponse$outboundSchema; } /** @internal */ export const PostV2WebhooksDollarAndEqualsResponse$inboundSchema: z.ZodType< PostV2WebhooksDollarAndEqualsResponse, z.ZodTypeDef, unknown > = z.object({ field: z.string(), operator: PostV2WebhooksDollarAndOperatorEqualsResponse$inboundSchema, value: z.string(), }); /** @internal */ export type PostV2WebhooksDollarAndEqualsResponse$Outbound = { field: string; operator: string; value: string; }; /** @internal */ export const PostV2WebhooksDollarAndEqualsResponse$outboundSchema: z.ZodType< PostV2WebhooksDollarAndEqualsResponse$Outbound, z.ZodTypeDef, PostV2WebhooksDollarAndEqualsResponse > = z.object({ field: z.string(), operator: PostV2WebhooksDollarAndOperatorEqualsResponse$outboundSchema, value: z.string(), }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace PostV2WebhooksDollarAndEqualsResponse$ { /** @deprecated use `PostV2WebhooksDollarAndEqualsResponse$inboundSchema` instead. */ export const inboundSchema = PostV2WebhooksDollarAndEqualsResponse$inboundSchema; /** @deprecated use `PostV2WebhooksDollarAndEqualsResponse$outboundSchema` instead. */ export const outboundSchema = PostV2WebhooksDollarAndEqualsResponse$outboundSchema; /** @deprecated use `PostV2WebhooksDollarAndEqualsResponse$Outbound` instead. */ export type Outbound = PostV2WebhooksDollarAndEqualsResponse$Outbound; } export function postV2WebhooksDollarAndEqualsResponseToJSON( postV2WebhooksDollarAndEqualsResponse: PostV2WebhooksDollarAndEqualsResponse, ): string { return JSON.stringify( PostV2WebhooksDollarAndEqualsResponse$outboundSchema.parse( postV2WebhooksDollarAndEqualsResponse, ), ); } export function postV2WebhooksDollarAndEqualsResponseFromJSON( jsonString: string, ): SafeParseResult<PostV2WebhooksDollarAndEqualsResponse, SDKValidationError> { return safeParse( jsonString, (x) => PostV2WebhooksDollarAndEqualsResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PostV2WebhooksDollarAndEqualsResponse' from JSON`, ); } /** @internal */ export const PostV2WebhooksDollarAndResponseUnion$inboundSchema: z.ZodType< PostV2WebhooksDollarAndResponseUnion, z.ZodTypeDef, unknown > = z.union([ z.lazy(() => PostV2WebhooksDollarAndEqualsResponse$inboundSchema), z.lazy(() => PostV2WebhooksDollarAndNotEqualsResponse$inboundSchema), ]); /** @internal */ export type PostV2WebhooksDollarAndResponseUnion$Outbound = | PostV2WebhooksDollarAndEqualsResponse$Outbound | PostV2WebhooksDollarAndNotEqualsResponse$Outbound; /** @internal */ export const PostV2WebhooksDollarAndResponseUnion$outboundSchema: z.ZodType< PostV2WebhooksDollarAndResponseUnion$Outbound, z.ZodTypeDef, PostV2WebhooksDollarAndResponseUnion > = z.union([ z.lazy(() => PostV2WebhooksDollarAndEqualsResponse$outboundSchema), z.lazy(() => PostV2WebhooksDollarAndNotEqualsRe