UNPKG

@sysdoc/sharepoint-utils

Version:

Sysdoc's core Sharepoint utilities

85 lines (84 loc) 2.35 kB
/*! * Copyright Sysdoc @ 2019 */ /// <reference types="sharepoint" /> import { Dictionary } from "@sysdoc/utilities"; export declare function getWebProperties<T>(webUrl: string): Promise<T>; export declare function setWebProperties(webUrl: string, dict: Dictionary<any>): Promise<void>; export declare function termSetToJson(tset: SP.Taxonomy.TermSet): { Id: string; Name: string; LastModifiedDate: Date; CreatedDate: Date; Contact: string; Description: string; IsOpenForTermCreation: boolean; Stakeholders: string[]; CustomSortOrder: string; CustomProperties: { [key: string]: string; }; IsAvailableForTagging: boolean; Owner: string; }; export declare function termToJson(term: SP.Taxonomy.Term): { Id: string; Name: string; Description: string; IsDeprecated: boolean; IsKeyword: boolean; IsPinned: boolean; IsReused: boolean; IsRoot: boolean; PathOfTerm: string; TermsCount: number; IsSourceTerm: boolean; IsAvailableForTagging: boolean; LocalCustomProperties: { [key: string]: string; }; CustomProperties: { [key: string]: string; }; CustomSortOrder: string; }; export interface ITermJson { Id: string; Name: string; Description: string; IsDeprecated: boolean; IsKeyword: boolean; IsPinned: boolean; IsReused: boolean; IsRoot: boolean; PathOfTerm: string; TermsCount: number; ParentId?: string; TermSetId?: string; IsSourceTerm: boolean; IsAvailableForTagging: boolean; LocalCustomProperties: any; CustomProperties: any; CustomSortOrder: string; } export interface ITermSetJson { Id: string; Name: string; LastModifiedDate: Date; CreatedDate: Date; Contact: string; Description: string; IsOpenForTermCreation: boolean; Stakeholders: string[]; CustomSortOrder: string; CustomProperties: any; IsAvailableForTagging: boolean; Owner: string; } export declare function jsonToTerm(obj: ITermJson): SP.Taxonomy.Term; export declare function jsonToTermSet(obj: ITermSetJson): SP.Taxonomy.TermSet; export declare function currentUserIdentity(): { email: string; id: number; label: string; };