@mikezimm/npmfunctions
Version:
Functions used in my SPFx webparts
56 lines (55 loc) • 1.86 kB
TypeScript
import { IViewInfo } from "@pnp/sp/presets/all";
import { IMyFieldTypes } from './columnTypes';
export interface MyOperator {
[key: string]: string;
q: string;
o: string;
}
/**
* Standard query values
*/
export declare const queryValueCurrentUser = "<Value Type=\"Integer\"><UserID Type=\"Integer\" /></Value>";
export declare function queryValueToday(offSetDays?: number | null): string;
export declare const Eq: MyOperator;
export declare const Ne: MyOperator;
export declare const Gt: MyOperator;
export declare const Geq: MyOperator;
export declare const Lt: MyOperator;
export declare const Leq: MyOperator;
export declare const IsNull: MyOperator;
export declare const IsNotNull: MyOperator;
export declare const Contains: MyOperator;
export declare const BeginsWith: MyOperator;
export interface IViewOrder {
[key: string]: string | IMyFieldTypes | true | false;
field: string | IMyFieldTypes;
asc: true | false;
}
export interface IViewWhere {
[key: string]: string | IMyFieldTypes | number | MyOperator;
field: string | IMyFieldTypes;
clause: 'Or' | 'And';
oper: MyOperator;
val: string;
}
export interface IViewGroupBy {
[key: string]: boolean | number | IViewOrder[] | undefined;
fields?: IViewOrder[];
collapse?: boolean;
limit?: number;
}
export declare type IViewField = IMyFieldTypes | string;
export interface IMyView extends Partial<IViewInfo> {
[key: string]: string | number | IViewField[] | IViewWhere[] | IViewOrder[] | IViewGroupBy | boolean | null | {
DecodedUrl: string;
} | {
SchemaXml: string;
} | undefined;
Title: string;
ServerRelativeUrl?: string;
RowLimit?: number;
iFields?: IViewField[];
wheres?: IViewWhere[];
orders?: IViewOrder[];
groups?: IViewGroupBy;
}