"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.StackoneListActionsMetaResponse$ = exports.StackoneListActionsMetaResponse$outboundSchema = exports.StackoneListActionsMetaResponse$inboundSchema = exports.StackoneListActionsMetaRequest$ = exports.StackoneListActionsMetaRequest$outboundSchema = exports.StackoneListActionsMetaRequest$inboundSchema = exports.Include$ = exports.Include$outboundSchema = exports.Include$inboundSchema = exports.Filter$ = exports.Filter$outboundSchema = exports.Filter$inboundSchema = exports.Include = void 0;
exports.filterToJSON = filterToJSON;
exports.filterFromJSON = filterFromJSON;
exports.stackoneListActionsMetaRequestToJSON = stackoneListActionsMetaRequestToJSON;
exports.stackoneListActionsMetaRequestFromJSON = stackoneListActionsMetaRequestFromJSON;
exports.stackoneListActionsMetaResponseToJSON = stackoneListActionsMetaResponseToJSON;
exports.stackoneListActionsMetaResponseFromJSON = stackoneListActionsMetaResponseFromJSON;
const z = __importStar(require("zod/v3"));
const primitives_js_1 = require("../../../lib/primitives.js");
const schemas_js_1 = require("../../../lib/schemas.js");
const shared = __importStar(require("../shared/index.js"));
var Include;
(function (Include) {
    Include["OperationDetails"] = "operation_details";
})(Include || (exports.Include = Include = {}));
/** @internal */
exports.Filter$inboundSchema = z
    .object({
    account_ids: z.nullable(z.string()).optional(),
    action_key: z.nullable(z.string()).optional(),
    connectors: z.nullable(z.string()).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "account_ids": "accountIds",
        "action_key": "actionKey",
    });
});
/** @internal */
exports.Filter$outboundSchema = z.object({
    accountIds: z.nullable(z.string()).optional(),
    actionKey: z.nullable(z.string()).optional(),
    connectors: z.nullable(z.string()).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        accountIds: "account_ids",
        actionKey: "action_key",
    });
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var Filter$;
(function (Filter$) {
    /** @deprecated use `Filter$inboundSchema` instead. */
    Filter$.inboundSchema = exports.Filter$inboundSchema;
    /** @deprecated use `Filter$outboundSchema` instead. */
    Filter$.outboundSchema = exports.Filter$outboundSchema;
})(Filter$ || (exports.Filter$ = Filter$ = {}));
function filterToJSON(filter) {
    return JSON.stringify(exports.Filter$outboundSchema.parse(filter));
}
function filterFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.Filter$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Filter' from JSON`);
}
/** @internal */
exports.Include$inboundSchema = z
    .nativeEnum(Include);
/** @internal */
exports.Include$outboundSchema = exports.Include$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var Include$;
(function (Include$) {
    /** @deprecated use `Include$inboundSchema` instead. */
    Include$.inboundSchema = exports.Include$inboundSchema;
    /** @deprecated use `Include$outboundSchema` instead. */
    Include$.outboundSchema = exports.Include$outboundSchema;
})(Include$ || (exports.Include$ = Include$ = {}));
/** @internal */
exports.StackoneListActionsMetaRequest$inboundSchema = z.object({
    filter: z.nullable(z.lazy(() => exports.Filter$inboundSchema)).optional(),
    group_by: z.nullable(z.string().default("connector")),
    include: z.nullable(z.array(exports.Include$inboundSchema)).optional(),
    next: z.nullable(z.string()).optional(),
    page: z.nullable(z.string()).optional(),
    page_size: z.nullable(z.string()).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "group_by": "groupBy",
        "page_size": "pageSize",
    });
});
/** @internal */
exports.StackoneListActionsMetaRequest$outboundSchema = z.object({
    filter: z.nullable(z.lazy(() => exports.Filter$outboundSchema)).optional(),
    groupBy: z.nullable(z.string().default("connector")),
    include: z.nullable(z.array(exports.Include$outboundSchema)).optional(),
    next: z.nullable(z.string()).optional(),
    page: z.nullable(z.string()).optional(),
    pageSize: z.nullable(z.string()).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        groupBy: "group_by",
        pageSize: "page_size",
    });
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var StackoneListActionsMetaRequest$;
(function (StackoneListActionsMetaRequest$) {
    /** @deprecated use `StackoneListActionsMetaRequest$inboundSchema` instead. */
    StackoneListActionsMetaRequest$.inboundSchema = exports.StackoneListActionsMetaRequest$inboundSchema;
    /** @deprecated use `StackoneListActionsMetaRequest$outboundSchema` instead. */
    StackoneListActionsMetaRequest$.outboundSchema = exports.StackoneListActionsMetaRequest$outboundSchema;
})(StackoneListActionsMetaRequest$ || (exports.StackoneListActionsMetaRequest$ = StackoneListActionsMetaRequest$ = {}));
function stackoneListActionsMetaRequestToJSON(stackoneListActionsMetaRequest) {
    return JSON.stringify(exports.StackoneListActionsMetaRequest$outboundSchema.parse(stackoneListActionsMetaRequest));
}
function stackoneListActionsMetaRequestFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.StackoneListActionsMetaRequest$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'StackoneListActionsMetaRequest' from JSON`);
}
/** @internal */
exports.StackoneListActionsMetaResponse$inboundSchema = z.object({
    ActionsMetaPaginated: shared.ActionsMetaPaginated$inboundSchema.optional(),
    ContentType: z.string(),
    Headers: z.record(z.array(z.string())).default({}),
    StatusCode: z.number().int(),
    RawResponse: z.instanceof(Response),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "ActionsMetaPaginated": "actionsMetaPaginated",
        "ContentType": "contentType",
        "Headers": "headers",
        "StatusCode": "statusCode",
        "RawResponse": "rawResponse",
    });
});
/** @internal */
exports.StackoneListActionsMetaResponse$outboundSchema = z.object({
    actionsMetaPaginated: shared.ActionsMetaPaginated$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, {
        actionsMetaPaginated: "ActionsMetaPaginated",
        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 StackoneListActionsMetaResponse$;
(function (StackoneListActionsMetaResponse$) {
    /** @deprecated use `StackoneListActionsMetaResponse$inboundSchema` instead. */
    StackoneListActionsMetaResponse$.inboundSchema = exports.StackoneListActionsMetaResponse$inboundSchema;
    /** @deprecated use `StackoneListActionsMetaResponse$outboundSchema` instead. */
    StackoneListActionsMetaResponse$.outboundSchema = exports.StackoneListActionsMetaResponse$outboundSchema;
})(StackoneListActionsMetaResponse$ || (exports.StackoneListActionsMetaResponse$ = StackoneListActionsMetaResponse$ = {}));
function stackoneListActionsMetaResponseToJSON(stackoneListActionsMetaResponse) {
    return JSON.stringify(exports.StackoneListActionsMetaResponse$outboundSchema.parse(stackoneListActionsMetaResponse));
}
function stackoneListActionsMetaResponseFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.StackoneListActionsMetaResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'StackoneListActionsMetaResponse' from JSON`);
}
//# sourceMappingURL=stackonelistactionsmeta.js.map