attio-js
Version:
Developer-friendly & type-safe JS/TS SDK based on the official OpenAPI spec of Attio.
828 lines • 36 kB
JavaScript
/*
* 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 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",
};
/**
* 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",
};
/** @internal */
export const PatchV2TasksTaskIdSlugOrIdOfMatchingAttribute5$inboundSchema = z.object({
value: z.string().optional(),
});
/** @internal */
export const PatchV2TasksTaskIdSlugOrIdOfMatchingAttribute5$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 PatchV2TasksTaskIdSlugOrIdOfMatchingAttribute5$;
(function (PatchV2TasksTaskIdSlugOrIdOfMatchingAttribute5$) {
/** @deprecated use `PatchV2TasksTaskIdSlugOrIdOfMatchingAttribute5$inboundSchema` instead. */
PatchV2TasksTaskIdSlugOrIdOfMatchingAttribute5$.inboundSchema = PatchV2TasksTaskIdSlugOrIdOfMatchingAttribute5$inboundSchema;
/** @deprecated use `PatchV2TasksTaskIdSlugOrIdOfMatchingAttribute5$outboundSchema` instead. */
PatchV2TasksTaskIdSlugOrIdOfMatchingAttribute5$.outboundSchema = PatchV2TasksTaskIdSlugOrIdOfMatchingAttribute5$outboundSchema;
})(PatchV2TasksTaskIdSlugOrIdOfMatchingAttribute5$ || (PatchV2TasksTaskIdSlugOrIdOfMatchingAttribute5$ = {}));
export function patchV2TasksTaskIdSlugOrIdOfMatchingAttribute5ToJSON(patchV2TasksTaskIdSlugOrIdOfMatchingAttribute5) {
return JSON.stringify(PatchV2TasksTaskIdSlugOrIdOfMatchingAttribute5$outboundSchema.parse(patchV2TasksTaskIdSlugOrIdOfMatchingAttribute5));
}
export function patchV2TasksTaskIdSlugOrIdOfMatchingAttribute5FromJSON(jsonString) {
return safeParse(jsonString, (x) => PatchV2TasksTaskIdSlugOrIdOfMatchingAttribute5$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PatchV2TasksTaskIdSlugOrIdOfMatchingAttribute5' from JSON`);
}
/** @internal */
export const PatchV2TasksTaskIdCountryCode$inboundSchema = z.nativeEnum(PatchV2TasksTaskIdCountryCode);
/** @internal */
export const PatchV2TasksTaskIdCountryCode$outboundSchema = PatchV2TasksTaskIdCountryCode$inboundSchema;
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export var PatchV2TasksTaskIdCountryCode$;
(function (PatchV2TasksTaskIdCountryCode$) {
/** @deprecated use `PatchV2TasksTaskIdCountryCode$inboundSchema` instead. */
PatchV2TasksTaskIdCountryCode$.inboundSchema = PatchV2TasksTaskIdCountryCode$inboundSchema;
/** @deprecated use `PatchV2TasksTaskIdCountryCode$outboundSchema` instead. */
PatchV2TasksTaskIdCountryCode$.outboundSchema = PatchV2TasksTaskIdCountryCode$outboundSchema;
})(PatchV2TasksTaskIdCountryCode$ || (PatchV2TasksTaskIdCountryCode$ = {}));
/** @internal */
export const PatchV2TasksTaskIdSlugOrIdOfMatchingAttribute4$inboundSchema = 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 const PatchV2TasksTaskIdSlugOrIdOfMatchingAttribute4$outboundSchema = 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 var PatchV2TasksTaskIdSlugOrIdOfMatchingAttribute4$;
(function (PatchV2TasksTaskIdSlugOrIdOfMatchingAttribute4$) {
/** @deprecated use `PatchV2TasksTaskIdSlugOrIdOfMatchingAttribute4$inboundSchema` instead. */
PatchV2TasksTaskIdSlugOrIdOfMatchingAttribute4$.inboundSchema = PatchV2TasksTaskIdSlugOrIdOfMatchingAttribute4$inboundSchema;
/** @deprecated use `PatchV2TasksTaskIdSlugOrIdOfMatchingAttribute4$outboundSchema` instead. */
PatchV2TasksTaskIdSlugOrIdOfMatchingAttribute4$.outboundSchema = PatchV2TasksTaskIdSlugOrIdOfMatchingAttribute4$outboundSchema;
})(PatchV2TasksTaskIdSlugOrIdOfMatchingAttribute4$ || (PatchV2TasksTaskIdSlugOrIdOfMatchingAttribute4$ = {}));
export function patchV2TasksTaskIdSlugOrIdOfMatchingAttribute4ToJSON(patchV2TasksTaskIdSlugOrIdOfMatchingAttribute4) {
return JSON.stringify(PatchV2TasksTaskIdSlugOrIdOfMatchingAttribute4$outboundSchema.parse(patchV2TasksTaskIdSlugOrIdOfMatchingAttribute4));
}
export function patchV2TasksTaskIdSlugOrIdOfMatchingAttribute4FromJSON(jsonString) {
return safeParse(jsonString, (x) => PatchV2TasksTaskIdSlugOrIdOfMatchingAttribute4$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PatchV2TasksTaskIdSlugOrIdOfMatchingAttribute4' from JSON`);
}
/** @internal */
export const PatchV2TasksTaskIdSlugOrIdOfMatchingAttribute3$inboundSchema = z.object({
value: z.number().optional(),
});
/** @internal */
export const PatchV2TasksTaskIdSlugOrIdOfMatchingAttribute3$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 PatchV2TasksTaskIdSlugOrIdOfMatchingAttribute3$;
(function (PatchV2TasksTaskIdSlugOrIdOfMatchingAttribute3$) {
/** @deprecated use `PatchV2TasksTaskIdSlugOrIdOfMatchingAttribute3$inboundSchema` instead. */
PatchV2TasksTaskIdSlugOrIdOfMatchingAttribute3$.inboundSchema = PatchV2TasksTaskIdSlugOrIdOfMatchingAttribute3$inboundSchema;
/** @deprecated use `PatchV2TasksTaskIdSlugOrIdOfMatchingAttribute3$outboundSchema` instead. */
PatchV2TasksTaskIdSlugOrIdOfMatchingAttribute3$.outboundSchema = PatchV2TasksTaskIdSlugOrIdOfMatchingAttribute3$outboundSchema;
})(PatchV2TasksTaskIdSlugOrIdOfMatchingAttribute3$ || (PatchV2TasksTaskIdSlugOrIdOfMatchingAttribute3$ = {}));
export function patchV2TasksTaskIdSlugOrIdOfMatchingAttribute3ToJSON(patchV2TasksTaskIdSlugOrIdOfMatchingAttribute3) {
return JSON.stringify(PatchV2TasksTaskIdSlugOrIdOfMatchingAttribute3$outboundSchema.parse(patchV2TasksTaskIdSlugOrIdOfMatchingAttribute3));
}
export function patchV2TasksTaskIdSlugOrIdOfMatchingAttribute3FromJSON(jsonString) {
return safeParse(jsonString, (x) => PatchV2TasksTaskIdSlugOrIdOfMatchingAttribute3$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PatchV2TasksTaskIdSlugOrIdOfMatchingAttribute3' from JSON`);
}
/** @internal */
export const PatchV2TasksTaskIdSlugOrIdOfMatchingAttribute2$inboundSchema = z.object({
email_address: z.string().optional(),
}).transform((v) => {
return remap$(v, {
"email_address": "emailAddress",
});
});
/** @internal */
export const PatchV2TasksTaskIdSlugOrIdOfMatchingAttribute2$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 PatchV2TasksTaskIdSlugOrIdOfMatchingAttribute2$;
(function (PatchV2TasksTaskIdSlugOrIdOfMatchingAttribute2$) {
/** @deprecated use `PatchV2TasksTaskIdSlugOrIdOfMatchingAttribute2$inboundSchema` instead. */
PatchV2TasksTaskIdSlugOrIdOfMatchingAttribute2$.inboundSchema = PatchV2TasksTaskIdSlugOrIdOfMatchingAttribute2$inboundSchema;
/** @deprecated use `PatchV2TasksTaskIdSlugOrIdOfMatchingAttribute2$outboundSchema` instead. */
PatchV2TasksTaskIdSlugOrIdOfMatchingAttribute2$.outboundSchema = PatchV2TasksTaskIdSlugOrIdOfMatchingAttribute2$outboundSchema;
})(PatchV2TasksTaskIdSlugOrIdOfMatchingAttribute2$ || (PatchV2TasksTaskIdSlugOrIdOfMatchingAttribute2$ = {}));
export function patchV2TasksTaskIdSlugOrIdOfMatchingAttribute2ToJSON(patchV2TasksTaskIdSlugOrIdOfMatchingAttribute2) {
return JSON.stringify(PatchV2TasksTaskIdSlugOrIdOfMatchingAttribute2$outboundSchema.parse(patchV2TasksTaskIdSlugOrIdOfMatchingAttribute2));
}
export function patchV2TasksTaskIdSlugOrIdOfMatchingAttribute2FromJSON(jsonString) {
return safeParse(jsonString, (x) => PatchV2TasksTaskIdSlugOrIdOfMatchingAttribute2$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PatchV2TasksTaskIdSlugOrIdOfMatchingAttribute2' from JSON`);
}
/** @internal */
export const PatchV2TasksTaskIdSlugOrIdOfMatchingAttribute1$inboundSchema = z.object({
domain: z.string().optional(),
});
/** @internal */
export const PatchV2TasksTaskIdSlugOrIdOfMatchingAttribute1$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 PatchV2TasksTaskIdSlugOrIdOfMatchingAttribute1$;
(function (PatchV2TasksTaskIdSlugOrIdOfMatchingAttribute1$) {
/** @deprecated use `PatchV2TasksTaskIdSlugOrIdOfMatchingAttribute1$inboundSchema` instead. */
PatchV2TasksTaskIdSlugOrIdOfMatchingAttribute1$.inboundSchema = PatchV2TasksTaskIdSlugOrIdOfMatchingAttribute1$inboundSchema;
/** @deprecated use `PatchV2TasksTaskIdSlugOrIdOfMatchingAttribute1$outboundSchema` instead. */
PatchV2TasksTaskIdSlugOrIdOfMatchingAttribute1$.outboundSchema = PatchV2TasksTaskIdSlugOrIdOfMatchingAttribute1$outboundSchema;
})(PatchV2TasksTaskIdSlugOrIdOfMatchingAttribute1$ || (PatchV2TasksTaskIdSlugOrIdOfMatchingAttribute1$ = {}));
export function patchV2TasksTaskIdSlugOrIdOfMatchingAttribute1ToJSON(patchV2TasksTaskIdSlugOrIdOfMatchingAttribute1) {
return JSON.stringify(PatchV2TasksTaskIdSlugOrIdOfMatchingAttribute1$outboundSchema.parse(patchV2TasksTaskIdSlugOrIdOfMatchingAttribute1));
}
export function patchV2TasksTaskIdSlugOrIdOfMatchingAttribute1FromJSON(jsonString) {
return safeParse(jsonString, (x) => PatchV2TasksTaskIdSlugOrIdOfMatchingAttribute1$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PatchV2TasksTaskIdSlugOrIdOfMatchingAttribute1' from JSON`);
}
/** @internal */
export const PatchV2TasksTaskIdSlugOrIdOfMatchingAttributeUnion$inboundSchema = z.union([
z.lazy(() => PatchV2TasksTaskIdSlugOrIdOfMatchingAttribute1$inboundSchema),
z.lazy(() => PatchV2TasksTaskIdSlugOrIdOfMatchingAttribute2$inboundSchema),
z.lazy(() => PatchV2TasksTaskIdSlugOrIdOfMatchingAttribute3$inboundSchema),
z.lazy(() => PatchV2TasksTaskIdSlugOrIdOfMatchingAttribute5$inboundSchema),
z.lazy(() => PatchV2TasksTaskIdSlugOrIdOfMatchingAttribute4$inboundSchema),
]);
/** @internal */
export const PatchV2TasksTaskIdSlugOrIdOfMatchingAttributeUnion$outboundSchema = 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 var PatchV2TasksTaskIdSlugOrIdOfMatchingAttributeUnion$;
(function (PatchV2TasksTaskIdSlugOrIdOfMatchingAttributeUnion$) {
/** @deprecated use `PatchV2TasksTaskIdSlugOrIdOfMatchingAttributeUnion$inboundSchema` instead. */
PatchV2TasksTaskIdSlugOrIdOfMatchingAttributeUnion$.inboundSchema = PatchV2TasksTaskIdSlugOrIdOfMatchingAttributeUnion$inboundSchema;
/** @deprecated use `PatchV2TasksTaskIdSlugOrIdOfMatchingAttributeUnion$outboundSchema` instead. */
PatchV2TasksTaskIdSlugOrIdOfMatchingAttributeUnion$.outboundSchema = PatchV2TasksTaskIdSlugOrIdOfMatchingAttributeUnion$outboundSchema;
})(PatchV2TasksTaskIdSlugOrIdOfMatchingAttributeUnion$ || (PatchV2TasksTaskIdSlugOrIdOfMatchingAttributeUnion$ = {}));
export function patchV2TasksTaskIdSlugOrIdOfMatchingAttributeUnionToJSON(patchV2TasksTaskIdSlugOrIdOfMatchingAttributeUnion) {
return JSON.stringify(PatchV2TasksTaskIdSlugOrIdOfMatchingAttributeUnion$outboundSchema.parse(patchV2TasksTaskIdSlugOrIdOfMatchingAttributeUnion));
}
export function patchV2TasksTaskIdSlugOrIdOfMatchingAttributeUnionFromJSON(jsonString) {
return safeParse(jsonString, (x) => PatchV2TasksTaskIdSlugOrIdOfMatchingAttributeUnion$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PatchV2TasksTaskIdSlugOrIdOfMatchingAttributeUnion' from JSON`);
}
/** @internal */
export const PatchV2TasksTaskIdLinkedRecord2$inboundSchema = 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 const PatchV2TasksTaskIdLinkedRecord2$outboundSchema = 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 var PatchV2TasksTaskIdLinkedRecord2$;
(function (PatchV2TasksTaskIdLinkedRecord2$) {
/** @deprecated use `PatchV2TasksTaskIdLinkedRecord2$inboundSchema` instead. */
PatchV2TasksTaskIdLinkedRecord2$.inboundSchema = PatchV2TasksTaskIdLinkedRecord2$inboundSchema;
/** @deprecated use `PatchV2TasksTaskIdLinkedRecord2$outboundSchema` instead. */
PatchV2TasksTaskIdLinkedRecord2$.outboundSchema = PatchV2TasksTaskIdLinkedRecord2$outboundSchema;
})(PatchV2TasksTaskIdLinkedRecord2$ || (PatchV2TasksTaskIdLinkedRecord2$ = {}));
export function patchV2TasksTaskIdLinkedRecord2ToJSON(patchV2TasksTaskIdLinkedRecord2) {
return JSON.stringify(PatchV2TasksTaskIdLinkedRecord2$outboundSchema.parse(patchV2TasksTaskIdLinkedRecord2));
}
export function patchV2TasksTaskIdLinkedRecord2FromJSON(jsonString) {
return safeParse(jsonString, (x) => PatchV2TasksTaskIdLinkedRecord2$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PatchV2TasksTaskIdLinkedRecord2' from JSON`);
}
/** @internal */
export const PatchV2TasksTaskIdLinkedRecord1$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 PatchV2TasksTaskIdLinkedRecord1$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 PatchV2TasksTaskIdLinkedRecord1$;
(function (PatchV2TasksTaskIdLinkedRecord1$) {
/** @deprecated use `PatchV2TasksTaskIdLinkedRecord1$inboundSchema` instead. */
PatchV2TasksTaskIdLinkedRecord1$.inboundSchema = PatchV2TasksTaskIdLinkedRecord1$inboundSchema;
/** @deprecated use `PatchV2TasksTaskIdLinkedRecord1$outboundSchema` instead. */
PatchV2TasksTaskIdLinkedRecord1$.outboundSchema = PatchV2TasksTaskIdLinkedRecord1$outboundSchema;
})(PatchV2TasksTaskIdLinkedRecord1$ || (PatchV2TasksTaskIdLinkedRecord1$ = {}));
export function patchV2TasksTaskIdLinkedRecord1ToJSON(patchV2TasksTaskIdLinkedRecord1) {
return JSON.stringify(PatchV2TasksTaskIdLinkedRecord1$outboundSchema.parse(patchV2TasksTaskIdLinkedRecord1));
}
export function patchV2TasksTaskIdLinkedRecord1FromJSON(jsonString) {
return safeParse(jsonString, (x) => PatchV2TasksTaskIdLinkedRecord1$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PatchV2TasksTaskIdLinkedRecord1' from JSON`);
}
/** @internal */
export const PatchV2TasksTaskIdLinkedRecordUnion$inboundSchema = z.union([
z.lazy(() => PatchV2TasksTaskIdLinkedRecord1$inboundSchema),
z.lazy(() => PatchV2TasksTaskIdLinkedRecord2$inboundSchema),
]);
/** @internal */
export const PatchV2TasksTaskIdLinkedRecordUnion$outboundSchema = 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 var PatchV2TasksTaskIdLinkedRecordUnion$;
(function (PatchV2TasksTaskIdLinkedRecordUnion$) {
/** @deprecated use `PatchV2TasksTaskIdLinkedRecordUnion$inboundSchema` instead. */
PatchV2TasksTaskIdLinkedRecordUnion$.inboundSchema = PatchV2TasksTaskIdLinkedRecordUnion$inboundSchema;
/** @deprecated use `PatchV2TasksTaskIdLinkedRecordUnion$outboundSchema` instead. */
PatchV2TasksTaskIdLinkedRecordUnion$.outboundSchema = PatchV2TasksTaskIdLinkedRecordUnion$outboundSchema;
})(PatchV2TasksTaskIdLinkedRecordUnion$ || (PatchV2TasksTaskIdLinkedRecordUnion$ = {}));
export function patchV2TasksTaskIdLinkedRecordUnionToJSON(patchV2TasksTaskIdLinkedRecordUnion) {
return JSON.stringify(PatchV2TasksTaskIdLinkedRecordUnion$outboundSchema.parse(patchV2TasksTaskIdLinkedRecordUnion));
}
export function patchV2TasksTaskIdLinkedRecordUnionFromJSON(jsonString) {
return safeParse(jsonString, (x) => PatchV2TasksTaskIdLinkedRecordUnion$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PatchV2TasksTaskIdLinkedRecordUnion' from JSON`);
}
/** @internal */
export const PatchV2TasksTaskIdAssignee$inboundSchema = z.object({
workspace_member_email_address: z.string(),
}).transform((v) => {
return remap$(v, {
"workspace_member_email_address": "workspaceMemberEmailAddress",
});
});
/** @internal */
export const PatchV2TasksTaskIdAssignee$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 PatchV2TasksTaskIdAssignee$;
(function (PatchV2TasksTaskIdAssignee$) {
/** @deprecated use `PatchV2TasksTaskIdAssignee$inboundSchema` instead. */
PatchV2TasksTaskIdAssignee$.inboundSchema = PatchV2TasksTaskIdAssignee$inboundSchema;
/** @deprecated use `PatchV2TasksTaskIdAssignee$outboundSchema` instead. */
PatchV2TasksTaskIdAssignee$.outboundSchema = PatchV2TasksTaskIdAssignee$outboundSchema;
})(PatchV2TasksTaskIdAssignee$ || (PatchV2TasksTaskIdAssignee$ = {}));
export function patchV2TasksTaskIdAssigneeToJSON(patchV2TasksTaskIdAssignee) {
return JSON.stringify(PatchV2TasksTaskIdAssignee$outboundSchema.parse(patchV2TasksTaskIdAssignee));
}
export function patchV2TasksTaskIdAssigneeFromJSON(jsonString) {
return safeParse(jsonString, (x) => PatchV2TasksTaskIdAssignee$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PatchV2TasksTaskIdAssignee' from JSON`);
}
/** @internal */
export const PatchV2TasksTaskIdReferencedActorType$inboundSchema = z.nativeEnum(PatchV2TasksTaskIdReferencedActorType);
/** @internal */
export const PatchV2TasksTaskIdReferencedActorType$outboundSchema = PatchV2TasksTaskIdReferencedActorType$inboundSchema;
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export var PatchV2TasksTaskIdReferencedActorType$;
(function (PatchV2TasksTaskIdReferencedActorType$) {
/** @deprecated use `PatchV2TasksTaskIdReferencedActorType$inboundSchema` instead. */
PatchV2TasksTaskIdReferencedActorType$.inboundSchema = PatchV2TasksTaskIdReferencedActorType$inboundSchema;
/** @deprecated use `PatchV2TasksTaskIdReferencedActorType$outboundSchema` instead. */
PatchV2TasksTaskIdReferencedActorType$.outboundSchema = PatchV2TasksTaskIdReferencedActorType$outboundSchema;
})(PatchV2TasksTaskIdReferencedActorType$ || (PatchV2TasksTaskIdReferencedActorType$ = {}));
/** @internal */
export const PatchV2TasksTaskIdAssigneeWorkspaceMember$inboundSchema = 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 const PatchV2TasksTaskIdAssigneeWorkspaceMember$outboundSchema = 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 var PatchV2TasksTaskIdAssigneeWorkspaceMember$;
(function (PatchV2TasksTaskIdAssigneeWorkspaceMember$) {
/** @deprecated use `PatchV2TasksTaskIdAssigneeWorkspaceMember$inboundSchema` instead. */
PatchV2TasksTaskIdAssigneeWorkspaceMember$.inboundSchema = PatchV2TasksTaskIdAssigneeWorkspaceMember$inboundSchema;
/** @deprecated use `PatchV2TasksTaskIdAssigneeWorkspaceMember$outboundSchema` instead. */
PatchV2TasksTaskIdAssigneeWorkspaceMember$.outboundSchema = PatchV2TasksTaskIdAssigneeWorkspaceMember$outboundSchema;
})(PatchV2TasksTaskIdAssigneeWorkspaceMember$ || (PatchV2TasksTaskIdAssigneeWorkspaceMember$ = {}));
export function patchV2TasksTaskIdAssigneeWorkspaceMemberToJSON(patchV2TasksTaskIdAssigneeWorkspaceMember) {
return JSON.stringify(PatchV2TasksTaskIdAssigneeWorkspaceMember$outboundSchema.parse(patchV2TasksTaskIdAssigneeWorkspaceMember));
}
export function patchV2TasksTaskIdAssigneeWorkspaceMemberFromJSON(jsonString) {
return safeParse(jsonString, (x) => PatchV2TasksTaskIdAssigneeWorkspaceMember$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PatchV2TasksTaskIdAssigneeWorkspaceMember' from JSON`);
}
/** @internal */
export const PatchV2TasksTaskIdAssigneeUnion$inboundSchema = z.union([
z.lazy(() => PatchV2TasksTaskIdAssignee$inboundSchema),
z.lazy(() => PatchV2TasksTaskIdAssigneeWorkspaceMember$inboundSchema),
]);
/** @internal */
export const PatchV2TasksTaskIdAssigneeUnion$outboundSchema = 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 var PatchV2TasksTaskIdAssigneeUnion$;
(function (PatchV2TasksTaskIdAssigneeUnion$) {
/** @deprecated use `PatchV2TasksTaskIdAssigneeUnion$inboundSchema` instead. */
PatchV2TasksTaskIdAssigneeUnion$.inboundSchema = PatchV2TasksTaskIdAssigneeUnion$inboundSchema;
/** @deprecated use `PatchV2TasksTaskIdAssigneeUnion$outboundSchema` instead. */
PatchV2TasksTaskIdAssigneeUnion$.outboundSchema = PatchV2TasksTaskIdAssigneeUnion$outboundSchema;
})(PatchV2TasksTaskIdAssigneeUnion$ || (PatchV2TasksTaskIdAssigneeUnion$ = {}));
export function patchV2TasksTaskIdAssigneeUnionToJSON(patchV2TasksTaskIdAssigneeUnion) {
return JSON.stringify(PatchV2TasksTaskIdAssigneeUnion$outboundSchema.parse(patchV2TasksTaskIdAssigneeUnion));
}
export function patchV2TasksTaskIdAssigneeUnionFromJSON(jsonString) {
return safeParse(jsonString, (x) => PatchV2TasksTaskIdAssigneeUnion$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PatchV2TasksTaskIdAssigneeUnion' from JSON`);
}
/** @internal */
export const PatchV2TasksTaskIdData$inboundSchema = 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 const PatchV2TasksTaskIdData$outboundSchema = 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 var PatchV2TasksTaskIdData$;
(function (PatchV2TasksTaskIdData$) {
/** @deprecated use `PatchV2TasksTaskIdData$inboundSchema` instead. */
PatchV2TasksTaskIdData$.inboundSchema = PatchV2TasksTaskIdData$inboundSchema;
/** @deprecated use `PatchV2TasksTaskIdData$outboundSchema` instead. */
PatchV2TasksTaskIdData$.outboundSchema = PatchV2TasksTaskIdData$outboundSchema;
})(PatchV2TasksTaskIdData$ || (PatchV2TasksTaskIdData$ = {}));
export function patchV2TasksTaskIdDataToJSON(patchV2TasksTaskIdData) {
return JSON.stringify(PatchV2TasksTaskIdData$outboundSchema.parse(patchV2TasksTaskIdData));
}
export function patchV2TasksTaskIdDataFromJSON(jsonString) {
return safeParse(jsonString, (x) => PatchV2TasksTaskIdData$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PatchV2TasksTaskIdData' from JSON`);
}
/** @internal */
export const PatchV2TasksTaskIdRequestBody$inboundSchema = z.object({
data: z.lazy(() => PatchV2TasksTaskIdData$inboundSchema),
});
/** @internal */
export const PatchV2TasksTaskIdRequestBody$outboundSchema = 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 var PatchV2TasksTaskIdRequestBody$;
(function (PatchV2TasksTaskIdRequestBody$) {
/** @deprecated use `PatchV2TasksTaskIdRequestBody$inboundSchema` instead. */
PatchV2TasksTaskIdRequestBody$.inboundSchema = PatchV2TasksTaskIdRequestBody$inboundSchema;
/** @deprecated use `PatchV2TasksTaskIdRequestBody$outboundSchema` instead. */
PatchV2TasksTaskIdRequestBody$.outboundSchema = PatchV2TasksTaskIdRequestBody$outboundSchema;
})(PatchV2TasksTaskIdRequestBody$ || (PatchV2TasksTaskIdRequestBody$ = {}));
export function patchV2TasksTaskIdRequestBodyToJSON(patchV2TasksTaskIdRequestBody) {
return JSON.stringify(PatchV2TasksTaskIdRequestBody$outboundSchema.parse(patchV2TasksTaskIdRequestBody));
}
export function patchV2TasksTaskIdRequestBodyFromJSON(jsonString) {
return safeParse(jsonString, (x) => PatchV2TasksTaskIdRequestBody$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PatchV2TasksTaskIdRequestBody' from JSON`);
}
/** @internal */
export const PatchV2TasksTaskIdRequest$inboundSchema = z.object({
task_id: z.string(),
RequestBody: z.lazy(() => PatchV2TasksTaskIdRequestBody$inboundSchema),
}).transform((v) => {
return remap$(v, {
"task_id": "taskId",
"RequestBody": "requestBody",
});
});
/** @internal */
export const PatchV2TasksTaskIdRequest$outboundSchema = 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 var PatchV2TasksTaskIdRequest$;
(function (PatchV2TasksTaskIdRequest$) {
/** @deprecated use `PatchV2TasksTaskIdRequest$inboundSchema` instead. */
PatchV2TasksTaskIdRequest$.inboundSchema = PatchV2TasksTaskIdRequest$inboundSchema;
/** @deprecated use `PatchV2TasksTaskIdRequest$outboundSchema` instead. */
PatchV2TasksTaskIdRequest$.outboundSchema = PatchV2TasksTaskIdRequest$outboundSchema;
})(PatchV2TasksTaskIdRequest$ || (PatchV2TasksTaskIdRequest$ = {}));
export function patchV2TasksTaskIdRequestToJSON(patchV2TasksTaskIdRequest) {
return JSON.stringify(PatchV2TasksTaskIdRequest$outboundSchema.parse(patchV2TasksTaskIdRequest));
}
export function patchV2TasksTaskIdRequestFromJSON(jsonString) {
return safeParse(jsonString, (x) => PatchV2TasksTaskIdRequest$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PatchV2TasksTaskIdRequest' from JSON`);
}
/** @internal */
export const PatchV2TasksTaskIdResponse$inboundSchema = z.object({
data: Task$inboundSchema,
});
/** @internal */
export const PatchV2TasksTaskIdResponse$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 PatchV2TasksTaskIdResponse$;
(function (PatchV2TasksTaskIdResponse$) {
/** @deprecated use `PatchV2TasksTaskIdResponse$inboundSchema` instead. */
PatchV2TasksTaskIdResponse$.inboundSchema = PatchV2TasksTaskIdResponse$inboundSchema;
/** @deprecated use `PatchV2TasksTaskIdResponse$outboundSchema` instead. */
PatchV2TasksTaskIdResponse$.outboundSchema = PatchV2TasksTaskIdResponse$outboundSchema;
})(PatchV2TasksTaskIdResponse$ || (PatchV2TasksTaskIdResponse$ = {}));
export function patchV2TasksTaskIdResponseToJSON(patchV2TasksTaskIdResponse) {
return JSON.stringify(PatchV2TasksTaskIdResponse$outboundSchema.parse(patchV2TasksTaskIdResponse));
}
export function patchV2TasksTaskIdResponseFromJSON(jsonString) {
return safeParse(jsonString, (x) => PatchV2TasksTaskIdResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PatchV2TasksTaskIdResponse' from JSON`);
}
//# sourceMappingURL=patchv2taskstaskid.js.map