/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. * @generated-id: 477948be799e */ import * as z from "zod/v3"; import { DocumentPermissionsDefinition, DocumentPermissionsDefinition$Outbound, DocumentPermissionsDefinition$outboundSchema, } from "./documentpermissionsdefinition.js"; /** * Describes the request body of the /updatepermissions API call */ export type UpdatePermissionsRequest = { datasource: string; /** * The type of the document (Case, KnowledgeArticle for Salesforce for example). It cannot have spaces or _ */ objectType?: string | undefined; /** * The datasource specific id for the document. This field is case insensitive and should not be more than 200 characters in length. */ id?: string | undefined; /** * The permalink for viewing the document. **Note: viewURL is a required field if id was not set when uploading the document.**' * * @remarks */ viewURL?: string | undefined; /** * describes the access control details of the document */ permissions: DocumentPermissionsDefinition; }; /** @internal */ export type UpdatePermissionsRequest$Outbound = { datasource: string; objectType?: string | undefined; id?: string | undefined; viewURL?: string | undefined; permissions: DocumentPermissionsDefinition$Outbound; }; /** @internal */ export const UpdatePermissionsRequest$outboundSchema: z.ZodType< UpdatePermissionsRequest$Outbound, z.ZodTypeDef, UpdatePermissionsRequest > = z.object({ datasource: z.string(), objectType: z.string().optional(), id: z.string().optional(), viewURL: z.string().optional(), permissions: DocumentPermissionsDefinition$outboundSchema, }); export function updatePermissionsRequestToJSON( updatePermissionsRequest: UpdatePermissionsRequest, ): string { return JSON.stringify( UpdatePermissionsRequest$outboundSchema.parse(updatePermissionsRequest), ); }