UNPKG

attio-js

Version:

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

114 lines 5.24 kB
"use strict"; /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { if (k2 === undefined) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { return m[k]; } }; } Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === undefined) k2 = k; o[k2] = m[k]; })); var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); var __importStar = (this && this.__importStar) || (function () { var ownKeys = function(o) { ownKeys = Object.getOwnPropertyNames || function (o) { var ar = []; for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; return ar; }; return ownKeys(o); }; return function (mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); __setModuleDefault(result, mod); return result; }; })(); Object.defineProperty(exports, "__esModule", { value: true }); exports.GetV2NotesResponse$ = exports.GetV2NotesResponse$outboundSchema = exports.GetV2NotesResponse$inboundSchema = exports.GetV2NotesRequest$ = exports.GetV2NotesRequest$outboundSchema = exports.GetV2NotesRequest$inboundSchema = void 0; exports.getV2NotesRequestToJSON = getV2NotesRequestToJSON; exports.getV2NotesRequestFromJSON = getV2NotesRequestFromJSON; exports.getV2NotesResponseToJSON = getV2NotesResponseToJSON; exports.getV2NotesResponseFromJSON = getV2NotesResponseFromJSON; const z = __importStar(require("zod")); const primitives_js_1 = require("../../lib/primitives.js"); const schemas_js_1 = require("../../lib/schemas.js"); const note_js_1 = require("../components/note.js"); /** @internal */ exports.GetV2NotesRequest$inboundSchema = z.object({ limit: z.number().int().optional(), offset: z.number().int().optional(), parent_object: z.string().optional(), parent_record_id: z.string().optional(), }).transform((v) => { return (0, primitives_js_1.remap)(v, { "parent_object": "parentObject", "parent_record_id": "parentRecordId", }); }); /** @internal */ exports.GetV2NotesRequest$outboundSchema = z.object({ limit: z.number().int().optional(), offset: z.number().int().optional(), parentObject: z.string().optional(), parentRecordId: z.string().optional(), }).transform((v) => { return (0, primitives_js_1.remap)(v, { parentObject: "parent_object", parentRecordId: "parent_record_id", }); }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ var GetV2NotesRequest$; (function (GetV2NotesRequest$) { /** @deprecated use `GetV2NotesRequest$inboundSchema` instead. */ GetV2NotesRequest$.inboundSchema = exports.GetV2NotesRequest$inboundSchema; /** @deprecated use `GetV2NotesRequest$outboundSchema` instead. */ GetV2NotesRequest$.outboundSchema = exports.GetV2NotesRequest$outboundSchema; })(GetV2NotesRequest$ || (exports.GetV2NotesRequest$ = GetV2NotesRequest$ = {})); function getV2NotesRequestToJSON(getV2NotesRequest) { return JSON.stringify(exports.GetV2NotesRequest$outboundSchema.parse(getV2NotesRequest)); } function getV2NotesRequestFromJSON(jsonString) { return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.GetV2NotesRequest$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetV2NotesRequest' from JSON`); } /** @internal */ exports.GetV2NotesResponse$inboundSchema = z.object({ data: z.array(note_js_1.Note$inboundSchema), }); /** @internal */ exports.GetV2NotesResponse$outboundSchema = z.object({ data: z.array(note_js_1.Note$outboundSchema), }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ var GetV2NotesResponse$; (function (GetV2NotesResponse$) { /** @deprecated use `GetV2NotesResponse$inboundSchema` instead. */ GetV2NotesResponse$.inboundSchema = exports.GetV2NotesResponse$inboundSchema; /** @deprecated use `GetV2NotesResponse$outboundSchema` instead. */ GetV2NotesResponse$.outboundSchema = exports.GetV2NotesResponse$outboundSchema; })(GetV2NotesResponse$ || (exports.GetV2NotesResponse$ = GetV2NotesResponse$ = {})); function getV2NotesResponseToJSON(getV2NotesResponse) { return JSON.stringify(exports.GetV2NotesResponse$outboundSchema.parse(getV2NotesResponse)); } function getV2NotesResponseFromJSON(jsonString) { return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.GetV2NotesResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetV2NotesResponse' from JSON`); } //# sourceMappingURL=getv2notes.js.map