/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import { folderSharingsDeleteFoldersFolderIdSharingsSharingId } from "../funcs/folderSharingsDeleteFoldersFolderIdSharingsSharingId.js"; import { folderSharingsGetFoldersFolderIdSharings } from "../funcs/folderSharingsGetFoldersFolderIdSharings.js"; import { folderSharingsGetFoldersFolderIdSharingsSharingId } from "../funcs/folderSharingsGetFoldersFolderIdSharingsSharingId.js"; import { folderSharingsPostFoldersFolderIdSharings } from "../funcs/folderSharingsPostFoldersFolderIdSharings.js"; import { folderSharingsPutFoldersFolderIdSharingsSharingId } from "../funcs/folderSharingsPutFoldersFolderIdSharingsSharingId.js"; import { ClientSDK, RequestOptions } from "../lib/sdks.js"; import * as operations from "../models/operations/index.js"; import { unwrapAsync } from "../types/fp.js"; export class FolderSharings extends ClientSDK { /** * List Folder Sharings * * @remarks * Lists the sharings of contacts and contact groups on a folder. * * ## Requires api token with one of the following permissions * ``` * Read all data * ``` */ async getFoldersFolderIdSharings( request: operations.GetFoldersFolderIdSharingsRequest, options?: RequestOptions, ): Promise> { return unwrapAsync(folderSharingsGetFoldersFolderIdSharings( this, request, options, )); } /** * Create Folder Sharing * * @remarks * Creates a new sharing object for a folder by specifying the email of the person to share with and other optional parameters. * * ## Requires api token with one of the following permissions * ``` * Read, update & delete anything * ``` */ async postFoldersFolderIdSharings( request: operations.PostFoldersFolderIdSharingsRequest, options?: RequestOptions, ): Promise { return unwrapAsync(folderSharingsPostFoldersFolderIdSharings( this, request, options, )); } /** * Show Folder Sharing * * @remarks * Retrieves the details of a specific sharing object for a given folder. * * ## Requires api token with one of the following permissions * ``` * Read all data * ``` */ async getFoldersFolderIdSharingsSharingId( request: operations.GetFoldersFolderIdSharingsSharingIdRequest, options?: RequestOptions, ): Promise { return unwrapAsync(folderSharingsGetFoldersFolderIdSharingsSharingId( this, request, options, )); } /** * Update Folder Sharing * * @remarks * Updates a sharing on a folder. * * ## Requires api token with one of the following permissions * ``` * Read, update & delete anything * ``` */ async putFoldersFolderIdSharingsSharingId( request: operations.PutFoldersFolderIdSharingsSharingIdRequest, options?: RequestOptions, ): Promise { return unwrapAsync(folderSharingsPutFoldersFolderIdSharingsSharingId( this, request, options, )); } /** * Delete Folder Sharing * * @remarks * Deletes a sharing on a folder. * * ## Requires api token with one of the following permissions * ``` * Read, update & delete anything * ``` */ async deleteFoldersFolderIdSharingsSharingId( request: operations.DeleteFoldersFolderIdSharingsSharingIdRequest, options?: RequestOptions, ): Promise { return unwrapAsync(folderSharingsDeleteFoldersFolderIdSharingsSharingId( this, request, options, )); } }