"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.ActivityInput$outboundSchema = exports.Activity$inboundSchema = exports.ShowAs$outboundSchema = exports.ShowAs$inboundSchema = exports.ActivityType$outboundSchema = exports.ActivityType$inboundSchema = exports.ShowAs = exports.ActivityType = void 0;
exports.activityFromJSON = activityFromJSON;
exports.activityInputToJSON = activityInputToJSON;
const z = __importStar(require("zod/v3"));
const primitives_js_1 = require("../../lib/primitives.js");
const schemas_js_1 = require("../../lib/schemas.js");
const activityattendee_js_1 = require("./activityattendee.js");
const address_js_1 = require("./address.js");
const customfield_js_1 = require("./customfield.js");
const passthroughbody_js_1 = require("./passthroughbody.js");
/**
 * The type of the activity
 */
exports.ActivityType = {
    Call: "call",
    Meeting: "meeting",
    Email: "email",
    Note: "note",
    Task: "task",
    Deadline: "deadline",
    SendLetter: "send-letter",
    SendQuote: "send-quote",
    Other: "other",
};
exports.ShowAs = {
    Free: "free",
    Busy: "busy",
};
/** @internal */
exports.ActivityType$inboundSchema = z.nativeEnum(exports.ActivityType);
/** @internal */
exports.ActivityType$outboundSchema = exports.ActivityType$inboundSchema;
/** @internal */
exports.ShowAs$inboundSchema = z
    .nativeEnum(exports.ShowAs);
/** @internal */
exports.ShowAs$outboundSchema = exports.ShowAs$inboundSchema;
/** @internal */
exports.Activity$inboundSchema = z.object({
    id: z.string().optional(),
    downstream_id: z.nullable(z.string()).optional(),
    activity_datetime: z.nullable(z.string()).optional(),
    duration_seconds: z.nullable(z.number().int()).optional(),
    user_id: z.nullable(z.string()).optional(),
    account_id: z.nullable(z.string()).optional(),
    contact_id: z.nullable(z.string()).optional(),
    company_id: z.nullable(z.string()).optional(),
    opportunity_id: z.nullable(z.string()).optional(),
    lead_id: z.nullable(z.string()).optional(),
    owner_id: z.nullable(z.string()).optional(),
    campaign_id: z.nullable(z.string()).optional(),
    case_id: z.nullable(z.string()).optional(),
    asset_id: z.nullable(z.string()).optional(),
    contract_id: z.nullable(z.string()).optional(),
    product_id: z.nullable(z.string()).optional(),
    solution_id: z.nullable(z.string()).optional(),
    custom_object_id: z.nullable(z.string()).optional(),
    type: z.nullable(exports.ActivityType$inboundSchema),
    title: z.nullable(z.string()).optional(),
    description: z.nullable(z.string()).optional(),
    note: z.nullable(z.string()).optional(),
    location: z.nullable(z.string()).optional(),
    location_address: address_js_1.Address$inboundSchema.optional(),
    all_day_event: z.nullable(z.boolean()).optional(),
    private: z.nullable(z.boolean()).optional(),
    group_event: z.nullable(z.boolean()).optional(),
    event_sub_type: z.nullable(z.string()).optional(),
    group_event_type: z.nullable(z.string()).optional(),
    child: z.nullable(z.boolean()).optional(),
    archived: z.nullable(z.boolean()).optional(),
    deleted: z.nullable(z.boolean()).optional(),
    show_as: z.nullable(exports.ShowAs$inboundSchema).optional(),
    done: z.nullable(z.boolean()).optional(),
    start_datetime: z.nullable(z.string()).optional(),
    end_datetime: z.nullable(z.string()).optional(),
    duration_minutes: z.nullable(z.number().int()).optional(),
    activity_date: z.nullable(z.string()).optional(),
    end_date: z.nullable(z.string()).optional(),
    recurrent: z.boolean().optional(),
    reminder_datetime: z.nullable(z.string()).optional(),
    reminder_set: z.nullable(z.boolean()).optional(),
    video_conference_url: z.nullable(z.string()).optional(),
    video_conference_id: z.nullable(z.string()).optional(),
    custom_fields: z.array(customfield_js_1.CustomField$inboundSchema).optional(),
    attendees: z.array(activityattendee_js_1.ActivityAttendee$inboundSchema).optional(),
    custom_mappings: z.nullable(z.record(z.any())).optional(),
    updated_by: z.nullable(z.string()).optional(),
    created_by: z.nullable(z.string()).optional(),
    updated_at: z.nullable(z.string()).optional(),
    created_at: z.nullable(z.string()).optional(),
    pass_through: z.array(passthroughbody_js_1.PassThroughBody$inboundSchema).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "downstream_id": "downstreamId",
        "activity_datetime": "activityDatetime",
        "duration_seconds": "durationSeconds",
        "user_id": "userId",
        "account_id": "accountId",
        "contact_id": "contactId",
        "company_id": "companyId",
        "opportunity_id": "opportunityId",
        "lead_id": "leadId",
        "owner_id": "ownerId",
        "campaign_id": "campaignId",
        "case_id": "caseId",
        "asset_id": "assetId",
        "contract_id": "contractId",
        "product_id": "productId",
        "solution_id": "solutionId",
        "custom_object_id": "customObjectId",
        "location_address": "locationAddress",
        "all_day_event": "allDayEvent",
        "group_event": "groupEvent",
        "event_sub_type": "eventSubType",
        "group_event_type": "groupEventType",
        "show_as": "showAs",
        "start_datetime": "startDatetime",
        "end_datetime": "endDatetime",
        "duration_minutes": "durationMinutes",
        "activity_date": "activityDate",
        "end_date": "endDate",
        "reminder_datetime": "reminderDatetime",
        "reminder_set": "reminderSet",
        "video_conference_url": "videoConferenceUrl",
        "video_conference_id": "videoConferenceId",
        "custom_fields": "customFields",
        "custom_mappings": "customMappings",
        "updated_by": "updatedBy",
        "created_by": "createdBy",
        "updated_at": "updatedAt",
        "created_at": "createdAt",
        "pass_through": "passThrough",
    });
});
function activityFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.Activity$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Activity' from JSON`);
}
/** @internal */
exports.ActivityInput$outboundSchema = z.object({
    activityDatetime: z.nullable(z.string()).optional(),
    durationSeconds: z.nullable(z.number().int()).optional(),
    userId: z.nullable(z.string()).optional(),
    accountId: z.nullable(z.string()).optional(),
    contactId: z.nullable(z.string()).optional(),
    companyId: z.nullable(z.string()).optional(),
    opportunityId: z.nullable(z.string()).optional(),
    leadId: z.nullable(z.string()).optional(),
    ownerId: z.nullable(z.string()).optional(),
    campaignId: z.nullable(z.string()).optional(),
    caseId: z.nullable(z.string()).optional(),
    assetId: z.nullable(z.string()).optional(),
    contractId: z.nullable(z.string()).optional(),
    productId: z.nullable(z.string()).optional(),
    solutionId: z.nullable(z.string()).optional(),
    customObjectId: z.nullable(z.string()).optional(),
    type: z.nullable(exports.ActivityType$outboundSchema),
    title: z.nullable(z.string()).optional(),
    description: z.nullable(z.string()).optional(),
    note: z.nullable(z.string()).optional(),
    location: z.nullable(z.string()).optional(),
    locationAddress: address_js_1.Address$outboundSchema.optional(),
    allDayEvent: z.nullable(z.boolean()).optional(),
    private: z.nullable(z.boolean()).optional(),
    groupEvent: z.nullable(z.boolean()).optional(),
    eventSubType: z.nullable(z.string()).optional(),
    groupEventType: z.nullable(z.string()).optional(),
    child: z.nullable(z.boolean()).optional(),
    archived: z.nullable(z.boolean()).optional(),
    deleted: z.nullable(z.boolean()).optional(),
    showAs: z.nullable(exports.ShowAs$outboundSchema).optional(),
    done: z.nullable(z.boolean()).optional(),
    startDatetime: z.nullable(z.string()).optional(),
    endDatetime: z.nullable(z.string()).optional(),
    activityDate: z.nullable(z.string()).optional(),
    endDate: z.nullable(z.string()).optional(),
    recurrent: z.boolean().optional(),
    reminderDatetime: z.nullable(z.string()).optional(),
    reminderSet: z.nullable(z.boolean()).optional(),
    videoConferenceUrl: z.nullable(z.string()).optional(),
    videoConferenceId: z.nullable(z.string()).optional(),
    customFields: z.array(customfield_js_1.CustomField$outboundSchema).optional(),
    attendees: z.array(activityattendee_js_1.ActivityAttendeeInput$outboundSchema).optional(),
    passThrough: z.array(passthroughbody_js_1.PassThroughBody$outboundSchema).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        activityDatetime: "activity_datetime",
        durationSeconds: "duration_seconds",
        userId: "user_id",
        accountId: "account_id",
        contactId: "contact_id",
        companyId: "company_id",
        opportunityId: "opportunity_id",
        leadId: "lead_id",
        ownerId: "owner_id",
        campaignId: "campaign_id",
        caseId: "case_id",
        assetId: "asset_id",
        contractId: "contract_id",
        productId: "product_id",
        solutionId: "solution_id",
        customObjectId: "custom_object_id",
        locationAddress: "location_address",
        allDayEvent: "all_day_event",
        groupEvent: "group_event",
        eventSubType: "event_sub_type",
        groupEventType: "group_event_type",
        showAs: "show_as",
        startDatetime: "start_datetime",
        endDatetime: "end_datetime",
        activityDate: "activity_date",
        endDate: "end_date",
        reminderDatetime: "reminder_datetime",
        reminderSet: "reminder_set",
        videoConferenceUrl: "video_conference_url",
        videoConferenceId: "video_conference_id",
        customFields: "custom_fields",
        passThrough: "pass_through",
    });
});
function activityInputToJSON(activityInput) {
    return JSON.stringify(exports.ActivityInput$outboundSchema.parse(activityInput));
}
//# sourceMappingURL=activity.js.map