attio-js
Version:
Developer-friendly & type-safe JS/TS SDK based on the official OpenAPI spec of Attio.
66 lines • 2.99 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 { Note$inboundSchema, Note$outboundSchema, } from "../components/note.js";
/** @internal */
export const GetV2NotesNoteIdRequest$inboundSchema = z.object({
note_id: z.string(),
}).transform((v) => {
return remap$(v, {
"note_id": "noteId",
});
});
/** @internal */
export const GetV2NotesNoteIdRequest$outboundSchema = z.object({
noteId: z.string(),
}).transform((v) => {
return remap$(v, {
noteId: "note_id",
});
});
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export var GetV2NotesNoteIdRequest$;
(function (GetV2NotesNoteIdRequest$) {
/** @deprecated use `GetV2NotesNoteIdRequest$inboundSchema` instead. */
GetV2NotesNoteIdRequest$.inboundSchema = GetV2NotesNoteIdRequest$inboundSchema;
/** @deprecated use `GetV2NotesNoteIdRequest$outboundSchema` instead. */
GetV2NotesNoteIdRequest$.outboundSchema = GetV2NotesNoteIdRequest$outboundSchema;
})(GetV2NotesNoteIdRequest$ || (GetV2NotesNoteIdRequest$ = {}));
export function getV2NotesNoteIdRequestToJSON(getV2NotesNoteIdRequest) {
return JSON.stringify(GetV2NotesNoteIdRequest$outboundSchema.parse(getV2NotesNoteIdRequest));
}
export function getV2NotesNoteIdRequestFromJSON(jsonString) {
return safeParse(jsonString, (x) => GetV2NotesNoteIdRequest$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetV2NotesNoteIdRequest' from JSON`);
}
/** @internal */
export const GetV2NotesNoteIdResponse$inboundSchema = z.object({
data: Note$inboundSchema,
});
/** @internal */
export const GetV2NotesNoteIdResponse$outboundSchema = z.object({
data: Note$outboundSchema,
});
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export var GetV2NotesNoteIdResponse$;
(function (GetV2NotesNoteIdResponse$) {
/** @deprecated use `GetV2NotesNoteIdResponse$inboundSchema` instead. */
GetV2NotesNoteIdResponse$.inboundSchema = GetV2NotesNoteIdResponse$inboundSchema;
/** @deprecated use `GetV2NotesNoteIdResponse$outboundSchema` instead. */
GetV2NotesNoteIdResponse$.outboundSchema = GetV2NotesNoteIdResponse$outboundSchema;
})(GetV2NotesNoteIdResponse$ || (GetV2NotesNoteIdResponse$ = {}));
export function getV2NotesNoteIdResponseToJSON(getV2NotesNoteIdResponse) {
return JSON.stringify(GetV2NotesNoteIdResponse$outboundSchema.parse(getV2NotesNoteIdResponse));
}
export function getV2NotesNoteIdResponseFromJSON(jsonString) {
return safeParse(jsonString, (x) => GetV2NotesNoteIdResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetV2NotesNoteIdResponse' from JSON`);
}
//# sourceMappingURL=getv2notesnoteid.js.map