UNPKG

spws

Version:

SharePoint Web Services Wrapper

27 lines (26 loc) 2.26 kB
import { List, ListAttributes, SpwsResponse } from "../../types"; interface Operation extends SpwsResponse { data: List; } /** * Returns a schema for the specified list. * * @param listName The list display name or GUID * @link https://docs.microsoft.com/en-us/previous-versions/office/developer/sharepoint-services/ms772709(v=office.12) * @example * ``` * // Get list using default parameters * const list = await getList({ listName: "Announcements" }); * // Get list on another site * const list = await getList({ listName: "Announcements", webURL: "/sites/hr" }); * // Get list with only the Title and Fields attributes parsed * const list = await getList({ listName: "Title", attributes: ["Title", "Fields"] }) * ``` */ declare const getList: (listName: string, { webURL, attributes, }?: { /** The SharePoint web URL */ webURL?: string | undefined; /** The list attributes that should be returned in the data object */ attributes?: ("Title" | "Name" | "ID" | "Modified" | "Created" | "AllowDeletion" | "BaseType" | "Description" | "Hidden" | "StaticName" | "Version" | "AllowMultiResponses" | "AnonymousPermMask" | "Author" | "DefaultViewUrl" | "Direction" | "DocTemplateUrl" | "EmailAlias" | "EnableAttachments" | "EnableFolderCreation" | "EnableMinorVersion" | "EnableModeration" | "EnablePeopleSelector" | "EnableResourceSelector" | "EnableVersioning" | "EnforceDataValidation" | "EventSinkAssembly" | "EventSinkClass" | "EventSinkData" | "ExcludeFromOfflineClient" | "FeatureId" | "Fields" | "Flags" | "HasExternalDataSource" | "HasRelatedLists" | "HasUniqueScopes" | "ImageUrl" | "IrmEnabled" | "IsApplicationList" | "ItemCount" | "LastDeleted" | "MajorVersionLimit" | "MajorWithMinorVersionsLimit" | "MaxItemsPerThrottledOperation" | "MobileDefaultViewUrl" | "MultipleDataList" | "NoThrottleListOperations" | "Ordered" | "PreserveEmptyValues" | "ReadSecurity" | "RequireCheckout" | "RootFolder" | "ScopeId" | "SendToLocation" | "ServerTemplate" | "ShowUser" | "StrictTypeCoercion" | "ThrottleListOperations" | "ThumbnailSize" | "WebFullUrl" | "WebId" | "WebImageHeight" | "WebImageWidth" | "WorkFlowId" | "WriteSecurity")[] | undefined; }) => Promise<Operation>; export default getList;