"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 (mod) {
    if (mod && mod.__esModule) return mod;
    var result = {};
    if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
    __setModuleDefault(result, mod);
    return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.crmListContactsResponseFromJSON = exports.crmListContactsResponseToJSON = exports.CrmListContactsResponse$ = exports.CrmListContactsResponse$outboundSchema = exports.CrmListContactsResponse$inboundSchema = exports.crmListContactsRequestFromJSON = exports.crmListContactsRequestToJSON = exports.CrmListContactsRequest$ = exports.CrmListContactsRequest$outboundSchema = exports.CrmListContactsRequest$inboundSchema = exports.crmListContactsQueryParamFilterFromJSON = exports.crmListContactsQueryParamFilterToJSON = exports.CrmListContactsQueryParamFilter$ = exports.CrmListContactsQueryParamFilter$outboundSchema = exports.CrmListContactsQueryParamFilter$inboundSchema = void 0;
const z = __importStar(require("zod"));
const primitives_js_1 = require("../../../lib/primitives.js");
const schemas_js_1 = require("../../../lib/schemas.js");
const shared = __importStar(require("../shared/index.js"));
/** @internal */
exports.CrmListContactsQueryParamFilter$inboundSchema = z.object({
    updated_after: z.nullable(z.string()).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "updated_after": "updatedAfter",
    });
});
/** @internal */
exports.CrmListContactsQueryParamFilter$outboundSchema = z.object({
    updatedAfter: z.nullable(z.string()).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        updatedAfter: "updated_after",
    });
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var CrmListContactsQueryParamFilter$;
(function (CrmListContactsQueryParamFilter$) {
    /** @deprecated use `CrmListContactsQueryParamFilter$inboundSchema` instead. */
    CrmListContactsQueryParamFilter$.inboundSchema = exports.CrmListContactsQueryParamFilter$inboundSchema;
    /** @deprecated use `CrmListContactsQueryParamFilter$outboundSchema` instead. */
    CrmListContactsQueryParamFilter$.outboundSchema = exports.CrmListContactsQueryParamFilter$outboundSchema;
})(CrmListContactsQueryParamFilter$ || (exports.CrmListContactsQueryParamFilter$ = CrmListContactsQueryParamFilter$ = {}));
function crmListContactsQueryParamFilterToJSON(crmListContactsQueryParamFilter) {
    return JSON.stringify(exports.CrmListContactsQueryParamFilter$outboundSchema.parse(crmListContactsQueryParamFilter));
}
exports.crmListContactsQueryParamFilterToJSON = crmListContactsQueryParamFilterToJSON;
function crmListContactsQueryParamFilterFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.CrmListContactsQueryParamFilter$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CrmListContactsQueryParamFilter' from JSON`);
}
exports.crmListContactsQueryParamFilterFromJSON = crmListContactsQueryParamFilterFromJSON;
/** @internal */
exports.CrmListContactsRequest$inboundSchema = z.object({
    fields: z.nullable(z.string()).optional(),
    filter: z.nullable(z.lazy(() => exports.CrmListContactsQueryParamFilter$inboundSchema)).optional(),
    include: z.nullable(z.string()).optional(),
    next: z.nullable(z.string()).optional(),
    page: z.nullable(z.string()).optional(),
    page_size: z.nullable(z.string().default("25")),
    proxy: z.nullable(z.record(z.any())).optional(),
    raw: z.nullable(z.boolean().default(false)),
    updated_after: z.nullable(z.string()).optional(),
    "x-account-id": z.string(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "page_size": "pageSize",
        "updated_after": "updatedAfter",
        "x-account-id": "xAccountId",
    });
});
/** @internal */
exports.CrmListContactsRequest$outboundSchema = z.object({
    fields: z.nullable(z.string()).optional(),
    filter: z.nullable(z.lazy(() => exports.CrmListContactsQueryParamFilter$outboundSchema)).optional(),
    include: z.nullable(z.string()).optional(),
    next: z.nullable(z.string()).optional(),
    page: z.nullable(z.string()).optional(),
    pageSize: z.nullable(z.string().default("25")),
    proxy: z.nullable(z.record(z.any())).optional(),
    raw: z.nullable(z.boolean().default(false)),
    updatedAfter: z.nullable(z.string()).optional(),
    xAccountId: z.string(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        pageSize: "page_size",
        updatedAfter: "updated_after",
        xAccountId: "x-account-id",
    });
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var CrmListContactsRequest$;
(function (CrmListContactsRequest$) {
    /** @deprecated use `CrmListContactsRequest$inboundSchema` instead. */
    CrmListContactsRequest$.inboundSchema = exports.CrmListContactsRequest$inboundSchema;
    /** @deprecated use `CrmListContactsRequest$outboundSchema` instead. */
    CrmListContactsRequest$.outboundSchema = exports.CrmListContactsRequest$outboundSchema;
})(CrmListContactsRequest$ || (exports.CrmListContactsRequest$ = CrmListContactsRequest$ = {}));
function crmListContactsRequestToJSON(crmListContactsRequest) {
    return JSON.stringify(exports.CrmListContactsRequest$outboundSchema.parse(crmListContactsRequest));
}
exports.crmListContactsRequestToJSON = crmListContactsRequestToJSON;
function crmListContactsRequestFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.CrmListContactsRequest$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CrmListContactsRequest' from JSON`);
}
exports.crmListContactsRequestFromJSON = crmListContactsRequestFromJSON;
/** @internal */
exports.CrmListContactsResponse$inboundSchema = z.object({
    ContactsPaginated: shared.ContactsPaginated$inboundSchema.optional(),
    ContentType: z.string(),
    Headers: z.record(z.array(z.string())),
    StatusCode: z.number().int(),
    RawResponse: z.instanceof(Response),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "ContactsPaginated": "contactsPaginated",
        "ContentType": "contentType",
        "Headers": "headers",
        "StatusCode": "statusCode",
        "RawResponse": "rawResponse",
    });
});
/** @internal */
exports.CrmListContactsResponse$outboundSchema = z.object({
    contactsPaginated: shared.ContactsPaginated$outboundSchema.optional(),
    contentType: z.string(),
    headers: z.record(z.array(z.string())),
    statusCode: z.number().int(),
    rawResponse: z.instanceof(Response).transform(() => {
        throw new Error("Response cannot be serialized");
    }),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        contactsPaginated: "ContactsPaginated",
        contentType: "ContentType",
        headers: "Headers",
        statusCode: "StatusCode",
        rawResponse: "RawResponse",
    });
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var CrmListContactsResponse$;
(function (CrmListContactsResponse$) {
    /** @deprecated use `CrmListContactsResponse$inboundSchema` instead. */
    CrmListContactsResponse$.inboundSchema = exports.CrmListContactsResponse$inboundSchema;
    /** @deprecated use `CrmListContactsResponse$outboundSchema` instead. */
    CrmListContactsResponse$.outboundSchema = exports.CrmListContactsResponse$outboundSchema;
})(CrmListContactsResponse$ || (exports.CrmListContactsResponse$ = CrmListContactsResponse$ = {}));
function crmListContactsResponseToJSON(crmListContactsResponse) {
    return JSON.stringify(exports.CrmListContactsResponse$outboundSchema.parse(crmListContactsResponse));
}
exports.crmListContactsResponseToJSON = crmListContactsResponseToJSON;
function crmListContactsResponseFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.CrmListContactsResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CrmListContactsResponse' from JSON`);
}
exports.crmListContactsResponseFromJSON = crmListContactsResponseFromJSON;
//# sourceMappingURL=crmlistcontacts.js.map