UNPKG

attio-js

Version:

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

143 lines 6.72 kB
import * as z from "zod"; import { ClosedEnum } from "../../types/enums.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { Note, Note$Outbound } from "../components/note.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; /** * The format of the note content to be created. The `plaintext` format uses the line feed character `\n` to create new lines within the note content. The `markdown` format supports rich text formatting, and links. */ export declare const PostV2NotesFormat: { readonly Plaintext: "plaintext"; readonly Markdown: "markdown"; }; /** * The format of the note content to be created. The `plaintext` format uses the line feed character `\n` to create new lines within the note content. The `markdown` format supports rich text formatting, and links. */ export type PostV2NotesFormat = ClosedEnum<typeof PostV2NotesFormat>; export type PostV2NotesData = { /** * The ID or slug of the parent object the note belongs to. */ parentObject: string; /** * The ID of the parent record the note belongs to. */ parentRecordId: string; /** * The note title. The title is plaintext only and has no formatting. */ title: string; /** * The format of the note content to be created. The `plaintext` format uses the line feed character `\n` to create new lines within the note content. The `markdown` format supports rich text formatting, and links. */ format: PostV2NotesFormat; /** * The representation of the note content in the specified format. */ content: string; /** * `created_at` will default to the current time. However, if you wish to backdate a note for migration or other purposes, you can override with a custom `created_at` value. Note that dates before 1970 or in the future are not allowed. */ createdAt?: string | undefined; }; export type PostV2NotesRequest = { data: PostV2NotesData; }; /** * Success */ export type PostV2NotesResponse = { data: Note; }; /** @internal */ export declare const PostV2NotesFormat$inboundSchema: z.ZodNativeEnum<typeof PostV2NotesFormat>; /** @internal */ export declare const PostV2NotesFormat$outboundSchema: z.ZodNativeEnum<typeof PostV2NotesFormat>; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export declare namespace PostV2NotesFormat$ { /** @deprecated use `PostV2NotesFormat$inboundSchema` instead. */ const inboundSchema: z.ZodNativeEnum<{ readonly Plaintext: "plaintext"; readonly Markdown: "markdown"; }>; /** @deprecated use `PostV2NotesFormat$outboundSchema` instead. */ const outboundSchema: z.ZodNativeEnum<{ readonly Plaintext: "plaintext"; readonly Markdown: "markdown"; }>; } /** @internal */ export declare const PostV2NotesData$inboundSchema: z.ZodType<PostV2NotesData, z.ZodTypeDef, unknown>; /** @internal */ export type PostV2NotesData$Outbound = { parent_object: string; parent_record_id: string; title: string; format: string; content: string; created_at?: string | undefined; }; /** @internal */ export declare const PostV2NotesData$outboundSchema: z.ZodType<PostV2NotesData$Outbound, z.ZodTypeDef, PostV2NotesData>; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export declare namespace PostV2NotesData$ { /** @deprecated use `PostV2NotesData$inboundSchema` instead. */ const inboundSchema: z.ZodType<PostV2NotesData, z.ZodTypeDef, unknown>; /** @deprecated use `PostV2NotesData$outboundSchema` instead. */ const outboundSchema: z.ZodType<PostV2NotesData$Outbound, z.ZodTypeDef, PostV2NotesData>; /** @deprecated use `PostV2NotesData$Outbound` instead. */ type Outbound = PostV2NotesData$Outbound; } export declare function postV2NotesDataToJSON(postV2NotesData: PostV2NotesData): string; export declare function postV2NotesDataFromJSON(jsonString: string): SafeParseResult<PostV2NotesData, SDKValidationError>; /** @internal */ export declare const PostV2NotesRequest$inboundSchema: z.ZodType<PostV2NotesRequest, z.ZodTypeDef, unknown>; /** @internal */ export type PostV2NotesRequest$Outbound = { data: PostV2NotesData$Outbound; }; /** @internal */ export declare const PostV2NotesRequest$outboundSchema: z.ZodType<PostV2NotesRequest$Outbound, z.ZodTypeDef, PostV2NotesRequest>; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export declare namespace PostV2NotesRequest$ { /** @deprecated use `PostV2NotesRequest$inboundSchema` instead. */ const inboundSchema: z.ZodType<PostV2NotesRequest, z.ZodTypeDef, unknown>; /** @deprecated use `PostV2NotesRequest$outboundSchema` instead. */ const outboundSchema: z.ZodType<PostV2NotesRequest$Outbound, z.ZodTypeDef, PostV2NotesRequest>; /** @deprecated use `PostV2NotesRequest$Outbound` instead. */ type Outbound = PostV2NotesRequest$Outbound; } export declare function postV2NotesRequestToJSON(postV2NotesRequest: PostV2NotesRequest): string; export declare function postV2NotesRequestFromJSON(jsonString: string): SafeParseResult<PostV2NotesRequest, SDKValidationError>; /** @internal */ export declare const PostV2NotesResponse$inboundSchema: z.ZodType<PostV2NotesResponse, z.ZodTypeDef, unknown>; /** @internal */ export type PostV2NotesResponse$Outbound = { data: Note$Outbound; }; /** @internal */ export declare const PostV2NotesResponse$outboundSchema: z.ZodType<PostV2NotesResponse$Outbound, z.ZodTypeDef, PostV2NotesResponse>; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export declare namespace PostV2NotesResponse$ { /** @deprecated use `PostV2NotesResponse$inboundSchema` instead. */ const inboundSchema: z.ZodType<PostV2NotesResponse, z.ZodTypeDef, unknown>; /** @deprecated use `PostV2NotesResponse$outboundSchema` instead. */ const outboundSchema: z.ZodType<PostV2NotesResponse$Outbound, z.ZodTypeDef, PostV2NotesResponse>; /** @deprecated use `PostV2NotesResponse$Outbound` instead. */ type Outbound = PostV2NotesResponse$Outbound; } export declare function postV2NotesResponseToJSON(postV2NotesResponse: PostV2NotesResponse): string; export declare function postV2NotesResponseFromJSON(jsonString: string): SafeParseResult<PostV2NotesResponse, SDKValidationError>; //# sourceMappingURL=postv2notes.d.ts.map