///
declare var _spBodyOnLoadFunctions: Array<() => void>;
declare var _spBodyOnLoadFunctionNames: string[];
declare var _spBodyOnLoadCalled: boolean;
declare function ExecuteOrDelayUntilBodyLoaded(initFunc: () => void): void;
declare function ExecuteOrDelayUntilScriptLoaded(func: () => void, depScriptFileName: string): boolean;
declare function ExecuteOrDelayUntilEventNotified(func: (...args: any[]) => void, eventName: string): boolean;
declare function SelectRibbonTab(tabId: string, force: boolean);
declare function AttachEvent(
type: K,
eventFunc: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any,
el: GlobalEventHandlers,
);
declare function CancelEvent(e: Event): boolean;
declare function encodeScriptQuote(str: string): string;
declare function StAttrQuote(st: string): string;
declare function STSScriptEncode(str: string): string;
declare function STSScriptEncodeWithQuote(str: string): string;
declare function ToggleDeveloperDashboard(): void;
declare function ToggleTrace(): void;
declare function NotifyEventAndExecuteWaitingJobs(eventName: string): void;
declare function NotifyScriptLoadedAndExecuteWaitingJobs(scriptFileName: string): void;
declare function NotifyBodyLoadedAndExecuteWaitingJobs(): void;
declare enum StatusPriority {
red,
yellow,
green,
blue,
}
declare const L_Language_Text: string;
declare const L_ClickOnce1_text: string;
declare const L_STSRecycleConfirm_Text: string;
declare const L_STSRecycleConfirm1_Text: string;
declare const L_STSRecycleConfirm2_Text: string;
declare const L_STSDelConfirm_Text: string;
declare const L_STSDelConfirm1_Text: string;
declare const L_STSDelConfirm2_Text: string;
declare const L_NewDocLibTb1_Text: string;
declare const L_NewDocLibTb2_Text: string;
declare const L_CheckoutConfirm: string;
declare const L_DiscardCheckoutConfirm: string;
declare const L_NewFormLibTb1_Text: string;
declare const L_NewFormLibTb2_Text: string;
declare const L_ConfirmCheckout_Text: string;
declare const L_MustCheckout_Text: string;
declare const L_CheckOutRetry_Text: string;
declare const L_CannotEditPropertyForLocalCopy_Text: string;
declare const L_CannotEditPropertyCheckout_Text: string;
declare const L_NewFormClickOnce1_Text: string;
declare const L_EnterValidCopyDest_Text: string;
declare const L_ConfirmUnlinkCopy_Text: string;
declare const L_CopyingOfflineVersionWarning_Text: string;
declare const L_Loading_Text: string;
declare const L_Loading_Error_Text: string;
declare const L_Inplview_PageNotYetSaved: string;
declare const L_WarnkOnce_text: string;
declare const L_WebFoldersRequired_Text: string;
declare const L_WebFoldersError_Text: string;
declare const L_NoExplorerView_Text: string;
declare const L_WikiWebPartNoClosedOrUploaded: string;
declare const L_AccessibleMenu_Text: string;
declare const L_SubMenu_Text: string;
declare const L_NewBlogPost_Text: string;
declare const L_NewBlogPostFailed_Text: string;
declare const recycleBinEnabled: number;
declare const cascadeDeleteWarningMessage: string;
declare const bIsFileDialogView: boolean;
declare var Strings: any;
declare const enum Sods {
missing = 1,
loading = 2,
pending = 3,
loaded = 4,
error = 5,
}
declare function GetThemedImageUrl(image: string): string;
declare function $urlHtmlEncodeString(string: string): string;
declare var SPClientRenderer: SPClientRenderer;
declare var MSOWebPartPageFormName: string;
declare var HP: HP;
interface SPClientRenderer {
AddCallStackInfoToErrors: boolean;
AddPostRenderCallback: (context: any, callback: () => void) => void;
CoreRender: () => void;
GlobalDebugMode: boolean;
IsDebugMode: () => boolean;
ParseTemplateString: (template: string) => () => string;
ParseTemplateStringWorker: (template: string) => () => string;
Render: () => void;
RenderCore: () => void;
RenderErrors: boolean;
RenderReplace: () => void;
ReplaceUrlTokens: (url: string) => () => string;
_ExecuteRenderCallbacks: () => void;
_ExecuteRenderCallbacksWorker: () => void;
}
interface HPIds {
close: string;
follow: string;
post: string;
title: string;
fileType: string;
size: string;
header: string;
body: string;
actions: string;
viewsLifeTime: string;
viewsRecent: string;
inner: string;
content: string;
arrowBorder: string;
arrow: string;
modifiedDate: string;
author: string;
viewDuplicates: string;
parentLink: string;
send: string;
openClient: string;
open: string;
preview: string;
dimensions: string;
dateCreated: string;
viewer: string;
sectionName: string;
siteLogo: string;
siteDescription: string;
noData: string;
summary: string;
peopleSkills: string;
peoplePastProjects: string;
peopleInterests: string;
peopleSchools: string;
peopleSummary: string;
peopleMemberships: string;
}
interface HP {
Close: () => void;
CommonActions: string;
CommonBody: string;
CommonHeader: string;
Follow: () => void;
GetAuthorsHtml: () => string;
GetBodySectionContent: () => string;
GetBodySectionHeading: () => string;
GetEmailLink: (title: string, path: string, client: string, url: string) => string;
GetFriendlyNameForFileType: (fileType: any) => string;
GetNowDateTimeDifference: () => string;
GetPeopleFollowingControl: () => string;
Hide: () => void;
Init: () => void;
InitPostLoad: () => void;
IsNumeric: () => boolean;
Resize: () => void;
SetPreviewOnHideCallback: () => void;
SetWidth: (width: number) => void;
Show: () => void;
ViewDuplicates: () => boolean;
getDateString: () => string;
getStringFromDate: () => string;
ids: HPIds;
loadSiteViewer: (id: string, idinner: string, idviewer: string, path: string, idglass: string) => void;
loadViewer: (
id: string,
idinner: string,
idviewer: string,
idpreview: string,
embedUrl: string,
previewUrl: string,
) => void;
postActionEventName: string;
}
interface Sod {
url: string;
key: string;
loaded: boolean;
depkeys?: string[] | undefined;
state: Sods;
qfn?: any[] | undefined;
reset?: boolean | undefined;
}
declare var _v_dictSod: { [address: string]: Sod };
declare namespace SP {
interface SOD {
execute(fileName: string, functionName: string, ...args: any[]): void;
executeFunc(fileName: string, typeName: string, fn: () => void): void;
executeOrDelayUntilEventNotified(func: (...args: any[]) => void, eventName: string): boolean;
executeOrDelayUntilScriptLoaded(func: () => void, depScriptFileName: string): boolean;
notifyScriptLoadedAndExecuteWaitingJobs(scriptFileName: string): void;
notifyEventAndExecuteWaitingJobs(eventName: string, args?: any[]): void;
registerSod(fileName: string, url: string): void;
registerSodDep(fileName: string, dependentFileName: string): void;
loadMultiple(keys: string[], fn: () => void, bSync?: boolean): void;
delayUntilEventNotified(func: (...args: any[]) => void, eventName: string): void;
get_prefetch(): boolean;
set_prefetch(value: boolean): void;
get_ribbonImagePrefetchEnabled(): boolean;
set_ribbonImagePrefetchEnabled(value: boolean): void;
}
let SOD: SOD;
enum ListLevelPermissionMask {
viewListItems, // : 1,
insertListItems, // : 2,
editListItems, // : 4,
deleteListItems, // : 8,
approveItems, // : 16,
openItems, // : 32,
viewVersions, // : 64,
deleteVersions, // : 128,
breakCheckout, // : 256,
managePersonalViews, // : 512,
manageLists, // : 2048
}
class HtmlBuilder {
constructor();
addAttribute(name: string, value: string): void;
addCssClass(cssClassName: string): void;
addCommunitiesCssClass(cssClassName: string): void;
renderBeginTag(tagName: string): void;
renderEndTag(): void;
write(s: string): void;
writeEncoded(s: string): void;
toString(): string;
}
class ScriptHelpers {
static disableWebpartSelection(context: SPClientTemplates.RenderContext): void;
static getDocumentQueryPairs(): { [index: string]: string };
static getFieldFromSchema(
schema: SPClientTemplates.ListSchema,
fieldName: string,
): SPClientTemplates.FieldSchema;
static getLayoutsPageUrl(pageName: string, webServerRelativeUrl: string): string;
static getListLevelPermissionMask(jsonItem: string): number;
static getTextAreaElementValue(textAreaElement: HTMLTextAreaElement): string;
static getUrlQueryPairs(docUrl: string): { [index: string]: string };
static getUserFieldProperty(item: ListItem, fieldName: string, propertyName: string): any;
static hasPermission(listPermissionMask: number, listPermission: ListLevelPermissionMask): boolean;
static newGuid(): SP.Guid;
static isNullOrEmptyString(str: string): boolean;
static isNullOrUndefined(obj: any): boolean;
static isNullOrUndefinedOrEmpty(str: string): boolean;
static isUndefined(obj: any): boolean;
static replaceOrAddQueryString(url: string, key: string, value: string): string;
static removeHtml(str: string): string;
static removeStyleChildren(element: HTMLElement): void;
static removeHtmlAndTrimStringWithEllipsis(str: string, maxLength: number): string;
static setTextAreaElementValue(textAreaElement: HTMLTextAreaElement, newValue: string): void;
static truncateToInt(n: number): number;
static urlCombine(path1: string, path2: string): string;
static resizeImageToSquareLength(imgElement: HTMLImageElement, squareLength: number): void;
}
class PageContextInfo {
constructor();
static get_siteServerRelativeUrl(): string;
static get_webServerRelativeUrl(): string;
static get_webAbsoluteUrl(): string;
static get_serverRequestPath(): string;
static get_siteAbsoluteUrl(): string;
static get_webTitle(): string;
static get_tenantAppVersion(): string;
static get_isAppWeb(): boolean;
static get_webLogoUrl(): string;
static get_webLanguage(): number;
static get_currentLanguage(): number;
static get_pageItemId(): number;
static get_pageListId(): string;
static get_webPermMasks(): { High: number; Low: number };
static get_currentCultureName(): string;
static get_currentUICultureName(): string;
static get_clientServerTimeDelta(): number;
static get_userLoginName(): string;
static get_webTemplate(): string;
static get_pagePersonalizationScope(): string;
}
class ContextPermissions {
has(perm: number): boolean;
hasPermissions(high: number, low: number): boolean;
fromJson(json: { High: number; Low: number }): void;
}
namespace ListOperation {
namespace ViewOperation {
function getSelectedView(): string;
function navigateUp(viewId: string): void;
function refreshView(viewId: string): void;
}
namespace Selection {
function selectListItem(iid: string, bSelect: boolean): void;
function getSelectedItems(): Array<{ id: number; fsObjType: FileSystemObjectType }>;
function getSelectedList(): string;
function getSelectedView(): string;
function navigateUp(viewId: string): void;
function deselectAllListItems(iid: string): void;
}
namespace Overrides {
function overrideDeleteConfirmation(listId: string, overrideText: string): void;
}
}
}
/** Register function to rerun on partial update in MDS-enabled site.*/
declare function RegisterModuleInit(scriptFileName: string, initFunc: () => void): void;
/** Provides access to url and query string parts.*/
declare class JSRequest {
/** Query string parts.*/
static QueryString: { [parameter: string]: string };
/** initializes class.*/
static EnsureSetup(): void;
/** Current file name (after last '/' in url).*/
static FileName: string;
/** Current file path (before last '/' in url).*/
static PathName: string;
}
interface _spPageContextInfo {
alertsEnabled: boolean; // true
allowSilverlightPrompt: string; // "True"
blockDownloadsExperienceEnabled: boolean; // true
canUserCreateMicrosoftForm: boolean; // true
cdnPrefix: string; // "static.sharepointonline.com/bld"
clientServerTimeDelta: number; // -182
CorrelationId: string; // "6161f99d-10e5-4000-ad30-1016270fe31d"
crossDomainPhotosEnabled: boolean; // true
currentCultureName: string; // "ru-RU"
currentLanguage: number; // 1049
currentUICultureName: string; // "ru-RU"
disableAppViews: boolean; // true
disableFlows: boolean; // true
env: string; // "prod"
farmLabel: string; // "US_4_Content"
formDigestValue: string; // "0x5F3FE84E7EE9089C7D11DCDAFFB9E69CF8241E68B9EF071FA92CD419E878AC4F7C16E34696EFA667EFD0712FC1DF4945DDC0D09B5D23153A698A727AF076B5DE,07 Jun 2017 18:55:22 -0000"
formDigestTimeoutSeconds: number; // 1800
groupColor: string; // "#d40ac7"
groupHasHomepage: boolean; // true
groupId: string; //
guestsEnabled: boolean; // true
hasManageWebPermissions: boolean; // true
isAnonymousGuestUser: boolean; // true
isAppWeb: boolean; // true
isExternalGuestUser: boolean; // true
isNoScriptEnabled: boolean; // true
isSiteAdmin: boolean; // true
isSPO: boolean; // true
isTenantDevSite: boolean; // true
isWebWelcomePage: boolean; // true
layoutsUrl: string; // "_layouts/15"
listBaseTemplate: number; // 119
listId: string; // "{06ee6d96-f27f-4160-b6bb-c18f187b18a7}"
listPermsMask: { High: number; Low: number };
listTitle: string; // "Site Pages"
listUrl: string; // "/sites/site/list"
maximumFileSize: number; // 15360
openInClient: boolean; // true
pageListId: string; // "{06ee6d96-f27f-4160-b6bb-c18f187b18a7}"
pageItemId: number;
pagePermsMask: { High: number; Low: number };
pagePersonalizationScope: string; // 1
PreviewFeaturesEnabled: boolean; // true
preferUserTimeZone: boolean; // false
ProfileUrl: string; // "https://tenant-my.sharepoint.com/person.aspx"
PublishingFeatureOn: boolean; // true
RecycleBinItemCount: number; // -1
serverRedirectedUrl: string;
serverRequestPath: string; // "/SPTypeScript/Lists/ConditionalFormattingTasksList/AllItems.aspx"
serverTime: string; // "2017-06-07T18:55:22.3499459Z"
siteAbsoluteUrl: string; // "https:// gandjustas-7b20d3715e8ed4.sharepoint.com"
siteClassification: string; //
siteClientTag: string; // "0$$15.0.4454.1021"
siteColor: string; // "#d40ac7"
siteId: string; // "{3e09a056-f68f-44a3-8e0f-ff2c123b82cb}"
sitePagesEnabled: boolean; // true
siteServerRelativeUrl: string; // "/"
siteSubscriptionId: string; // 4eedf5f3-f71f-4e73-82ee-e19081363c8c
supportPoundStorePath: boolean; // true
supportPercentStorePath: boolean; // true
systemUserKey: string; // "i:0h.f|membership|10033fff84e7cb2b@live.com"
tenantAppVersion: string; // "0"
themeCacheToken: string; // "/sites/site::0:16.0.6525.1206"
themedCssFolderUrl: string;
themedImageFileNames: string;
updateFormDigestPageLoaded: string; // "2017-06-07T18:55:25.821Z"
userDisplayName: string; // "John Doe"
userEmail: string; // "john.doe@fabrikam.onmicrosoft.com"
userId: number; // 12
userLoginName: string; // "john.doe@fabrikam.onmicrosoft.com"
userPrincipalName: string;
viewOnlyExperienceEnabled: boolean; // true
viewId: string; // "{06ee6d96-f27f-4160-b6bb-c18f187b18a7}"
webAbsoluteUrl: string; // "https:// gandjustas-7b20d3715e8ed4.sharepoint.com/SPTypeScript"
webDescription: string; // "Some description"
webId: string; // "{06ee6d96-f27f-4160-b6bb-c18f187b18a7}"
webLanguage: number; // 1049
webLogoUrl: string; // "/_layouts/15/images/siteIcon.png?rev=23"
webPermMasks: { High: number; Low: number };
webServerRelativeUrl: string; // "/SPTypeScript"
webTemplate: string; // "17"
webTitle: string; // "SPTypeScript"
webUIVersion: number; // 15
}
declare var _spPageContextInfo: _spPageContextInfo;
interface _spFriendlyUrlPageContextInfo {
termId: string;
termSetId: string;
termStoreId: string;
title: string;
}
declare var _spFriendlyUrlPageContextInfo: _spFriendlyUrlPageContextInfo;
declare function STSHtmlEncode(value: string): string;
declare function STSHtmlDecode(value: string): string;
declare function AddEvtHandler(element: HTMLElement, event: string, func: EventListener): void;
/** Gets query string parameter */
declare function GetUrlKeyValue(key: string): string;
declare class AjaxNavigate {
update(
url: string,
updateParts: { [name: string]: string | number },
fullNavigate: boolean,
anchorName: string,
): void;
add_navigate(handler: (obj: any, eventArgs: any) => void): void;
remove_navigate(handler: (obj: any, eventArgs: any) => void): void;
submit(formToSubmit: HTMLFormElement): void;
getParam(paramName: string): string;
getSavedFormAction(): string;
get_href(): string;
get_hash(): string;
get_search(): string;
convertMDSURLtoRegularURL(mdsPath: string): string;
}
declare var ajaxNavigate: AjaxNavigate;
declare class Browseris {
firefox: boolean;
firefox36up: boolean;
firefox3up: boolean;
firefox4up: boolean;
ie: boolean;
ie55up: boolean;
ie5up: boolean;
ie7down: boolean;
ie8down: boolean;
ie9down: boolean;
ie8standard: boolean;
ie8standardUp: boolean;
ie9standardUp: boolean;
ipad: boolean;
windowsphone: boolean;
chrome: boolean;
chrome7up: boolean;
chrome8up: boolean;
chrome9up: boolean;
iever: boolean;
mac: boolean;
major: boolean;
msTouch: boolean;
isTouch: boolean;
nav: boolean;
nav6: boolean;
nav6up: boolean;
nav7up: boolean;
osver: boolean;
safari: boolean;
safari125up: boolean;
safari3up: boolean;
verIEFull: boolean;
w3c: boolean;
webKit: boolean;
win: boolean;
win8AppHost: boolean;
win32: boolean;
win64bit: boolean;
winnt: boolean;
armProcessor: boolean;
}
declare var browseris: Browseris;
interface ContextInfo extends SPClientTemplates.RenderContext {
AllowGridMode: boolean;
BasePermissions: any;
BaseViewID: any;
CascadeDeleteWarningMessage: string;
ContentTypesEnabled: boolean;
CurrentSelectedItems: boolean;
CurrentUserId: number;
CurrentUserIsSiteAdmin: boolean;
EnableMinorVersions: boolean;
ExternalDataList: boolean;
HasRelatedCascadeLists: boolean;
HttpPath: string;
HttpRoot: string;
LastSelectableRowIdx: number;
LastSelectedItemIID: number;
LastRowIndexSelected: number;
RowFocusTimerID: number;
ListTitle: string;
ListData: any; // SPClientTemplates.ListData_InView | SPClientTemplates.ListData_InForm
ListSchema: SPClientTemplates.ListSchema;
ModerationStatus: number;
PortalUrl: string;
RecycleBinEnabled: number;
SelectAllCbx: HTMLElement;
SendToLocationName: string;
SendToLocationUrl: string;
SiteTitle: string;
StateInitDone: boolean;
TableCbxFocusHandler(instance: any, eventArgs: any): void;
TableMouseoverHandler(instance: any, eventArgs: any): void;
TotalListItems: number;
WorkflowsAssociated: boolean;
clvp: any;
ctxId: number;
ctxType: any;
dictSel: any;
displayFormUrl: string;
editFormUrl: string;
imagesPath: string;
inGridMode: boolean;
inGridFullRender: boolean;
isForceCheckout: boolean;
isModerated: boolean;
isPortalTemplate: boolean;
isVersions: boolean;
isWebEditorPreview: boolean;
leavingGridMode: boolean;
loadingAsyncData: boolean;
listBaseType: number;
listName: string;
listTemplate: string;
listUrlDir: string;
newFormUrl: string;
onRefreshFailed(context: any, requrest: any, response: any): void;
overrideDeleteConfirmation: string;
overrideFilterQstring: string;
recursiveView: boolean;
rootFolderForDisplay: string;
serverUrl: string;
verEnabled: boolean;
view: string;
queryString: string;
IsClientRendering: boolean;
wpq: string;
rootFolder: string;
IsAppWeb: boolean;
NewWOPIDocumentEnabled: boolean;
NewWOPIDocumentUrl: string;
AllowCreateFolder: boolean;
CanShareLinkForNewDocument: boolean;
noGroupCollapse: boolean;
SiteTemplateId: number;
ExcludeFromOfflineClient: boolean;
}
declare function GetCurrentCtx(): ContextInfo;
declare function SetFullScreenMode(fullscreen: boolean): void;
declare namespace SP {
enum RequestExecutorErrors {
requestAbortedOrTimedout,
unexpectedResponse,
httpError,
noAppWeb,
domainDoesNotMatch,
noTrustedOrigins,
iFrameLoadError,
}
class RequestExecutor {
constructor(url: string, options?: any);
get_formDigestHandlingEnabled(): boolean;
set_formDigestHandlingEnabled(value: boolean): void;
get_iFrameSourceUrl(): string;
set_iFrameSourceUrl(value: string): void;
executeAsync(requestInfo: RequestInfo): void;
attemptLogin(
returnUrl: string,
success: (response: ResponseInfo) => void,
error?: (response: ResponseInfo, error: RequestExecutorErrors, statusText: string) => void,
): void;
}
interface RequestInfo {
url: string;
method?: string | undefined;
headers?: { [key: string]: string } | undefined;
/** Can be string or bytearray depending on binaryStringRequestBody field */
body?: string | Uint8Array | undefined;
binaryStringRequestBody?: boolean | undefined;
/** Currently need fix to get ginary response. Details: http:// techmikael.blogspot.ru/2013/07/how-to-copy-files-between-sites-using.html */
binaryStringResponseBody?: boolean | undefined;
timeout?: number | undefined;
success?(response: ResponseInfo): void;
error?(response: ResponseInfo, error: RequestExecutorErrors, statusText: string): void;
state?: any;
}
interface ResponseInfo {
statusCode?: number | undefined;
statusText?: string | undefined;
responseAvailable: boolean;
allResponseHeaders?: string | undefined;
headers?: { [key: string]: string } | undefined;
contentType?: string | undefined;
/** Can be string or bytearray depending on request.binaryStringResponseBody field */
body?: string | Uint8Array | undefined;
state?: any;
}
class ProxyWebRequestExecutor extends Sys.Net.WebRequestExecutor {
constructor(url: string, options?: any);
}
class ProxyWebRequestExecutorFactory implements SP.IWebRequestExecutorFactory {
constructor(url: string, options?: any);
createWebRequestExecutor(): ProxyWebRequestExecutor;
}
}
interface MQuery {
(selector: string, context?: any): MQueryResultSetElements;
(objectOrElement: MQueryResultSetElements | HTMLElement | HTMLElement[]): MQueryResultSetElements;
(object?: MQueryResultSet | T | T[]): MQueryResultSet;
throttle any>(fn: T, interval: number, shouldOverrideThrottle: boolean): T;
extend(target: any, ...objs: any[]): any;
extend(deep: boolean, target: any, ...objs: any[]): any;
makeArray(obj: any): any[];
isDefined(obj: any): boolean;
isNotNull(obj: any): boolean;
isUndefined(obj: any): boolean;
isNull(obj: any): boolean;
isUndefinedOrNull(obj: any): boolean;
isDefinedAndNotNull(obj: any): boolean;
isString(obj: any): boolean;
isBoolean(obj: any): boolean;
isFunction(obj: any): boolean;
isArray(obj: any): boolean;
isNode(obj: any): boolean;
isElement(obj: any): boolean;
isMQueryResultSet(obj: any): boolean;
isNumber(obj: any): boolean;
isObject(obj: any): boolean;
isEmptyObject(obj: any): boolean;
ready(callback: () => void): void;
contains(container: HTMLElement, contained: HTMLElement): boolean;
proxy(fn: (...args: any[]) => any, context: any, ...args: any[]): (...args: any[]) => any;
proxy(context: any, name: string, ...args: any[]): any;
every(
obj: T[] | MQueryResultSet,
fn: (elementOfArray: T, indexInArray?: number) => boolean,
context?: any,
): boolean;
some(
obj: T[] | MQueryResultSet,
fn: (elementOfArray: T, indexInArray?: number) => boolean,
context?: any,
): boolean;
filter(obj: T[], fn: (elementOfArray: T, indexInArray?: number) => boolean, context?: any): T[];
filter(
obj: MQueryResultSet,
fn: (elementOfArray: T, indexInArray?: number) => boolean,
context?: any,
): MQueryResultSet;
forEach(
obj: T[] | MQueryResultSet,
fn: (elementOfArray: T, indexInArray?: number) => void,
context?: any,
): void;
map(array: T[], callback: (elementOfArray: T, indexInArray?: number) => U): U[];
map(array: MQueryResultSet, callback: (elementOfArray: T, indexInArray?: number) => U): MQueryResultSet;
indexOf(obj: T[], object: T, startIndex?: number): number;
lastIndexOf(obj: T[], object: T, startIndex?: number): number;
data(element: HTMLElement, key?: string, value?: any): any;
removeData(element: HTMLElement, name?: string): MQueryResultSetElements;
hasData(element: HTMLElement): boolean;
}
interface MQueryResultSetElements extends MQueryResultSet {
append(node: HTMLElement | MQueryResultSetElements | string): MQueryResultSetElements;
bind(eventType: string, handler: (eventObject: MQueryEvent) => any): MQueryResultSetElements;
unbind(eventType: string, handler: (eventObject: MQueryEvent) => any): MQueryResultSetElements;
trigger(eventType: string): MQueryResultSetElements;
one(eventType: string, handler: (eventObject: MQueryEvent) => any): MQueryResultSetElements;
detach(): MQueryResultSetElements;
find(selector: string): MQueryResultSetElements;
closest(selector: string, context?: any): MQueryResultSetElements;
offset(): { left: number; top: number };
offset(coordinates: { left: any; top: any }): MQueryResultSetElements;
filter(selector: string): MQueryResultSetElements;
filter(fn: (elementOfArray: HTMLElement, indexInArray?: number) => boolean, context?: any): MQueryResultSetElements;
not(selector: string): MQueryResultSetElements;
parent(selector?: string): MQueryResultSetElements;
offsetParent(selector?: string): MQueryResultSetElements;
parents(selector?: string): MQueryResultSetElements;
parentsUntil(selectorOrElement?: string | HTMLElement, filter?: string): MQueryResultSetElements;
position(): { top: number; left: number };
attr(attributeName: string): string;
attr(attributeName: string, valueOrDelegate: any): MQueryResultSetElements;
attr(map: { [key: string]: any }): MQueryResultSetElements;
// tslint:disable-next-line: unified-signatures
attr(attributeName: string, func: (index: number, attr: any) => any): MQueryResultSetElements;
addClass(classNames: string): MQueryResultSetElements;
removeClass(classNames: string): MQueryResultSetElements;
css(propertyName: string | string[]): string;
css(properties: any): MQueryResultSetElements;
css(propertyName: any | string, value: any): MQueryResultSetElements;
remove(selector?: string): MQueryResultSetElements;
children(selector?: string): MQueryResultSetElements;
empty(): MQueryResultSetElements;
first(): MQueryResultSetElements;
data(key: string, value: any): MQueryResultSetElements;
data(obj: { [key: string]: any }): MQueryResultSetElements;
data(key: string): any;
removeData(key: string): MQueryResultSetElements;
map(callback?: (elementOfArray: HTMLElement, indexInArray: number) => any): MQueryResultSetElements;
blur(handler?: (eventObject: MQueryEvent) => any): MQueryResultSetElements;
change(handler?: (eventObject: MQueryEvent) => any): MQueryResultSetElements;
click(handler?: (eventObject: MQueryEvent) => any): MQueryResultSetElements;
dblclick(handler?: (eventObject: MQueryEvent) => any): MQueryResultSetElements;
error(handler?: (eventObject: MQueryEvent) => any): MQueryResultSetElements;
focus(handler: (eventObject: MQueryEvent) => any): MQueryResultSetElements;
focusin(handler?: (eventObject: MQueryEvent) => any): MQueryResultSetElements;
focusout(handler?: (eventObject: MQueryEvent) => any): MQueryResultSetElements;
keydown(handler?: (eventObject: MQueryEvent) => any): MQueryResultSetElements;
keypress(handler?: (eventObject: MQueryEvent) => any): MQueryResultSetElements;
keyup(handler?: (eventObject: MQueryEvent) => any): MQueryResultSetElements;
load(handler?: (eventObject: MQueryEvent) => any): MQueryResultSetElements;
mousedown(handler?: (eventObject: MQueryEvent) => any): MQueryResultSetElements;
mouseenter(handler?: (eventObject: MQueryEvent) => any): MQueryResultSetElements;
mouseleave(handler?: (eventObject: MQueryEvent) => any): MQueryResultSetElements;
mousemove(handler?: (eventObject: MQueryEvent) => any): MQueryResultSetElements;
mouseout(handler?: (eventObject: MQueryEvent) => any): MQueryResultSetElements;
mouseover(handler?: (eventObject: MQueryEvent) => any): MQueryResultSetElements;
mouseup(handler?: (eventObject: MQueryEvent) => any): MQueryResultSetElements;
resize(handler?: (eventObject: MQueryEvent) => any): MQueryResultSetElements;
scroll(handler?: (eventObject: MQueryEvent) => any): MQueryResultSetElements;
select(handler?: (eventObject: MQueryEvent) => any): MQueryResultSetElements;
submit(handler?: (eventObject: MQueryEvent) => any): MQueryResultSetElements;
unload(handler?: (eventObject: MQueryEvent) => any): MQueryResultSetElements;
}
interface MQueryResultSet {
[index: number]: T;
contains(contained: T): boolean;
filter(fn: (elementOfArray: T, indexInArray?: number) => boolean, context?: any): MQueryResultSet;
every(fn: (elementOfArray: T, indexInArray?: number) => boolean, context?: any): boolean;
some(fn: (elementOfArray: T, indexInArray?: number) => boolean, context?: any): boolean;
map(callback: (elementOfArray: T, indexInArray?: number) => any): MQueryResultSet;
forEach(fn: (elementOfArray: T, indexInArray?: number) => void, context?: any): void;
indexOf(object: any, startIndex?: number): number;
lastIndexOf(object: any, startIndex?: number): number;
}
interface MQueryEvent extends Event {
altKey: boolean;
attrChange: number;
attrName: string;
bubbles: boolean;
button: number;
cancelable: boolean;
ctrlKey: boolean;
defaultPrevented: boolean;
detail: number;
eventPhase: number;
newValue: string;
prevValue: string;
relatedNode: HTMLElement;
screenX: number;
screenY: number;
shiftKey: boolean;
view: any;
}
declare var m$: MQuery;
declare class CalloutActionOptions {
/** Text for the action link */
text: string;
tooltip: string;
disabledTooltip: string;
/** Callback that is executed when the action link is clicked.
@param event Standard javascript event object
@param action The action object */
onClickCallback: (event: Event, action: CalloutAction) => any;
/** Callback which returns if the action link is enabled */
isEnabledCallback: (action: CalloutAction) => boolean;
/** Callback which returns if the action link is visible */
isVisibleCallback: (action: CalloutAction) => boolean;
/** Submenu entries for the action. If defined, the action link click will popup the specified menu. */
menuEntries: CalloutActionMenuEntry[];
}
/** Defines a callout action menu entry */
declare class CalloutActionMenuEntry {
/** Creates a callout action menu entry
@param text Text to be displayed as the menu item text
@param onClickCallback Callback that will be fired when the item is clicked
@param wzISrc Url of the icon
@param wzIAlt Alternative text for the icon image
@param wzISeq Sequence for the menu item
@param wzDesc Description of the menu item */
constructor(
text: string,
onClickCallback: (actionMenuEntry: CalloutActionMenuEntry, actionMenuEntryIndex: number) => void,
wzISrc: string,
wzIAlt: string,
wzISeq: number,
wzDesc: string,
);
}
declare class CalloutActionMenu {
constructor(actionsId: any);
addAction(action: CalloutAction): void;
getActions(): CalloutAction[];
render(): void;
refreshActions(): void;
calculateActionWidth(): void;
}
declare class CalloutAction {
constructor(options: CalloutActionOptions);
getText(): string;
getToolTop(): string;
getDisabledToolTip(): string;
getOnClickCallback(event: any, action: CalloutAction): any;
getIsDisabledCallback(action: CalloutAction): boolean;
getIsVisibleCallback(action: CalloutAction): boolean;
getIsMenu(): boolean;
getMenuEntries(): CalloutActionMenuEntry[];
render(): void;
isEnabled(): boolean;
isVisible(): boolean;
set(options: CalloutActionOptions): void;
}
declare class Callout {
/** Sets options for the callout. Not all options can be changed for the callout after its creation. */
set(options: CalloutOptions): any;
/** Adds event handler to the callout.
@param eventName one of the following: "opened", "opening", "closing", "closed" */
addEventCallback(eventName: string, callback: (callout: Callout) => void): void;
/** Returns the launch point element of the callout. */
getLaunchPoint(): HTMLElement;
/** Returns the ID of the callout. */
getID(): string;
/** Returns the title of the callout. */
getTitle(): string;
/** Returns the contents of the callout. */
getContent(): string;
/** Returns the content element of the callout. */
getContentElement(): HTMLElement;
/** Returns the bounding element defined for the callout during its creation. */
getBoundingBox(): HTMLElement;
/** Returns the content width defined for the callout during its creation. */
getContentWidth(): number;
/** Returns the object that represents open behaivor defined for the callout during its creation. */
getOpenOptions(): CalloutOpenOptions;
/** Returns the beak orientation defined for the callout during its creation. */
getBeakOrientation(): string;
/** Returns the position algorithm function defined for the callout during its creation. */
getPositionAlgorithm(): any;
/** Specifies wherever callout is in "Opened" state */
isOpen(): boolean;
/** Specifies wherever callout is in "Opening" state */
isOpening(): boolean;
/** Specifies wherever callout is in "Opened" or "Opening" state */
isOpenOrOpening(): boolean;
/** Specifies wherever callout is in "Closing" state */
isClosing(): boolean;
/** Specifies wherever callout is in "Closed" state */
isClosed(): boolean;
/** Returns the callout actions menu */
getActionMenu(): CalloutActionMenu;
/** Adds a link to the actions panel in the bottom part of the callout window */
addAction(action: CalloutAction): void;
/** Re-renders the actions menu. Call after the actions menu is changed. */
refreshActions(): void;
/** Display the callout. Animation can be used only for IE9+ */
open(useAnimation: boolean): void;
/** Hide the callout. Animation can be used only for IE9+ */
close(useAnimation: boolean): void;
/** Display if hidden, hide if shown. */
toggle(): void;
/** Do not call this directly. Instead, use CalloutManager.remove */
destroy(): void;
}
declare class CalloutOpenOptions {
/** HTML event name, e.g. "click" */
event: string;
/** Callout will be closed on blur */
closeCalloutOnBlur: boolean;
/** Close button will be shown within the callout window */
showCloseButton: boolean;
}
declare class CalloutOptions {
/** Some unique id for the callout. */
ID: string;
/** Element on that the callout is shown. */
launchPoint: HTMLElement;
/** One of the following: "topBottom" (default) or "leftRight". */
beakOrientation: string;
/** String (HTML allowed) that represents contents of the callout window. */
content: string;
/** Title for the callout */
title: string;
/** HTML element that represents contents of the callout window. */
contentElement: HTMLElement;
/** If defined, callout will be inscribed into the bounding element. */
boundingBox: HTMLElement;
/** Content element's width in pixels. By default = 350. */
contentWidth: number;
/** Defines opening behavior */
openOptions: CalloutOpenOptions;
/** Fires after the callout is rendered but before it is positioned and shown */
onOpeningCallback: (callout: Callout) => void;
/** Fires right after the callout is shown */
onOpenedCallback: (callout: Callout) => void;
/** Fires right before the callout is closed */
onClosingCallback: (callout: Callout) => void;
/** Fires right after the callout is closed */
onClosedCallback: (callout: Callout) => void;
/** Sets the position of the callout during its opening phase. For an example of a position algorithm function, please explore defaultPositionAlgorithm function from the callout.debug.js file */
positionAlgorithm: (callout: Callout) => void;
}
declare class CalloutManager {
/** Creates a new callout */
static createNew(options: CalloutOptions): Callout;
/** Checks if callout with specified ID already exists. If it doesn't, creates it, otherwise returns the existing one. */
static createNewIfNecessary(options: CalloutOptions): Callout;
/** Detaches callout from the launch point and destroys it. */
static remove(callout: Callout): void;
/** Searches for a callout associated with the specified launch point. Throws error if not found. */
static getFromLaunchPoint(launchPoint: HTMLElement): Callout;
/** Searches for a callout associated with the specified launch point. Returns null if not found. */
static getFromLaunchPointIfExists(launchPoint: HTMLElement): Callout;
/** Gets the first launch point within the specified ancestor element, and returns true if the associated with it callout is opened or opening.
If the launch point is not found or the callout is hidden, returns false. */
static containsOneCalloutOpen(ancestor: HTMLElement): boolean;
/** Finds the closest launch point based on the specified descendant element, and returns callout associated with the launch point. */
static getFromCalloutDescendant(descendant: HTMLElement): Callout;
/** Perform some action for each callout on the page. */
static forEach(callback: (callout: Callout) => void): void;
/** Closes all callouts on the page */
static closeAll(): boolean;
/** Returns true if at least one of the defined on page callouts is opened. */
static isAtLeastOneCalloutOpen(): boolean;
/** Returns true if at least one of the defined on page callouts is opened or opening. */
static isAtLeastOneCalloutOn(): boolean;
}
declare namespace SPClientTemplates {
enum FileSystemObjectType {
Invalid,
File,
Folder,
Web,
}
enum ChoiceFormatType {
Dropdown,
Radio,
}
enum ClientControlMode {
Invalid,
DisplayForm,
EditForm,
NewForm,
View,
}
enum RichTextMode {
Compatible,
FullHtml,
HtmlAsXml,
ThemeHtml,
}
enum UrlFormatType {
Hyperlink,
Image,
}
enum DateTimeDisplayFormat {
DateOnly,
DateTime,
TimeOnly,
}
enum DateTimeCalendarType {
None,
Gregorian,
Japan,
Taiwan,
Korea,
Hijri,
Thai,
Hebrew,
GregorianMEFrench,
GregorianArabic,
GregorianXLITEnglish,
GregorianXLITFrench,
KoreaJapanLunar,
ChineseLunar,
SakaEra,
UmAlQura,
}
enum UserSelectionMode {
PeopleOnly,
PeopleAndGroups,
}
/** Represents schema for a Choice field in list form or in list view in grid mode */
interface FieldSchema_InForm_Choice extends FieldSchema_InForm {
/** List of choices for this field. */
Choices: string[];
/** Display format for the choice field */
FormatType: ChoiceFormatType;
}
/** Represents schema for a Lookup field in list form or in list view in grid mode */
interface FieldSchema_InForm_Lookup extends FieldSchema_InForm {
/** Specifies if the field allows multiple values */
AllowMultipleValues: boolean;
/** Returns base url for a list display form, e.g. "http:// portal/web/_layouts/15/listform.aspx?PageType=4"
You must add "ListId" (Guid of the list) and "ID" (integer Id of the item) parameters in order to use this Url */
BaseDisplayFormUrl: string;
/** Indicates if the field is a dependent lookup */
DependentLookup: boolean;
/** Indicates wherever the lookup list is throttled (contains more items than value of the "List Throttle Limit" setting). */
Throttled: boolean;
/** Returns string representation of a number that represents the current value for the "List Throttle Limit" web application setting.
Only appears if Throttled property is true, i.e. the target lookup list is throttled. */
MaxQueryResult: string;
/** List of choices for this field. */
Choices: Array<{ LookupId: number; LookupValue: string }>;
/** Number of choices. Appears only for Lookup field. */
ChoiceCount: number;
LookupListId: string;
}
/** Represents schema for a DateTime field in list form or in list view in grid mode */
interface FieldSchema_InForm_DateTime extends FieldSchema_InForm {
/** Type of calendar to use */
CalendarType: DateTimeCalendarType;
/** Display format for DateTime field. */
DisplayFormat: DateTimeDisplayFormat;
/** Indicates wherever current user regional settings specify to display week numbers in day or week views of a calendar.
Only appears for DateTime fields. */
ShowWeekNumber: boolean;
TimeSeparator: string;
TimeZoneDifference: string;
FirstDayOfWeek: number;
FirstWeekOfYear: number;
HijriAdjustment: number;
WorkWeek: string;
LocaleId: string;
LanguageId: string;
MinJDay: number;
MaxJDay: number;
HoursMode24: boolean;
HoursOptions: string[];
}
/** Represents schema for a DateTime field in list form or in list view in grid mode */
interface FieldSchema_InForm_Geolocation extends FieldSchema_InForm {
BingMapsKey: string;
IsBingMapBlockedInCurrentRegion: boolean;
}
/** Represents schema for a Choice field in list form or in list view in grid mode */
interface FieldSchema_InForm_MultiChoice extends FieldSchema_InForm {
/** List of choices for this field. */
MultiChoices: string[];
/** Indicates wherever fill-in choice is allowed */
FillInChoice: boolean;
}
/** Represents schema for a Choice field in list form or in list view in grid mode */
interface FieldSchema_InForm_MultiLineText extends FieldSchema_InForm {
/** Specifies whether rich text formatting can be used in the field */
RichText: boolean;
/** Changes are appended to the existing text. */
AppendOnly: boolean;
/** Rich text mode for the field */
RichTextMode: RichTextMode;
/** Number of lines configured to display */
NumberOfLines: number;
/** A boolean value that specifies whether hyperlinks can be used in this fields. */
AllowHyperlink: boolean;
/** WebPartAdderId for the ScriptEditorWebPart */
ScriptEditorAdderId: string;
}
/** Represents schema for a Number field in list form or in list view in grid mode */
interface FieldSchema_InForm_Number extends FieldSchema_InForm {
ShowAsPercentage: boolean;
}
/** Represents schema for a Number field in list form or in list view in grid mode */
interface FieldSchema_InForm_Text extends FieldSchema_InForm {
MaxLength: number;
}
/** Represents schema for a Number field in list form or in list view in grid mode */
interface FieldSchema_InForm_Url extends FieldSchema_InForm {
DisplayFormat: UrlFormatType;
}
/** Represents schema for a Number field in list form or in list view in grid mode */
interface FieldSchema_InForm_User extends FieldSchema_InForm {
Presence: boolean;
WithPicture: boolean;
DefaultRender: boolean;
WithPictureDetail: boolean;
/** Server relative Url for ~site/_layouts/listform.aspx */
ListFormUrl: string;
/** Server relative Url for ~site/_layouts/userdisp.aspx */
UserDisplayUrl: string;
EntitySeparator: string;
PictureOnly: boolean;
PictureSize: string;
}
interface FieldSchema {
/** Specifies if the field can be edited while list view is in the Grid mode */
AllowGridEditing: boolean;
/** String representation of the field type, e.g. "Lookup". Same as SPField.TypeAsString */
FieldType: string;
/** Internal name of the field */
Name: string;
/** For OOTB fields, returns the type of field. For "UserMulti" returns "User", for "LookupMulti" returns "Lookup".
For custom field types, returns base type of the field. */
Type: string;
}
/** Represents field schema in Grid mode and on list forms.
Consider casting objects of this type to more specific field types, e.g. FieldSchemaInForm_Lookup */
interface FieldSchema_InForm extends FieldSchema {
/** Description for this field. */
Description: string;
/** Direction of the reading order for the field. */
Direction: string;
/** Indicates whether the field is hidden */
Hidden: boolean;
/** Guid of the field */
Id: string;
/** Specifies Input Method Editor (IME) mode bias to use for the field.
The IME enables conversion of keystrokes between languages when one writing system has more characters than can be encoded for the given keyboard. */
IMEMode: any;
/** Specifies if the field is read only */
ReadOnlyField: boolean;
/** Specifies wherever field requires values */
Required: boolean;
RestrictedMode: boolean;
/** Title of the field */
Title: string;
/** If SPFarm.Local.UseMinWidthForHtmlPicker is true, UseMinWidth will be set to true. Undefined in other cases. */
UseMinWidth: boolean;
}
interface ListSchema {
Field: FieldSchema[];
}
interface ListSchema_InForm extends ListSchema {
Field: FieldSchema_InForm[];
}
interface ListData_InForm {
Items: Item[];
}
interface RenderContext_FieldInForm extends RenderContext_Form {
CurrentGroupIdx: number;
CurrentGroup: Group;
CurrentItems: Item[];
CurrentFieldSchema: FieldSchema_InForm;
CurrentFieldValue: any;
}
interface RenderContext_Form extends RenderContext {
CurrentItem: Item;
FieldControlModes: { [fieldInternalName: string]: ClientControlMode };
FormContext: ClientFormContext;
FormUniqueId: string;
ListData: ListData_InForm;
ListSchema: ListSchema_InForm;
CSRCustomLayout?: boolean | undefined;
}
interface FieldSchema_InView_LookupField extends FieldSchema_InView {
/** Either "TRUE" or "FALSE" */
AllowMultipleValues: string;
/** Target lookup list display form URL, including PageType and List attributes. */
DispFormUrl: string;
/** Either "TRUE" or "FALSE" */
HasPrefix: string;
}
interface FieldSchema_InView_UserField extends FieldSchema_InView {
/** Either "TRUE" or "FALSE" */
AllowMultipleValues: string;
/** Either "TRUE" or "FALSE" */
ImnHeader: string;
/** Either "TRUE" or "FALSE" */
HasPrefix: string;
/** Either "1" or "0" */
HasUserLink: string;
/** Either "1" or "0" */
DefaultRender: string;
}
/** Represents field schema in a list view. */
interface FieldSchema_InView extends FieldSchema {
/** Either "TRUE" or "FALSE" */
CalloutMenu: string;
ClassInfo: string; // e.g. "Menu"
css: string;
DisplayName: string;
/** Either "TRUE" or "FALSE" */
Explicit: string;
fieldRenderer: any;
FieldTitle: string;
/** Indicates whether the field can be filtered. Either "TRUE" or "FALSE" */
Filterable: string;
/** Set to "TRUE" for fields that comply to the following Xpath query:
ViewFields/FieldRef[@Explicit='TRUE'] | Query/GroupBy/FieldRef[not(@Name=ViewFields/FieldRef/@Name)] */
GroupField: string;
/** Either "TRUE" or "FALSE" */
GridActiveAndReadOnly: string;
/** Guid of the field */
ID: string;
/** Specifies if the field contains list item menu.
Corresponds to ViewFields/FieldRef/@ListItemMenu attribute. Either "TRUE" or "FALSE" and might be missing. */
listItemMenu: string;
RealFieldName: string;
/** Either "TRUE" or "FALSE" */
ReadOnly: string;
ResultType: string;
/** Indicates whether the field can be sorted. Either "TRUE" or "FALSE" */
Sortable: string;
}
interface ListSchema_InView extends ListSchema {
/** Key-value object that represents all aggregations defined for the view.
Key specifies the field internal name, and value specifies the type of the aggregation. */
Aggregate: { [name: string]: string };
/** Either "TRUE" or false (for grouping) */
Collapse: string;
/** Specifies whether to open items in a client application ("1") or in browser ("0"). */
DefaultItemOpen: string;
Direction: string;
/** Either "0" or "1" */
EffectivePresenceEnabled: string;
/** If in grid mode (context.inGridMode == true), cast to FieldSchema_InForm[], otherwise cast to FieldSchema_InView[] */
FieldSortParam: string;
Filter: any;
/** Either "0" or "1" */
ForceCheckout: string;
/** Internal name for the first group by field, if any */
group1: string;
/** Internal name for the second group by field, if any */
group2: string;
/** "1" if the view contains "Title" field, otherwise not defined. */
HasTitle: string;
HttpVDir: string;
/** Either "0" or "1" */
InplaceSearchEnabled: string;
/** Either "0" or "1" */
IsDocLib: string;
/** e.g. "1033" */
LCID: string;
/** Either "0" or "1" */
ListRight_AddListItems: string;
NoListItem: string;
NoListItemHowTo: string;
/** Server-relative path to the current page */
PagePath: string;
/** Internal name of the field inside which the hierarchy buttons are displayed */
ParentHierarchyDisplayField: string;
PresenceAlt: string;
/** Represents SPList.RootFolder.Properties. Exists only if SPList.FetchPropertyBagForListView property is set to true. */
PropertyBag: { [key: string]: string };
/** Either "True" or "False" */
RenderSaveAsNewViewButton: string;
/** Either "True" or "False" */
RenderViewSelectorPivotMenu: string;
/** Either "True" or "False" */
RenderViewSelectorPivotMenuAsync: string;
/** Query string parameters that specify GUID of the current view and the current root folder */
RootFolderParam: string;
SelectedID: string; // number
ShowWebPart: string;
/** Either "1" or undefined. */
StrikeThroughOnCompletedEnabled: string;
/** Either "0" or "1" */
TabularView: string;
Toolbar: string;
UIVersion: string; // number
Userid: string; // number
UserVanilla: any;
/** Server relative path to "/_layouts/userdisp.aspx" in the current web */
UserDispUrl: string;
/** Either "1" or "" */
UseParentHierarchy: string;
/** Guid of the view */
View: string;
/** JSON string */
ViewSelectorPivotMenuOptions: string;
/** Query string parameters that specify current root folder (RootFolder) and folder content type id (FolderCTID) */
ViewSelector_ViewParameters: string;
}
interface ListData_InView {
FilterLink: string;
FilterFields: string;
FirstRow: number;
/** Either "0" or "1" */
ForceNoHierarchy: string;
HierarchyHasIndention: string;
/** Link to the previous page (not defined if not available) */
PrevHref: string;
/** Link to the next page (not defined if not available) */
NextHref: string;
SortField: string;
SortDir: string;
LastRow: number;
Row: Item[];
}
interface RenderContext_GroupInView extends RenderContext_InView {
CurrentGroupIdx: number;
CurrentGroup: Group;
CurrentItems: Item[];
}
interface RenderContext_InView extends RenderContext {
AllowCreateFolder: boolean;
AllowGridMode: boolean;
BasePermissions: { [PermissionName: string]: boolean }; // SP.BasePermissions?
bInitialRender: boolean;
CanShareLinkForNewDocument: boolean;
CascadeDeleteWarningMessage: string;
clvp: HTMLElement; // not in View
ContentTypesEnabled: boolean;
ctxId: number;
ctxType: any; // not in View
CurrentUserId: number;
CurrentUserIsSiteAdmin: boolean;
LastSelectedItemIID: any;
dictSel: any;
/** Absolute path for the list display form */
displayFormUrl: string;
/** Absolute path for the list edit form */
editFormUrl: string;
EnableMinorVersions: boolean;
ExternalDataList: boolean;
enteringGridMode: boolean;
existingServerFilterHash: any;
HasRelatedCascadeLists: number;
heroId: string; // e.g. "idHomePageNewItem"
HttpPath: string;
HttpRoot: string;
imagesPath: string;
inGridFullRender: any; // not in View
inGridMode: boolean;
IsAppWeb: boolean;
IsClientRendering: boolean;
isForceCheckout: boolean;
isModerated: boolean;
isPortalTemplate: any;
isWebEditorPreview: number;
isVersions: number;
isXslView: boolean;
LastRowIndexSelected: any; // not in View
LastSelectableRowIdx: any;
LastSelectedItemId: any; // not in View
leavingGridMode: boolean;
listBaseType: number;
ListData: ListData_InView;
ListDataJSONItemsKey: string; // ="Row"
/** Guid of the list */
listName: string;
ListSchema: ListSchema_InView;
listTemplate: string;
ListTitle: string;
listUrlDir: string;
loadingAsyncData: boolean;
ModerationStatus: number;
NavigateForFormsPages: boolean;
/** Absolute path for the list new form */
newFormUrl: string;
NewWOPIDocumentEnabled: any;
NewWOPIDocumentUrl: any;
noGroupCollapse: boolean;
OfficialFileName: string;
OfficialFileNames: string;
overrideDeleteConfirmation: string; // not in View
overrideFilterQstring: string; // not in View
PortalUrl: string;
queryString: any;
recursiveView: boolean;
/** either 1 or 0 */
RecycleBinEnabled: number;
RegionalSettingsTimeZoneBias: string;
rootFolder: string;
rootFolderForDisplay: any;
RowFocusTimerID: any;
SelectAllCbx: any;
SendToLocationName: string;
SendToLocationUrl: string;
serverUrl: any;
SiteTitle: string;
StateInitDone: boolean;
TableCbxFocusHandler: any;
TableMouseOverHandler: any;
TotalListItems: number;
verEnabled: number;
/** Guid of the view. */
view: string;
viewTitle: string;
WorkflowAssociated: boolean;
wpq: string;
WriteSecurity: string;
}
interface RenderContext_ItemInView extends RenderContext_InView {
CurrentItem: Item;
CurrentItemIdx: number;
}
interface RenderContext_FieldInView extends RenderContext_ItemInView {
/** If in grid mode (context.inGridMode == true), cast to FieldSchema_InForm, otherwise cast to FieldSchema_InView */
CurrentFieldSchema: FieldSchema_InForm | FieldSchema_InView;
CurrentFieldValue: any;
FieldControlsModes: { [fieldInternalName: string]: ClientControlMode };
FormContext: ClientFormContext;
FormUniqueId: string;
}
interface Item {
[fieldInternalName: string]: any;
}
interface Group {
Items: Item[];
}
type RenderCallback = (ctx: RenderContext) => void;
interface RenderContext {
BaseViewID?: number | undefined;
ControlMode?: ClientControlMode | undefined;
CurrentCultureName?: string | undefined;
CurrentLanguage?: number | undefined;
CurrentSelectedItems?: any;
CurrentUICultureName?: string | undefined;
ListTemplateType?: number | undefined;
OnPostRender?: RenderCallback | RenderCallback[] | undefined;
OnPreRender?: RenderCallback | RenderCallback[] | undefined;
onRefreshFailed?: any;
RenderBody?(renderContext: RenderContext): string;
RenderFieldByName?(renderContext: RenderContext, fieldName: string): string;
RenderFields?(renderContext: RenderContext): string;
RenderFooter?(renderContext: RenderContext): string;
RenderGroups?(renderContext: RenderContext): string;
RenderHeader?(renderContext: RenderContext): string;
RenderItems?(renderContext: RenderContext): string;
RenderView?(renderContext: RenderContext): string;
SiteClientTag?: string | undefined;
Templates?: Templates | undefined;
}
/** Must return null in order to fall back to a more common template or to a system default template */
type SingleTemplateCallback = (renderContext: RenderContext_InView) => string;
/** Must return null in order to fall back to a more common template or to a system default template */
type GroupCallback = (renderContext: RenderContext_GroupInView) => string;
/** Must return null in order to fall back to a more common template or to a system default template */
type ItemCallback = (renderContext: RenderContext) => string;
/** Must return null in order to fall back to a more common template or to a system default template */
type FieldCallback = (renderContext: RenderContext) => string;
/** Must return null in order to fall back to a more common template or to a system default template */
type FieldInFormCallback = (renderContext: RenderContext_FieldInForm) => string;
/** Must return null in order to fall back to a more common template or to a system default template */
type FieldInViewCallback = (renderContext: RenderContext_FieldInView) => string;
interface FieldTemplateOverrides {
/** Defines templates for rendering the field on a display form. */
DisplayForm?: FieldInFormCallback | undefined;
/** Defines templates for rendering the field on an edit form. */
EditForm?: FieldInFormCallback | undefined;
/** Defines templates for rendering the field on a new form. */
NewForm?: FieldInFormCallback | undefined;
/** Defines templates for rendering the field on a list view. */
View?: FieldInViewCallback | undefined;
}
interface FieldTemplates {
[fieldInternalName: string]: FieldCallback;
}
interface Templates {
View?: RenderCallback | string | undefined; // TODO: determine appropriate context type and purpose of this template
Body?: RenderCallback | string | undefined; // TODO: determine appropriate context type and purpose of this template
/** Defines templates for rendering groups (aggregations). */
Group?: GroupCallback | string | undefined;
/** Defines templates for list items rendering. */
Item?: ItemCallback | string | undefined;
/** Defines template for rendering list view header.
Can be either string or SingleTemplateCallback */
Header?: SingleTemplateCallback | string | undefined;
/** Defines template for rendering list view footer.
Can be either string or SingleTemplateCallback */
Footer?: SingleTemplateCallback | string | undefined;
/** Defines templates for fields rendering. The field is specified by it's internal name. */
Fields?: FieldTemplates | undefined;
}
interface FieldTemplateMap {
[fieldInternalName: string]: FieldTemplateOverrides;
}
interface TemplateOverrides {
View?: RenderCallback | string | undefined; // TODO: determine appropriate context type and purpose of this template
Body?: RenderCallback | string | undefined; // TODO: determine appropriate context type and purpose of this template
/** Defines templates for rendering groups (aggregations). */
Group?: GroupCallback | string | undefined;
/** Defines templates for list items rendering. */
Item?: ItemCallback | string | undefined;
/** Defines template for rendering list view header.
Can be either string or SingleTemplateCallback */
Header?: SingleTemplateCallback | string | undefined;
/** Defines template for rendering list view footer.
Can be either string or SingleTemplateCallback */
Footer?: SingleTemplateCallback | string | undefined;
/** Defines templates for fields rendering. The field is specified by it's internal name. */
Fields?: FieldTemplateMap | undefined;
}
interface TemplateOverridesOptions {
/** Template overrides */
Templates?: TemplateOverrides | undefined;
/** Callbacks called before rendering starts. Can be function (ctx: RenderContext) => void or array of functions.*/
OnPreRender?: RenderCallback | RenderCallback[] | undefined;
/** Callbacks called after rendered html inserted into DOM. Can be function (ctx: RenderContext) => void or array of functions.*/
OnPostRender?: RenderCallback | RenderCallback[] | undefined;
/** View style (SPView.StyleID) for which the templates should be applied.
If not defined, the templates will be applied only to default view style. */
ViewStyle?: number | undefined;
/** List template type (SPList.BaseTemplate) for which the template should be applied.
If not defined, the templates will be applied to all lists. */
ListTemplateType?: number | undefined;
/** Base view ID (SPView.BaseViewID) for which the template should be applied.
If not defined, the templates will be applied to all views. */
BaseViewID?: number | string | undefined;
}
class TemplateManager {
static RegisterTemplateOverrides(renderCtx: TemplateOverridesOptions): void;
static GetTemplates(renderCtx: RenderContext): Templates;
}
interface ClientUserValue {
lookupId: number;
lookupValue: string;
displayStr: string;
email: string;
sip: string;
title: string;
picture: string;
department: string;
jobTitle: string;
}
interface ClientLookupValue {
LookupId: number;
LookupValue: string;
}
interface ClientUrlValue {
URL: string;
Description: string;
}
class Utility {
static ComputeRegisterTypeInfo(renderCtx: TemplateOverridesOptions): any;
static ControlModeToString(mode: SPClientTemplates.ClientControlMode): string;
static FileSystemObjectTypeToString(fileSystemObjectType: SPClientTemplates.FileSystemObjectType): string;
static ChoiceFormatTypeToString(fileSystemObjectType: SPClientTemplates.ChoiceFormatType): string;
static RichTextModeToString(fileSystemObjectType: SPClientTemplates.RichTextMode): string;
static IsValidControlMode(mode: number): boolean;
/** Removes leading and trailing spaces */
static Trim(str: string): string;
/** Creates SP.ClientContext based on the specified Web URL. If the SP.Runtime.js script is not loaded, returns null */
static InitContext(webUrl: string): SP.ClientContext;
static GetControlOptions(control: HTMLElement): any;
static TryParseInitialUserValue(userStr: string): ClientUserValue[];
/** Tries to resolve user names from string. Pushes either ClientUserValue (if resolved successfully) or original string (if not) to the resulting array. */
static TryParseUserControlValue(userStr: string, separator: string): any[];
static GetPropertiesFromPageContextInfo(context: RenderContext): void;
/** Replaces tokens "~site/", "~sitecollection/", "~sitecollectionmasterpagegallery", "{lcid}", "{locale}" and "{siteclienttag}" with appropriate context values */
static ReplaceUrlTokens(tokenUrl: string): string;
static ParseLookupValue(valueStr: string): ClientLookupValue;
static ParseMultiLookupValues(valueStr: string): ClientLookupValue[];
/** Represents lookup values array in some strange format */
static BuildLookupValuesAsString(
choiceArray: ClientLookupValue[],
isMultiLookup: boolean,
setGroupDesc: boolean,
): string;
static ParseURLValue(value: string): ClientUrlValue;
static GetFormContextForCurrentField(context: RenderContext_Form): ClientFormContext;
/** Returns ";#" */
static UserLookupDelimitString: string;
/** Returns ";#" */
static UserMultiValueDelimitString: string;
}
class ClientFormContext {
fieldValue: any;
fieldSchema: SPClientTemplates.FieldSchema_InForm;
fieldName: string;
controlMode: number;
webAttributes: {
AllowScriptableWebParts: boolean;
CurrentUserId: number;
EffectivePresenceEnabled: boolean;
LCID: string;
PermissionCustomizePages: boolean;
WebUrl: string;
};
itemAttributes: {
ExternalListItem: boolean;
FsObjType: number;
Id: number;
Url: string;
};
listAttributes: {
BaseType: number;
DefaultItemOpen: number;
Direction: string;
EnableVesioning: boolean;
Id: string;
};
registerInitCallback(fieldname: string, callback: () => void): void;
registerFocusCallback(fieldname: string, callback: () => void): void;
registerValidationErrorCallback(fieldname: string, callback: (error: any) => void): void;
registerGetValueCallback(fieldname: string, callback: () => any): void;
updateControlValue(fieldname: string, value: any): void;
registerClientValidator(fieldname: string, validator: SPClientForms.ClientValidation.ValidatorSet): void;
registerHasValueChangedCallback(fieldname: string, callback: (eventArg?: any) => void): void;
}
}
declare function GenerateIID(renderCtx: SPClientTemplates.RenderContext_ItemInView): string;
declare function GenerateIIDForListItem(
renderCtx: SPClientTemplates.RenderContext_InView,
listItem: SPClientTemplates.Item,
): string;
declare function SPFormControl_AppendValidationErrorMessage(nodeId: string, errorResult: any): void;
declare function CoreRender(template: any, context: any): string;
declare namespace SPClientForms {
namespace ClientValidation {
class ValidationResult {
constructor(hasErrors: boolean, errorMsg: string);
}
class ValidatorSet {
RegisterValidator(validator: IValidator): void;
}
interface IValidator {
Validate(value: any): ValidationResult;
}
class RequiredValidator implements IValidator {
Validate(value: any): ValidationResult;
}
class RequiredFileValidator implements IValidator {
Validate(value: any): ValidationResult;
}
class RequiredRichTextValidator implements IValidator {
Validate(value: any): ValidationResult;
}
class MaxLengthUrlValidator implements IValidator {
Validate(value: any): ValidationResult;
}
}
enum FormManagerEvents {
Event_OnControlValueChanged, // : 1,
Event_OnControlInitializedCallback, // : 2,
Event_OnControlFocusSetCallback, // : 3,
Event_GetControlValueCallback, // : 4,
Event_OnControlValidationError, // : 5,
Event_RegisterControlValidator, // : 6,
Event_GetHasValueChangedCallback, // : 7
}
class ClientForm {
constructor(qualifier: string);
RenderClientForm(): void;
SubmitClientForm(): boolean;
NotifyControlEvent(eventName: FormManagerEvents, fldName: string, eventArg: any): void;
}
class ClientFormManager {
static GetClientForm(qualifier: string): ClientForm;
static RegisterClientForm(qualifier: string): void;
static SubmitClientForm(qualifier: string): boolean;
}
}
declare class SPMgr {
NewGroup(listItem: { [name: string]: any }, fieldName: string): boolean;
RenderHeader(renderCtx: SPClientTemplates.RenderContext, field: SPClientTemplates.FieldSchema): string;
RenderField(
renderCtx: SPClientTemplates.RenderContext,
field: SPClientTemplates.FieldSchema,
listItem: { [name: string]: any },
listSchema: SPClientTemplates.ListSchema,
): string;
RenderFieldByName(
renderCtx: SPClientTemplates.RenderContext,
fieldName: string,
listItem: { [name: string]: any },
listSchema: SPClientTemplates.ListSchema,
): string;
}
declare var spMgr: SPMgr;
declare function SPField_FormDisplay_Default(ctx: SPClientTemplates.RenderContext_FieldInForm): string;
declare function SPField_FormDisplay_DefaultNoEncode(ctx: SPClientTemplates.RenderContext_FieldInForm): string;
declare function SPField_FormDisplay_Empty(ctx: SPClientTemplates.RenderContext_FieldInForm): string;
declare function SPFieldText_Edit(ctx: SPClientTemplates.RenderContext_FieldInForm): string;
declare function SPFieldNumber_Edit(ctx: SPClientTemplates.RenderContext_FieldInForm): string;
declare function SPFieldBoolean_Edit(ctx: SPClientTemplates.RenderContext_FieldInForm): string;
declare function SPFieldNote_Display(ctx: SPClientTemplates.RenderContext_FieldInForm): string;
declare function SPFieldNote_Edit(ctx: SPClientTemplates.RenderContext_FieldInForm): string;
declare function SPFieldFile_Display(ctx: SPClientTemplates.RenderContext_FieldInForm): string;
declare function SPFieldFile_Edit(ctx: SPClientTemplates.RenderContext_FieldInForm): string;
declare function SPFieldChoice_Edit(ctx: SPClientTemplates.RenderContext_FieldInForm): string;
declare function SPFieldChoice_Dropdown_Edit(ctx: SPClientTemplates.RenderContext_FieldInForm): string;
declare function SPFieldChoice_Radio_Edit(ctx: SPClientTemplates.RenderContext_FieldInForm): string;
declare function SPFieldMultiChoice_Edit(ctx: SPClientTemplates.RenderContext_FieldInForm): string;
declare function SPFieldDateTime_Display(ctx: SPClientTemplates.RenderContext_FieldInForm): string;
declare function SPFieldDateTime_Edit(ctx: SPClientTemplates.RenderContext_FieldInForm): string;
declare function SPFieldUrl_Display(ctx: SPClientTemplates.RenderContext_FieldInForm): string;
declare function SPFieldUrl_Edit(ctx: SPClientTemplates.RenderContext_FieldInForm): string;
declare function SPFieldUser_Display(ctx: SPClientTemplates.RenderContext_FieldInForm): string;
declare function SPFieldUserMulti_Display(ctx: SPClientTemplates.RenderContext_FieldInForm): string;
declare function SPClientPeoplePickerCSRTemplate(ctx: SPClientTemplates.RenderContext_FieldInForm): string;
declare function SPFieldLookup_Display(ctx: SPClientTemplates.RenderContext_FieldInForm): string;
declare function SPFieldLookup_Edit(ctx: SPClientTemplates.RenderContext_FieldInForm): string;
declare function SPFieldLookupMulti_Edit(ctx: SPClientTemplates.RenderContext_FieldInForm): string;
declare function SPFieldAttachments_Default(ctx: SPClientTemplates.RenderContext_FieldInForm): string;
declare namespace SPAnimation {
enum Attribute {
PositionX,
PositionY,
Height,
Width,
Opacity,
}
enum ID {
Basic_Show,
Basic_SlowShow,
Basic_Fade,
Basic_Move,
Basic_Size,
Content_SlideInFadeInRight,
Content_SlideInFadeInRightInc,
Content_SlideOutFadeOutRight,
Content_SlideInFadeInLeft,
Content_SlideInFadeInLeftInc,
SmallObject_SlideInFadeInTop,
SmallObject_SlideInFadeInLeft,
Test_Instant,
Test_Hold,
Basic_Opacity,
Basic_QuickShow,
Basic_QuickFade,
Content_SlideInFadeInGeneric,
Basic_StrikeThrough,
SmallObject_SlideInFadeInBottom,
SmallObject_SlideOutFadeOutBottom,
Basic_QuickSize,
}
class Settings {
static DisableAnimation(): void;
static DisableSessionAnimation(): void;
static IsAnimationEnabled(): boolean;
}
class State {
SetAttribute(attributeId: Attribute, value: number): void;
GetAttribute(attributeId: Attribute): number;
GetDataIndex(attributeId: Attribute): number;
}
class Object {
constructor(
animationID: ID,
delay: number,
element: HTMLElement | HTMLElement[],
finalState: State,
finishFunc?: (data: any) => void,
data?: any,
);
RunAnimation(): void;
}
}
declare namespace SPAnimationUtility {
class BasicAnimator {
static FadeIn(element: HTMLElement, finishFunc?: (data: any) => void, data?: any): void;
static FadeOut(element: HTMLElement, finishFunc?: (data: any) => void, data?: any): void;
static Move(
element: HTMLElement,
posX: number,
posY: number,
finishFunc?: (data: any) => void,
data?: any,
): void;
static StrikeThrough(
element: HTMLElement,
strikeThroughWidth: number,
finishFunc?: (data: any) => void,
data?: any,
): void;
static Resize(
element: HTMLElement,
newHeight: number,
newWidth: number,
finishFunc?: (data: any) => void,
data?: any,
): void;
static CommonResize(
element: HTMLElement,
newHeight: number,
newWidth: number,
finishFunc: (data: any) => void,
data: any,
animationId: SPAnimation.ID,
): void;
static QuickResize(
element: HTMLElement,
newHeight: number,
newWidth: number,
finishFunc?: (data: any) => void,
data?: any,
): void;
static ResizeContainerAndFillContent(
element: HTMLElement,
newHeight: number,
newWidth: number,
finishFunc: () => void,
fAddToEnd: boolean,
): void;
static GetWindowScrollPosition(): { x: number; y: number };
static GetLeftOffset(element: HTMLElement): number;
static GetTopOffset(element: HTMLElement): number;
static GetRightOffset(element: HTMLElement): number;
static PositionElement(
element: HTMLElement,
topValue: number,
leftValue: number,
heightValue: number,
widthValue: number,
): void;
static PositionAbsolute(element: HTMLElement): void;
static PositionRelative(element: HTMLElement): void;
static PositionRelativeExact(
element: HTMLElement,
topValue: number,
leftValue: number,
heightValue: number,
widthValue: number,
): void;
static PositionAbsoluteExact(
element: HTMLElement,
topValue: number,
leftValue: number,
heightValue: number,
widthValue: number,
): void;
static IsPositioned(element: HTMLElement): boolean;
}
}
interface IEnumerator {
get_current(): T;
moveNext(): boolean;
reset(): void;
}
interface IEnumerable {
getEnumerator(): IEnumerator;
}
declare namespace SP {
class ScriptUtility {
static isNullOrEmptyString(str: string): boolean;
static isNullOrUndefined(obj: any): boolean;
static isUndefined(obj: any): boolean;
static truncateToInt(n: number): number;
}
class Guid {
constructor(guidText: string);
static get_empty(): SP.Guid;
static newGuid(): SP.Guid;
static isValid(uuid: string): boolean;
toString(format?: string): string;
equals(uuid: SP.Guid): boolean;
ToSerialized(): string;
}
/** Specifies permissions that are used to define user roles. Represents SPBasePermissions class. */
enum PermissionKind {
/** Has no permissions on the Web site. Not available through the user interface. */
emptyMask,
/** View items in lists, documents in document libraries, and view Web discussion comments. */
viewListItems,
/** Add items to lists, add documents to document libraries, and add Web discussion comments. */
addListItems,
/** Edit items in lists, edit documents in document libraries, edit Web discussion comments in documents, and customize Web Part Pages in document libraries. */
editListItems,
/** Delete items from a list, documents from a document library, and Web discussion comments in documents. */
deleteListItems,
/** Approve a minor version of a list item or document. */
approveItems,
/** View the source of documents with server-side file handlers. */
openItems,
/** View past versions of a list item or document. */
viewVersions,
/** Delete past versions of a list item or document. */
deleteVersions,
/** Discard or check in a document which is checked out to another user. */
cancelCheckout,
/** Create, change, and delete personal views of lists. */
managePersonalViews,
/** Create and delete lists, add or remove columns in a list, and add or remove public views of a list. */
manageLists,
/** View forms, views, and application pages, and enumerate lists. */
viewFormPages,
/** Make content of a list or document library retrieveable for anonymous users through SharePoint search. The list permissions in the site do not change. */
anonymousSearchAccessList,
/** Allow users to open a Web site, list, or folder to access items inside that container. */
open,
/** View pages in a Web site. */
viewPages,
/** Add, change, or delete HTML pages or Web Part Pages, and edit the Web site using a SharePoint Foundation?compatible editor. */
addAndCustomizePages,
/** Apply a theme or borders to the entire Web site. */
applyThemeAndBorder,
/** Apply a style sheet (.css file) to the Web site. */
applyStyleSheets,
/** View reports on Web site usage. */
viewUsageData,
/** Create a Web site using Self-Service Site Creation. */
createSSCSite,
/** Create subsites such as team sites, Meeting Workspace sites, and Document Workspace sites. */
manageSubwebs,
/** Create a group of users that can be used anywhere within the site collection. */
createGroups,
/** Create and change permission levels on the Web site and assign permissions to users and groups. */
managePermissions,
/** Enumerate files and folders in a Web site using Microsoft Office SharePoint Designer 2007 and WebDAV interfaces. */
browseDirectories,
/** View information about users of the Web site. */
browseUserInfo,
/** Add or remove personal Web Parts on a Web Part Page. */
addDelPrivateWebParts,
/** Update Web Parts to display personalized information. */
updatePersonalWebParts,
/** Grant the ability to perform all administration tasks for the Web site as well as manage content. Activate, deactivate, or edit properties of Web site scoped Features through the object model or through the user interface (UI). When granted on the root Web site of a site collection, activate, deactivate, or edit properties of site collection scoped Features through the object model. To browse to the Site Collection Features page and activate or deactivate site collection scoped Features through the UI, you must be a site collection administrator. */
manageWeb,
/** Content of lists and document libraries in the Web site will be retrieveable for anonymous users through SharePoint search if the list or document library has AnonymousSearchAccessList set. */
anonymousSearchAccessWebLists,
/** Use features that launch client applications; otherwise, users must work on documents locally and upload changes. */
useClientIntegration,
/** Use SOAP, WebDAV, or Microsoft Office SharePoint Designer 2007 interfaces to access the Web site. */
useRemoteAPIs,
/** Manage alerts for all users of the Web site. */
manageAlerts,
/** Create e-mail alerts. */
createAlerts,
/** Allows a user to change their user information, such as adding a picture. */
editMyUserInfo,
/** Enumerate permissions on the Web site, list, folder, document, or list item. */
enumeratePermissions,
/** Has all permissions on the Web site. Not available through the user interface. */
fullMask,
}
class BaseCollection implements IEnumerable {
getEnumerator(): IEnumerator;
get_count(): number;
itemAtIndex(index: number): T;
constructor();
}
interface IFromJson {
fromJson(initValue: any): void;
customFromJson(initValue: any): boolean;
}
class Base64EncodedByteArray {
constructor(base64Str?: string);
get_length(): number;
toBase64String(): string;
append(b: any): void;
getByteAt(index: number): any;
setByteAt(index: number, b: any): void;
}
class ConditionalScopeBase {
startScope(): any;
startIfTrue(): any;
startIfFalse(): any;
get_testResult(): boolean;
fromJson(initValue: any): void;
customFromJson(initValue: any): boolean;
}
class ClientObjectPropertyConditionalScope extends SP.ConditionalScopeBase {
constructor(
clientObject: SP.ClientObject,
propertyName: string,
comparisonOperator: string,
valueToCompare: any,
allowAllActions?: boolean,
);
}
// class ClientResult {
// get_value(): any;
// setValue(value: any): void;
// constructor();
// }
class ClientResult {
get_value(): T;
setValue(value: T): void;
constructor();
}
class BooleanResult {
get_value(): boolean;
constructor();
}
class CharResult {
get_value(): any;
constructor();
}
class IntResult {
get_value(): number;
constructor();
}
class DoubleResult {
get_value(): number;
constructor();
}
class StringResult {
get_value(): string;
constructor();
}
class DateTimeResult {
get_value(): Date;
constructor();
}
class GuidResult {
get_value(): SP.Guid;
constructor();
}
class JsonObjectResult {
get_value(): any;
constructor();
}
class ClientDictionaryResultHandler {
constructor(dict: SP.ClientResult);
}
class ClientUtility {
static urlPathEncodeForXmlHttpRequest(url: string): string;
static getOrCreateObjectPathForConstructor(
context: SP.ClientRuntimeContext,
typeId: string,
args: any[],
): SP.ObjectPath;
}
class XElement {
get_name(): string;
set_name(value: string): void;
get_attributes(): any;
set_attributes(value: any): void;
get_children(): any;
set_children(value: any): void;
constructor();
}
class ClientXElement {
get_element(): SP.XElement;
set_element(value: SP.XElement): void;
constructor();
}
class ClientXDocument {
get_root(): SP.XElement;
set_root(value: SP.XElement): void;
constructor();
}
class DataConvert {
static writePropertiesToXml(
writer: SP.XmlWriter,
obj: any,
propNames: string[],
serializationContext: SP.SerializationContext,
): void;
static populateDictionaryFromObject(dict: any, parentNode: any): void;
static fixupTypes(context: SP.ClientRuntimeContext, dict: any): void;
static populateArray(context: SP.ClientRuntimeContext, dest: any, jsonArrayFromServer: any): void;
static fixupType(context: SP.ClientRuntimeContext, obj: any): any;
static writeDictionaryToXml(
writer: SP.XmlWriter,
dict: any,
topLevelElementTagName: string,
keys: any,
serializationContext: SP.SerializationContext,
): void;
static writeValueToXmlElement(
writer: SP.XmlWriter,
objValue: any,
serializationContext: SP.SerializationContext,
): void;
static invokeSetProperty(obj: any, propName: string, propValue: any): void;
static invokeGetProperty(obj: any, propName: string): any;
static specifyDateTimeKind(datetime: Date, kind: SP.DateTimeKind): void;
static getDateTimeKind(datetime: Date): SP.DateTimeKind;
static createUnspecifiedDateTime(
year: number,
month: number,
day: number,
hour: number,
minute: number,
second: number,
milliseconds: number,
): Date;
static createUtcDateTime(milliseconds: number): Date;
static createLocalDateTime(milliseconds: number): Date;
}
interface IWebRequestExecutorFactory {
createWebRequestExecutor(): Sys.Net.WebRequestExecutor;
}
class PageRequestFailedEventArgs extends Sys.EventArgs {
get_executor(): Sys.Net.WebRequestExecutor;
get_errorMessage(): string;
get_isErrorPage(): boolean;
}
class PageRequestSucceededEventArgs extends Sys.EventArgs {
get_executor(): Sys.Net.WebRequestExecutor;
}
class PageRequest {
get_request(): Sys.Net.WebRequest;
get_url(): string;
set_url(value: string): void;
get_expectedContentType(): string;
set_expectedContentType(value: string): void;
post(body: string): void;
get(): void;
static doPost(
url: string,
body: string,
expectedContentType: string,
succeededHandler: (sender: any, args: SP.PageRequestSucceededEventArgs) => void,
failedHandler: (sender: any, args: SP.PageRequestFailedEventArgs) => void,
): void;
static doGet(
url: string,
expectedContentType: string,
succeededHandler: (sender: any, args: SP.PageRequestSucceededEventArgs) => void,
failedHandler: (sender: any, args: SP.PageRequestFailedEventArgs) => void,
): void;
add_succeeded(value: (sender: any, args: SP.PageRequestSucceededEventArgs) => void): void;
remove_succeeded(value: (sender: any, args: SP.PageRequestSucceededEventArgs) => void): void;
add_failed(value: (sender: any, args: SP.PageRequestFailedEventArgs) => void): void;
remove_failed(value: (sender: any, args: SP.PageRequestFailedEventArgs) => void): void;
constructor();
}
class ResResources {
static getString(resourceId: string, args: any[]): string;
}
/** Defines a writer that provides a set of methods to append text in XML format. Use the static SP.XmlWriter.create(sb) Method to create an SP.XmlWriter object with the Sys.StringBuilder object you pass in. */
class XmlWriter {
/** Creates a new instance of the XmlWriter class with the specified string builder. */
static create(sb: Sys.StringBuilder): SP.XmlWriter;
/** Appends a start element tag with the specified name in XML format to the object?s string builder. */
writeStartElement(tagName: string): void;
/** Appends an element with the specified tag name and value in XML format to the string builder. */
writeElementString(tagName: string, value: string): void;
/** Appends an end element tag in XML format to the object?s string builder. This method appends the end element tag ?/>? if the start element tag is not closed; otherwise, it appends a full end element tag ?? to the string builder. */
writeEndElement(): void;
/** Appends an attribute with the specified name and value in XML format to the object?s string builder. */
writeAttributeString(localName: string, value: string): void;
/** This method only appends the name of the attribute. You can append the value of the attribute by calling the SP.XmlWriter.writeString(value) Method, and close the attribute by calling the SP.XmlWriter.writeEndAttribute() Method. */
writeStartAttribute(localName: string): void;
/** Appends an end of an attribute in XML format to the object?s string builder. */
writeEndAttribute(): void;
/** Appends the specified value for an element tag or attribute to the object?s string builder. */
writeString(value: string): void;
/** Appends the specified text to the object?s string builder. */
writeRaw(xml: string): void;
/** This member is reserved for internal use and is not intended to be used directly from your code. */
close(): void;
}
class ClientConstants {
static AddExpandoFieldTypeSuffix: string;
static Actions: string;
static ApplicationName: string;
static Body: string;
static CatchScope: string;
static ChildItemQuery: string;
static ChildItems: string;
static ConditionalScope: string;
static Constructor: string;
static Context: string;
static ErrorInfo: string;
static ErrorMessage: string;
static ErrorStackTrace: string;
static ErrorCode: string;
static ErrorTypeName: string;
static ErrorValue: string;
static ErrorDetails: string;
static ErrorTraceCorrelationId: string;
static ExceptionHandlingScope: string;
static ExceptionHandlingScopeSimple: string;
static QueryableExpression: string;
static FinallyScope: string;
static HasException: string;
static Id: string;
static Identity: string;
static IfFalseScope: string;
static IfTrueScope: string;
static IsNull: string;
static LibraryVersion: string;
static TraceCorrelationId: string;
static Count: string;
static Method: string;
static Methods: string;
static Name: string;
static Object: string;
static ObjectPathId: string;
static ObjectPath: string;
static ObjectPaths: string;
static ObjectType: string;
static ObjectIdentity: string;
static ObjectIdentityQuery: string;
static ObjectVersion: string;
static Parameter: string;
static Parameters: string;
static ParentId: string;
static Processed: string;
static Property: string;
static Properties: string;
static Query: string;
static QueryResult: string;
static Request: string;
static Results: string;
static ScalarProperty: string;
static SchemaVersion: string;
static ScopeId: string;
static SelectAll: string;
static SelectAllProperties: string;
static SetProperty: string;
static SetStaticProperty: string;
static StaticMethod: string;
static StaticProperty: string;
static SuffixChar: string;
static SuffixByte: string;
static SuffixInt16: string;
static SuffixUInt16: string;
static SuffixInt32: string;
static SuffixUInt32: string;
static SuffixInt64: string;
static SuffixUInt64: string;
static SuffixSingle: string;
static SuffixDouble: string;
static SuffixDecimal: string;
static SuffixTimeSpan: string;
static SuffixArray: string;
static Test: string;
static TryScope: string;
static Type: string;
static TypeId: string;
static Update: string;
static Version: string;
static XmlElementName: string;
static XmlElementAttributes: string;
static XmlElementChildren: string;
static XmlNamespace: string;
static FieldValuesMethodName: string;
static RequestTokenHeader: string;
static FormDigestHeader: string;
static useWebLanguageHeader: string;
static useWebLanguageHeaderValue: string;
static ClientTagHeader: string;
static TraceCorrelationIdRequestHeader: string;
static TraceCorrelationIdResponseHeader: string;
static greaterThan: string;
static lessThan: string;
static equal: string;
static notEqual: string;
static greaterThanOrEqual: string;
static lessThanOrEqual: string;
static andAlso: string;
static orElse: string;
static not: string;
static expressionParameter: string;
static expressionProperty: string;
static expressionStaticProperty: string;
static expressionMethod: string;
static expressionStaticMethod: string;
static expressionConstant: string;
static expressionConvert: string;
static expressionTypeIs: string;
static ofType: string;
static take: string;
static where: string;
static orderBy: string;
static orderByDescending: string;
static thenBy: string;
static thenByDescending: string;
static queryableObject: string;
static ServiceFileName: string;
static ServiceMethodName: string;
static fluidApplicationInitParamUrl: string;
static fluidApplicationInitParamViaUrl: string;
static fluidApplicationInitParamRequestToken: string;
static fluidApplicationInitParamFormDigestTimeoutSeconds: string;
static fluidApplicationInitParamFormDigest: string;
}
class ClientSchemaVersions {
static version14: string;
static version15: string;
static currentVersion: string;
}
class ClientErrorCodes {
static genericError: number;
static accessDenied: number;
static docAlreadyExists: number;
static versionConflict: number;
static listItemDeleted: number;
static invalidFieldValue: number;
static notSupported: number;
static redirect: number;
static notSupportedRequestVersion: number;
static fieldValueFailedValidation: number;
static itemValueFailedValidation: number;
}
class ClientAction {
get_id(): number;
get_path(): SP.ObjectPath;
get_name(): string;
}
class ClientActionSetProperty extends SP.ClientAction {
constructor(obj: SP.ClientObject, propName: string, propValue: any);
}
class ClientActionSetStaticProperty extends SP.ClientAction {
constructor(context: SP.ClientRuntimeContext, typeId: string, propName: string, propValue: any);
}
class ClientActionInvokeMethod extends SP.ClientAction {
constructor(obj: SP.ClientObject, methodName: string, parameters: any[]);
}
class ClientActionInvokeStaticMethod extends SP.ClientAction {
constructor(context: SP.ClientRuntimeContext, typeId: string, methodName: string, parameters: any[]);
}
class ClientObject {
constructor(context: SP.ClientRuntimeContext, objectPath: SP.ObjectPath);
get_context(): SP.ClientRuntimeContext;
get_path(): SP.ObjectPath;
get_objectVersion(): string;
set_objectVersion(value: string): void;
fromJson(initValue: any): void;
customFromJson(initValue: any): boolean;
refreshLoad(): void;
retrieve(propertyNames?: string[]): void;
isPropertyAvailable(propertyName: string): boolean;
isObjectPropertyInstantiated(propertyName: string): boolean;
get_serverObjectIsNull(): boolean;
get_typedObject(): SP.ClientObject;
initPropertiesFromJson(initValue: any): void;
checkUninitializedProperty(propName: string): void;
}
class ClientObjectData {
get_properties(): any;
get_clientObjectProperties(): any;
get_methodReturnObjects(): any;
constructor();
}
/** Provides a base class for a collection of objects on a remote client. */
class ClientObjectCollection extends SP.ClientObject implements IEnumerable {
constructor();
get_areItemsAvailable(): boolean;
/** Gets the data for all of the items in the collection. */
retrieveItems(): SP.ClientObjectPrototype;
/** Returns an enumerator that iterates through the collection. */
getEnumerator(): IEnumerator;
/** Returns number of items in the collection. */
get_count(): number;
get_data(): T[];
addChild(obj: T): void;
getItemAtIndex(index: number): T;
fromJson(obj: any): void;
}
class ClientObjectList extends SP.ClientObjectCollection {
constructor(context: SP.ClientRuntimeContext, objectPath: SP.ObjectPath, childItemType: any);
fromJson(initValue: any): void;
customFromJson(initValue: any): boolean;
}
class ClientObjectPrototype {
retrieve(propertyNames?: string[]): void;
retrieveObject(propertyName: string): SP.ClientObjectPrototype;
retrieveCollectionObject(propertyName: string): SP.ClientObjectCollectionPrototype;
}
class ClientObjectCollectionPrototype extends SP.ClientObjectPrototype {
retrieveItems(): SP.ClientObjectPrototype;
}
enum ClientRequestStatus {
active,
inProgress,
completedSuccess,
completedException,
}
class WebRequestEventArgs extends Sys.EventArgs {
constructor(webRequest: Sys.Net.WebRequest);
get_webRequest(): Sys.Net.WebRequest;
}
class ClientRequest {
static get_nextSequenceId(): number;
get_webRequest(): Sys.Net.WebRequest;
add_requestSucceeded(value: (sender: any, args: SP.ClientRequestSucceededEventArgs) => void): void;
remove_requestSucceeded(value: (sender: any, args: SP.ClientRequestSucceededEventArgs) => void): void;
add_requestFailed(value: (sender: any, args: SP.ClientRequestFailedEventArgs) => void): void;
remove_requestFailed(value: (sender: any, args: SP.ClientRequestFailedEventArgs) => void): void;
get_navigateWhenServerRedirect(): boolean;
set_navigateWhenServerRedirect(value: boolean): void;
}
class ClientRequestEventArgs extends Sys.EventArgs {
get_request(): SP.ClientRequest;
}
class ClientRequestFailedEventArgs extends SP.ClientRequestEventArgs {
constructor(
request: SP.ClientRequest,
message: string,
stackTrace: string,
errorCode: number,
errorValue: string,
errorTypeName: string,
errorDetails: any,
errorTraceCorrelationId?: string,
);
get_message(): string;
get_stackTrace(): string;
get_errorCode(): number;
get_errorValue(): string;
get_errorTypeName(): string;
get_errorDetails(): any;
get_errorTraceCorrelationId(): string;
}
class ClientRequestSucceededEventArgs extends SP.ClientRequestEventArgs {
}
class ClientRuntimeContext implements Sys.IDisposable {
constructor(serverRelativeUrlOrFullUrl: string);
get_url(): string;
get_viaUrl(): string;
set_viaUrl(value: string): void;
get_formDigestHandlingEnabled(): boolean;
set_formDigestHandlingEnabled(value: boolean): void;
get_applicationName(): string;
set_applicationName(value: string): void;
get_disableReturnValueCache(): boolean;
set_disableReturnValueCache(value: boolean): boolean;
get_clientTag(): string;
set_clientTag(value: string): void;
get_webRequestExecutorFactory(): SP.IWebRequestExecutorFactory;
set_webRequestExecutorFactory(value: SP.IWebRequestExecutorFactory): void;
get_pendingRequest(): SP.ClientRequest;
get_hasPendingRequest(): boolean;
add_executingWebRequest(value: (sender: any, args: SP.WebRequestEventArgs) => void): void;
remove_executingWebRequest(value: (sender: any, args: SP.WebRequestEventArgs) => void): void;
add_requestSucceeded(value: (sender: any, args: SP.ClientRequestSucceededEventArgs) => void): void;
remove_requestSucceeded(value: (sender: any, args: SP.ClientRequestSucceededEventArgs) => void): void;
add_requestFailed(value: (sender: any, args: SP.ClientRequestFailedEventArgs) => void): void;
remove_requestFailed(value: (sender: any, args: SP.ClientRequestFailedEventArgs) => void): void;
add_beginningRequest(value: (sender: any, args: SP.ClientRequestEventArgs) => void): void;
remove_beginningRequest(value: (sender: any, args: SP.ClientRequestEventArgs) => void): void;
get_requestTimeout(): number;
set_requestTimeout(value: number): void;
executeQueryAsync(
succeededCallback?: (sender: any, args: SP.ClientRequestSucceededEventArgs) => void,
failedCallback?: (sender: any, args: SP.ClientRequestFailedEventArgs) => void,
): void;
get_staticObjects(): any;
castTo(obj: SP.ClientObject, type: any): SP.ClientObject;
addQuery(query: SP.ClientAction): void;
addQueryIdAndResultObject(id: number, obj: any): void;
parseObjectFromJsonString(json: string, skipTypeFixup?: boolean): any;
load(clientObject: SP.ClientObject, ...exps: string[]): void;
loadQuery(clientObjectCollection: SP.ClientObjectCollection, exp?: string): any;
get_serverSchemaVersion(): string;
get_serverLibraryVersion(): string;
get_traceCorrelationId(): string;
set_traceCorrelationId(value: string): void;
dispose(): void;
}
class SimpleDataTable {
get_rows(): any[];
constructor();
}
class ClientValueObject {
fromJson(obj: any): void;
customFromJson(obj: any): boolean;
writeToXml(writer: SP.XmlWriter, serializationContext: SP.SerializationContext): void;
customWriteToXml(writer: SP.XmlWriter, serializationContext: SP.SerializationContext): boolean;
get_typeId(): string;
}
class ClientValueObjectCollection extends SP.ClientValueObject implements IEnumerable {
get_count(): number;
getEnumerator(): IEnumerator;
writeToXml(writer: SP.XmlWriter, serializationContext: SP.SerializationContext): void;
}
class ExceptionHandlingScope {
constructor(context: SP.ClientRuntimeContext);
startScope(): any;
startTry(): any;
startCatch(): any;
startFinally(): any;
get_processed(): boolean;
get_hasException(): boolean;
get_errorMessage(): string;
get_serverStackTrace(): string;
get_serverErrorCode(): number;
get_serverErrorValue(): string;
get_serverErrorTypeName(): string;
get_serverErrorDetails(): any;
}
class ObjectIdentityQuery extends SP.ClientAction {
constructor(objectPath: SP.ObjectPath);
}
class ObjectPath {
setPendingReplace(): void;
}
class ObjectPathProperty extends SP.ObjectPath {
constructor(context: SP.ClientRuntimeContext, parent: SP.ObjectPath, propertyName: string);
}
class ObjectPathStaticProperty extends SP.ObjectPath {
constructor(context: SP.ClientRuntimeContext, typeId: string, propertyName: string);
}
class ObjectPathMethod extends SP.ObjectPath {
constructor(context: SP.ClientRuntimeContext, parent: SP.ObjectPath, methodName: string, parameters: any[]);
}
class ObjectPathStaticMethod extends SP.ObjectPath {
constructor(context: SP.ClientRuntimeContext, typeId: string, methodName: string, parameters: any[]);
}
class ObjectPathConstructor extends SP.ObjectPath {
constructor(context: SP.ClientRuntimeContext, typeId: string, parameters: any[]);
}
class SerializationContext {
addClientObject(obj: SP.ClientObject): void;
addObjectPath(path: SP.ObjectPath): void;
}
class ResourceStrings {
argumentExceptionMessage: string;
argumentNullExceptionMessage: string;
cC_AppIconAlt: string;
cC_AppWebUrlNotSet: string;
cC_ArrowImageAlt: string;
cC_BackToSite: string;
cC_ErrorGettingThemeInfo: string;
cC_HelpLinkToolTip: string;
cC_HostSiteUrlNotSet: string;
cC_InvalidArgument: string;
cC_InvalidJSON: string;
cC_InvalidOperation: string;
cC_PlaceHolderElementNotFound: string;
cC_RequiredScriptNotLoaded: string;
cC_SendFeedback: string;
cC_SettingsLinkToolTip: string;
cC_TimeoutGettingThemeInfo: string;
cC_Welcome: string;
cannotFindContextWebServerRelativeUrl: string;
collectionHasNotBeenInitialized: string;
collectionModified: string;
invalidUsageOfConditionalScope: string;
invalidUsageOfConditionalScopeNowAllowedAction: string;
invalidUsageOfExceptionHandlingScope: string;
namedPropertyHasNotBeenInitialized: string;
namedServerObjectIsNull: string;
noObjectPathAssociatedWithObject: string;
notSameClientContext: string;
notSupportedQueryExpressionWithExpressionDetail: string;
objectNameIdentity: string;
objectNameMethod: string;
objectNameProperty: string;
objectNameType: string;
propertyHasNotBeenInitialized: string;
rE_BrowserBinaryDataNotSupported: string;
rE_BrowserNotSupported: string;
rE_CannotAccessSite: string;
rE_CannotAccessSiteCancelled: string;
rE_CannotAccessSiteOpenWindowFailed: string;
rE_DismissOpenWindowMessageLinkText: string;
rE_DomainDoesNotMatch: string;
rE_FixitHelpMessage: string;
rE_InvalidArgumentOrField: string;
rE_InvalidOperation: string;
rE_NoTrustedOrigins: string;
rE_OpenWindowButtonText: string;
rE_OpenWindowMessage: string;
rE_RequestAbortedOrTimedout: string;
rE_RequestUnexpectedResponse: string;
rE_RequestUnexpectedResponseWithContentTypeAndStatus: string;
requestAbortedOrTimedOut: string;
requestEmptyQueryName: string;
requestHasBeenExecuted: string;
requestUnexpectedResponse: string;
requestUnexpectedResponseWithContentTypeAndStatus: string;
requestUnexpectedResponseWithStatus: string;
requestUnknownResponse: string;
serverObjectIsNull: string;
unknownError: string;
unknownResponseData: string;
}
class RuntimeRes {
cC_PlaceHolderElementNotFound: string;
rE_CannotAccessSiteOpenWindowFailed: string;
noObjectPathAssociatedWithObject: string;
cC_TimeoutGettingThemeInfo: string;
unknownResponseData: string;
requestUnexpectedResponseWithStatus: string;
objectNameProperty: string;
requestUnknownResponse: string;
rE_RequestUnexpectedResponseWithContentTypeAndStatus: string;
rE_BrowserNotSupported: string;
argumentExceptionMessage: string;
namedServerObjectIsNull: string;
objectNameType: string;
requestUnexpectedResponseWithContentTypeAndStatus: string;
cC_InvalidJSON: string;
invalidUsageOfExceptionHandlingScope: string;
serverObjectIsNull: string;
cC_AppWebUrlNotSet: string;
rE_OpenWindowMessage: string;
argumentNullExceptionMessage: string;
cC_HelpLinkToolTip: string;
propertyHasNotBeenInitialized: string;
rE_RequestAbortedOrTimedout: string;
invalidUsageOfConditionalScope: string;
cC_ErrorGettingThemeInfo: string;
rE_DismissOpenWindowMessageLinkText: string;
rE_CannotAccessSiteCancelled: string;
objectNameIdentity: string;
cC_HostSiteUrlNotSet: string;
rE_FixitHelpMessage: string;
notSupportedQueryExpressionWithExpressionDetail: string;
rE_RequestUnexpectedResponse: string;
rE_DomainDoesNotMatch: string;
cC_BackToSite: string;
rE_NoTrustedOrigins: string;
rE_InvalidOperation: string;
collectionModified: string;
cC_Welcome: string;
cC_AppIconAlt: string;
cC_SendFeedback: string;
cC_ArrowImageAlt: string;
cC_InvalidOperation: string;
requestAbortedOrTimedOut: string;
invalidUsageOfConditionalScopeNowAllowedAction: string;
cannotFindContextWebServerRelativeUrl: string;
rE_OpenWindowButtonText: string;
unknownError: string;
cC_InvalidArgument: string;
rE_InvalidArgumentOrField: string;
cC_SettingsLinkToolTip: string;
requestEmptyQueryName: string;
cC_RequiredScriptNotLoaded: string;
rE_CannotAccessSite: string;
notSameClientContext: string;
requestUnexpectedResponse: string;
rE_BrowserBinaryDataNotSupported: string;
collectionHasNotBeenInitialized: string;
namedPropertyHasNotBeenInitialized: string;
requestHasBeenExecuted: string;
objectNameMethod: string;
}
class ParseJSONUtil {
static parseObjectFromJsonString(json: string): any;
static validateJson(text: string): boolean;
}
enum DateTimeKind {
unspecified,
utc,
local,
}
class OfficeVersion {
majorBuildVersion: number;
previousMajorBuildVersion: number;
majorVersion: string;
previousVersion: string;
majorVersionDotZero: string;
previousVersionDotZero: string;
assemblyVersion: string;
wssMajorVersion: string;
}
class ClientContext extends SP.ClientRuntimeContext {
constructor(serverRelativeUrlOrFullUrl?: string);
get_web(): SP.Web;
get_site(): SP.Site;
get_serverVersion(): string;
static get_current(): SP.ClientContext;
}
enum ULSTraceLevel {
verbose,
}
/** Provides a Unified Logging Service (ULS) that monitors log messages. */
class ULS {
/** Gets a value that indicates whether the Unified Logging Service (ULS) is enabled. */
static get_enabled(): boolean;
/** Sets a value that indicates whether the Unified Logging Service (ULS) is enabled. */
static set_enabled(value: boolean): void;
/** Logs the specified debug message.
This method logs the message with a time stamp. If any log messages are pending, this method also logs them. If the message cannot be logged, the message is added to the list of pending log messages. */
static log(debugMessage: string): void;
/** Increases the indentation for subsequent log messages. */
static increaseIndent(): void;
/** Decreases the indentation for subsequent log messages. */
static decreaseIndent(): void;
/** Traces when the function was entered. */
static traceApiEnter(functionName: string, args?: any[]): void;
/** Traces when the function has finished. */
static traceApiLeave(): void;
}
class AccessRequests {
static changeRequestStatus(
context: SP.ClientRuntimeContext,
itemId: number,
newStatus: number,
convStr: string,
permType: string,
permissionLevel: number,
): void;
static changeRequestStatusBulk(context: SP.ClientRuntimeContext, requestIds: number[], newStatus: number): void;
}
enum AddFieldOptions {
defaultValue,
addToDefaultContentType,
addToNoContentType,
addToAllContentTypes,
addFieldInternalNameHint,
addFieldToDefaultView,
addFieldCheckDisplayName,
}
class AlternateUrl extends SP.ClientObject {
get_uri(): string;
get_urlZone(): SP.UrlZone;
}
class App extends SP.ClientObject {
get_assetId(): string;
get_contentMarket(): string;
get_versionString(): string;
}
class AppCatalog {
static getAppInstances(context: SP.ClientRuntimeContext, web: SP.Web): SP.ClientObjectList;
static getDeveloperSiteAppInstancesByIds(
context: SP.ClientRuntimeContext,
site: SP.Site,
appInstanceIds: SP.Guid[],
): SP.ClientObjectList;
static isAppSideloadingEnabled(context: SP.ClientRuntimeContext): SP.BooleanResult;
}
class AppContextSite extends SP.ClientObject {
constructor(context: SP.ClientRuntimeContext, siteUrl: string);
get_site(): SP.Site;
get_web(): SP.Web;
static newObject(context: SP.ClientRuntimeContext, siteUrl: string): SP.AppContextSite;
}
class AppInstance extends SP.ClientObject {
get_appPrincipalId(): string;
get_appWebFullUrl(): string;
get_id(): SP.Guid;
get_inError(): boolean;
get_startPage(): string;
get_remoteAppUrl(): string;
get_settingsPageUrl(): string;
get_siteId(): SP.Guid;
get_status(): SP.AppInstanceStatus;
get_title(): string;
get_webId(): SP.Guid;
getErrorDetails(): SP.ClientObjectList;
uninstall(): SP.GuidResult;
upgrade(appPackageStream: SP.Base64EncodedByteArray): void;
cancelAllJobs(): SP.BooleanResult;
install(): SP.GuidResult;
getPreviousAppVersion(): SP.App;
retryAllJobs(): void;
}
class AppInstanceErrorDetails extends SP.ClientObject {
get_correlationId(): SP.Guid;
set_correlationId(value: SP.Guid): void;
get_errorDetail(): string;
get_errorType(): SP.AppInstanceErrorType;
set_errorType(value: SP.AppInstanceErrorType): void;
get_errorTypeName(): string;
get_exceptionMessage(): string;
get_source(): SP.AppInstanceErrorSource;
set_source(value: SP.AppInstanceErrorSource): void;
get_sourceName(): string;
}
enum AppInstanceErrorSource {
common,
appWeb,
parentWeb,
remoteWebSite,
database,
officeExtension,
eventCallouts,
finalization,
}
enum AppInstanceErrorType {
transient,
configuration,
app,
}
enum AppInstanceStatus {
invalidStatus,
installing,
canceling,
uninstalling,
installed,
upgrading,
initialized,
upgradeCanceling,
disabling,
disabled,
}
class AppLicense extends SP.ClientValueObject {
get_rawXMLLicenseToken(): string;
get_typeId(): string;
writeToXml(writer: SP.XmlWriter, serializationContext: SP.SerializationContext): void;
constructor();
}
class AppLicenseCollection extends SP.ClientValueObjectCollection {
add(item: SP.AppLicense): void;
get_item(index: number): SP.AppLicense;
get_typeId(): string;
writeToXml(writer: SP.XmlWriter, serializationContext: SP.SerializationContext): void;
constructor();
}
enum AppLicenseType {
perpetualMultiUser,
perpetualAllUsers,
trialMultiUser,
trialAllUsers,
}
class Attachment extends SP.ClientObject {
get_fileName(): string;
get_serverRelativeUrl(): string;
deleteObject(): void;
}
interface AttachmentCollection extends SP.ClientObjectCollection {
itemAt(index: number): SP.Attachment;
get_item(index: number): SP.Attachment;
getByFileName(fileName: string): SP.Attachment;
}
class AttachmentCreationInformation extends SP.ClientValueObject {
get_contentStream(): SP.Base64EncodedByteArray;
set_contentStream(value: SP.Base64EncodedByteArray): void;
get_fileName(): string;
set_fileName(value: string): void;
get_typeId(): string;
writeToXml(writer: SP.XmlWriter, serializationContext: SP.SerializationContext): void;
constructor();
}
class BasePermissions extends SP.ClientValueObject {
set(perm: SP.PermissionKind): void;
clear(perm: SP.PermissionKind): void;
clearAll(): void;
has(perm: SP.PermissionKind): boolean;
equals(perm: SP.BasePermissions): boolean;
hasPermissions(high: number, low: number): boolean;
get_typeId(): string;
writeToXml(writer: SP.XmlWriter, serializationContext: SP.SerializationContext): void;
constructor();
}
/** Specifies the base type for a list. */
enum BaseType {
none,
genericList,
documentLibrary,
unused,
discussionBoard,
survey,
issue,
}
enum BrowserFileHandling {
permissive,
strict,
}
enum CalendarType {
none,
gregorian,
japan,
taiwan,
korea,
hijri,
thai,
hebrew,
gregorianMEFrench,
gregorianArabic,
gregorianXLITEnglish,
gregorianXLITFrench,
koreaJapanLunar,
chineseLunar,
sakaEra,
umAlQura,
}
/** Specifies a Collaborative Application Markup Language (CAML) query on a list. */
class CamlQuery extends SP.ClientValueObject {
constructor();
/** This method creates a Collaborative Application Markup Language (CAML) string
that can be used to recursively get all of the items in a list, including
the items in the subfolders. */
static createAllItemsQuery(): SP.CamlQuery;
/** This method creates a Collaborative Application Markup Language (CAML) string
that can be used to recursively get all of the folders in a list, including
the subfolders. */
static createAllFoldersQuery(): SP.CamlQuery;
/** Returns true if the query returns dates in Coordinated Universal Time (UTC) format. */
get_datesInUtc(): boolean;
/** Sets a value that indicates whether the query returns dates in Coordinated Universal Time (UTC) format. */
set_datesInUtc(value: boolean): void;
/** Server relative URL of a list folder from which results will be returned. */
get_folderServerRelativeUrl(): string;
/** Sets a value that specifies the server relative URL of a list folder from which results will be returned. */
set_folderServerRelativeUrl(value: string): void;
get_listItemCollectionPosition(): SP.ListItemCollectionPosition;
/** Sets a value that specifies the information required to get the next page of data for the list view. */
set_listItemCollectionPosition(value: SP.ListItemCollectionPosition): void;
/** Gets value that specifies the XML schema that defines the list view. */
get_viewXml(): string;
/** Sets value that specifies the XML schema that defines the list view. It must be null, empty, or an XML fragment that conforms to the ViewDefinition type. */
set_viewXml(value: string): void;
/** This member is reserved for internal use and is not intended to be used directly from your code. */
get_typeId(): string;
writeToXml(writer: SP.XmlWriter, serializationContext: SP.SerializationContext): void;
}
class Change extends SP.ClientObject {
get_changeToken(): SP.ChangeToken;
get_changeType(): SP.ChangeType;
get_siteId(): SP.Guid;
get_time(): Date;
}
class ChangeAlert extends SP.Change {
get_alertId(): SP.Guid;
get_webId(): SP.Guid;
}
interface ChangeCollection extends SP.ClientObjectCollection {
itemAt(index: number): SP.Change;
get_item(index: number): SP.Change;
}
class ChangeContentType extends SP.Change {
get_contentTypeId(): SP.ContentTypeId;
get_webId(): SP.Guid;
}
class ChangeField extends SP.Change {
get_fieldId(): SP.Guid;
get_webId(): SP.Guid;
}
class ChangeFile extends SP.Change {
get_uniqueId(): SP.Guid;
get_webId(): SP.Guid;
}
class ChangeFolder extends SP.Change {
get_uniqueId(): SP.Guid;
get_webId(): SP.Guid;
}
class ChangeGroup extends SP.Change {
get_groupId(): number;
}
class ChangeItem extends SP.Change {
get_itemId(): number;
get_listId(): SP.Guid;
get_webId(): SP.Guid;
}
class ChangeList extends SP.Change {
get_listId(): SP.Guid;
get_webId(): SP.Guid;
}
class ChangeLogItemQuery extends SP.ClientValueObject {
get_changeToken(): string;
set_changeToken(value: string): void;
get_contains(): string;
set_contains(value: string): void;
get_query(): string;
set_query(value: string): void;
get_queryOptions(): string;
set_queryOptions(value: string): void;
get_rowLimit(): string;
set_rowLimit(value: string): void;
get_viewFields(): string;
set_viewFields(value: string): void;
get_viewName(): string;
set_viewName(value: string): void;
get_typeId(): string;
writeToXml(writer: SP.XmlWriter, serializationContext: SP.SerializationContext): void;
constructor();
}
class ChangeQuery extends SP.ClientValueObject {
constructor();
constructor(allChangeObjectTypes: boolean, allChangeTypes: boolean);
get_add(): boolean;
set_add(value: boolean): void;
get_alert(): boolean;
set_alert(value: boolean): void;
get_changeTokenEnd(): SP.ChangeToken;
set_changeTokenEnd(value: SP.ChangeToken): void;
get_changeTokenStart(): SP.ChangeToken;
set_changeTokenStart(value: SP.ChangeToken): void;
get_contentType(): boolean;
set_contentType(value: boolean): void;
get_deleteObject(): boolean;
set_deleteObject(value: boolean): void;
get_field(): boolean;
set_field(value: boolean): void;
get_file(): boolean;
set_file(value: boolean): void;
get_folder(): boolean;
set_folder(value: boolean): void;
get_group(): boolean;
set_group(value: boolean): void;
get_groupMembershipAdd(): boolean;
set_groupMembershipAdd(value: boolean): void;
get_groupMembershipDelete(): boolean;
set_groupMembershipDelete(value: boolean): void;
get_item(): boolean;
set_item(value: boolean): void;
get_list(): boolean;
set_list(value: boolean): void;
get_move(): boolean;
set_move(value: boolean): void;
get_navigation(): boolean;
set_navigation(value: boolean): void;
get_rename(): boolean;
set_rename(value: boolean): void;
get_restore(): boolean;
set_restore(value: boolean): void;
get_roleAssignmentAdd(): boolean;
set_roleAssignmentAdd(value: boolean): void;
get_roleAssignmentDelete(): boolean;
set_roleAssignmentDelete(value: boolean): void;
get_roleDefinitionAdd(): boolean;
set_roleDefinitionAdd(value: boolean): void;
get_roleDefinitionDelete(): boolean;
set_roleDefinitionDelete(value: boolean): void;
get_roleDefinitionUpdate(): boolean;
set_roleDefinitionUpdate(value: boolean): void;
get_securityPolicy(): boolean;
set_securityPolicy(value: boolean): void;
get_site(): boolean;
set_site(value: boolean): void;
get_systemUpdate(): boolean;
set_systemUpdate(value: boolean): void;
get_update(): boolean;
set_update(value: boolean): void;
get_user(): boolean;
set_user(value: boolean): void;
get_view(): boolean;
set_view(value: boolean): void;
get_web(): boolean;
set_web(value: boolean): void;
get_typeId(): string;
writeToXml(writer: SP.XmlWriter, serializationContext: SP.SerializationContext): void;
}
class ChangeSite extends SP.Change {
}
class ChangeToken extends SP.ClientValueObject {
get_stringValue(): string;
set_stringValue(value: string): void;
get_typeId(): string;
writeToXml(writer: SP.XmlWriter, serializationContext: SP.SerializationContext): void;
constructor();
}
enum ChangeType {
noChange,
add,
update,
deleteObject,
rename,
moveAway,
moveInto,
restore,
roleAdd,
roleDelete,
roleUpdate,
assignmentAdd,
assignmentDelete,
memberAdd,
memberDelete,
systemUpdate,
navigation,
scopeAdd,
scopeDelete,
listContentTypeAdd,
listContentTypeDelete,
}
class ChangeUser extends SP.Change {
get_activate(): boolean;
get_userId(): number;
}
class ChangeView extends SP.Change {
get_viewId(): SP.Guid;
get_listId(): SP.Guid;
get_webId(): SP.Guid;
}
class ChangeWeb extends SP.Change {
get_webId(): SP.Guid;
}
enum CheckinType {
minorCheckIn,
majorCheckIn,
overwriteCheckIn,
}
enum CheckOutType {
online,
offline,
none,
}
enum ChoiceFormatType {
dropdown,
radioButtons,
}
class CompatibilityRange extends SP.ClientObject {
}
class ContentType extends SP.ClientObject {
get_description(): string;
set_description(value: string): void;
get_displayFormTemplateName(): string;
set_displayFormTemplateName(value: string): void;
get_displayFormUrl(): string;
set_displayFormUrl(value: string): void;
get_documentTemplate(): string;
set_documentTemplate(value: string): void;
get_documentTemplateUrl(): string;
get_editFormTemplateName(): string;
set_editFormTemplateName(value: string): void;
get_editFormUrl(): string;
set_editFormUrl(value: string): void;
get_fieldLinks(): SP.FieldLinkCollection;
get_fields(): SP.FieldCollection;
get_group(): string;
set_group(value: string): void;
get_hidden(): boolean;
set_hidden(value: boolean): void;
get_id(): SP.ContentTypeId;
get_jsLink(): string;
set_jsLink(value: string): void;
get_name(): string;
set_name(value: string): void;
get_newFormTemplateName(): string;
set_newFormTemplateName(value: string): void;
get_newFormUrl(): string;
set_newFormUrl(value: string): void;
get_parent(): SP.ContentType;
get_readOnly(): boolean;
set_readOnly(value: boolean): void;
get_schemaXml(): string;
get_schemaXmlWithResourceTokens(): string;
set_schemaXmlWithResourceTokens(value: string): void;
get_scope(): string;
get_sealed(): boolean;
set_sealed(value: boolean): void;
get_stringId(): string;
get_workflowAssociations(): SP.Workflow.WorkflowAssociationCollection;
update(updateChildren: boolean): void;
deleteObject(): void;
}
interface ContentTypeCollection extends SP.ClientObjectCollection {
itemAt(index: number): SP.ContentType;
get_item(index: number): SP.ContentType;
getById(contentTypeId: string): SP.ContentType;
addExistingContentType(contentType: SP.ContentType): SP.ContentType;
add(parameters: SP.ContentTypeCreationInformation): SP.ContentType;
}
class ContentTypeCreationInformation extends SP.ClientValueObject {
get_description(): string;
set_description(value: string): void;
get_group(): string;
set_group(value: string): void;
get_name(): string;
set_name(value: string): void;
get_parentContentType(): SP.ContentType;
set_parentContentType(value: SP.ContentType): void;
get_typeId(): string;
writeToXml(writer: SP.XmlWriter, serializationContext: SP.SerializationContext): void;
constructor();
}
class ContentTypeId extends SP.ClientValueObject {
toString(): string;
get_stringValue(): string;
get_typeId(): string;
writeToXml(writer: SP.XmlWriter, serializationContext: SP.SerializationContext): void;
constructor();
}
enum CustomizedPageStatus {
none,
uncustomized,
customized,
}
enum DateTimeFieldFormatType {
dateOnly,
dateTime,
}
enum DateTimeFieldFriendlyFormatType {
unspecified,
disabled,
relative,
}
enum DraftVisibilityType {
reader,
author,
approver,
}
class EventReceiverDefinition extends SP.ClientObject {
get_receiverAssembly(): string;
get_receiverClass(): string;
get_receiverId(): SP.Guid;
get_receiverName(): string;
get_sequenceNumber(): number;
get_synchronization(): SP.EventReceiverSynchronization;
get_eventType(): SP.EventReceiverType;
get_receiverUrl(): string;
update(): void;
deleteObject(): void;
}
interface EventReceiverDefinitionCollection extends SP.ClientObjectCollection {
itemAt(index: number): SP.EventReceiverDefinition;
get_item(index: number): SP.EventReceiverDefinition;
getById(eventReceiverId: SP.Guid): SP.EventReceiverDefinition;
add(
eventReceiverCreationInformation: SP.EventReceiverDefinitionCreationInformation,
): SP.EventReceiverDefinition;
}
class EventReceiverDefinitionCreationInformation extends SP.ClientValueObject {
get_receiverAssembly(): string;
set_receiverAssembly(value: string): void;
get_receiverClass(): string;
set_receiverClass(value: string): void;
get_receiverName(): string;
set_receiverName(value: string): void;
get_sequenceNumber(): number;
set_sequenceNumber(value: number): void;
get_synchronization(): SP.EventReceiverSynchronization;
set_synchronization(value: SP.EventReceiverSynchronization): void;
get_eventType(): SP.EventReceiverType;
set_eventType(value: SP.EventReceiverType): void;
get_receiverUrl(): string;
set_receiverUrl(value: string): void;
get_typeId(): string;
writeToXml(writer: SP.XmlWriter, serializationContext: SP.SerializationContext): void;
constructor();
}
enum EventReceiverSynchronization {
defaultSynchronization,
synchronous,
asynchronous,
}
enum EventReceiverType {
invalidReceiver,
itemAdding,
itemUpdating,
itemDeleting,
itemCheckingIn,
itemCheckingOut,
itemUncheckingOut,
itemAttachmentAdding,
itemAttachmentDeleting,
itemFileMoving,
itemVersionDeleting,
fieldAdding,
fieldUpdating,
fieldDeleting,
listAdding,
listDeleting,
siteDeleting,
webDeleting,
webMoving,
webAdding,
groupAdding,
groupUpdating,
groupDeleting,
groupUserAdding,
groupUserDeleting,
roleDefinitionAdding,
roleDefinitionUpdating,
roleDefinitionDeleting,
roleAssignmentAdding,
roleAssignmentDeleting,
inheritanceBreaking,
inheritanceResetting,
workflowStarting,
itemAdded,
itemUpdated,
itemDeleted,
itemCheckedIn,
itemCheckedOut,
itemUncheckedOut,
itemAttachmentAdded,
itemAttachmentDeleted,
itemFileMoved,
itemFileConverted,
itemVersionDeleted,
fieldAdded,
fieldUpdated,
fieldDeleted,
listAdded,
listDeleted,
siteDeleted,
webDeleted,
webMoved,
webProvisioned,
groupAdded,
groupUpdated,
groupDeleted,
groupUserAdded,
groupUserDeleted,
roleDefinitionAdded,
roleDefinitionUpdated,
roleDefinitionDeleted,
roleAssignmentAdded,
roleAssignmentDeleted,
inheritanceBroken,
inheritanceReset,
workflowStarted,
workflowPostponed,
workflowCompleted,
entityInstanceAdded,
entityInstanceUpdated,
entityInstanceDeleted,
appInstalled,
appUpgraded,
appUninstalling,
emailReceived,
contextEvent,
}
class Feature extends SP.ClientObject {
get_definitionId(): SP.Guid;
}
interface FeatureCollection extends SP.ClientObjectCollection {
itemAt(index: number): SP.Feature;
get_item(index: number): SP.Feature;
getById(featureId: SP.Guid): SP.Feature;
add(featureId: SP.Guid, force: boolean, featdefScope: SP.FeatureDefinitionScope): SP.Feature;
remove(featureId: SP.Guid, force: boolean): void;
}
enum FeatureDefinitionScope {
none,
farm,
site,
web,
}
class Field extends SP.ClientObject {
get_canBeDeleted(): boolean;
get_defaultValue(): string;
set_defaultValue(value: string): void;
get_description(): string;
set_description(value: string): void;
get_direction(): string;
set_direction(value: string): void;
get_enforceUniqueValues(): boolean;
set_enforceUniqueValues(value: boolean): void;
get_entityPropertyName(): string;
get_filterable(): boolean;
get_fromBaseType(): boolean;
get_group(): string;
set_group(value: string): void;
get_hidden(): boolean;
set_hidden(value: boolean): void;
get_id(): SP.Guid;
get_indexed(): boolean;
set_indexed(value: boolean): void;
get_internalName(): string;
get_jsLink(): string;
set_jsLink(value: string): void;
get_readOnlyField(): boolean;
set_readOnlyField(value: boolean): void;
get_required(): boolean;
set_required(value: boolean): void;
get_schemaXml(): string;
set_schemaXml(value: string): void;
get_schemaXmlWithResourceTokens(): string;
get_scope(): string;
get_sealed(): boolean;
get_sortable(): boolean;
get_staticName(): string;
set_staticName(value: string): void;
get_title(): string;
set_title(value: string): void;
get_fieldTypeKind(): SP.FieldType;
set_fieldTypeKind(value: SP.FieldType): void;
get_typeAsString(): string;
set_typeAsString(value: string): void;
get_typeDisplayName(): string;
get_typeShortDescription(): string;
get_validationFormula(): string;
set_validationFormula(value: string): void;
get_validationMessage(): string;
set_validationMessage(value: string): void;
validateSetValue(item: SP.ListItem, value: string): void;
updateAndPushChanges(pushChangesToLists: boolean): void;
update(): void;
deleteObject(): void;
setShowInDisplayForm(value: boolean): void;
setShowInEditForm(value: boolean): void;
setShowInNewForm(value: boolean): void;
}
class FieldCalculated extends SP.Field {
get_dateFormat(): SP.DateTimeFieldFormatType;
set_dateFormat(value: SP.DateTimeFieldFormatType): void;
get_formula(): string;
set_formula(value: string): void;
get_outputType(): SP.FieldType;
set_outputType(value: SP.FieldType): void;
}
class FieldCalculatedErrorValue extends SP.ClientValueObject {
get_errorMessage(): string;
get_typeId(): string;
writeToXml(writer: SP.XmlWriter, serializationContext: SP.SerializationContext): void;
constructor();
}
class FieldMultiChoice extends SP.Field {
get_fillInChoice(): boolean;
set_fillInChoice(value: boolean): void;
get_mappings(): string;
get_choices(): string[];
set_choices(value: string[]): void;
}
class FieldChoice extends SP.FieldMultiChoice {
get_editFormat(): SP.ChoiceFormatType;
set_editFormat(value: SP.ChoiceFormatType): void;
}
interface FieldCollection extends SP.ClientObjectCollection {
itemAt(index: number): SP.Field;
get_item(index: number): SP.Field;
get_schemaXml(): string;
getByTitle(title: string): SP.Field;
getById(id: SP.Guid): SP.Field;
add(field: SP.Field): SP.Field;
addDependentLookup(displayName: string, primaryLookupField: SP.Field, lookupField: string): SP.Field;
addFieldAsXml(schemaXml: string, addToDefaultView: boolean, options: SP.AddFieldOptions): SP.Field;
getByInternalNameOrTitle(strName: string): SP.Field;
}
class FieldComputed extends SP.Field {
get_enableLookup(): boolean;
set_enableLookup(value: boolean): void;
}
class FieldNumber extends SP.Field {
get_maximumValue(): number;
set_maximumValue(value: number): void;
get_minimumValue(): number;
set_minimumValue(value: number): void;
}
class FieldCurrency extends SP.FieldNumber {
get_currencyLocaleId(): number;
set_currencyLocaleId(value: number): void;
}
class FieldDateTime extends SP.Field {
get_dateTimeCalendarType(): SP.CalendarType;
set_dateTimeCalendarType(value: SP.CalendarType): void;
get_displayFormat(): SP.DateTimeFieldFormatType;
set_displayFormat(value: SP.DateTimeFieldFormatType): void;
get_friendlyDisplayFormat(): SP.DateTimeFieldFriendlyFormatType;
set_friendlyDisplayFormat(value: SP.DateTimeFieldFriendlyFormatType): void;
}
class FieldGeolocation extends SP.Field {
}
class FieldGeolocationValue extends SP.ClientValueObject {
get_altitude(): number;
set_altitude(value: number): void;
get_latitude(): number;
set_latitude(value: number): void;
get_longitude(): number;
set_longitude(value: number): void;
get_measure(): number;
set_measure(value: number): void;
get_typeId(): string;
writeToXml(writer: SP.XmlWriter, serializationContext: SP.SerializationContext): void;
constructor();
}
class FieldGuid extends SP.Field {
}
class FieldLink extends SP.ClientObject {
get_hidden(): boolean;
set_hidden(value: boolean): void;
get_id(): SP.Guid;
get_name(): string;
get_required(): boolean;
set_required(value: boolean): void;
deleteObject(): void;
}
interface FieldLinkCollection extends SP.ClientObjectCollection {
itemAt(index: number): SP.FieldLink;
get_item(index: number): SP.FieldLink;
getById(id: SP.Guid): SP.FieldLink;
add(parameters: SP.FieldLinkCreationInformation): SP.FieldLink;
reorder(internalNames: string[]): void;
}
class FieldLinkCreationInformation extends SP.ClientValueObject {
get_field(): SP.Field;
set_field(value: SP.Field): void;
get_typeId(): string;
writeToXml(writer: SP.XmlWriter, serializationContext: SP.SerializationContext): void;
constructor();
}
class FieldLookup extends SP.Field {
get_allowMultipleValues(): boolean;
set_allowMultipleValues(value: boolean): void;
get_isRelationship(): boolean;
set_isRelationship(value: boolean): void;
get_lookupField(): string;
set_lookupField(value: string): void;
get_lookupList(): string;
set_lookupList(value: string): void;
get_lookupWebId(): SP.Guid;
set_lookupWebId(value: SP.Guid): void;
get_primaryFieldId(): string;
set_primaryFieldId(value: string): void;
get_relationshipDeleteBehavior(): SP.RelationshipDeleteBehaviorType;
set_relationshipDeleteBehavior(value: SP.RelationshipDeleteBehaviorType): void;
}
class FieldLookupValue extends SP.ClientValueObject {
get_lookupId(): number;
set_lookupId(value: number): void;
get_lookupValue(): string;
get_typeId(): string;
writeToXml(writer: SP.XmlWriter, serializationContext: SP.SerializationContext): void;
constructor();
}
class FieldMultiLineText extends SP.Field {
get_allowHyperlink(): boolean;
set_allowHyperlink(value: boolean): void;
get_appendOnly(): boolean;
set_appendOnly(value: boolean): void;
get_numberOfLines(): number;
set_numberOfLines(value: number): void;
get_restrictedMode(): boolean;
set_restrictedMode(value: boolean): void;
get_richText(): boolean;
set_richText(value: boolean): void;
get_wikiLinking(): boolean;
}
class FieldRatingScale extends SP.FieldMultiChoice {
get_gridEndNumber(): number;
set_gridEndNumber(value: number): void;
get_gridNAOptionText(): string;
set_gridNAOptionText(value: string): void;
get_gridStartNumber(): number;
set_gridStartNumber(value: number): void;
get_gridTextRangeAverage(): string;
set_gridTextRangeAverage(value: string): void;
get_gridTextRangeHigh(): string;
set_gridTextRangeHigh(value: string): void;
get_gridTextRangeLow(): string;
set_gridTextRangeLow(value: string): void;
get_rangeCount(): number;
}
class FieldRatingScaleQuestionAnswer extends SP.ClientValueObject {
get_answer(): number;
set_answer(value: number): void;
get_question(): string;
set_question(value: string): void;
get_typeId(): string;
writeToXml(writer: SP.XmlWriter, serializationContext: SP.SerializationContext): void;
constructor();
}
class FieldStringValues extends SP.ClientObject {
get_fieldValues(): any;
get_item(fieldName: string): string;
refreshLoad(): void;
}
class FieldText extends SP.Field {
get_maxLength(): number;
set_maxLength(value: number): void;
}
enum FieldType {
invalid,
integer,
text,
note,
dateTime,
counter,
choice,
lookup,
boolean,
number,
currency,
URL,
computed,
threading,
guid,
multiChoice,
gridChoice,
calculated,
file,
attachments,
user,
recurrence,
crossProjectLink,
modStat,
error,
contentTypeId,
pageSeparator,
threadIndex,
workflowStatus,
allDayEvent,
workflowEventType,
geolocation,
outcomeChoice,
maxItems,
}
class FieldUrl extends SP.Field {
get_displayFormat(): SP.UrlFieldFormatType;
set_displayFormat(value: SP.UrlFieldFormatType): void;
}
class FieldUrlValue extends SP.ClientValueObject {
get_description(): string;
set_description(value: string): void;
get_url(): string;
set_url(value: string): void;
get_typeId(): string;
writeToXml(writer: SP.XmlWriter, serializationContext: SP.SerializationContext): void;
constructor();
}
class FieldUser extends SP.FieldLookup {
get_allowDisplay(): boolean;
set_allowDisplay(value: boolean): void;
get_presence(): boolean;
set_presence(value: boolean): void;
get_selectionGroup(): number;
set_selectionGroup(value: number): void;
get_selectionMode(): SP.FieldUserSelectionMode;
set_selectionMode(value: SP.FieldUserSelectionMode): void;
}
enum FieldUserSelectionMode {
peopleOnly,
peopleAndGroups,
}
class FieldUserValue extends SP.FieldLookupValue {
static fromUser(userName: string): SP.FieldUserValue;
get_typeId(): string;
writeToXml(writer: SP.XmlWriter, serializationContext: SP.SerializationContext): void;
constructor();
}
/** Represents a file in a SharePoint Web site that can be a Web Part Page, an item in a document library, or a file in a folder. */
class File extends SP.ClientObject {
get_author(): SP.User;
/** Returns the user who has checked out the file. */
get_checkedOutByUser(): SP.User;
/** Returns the comment that was specified when the document was checked into the document library. */
get_checkInComment(): string;
/** The type of checkout that exists on the document. */
get_checkOutType(): SP.CheckOutType;
get_contentTag(): string;
/** Gets the customization(ghost) status of the SPFile. */
get_customizedPageStatus(): SP.CustomizedPageStatus;
/** Gets the ETag of the file */
get_eTag(): string;
/** Specifies whether the file exists */
get_exists(): boolean;
get_length(): number;
get_level(): SP.FileLevel;
/** Specifies the SPListItem corresponding to this file if this file belongs to a doclib. Values for all fields are returned also. */
get_listItemAllFields(): SP.ListItem;
/** Returns the user that owns the current lock on the file. MUST return null if there is no lock. */
get_lockedByUser(): SP.User;
/** Specifies the major version of the file. */
get_majorVersion(): number;
/** Specifies the minor version of the file. */
get_minorVersion(): number;
get_modifiedBy(): SP.User;
get_name(): string;
get_serverRelativeUrl(): string;
/** Specifies when the file was created. */
get_timeCreated(): Date;
/** Specifies when the file was created. */
get_timeLastModified(): Date;
get_title(): string;
/** Specifies the implementation-specific version identifier of the file. */
get_uIVersion(): number;
/** Specifies the implementation-specific version identifier of the file. */
get_uIVersionLabel(): string;
/** Returns a collection of file version objects that represent the versions of the file. */
get_versions(): SP.FileVersionCollection;
/** Reverts an existing online or offline checkout for the file. */
undoCheckOut(): void;
checkIn(comment: string, checkInType: SP.CheckinType): void;
publish(comment: string): void;
/** Removes the file from content approval with the specified comment. */
unPublish(comment: string): void;
/** Approves the file submitted for content approval with the specified comment. */
approve(comment: string): void;
/** Denies the file submitted for content approval. */
deny(comment: string): void;
static getContentVerFromTag(context: SP.ClientRuntimeContext, contentTag: string): SP.IntResult;
getLimitedWebPartManager(scope: SP.WebParts.PersonalizationScope): SP.WebParts.LimitedWebPartManager;
moveTo(newUrl: string, flags: SP.MoveOperations): void;
copyTo(strNewUrl: string, bOverWrite: boolean): void;
saveBinary(parameters: SP.FileSaveBinaryInformation): void;
deleteObject(): void;
/** Moves the file to the recycle bin. MUST return the identifier of the new Recycle Bin item */
recycle(): SP.GuidResult;
checkOut(): void;
}
interface FileCollection extends SP.ClientObjectCollection {
itemAt(index: number): SP.File;
get_item(index: number): SP.File;
getByUrl(url: string): SP.File;
add(parameters: SP.FileCreationInformation): SP.File;
addTemplateFile(urlOfFile: string, templateFileType: SP.TemplateFileType): SP.File;
}
class FileCreationInformation extends SP.ClientValueObject {
get_content(): SP.Base64EncodedByteArray;
set_content(value: SP.Base64EncodedByteArray): void;
get_overwrite(): boolean;
set_overwrite(value: boolean): void;
get_url(): string;
set_url(value: string): void;
get_typeId(): string;
writeToXml(writer: SP.XmlWriter, serializationContext: SP.SerializationContext): void;
constructor();
}
enum FileLevel {
published,
draft,
checkout,
}
class FileSaveBinaryInformation extends SP.ClientValueObject {
get_checkRequiredFields(): boolean;
set_checkRequiredFields(value: boolean): void;
get_content(): SP.Base64EncodedByteArray;
set_content(value: SP.Base64EncodedByteArray): void;
get_eTag(): string;
set_eTag(value: string): void;
get_fieldValues(): any;
set_fieldValues(value: any): void;
get_typeId(): string;
writeToXml(writer: SP.XmlWriter, serializationContext: SP.SerializationContext): void;
constructor();
}
enum FileSystemObjectType {
invalid,
file,
folder,
web,
}
class FileVersion extends SP.ClientObject {
get_checkInComment(): string;
get_created(): Date;
get_createdBy(): SP.User;
get_iD(): number;
get_isCurrentVersion(): boolean;
get_size(): number;
get_url(): string;
get_versionLabel(): string;
deleteObject(): void;
}
interface FileVersionCollection extends SP.ClientObjectCollection {
itemAt(index: number): SP.FileVersion;
get_item(index: number): SP.FileVersion;
getById(versionid: number): SP.FileVersion;
deleteByID(vid: number): void;
deleteByLabel(versionlabel: string): void;
deleteAll(): void;
restoreByLabel(versionlabel: string): void;
}
class Folder extends SP.ClientObject {
get_contentTypeOrder(): SP.ContentTypeId[];
get_files(): SP.FileCollection;
get_listItemAllFields(): SP.ListItem;
get_itemCount(): number;
get_name(): string;
get_parentFolder(): SP.Folder;
get_properties(): SP.PropertyValues;
get_serverRelativeUrl(): string;
get_folders(): SP.FolderCollection;
get_uniqueContentTypeOrder(): SP.ContentTypeId[];
set_uniqueContentTypeOrder(value: SP.ContentTypeId[]): void;
get_welcomePage(): string;
set_welcomePage(value: string): void;
update(): void;
deleteObject(): void;
recycle(): SP.GuidResult;
}
interface FolderCollection extends SP.ClientObjectCollection {
itemAt(index: number): SP.Folder;
get_item(index: number): SP.Folder;
getByUrl(url: string): SP.Folder;
add(url: string): SP.Folder;
}
class Form extends SP.ClientObject {
get_id(): SP.Guid;
get_serverRelativeUrl(): string;
get_formType(): SP.PageType;
}
interface FormCollection extends SP.ClientObjectCollection