UNPKG

@mikezimm/fps-core-v7

Version:

Library of reusable core interfaces, types and constants migrated from fps-library-v2

57 lines 2.88 kB
import { ISPHttpClientResponse } from "../../../../types/@msft/1.17.3/ISPHttpClientResponse"; export interface IFpsSpHttpServiceMIN { /** * Fetches data from the specified SharePoint site collection. * @param siteKey - A unique key representing the SharePoint site collection. * @param apiEndpoint - The REST API endpoint to query. * @param options - The options for the fetch request (method, headers, body). * @returns A Promise containing the response data. */ fpsFetch(apiEndpoint: string, options: RequestInit): Promise<ISPHttpClientResponse>; readonly PackageLibV2: string; readonly PackageCoreV7: string; readonly PackageStyles: string; } export interface ISharePointService { /** * Fetches data from the specified SharePoint site collection. * @param siteKey - A unique key representing the SharePoint site collection. * @param apiEndpoint - The REST API endpoint to query. * @param options - The options for the fetch request (method, headers, body). * @returns A Promise containing the response data. */ fetchWithToken(siteKey: string, apiEndpoint: string, options: RequestInit): Promise<any>; /** * Creates a new item in a SharePoint list. * @param siteKey - The key representing the site collection. * @param listTitle - The title of the SharePoint list. * @param itemData - The data of the item to create (in JSON format). * @returns A Promise containing the response data. */ createListItem(siteKey: string, listTitle: string, itemData: any): Promise<any>; /** * Updates an existing item in a SharePoint list. * @param siteKey - The key representing the site collection. * @param listTitle - The title of the SharePoint list. * @param itemId - The ID of the item to update. * @param itemData - The updated data of the item (in JSON format). * @returns A Promise containing the response data. */ updateListItem(siteKey: string, listTitle: string, itemId: number, itemData: any): Promise<any>; /** * Deletes an item from a SharePoint list. * @param siteKey - The key representing the site collection. * @param listTitle - The title of the SharePoint list. * @param itemId - The ID of the item to delete. * @returns A Promise containing the response data. */ deleteListItem(siteKey: string, listTitle: string, itemId: number): Promise<any>; /** * Gets list items from a SharePoint list. * @param siteKey - The key representing the site collection. * @param listTitle - The title of the SharePoint list. * @returns A Promise containing the list items. */ getListItems(siteKey: string, listTitle: string): Promise<any>; } //# sourceMappingURL=IFpsSpHttpServiceMIN.d.ts.map