/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import * as components from "../components/index.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; export type AssetsListAssets1Request = { /** * The parent resource name, which is the correspondent ID. */ parent?: string | undefined; /** * The maximum number of assets to return. The service may return fewer than this value. Default is 100 (subject to change) The maximum is 1000, values exceeding this will be set to 1000 (subject to change) */ pageSize?: number | undefined; /** * A page token, received from a previous `ListAssets` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListAssets` must match the call that provided the page token in order to maintain a stable result set. */ pageToken?: string | undefined; /** * A CEL string to filter results; See the [CEL Search](https://developer.apexclearing.com/apex-fintech-solutions/docs/cel-search) page in Guides for more information; */ filter?: string | undefined; }; export type AssetsListAssets1Response = { httpMeta: components.HTTPMetadata; /** * OK */ listAssetsResponse?: components.ListAssetsResponse | undefined; /** * INVALID_ARGUMENT: The request is not valid, additional information may be present in the BadRequest details. */ status?: components.Status | undefined; }; /** @internal */ export const AssetsListAssets1Request$inboundSchema: z.ZodType< AssetsListAssets1Request, z.ZodTypeDef, unknown > = z.object({ parent: z.string().optional(), page_size: z.number().int().optional(), page_token: z.string().optional(), filter: z.string().optional(), }).transform((v) => { return remap$(v, { "page_size": "pageSize", "page_token": "pageToken", }); }); /** @internal */ export type AssetsListAssets1Request$Outbound = { parent?: string | undefined; page_size?: number | undefined; page_token?: string | undefined; filter?: string | undefined; }; /** @internal */ export const AssetsListAssets1Request$outboundSchema: z.ZodType< AssetsListAssets1Request$Outbound, z.ZodTypeDef, AssetsListAssets1Request > = z.object({ parent: z.string().optional(), pageSize: z.number().int().optional(), pageToken: z.string().optional(), filter: z.string().optional(), }).transform((v) => { return remap$(v, { pageSize: "page_size", pageToken: "page_token", }); }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace AssetsListAssets1Request$ { /** @deprecated use `AssetsListAssets1Request$inboundSchema` instead. */ export const inboundSchema = AssetsListAssets1Request$inboundSchema; /** @deprecated use `AssetsListAssets1Request$outboundSchema` instead. */ export const outboundSchema = AssetsListAssets1Request$outboundSchema; /** @deprecated use `AssetsListAssets1Request$Outbound` instead. */ export type Outbound = AssetsListAssets1Request$Outbound; } export function assetsListAssets1RequestToJSON( assetsListAssets1Request: AssetsListAssets1Request, ): string { return JSON.stringify( AssetsListAssets1Request$outboundSchema.parse(assetsListAssets1Request), ); } export function assetsListAssets1RequestFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => AssetsListAssets1Request$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'AssetsListAssets1Request' from JSON`, ); } /** @internal */ export const AssetsListAssets1Response$inboundSchema: z.ZodType< AssetsListAssets1Response, z.ZodTypeDef, unknown > = z.object({ HttpMeta: components.HTTPMetadata$inboundSchema, ListAssetsResponse: components.ListAssetsResponse$inboundSchema.optional(), Status: components.Status$inboundSchema.optional(), }).transform((v) => { return remap$(v, { "HttpMeta": "httpMeta", "ListAssetsResponse": "listAssetsResponse", "Status": "status", }); }); /** @internal */ export type AssetsListAssets1Response$Outbound = { HttpMeta: components.HTTPMetadata$Outbound; ListAssetsResponse?: components.ListAssetsResponse$Outbound | undefined; Status?: components.Status$Outbound | undefined; }; /** @internal */ export const AssetsListAssets1Response$outboundSchema: z.ZodType< AssetsListAssets1Response$Outbound, z.ZodTypeDef, AssetsListAssets1Response > = z.object({ httpMeta: components.HTTPMetadata$outboundSchema, listAssetsResponse: components.ListAssetsResponse$outboundSchema.optional(), status: components.Status$outboundSchema.optional(), }).transform((v) => { return remap$(v, { httpMeta: "HttpMeta", listAssetsResponse: "ListAssetsResponse", status: "Status", }); }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace AssetsListAssets1Response$ { /** @deprecated use `AssetsListAssets1Response$inboundSchema` instead. */ export const inboundSchema = AssetsListAssets1Response$inboundSchema; /** @deprecated use `AssetsListAssets1Response$outboundSchema` instead. */ export const outboundSchema = AssetsListAssets1Response$outboundSchema; /** @deprecated use `AssetsListAssets1Response$Outbound` instead. */ export type Outbound = AssetsListAssets1Response$Outbound; } export function assetsListAssets1ResponseToJSON( assetsListAssets1Response: AssetsListAssets1Response, ): string { return JSON.stringify( AssetsListAssets1Response$outboundSchema.parse(assetsListAssets1Response), ); } export function assetsListAssets1ResponseFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => AssetsListAssets1Response$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'AssetsListAssets1Response' from JSON`, ); }