UNPKG

@docusign/iam-sdk

Version:

Developer-friendly & type-safe Typescript SDK specifically catered to leverage *@docusign/iam-sdk* API.

41 lines (36 loc) 1.14 kB
/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; 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 UpdateWorkspaceUserResponse = { /** * The ID of the role assigned to the user */ roleId?: string | undefined; }; /** @internal */ export const UpdateWorkspaceUserResponse$inboundSchema: z.ZodType< UpdateWorkspaceUserResponse, z.ZodTypeDef, unknown > = z.object({ role_id: types.optional(types.string()), }).transform((v) => { return remap$(v, { "role_id": "roleId", }); }); export function updateWorkspaceUserResponseFromJSON( jsonString: string, ): SafeParseResult<UpdateWorkspaceUserResponse, SDKValidationError> { return safeParse( jsonString, (x) => UpdateWorkspaceUserResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'UpdateWorkspaceUserResponse' from JSON`, ); }