/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import { foldersDeleteFoldersId } from "../funcs/foldersDeleteFoldersId.js"; import { foldersGetFolders } from "../funcs/foldersGetFolders.js"; import { foldersGetFoldersId } from "../funcs/foldersGetFoldersId.js"; import { foldersPostFolders } from "../funcs/foldersPostFolders.js"; import { foldersPostFoldersIdCopy } from "../funcs/foldersPostFoldersIdCopy.js"; import { foldersPutFoldersId } from "../funcs/foldersPutFoldersId.js"; import { ClientSDK, RequestOptions } from "../lib/sdks.js"; import * as operations from "../models/operations/index.js"; import { unwrapAsync } from "../types/fp.js"; export class Folders extends ClientSDK { /** * List Folders * * @remarks * Lists folders (previously called projects) belonging to the account. * * ## Requires api token with one of the following permissions * ``` * Read all folder and media data * ``` */ async getFolders( request?: operations.GetFoldersRequest | undefined, options?: RequestOptions, ): Promise> { return unwrapAsync(foldersGetFolders( this, request, options, )); } /** * Create Folder * * @remarks * Creates a new folder (previously called project). If the folder is created successfully the Location HTTP header will point to the new folder. * * ## Requires api token with one of the following permissions * ``` * Read, update & delete anything * ``` */ async postFolders( request?: operations.PostFoldersRequest | undefined, options?: RequestOptions, ): Promise { return unwrapAsync(foldersPostFolders( this, request, options, )); } /** * Show Folder * * @remarks * Retrieves a single folder (previously called project). * * ## Requires api token with one of the following permissions * ``` * Read all folder and media data * ``` */ async getFoldersId( request: operations.GetFoldersIdRequest, options?: RequestOptions, ): Promise { return unwrapAsync(foldersGetFoldersId( this, request, options, )); } /** * Update Folder * * @remarks * Updates a folder (previously called project) * * ## Requires api token with one of the following permissions * ``` * Read, update & delete anything * ``` */ async putFoldersId( request: operations.PutFoldersIdRequest, options?: RequestOptions, ): Promise { return unwrapAsync(foldersPutFoldersId( this, request, options, )); } /** * Delete Folder * * @remarks * Deletes a folder (previously called project) * * ## Requires api token with one of the following permissions * ``` * Read, update & delete anything * ``` */ async deleteFoldersId( request: operations.DeleteFoldersIdRequest, options?: RequestOptions, ): Promise { return unwrapAsync(foldersDeleteFoldersId( this, request, options, )); } /** * Copy Folder * * @remarks * This copies a folder (previously called project) and all its media and subfolders asynchronously in a background job. * * This method does not copy the folder’s sharing information (i.e. users that could see the old folder will not automatically be able to see the new one). * * For the request you can specify the owner of a new folder by passing an optional parameter. The person you specify must be a Manager in the account. * * The body of the response will contain an object representing the background job that was created. * * ## Requires api token with one of the following permissions * ``` * Read, update & delete anything * ``` */ async postFoldersIdCopy( request: operations.PostFoldersIdCopyRequest, options?: RequestOptions, ): Promise { return unwrapAsync(foldersPostFoldersIdCopy( this, request, options, )); } }