@mikezimm/fps-core-v7
Version:
Library of reusable core interfaces, types and constants migrated from fps-library-v2
50 lines • 2.74 kB
TypeScript
import { IZLoadAnalytics, IZSentAnalytics } from '../../../components/atoms/easy-analytics/interfaces/analytics';
import { ILoadPerformance } from '../../../components/molecules/Performance/IPerformance';
import { IMinPerformance } from '../../../components/molecules/Performance/IPerformance';
import { IFpsSpHttpServiceMIN } from '../../../components/molecules/SpHttp/Sp/IFpsSpHttpServiceMIN';
import { WebPartContextCopy_15_2 } from '../../../types/@msft/1.15.2/WebPartContext';
/**
* 2025-01-03: Migrated from fps-library-v2/lib/pnpjs/Logging, pnp2/lib/services/sp/perms
* combination of v2: saveAnalytics2D
*
* import { savePermissionHistory } from "@mikezimm/fps-core-v7/lib/restAPIs/logging/Permissions/savePermissionHistory";
*
*/
export declare function getMinPerformanceString(performanceObj: ILoadPerformance, capMS?: number, capValue?: any): string;
/**
*
* @param performanceObj: ILoadPerformance
* @capMS - max Milliseconds to save.... else return 'error' or null for that value.
* @capValue - if ms value exceeds capMS, return this value in place of value
* @returns
*/
export declare function getMinPerformance(performanceObj: ILoadPerformance, capMS?: number, capValue?: any): IMinPerformance;
/**
* saveAnalytics4 is the same as 3 except you do not need the WebUrl... it's either Legacy or New depending on the tenant
*
* import { saveAnalytics4 } from "@mikezimm/fps-core-v7/lib/restAPIs/logging/Analytics/saveAnalyticsAPI";
*
* @param analyticsList
* @param saveObject
* @param muteConsole
* @param language
*/
export declare function saveAnalytics4(fpsSpService: IFpsSpHttpServiceMIN, analyticsList: string, saveObject: IZSentAnalytics, muteConsole: boolean, language?: string): void;
/**
* Same as 2 but also adds the language to the object
* @param analyticsWeb
* @param analyticsList
* @param saveObject
* @param muteConsole
*/
export declare function saveAnalytics3(fpsSpService: IFpsSpHttpServiceMIN, analyticsWeb: string, analyticsList: string, saveObject: IZSentAnalytics, muteConsole: boolean, language?: string): void;
/**
* 2025-03-17: Added this to build the loadProperties object using the default context.
* If needed, you can then tweak certain properties if you want.
* @param context
* @returns
*/
export declare function getContextLoadPropertiesObject(context: WebPartContextCopy_15_2): IZLoadAnalytics;
export declare function saveAnalytics2(fpsSpService: IFpsSpHttpServiceMIN, analyticsWeb: string, analyticsList: string, saveObject: IZSentAnalytics, muteConsole: boolean): Promise<void>;
export declare function getAspectRatio(width: number, height: number): string;
//# sourceMappingURL=saveAnalyticsAPI.d.ts.map