attio-js
Version:
Developer-friendly & type-safe JS/TS SDK based on the official OpenAPI spec of Attio.
194 lines • 14.4 kB
JavaScript
"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.PostV2TargetIdentifierAttributesAttributeOptionsResponse$ = exports.PostV2TargetIdentifierAttributesAttributeOptionsResponse$outboundSchema = exports.PostV2TargetIdentifierAttributesAttributeOptionsResponse$inboundSchema = exports.PostV2TargetIdentifierAttributesAttributeOptionsRequest$ = exports.PostV2TargetIdentifierAttributesAttributeOptionsRequest$outboundSchema = exports.PostV2TargetIdentifierAttributesAttributeOptionsRequest$inboundSchema = exports.PostV2TargetIdentifierAttributesAttributeOptionsRequestBody$ = exports.PostV2TargetIdentifierAttributesAttributeOptionsRequestBody$outboundSchema = exports.PostV2TargetIdentifierAttributesAttributeOptionsRequestBody$inboundSchema = exports.PostV2TargetIdentifierAttributesAttributeOptionsData$ = exports.PostV2TargetIdentifierAttributesAttributeOptionsData$outboundSchema = exports.PostV2TargetIdentifierAttributesAttributeOptionsData$inboundSchema = exports.PostV2TargetIdentifierAttributesAttributeOptionsTarget$ = exports.PostV2TargetIdentifierAttributesAttributeOptionsTarget$outboundSchema = exports.PostV2TargetIdentifierAttributesAttributeOptionsTarget$inboundSchema = exports.PostV2TargetIdentifierAttributesAttributeOptionsTarget = void 0;
exports.postV2TargetIdentifierAttributesAttributeOptionsDataToJSON = postV2TargetIdentifierAttributesAttributeOptionsDataToJSON;
exports.postV2TargetIdentifierAttributesAttributeOptionsDataFromJSON = postV2TargetIdentifierAttributesAttributeOptionsDataFromJSON;
exports.postV2TargetIdentifierAttributesAttributeOptionsRequestBodyToJSON = postV2TargetIdentifierAttributesAttributeOptionsRequestBodyToJSON;
exports.postV2TargetIdentifierAttributesAttributeOptionsRequestBodyFromJSON = postV2TargetIdentifierAttributesAttributeOptionsRequestBodyFromJSON;
exports.postV2TargetIdentifierAttributesAttributeOptionsRequestToJSON = postV2TargetIdentifierAttributesAttributeOptionsRequestToJSON;
exports.postV2TargetIdentifierAttributesAttributeOptionsRequestFromJSON = postV2TargetIdentifierAttributesAttributeOptionsRequestFromJSON;
exports.postV2TargetIdentifierAttributesAttributeOptionsResponseToJSON = postV2TargetIdentifierAttributesAttributeOptionsResponseToJSON;
exports.postV2TargetIdentifierAttributesAttributeOptionsResponseFromJSON = postV2TargetIdentifierAttributesAttributeOptionsResponseFromJSON;
const z = __importStar(require("zod"));
const primitives_js_1 = require("../../lib/primitives.js");
const schemas_js_1 = require("../../lib/schemas.js");
const selectoption_js_1 = require("../components/selectoption.js");
/**
* Whether the attribute is on an object or a list.
*/
exports.PostV2TargetIdentifierAttributesAttributeOptionsTarget = {
Objects: "objects",
Lists: "lists",
};
/** @internal */
exports.PostV2TargetIdentifierAttributesAttributeOptionsTarget$inboundSchema = z.nativeEnum(exports.PostV2TargetIdentifierAttributesAttributeOptionsTarget);
/** @internal */
exports.PostV2TargetIdentifierAttributesAttributeOptionsTarget$outboundSchema = exports.PostV2TargetIdentifierAttributesAttributeOptionsTarget$inboundSchema;
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
var PostV2TargetIdentifierAttributesAttributeOptionsTarget$;
(function (PostV2TargetIdentifierAttributesAttributeOptionsTarget$) {
/** @deprecated use `PostV2TargetIdentifierAttributesAttributeOptionsTarget$inboundSchema` instead. */
PostV2TargetIdentifierAttributesAttributeOptionsTarget$.inboundSchema = exports.PostV2TargetIdentifierAttributesAttributeOptionsTarget$inboundSchema;
/** @deprecated use `PostV2TargetIdentifierAttributesAttributeOptionsTarget$outboundSchema` instead. */
PostV2TargetIdentifierAttributesAttributeOptionsTarget$.outboundSchema = exports.PostV2TargetIdentifierAttributesAttributeOptionsTarget$outboundSchema;
})(PostV2TargetIdentifierAttributesAttributeOptionsTarget$ || (exports.PostV2TargetIdentifierAttributesAttributeOptionsTarget$ = PostV2TargetIdentifierAttributesAttributeOptionsTarget$ = {}));
/** @internal */
exports.PostV2TargetIdentifierAttributesAttributeOptionsData$inboundSchema = z.object({
title: z.string(),
});
/** @internal */
exports.PostV2TargetIdentifierAttributesAttributeOptionsData$outboundSchema = z.object({
title: z.string(),
});
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
var PostV2TargetIdentifierAttributesAttributeOptionsData$;
(function (PostV2TargetIdentifierAttributesAttributeOptionsData$) {
/** @deprecated use `PostV2TargetIdentifierAttributesAttributeOptionsData$inboundSchema` instead. */
PostV2TargetIdentifierAttributesAttributeOptionsData$.inboundSchema = exports.PostV2TargetIdentifierAttributesAttributeOptionsData$inboundSchema;
/** @deprecated use `PostV2TargetIdentifierAttributesAttributeOptionsData$outboundSchema` instead. */
PostV2TargetIdentifierAttributesAttributeOptionsData$.outboundSchema = exports.PostV2TargetIdentifierAttributesAttributeOptionsData$outboundSchema;
})(PostV2TargetIdentifierAttributesAttributeOptionsData$ || (exports.PostV2TargetIdentifierAttributesAttributeOptionsData$ = PostV2TargetIdentifierAttributesAttributeOptionsData$ = {}));
function postV2TargetIdentifierAttributesAttributeOptionsDataToJSON(postV2TargetIdentifierAttributesAttributeOptionsData) {
return JSON.stringify(exports.PostV2TargetIdentifierAttributesAttributeOptionsData$outboundSchema.parse(postV2TargetIdentifierAttributesAttributeOptionsData));
}
function postV2TargetIdentifierAttributesAttributeOptionsDataFromJSON(jsonString) {
return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.PostV2TargetIdentifierAttributesAttributeOptionsData$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PostV2TargetIdentifierAttributesAttributeOptionsData' from JSON`);
}
/** @internal */
exports.PostV2TargetIdentifierAttributesAttributeOptionsRequestBody$inboundSchema = z.object({
data: z.lazy(() => exports.PostV2TargetIdentifierAttributesAttributeOptionsData$inboundSchema),
});
/** @internal */
exports.PostV2TargetIdentifierAttributesAttributeOptionsRequestBody$outboundSchema = z.object({
data: z.lazy(() => exports.PostV2TargetIdentifierAttributesAttributeOptionsData$outboundSchema),
});
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
var PostV2TargetIdentifierAttributesAttributeOptionsRequestBody$;
(function (PostV2TargetIdentifierAttributesAttributeOptionsRequestBody$) {
/** @deprecated use `PostV2TargetIdentifierAttributesAttributeOptionsRequestBody$inboundSchema` instead. */
PostV2TargetIdentifierAttributesAttributeOptionsRequestBody$.inboundSchema = exports.PostV2TargetIdentifierAttributesAttributeOptionsRequestBody$inboundSchema;
/** @deprecated use `PostV2TargetIdentifierAttributesAttributeOptionsRequestBody$outboundSchema` instead. */
PostV2TargetIdentifierAttributesAttributeOptionsRequestBody$.outboundSchema = exports.PostV2TargetIdentifierAttributesAttributeOptionsRequestBody$outboundSchema;
})(PostV2TargetIdentifierAttributesAttributeOptionsRequestBody$ || (exports.PostV2TargetIdentifierAttributesAttributeOptionsRequestBody$ = PostV2TargetIdentifierAttributesAttributeOptionsRequestBody$ = {}));
function postV2TargetIdentifierAttributesAttributeOptionsRequestBodyToJSON(postV2TargetIdentifierAttributesAttributeOptionsRequestBody) {
return JSON.stringify(exports.PostV2TargetIdentifierAttributesAttributeOptionsRequestBody$outboundSchema
.parse(postV2TargetIdentifierAttributesAttributeOptionsRequestBody));
}
function postV2TargetIdentifierAttributesAttributeOptionsRequestBodyFromJSON(jsonString) {
return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.PostV2TargetIdentifierAttributesAttributeOptionsRequestBody$inboundSchema
.parse(JSON.parse(x)), `Failed to parse 'PostV2TargetIdentifierAttributesAttributeOptionsRequestBody' from JSON`);
}
/** @internal */
exports.PostV2TargetIdentifierAttributesAttributeOptionsRequest$inboundSchema = z.object({
target: exports.PostV2TargetIdentifierAttributesAttributeOptionsTarget$inboundSchema,
identifier: z.string(),
attribute: z.string(),
RequestBody: z.lazy(() => exports.PostV2TargetIdentifierAttributesAttributeOptionsRequestBody$inboundSchema),
}).transform((v) => {
return (0, primitives_js_1.remap)(v, {
"RequestBody": "requestBody",
});
});
/** @internal */
exports.PostV2TargetIdentifierAttributesAttributeOptionsRequest$outboundSchema = z.object({
target: exports.PostV2TargetIdentifierAttributesAttributeOptionsTarget$outboundSchema,
identifier: z.string(),
attribute: z.string(),
requestBody: z.lazy(() => exports.PostV2TargetIdentifierAttributesAttributeOptionsRequestBody$outboundSchema),
}).transform((v) => {
return (0, primitives_js_1.remap)(v, {
requestBody: "RequestBody",
});
});
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
var PostV2TargetIdentifierAttributesAttributeOptionsRequest$;
(function (PostV2TargetIdentifierAttributesAttributeOptionsRequest$) {
/** @deprecated use `PostV2TargetIdentifierAttributesAttributeOptionsRequest$inboundSchema` instead. */
PostV2TargetIdentifierAttributesAttributeOptionsRequest$.inboundSchema = exports.PostV2TargetIdentifierAttributesAttributeOptionsRequest$inboundSchema;
/** @deprecated use `PostV2TargetIdentifierAttributesAttributeOptionsRequest$outboundSchema` instead. */
PostV2TargetIdentifierAttributesAttributeOptionsRequest$.outboundSchema = exports.PostV2TargetIdentifierAttributesAttributeOptionsRequest$outboundSchema;
})(PostV2TargetIdentifierAttributesAttributeOptionsRequest$ || (exports.PostV2TargetIdentifierAttributesAttributeOptionsRequest$ = PostV2TargetIdentifierAttributesAttributeOptionsRequest$ = {}));
function postV2TargetIdentifierAttributesAttributeOptionsRequestToJSON(postV2TargetIdentifierAttributesAttributeOptionsRequest) {
return JSON.stringify(exports.PostV2TargetIdentifierAttributesAttributeOptionsRequest$outboundSchema
.parse(postV2TargetIdentifierAttributesAttributeOptionsRequest));
}
function postV2TargetIdentifierAttributesAttributeOptionsRequestFromJSON(jsonString) {
return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.PostV2TargetIdentifierAttributesAttributeOptionsRequest$inboundSchema
.parse(JSON.parse(x)), `Failed to parse 'PostV2TargetIdentifierAttributesAttributeOptionsRequest' from JSON`);
}
/** @internal */
exports.PostV2TargetIdentifierAttributesAttributeOptionsResponse$inboundSchema = z.object({
data: selectoption_js_1.SelectOption$inboundSchema,
});
/** @internal */
exports.PostV2TargetIdentifierAttributesAttributeOptionsResponse$outboundSchema = z.object({
data: selectoption_js_1.SelectOption$outboundSchema,
});
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
var PostV2TargetIdentifierAttributesAttributeOptionsResponse$;
(function (PostV2TargetIdentifierAttributesAttributeOptionsResponse$) {
/** @deprecated use `PostV2TargetIdentifierAttributesAttributeOptionsResponse$inboundSchema` instead. */
PostV2TargetIdentifierAttributesAttributeOptionsResponse$.inboundSchema = exports.PostV2TargetIdentifierAttributesAttributeOptionsResponse$inboundSchema;
/** @deprecated use `PostV2TargetIdentifierAttributesAttributeOptionsResponse$outboundSchema` instead. */
PostV2TargetIdentifierAttributesAttributeOptionsResponse$.outboundSchema = exports.PostV2TargetIdentifierAttributesAttributeOptionsResponse$outboundSchema;
})(PostV2TargetIdentifierAttributesAttributeOptionsResponse$ || (exports.PostV2TargetIdentifierAttributesAttributeOptionsResponse$ = PostV2TargetIdentifierAttributesAttributeOptionsResponse$ = {}));
function postV2TargetIdentifierAttributesAttributeOptionsResponseToJSON(postV2TargetIdentifierAttributesAttributeOptionsResponse) {
return JSON.stringify(exports.PostV2TargetIdentifierAttributesAttributeOptionsResponse$outboundSchema
.parse(postV2TargetIdentifierAttributesAttributeOptionsResponse));
}
function postV2TargetIdentifierAttributesAttributeOptionsResponseFromJSON(jsonString) {
return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.PostV2TargetIdentifierAttributesAttributeOptionsResponse$inboundSchema
.parse(JSON.parse(x)), `Failed to parse 'PostV2TargetIdentifierAttributesAttributeOptionsResponse' from JSON`);
}
//# sourceMappingURL=postv2targetidentifierattributesattributeoptions.js.map