UNPKG

@docusign/iam-sdk

Version:

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

67 lines (62 loc) 1.89 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"; /** * The details of a single workspace */ export type UpdateWorkspaceResponse = { /** * The ID of the workspace */ workspaceId: string; /** * The name of the workspace */ name?: string | null | undefined; /** * The date the workspace was created */ createdDate?: Date | null | undefined; /** * The ID of the user who created the workspace */ createdByUserId?: string | null | undefined; /** * The list of user IDs of the workspace owners */ workspaceOwnerIds?: Array<string> | null | undefined; }; /** @internal */ export const UpdateWorkspaceResponse$inboundSchema: z.ZodType< UpdateWorkspaceResponse, z.ZodTypeDef, unknown > = z.object({ workspace_id: types.string(), name: z.nullable(types.string()).optional(), created_date: z.nullable(types.date()).optional(), created_by_user_id: z.nullable(types.string()).optional(), workspace_owner_ids: z.nullable(z.array(types.string())).optional(), }).transform((v) => { return remap$(v, { "workspace_id": "workspaceId", "created_date": "createdDate", "created_by_user_id": "createdByUserId", "workspace_owner_ids": "workspaceOwnerIds", }); }); export function updateWorkspaceResponseFromJSON( jsonString: string, ): SafeParseResult<UpdateWorkspaceResponse, SDKValidationError> { return safeParse( jsonString, (x) => UpdateWorkspaceResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'UpdateWorkspaceResponse' from JSON`, ); }