@docusign/iam-sdk
Version:
Developer-friendly & type-safe Typescript SDK specifically catered to leverage *@docusign/iam-sdk* API.
46 lines (40 loc) • 1.14 kB
text/typescript
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
import * as z from "zod/v3";
import { remap as remap$ } from "../../lib/primitives.js";
export type CreateWorkspaceBody = {
/**
* The name of the workspace
*/
name: string | null;
/**
* A GUID value that identifies a brand. For more information, see <a href="https://developers.docusign.com/docs/esign-rest-api/esign101/concepts/branding/">Branding</a>
*/
brandId?: string | null | undefined;
};
/** @internal */
export type CreateWorkspaceBody$Outbound = {
name: string | null;
brand_id?: string | null | undefined;
};
/** @internal */
export const CreateWorkspaceBody$outboundSchema: z.ZodType<
CreateWorkspaceBody$Outbound,
z.ZodTypeDef,
CreateWorkspaceBody
> = z.object({
name: z.nullable(z.string()),
brandId: z.nullable(z.string()).optional(),
}).transform((v) => {
return remap$(v, {
brandId: "brand_id",
});
});
export function createWorkspaceBodyToJSON(
createWorkspaceBody: CreateWorkspaceBody,
): string {
return JSON.stringify(
CreateWorkspaceBody$outboundSchema.parse(createWorkspaceBody),
);
}