interface IItem {
    _inheritingObservers: boolean;
    _url: string;
    comments: IComments;
    delete: ((this: ISPQueryable<any>, eTag?: string) => Promise<void>);
    firstUniqueAncestorSecurableObject: _SPInstance<any>;
    InternalPromise: symbol;
    InternalReject: symbol;
    InternalResolve: symbol;
    moments: {
        auth: ((observers: QueryableAuthObserver[], url: URL, init: RequestInit) => Promise<[url: URL, init: RequestInit]>);
        construct: ((observers: QueryableConstructObserver[], init: QueryableInit, path?: string) => Timeline<any>);
        data: ((observers: QueryableDataObserver<any>[], ...args: any[]) => void);
        parse: ((observers: QueryableParseObserver[], url: URL, response: Response, result: any) => Promise<[url: URL, response: Response, result: any]>);
        post: ((observers: QueryablePostObserver[], url: URL, result: any) => Promise<[url: URL, result: any]>);
        pre: ((observers: QueryablePreObserver[], url: string, init: RequestInit, result: any) => Promise<[url: string, init: RequestInit, result: any]>);
        send: ((observers: QueryableSendObserver[], url: URL, init: RequestInit) => Promise<Promise<Response>>);
    };
    observers: ObserverCollection;
    parentUrl: string;
    roleAssignments: IRoleAssignments;
    get effectiveBasePermissions(): ISPQueryable<any>;
    get effectiveBasePermissionsForUI(): ISPQueryable<any>;
    get emit(): EmitProxyType<T>;
    get fieldValuesAsHTML(): ISPInstance<any>;
    get fieldValuesAsText(): ISPInstance<any>;
    get fieldValuesForEdit(): ISPInstance<any>;
    get list(): IList;
    get on(): OnProxyType<T>;
    get query(): URLSearchParams;
    get versions(): IItemVersions;
    breakRoleInheritance(copyRoleAssignments?: boolean, clearSubscopes?: boolean): Promise<any>;
    cloneObserversOnChange(): void;
    concat(pathPart: string): this;
    currentUserHasPermissions(permission: PermissionKind): Promise<boolean>;
    deleteWithParams(parameters: Partial<IItemDeleteParams>): Promise<void>;
    error(e?: any): void;
    execute(userInit: RequestInit): Promise<void>;
    expand(...expands: string[]): this;
    getContextInfo(path?: string): Promise<IContextInfo>;
    getCurrentUserEffectivePermissions(): Promise<IBasePermissions>;
    getLikedBy(): Promise<ILikeData[]>;
    getLikedByInformation(): Promise<ILikedByInformation>;
    getParent<T>(factory: ISPInvokableFactory<any>, path?: string, base?: string): T;
    getParentInfos(): Promise<IItemParentInfos>;
    getUserEffectivePermissions(loginName: string): Promise<IBasePermissions>;
    getWopiFrameUrl(action?: number): Promise<string>;
    hasPermissions(value: IBasePermissions, perm: PermissionKind): boolean;
    like(): Promise<void>;
    log(message: string, level?: number): void;
    rate(rating: RatingValues): Promise<number>;
    recycle(): Promise<string>;
    resetRoleInheritance(): Promise<any>;
    select(...selects: string[]): this;
    setImageField(fieldName: string, imageName: string, imageContent: any): Promise<any>;
    start(init?: any): Promise<any>;
    toRequestUrl(): string;
    toUrl(): string;
    unlike(): Promise<void>;
    update(properties: Record<string, any>, eTag?: string): Promise<IItemUpdateResult>;
    userHasPermissions(loginName: string, permission: PermissionKind): Promise<boolean>;
    using(...behaviors: TimelinePipe<any>[]): this;
    validateUpdateListItem(formValues: IListItemFormUpdateValue[], bNewDocumentUpdate?: boolean): Promise<IListItemFormUpdateValue[]>;
    <T>(init?: RequestInit): Promise<T>;
}

Hierarchy

  • _Item
  • IDeleteableWithETag
  • ISecurableMethods
    • IItem
  • Type Parameters

    • T = any

    Parameters

    • Optionalinit: RequestInit

    Returns Promise<T>

Properties

_inheritingObservers: boolean
_url: string
comments: IComments
delete: ((this: ISPQueryable<any>, eTag?: string) => Promise<void>)
firstUniqueAncestorSecurableObject: _SPInstance<any>
InternalPromise: symbol
InternalReject: symbol
InternalResolve: symbol
moments: {
    auth: ((observers: QueryableAuthObserver[], url: URL, init: RequestInit) => Promise<[url: URL, init: RequestInit]>);
    construct: ((observers: QueryableConstructObserver[], init: QueryableInit, path?: string) => Timeline<any>);
    data: ((observers: QueryableDataObserver<any>[], ...args: any[]) => void);
    parse: ((observers: QueryableParseObserver[], url: URL, response: Response, result: any) => Promise<[url: URL, response: Response, result: any]>);
    post: ((observers: QueryablePostObserver[], url: URL, result: any) => Promise<[url: URL, result: any]>);
    pre: ((observers: QueryablePreObserver[], url: string, init: RequestInit, result: any) => Promise<[url: string, init: RequestInit, result: any]>);
    send: ((observers: QueryableSendObserver[], url: URL, init: RequestInit) => Promise<Promise<Response>>);
}
observers: ObserverCollection
parentUrl: string
roleAssignments: IRoleAssignments

Accessors

  • get effectiveBasePermissions(): ISPQueryable<any>
  • Gets the effective base permissions for the item

    Returns ISPQueryable<any>

  • get effectiveBasePermissionsForUI(): ISPQueryable<any>
  • Gets the effective base permissions for the item in a UI context

    Returns ISPQueryable<any>

  • get emit(): EmitProxyType<T>
  • Property allowing access to invoke a moment from within this timeline

    Returns EmitProxyType<T>

  • get fieldValuesAsHTML(): ISPInstance<any>
  • Gets the field values for this list item in their HTML representation

    Returns ISPInstance<any>

  • get fieldValuesAsText(): ISPInstance<any>
  • Gets the field values for this list item in their text representation

    Returns ISPInstance<any>

  • get fieldValuesForEdit(): ISPInstance<any>
  • Gets the field values for this list item for use in editing controls

    Returns ISPInstance<any>

  • get list(): IList
  • this item's list

    Returns IList

  • get on(): OnProxyType<T>
  • Property allowing access to manage observers on moments within this timeline

    Returns OnProxyType<T>

  • get query(): URLSearchParams
  • Querystring key, value pairs which will be included in the request

    Returns URLSearchParams

  • get versions(): IItemVersions
  • Gets the collection of versions associated with this item

    Returns IItemVersions

Methods

  • Parameters

    • OptionalcopyRoleAssignments: boolean
    • OptionalclearSubscopes: boolean

    Returns Promise<any>

  • By default a timeline references the same observer collection as a parent timeline, if any changes are made to the observers this method first clones them ensuring we maintain a local copy and de-ref the parent

    Returns void

  • Directly concatenates the supplied string to the current url, not normalizing "/" chars

    Parameters

    • pathPart: string

      The string to concatenate to the url

    Returns this

  • Parameters

    • permission: PermissionKind

    Returns Promise<boolean>

  • Deletes the item object with options.

    Parameters

    • parameters: Partial<IItemDeleteParams>

      Specifies the options to use when deleting a item.

    Returns Promise<void>

  • Shorthand method to emit an error event tied to this timeline

    Parameters

    • Optionale: any

      Optional. Any error object to emit. If none is provided no emit occurs

    Returns void

  • Method orchestrating the emit calls for the moments defined in inheriting classes

    Parameters

    • userInit: RequestInit

    Returns Promise<void>

  • Expands fields such as lookups to get additional data

    Parameters

    • Rest...expands: string[]

      The Fields for which to expand the values

    Returns this

  • Gets the context info for the specified path

    Parameters

    • Optionalpath: string

      Optional. Absolute path to a SharePoint resource [Default: this.parentUrl]

    Returns Promise<IContextInfo>

  • Returns Promise<IBasePermissions>

  • Gets the collection of people who have liked this item

    Returns Promise<ILikeData[]>

  • Unlikes this item as the current user

    Returns Promise<ILikedByInformation>

  • Gets a parent for this instance as specified

    Type Parameters

    • T extends ISPQueryable<any>

    Parameters

    • factory: ISPInvokableFactory<any>

      The contructor for the class to create

    • Optionalpath: string
    • Optionalbase: string

    Returns T

  • Gets the parent information for this item's list and web

    Returns Promise<IItemParentInfos>

  • Parameters

    • loginName: string

    Returns Promise<IBasePermissions>

  • Gets a string representation of the full URL to the WOPI frame. If there is no associated WOPI application, or no associated action, an empty string is returned.

    Parameters

    • Optionalaction: number

      Display mode: 0: view, 1: edit, 2: mobileView, 3: interactivePreview

    Returns Promise<string>

  • Parameters

    • value: IBasePermissions
    • perm: PermissionKind

    Returns boolean

  • Likes this client-side page as the current user

    Returns Promise<void>

  • Shorthand method to emit a logging event tied to this timeline

    Parameters

    • message: string

      The message to log

    • Optionallevel: number

      The level at which the message applies

    Returns void

  • Rates this item as the current user

    Parameters

    • rating: RatingValues

      rating number between 1-5

    Returns Promise<number>

    rating number

  • Moves the list item to the Recycle Bin and returns the identifier of the new Recycle Bin item.

    Returns Promise<string>

  • Returns Promise<any>

  • Choose which fields to return

    Parameters

    • Rest...selects: string[]

      One or more fields to return

    Returns this

  • Parameters

    • fieldName: string
    • imageName: string
    • imageContent: any

    Returns Promise<any>

  • Starts a timeline

    Parameters

    • Optionalinit: any

      A value passed into the execute logic from the initiator of the timeline

    Returns Promise<any>

    The result of this.execute

    This method first emits "init" to allow for any needed initial conditions then calls execute with any supplied init

  • Gets the full url with query information

    Returns string

  • Gets the current url

    Returns string

  • Unlikes this client-side page as the current user

    Returns Promise<void>

  • Updates this list instance with the supplied properties

    Parameters

    • properties: Record<string, any>

      A plain object hash of values to update for the list

    • OptionaleTag: string

      Value used in the IF-Match header, by default "*"

    Returns Promise<IItemUpdateResult>

  • Parameters

    • loginName: string
    • permission: PermissionKind

    Returns Promise<boolean>

  • Apply the supplied behavior(s) to this timeline

    Parameters

    • Rest...behaviors: TimelinePipe<any>[]

      One or more behaviors

    Returns this

    this Timeline

  • Validates and sets the values of the specified collection of fields for the list item.

    Parameters

    • formValues: IListItemFormUpdateValue[]

      The fields to change and their new values.

    • OptionalbNewDocumentUpdate: boolean

      true if the list item is a document being updated after upload; otherwise false.

    Returns Promise<IListItemFormUpdateValue[]>