UNPKG

attio-js

Version:

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

814 lines 32.8 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 { Task$inboundSchema, Task$outboundSchema, } from "../components/task.js"; /** * The format of the task content to be created. Rich text formatting, links and @references are not supported. */ export const PostV2TasksFormat = { Plaintext: "plaintext", }; /** * The ISO 3166-1 alpha-2 country code representing the country that this phone number belongs to. */ export const PostV2TasksCountryCode = { 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", }; /** * 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 PostV2TasksReferencedActorType = { WorkspaceMember: "workspace-member", }; /** @internal */ export const PostV2TasksFormat$inboundSchema = z.nativeEnum(PostV2TasksFormat); /** @internal */ export const PostV2TasksFormat$outboundSchema = PostV2TasksFormat$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export var PostV2TasksFormat$; (function (PostV2TasksFormat$) { /** @deprecated use `PostV2TasksFormat$inboundSchema` instead. */ PostV2TasksFormat$.inboundSchema = PostV2TasksFormat$inboundSchema; /** @deprecated use `PostV2TasksFormat$outboundSchema` instead. */ PostV2TasksFormat$.outboundSchema = PostV2TasksFormat$outboundSchema; })(PostV2TasksFormat$ || (PostV2TasksFormat$ = {})); /** @internal */ export const PostV2TasksSlugOrIdOfMatchingAttribute5$inboundSchema = z.object({ value: z.string().optional(), }); /** @internal */ export const PostV2TasksSlugOrIdOfMatchingAttribute5$outboundSchema = 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 var PostV2TasksSlugOrIdOfMatchingAttribute5$; (function (PostV2TasksSlugOrIdOfMatchingAttribute5$) { /** @deprecated use `PostV2TasksSlugOrIdOfMatchingAttribute5$inboundSchema` instead. */ PostV2TasksSlugOrIdOfMatchingAttribute5$.inboundSchema = PostV2TasksSlugOrIdOfMatchingAttribute5$inboundSchema; /** @deprecated use `PostV2TasksSlugOrIdOfMatchingAttribute5$outboundSchema` instead. */ PostV2TasksSlugOrIdOfMatchingAttribute5$.outboundSchema = PostV2TasksSlugOrIdOfMatchingAttribute5$outboundSchema; })(PostV2TasksSlugOrIdOfMatchingAttribute5$ || (PostV2TasksSlugOrIdOfMatchingAttribute5$ = {})); export function postV2TasksSlugOrIdOfMatchingAttribute5ToJSON(postV2TasksSlugOrIdOfMatchingAttribute5) { return JSON.stringify(PostV2TasksSlugOrIdOfMatchingAttribute5$outboundSchema.parse(postV2TasksSlugOrIdOfMatchingAttribute5)); } export function postV2TasksSlugOrIdOfMatchingAttribute5FromJSON(jsonString) { return safeParse(jsonString, (x) => PostV2TasksSlugOrIdOfMatchingAttribute5$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PostV2TasksSlugOrIdOfMatchingAttribute5' from JSON`); } /** @internal */ export const PostV2TasksCountryCode$inboundSchema = z.nativeEnum(PostV2TasksCountryCode); /** @internal */ export const PostV2TasksCountryCode$outboundSchema = PostV2TasksCountryCode$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export var PostV2TasksCountryCode$; (function (PostV2TasksCountryCode$) { /** @deprecated use `PostV2TasksCountryCode$inboundSchema` instead. */ PostV2TasksCountryCode$.inboundSchema = PostV2TasksCountryCode$inboundSchema; /** @deprecated use `PostV2TasksCountryCode$outboundSchema` instead. */ PostV2TasksCountryCode$.outboundSchema = PostV2TasksCountryCode$outboundSchema; })(PostV2TasksCountryCode$ || (PostV2TasksCountryCode$ = {})); /** @internal */ export const PostV2TasksSlugOrIdOfMatchingAttribute4$inboundSchema = z.object({ original_phone_number: z.string().optional(), country_code: z.nullable(PostV2TasksCountryCode$inboundSchema).optional(), }).transform((v) => { return remap$(v, { "original_phone_number": "originalPhoneNumber", "country_code": "countryCode", }); }); /** @internal */ export const PostV2TasksSlugOrIdOfMatchingAttribute4$outboundSchema = z.object({ originalPhoneNumber: z.string().optional(), countryCode: z.nullable(PostV2TasksCountryCode$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 var PostV2TasksSlugOrIdOfMatchingAttribute4$; (function (PostV2TasksSlugOrIdOfMatchingAttribute4$) { /** @deprecated use `PostV2TasksSlugOrIdOfMatchingAttribute4$inboundSchema` instead. */ PostV2TasksSlugOrIdOfMatchingAttribute4$.inboundSchema = PostV2TasksSlugOrIdOfMatchingAttribute4$inboundSchema; /** @deprecated use `PostV2TasksSlugOrIdOfMatchingAttribute4$outboundSchema` instead. */ PostV2TasksSlugOrIdOfMatchingAttribute4$.outboundSchema = PostV2TasksSlugOrIdOfMatchingAttribute4$outboundSchema; })(PostV2TasksSlugOrIdOfMatchingAttribute4$ || (PostV2TasksSlugOrIdOfMatchingAttribute4$ = {})); export function postV2TasksSlugOrIdOfMatchingAttribute4ToJSON(postV2TasksSlugOrIdOfMatchingAttribute4) { return JSON.stringify(PostV2TasksSlugOrIdOfMatchingAttribute4$outboundSchema.parse(postV2TasksSlugOrIdOfMatchingAttribute4)); } export function postV2TasksSlugOrIdOfMatchingAttribute4FromJSON(jsonString) { return safeParse(jsonString, (x) => PostV2TasksSlugOrIdOfMatchingAttribute4$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PostV2TasksSlugOrIdOfMatchingAttribute4' from JSON`); } /** @internal */ export const PostV2TasksSlugOrIdOfMatchingAttribute3$inboundSchema = z.object({ value: z.number().optional(), }); /** @internal */ export const PostV2TasksSlugOrIdOfMatchingAttribute3$outboundSchema = 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 var PostV2TasksSlugOrIdOfMatchingAttribute3$; (function (PostV2TasksSlugOrIdOfMatchingAttribute3$) { /** @deprecated use `PostV2TasksSlugOrIdOfMatchingAttribute3$inboundSchema` instead. */ PostV2TasksSlugOrIdOfMatchingAttribute3$.inboundSchema = PostV2TasksSlugOrIdOfMatchingAttribute3$inboundSchema; /** @deprecated use `PostV2TasksSlugOrIdOfMatchingAttribute3$outboundSchema` instead. */ PostV2TasksSlugOrIdOfMatchingAttribute3$.outboundSchema = PostV2TasksSlugOrIdOfMatchingAttribute3$outboundSchema; })(PostV2TasksSlugOrIdOfMatchingAttribute3$ || (PostV2TasksSlugOrIdOfMatchingAttribute3$ = {})); export function postV2TasksSlugOrIdOfMatchingAttribute3ToJSON(postV2TasksSlugOrIdOfMatchingAttribute3) { return JSON.stringify(PostV2TasksSlugOrIdOfMatchingAttribute3$outboundSchema.parse(postV2TasksSlugOrIdOfMatchingAttribute3)); } export function postV2TasksSlugOrIdOfMatchingAttribute3FromJSON(jsonString) { return safeParse(jsonString, (x) => PostV2TasksSlugOrIdOfMatchingAttribute3$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PostV2TasksSlugOrIdOfMatchingAttribute3' from JSON`); } /** @internal */ export const PostV2TasksSlugOrIdOfMatchingAttribute2$inboundSchema = z.object({ email_address: z.string().optional(), }).transform((v) => { return remap$(v, { "email_address": "emailAddress", }); }); /** @internal */ export const PostV2TasksSlugOrIdOfMatchingAttribute2$outboundSchema = 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 var PostV2TasksSlugOrIdOfMatchingAttribute2$; (function (PostV2TasksSlugOrIdOfMatchingAttribute2$) { /** @deprecated use `PostV2TasksSlugOrIdOfMatchingAttribute2$inboundSchema` instead. */ PostV2TasksSlugOrIdOfMatchingAttribute2$.inboundSchema = PostV2TasksSlugOrIdOfMatchingAttribute2$inboundSchema; /** @deprecated use `PostV2TasksSlugOrIdOfMatchingAttribute2$outboundSchema` instead. */ PostV2TasksSlugOrIdOfMatchingAttribute2$.outboundSchema = PostV2TasksSlugOrIdOfMatchingAttribute2$outboundSchema; })(PostV2TasksSlugOrIdOfMatchingAttribute2$ || (PostV2TasksSlugOrIdOfMatchingAttribute2$ = {})); export function postV2TasksSlugOrIdOfMatchingAttribute2ToJSON(postV2TasksSlugOrIdOfMatchingAttribute2) { return JSON.stringify(PostV2TasksSlugOrIdOfMatchingAttribute2$outboundSchema.parse(postV2TasksSlugOrIdOfMatchingAttribute2)); } export function postV2TasksSlugOrIdOfMatchingAttribute2FromJSON(jsonString) { return safeParse(jsonString, (x) => PostV2TasksSlugOrIdOfMatchingAttribute2$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PostV2TasksSlugOrIdOfMatchingAttribute2' from JSON`); } /** @internal */ export const PostV2TasksSlugOrIdOfMatchingAttribute1$inboundSchema = z.object({ domain: z.string().optional(), }); /** @internal */ export const PostV2TasksSlugOrIdOfMatchingAttribute1$outboundSchema = 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 var PostV2TasksSlugOrIdOfMatchingAttribute1$; (function (PostV2TasksSlugOrIdOfMatchingAttribute1$) { /** @deprecated use `PostV2TasksSlugOrIdOfMatchingAttribute1$inboundSchema` instead. */ PostV2TasksSlugOrIdOfMatchingAttribute1$.inboundSchema = PostV2TasksSlugOrIdOfMatchingAttribute1$inboundSchema; /** @deprecated use `PostV2TasksSlugOrIdOfMatchingAttribute1$outboundSchema` instead. */ PostV2TasksSlugOrIdOfMatchingAttribute1$.outboundSchema = PostV2TasksSlugOrIdOfMatchingAttribute1$outboundSchema; })(PostV2TasksSlugOrIdOfMatchingAttribute1$ || (PostV2TasksSlugOrIdOfMatchingAttribute1$ = {})); export function postV2TasksSlugOrIdOfMatchingAttribute1ToJSON(postV2TasksSlugOrIdOfMatchingAttribute1) { return JSON.stringify(PostV2TasksSlugOrIdOfMatchingAttribute1$outboundSchema.parse(postV2TasksSlugOrIdOfMatchingAttribute1)); } export function postV2TasksSlugOrIdOfMatchingAttribute1FromJSON(jsonString) { return safeParse(jsonString, (x) => PostV2TasksSlugOrIdOfMatchingAttribute1$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PostV2TasksSlugOrIdOfMatchingAttribute1' from JSON`); } /** @internal */ export const PostV2TasksSlugOrIdOfMatchingAttributeUnion$inboundSchema = z.union([ z.lazy(() => PostV2TasksSlugOrIdOfMatchingAttribute1$inboundSchema), z.lazy(() => PostV2TasksSlugOrIdOfMatchingAttribute2$inboundSchema), z.lazy(() => PostV2TasksSlugOrIdOfMatchingAttribute3$inboundSchema), z.lazy(() => PostV2TasksSlugOrIdOfMatchingAttribute5$inboundSchema), z.lazy(() => PostV2TasksSlugOrIdOfMatchingAttribute4$inboundSchema), ]); /** @internal */ export const PostV2TasksSlugOrIdOfMatchingAttributeUnion$outboundSchema = z.union([ z.lazy(() => PostV2TasksSlugOrIdOfMatchingAttribute1$outboundSchema), z.lazy(() => PostV2TasksSlugOrIdOfMatchingAttribute2$outboundSchema), z.lazy(() => PostV2TasksSlugOrIdOfMatchingAttribute3$outboundSchema), z.lazy(() => PostV2TasksSlugOrIdOfMatchingAttribute5$outboundSchema), z.lazy(() => PostV2TasksSlugOrIdOfMatchingAttribute4$outboundSchema), ]); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export var PostV2TasksSlugOrIdOfMatchingAttributeUnion$; (function (PostV2TasksSlugOrIdOfMatchingAttributeUnion$) { /** @deprecated use `PostV2TasksSlugOrIdOfMatchingAttributeUnion$inboundSchema` instead. */ PostV2TasksSlugOrIdOfMatchingAttributeUnion$.inboundSchema = PostV2TasksSlugOrIdOfMatchingAttributeUnion$inboundSchema; /** @deprecated use `PostV2TasksSlugOrIdOfMatchingAttributeUnion$outboundSchema` instead. */ PostV2TasksSlugOrIdOfMatchingAttributeUnion$.outboundSchema = PostV2TasksSlugOrIdOfMatchingAttributeUnion$outboundSchema; })(PostV2TasksSlugOrIdOfMatchingAttributeUnion$ || (PostV2TasksSlugOrIdOfMatchingAttributeUnion$ = {})); export function postV2TasksSlugOrIdOfMatchingAttributeUnionToJSON(postV2TasksSlugOrIdOfMatchingAttributeUnion) { return JSON.stringify(PostV2TasksSlugOrIdOfMatchingAttributeUnion$outboundSchema.parse(postV2TasksSlugOrIdOfMatchingAttributeUnion)); } export function postV2TasksSlugOrIdOfMatchingAttributeUnionFromJSON(jsonString) { return safeParse(jsonString, (x) => PostV2TasksSlugOrIdOfMatchingAttributeUnion$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PostV2TasksSlugOrIdOfMatchingAttributeUnion' from JSON`); } /** @internal */ export const PostV2TasksLinkedRecord2$inboundSchema = z.object({ target_object: z.string(), "[slug_or_id_of_matching_attribute]": z.array(z.union([ z.lazy(() => PostV2TasksSlugOrIdOfMatchingAttribute1$inboundSchema), z.lazy(() => PostV2TasksSlugOrIdOfMatchingAttribute2$inboundSchema), z.lazy(() => PostV2TasksSlugOrIdOfMatchingAttribute3$inboundSchema), z.lazy(() => PostV2TasksSlugOrIdOfMatchingAttribute5$inboundSchema), z.lazy(() => PostV2TasksSlugOrIdOfMatchingAttribute4$inboundSchema), ])), }).transform((v) => { return remap$(v, { "target_object": "targetObject", "[slug_or_id_of_matching_attribute]": "slugOrIdOfMatchingAttribute", }); }); /** @internal */ export const PostV2TasksLinkedRecord2$outboundSchema = z.object({ targetObject: z.string(), slugOrIdOfMatchingAttribute: z.array(z.union([ z.lazy(() => PostV2TasksSlugOrIdOfMatchingAttribute1$outboundSchema), z.lazy(() => PostV2TasksSlugOrIdOfMatchingAttribute2$outboundSchema), z.lazy(() => PostV2TasksSlugOrIdOfMatchingAttribute3$outboundSchema), z.lazy(() => PostV2TasksSlugOrIdOfMatchingAttribute5$outboundSchema), z.lazy(() => PostV2TasksSlugOrIdOfMatchingAttribute4$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 var PostV2TasksLinkedRecord2$; (function (PostV2TasksLinkedRecord2$) { /** @deprecated use `PostV2TasksLinkedRecord2$inboundSchema` instead. */ PostV2TasksLinkedRecord2$.inboundSchema = PostV2TasksLinkedRecord2$inboundSchema; /** @deprecated use `PostV2TasksLinkedRecord2$outboundSchema` instead. */ PostV2TasksLinkedRecord2$.outboundSchema = PostV2TasksLinkedRecord2$outboundSchema; })(PostV2TasksLinkedRecord2$ || (PostV2TasksLinkedRecord2$ = {})); export function postV2TasksLinkedRecord2ToJSON(postV2TasksLinkedRecord2) { return JSON.stringify(PostV2TasksLinkedRecord2$outboundSchema.parse(postV2TasksLinkedRecord2)); } export function postV2TasksLinkedRecord2FromJSON(jsonString) { return safeParse(jsonString, (x) => PostV2TasksLinkedRecord2$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PostV2TasksLinkedRecord2' from JSON`); } /** @internal */ export const PostV2TasksLinkedRecord1$inboundSchema = 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 const PostV2TasksLinkedRecord1$outboundSchema = 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 var PostV2TasksLinkedRecord1$; (function (PostV2TasksLinkedRecord1$) { /** @deprecated use `PostV2TasksLinkedRecord1$inboundSchema` instead. */ PostV2TasksLinkedRecord1$.inboundSchema = PostV2TasksLinkedRecord1$inboundSchema; /** @deprecated use `PostV2TasksLinkedRecord1$outboundSchema` instead. */ PostV2TasksLinkedRecord1$.outboundSchema = PostV2TasksLinkedRecord1$outboundSchema; })(PostV2TasksLinkedRecord1$ || (PostV2TasksLinkedRecord1$ = {})); export function postV2TasksLinkedRecord1ToJSON(postV2TasksLinkedRecord1) { return JSON.stringify(PostV2TasksLinkedRecord1$outboundSchema.parse(postV2TasksLinkedRecord1)); } export function postV2TasksLinkedRecord1FromJSON(jsonString) { return safeParse(jsonString, (x) => PostV2TasksLinkedRecord1$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PostV2TasksLinkedRecord1' from JSON`); } /** @internal */ export const PostV2TasksLinkedRecordUnion$inboundSchema = z.union([ z.lazy(() => PostV2TasksLinkedRecord1$inboundSchema), z.lazy(() => PostV2TasksLinkedRecord2$inboundSchema), ]); /** @internal */ export const PostV2TasksLinkedRecordUnion$outboundSchema = z.union([ z.lazy(() => PostV2TasksLinkedRecord1$outboundSchema), z.lazy(() => PostV2TasksLinkedRecord2$outboundSchema), ]); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export var PostV2TasksLinkedRecordUnion$; (function (PostV2TasksLinkedRecordUnion$) { /** @deprecated use `PostV2TasksLinkedRecordUnion$inboundSchema` instead. */ PostV2TasksLinkedRecordUnion$.inboundSchema = PostV2TasksLinkedRecordUnion$inboundSchema; /** @deprecated use `PostV2TasksLinkedRecordUnion$outboundSchema` instead. */ PostV2TasksLinkedRecordUnion$.outboundSchema = PostV2TasksLinkedRecordUnion$outboundSchema; })(PostV2TasksLinkedRecordUnion$ || (PostV2TasksLinkedRecordUnion$ = {})); export function postV2TasksLinkedRecordUnionToJSON(postV2TasksLinkedRecordUnion) { return JSON.stringify(PostV2TasksLinkedRecordUnion$outboundSchema.parse(postV2TasksLinkedRecordUnion)); } export function postV2TasksLinkedRecordUnionFromJSON(jsonString) { return safeParse(jsonString, (x) => PostV2TasksLinkedRecordUnion$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PostV2TasksLinkedRecordUnion' from JSON`); } /** @internal */ export const PostV2TasksAssignee$inboundSchema = z.object({ workspace_member_email_address: z.string(), }).transform((v) => { return remap$(v, { "workspace_member_email_address": "workspaceMemberEmailAddress", }); }); /** @internal */ export const PostV2TasksAssignee$outboundSchema = 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 var PostV2TasksAssignee$; (function (PostV2TasksAssignee$) { /** @deprecated use `PostV2TasksAssignee$inboundSchema` instead. */ PostV2TasksAssignee$.inboundSchema = PostV2TasksAssignee$inboundSchema; /** @deprecated use `PostV2TasksAssignee$outboundSchema` instead. */ PostV2TasksAssignee$.outboundSchema = PostV2TasksAssignee$outboundSchema; })(PostV2TasksAssignee$ || (PostV2TasksAssignee$ = {})); export function postV2TasksAssigneeToJSON(postV2TasksAssignee) { return JSON.stringify(PostV2TasksAssignee$outboundSchema.parse(postV2TasksAssignee)); } export function postV2TasksAssigneeFromJSON(jsonString) { return safeParse(jsonString, (x) => PostV2TasksAssignee$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PostV2TasksAssignee' from JSON`); } /** @internal */ export const PostV2TasksReferencedActorType$inboundSchema = z.nativeEnum(PostV2TasksReferencedActorType); /** @internal */ export const PostV2TasksReferencedActorType$outboundSchema = PostV2TasksReferencedActorType$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export var PostV2TasksReferencedActorType$; (function (PostV2TasksReferencedActorType$) { /** @deprecated use `PostV2TasksReferencedActorType$inboundSchema` instead. */ PostV2TasksReferencedActorType$.inboundSchema = PostV2TasksReferencedActorType$inboundSchema; /** @deprecated use `PostV2TasksReferencedActorType$outboundSchema` instead. */ PostV2TasksReferencedActorType$.outboundSchema = PostV2TasksReferencedActorType$outboundSchema; })(PostV2TasksReferencedActorType$ || (PostV2TasksReferencedActorType$ = {})); /** @internal */ export const PostV2TasksAssigneeWorkspaceMember$inboundSchema = z.object({ referenced_actor_type: PostV2TasksReferencedActorType$inboundSchema, referenced_actor_id: z.string(), }).transform((v) => { return remap$(v, { "referenced_actor_type": "referencedActorType", "referenced_actor_id": "referencedActorId", }); }); /** @internal */ export const PostV2TasksAssigneeWorkspaceMember$outboundSchema = z.object({ referencedActorType: PostV2TasksReferencedActorType$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 var PostV2TasksAssigneeWorkspaceMember$; (function (PostV2TasksAssigneeWorkspaceMember$) { /** @deprecated use `PostV2TasksAssigneeWorkspaceMember$inboundSchema` instead. */ PostV2TasksAssigneeWorkspaceMember$.inboundSchema = PostV2TasksAssigneeWorkspaceMember$inboundSchema; /** @deprecated use `PostV2TasksAssigneeWorkspaceMember$outboundSchema` instead. */ PostV2TasksAssigneeWorkspaceMember$.outboundSchema = PostV2TasksAssigneeWorkspaceMember$outboundSchema; })(PostV2TasksAssigneeWorkspaceMember$ || (PostV2TasksAssigneeWorkspaceMember$ = {})); export function postV2TasksAssigneeWorkspaceMemberToJSON(postV2TasksAssigneeWorkspaceMember) { return JSON.stringify(PostV2TasksAssigneeWorkspaceMember$outboundSchema.parse(postV2TasksAssigneeWorkspaceMember)); } export function postV2TasksAssigneeWorkspaceMemberFromJSON(jsonString) { return safeParse(jsonString, (x) => PostV2TasksAssigneeWorkspaceMember$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PostV2TasksAssigneeWorkspaceMember' from JSON`); } /** @internal */ export const PostV2TasksAssigneeUnion$inboundSchema = z.union([ z.lazy(() => PostV2TasksAssignee$inboundSchema), z.lazy(() => PostV2TasksAssigneeWorkspaceMember$inboundSchema), ]); /** @internal */ export const PostV2TasksAssigneeUnion$outboundSchema = z.union([ z.lazy(() => PostV2TasksAssignee$outboundSchema), z.lazy(() => PostV2TasksAssigneeWorkspaceMember$outboundSchema), ]); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export var PostV2TasksAssigneeUnion$; (function (PostV2TasksAssigneeUnion$) { /** @deprecated use `PostV2TasksAssigneeUnion$inboundSchema` instead. */ PostV2TasksAssigneeUnion$.inboundSchema = PostV2TasksAssigneeUnion$inboundSchema; /** @deprecated use `PostV2TasksAssigneeUnion$outboundSchema` instead. */ PostV2TasksAssigneeUnion$.outboundSchema = PostV2TasksAssigneeUnion$outboundSchema; })(PostV2TasksAssigneeUnion$ || (PostV2TasksAssigneeUnion$ = {})); export function postV2TasksAssigneeUnionToJSON(postV2TasksAssigneeUnion) { return JSON.stringify(PostV2TasksAssigneeUnion$outboundSchema.parse(postV2TasksAssigneeUnion)); } export function postV2TasksAssigneeUnionFromJSON(jsonString) { return safeParse(jsonString, (x) => PostV2TasksAssigneeUnion$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PostV2TasksAssigneeUnion' from JSON`); } /** @internal */ export const PostV2TasksData$inboundSchema = z.object({ content: z.string(), format: PostV2TasksFormat$inboundSchema, deadline_at: z.nullable(z.string()), is_completed: z.boolean(), linked_records: z.array(z.union([ z.lazy(() => PostV2TasksLinkedRecord1$inboundSchema), z.lazy(() => PostV2TasksLinkedRecord2$inboundSchema), ])), assignees: z.array(z.union([ z.lazy(() => PostV2TasksAssignee$inboundSchema), z.lazy(() => PostV2TasksAssigneeWorkspaceMember$inboundSchema), ])), }).transform((v) => { return remap$(v, { "deadline_at": "deadlineAt", "is_completed": "isCompleted", "linked_records": "linkedRecords", }); }); /** @internal */ export const PostV2TasksData$outboundSchema = z.object({ content: z.string(), format: PostV2TasksFormat$outboundSchema, deadlineAt: z.nullable(z.string()), isCompleted: z.boolean(), linkedRecords: z.array(z.union([ z.lazy(() => PostV2TasksLinkedRecord1$outboundSchema), z.lazy(() => PostV2TasksLinkedRecord2$outboundSchema), ])), assignees: z.array(z.union([ z.lazy(() => PostV2TasksAssignee$outboundSchema), z.lazy(() => PostV2TasksAssigneeWorkspaceMember$outboundSchema), ])), }).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 var PostV2TasksData$; (function (PostV2TasksData$) { /** @deprecated use `PostV2TasksData$inboundSchema` instead. */ PostV2TasksData$.inboundSchema = PostV2TasksData$inboundSchema; /** @deprecated use `PostV2TasksData$outboundSchema` instead. */ PostV2TasksData$.outboundSchema = PostV2TasksData$outboundSchema; })(PostV2TasksData$ || (PostV2TasksData$ = {})); export function postV2TasksDataToJSON(postV2TasksData) { return JSON.stringify(PostV2TasksData$outboundSchema.parse(postV2TasksData)); } export function postV2TasksDataFromJSON(jsonString) { return safeParse(jsonString, (x) => PostV2TasksData$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PostV2TasksData' from JSON`); } /** @internal */ export const PostV2TasksRequest$inboundSchema = z.object({ data: z.lazy(() => PostV2TasksData$inboundSchema), }); /** @internal */ export const PostV2TasksRequest$outboundSchema = z.object({ data: z.lazy(() => PostV2TasksData$outboundSchema), }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export var PostV2TasksRequest$; (function (PostV2TasksRequest$) { /** @deprecated use `PostV2TasksRequest$inboundSchema` instead. */ PostV2TasksRequest$.inboundSchema = PostV2TasksRequest$inboundSchema; /** @deprecated use `PostV2TasksRequest$outboundSchema` instead. */ PostV2TasksRequest$.outboundSchema = PostV2TasksRequest$outboundSchema; })(PostV2TasksRequest$ || (PostV2TasksRequest$ = {})); export function postV2TasksRequestToJSON(postV2TasksRequest) { return JSON.stringify(PostV2TasksRequest$outboundSchema.parse(postV2TasksRequest)); } export function postV2TasksRequestFromJSON(jsonString) { return safeParse(jsonString, (x) => PostV2TasksRequest$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PostV2TasksRequest' from JSON`); } /** @internal */ export const PostV2TasksResponse$inboundSchema = z.object({ data: Task$inboundSchema, }); /** @internal */ export const PostV2TasksResponse$outboundSchema = 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 var PostV2TasksResponse$; (function (PostV2TasksResponse$) { /** @deprecated use `PostV2TasksResponse$inboundSchema` instead. */ PostV2TasksResponse$.inboundSchema = PostV2TasksResponse$inboundSchema; /** @deprecated use `PostV2TasksResponse$outboundSchema` instead. */ PostV2TasksResponse$.outboundSchema = PostV2TasksResponse$outboundSchema; })(PostV2TasksResponse$ || (PostV2TasksResponse$ = {})); export function postV2TasksResponseToJSON(postV2TasksResponse) { return JSON.stringify(PostV2TasksResponse$outboundSchema.parse(postV2TasksResponse)); } export function postV2TasksResponseFromJSON(jsonString) { return safeParse(jsonString, (x) => PostV2TasksResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PostV2TasksResponse' from JSON`); } //# sourceMappingURL=postv2tasks.js.map