export type ErrorDetails = {errorCode?: string | undefined, message?: string | undefined}; export type UserInfo = {accountId?: string | undefined, accountName?: string | undefined, activationAccessCode?: string | undefined, email?: string | undefined, errorDetails?: ErrorDetails | undefined, ipAddress?: string | undefined, loginStatus?: string | undefined, membershipId?: string | undefined, sendActivationEmail?: string | undefined, uri?: string | undefined, userId?: string | undefined, userName?: string | undefined, userStatus?: string | undefined, userType?: string | undefined}; export type Group = {accessType?: string | undefined, dsGroupId?: string | undefined, errorDetails?: ErrorDetails | undefined, groupId?: string | undefined, groupName?: string | undefined, groupType?: string | undefined, isManagedByScim?: boolean | undefined, lastModifiedOn?: string | undefined, permissionProfileId?: string | undefined, userGroupType?: string | undefined, users?: Array | undefined, usersCount?: string | undefined}; export type GroupInformation = {endPosition?: string | undefined, groups?: Array | undefined, nextUri?: string | undefined, previousUri?: string | undefined, resultSetSize?: string | undefined, startPosition?: string | undefined, totalSetSize?: string | undefined}; export type DeleteApiV21AccountsAccountIdTemplatesTemplateIdTemplatePartArgs = {accountId: string, templateId: string, templatePart: string, body: GroupInformation}; export type DeleteApiV21AccountsAccountIdTemplatesTemplateIdTemplatePartOptions = {baseUrl?: string | undefined, fetch?: typeof fetch | undefined}; /** * Removes a member group's sharing permissions for a template. * * DELETE /v2.1/accounts/{accountId}/templates/{templateId}/{templatePart} */ export const deleteApiV21AccountsAccountIdTemplatesTemplateIdTemplatePart = async (args: DeleteApiV21AccountsAccountIdTemplatesTemplateIdTemplatePartArgs, options?: DeleteApiV21AccountsAccountIdTemplatesTemplateIdTemplatePartOptions) => { const {baseUrl = "https://www.docusign.net/restapi", fetch: fetchFn = fetch} = options ?? {} const query = new URLSearchParams() const headers = new Headers() headers.set('content-type', "application/json") headers.set('accept', "*/*") const url = `${baseUrl.replace(/\/+$/, '')}/v2.1/accounts/${encodeURIComponent(String(args.accountId))}/templates/${encodeURIComponent(String(args.templateId))}/${encodeURIComponent(String(args.templatePart))}${query.size > 0 ? `?${query}` : ''}` const res = await fetchFn(url, {method: "DELETE", headers, body: JSON.stringify(args.body)}) if (!res.ok) throw new Error(`Request failed with status ${res.status}`, {cause: {status: res.status, body: await res.text()}}) return res.blob() };