@mikezimm/fps-core-v7
Version:
Library of reusable core interfaces, types and constants migrated from fps-library-v2
36 lines • 2.44 kB
TypeScript
/**
* 2024-09-29: Migrated from src\pnpjs\SourceItems\getSourceItems.ts
*/
import { ISourceProps } from '../../../components/molecules/source-props/ISourceProps';
import { IFpsItemsReturn } from '../../../components/molecules/process-results/IFpsItemsReturn';
import { IFieldValueExpandFormats } from './IFieldValueExpandFormats';
export declare const UniquePermsFilter = "HasUniqueRoleAssignments eq true";
export declare const UniquePermsHiddenFilter: string;
/**
* 2024-12-23: This may need to be refactored to NOT parse and stringify sourceProps because it now has fpsSpService
* @param sourceProps
* @param autoExapnd = true is for normal sourceProps, use false if you have custom logic for expands such as Drilldown
* @param alertMe
* @param consoleLog
* @param expandFormats = optional - use FieldValuesAsText and FieldValuesAsHtml to add to the expands for return format regardless of autoExpand
* @returns
*/
export declare function getSourceItemsUniquePermissionsAPI(sourceProps: ISourceProps, autoExapnd: boolean, alertMe: boolean | undefined, consoleLog: boolean | undefined, expandFormats?: IFieldValueExpandFormats[]): Promise<IFpsItemsReturn>;
/**
* getSourceItems calls the Pnp function to get the results which returns the raw error.
* This function then will convert the error into the helpful error and return the standard IItemsError object.
* const UniquePermsFilter = 'HasUniqueRoleAssignments eq true';
* const UniquePermsHiddenFilter = `${ UniquePermsFilter } and Hidden eq false`;
*
* import { getSourceItemsAPI } from "@mikezimm/fps-core-v7/lib/restAPIs/lists/items/getSourceItemsAPI";
*
* @param sourceProps
* @param autoExapnd = true is for normal sourceProps, use false if you have custom logic for expands such as Drilldown
* @param alertMe
* @param consoleLog
* @param expandFormats = optional - use FieldValuesAsText and FieldValuesAsHtml to add to the expands for return format regardless of autoExpand
* @param ItemId -- optional to add a number Id greater than -1 to use the .getById filter, over-rides any restFilter on sourceProps
* @returns
*/
export declare function getSourceItemsAPI(sourceProps: ISourceProps, autoExapnd: boolean, alertMe: boolean | undefined, consoleLog: boolean | undefined, expandFormats?: IFieldValueExpandFormats[], ItemId?: number): Promise<IFpsItemsReturn>;
//# sourceMappingURL=getSourceItemsAPI.d.ts.map