attio-js
Version:
Developer-friendly & type-safe JS/TS SDK based on the official OpenAPI spec of Attio.
208 lines • 15.7 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.PatchV2TargetIdentifierAttributesAttributeOptionsOptionResponse$ = exports.PatchV2TargetIdentifierAttributesAttributeOptionsOptionResponse$outboundSchema = exports.PatchV2TargetIdentifierAttributesAttributeOptionsOptionResponse$inboundSchema = exports.PatchV2TargetIdentifierAttributesAttributeOptionsOptionRequest$ = exports.PatchV2TargetIdentifierAttributesAttributeOptionsOptionRequest$outboundSchema = exports.PatchV2TargetIdentifierAttributesAttributeOptionsOptionRequest$inboundSchema = exports.PatchV2TargetIdentifierAttributesAttributeOptionsOptionRequestBody$ = exports.PatchV2TargetIdentifierAttributesAttributeOptionsOptionRequestBody$outboundSchema = exports.PatchV2TargetIdentifierAttributesAttributeOptionsOptionRequestBody$inboundSchema = exports.PatchV2TargetIdentifierAttributesAttributeOptionsOptionData$ = exports.PatchV2TargetIdentifierAttributesAttributeOptionsOptionData$outboundSchema = exports.PatchV2TargetIdentifierAttributesAttributeOptionsOptionData$inboundSchema = exports.PatchV2TargetIdentifierAttributesAttributeOptionsOptionTarget$ = exports.PatchV2TargetIdentifierAttributesAttributeOptionsOptionTarget$outboundSchema = exports.PatchV2TargetIdentifierAttributesAttributeOptionsOptionTarget$inboundSchema = exports.PatchV2TargetIdentifierAttributesAttributeOptionsOptionTarget = void 0;
exports.patchV2TargetIdentifierAttributesAttributeOptionsOptionDataToJSON = patchV2TargetIdentifierAttributesAttributeOptionsOptionDataToJSON;
exports.patchV2TargetIdentifierAttributesAttributeOptionsOptionDataFromJSON = patchV2TargetIdentifierAttributesAttributeOptionsOptionDataFromJSON;
exports.patchV2TargetIdentifierAttributesAttributeOptionsOptionRequestBodyToJSON = patchV2TargetIdentifierAttributesAttributeOptionsOptionRequestBodyToJSON;
exports.patchV2TargetIdentifierAttributesAttributeOptionsOptionRequestBodyFromJSON = patchV2TargetIdentifierAttributesAttributeOptionsOptionRequestBodyFromJSON;
exports.patchV2TargetIdentifierAttributesAttributeOptionsOptionRequestToJSON = patchV2TargetIdentifierAttributesAttributeOptionsOptionRequestToJSON;
exports.patchV2TargetIdentifierAttributesAttributeOptionsOptionRequestFromJSON = patchV2TargetIdentifierAttributesAttributeOptionsOptionRequestFromJSON;
exports.patchV2TargetIdentifierAttributesAttributeOptionsOptionResponseToJSON = patchV2TargetIdentifierAttributesAttributeOptionsOptionResponseToJSON;
exports.patchV2TargetIdentifierAttributesAttributeOptionsOptionResponseFromJSON = patchV2TargetIdentifierAttributesAttributeOptionsOptionResponseFromJSON;
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.PatchV2TargetIdentifierAttributesAttributeOptionsOptionTarget = {
Objects: "objects",
Lists: "lists",
};
/** @internal */
exports.PatchV2TargetIdentifierAttributesAttributeOptionsOptionTarget$inboundSchema = z.nativeEnum(exports.PatchV2TargetIdentifierAttributesAttributeOptionsOptionTarget);
/** @internal */
exports.PatchV2TargetIdentifierAttributesAttributeOptionsOptionTarget$outboundSchema = exports.PatchV2TargetIdentifierAttributesAttributeOptionsOptionTarget$inboundSchema;
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
var PatchV2TargetIdentifierAttributesAttributeOptionsOptionTarget$;
(function (PatchV2TargetIdentifierAttributesAttributeOptionsOptionTarget$) {
/** @deprecated use `PatchV2TargetIdentifierAttributesAttributeOptionsOptionTarget$inboundSchema` instead. */
PatchV2TargetIdentifierAttributesAttributeOptionsOptionTarget$.inboundSchema = exports.PatchV2TargetIdentifierAttributesAttributeOptionsOptionTarget$inboundSchema;
/** @deprecated use `PatchV2TargetIdentifierAttributesAttributeOptionsOptionTarget$outboundSchema` instead. */
PatchV2TargetIdentifierAttributesAttributeOptionsOptionTarget$.outboundSchema = exports.PatchV2TargetIdentifierAttributesAttributeOptionsOptionTarget$outboundSchema;
})(PatchV2TargetIdentifierAttributesAttributeOptionsOptionTarget$ || (exports.PatchV2TargetIdentifierAttributesAttributeOptionsOptionTarget$ = PatchV2TargetIdentifierAttributesAttributeOptionsOptionTarget$ = {}));
/** @internal */
exports.PatchV2TargetIdentifierAttributesAttributeOptionsOptionData$inboundSchema = z.object({
title: z.string().optional(),
is_archived: z.boolean().optional(),
}).transform((v) => {
return (0, primitives_js_1.remap)(v, {
"is_archived": "isArchived",
});
});
/** @internal */
exports.PatchV2TargetIdentifierAttributesAttributeOptionsOptionData$outboundSchema = z.object({
title: z.string().optional(),
isArchived: z.boolean().optional(),
}).transform((v) => {
return (0, primitives_js_1.remap)(v, {
isArchived: "is_archived",
});
});
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
var PatchV2TargetIdentifierAttributesAttributeOptionsOptionData$;
(function (PatchV2TargetIdentifierAttributesAttributeOptionsOptionData$) {
/** @deprecated use `PatchV2TargetIdentifierAttributesAttributeOptionsOptionData$inboundSchema` instead. */
PatchV2TargetIdentifierAttributesAttributeOptionsOptionData$.inboundSchema = exports.PatchV2TargetIdentifierAttributesAttributeOptionsOptionData$inboundSchema;
/** @deprecated use `PatchV2TargetIdentifierAttributesAttributeOptionsOptionData$outboundSchema` instead. */
PatchV2TargetIdentifierAttributesAttributeOptionsOptionData$.outboundSchema = exports.PatchV2TargetIdentifierAttributesAttributeOptionsOptionData$outboundSchema;
})(PatchV2TargetIdentifierAttributesAttributeOptionsOptionData$ || (exports.PatchV2TargetIdentifierAttributesAttributeOptionsOptionData$ = PatchV2TargetIdentifierAttributesAttributeOptionsOptionData$ = {}));
function patchV2TargetIdentifierAttributesAttributeOptionsOptionDataToJSON(patchV2TargetIdentifierAttributesAttributeOptionsOptionData) {
return JSON.stringify(exports.PatchV2TargetIdentifierAttributesAttributeOptionsOptionData$outboundSchema
.parse(patchV2TargetIdentifierAttributesAttributeOptionsOptionData));
}
function patchV2TargetIdentifierAttributesAttributeOptionsOptionDataFromJSON(jsonString) {
return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.PatchV2TargetIdentifierAttributesAttributeOptionsOptionData$inboundSchema
.parse(JSON.parse(x)), `Failed to parse 'PatchV2TargetIdentifierAttributesAttributeOptionsOptionData' from JSON`);
}
/** @internal */
exports.PatchV2TargetIdentifierAttributesAttributeOptionsOptionRequestBody$inboundSchema = z.object({
data: z.lazy(() => exports.PatchV2TargetIdentifierAttributesAttributeOptionsOptionData$inboundSchema),
});
/** @internal */
exports.PatchV2TargetIdentifierAttributesAttributeOptionsOptionRequestBody$outboundSchema = z.object({
data: z.lazy(() => exports.PatchV2TargetIdentifierAttributesAttributeOptionsOptionData$outboundSchema),
});
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
var PatchV2TargetIdentifierAttributesAttributeOptionsOptionRequestBody$;
(function (PatchV2TargetIdentifierAttributesAttributeOptionsOptionRequestBody$) {
/** @deprecated use `PatchV2TargetIdentifierAttributesAttributeOptionsOptionRequestBody$inboundSchema` instead. */
PatchV2TargetIdentifierAttributesAttributeOptionsOptionRequestBody$.inboundSchema = exports.PatchV2TargetIdentifierAttributesAttributeOptionsOptionRequestBody$inboundSchema;
/** @deprecated use `PatchV2TargetIdentifierAttributesAttributeOptionsOptionRequestBody$outboundSchema` instead. */
PatchV2TargetIdentifierAttributesAttributeOptionsOptionRequestBody$.outboundSchema = exports.PatchV2TargetIdentifierAttributesAttributeOptionsOptionRequestBody$outboundSchema;
})(PatchV2TargetIdentifierAttributesAttributeOptionsOptionRequestBody$ || (exports.PatchV2TargetIdentifierAttributesAttributeOptionsOptionRequestBody$ = PatchV2TargetIdentifierAttributesAttributeOptionsOptionRequestBody$ = {}));
function patchV2TargetIdentifierAttributesAttributeOptionsOptionRequestBodyToJSON(patchV2TargetIdentifierAttributesAttributeOptionsOptionRequestBody) {
return JSON.stringify(exports.PatchV2TargetIdentifierAttributesAttributeOptionsOptionRequestBody$outboundSchema
.parse(patchV2TargetIdentifierAttributesAttributeOptionsOptionRequestBody));
}
function patchV2TargetIdentifierAttributesAttributeOptionsOptionRequestBodyFromJSON(jsonString) {
return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.PatchV2TargetIdentifierAttributesAttributeOptionsOptionRequestBody$inboundSchema
.parse(JSON.parse(x)), `Failed to parse 'PatchV2TargetIdentifierAttributesAttributeOptionsOptionRequestBody' from JSON`);
}
/** @internal */
exports.PatchV2TargetIdentifierAttributesAttributeOptionsOptionRequest$inboundSchema = z.object({
target: exports.PatchV2TargetIdentifierAttributesAttributeOptionsOptionTarget$inboundSchema,
identifier: z.string(),
attribute: z.string(),
option: z.string(),
RequestBody: z.lazy(() => exports.PatchV2TargetIdentifierAttributesAttributeOptionsOptionRequestBody$inboundSchema),
}).transform((v) => {
return (0, primitives_js_1.remap)(v, {
"RequestBody": "requestBody",
});
});
/** @internal */
exports.PatchV2TargetIdentifierAttributesAttributeOptionsOptionRequest$outboundSchema = z.object({
target: exports.PatchV2TargetIdentifierAttributesAttributeOptionsOptionTarget$outboundSchema,
identifier: z.string(),
attribute: z.string(),
option: z.string(),
requestBody: z.lazy(() => exports.PatchV2TargetIdentifierAttributesAttributeOptionsOptionRequestBody$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 PatchV2TargetIdentifierAttributesAttributeOptionsOptionRequest$;
(function (PatchV2TargetIdentifierAttributesAttributeOptionsOptionRequest$) {
/** @deprecated use `PatchV2TargetIdentifierAttributesAttributeOptionsOptionRequest$inboundSchema` instead. */
PatchV2TargetIdentifierAttributesAttributeOptionsOptionRequest$.inboundSchema = exports.PatchV2TargetIdentifierAttributesAttributeOptionsOptionRequest$inboundSchema;
/** @deprecated use `PatchV2TargetIdentifierAttributesAttributeOptionsOptionRequest$outboundSchema` instead. */
PatchV2TargetIdentifierAttributesAttributeOptionsOptionRequest$.outboundSchema = exports.PatchV2TargetIdentifierAttributesAttributeOptionsOptionRequest$outboundSchema;
})(PatchV2TargetIdentifierAttributesAttributeOptionsOptionRequest$ || (exports.PatchV2TargetIdentifierAttributesAttributeOptionsOptionRequest$ = PatchV2TargetIdentifierAttributesAttributeOptionsOptionRequest$ = {}));
function patchV2TargetIdentifierAttributesAttributeOptionsOptionRequestToJSON(patchV2TargetIdentifierAttributesAttributeOptionsOptionRequest) {
return JSON.stringify(exports.PatchV2TargetIdentifierAttributesAttributeOptionsOptionRequest$outboundSchema
.parse(patchV2TargetIdentifierAttributesAttributeOptionsOptionRequest));
}
function patchV2TargetIdentifierAttributesAttributeOptionsOptionRequestFromJSON(jsonString) {
return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.PatchV2TargetIdentifierAttributesAttributeOptionsOptionRequest$inboundSchema
.parse(JSON.parse(x)), `Failed to parse 'PatchV2TargetIdentifierAttributesAttributeOptionsOptionRequest' from JSON`);
}
/** @internal */
exports.PatchV2TargetIdentifierAttributesAttributeOptionsOptionResponse$inboundSchema = z.object({
data: selectoption_js_1.SelectOption$inboundSchema,
});
/** @internal */
exports.PatchV2TargetIdentifierAttributesAttributeOptionsOptionResponse$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 PatchV2TargetIdentifierAttributesAttributeOptionsOptionResponse$;
(function (PatchV2TargetIdentifierAttributesAttributeOptionsOptionResponse$) {
/** @deprecated use `PatchV2TargetIdentifierAttributesAttributeOptionsOptionResponse$inboundSchema` instead. */
PatchV2TargetIdentifierAttributesAttributeOptionsOptionResponse$.inboundSchema = exports.PatchV2TargetIdentifierAttributesAttributeOptionsOptionResponse$inboundSchema;
/** @deprecated use `PatchV2TargetIdentifierAttributesAttributeOptionsOptionResponse$outboundSchema` instead. */
PatchV2TargetIdentifierAttributesAttributeOptionsOptionResponse$.outboundSchema = exports.PatchV2TargetIdentifierAttributesAttributeOptionsOptionResponse$outboundSchema;
})(PatchV2TargetIdentifierAttributesAttributeOptionsOptionResponse$ || (exports.PatchV2TargetIdentifierAttributesAttributeOptionsOptionResponse$ = PatchV2TargetIdentifierAttributesAttributeOptionsOptionResponse$ = {}));
function patchV2TargetIdentifierAttributesAttributeOptionsOptionResponseToJSON(patchV2TargetIdentifierAttributesAttributeOptionsOptionResponse) {
return JSON.stringify(exports.PatchV2TargetIdentifierAttributesAttributeOptionsOptionResponse$outboundSchema
.parse(patchV2TargetIdentifierAttributesAttributeOptionsOptionResponse));
}
function patchV2TargetIdentifierAttributesAttributeOptionsOptionResponseFromJSON(jsonString) {
return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.PatchV2TargetIdentifierAttributesAttributeOptionsOptionResponse$inboundSchema
.parse(JSON.parse(x)), `Failed to parse 'PatchV2TargetIdentifierAttributesAttributeOptionsOptionResponse' from JSON`);
}
//# sourceMappingURL=patchv2targetidentifierattributesattributeoptionsoption.js.map