"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.stackoneListLinkedAccountsResponseFromJSON = exports.stackoneListLinkedAccountsResponseToJSON = exports.StackoneListLinkedAccountsResponse$ = exports.StackoneListLinkedAccountsResponse$outboundSchema = exports.StackoneListLinkedAccountsResponse$inboundSchema = exports.stackoneListLinkedAccountsRequestFromJSON = exports.stackoneListLinkedAccountsRequestToJSON = exports.StackoneListLinkedAccountsRequest$ = exports.StackoneListLinkedAccountsRequest$outboundSchema = exports.StackoneListLinkedAccountsRequest$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.StackoneListLinkedAccountsRequest$inboundSchema = z.object({
    account_ids: z.array(z.string()).optional(),
    origin_owner_id: z.nullable(z.string()).optional(),
    page: z.nullable(z.number()).optional(),
    page_size: z.nullable(z.number().default(25)),
    provider: z.nullable(z.string()).optional(),
    providers: z.array(z.string()).optional(),
    status: z.array(z.string()).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "account_ids": "accountIds",
        "origin_owner_id": "originOwnerId",
        "page_size": "pageSize",
    });
});
/** @internal */
exports.StackoneListLinkedAccountsRequest$outboundSchema = z.object({
    accountIds: z.array(z.string()).optional(),
    originOwnerId: z.nullable(z.string()).optional(),
    page: z.nullable(z.number()).optional(),
    pageSize: z.nullable(z.number().default(25)),
    provider: z.nullable(z.string()).optional(),
    providers: z.array(z.string()).optional(),
    status: z.array(z.string()).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        accountIds: "account_ids",
        originOwnerId: "origin_owner_id",
        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 StackoneListLinkedAccountsRequest$;
(function (StackoneListLinkedAccountsRequest$) {
    /** @deprecated use `StackoneListLinkedAccountsRequest$inboundSchema` instead. */
    StackoneListLinkedAccountsRequest$.inboundSchema = exports.StackoneListLinkedAccountsRequest$inboundSchema;
    /** @deprecated use `StackoneListLinkedAccountsRequest$outboundSchema` instead. */
    StackoneListLinkedAccountsRequest$.outboundSchema = exports.StackoneListLinkedAccountsRequest$outboundSchema;
})(StackoneListLinkedAccountsRequest$ || (exports.StackoneListLinkedAccountsRequest$ = StackoneListLinkedAccountsRequest$ = {}));
function stackoneListLinkedAccountsRequestToJSON(stackoneListLinkedAccountsRequest) {
    return JSON.stringify(exports.StackoneListLinkedAccountsRequest$outboundSchema.parse(stackoneListLinkedAccountsRequest));
}
exports.stackoneListLinkedAccountsRequestToJSON = stackoneListLinkedAccountsRequestToJSON;
function stackoneListLinkedAccountsRequestFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.StackoneListLinkedAccountsRequest$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'StackoneListLinkedAccountsRequest' from JSON`);
}
exports.stackoneListLinkedAccountsRequestFromJSON = stackoneListLinkedAccountsRequestFromJSON;
/** @internal */
exports.StackoneListLinkedAccountsResponse$inboundSchema = z.object({
    ContentType: z.string(),
    Headers: z.record(z.array(z.string())),
    StatusCode: z.number().int(),
    RawResponse: z.instanceof(Response),
    classes: z.array(shared.LinkedAccount$inboundSchema).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "ContentType": "contentType",
        "Headers": "headers",
        "StatusCode": "statusCode",
        "RawResponse": "rawResponse",
    });
});
/** @internal */
exports.StackoneListLinkedAccountsResponse$outboundSchema = z.object({
    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");
    }),
    classes: z.array(shared.LinkedAccount$outboundSchema).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        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 StackoneListLinkedAccountsResponse$;
(function (StackoneListLinkedAccountsResponse$) {
    /** @deprecated use `StackoneListLinkedAccountsResponse$inboundSchema` instead. */
    StackoneListLinkedAccountsResponse$.inboundSchema = exports.StackoneListLinkedAccountsResponse$inboundSchema;
    /** @deprecated use `StackoneListLinkedAccountsResponse$outboundSchema` instead. */
    StackoneListLinkedAccountsResponse$.outboundSchema = exports.StackoneListLinkedAccountsResponse$outboundSchema;
})(StackoneListLinkedAccountsResponse$ || (exports.StackoneListLinkedAccountsResponse$ = StackoneListLinkedAccountsResponse$ = {}));
function stackoneListLinkedAccountsResponseToJSON(stackoneListLinkedAccountsResponse) {
    return JSON.stringify(exports.StackoneListLinkedAccountsResponse$outboundSchema.parse(stackoneListLinkedAccountsResponse));
}
exports.stackoneListLinkedAccountsResponseToJSON = stackoneListLinkedAccountsResponseToJSON;
function stackoneListLinkedAccountsResponseFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.StackoneListLinkedAccountsResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'StackoneListLinkedAccountsResponse' from JSON`);
}
exports.stackoneListLinkedAccountsResponseFromJSON = stackoneListLinkedAccountsResponseFromJSON;
//# sourceMappingURL=stackonelistlinkedaccounts.js.map