@docusign/iam-sdk
Version:
Developer-friendly & type-safe Typescript SDK specifically catered to leverage *@docusign/iam-sdk* API.
35 lines (30 loc) • 926 B
text/typescript
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
import * as z from "zod/v3";
import { safeParse } from "../../lib/schemas.js";
import { Result as SafeParseResult } from "../../types/fp.js";
import * as types from "../../types/primitives.js";
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
export type BrandColor = {
name?: string | null | undefined;
value?: string | null | undefined;
};
/** @internal */
export const BrandColor$inboundSchema: z.ZodType<
BrandColor,
z.ZodTypeDef,
unknown
> = z.object({
name: z.nullable(types.string()).optional(),
value: z.nullable(types.string()).optional(),
});
export function brandColorFromJSON(
jsonString: string,
): SafeParseResult<BrandColor, SDKValidationError> {
return safeParse(
jsonString,
(x) => BrandColor$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'BrandColor' from JSON`,
);
}