import { BaseComponentContext } from '@microsoft/sp-component-base'; import { ISPContentType, ISPField, ISPLists, IUploadImageResult, ISPViews } from "../common/SPEntities"; import { IContentTypesOptions, IFieldsOptions, ILibsOptions, IRenderListDataAsStreamClientFormResult, ISPService } from "./ISPService"; import { orderBy } from '../controls/viewPicker/IViewPicker'; export default class SPService implements ISPService { private _context; private _webAbsoluteUrl; private _cachedListItems; constructor(_context: BaseComponentContext, webAbsoluteUrl?: string); getContentTypes(options?: IContentTypesOptions): Promise; getFields(options: IFieldsOptions): Promise; getField: (listId: string, internalColumnName: string, webUrl?: string) => Promise; /** * Get lists or libraries * * @param options */ getLibs(options?: ILibsOptions): Promise; getListId(listName: string): Promise; /** * Get List Items */ getListItems(filterText: string, listId: string, internalColumnName: string, field: ISPField | undefined, keyInternalColumnName?: string, webUrl?: string, filterString?: string, substringSearch?: boolean, orderBy?: string, top?: number, cacheInterval?: number): Promise; /** * Gets list items for list item picker * @param filterText * @param listId * @param internalColumnName * @param [keyInternalColumnName] * @param [webUrl] * @param [filterList] * @returns list items for list item picker */ getListItemsForListItemPicker(filterText: string, listId: string, internalColumnName: string, keyInternalColumnName?: string, webUrl?: string, filterList?: string): Promise; /** * Get list item attachments * * @param listId * @param itemId * @param webUrl */ getListItemAttachments(listId: string, itemId: number, webUrl?: string): Promise; /** * Delete attachment * * @param fileName * @param listId * @param itemId * @param webUrl * @returns Updated list item with new ETag */ deleteAttachment(fileName: string, listId: string, itemId: number, webUrl?: string): Promise; /** * Add attachment * * @param listId * @param itemId * @param fileName * @param file * @param webUrl * @returns Updated list item with new ETag */ addAttachment(listId: string, itemId: number, fileName: string, file: File, webUrl?: string): Promise; /** * Get attachement for list item * * @param listId * @param itemId * @param fileName * @param webUrl */ getAttachment(listId: string, itemId: number, fileName: string, webUrl?: string): Promise; /** * Check if the attachment exists * * @param listId * @param itemId * @param fileName * @param webUrl */ checkAttachmentExists(listId: string, itemId: number, fileName: string, webUrl?: string): Promise; /** * Get the list name * * @param listId * @param webUrl */ getListName(listId: string, webUrl?: string): Promise; /** * Get the list server relative url * * @param listId * @param webUrl */ getListServerRelativeUrl(listId: string, webUrl?: string): Promise; getLookupValue(listId: string, listItemID: number, fieldName: string, lookupFieldName: string | undefined, webUrl?: string): Promise; getLookupValues(listId: string, listItemID: number, fieldName: string, lookupFieldName: string | undefined, webUrl?: string): Promise; getTaxonomyFieldInternalName(listId: string, fieldId: string, webUrl?: string): Promise; getUsersUPNFromFieldValue(listId: string, listItemId: number, fieldName: string, webUrl?: string): Promise; getUserUPNFromFieldValue(listId: string, listItemId: number, fieldName: string, webUrl?: string): Promise; getSingleManagedMetadataLabel(listId: string, listItemId: number, fieldName: string, webUrl?: string): Promise; uploadImage(listId: string, itemId: number | undefined, fileName: string, file: ArrayBuffer, listTitle: string | undefined, webUrl?: string): Promise; getRegionalWebSettings(webUrl?: string): Promise; /** * Get form rendering information for a SharePoint list. */ getListFormRenderInfo(listId: string, webUrl?: string): Promise; /** * Get additional form rendering and validation information for a SharePoint list. * Captures information not returned by RenderListDataAsStream with RenderOptions = 64 */ getAdditionalListFormFieldInfo(listId: string, webUrl?: string): Promise; private _filterListItemsFieldValuesAsText; /** * Gets the collection of view for a selected list */ getViews(listId?: string, orderby?: orderBy, filter?: string): Promise; /** * Returns an empty view for when a list isn't selected */ private getEmptyViews; } //# sourceMappingURL=SPService.d.ts.map