UNPKG

attio-js

Version:

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

1,639 lines (1,517 loc) 49.7 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 { Task, Task$inboundSchema, Task$Outbound, Task$outboundSchema, } from "../components/task.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; export type PatchV2TasksTaskIdSlugOrIdOfMatchingAttribute5 = { /** * A raw text field. Values are limited to 10MB. */ value?: string | undefined; }; /** * The ISO 3166-1 alpha-2 country code representing the country that this phone number belongs to. */ export const PatchV2TasksTaskIdCountryCode = { Af: "AF", Ax: "AX", Al: "AL", Dz: "DZ", As: "AS", Ad: "AD", Ao: "AO", Ai: "AI", Aq: "AQ", Ag: "AG", Ar: "AR", Am: "AM", Aw: "AW", Au: "AU", At: "AT", Az: "AZ", Bs: "BS", Bh: "BH", Bd: "BD", Bb: "BB", By: "BY", Be: "BE", Bz: "BZ", Bj: "BJ", Bm: "BM", Bt: "BT", Bo: "BO", Ba: "BA", Bw: "BW", Bv: "BV", Br: "BR", Io: "IO", Bn: "BN", Bg: "BG", Bf: "BF", Bi: "BI", Kh: "KH", Cm: "CM", Ca: "CA", Cv: "CV", Ky: "KY", Cf: "CF", Td: "TD", Cl: "CL", Cn: "CN", Cx: "CX", Cc: "CC", Co: "CO", Km: "KM", Cg: "CG", Cd: "CD", Ck: "CK", Cr: "CR", Ci: "CI", Hr: "HR", Cu: "CU", Cw: "CW", Cy: "CY", Cz: "CZ", Dk: "DK", Dj: "DJ", Dm: "DM", Do: "DO", Ec: "EC", Eg: "EG", Sv: "SV", Gq: "GQ", Er: "ER", Ee: "EE", Et: "ET", Fk: "FK", Fo: "FO", Fj: "FJ", Fi: "FI", Fr: "FR", Gf: "GF", Pf: "PF", Tf: "TF", Ga: "GA", Gm: "GM", Ge: "GE", De: "DE", Gh: "GH", Gi: "GI", Gr: "GR", Gl: "GL", Gd: "GD", Gp: "GP", Gu: "GU", Gt: "GT", Gg: "GG", Gn: "GN", Gw: "GW", Gy: "GY", Ht: "HT", Hm: "HM", Va: "VA", Hn: "HN", Hk: "HK", Hu: "HU", Is: "IS", In: "IN", Id: "ID", Ir: "IR", Iq: "IQ", Ie: "IE", Im: "IM", Il: "IL", It: "IT", Jm: "JM", Jp: "JP", Je: "JE", Jo: "JO", Kz: "KZ", Ke: "KE", Ki: "KI", Kr: "KR", Kw: "KW", Kg: "KG", La: "LA", Lv: "LV", Lb: "LB", Ls: "LS", Lr: "LR", Ly: "LY", Li: "LI", Lt: "LT", Lu: "LU", Mo: "MO", Mk: "MK", Mg: "MG", Mw: "MW", My: "MY", Mv: "MV", Ml: "ML", Mt: "MT", Mh: "MH", Mq: "MQ", Mr: "MR", Mu: "MU", Yt: "YT", Mx: "MX", Fm: "FM", Md: "MD", Mc: "MC", Mn: "MN", Me: "ME", Ms: "MS", Ma: "MA", Mz: "MZ", Mm: "MM", Na: "NA", Nr: "NR", Np: "NP", Nl: "NL", An: "AN", Nc: "NC", Nz: "NZ", Ni: "NI", Ne: "NE", Ng: "NG", Nu: "NU", Nf: "NF", Mp: "MP", No: "NO", Om: "OM", Pk: "PK", Pw: "PW", Ps: "PS", Pa: "PA", Pg: "PG", Py: "PY", Pe: "PE", Ph: "PH", Pn: "PN", Pl: "PL", Pt: "PT", Pr: "PR", Qa: "QA", Re: "RE", Ro: "RO", Ru: "RU", Rw: "RW", Bl: "BL", Sh: "SH", Kn: "KN", Lc: "LC", Mf: "MF", Pm: "PM", Vc: "VC", Ws: "WS", Sm: "SM", St: "ST", Sa: "SA", Sn: "SN", Ss: "SS", Rs: "RS", Sc: "SC", Sl: "SL", Sg: "SG", Sk: "SK", Si: "SI", Sb: "SB", So: "SO", Za: "ZA", Gs: "GS", Es: "ES", Lk: "LK", Sd: "SD", Sr: "SR", Sj: "SJ", Sz: "SZ", Se: "SE", Ch: "CH", Sy: "SY", Tw: "TW", Tj: "TJ", Tz: "TZ", Th: "TH", Tl: "TL", Tg: "TG", Tk: "TK", To: "TO", Tt: "TT", Tn: "TN", Tr: "TR", Tm: "TM", Tc: "TC", Tv: "TV", Ug: "UG", Ua: "UA", Ae: "AE", Gb: "GB", Us: "US", Um: "UM", Uy: "UY", Uz: "UZ", Vu: "VU", Ve: "VE", Vn: "VN", Vg: "VG", Vi: "VI", Wf: "WF", Eh: "EH", Ye: "YE", Zm: "ZM", Zw: "ZW", } as const; /** * The ISO 3166-1 alpha-2 country code representing the country that this phone number belongs to. */ export type PatchV2TasksTaskIdCountryCode = ClosedEnum< typeof PatchV2TasksTaskIdCountryCode >; export type PatchV2TasksTaskIdSlugOrIdOfMatchingAttribute4 = { /** * The raw, original phone number, as inputted. */ originalPhoneNumber?: string | undefined; /** * The ISO 3166-1 alpha-2 country code representing the country that this phone number belongs to. */ countryCode?: PatchV2TasksTaskIdCountryCode | null | undefined; }; export type PatchV2TasksTaskIdSlugOrIdOfMatchingAttribute3 = { /** * Numbers are persisted as 64 bit floats. */ value?: number | undefined; }; export type PatchV2TasksTaskIdSlugOrIdOfMatchingAttribute2 = { /** * An email address string */ emailAddress?: string | undefined; }; export type PatchV2TasksTaskIdSlugOrIdOfMatchingAttribute1 = { /** * The full domain of the website. */ domain?: string | undefined; }; export type PatchV2TasksTaskIdSlugOrIdOfMatchingAttributeUnion = | PatchV2TasksTaskIdSlugOrIdOfMatchingAttribute1 | PatchV2TasksTaskIdSlugOrIdOfMatchingAttribute2 | PatchV2TasksTaskIdSlugOrIdOfMatchingAttribute3 | PatchV2TasksTaskIdSlugOrIdOfMatchingAttribute5 | PatchV2TasksTaskIdSlugOrIdOfMatchingAttribute4; export type PatchV2TasksTaskIdLinkedRecord2 = { /** * A UUID or slug to identify the object that the referenced record belongs to. */ targetObject: string; /** * In addition to referencing records directly by record ID, you may also reference by a matching attribute of your choice. For example, if you want to add a reference to the person record with email "alice@website.com", you should pass a value with `target_object` set to `"people"` and `email_addresses` set to `[{email_address:"alice@website.com"}]`. The key should be the slug or ID of the matching attribute you would like to use and the value should be an array containing a single value of the appropriate attribute type (as specified below). Matching on multiple values is not currently supported. Matching attributes must be unique. This process is similar to how you use the `matching_attribute` query param in Attio's [assert endpoints](/reference/put_v2-objects-object-records). */ slugOrIdOfMatchingAttribute: Array< | PatchV2TasksTaskIdSlugOrIdOfMatchingAttribute1 | PatchV2TasksTaskIdSlugOrIdOfMatchingAttribute2 | PatchV2TasksTaskIdSlugOrIdOfMatchingAttribute3 | PatchV2TasksTaskIdSlugOrIdOfMatchingAttribute5 | PatchV2TasksTaskIdSlugOrIdOfMatchingAttribute4 >; }; export type PatchV2TasksTaskIdLinkedRecord1 = { /** * The ID or slug of the parent object the tasks refers to. This can reference both standard and custom objects.` */ targetObject: string; /** * The ID of the parent record the task refers to. */ targetRecordId: string; }; export type PatchV2TasksTaskIdLinkedRecordUnion = | PatchV2TasksTaskIdLinkedRecord1 | PatchV2TasksTaskIdLinkedRecord2; export type PatchV2TasksTaskIdAssignee = { /** * Workspace member actors can be referenced by email address as well as actor ID. */ workspaceMemberEmailAddress: string; }; /** * The actor type of the task assignee. Only `workspace-member` actors can be assigned to tasks. [Read more information on actor types here](/docs/actors). */ export const PatchV2TasksTaskIdReferencedActorType = { WorkspaceMember: "workspace-member", } as const; /** * The actor type of the task assignee. Only `workspace-member` actors can be assigned to tasks. [Read more information on actor types here](/docs/actors). */ export type PatchV2TasksTaskIdReferencedActorType = ClosedEnum< typeof PatchV2TasksTaskIdReferencedActorType >; export type PatchV2TasksTaskIdAssigneeWorkspaceMember = { /** * The actor type of the task assignee. Only `workspace-member` actors can be assigned to tasks. [Read more information on actor types here](/docs/actors). */ referencedActorType: PatchV2TasksTaskIdReferencedActorType; /** * The ID of the actor assigned to this task. */ referencedActorId: string; }; export type PatchV2TasksTaskIdAssigneeUnion = | PatchV2TasksTaskIdAssignee | PatchV2TasksTaskIdAssigneeWorkspaceMember; export type PatchV2TasksTaskIdData = { /** * The deadline of the task, in ISO 8601 format. */ deadlineAt?: string | null | undefined; /** * Whether the task has been completed. */ isCompleted?: boolean | undefined; /** * Records linked to the task. Creating record links within task content text is not possible via the API at present. */ linkedRecords?: | Array<PatchV2TasksTaskIdLinkedRecord1 | PatchV2TasksTaskIdLinkedRecord2> | undefined; /** * Workspace members assigned to this task. */ assignees?: | Array< PatchV2TasksTaskIdAssignee | PatchV2TasksTaskIdAssigneeWorkspaceMember > | undefined; }; export type PatchV2TasksTaskIdRequestBody = { data: PatchV2TasksTaskIdData; }; export type PatchV2TasksTaskIdRequest = { taskId: string; requestBody: PatchV2TasksTaskIdRequestBody; }; /** * Success */ export type PatchV2TasksTaskIdResponse = { data: Task; }; /** @internal */ export const PatchV2TasksTaskIdSlugOrIdOfMatchingAttribute5$inboundSchema: z.ZodType< PatchV2TasksTaskIdSlugOrIdOfMatchingAttribute5, z.ZodTypeDef, unknown > = z.object({ value: z.string().optional(), }); /** @internal */ export type PatchV2TasksTaskIdSlugOrIdOfMatchingAttribute5$Outbound = { value?: string | undefined; }; /** @internal */ export const PatchV2TasksTaskIdSlugOrIdOfMatchingAttribute5$outboundSchema: z.ZodType< PatchV2TasksTaskIdSlugOrIdOfMatchingAttribute5$Outbound, z.ZodTypeDef, PatchV2TasksTaskIdSlugOrIdOfMatchingAttribute5 > = z.object({ value: 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 PatchV2TasksTaskIdSlugOrIdOfMatchingAttribute5$ { /** @deprecated use `PatchV2TasksTaskIdSlugOrIdOfMatchingAttribute5$inboundSchema` instead. */ export const inboundSchema = PatchV2TasksTaskIdSlugOrIdOfMatchingAttribute5$inboundSchema; /** @deprecated use `PatchV2TasksTaskIdSlugOrIdOfMatchingAttribute5$outboundSchema` instead. */ export const outboundSchema = PatchV2TasksTaskIdSlugOrIdOfMatchingAttribute5$outboundSchema; /** @deprecated use `PatchV2TasksTaskIdSlugOrIdOfMatchingAttribute5$Outbound` instead. */ export type Outbound = PatchV2TasksTaskIdSlugOrIdOfMatchingAttribute5$Outbound; } export function patchV2TasksTaskIdSlugOrIdOfMatchingAttribute5ToJSON( patchV2TasksTaskIdSlugOrIdOfMatchingAttribute5: PatchV2TasksTaskIdSlugOrIdOfMatchingAttribute5, ): string { return JSON.stringify( PatchV2TasksTaskIdSlugOrIdOfMatchingAttribute5$outboundSchema.parse( patchV2TasksTaskIdSlugOrIdOfMatchingAttribute5, ), ); } export function patchV2TasksTaskIdSlugOrIdOfMatchingAttribute5FromJSON( jsonString: string, ): SafeParseResult< PatchV2TasksTaskIdSlugOrIdOfMatchingAttribute5, SDKValidationError > { return safeParse( jsonString, (x) => PatchV2TasksTaskIdSlugOrIdOfMatchingAttribute5$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'PatchV2TasksTaskIdSlugOrIdOfMatchingAttribute5' from JSON`, ); } /** @internal */ export const PatchV2TasksTaskIdCountryCode$inboundSchema: z.ZodNativeEnum< typeof PatchV2TasksTaskIdCountryCode > = z.nativeEnum(PatchV2TasksTaskIdCountryCode); /** @internal */ export const PatchV2TasksTaskIdCountryCode$outboundSchema: z.ZodNativeEnum< typeof PatchV2TasksTaskIdCountryCode > = PatchV2TasksTaskIdCountryCode$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace PatchV2TasksTaskIdCountryCode$ { /** @deprecated use `PatchV2TasksTaskIdCountryCode$inboundSchema` instead. */ export const inboundSchema = PatchV2TasksTaskIdCountryCode$inboundSchema; /** @deprecated use `PatchV2TasksTaskIdCountryCode$outboundSchema` instead. */ export const outboundSchema = PatchV2TasksTaskIdCountryCode$outboundSchema; } /** @internal */ export const PatchV2TasksTaskIdSlugOrIdOfMatchingAttribute4$inboundSchema: z.ZodType< PatchV2TasksTaskIdSlugOrIdOfMatchingAttribute4, z.ZodTypeDef, unknown > = z.object({ original_phone_number: z.string().optional(), country_code: z.nullable(PatchV2TasksTaskIdCountryCode$inboundSchema) .optional(), }).transform((v) => { return remap$(v, { "original_phone_number": "originalPhoneNumber", "country_code": "countryCode", }); }); /** @internal */ export type PatchV2TasksTaskIdSlugOrIdOfMatchingAttribute4$Outbound = { original_phone_number?: string | undefined; country_code?: string | null | undefined; }; /** @internal */ export const PatchV2TasksTaskIdSlugOrIdOfMatchingAttribute4$outboundSchema: z.ZodType< PatchV2TasksTaskIdSlugOrIdOfMatchingAttribute4$Outbound, z.ZodTypeDef, PatchV2TasksTaskIdSlugOrIdOfMatchingAttribute4 > = z.object({ originalPhoneNumber: z.string().optional(), countryCode: z.nullable(PatchV2TasksTaskIdCountryCode$outboundSchema) .optional(), }).transform((v) => { return remap$(v, { originalPhoneNumber: "original_phone_number", countryCode: "country_code", }); }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace PatchV2TasksTaskIdSlugOrIdOfMatchingAttribute4$ { /** @deprecated use `PatchV2TasksTaskIdSlugOrIdOfMatchingAttribute4$inboundSchema` instead. */ export const inboundSchema = PatchV2TasksTaskIdSlugOrIdOfMatchingAttribute4$inboundSchema; /** @deprecated use `PatchV2TasksTaskIdSlugOrIdOfMatchingAttribute4$outboundSchema` instead. */ export const outboundSchema = PatchV2TasksTaskIdSlugOrIdOfMatchingAttribute4$outboundSchema; /** @deprecated use `PatchV2TasksTaskIdSlugOrIdOfMatchingAttribute4$Outbound` instead. */ export type Outbound = PatchV2TasksTaskIdSlugOrIdOfMatchingAttribute4$Outbound; } export function patchV2TasksTaskIdSlugOrIdOfMatchingAttribute4ToJSON( patchV2TasksTaskIdSlugOrIdOfMatchingAttribute4: PatchV2TasksTaskIdSlugOrIdOfMatchingAttribute4, ): string { return JSON.stringify( PatchV2TasksTaskIdSlugOrIdOfMatchingAttribute4$outboundSchema.parse( patchV2TasksTaskIdSlugOrIdOfMatchingAttribute4, ), ); } export function patchV2TasksTaskIdSlugOrIdOfMatchingAttribute4FromJSON( jsonString: string, ): SafeParseResult< PatchV2TasksTaskIdSlugOrIdOfMatchingAttribute4, SDKValidationError > { return safeParse( jsonString, (x) => PatchV2TasksTaskIdSlugOrIdOfMatchingAttribute4$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'PatchV2TasksTaskIdSlugOrIdOfMatchingAttribute4' from JSON`, ); } /** @internal */ export const PatchV2TasksTaskIdSlugOrIdOfMatchingAttribute3$inboundSchema: z.ZodType< PatchV2TasksTaskIdSlugOrIdOfMatchingAttribute3, z.ZodTypeDef, unknown > = z.object({ value: z.number().optional(), }); /** @internal */ export type PatchV2TasksTaskIdSlugOrIdOfMatchingAttribute3$Outbound = { value?: number | undefined; }; /** @internal */ export const PatchV2TasksTaskIdSlugOrIdOfMatchingAttribute3$outboundSchema: z.ZodType< PatchV2TasksTaskIdSlugOrIdOfMatchingAttribute3$Outbound, z.ZodTypeDef, PatchV2TasksTaskIdSlugOrIdOfMatchingAttribute3 > = z.object({ value: z.number().optional(), }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace PatchV2TasksTaskIdSlugOrIdOfMatchingAttribute3$ { /** @deprecated use `PatchV2TasksTaskIdSlugOrIdOfMatchingAttribute3$inboundSchema` instead. */ export const inboundSchema = PatchV2TasksTaskIdSlugOrIdOfMatchingAttribute3$inboundSchema; /** @deprecated use `PatchV2TasksTaskIdSlugOrIdOfMatchingAttribute3$outboundSchema` instead. */ export const outboundSchema = PatchV2TasksTaskIdSlugOrIdOfMatchingAttribute3$outboundSchema; /** @deprecated use `PatchV2TasksTaskIdSlugOrIdOfMatchingAttribute3$Outbound` instead. */ export type Outbound = PatchV2TasksTaskIdSlugOrIdOfMatchingAttribute3$Outbound; } export function patchV2TasksTaskIdSlugOrIdOfMatchingAttribute3ToJSON( patchV2TasksTaskIdSlugOrIdOfMatchingAttribute3: PatchV2TasksTaskIdSlugOrIdOfMatchingAttribute3, ): string { return JSON.stringify( PatchV2TasksTaskIdSlugOrIdOfMatchingAttribute3$outboundSchema.parse( patchV2TasksTaskIdSlugOrIdOfMatchingAttribute3, ), ); } export function patchV2TasksTaskIdSlugOrIdOfMatchingAttribute3FromJSON( jsonString: string, ): SafeParseResult< PatchV2TasksTaskIdSlugOrIdOfMatchingAttribute3, SDKValidationError > { return safeParse( jsonString, (x) => PatchV2TasksTaskIdSlugOrIdOfMatchingAttribute3$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'PatchV2TasksTaskIdSlugOrIdOfMatchingAttribute3' from JSON`, ); } /** @internal */ export const PatchV2TasksTaskIdSlugOrIdOfMatchingAttribute2$inboundSchema: z.ZodType< PatchV2TasksTaskIdSlugOrIdOfMatchingAttribute2, z.ZodTypeDef, unknown > = z.object({ email_address: z.string().optional(), }).transform((v) => { return remap$(v, { "email_address": "emailAddress", }); }); /** @internal */ export type PatchV2TasksTaskIdSlugOrIdOfMatchingAttribute2$Outbound = { email_address?: string | undefined; }; /** @internal */ export const PatchV2TasksTaskIdSlugOrIdOfMatchingAttribute2$outboundSchema: z.ZodType< PatchV2TasksTaskIdSlugOrIdOfMatchingAttribute2$Outbound, z.ZodTypeDef, PatchV2TasksTaskIdSlugOrIdOfMatchingAttribute2 > = z.object({ emailAddress: z.string().optional(), }).transform((v) => { return remap$(v, { emailAddress: "email_address", }); }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace PatchV2TasksTaskIdSlugOrIdOfMatchingAttribute2$ { /** @deprecated use `PatchV2TasksTaskIdSlugOrIdOfMatchingAttribute2$inboundSchema` instead. */ export const inboundSchema = PatchV2TasksTaskIdSlugOrIdOfMatchingAttribute2$inboundSchema; /** @deprecated use `PatchV2TasksTaskIdSlugOrIdOfMatchingAttribute2$outboundSchema` instead. */ export const outboundSchema = PatchV2TasksTaskIdSlugOrIdOfMatchingAttribute2$outboundSchema; /** @deprecated use `PatchV2TasksTaskIdSlugOrIdOfMatchingAttribute2$Outbound` instead. */ export type Outbound = PatchV2TasksTaskIdSlugOrIdOfMatchingAttribute2$Outbound; } export function patchV2TasksTaskIdSlugOrIdOfMatchingAttribute2ToJSON( patchV2TasksTaskIdSlugOrIdOfMatchingAttribute2: PatchV2TasksTaskIdSlugOrIdOfMatchingAttribute2, ): string { return JSON.stringify( PatchV2TasksTaskIdSlugOrIdOfMatchingAttribute2$outboundSchema.parse( patchV2TasksTaskIdSlugOrIdOfMatchingAttribute2, ), ); } export function patchV2TasksTaskIdSlugOrIdOfMatchingAttribute2FromJSON( jsonString: string, ): SafeParseResult< PatchV2TasksTaskIdSlugOrIdOfMatchingAttribute2, SDKValidationError > { return safeParse( jsonString, (x) => PatchV2TasksTaskIdSlugOrIdOfMatchingAttribute2$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'PatchV2TasksTaskIdSlugOrIdOfMatchingAttribute2' from JSON`, ); } /** @internal */ export const PatchV2TasksTaskIdSlugOrIdOfMatchingAttribute1$inboundSchema: z.ZodType< PatchV2TasksTaskIdSlugOrIdOfMatchingAttribute1, z.ZodTypeDef, unknown > = z.object({ domain: z.string().optional(), }); /** @internal */ export type PatchV2TasksTaskIdSlugOrIdOfMatchingAttribute1$Outbound = { domain?: string | undefined; }; /** @internal */ export const PatchV2TasksTaskIdSlugOrIdOfMatchingAttribute1$outboundSchema: z.ZodType< PatchV2TasksTaskIdSlugOrIdOfMatchingAttribute1$Outbound, z.ZodTypeDef, PatchV2TasksTaskIdSlugOrIdOfMatchingAttribute1 > = z.object({ domain: 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 PatchV2TasksTaskIdSlugOrIdOfMatchingAttribute1$ { /** @deprecated use `PatchV2TasksTaskIdSlugOrIdOfMatchingAttribute1$inboundSchema` instead. */ export const inboundSchema = PatchV2TasksTaskIdSlugOrIdOfMatchingAttribute1$inboundSchema; /** @deprecated use `PatchV2TasksTaskIdSlugOrIdOfMatchingAttribute1$outboundSchema` instead. */ export const outboundSchema = PatchV2TasksTaskIdSlugOrIdOfMatchingAttribute1$outboundSchema; /** @deprecated use `PatchV2TasksTaskIdSlugOrIdOfMatchingAttribute1$Outbound` instead. */ export type Outbound = PatchV2TasksTaskIdSlugOrIdOfMatchingAttribute1$Outbound; } export function patchV2TasksTaskIdSlugOrIdOfMatchingAttribute1ToJSON( patchV2TasksTaskIdSlugOrIdOfMatchingAttribute1: PatchV2TasksTaskIdSlugOrIdOfMatchingAttribute1, ): string { return JSON.stringify( PatchV2TasksTaskIdSlugOrIdOfMatchingAttribute1$outboundSchema.parse( patchV2TasksTaskIdSlugOrIdOfMatchingAttribute1, ), ); } export function patchV2TasksTaskIdSlugOrIdOfMatchingAttribute1FromJSON( jsonString: string, ): SafeParseResult< PatchV2TasksTaskIdSlugOrIdOfMatchingAttribute1, SDKValidationError > { return safeParse( jsonString, (x) => PatchV2TasksTaskIdSlugOrIdOfMatchingAttribute1$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'PatchV2TasksTaskIdSlugOrIdOfMatchingAttribute1' from JSON`, ); } /** @internal */ export const PatchV2TasksTaskIdSlugOrIdOfMatchingAttributeUnion$inboundSchema: z.ZodType< PatchV2TasksTaskIdSlugOrIdOfMatchingAttributeUnion, z.ZodTypeDef, unknown > = z.union([ z.lazy(() => PatchV2TasksTaskIdSlugOrIdOfMatchingAttribute1$inboundSchema), z.lazy(() => PatchV2TasksTaskIdSlugOrIdOfMatchingAttribute2$inboundSchema), z.lazy(() => PatchV2TasksTaskIdSlugOrIdOfMatchingAttribute3$inboundSchema), z.lazy(() => PatchV2TasksTaskIdSlugOrIdOfMatchingAttribute5$inboundSchema), z.lazy(() => PatchV2TasksTaskIdSlugOrIdOfMatchingAttribute4$inboundSchema), ]); /** @internal */ export type PatchV2TasksTaskIdSlugOrIdOfMatchingAttributeUnion$Outbound = | PatchV2TasksTaskIdSlugOrIdOfMatchingAttribute1$Outbound | PatchV2TasksTaskIdSlugOrIdOfMatchingAttribute2$Outbound | PatchV2TasksTaskIdSlugOrIdOfMatchingAttribute3$Outbound | PatchV2TasksTaskIdSlugOrIdOfMatchingAttribute5$Outbound | PatchV2TasksTaskIdSlugOrIdOfMatchingAttribute4$Outbound; /** @internal */ export const PatchV2TasksTaskIdSlugOrIdOfMatchingAttributeUnion$outboundSchema: z.ZodType< PatchV2TasksTaskIdSlugOrIdOfMatchingAttributeUnion$Outbound, z.ZodTypeDef, PatchV2TasksTaskIdSlugOrIdOfMatchingAttributeUnion > = z.union([ z.lazy(() => PatchV2TasksTaskIdSlugOrIdOfMatchingAttribute1$outboundSchema), z.lazy(() => PatchV2TasksTaskIdSlugOrIdOfMatchingAttribute2$outboundSchema), z.lazy(() => PatchV2TasksTaskIdSlugOrIdOfMatchingAttribute3$outboundSchema), z.lazy(() => PatchV2TasksTaskIdSlugOrIdOfMatchingAttribute5$outboundSchema), z.lazy(() => PatchV2TasksTaskIdSlugOrIdOfMatchingAttribute4$outboundSchema), ]); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace PatchV2TasksTaskIdSlugOrIdOfMatchingAttributeUnion$ { /** @deprecated use `PatchV2TasksTaskIdSlugOrIdOfMatchingAttributeUnion$inboundSchema` instead. */ export const inboundSchema = PatchV2TasksTaskIdSlugOrIdOfMatchingAttributeUnion$inboundSchema; /** @deprecated use `PatchV2TasksTaskIdSlugOrIdOfMatchingAttributeUnion$outboundSchema` instead. */ export const outboundSchema = PatchV2TasksTaskIdSlugOrIdOfMatchingAttributeUnion$outboundSchema; /** @deprecated use `PatchV2TasksTaskIdSlugOrIdOfMatchingAttributeUnion$Outbound` instead. */ export type Outbound = PatchV2TasksTaskIdSlugOrIdOfMatchingAttributeUnion$Outbound; } export function patchV2TasksTaskIdSlugOrIdOfMatchingAttributeUnionToJSON( patchV2TasksTaskIdSlugOrIdOfMatchingAttributeUnion: PatchV2TasksTaskIdSlugOrIdOfMatchingAttributeUnion, ): string { return JSON.stringify( PatchV2TasksTaskIdSlugOrIdOfMatchingAttributeUnion$outboundSchema.parse( patchV2TasksTaskIdSlugOrIdOfMatchingAttributeUnion, ), ); } export function patchV2TasksTaskIdSlugOrIdOfMatchingAttributeUnionFromJSON( jsonString: string, ): SafeParseResult< PatchV2TasksTaskIdSlugOrIdOfMatchingAttributeUnion, SDKValidationError > { return safeParse( jsonString, (x) => PatchV2TasksTaskIdSlugOrIdOfMatchingAttributeUnion$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'PatchV2TasksTaskIdSlugOrIdOfMatchingAttributeUnion' from JSON`, ); } /** @internal */ export const PatchV2TasksTaskIdLinkedRecord2$inboundSchema: z.ZodType< PatchV2TasksTaskIdLinkedRecord2, z.ZodTypeDef, unknown > = z.object({ target_object: z.string(), "[slug_or_id_of_matching_attribute]": z.array( z.union([ z.lazy(() => PatchV2TasksTaskIdSlugOrIdOfMatchingAttribute1$inboundSchema ), z.lazy(() => PatchV2TasksTaskIdSlugOrIdOfMatchingAttribute2$inboundSchema ), z.lazy(() => PatchV2TasksTaskIdSlugOrIdOfMatchingAttribute3$inboundSchema ), z.lazy(() => PatchV2TasksTaskIdSlugOrIdOfMatchingAttribute5$inboundSchema ), z.lazy(() => PatchV2TasksTaskIdSlugOrIdOfMatchingAttribute4$inboundSchema ), ]), ), }).transform((v) => { return remap$(v, { "target_object": "targetObject", "[slug_or_id_of_matching_attribute]": "slugOrIdOfMatchingAttribute", }); }); /** @internal */ export type PatchV2TasksTaskIdLinkedRecord2$Outbound = { target_object: string; "[slug_or_id_of_matching_attribute]": Array< | PatchV2TasksTaskIdSlugOrIdOfMatchingAttribute1$Outbound | PatchV2TasksTaskIdSlugOrIdOfMatchingAttribute2$Outbound | PatchV2TasksTaskIdSlugOrIdOfMatchingAttribute3$Outbound | PatchV2TasksTaskIdSlugOrIdOfMatchingAttribute5$Outbound | PatchV2TasksTaskIdSlugOrIdOfMatchingAttribute4$Outbound >; }; /** @internal */ export const PatchV2TasksTaskIdLinkedRecord2$outboundSchema: z.ZodType< PatchV2TasksTaskIdLinkedRecord2$Outbound, z.ZodTypeDef, PatchV2TasksTaskIdLinkedRecord2 > = z.object({ targetObject: z.string(), slugOrIdOfMatchingAttribute: z.array( z.union([ z.lazy(() => PatchV2TasksTaskIdSlugOrIdOfMatchingAttribute1$outboundSchema ), z.lazy(() => PatchV2TasksTaskIdSlugOrIdOfMatchingAttribute2$outboundSchema ), z.lazy(() => PatchV2TasksTaskIdSlugOrIdOfMatchingAttribute3$outboundSchema ), z.lazy(() => PatchV2TasksTaskIdSlugOrIdOfMatchingAttribute5$outboundSchema ), z.lazy(() => PatchV2TasksTaskIdSlugOrIdOfMatchingAttribute4$outboundSchema ), ]), ), }).transform((v) => { return remap$(v, { targetObject: "target_object", slugOrIdOfMatchingAttribute: "[slug_or_id_of_matching_attribute]", }); }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace PatchV2TasksTaskIdLinkedRecord2$ { /** @deprecated use `PatchV2TasksTaskIdLinkedRecord2$inboundSchema` instead. */ export const inboundSchema = PatchV2TasksTaskIdLinkedRecord2$inboundSchema; /** @deprecated use `PatchV2TasksTaskIdLinkedRecord2$outboundSchema` instead. */ export const outboundSchema = PatchV2TasksTaskIdLinkedRecord2$outboundSchema; /** @deprecated use `PatchV2TasksTaskIdLinkedRecord2$Outbound` instead. */ export type Outbound = PatchV2TasksTaskIdLinkedRecord2$Outbound; } export function patchV2TasksTaskIdLinkedRecord2ToJSON( patchV2TasksTaskIdLinkedRecord2: PatchV2TasksTaskIdLinkedRecord2, ): string { return JSON.stringify( PatchV2TasksTaskIdLinkedRecord2$outboundSchema.parse( patchV2TasksTaskIdLinkedRecord2, ), ); } export function patchV2TasksTaskIdLinkedRecord2FromJSON( jsonString: string, ): SafeParseResult<PatchV2TasksTaskIdLinkedRecord2, SDKValidationError> { return safeParse( jsonString, (x) => PatchV2TasksTaskIdLinkedRecord2$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PatchV2TasksTaskIdLinkedRecord2' from JSON`, ); } /** @internal */ export const PatchV2TasksTaskIdLinkedRecord1$inboundSchema: z.ZodType< PatchV2TasksTaskIdLinkedRecord1, z.ZodTypeDef, unknown > = z.object({ target_object: z.string(), target_record_id: z.string(), }).transform((v) => { return remap$(v, { "target_object": "targetObject", "target_record_id": "targetRecordId", }); }); /** @internal */ export type PatchV2TasksTaskIdLinkedRecord1$Outbound = { target_object: string; target_record_id: string; }; /** @internal */ export const PatchV2TasksTaskIdLinkedRecord1$outboundSchema: z.ZodType< PatchV2TasksTaskIdLinkedRecord1$Outbound, z.ZodTypeDef, PatchV2TasksTaskIdLinkedRecord1 > = z.object({ targetObject: z.string(), targetRecordId: z.string(), }).transform((v) => { return remap$(v, { targetObject: "target_object", targetRecordId: "target_record_id", }); }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace PatchV2TasksTaskIdLinkedRecord1$ { /** @deprecated use `PatchV2TasksTaskIdLinkedRecord1$inboundSchema` instead. */ export const inboundSchema = PatchV2TasksTaskIdLinkedRecord1$inboundSchema; /** @deprecated use `PatchV2TasksTaskIdLinkedRecord1$outboundSchema` instead. */ export const outboundSchema = PatchV2TasksTaskIdLinkedRecord1$outboundSchema; /** @deprecated use `PatchV2TasksTaskIdLinkedRecord1$Outbound` instead. */ export type Outbound = PatchV2TasksTaskIdLinkedRecord1$Outbound; } export function patchV2TasksTaskIdLinkedRecord1ToJSON( patchV2TasksTaskIdLinkedRecord1: PatchV2TasksTaskIdLinkedRecord1, ): string { return JSON.stringify( PatchV2TasksTaskIdLinkedRecord1$outboundSchema.parse( patchV2TasksTaskIdLinkedRecord1, ), ); } export function patchV2TasksTaskIdLinkedRecord1FromJSON( jsonString: string, ): SafeParseResult<PatchV2TasksTaskIdLinkedRecord1, SDKValidationError> { return safeParse( jsonString, (x) => PatchV2TasksTaskIdLinkedRecord1$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PatchV2TasksTaskIdLinkedRecord1' from JSON`, ); } /** @internal */ export const PatchV2TasksTaskIdLinkedRecordUnion$inboundSchema: z.ZodType< PatchV2TasksTaskIdLinkedRecordUnion, z.ZodTypeDef, unknown > = z.union([ z.lazy(() => PatchV2TasksTaskIdLinkedRecord1$inboundSchema), z.lazy(() => PatchV2TasksTaskIdLinkedRecord2$inboundSchema), ]); /** @internal */ export type PatchV2TasksTaskIdLinkedRecordUnion$Outbound = | PatchV2TasksTaskIdLinkedRecord1$Outbound | PatchV2TasksTaskIdLinkedRecord2$Outbound; /** @internal */ export const PatchV2TasksTaskIdLinkedRecordUnion$outboundSchema: z.ZodType< PatchV2TasksTaskIdLinkedRecordUnion$Outbound, z.ZodTypeDef, PatchV2TasksTaskIdLinkedRecordUnion > = z.union([ z.lazy(() => PatchV2TasksTaskIdLinkedRecord1$outboundSchema), z.lazy(() => PatchV2TasksTaskIdLinkedRecord2$outboundSchema), ]); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace PatchV2TasksTaskIdLinkedRecordUnion$ { /** @deprecated use `PatchV2TasksTaskIdLinkedRecordUnion$inboundSchema` instead. */ export const inboundSchema = PatchV2TasksTaskIdLinkedRecordUnion$inboundSchema; /** @deprecated use `PatchV2TasksTaskIdLinkedRecordUnion$outboundSchema` instead. */ export const outboundSchema = PatchV2TasksTaskIdLinkedRecordUnion$outboundSchema; /** @deprecated use `PatchV2TasksTaskIdLinkedRecordUnion$Outbound` instead. */ export type Outbound = PatchV2TasksTaskIdLinkedRecordUnion$Outbound; } export function patchV2TasksTaskIdLinkedRecordUnionToJSON( patchV2TasksTaskIdLinkedRecordUnion: PatchV2TasksTaskIdLinkedRecordUnion, ): string { return JSON.stringify( PatchV2TasksTaskIdLinkedRecordUnion$outboundSchema.parse( patchV2TasksTaskIdLinkedRecordUnion, ), ); } export function patchV2TasksTaskIdLinkedRecordUnionFromJSON( jsonString: string, ): SafeParseResult<PatchV2TasksTaskIdLinkedRecordUnion, SDKValidationError> { return safeParse( jsonString, (x) => PatchV2TasksTaskIdLinkedRecordUnion$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PatchV2TasksTaskIdLinkedRecordUnion' from JSON`, ); } /** @internal */ export const PatchV2TasksTaskIdAssignee$inboundSchema: z.ZodType< PatchV2TasksTaskIdAssignee, z.ZodTypeDef, unknown > = z.object({ workspace_member_email_address: z.string(), }).transform((v) => { return remap$(v, { "workspace_member_email_address": "workspaceMemberEmailAddress", }); }); /** @internal */ export type PatchV2TasksTaskIdAssignee$Outbound = { workspace_member_email_address: string; }; /** @internal */ export const PatchV2TasksTaskIdAssignee$outboundSchema: z.ZodType< PatchV2TasksTaskIdAssignee$Outbound, z.ZodTypeDef, PatchV2TasksTaskIdAssignee > = z.object({ workspaceMemberEmailAddress: z.string(), }).transform((v) => { return remap$(v, { workspaceMemberEmailAddress: "workspace_member_email_address", }); }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace PatchV2TasksTaskIdAssignee$ { /** @deprecated use `PatchV2TasksTaskIdAssignee$inboundSchema` instead. */ export const inboundSchema = PatchV2TasksTaskIdAssignee$inboundSchema; /** @deprecated use `PatchV2TasksTaskIdAssignee$outboundSchema` instead. */ export const outboundSchema = PatchV2TasksTaskIdAssignee$outboundSchema; /** @deprecated use `PatchV2TasksTaskIdAssignee$Outbound` instead. */ export type Outbound = PatchV2TasksTaskIdAssignee$Outbound; } export function patchV2TasksTaskIdAssigneeToJSON( patchV2TasksTaskIdAssignee: PatchV2TasksTaskIdAssignee, ): string { return JSON.stringify( PatchV2TasksTaskIdAssignee$outboundSchema.parse(patchV2TasksTaskIdAssignee), ); } export function patchV2TasksTaskIdAssigneeFromJSON( jsonString: string, ): SafeParseResult<PatchV2TasksTaskIdAssignee, SDKValidationError> { return safeParse( jsonString, (x) => PatchV2TasksTaskIdAssignee$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PatchV2TasksTaskIdAssignee' from JSON`, ); } /** @internal */ export const PatchV2TasksTaskIdReferencedActorType$inboundSchema: z.ZodNativeEnum<typeof PatchV2TasksTaskIdReferencedActorType> = z.nativeEnum( PatchV2TasksTaskIdReferencedActorType, ); /** @internal */ export const PatchV2TasksTaskIdReferencedActorType$outboundSchema: z.ZodNativeEnum<typeof PatchV2TasksTaskIdReferencedActorType> = PatchV2TasksTaskIdReferencedActorType$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace PatchV2TasksTaskIdReferencedActorType$ { /** @deprecated use `PatchV2TasksTaskIdReferencedActorType$inboundSchema` instead. */ export const inboundSchema = PatchV2TasksTaskIdReferencedActorType$inboundSchema; /** @deprecated use `PatchV2TasksTaskIdReferencedActorType$outboundSchema` instead. */ export const outboundSchema = PatchV2TasksTaskIdReferencedActorType$outboundSchema; } /** @internal */ export const PatchV2TasksTaskIdAssigneeWorkspaceMember$inboundSchema: z.ZodType< PatchV2TasksTaskIdAssigneeWorkspaceMember, z.ZodTypeDef, unknown > = z.object({ referenced_actor_type: PatchV2TasksTaskIdReferencedActorType$inboundSchema, referenced_actor_id: z.string(), }).transform((v) => { return remap$(v, { "referenced_actor_type": "referencedActorType", "referenced_actor_id": "referencedActorId", }); }); /** @internal */ export type PatchV2TasksTaskIdAssigneeWorkspaceMember$Outbound = { referenced_actor_type: string; referenced_actor_id: string; }; /** @internal */ export const PatchV2TasksTaskIdAssigneeWorkspaceMember$outboundSchema: z.ZodType< PatchV2TasksTaskIdAssigneeWorkspaceMember$Outbound, z.ZodTypeDef, PatchV2TasksTaskIdAssigneeWorkspaceMember > = z.object({ referencedActorType: PatchV2TasksTaskIdReferencedActorType$outboundSchema, referencedActorId: z.string(), }).transform((v) => { return remap$(v, { referencedActorType: "referenced_actor_type", referencedActorId: "referenced_actor_id", }); }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace PatchV2TasksTaskIdAssigneeWorkspaceMember$ { /** @deprecated use `PatchV2TasksTaskIdAssigneeWorkspaceMember$inboundSchema` instead. */ export const inboundSchema = PatchV2TasksTaskIdAssigneeWorkspaceMember$inboundSchema; /** @deprecated use `PatchV2TasksTaskIdAssigneeWorkspaceMember$outboundSchema` instead. */ export const outboundSchema = PatchV2TasksTaskIdAssigneeWorkspaceMember$outboundSchema; /** @deprecated use `PatchV2TasksTaskIdAssigneeWorkspaceMember$Outbound` instead. */ export type Outbound = PatchV2TasksTaskIdAssigneeWorkspaceMember$Outbound; } export function patchV2TasksTaskIdAssigneeWorkspaceMemberToJSON( patchV2TasksTaskIdAssigneeWorkspaceMember: PatchV2TasksTaskIdAssigneeWorkspaceMember, ): string { return JSON.stringify( PatchV2TasksTaskIdAssigneeWorkspaceMember$outboundSchema.parse( patchV2TasksTaskIdAssigneeWorkspaceMember, ), ); } export function patchV2TasksTaskIdAssigneeWorkspaceMemberFromJSON( jsonString: string, ): SafeParseResult< PatchV2TasksTaskIdAssigneeWorkspaceMember, SDKValidationError > { return safeParse( jsonString, (x) => PatchV2TasksTaskIdAssigneeWorkspaceMember$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'PatchV2TasksTaskIdAssigneeWorkspaceMember' from JSON`, ); } /** @internal */ export const PatchV2TasksTaskIdAssigneeUnion$inboundSchema: z.ZodType< PatchV2TasksTaskIdAssigneeUnion, z.ZodTypeDef, unknown > = z.union([ z.lazy(() => PatchV2TasksTaskIdAssignee$inboundSchema), z.lazy(() => PatchV2TasksTaskIdAssigneeWorkspaceMember$inboundSchema), ]); /** @internal */ export type PatchV2TasksTaskIdAssigneeUnion$Outbound = | PatchV2TasksTaskIdAssignee$Outbound | PatchV2TasksTaskIdAssigneeWorkspaceMember$Outbound; /** @internal */ export const PatchV2TasksTaskIdAssigneeUnion$outboundSchema: z.ZodType< PatchV2TasksTaskIdAssigneeUnion$Outbound, z.ZodTypeDef, PatchV2TasksTaskIdAssigneeUnion > = z.union([ z.lazy(() => PatchV2TasksTaskIdAssignee$outboundSchema), z.lazy(() => PatchV2TasksTaskIdAssigneeWorkspaceMember$outboundSchema), ]); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace PatchV2TasksTaskIdAssigneeUnion$ { /** @deprecated use `PatchV2TasksTaskIdAssigneeUnion$inboundSchema` instead. */ export const inboundSchema = PatchV2TasksTaskIdAssigneeUnion$inboundSchema; /** @deprecated use `PatchV2TasksTaskIdAssigneeUnion$outboundSchema` instead. */ export const outboundSchema = PatchV2TasksTaskIdAssigneeUnion$outboundSchema; /** @deprecated use `PatchV2TasksTaskIdAssigneeUnion$Outbound` instead. */ export type Outbound = PatchV2TasksTaskIdAssigneeUnion$Outbound; } export function patchV2TasksTaskIdAssigneeUnionToJSON( patchV2TasksTaskIdAssigneeUnion: PatchV2TasksTaskIdAssigneeUnion, ): string { return JSON.stringify( PatchV2TasksTaskIdAssigneeUnion$outboundSchema.parse( patchV2TasksTaskIdAssigneeUnion, ), ); } export function patchV2TasksTaskIdAssigneeUnionFromJSON( jsonString: string, ): SafeParseResult<PatchV2TasksTaskIdAssigneeUnion, SDKValidationError> { return safeParse( jsonString, (x) => PatchV2TasksTaskIdAssigneeUnion$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PatchV2TasksTaskIdAssigneeUnion' from JSON`, ); } /** @internal */ export const PatchV2TasksTaskIdData$inboundSchema: z.ZodType< PatchV2TasksTaskIdData, z.ZodTypeDef, unknown > = z.object({ deadline_at: z.nullable(z.string()).optional(), is_completed: z.boolean().optional(), linked_records: z.array( z.union([ z.lazy(() => PatchV2TasksTaskIdLinkedRecord1$inboundSchema), z.lazy(() => PatchV2TasksTaskIdLinkedRecord2$inboundSchema), ]), ).optional(), assignees: z.array( z.union([ z.lazy(() => PatchV2TasksTaskIdAssignee$inboundSchema), z.lazy(() => PatchV2TasksTaskIdAssigneeWorkspaceMember$inboundSchema), ]), ).optional(), }).transform((v) => { return remap$(v, { "deadline_at": "deadlineAt", "is_completed": "isCompleted", "linked_records": "linkedRecords", }); }); /** @internal */ export type PatchV2TasksTaskIdData$Outbound = { deadline_at?: string | null | undefined; is_completed?: boolean | undefined; linked_records?: | Array< | PatchV2TasksTaskIdLinkedRecord1$Outbound | PatchV2TasksTaskIdLinkedRecord2$Outbound > | undefined; assignees?: | Array< | PatchV2TasksTaskIdAssignee$Outbound | PatchV2TasksTaskIdAssigneeWorkspaceMember$Outbound > | undefined; }; /** @internal */ export const PatchV2TasksTaskIdData$outboundSchema: z.ZodType< PatchV2TasksTaskIdData$Outbound, z.ZodTypeDef, PatchV2TasksTaskIdData > = z.object({ deadlineAt: z.nullable(z.string()).optional(), isCompleted: z.boolean().optional(), linkedRecords: z.array( z.union([ z.lazy(() => PatchV2TasksTaskIdLinkedRecord1$outboundSchema), z.lazy(() => PatchV2TasksTaskIdLinkedRecord2$outboundSchema), ]), ).optional(), assignees: z.array( z.union([ z.lazy(() => PatchV2TasksTaskIdAssignee$outboundSchema), z.lazy(() => PatchV2TasksTaskIdAssigneeWorkspaceMember$outboundSchema), ]), ).optional(), }).transform((v) => { return remap$(v, { deadlineAt: "deadline_at", isCompleted: "is_completed", linkedRecords: "linked_records", }); }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace PatchV2TasksTaskIdData$ { /** @deprecated use `PatchV2TasksTaskIdData$inboundSchema` instead. */ export const inboundSchema = PatchV2TasksTaskIdData$inboundSchema; /** @deprecated use `PatchV2TasksTaskIdData$outboundSchema` instead. */ export const outboundSchema = PatchV2TasksTaskIdData$outboundSchema; /** @deprecated use `PatchV2TasksTaskIdData$Outbound` instead. */ export type Outbound = PatchV2TasksTaskIdData$Outbound; } export function patchV2TasksTaskIdDataToJSON( patchV2TasksTaskIdData: PatchV2TasksTaskIdData, ): string { return JSON.stringify( PatchV2TasksTaskIdData$outboundSchema.parse(patchV2TasksTaskIdData), ); } export function patchV2TasksTaskIdDataFromJSON( jsonString: string, ): SafeParseResult<PatchV2TasksTaskIdData, SDKValidationError> { return safeParse( jsonString, (x) => PatchV2TasksTaskIdData$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PatchV2TasksTaskIdData' from JSON`, ); } /** @internal */ export const PatchV2TasksTaskIdRequestBody$inboundSchema: z.ZodType< PatchV2TasksTaskIdRequestBody, z.ZodTypeDef, unknown > = z.object({ data: z.lazy(() => PatchV2TasksTaskIdData$inboundSchema), }); /** @internal */ export type PatchV2TasksTaskIdRequestBody$Outbound = { data: PatchV2TasksTaskIdData$Outbound; }; /** @internal */ export const PatchV2TasksTaskIdRequestBody$outboundSchema: z.ZodType< PatchV2TasksTaskIdRequestBody$Outbound, z.ZodTypeDef, PatchV2TasksTaskIdRequestBody > = z.object({ data: z.lazy(() => PatchV2TasksTaskIdData$outboundSchema), }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace PatchV2TasksTaskIdRequestBody$ { /** @deprecated use `PatchV2TasksTaskIdRequestBody$inboundSchema` instead. */ export const inboundSchema = PatchV2TasksTaskIdRequestBody$inboundSchema; /** @deprecated use `PatchV2TasksTaskIdRequestBody$outboundSchema` instead. */ export const outboundSchema = PatchV2TasksTaskIdRequestBody$outboundSchema; /** @deprecated use `PatchV2TasksTaskIdRequestBody$Outbound` instead. */ export type Outbound = PatchV2TasksTaskIdRequestBody$Outbound; } export function patchV2TasksTaskIdRequestBodyToJSON( patchV2TasksTaskIdRequestBody: PatchV2TasksTaskIdRequestBody, ): string { return JSON.stringify( PatchV2TasksTaskIdRequestBody$outboundSchema.parse( patchV2TasksTaskIdRequestBody, ), ); } export function patchV2TasksTaskIdRequestBodyFromJSON( jsonString: string, ): SafeParseResult<PatchV2TasksTaskIdRequestBody, SDKValidationError> { return safeParse( jsonString, (x) => PatchV2TasksTaskIdRequestBody$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PatchV2TasksTaskIdRequestBody' from JSON`, ); } /** @internal */ export const PatchV2TasksTaskIdRequest$inboundSchema: z.ZodType< PatchV2TasksTaskIdRequest, z.ZodTypeDef, unknown > = z.object({ task_id: z.string(), RequestBody: z.lazy(() => PatchV2TasksTaskIdRequestBody$inboundSchema), }).transform((v) => { return remap$(v, { "task_id": "taskId", "RequestBody": "requestBody", }); }); /** @internal */ export type PatchV2TasksTaskIdRequest$Outbound = { task_id: string; RequestBody: PatchV2TasksTaskIdRequestBody$Outbound; }; /** @internal */ export const PatchV2TasksTaskIdRequest$outboundSchema: z.ZodType< PatchV2TasksTaskIdRequest$Outbound, z.ZodTypeDef, PatchV2TasksTaskIdRequest > = z.object({ taskId: z.string(), requestBody: z.lazy(() => PatchV2TasksTaskIdRequestBody$outboundSchema), }).transform((v) => { return remap$(v, { taskId: "task_id", requestBody: "RequestBody", }); }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace PatchV2TasksTaskIdRequest$ { /** @deprecated use `PatchV2TasksTaskIdRequest$inboundSchema` instead. */ export const inboundSchema = PatchV2TasksTaskIdRequest$inboundSchema; /** @deprecated use `PatchV2TasksTaskIdRequest$outboundSchema` instead. */ export const outboundSchema = PatchV2TasksTaskIdRequest$outboundSchema; /** @deprecated use `PatchV2TasksTaskIdRequest$Outbound` instead. */ export type Outbound = PatchV2TasksTaskIdRequest$Outbound; } export function patchV2TasksTaskIdRequestToJSON( patchV2TasksTaskIdRequest: PatchV2TasksTaskIdRequest, ): string { return JSON.stringify( PatchV2TasksTaskIdRequest$outboundSchema.parse(patchV2TasksTaskIdRequest), ); } export function patchV2TasksTaskIdRequestFromJSON( jsonString: string, ): SafeParseResult<PatchV2TasksTaskIdRequest, SDKValidationError> { return safeParse( jsonString, (x) => PatchV2TasksTaskIdRequest$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PatchV2TasksTaskIdRequest' from JSON`, ); } /** @internal */ export const PatchV2TasksTaskIdResponse$inboundSchema: z.ZodType< PatchV2TasksTaskIdResponse, z.ZodTypeDef, unknown > = z.object({ data: Task$inboundSchema, }); /** @internal */ export type PatchV2TasksTaskIdResponse$Outbound = { data: Task$Outbound; }; /** @internal */ export const PatchV2TasksTaskIdResponse$outboundSchema: z.ZodType< PatchV2TasksTaskIdResponse$Outbound, z.ZodTypeDef, PatchV2TasksTaskIdResponse > = z.object({ data: Task$outboundSchema, }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace PatchV2TasksTaskIdResponse$ { /** @deprecated use `PatchV2TasksTaskIdResponse$inboundSchema` instead. */ export const inboundSchema = PatchV2TasksTaskIdResponse$inboundSchema; /** @deprecated use `PatchV2TasksTaskIdResponse$outboundSchema` instead. */ export const outboundSchema = PatchV2TasksTaskIdResponse$outboundSchema; /** @deprecated use `PatchV2TasksTaskIdResponse$Outbound` instead. */ export type Outbound = PatchV2TasksTaskIdResponse$Outbound; } export function patchV2TasksTaskIdResponseToJSON( patchV2TasksTaskIdResponse: PatchV2TasksTaskIdResponse, ): string { return JSON.stringify( PatchV2TasksTaskIdResponse$outboundSchema.parse(patchV2TasksTaskIdResponse), ); } export function patchV2TasksTaskIdResponseFromJSON( jsonString: string, ): SafeParseResult<PatchV2TasksTaskIdResponse, SDKValidationError> { return safeParse( jsonString, (x) => PatchV2TasksTaskIdResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PatchV2TasksTaskIdResponse' from JSON`, ); }