attio-js
Version:
Developer-friendly & type-safe JS/TS SDK based on the official OpenAPI spec of Attio.
136 lines • 7.93 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.GetV2TargetIdentifierAttributesResponse$ = exports.GetV2TargetIdentifierAttributesResponse$outboundSchema = exports.GetV2TargetIdentifierAttributesResponse$inboundSchema = exports.GetV2TargetIdentifierAttributesRequest$ = exports.GetV2TargetIdentifierAttributesRequest$outboundSchema = exports.GetV2TargetIdentifierAttributesRequest$inboundSchema = exports.GetV2TargetIdentifierAttributesTarget$ = exports.GetV2TargetIdentifierAttributesTarget$outboundSchema = exports.GetV2TargetIdentifierAttributesTarget$inboundSchema = exports.GetV2TargetIdentifierAttributesTarget = void 0;
exports.getV2TargetIdentifierAttributesRequestToJSON = getV2TargetIdentifierAttributesRequestToJSON;
exports.getV2TargetIdentifierAttributesRequestFromJSON = getV2TargetIdentifierAttributesRequestFromJSON;
exports.getV2TargetIdentifierAttributesResponseToJSON = getV2TargetIdentifierAttributesResponseToJSON;
exports.getV2TargetIdentifierAttributesResponseFromJSON = getV2TargetIdentifierAttributesResponseFromJSON;
const z = __importStar(require("zod"));
const primitives_js_1 = require("../../lib/primitives.js");
const schemas_js_1 = require("../../lib/schemas.js");
const attribute_js_1 = require("../components/attribute.js");
/**
* Whether the attributes are on an object or a list.
*/
exports.GetV2TargetIdentifierAttributesTarget = {
Objects: "objects",
Lists: "lists",
};
/** @internal */
exports.GetV2TargetIdentifierAttributesTarget$inboundSchema = z.nativeEnum(exports.GetV2TargetIdentifierAttributesTarget);
/** @internal */
exports.GetV2TargetIdentifierAttributesTarget$outboundSchema = exports.GetV2TargetIdentifierAttributesTarget$inboundSchema;
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
var GetV2TargetIdentifierAttributesTarget$;
(function (GetV2TargetIdentifierAttributesTarget$) {
/** @deprecated use `GetV2TargetIdentifierAttributesTarget$inboundSchema` instead. */
GetV2TargetIdentifierAttributesTarget$.inboundSchema = exports.GetV2TargetIdentifierAttributesTarget$inboundSchema;
/** @deprecated use `GetV2TargetIdentifierAttributesTarget$outboundSchema` instead. */
GetV2TargetIdentifierAttributesTarget$.outboundSchema = exports.GetV2TargetIdentifierAttributesTarget$outboundSchema;
})(GetV2TargetIdentifierAttributesTarget$ || (exports.GetV2TargetIdentifierAttributesTarget$ = GetV2TargetIdentifierAttributesTarget$ = {}));
/** @internal */
exports.GetV2TargetIdentifierAttributesRequest$inboundSchema = z.object({
target: exports.GetV2TargetIdentifierAttributesTarget$inboundSchema,
identifier: z.string(),
limit: z.number().int().optional(),
offset: z.number().int().optional(),
show_archived: z.boolean().optional(),
}).transform((v) => {
return (0, primitives_js_1.remap)(v, {
"show_archived": "showArchived",
});
});
/** @internal */
exports.GetV2TargetIdentifierAttributesRequest$outboundSchema = z.object({
target: exports.GetV2TargetIdentifierAttributesTarget$outboundSchema,
identifier: z.string(),
limit: z.number().int().optional(),
offset: z.number().int().optional(),
showArchived: z.boolean().optional(),
}).transform((v) => {
return (0, primitives_js_1.remap)(v, {
showArchived: "show_archived",
});
});
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
var GetV2TargetIdentifierAttributesRequest$;
(function (GetV2TargetIdentifierAttributesRequest$) {
/** @deprecated use `GetV2TargetIdentifierAttributesRequest$inboundSchema` instead. */
GetV2TargetIdentifierAttributesRequest$.inboundSchema = exports.GetV2TargetIdentifierAttributesRequest$inboundSchema;
/** @deprecated use `GetV2TargetIdentifierAttributesRequest$outboundSchema` instead. */
GetV2TargetIdentifierAttributesRequest$.outboundSchema = exports.GetV2TargetIdentifierAttributesRequest$outboundSchema;
})(GetV2TargetIdentifierAttributesRequest$ || (exports.GetV2TargetIdentifierAttributesRequest$ = GetV2TargetIdentifierAttributesRequest$ = {}));
function getV2TargetIdentifierAttributesRequestToJSON(getV2TargetIdentifierAttributesRequest) {
return JSON.stringify(exports.GetV2TargetIdentifierAttributesRequest$outboundSchema.parse(getV2TargetIdentifierAttributesRequest));
}
function getV2TargetIdentifierAttributesRequestFromJSON(jsonString) {
return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.GetV2TargetIdentifierAttributesRequest$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetV2TargetIdentifierAttributesRequest' from JSON`);
}
/** @internal */
exports.GetV2TargetIdentifierAttributesResponse$inboundSchema = z.object({
data: z.array(attribute_js_1.Attribute$inboundSchema),
});
/** @internal */
exports.GetV2TargetIdentifierAttributesResponse$outboundSchema = z.object({
data: z.array(attribute_js_1.Attribute$outboundSchema),
});
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
var GetV2TargetIdentifierAttributesResponse$;
(function (GetV2TargetIdentifierAttributesResponse$) {
/** @deprecated use `GetV2TargetIdentifierAttributesResponse$inboundSchema` instead. */
GetV2TargetIdentifierAttributesResponse$.inboundSchema = exports.GetV2TargetIdentifierAttributesResponse$inboundSchema;
/** @deprecated use `GetV2TargetIdentifierAttributesResponse$outboundSchema` instead. */
GetV2TargetIdentifierAttributesResponse$.outboundSchema = exports.GetV2TargetIdentifierAttributesResponse$outboundSchema;
})(GetV2TargetIdentifierAttributesResponse$ || (exports.GetV2TargetIdentifierAttributesResponse$ = GetV2TargetIdentifierAttributesResponse$ = {}));
function getV2TargetIdentifierAttributesResponseToJSON(getV2TargetIdentifierAttributesResponse) {
return JSON.stringify(exports.GetV2TargetIdentifierAttributesResponse$outboundSchema.parse(getV2TargetIdentifierAttributesResponse));
}
function getV2TargetIdentifierAttributesResponseFromJSON(jsonString) {
return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.GetV2TargetIdentifierAttributesResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetV2TargetIdentifierAttributesResponse' from JSON`);
}
//# sourceMappingURL=getv2targetidentifierattributes.js.map