New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

gd-sprest

Package Overview
Dependencies
Maintainers
1
Versions
865
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gd-sprest - npm Package Compare versions

Comparing version 0.9.31 to 0.9.91

dist/gd-sprest.d.ts

8

gulpfile.js

@@ -13,5 +13,5 @@ var gulp = require("gulp");

return gulp.src(["js/*.js", "js/types/*.js", "js/utils/*.js", "js/lib/*.js"])
.pipe(concat("sprest.js"))
.pipe(concat("gd-sprest.js"))
.pipe(gulp.dest("dist"))
.pipe(rename("sprest.min.js"))
.pipe(rename("gd-sprest.min.js"))
.pipe(uglify())

@@ -27,4 +27,4 @@ .pipe(gulp.dest("dist"));

// Copy the files
return gulp.src(["tsd/*.d.ts", "src/definitions/*.d.ts"])
.pipe(concat("sprest.d.ts"))
return gulp.src(["src/definitions/*.d.ts"])
.pipe(concat("gd-sprest.d.ts"))
.pipe(gulp.dest("dist"));

@@ -31,0 +31,0 @@ });

{
"name": "gd-sprest",
"version": "0.9.31",
"version": "0.9.91",
"description": "An easy way to develop against the SharePoint REST API.",

@@ -9,3 +9,3 @@ "author": "Gunjan Datta <me@dattabase.com> (https://github.com/gunjandatta/sprest)",

"keywords": [
"sharepoint", "rest", "api"
"sharepoint", "sharepoint online", "rest", "api", "typescript", "javascript"
],

@@ -12,0 +12,0 @@ "repository": {

@@ -31,3 +31,3 @@ # SharePoint Online/On-Premise REST Framework

```
npm install gd-sprest --save-dev
npm install gd-sprest --save
```

@@ -1,2 +0,2 @@

module $REST {
module GD {
/*********************************************************************************************************************************/

@@ -17,3 +17,3 @@ // Global Variables

/*********************************************************************************************************************************/
constructor(targetInfo:Settings.TargetInfoSettings) {
constructor(targetInfo:ComplexTypes.TargetInfoSettings) {
// Default the properties

@@ -179,3 +179,3 @@ this.targetInfo = targetInfo || {};

// The base settings
protected targetInfo:Settings.TargetInfoSettings;
protected targetInfo:ComplexTypes.TargetInfoSettings;

@@ -299,4 +299,4 @@ // The wait flags

// Method to execute a method
protected executeMethod(methodName:string, methodConfig:Settings.MethodInfoSettings, args?:any) {
let targetInfo:Settings.TargetInfoSettings = null;
protected executeMethod(methodName:string, methodConfig:ComplexTypes.MethodInfoSettings, args?:any) {
let targetInfo:ComplexTypes.TargetInfoSettings = null;

@@ -318,3 +318,3 @@ // See if the metadata is defined for this object

// Update the metadata uri
this.base.updateMetadataUri(metadata, targetInfo);
(this.updateMetadataUri ? this.updateMetadataUri : this.base.updateMetadataUri)(metadata, targetInfo);
}

@@ -556,6 +556,6 @@ else {

// Ensure this is the app web
if(!window["_spPageContextInfo"].isAppWeb) { return; }
if(!Utils.ContextInfo.isAppWeb) { return; }
// Get the url information
let hostUrl = window["_spPageContextInfo"].webAbsoluteUrl.toLowerCase();
let hostUrl = Utils.ContextInfo.webAbsoluteUrl.toLowerCase();
let requestUrl = data && data.__metadata && data.__metadata.uri ? data.__metadata.uri.toLowerCase() : null;

@@ -575,3 +575,3 @@ let targetUrl = this.targetInfo && this.targetInfo.url ? this.targetInfo.url.toLowerCase() : null;

// Method to update the metadata uri
private updateMetadataUri(metadata:any, targetInfo:Settings.TargetInfoSettings) {
private updateMetadataUri(metadata:any, targetInfo:ComplexTypes.TargetInfoSettings) {
// See if this is a field

@@ -578,0 +578,0 @@ if(/^SP.Field/.test(metadata.type) || /^SP\..*Field$/.test(metadata.type)) {

@@ -1,2 +0,2 @@

declare module $REST.Types {
declare module GD.Types {
/**

@@ -14,6 +14,6 @@ * Attachment

/** The filename as a path. */
FileNameAsPath: any;
FileNameAsPath: ComplexTypes.ResourcePath;
/** The server relative path. */
ServerRelativePath: any;
ServerRelativePath: ComplexTypes.ResourcePath;

@@ -20,0 +20,0 @@ /** The server relative url. */

@@ -1,2 +0,2 @@

declare module $REST.Types {
declare module GD.Types {
/**

@@ -52,4 +52,4 @@ * Attachment Files

*/
query(oData:Settings.ODataSettings): IAttachmentFiles;
query(oData:ComplexTypes.ODataQuery): IAttachmentFiles;
}
}

@@ -1,2 +0,2 @@

declare module $REST.Types {
declare module GD.Types {
/**

@@ -20,3 +20,3 @@ * The base class

/** The request type */
requestType: $REST.Types.RequestType;
requestType: GD.Types.RequestType;

@@ -34,5 +34,2 @@ /**

execute(callback?:(...args) => any): IBase;
execute<IList>(callback?:(...args) => any): IList;
execute<ISite>(callback?:(...args) => any): ISite;
execute<IWeb>(callback?:(...args) => any): IWeb;

@@ -44,5 +41,2 @@ /**

execute(waitFl:boolean): IBase;
execute<IList>(waitFl:boolean): IList;
execute<ISite>(waitFl:boolean): ISite;
execute<IWeb>(waitFl:boolean): IWeb;

@@ -55,5 +49,2 @@ /**

execute(callback:any, waitFl:boolean): IBase;
execute<IList>(callback:any, waitFl:boolean): IList;
execute<ISite>(callback:any, waitFl:boolean): ISite;
execute<IWeb>(callback:any, waitFl:boolean): IWeb;

@@ -64,6 +55,3 @@ /**

executeAndWait(): IBase;
executeAndWait<IList>(): IList;
executeAndWait<ISite>(): ISite;
executeAndWait<IWeb>(): IWeb;
}
}

@@ -1,2 +0,2 @@

declare module $REST.Types {
declare module GD.Types {
/**

@@ -13,2 +13,4 @@ * Content Type

DescriptionResource(): IBase;
/** Gets or sets a value that specifies the name of a custom display form template to use for list items that have been assigned the content type. */

@@ -41,3 +43,3 @@ DisplayFormTemplateName: string;

*/
FieldLinks(guid:string): IBase;
FieldLinks(guid:string): IFieldLink;

@@ -59,6 +61,6 @@ /**

/** Gets or sets a value that specifies whether the content type is unavailable for creation or usage directly from a user interface. */
Hidden: string;
Hidden: boolean;
/** Gets a value that specifies an identifier for the content type. */
Id: string;
Id: ComplexTypes.ContentTypeId;

@@ -68,5 +70,13 @@ /** Gets or sets the JSLink for the content type custom form template. The JSLink property is not supported on Survey or Events lists. A SharePoint calendar is an Events list. */

MobileDisplayFormUrl: string;
MobileEditFormUrl: string;
MobileNewFormUrl: string;
/** Gets or sets a value that specifies the name of the content type. */
Name: string;
NameResource(): IBase;
/** Gets or sets a value that specifies the name of the content type. */

@@ -79,6 +89,6 @@ NewFormTemplateName: string;

/** Gets the parent content type of the content type. */
Parent: string;
Parent(): IContentType;
/** Gets or sets a value that specifies whether changes to the content type properties are denied. */
Readonly: string;
Readonly: boolean;

@@ -95,3 +105,3 @@ /** Gets a value that specifies the XML Schema representing the content type. */

/** Gets or sets whether the content type can be modified. */
Sealed: string;
Sealed: boolean;

@@ -98,0 +108,0 @@ /** A string representation of the value of the Id. */

@@ -1,2 +0,2 @@

declare module $REST.Types {
declare module GD.Types {
/**

@@ -21,3 +21,3 @@ * Content Types

*/
add(parameters:Settings.ContentTypeCreationInformation): IContentType;
add(parameters:ComplexTypes.ContentTypeCreationInformation): IContentType;

@@ -64,4 +64,4 @@ /**

*/
query(oData:Settings.ODataSettings): IContentTypes;
query(oData:ComplexTypes.ODataQuery): IContentTypes;
}
}

@@ -1,27 +0,30 @@

declare module $REST.Settings {
declare module GD.ComplexTypes {
/**
* Email Creation Information
* Email Properties
*/
interface EmailCreationInformation {
interface EmailProperties {
/** A collection of additional email headers. */
AdditionalHeaders?: Results.KeyValue;
/** A value that specifies the email addresses to blind carbon copy the email to. */
BCC?:Array<string>;
BCC?: Results.String;
/** A value that specifies the body of the email. */
Body:string;
Body: string;
/** A value that specifies the email addresses to carbon copy the email to. */
CC?:Array<string>;
CC?: Results.String;
/** A value that specifies the email address of the sender. */
From:string;
From: string;
/** A value that specifies the email addresses to send the email to. */
To:Array<string>;
To: Results.String;
/** A value that specifies the email subject. */
Subject:string;
Subject: string;
}
}
declare module $REST.Types {
declare module GD.Types {
/**

@@ -32,8 +35,2 @@ * Email

/**
* Constructor
* @param targetInfo - (Optional) The target information.
*/
new(targetInfo?:Settings.TargetInfoSettings): IEmail;
/**
* Properties

@@ -50,4 +47,4 @@ */

*/
send(properties:Settings.EmailCreationInformation): IBase;
send(properties:ComplexTypes.EmailProperties): IBase;
}
}

@@ -1,2 +0,2 @@

declare module $REST.Types {
declare module GD.Types {
/**

@@ -11,12 +11,12 @@ * Event Receiver

/** Specifies the type of event. */
EventType: $REST.Types.EventReceiverType;
EventType: GD.Types.EventReceiverType;
/** The strong name of the assembly that is used for receiving events. */
ReceiverAssembly: string;
ReceiverAssembly?: string;
/** A string that represents the class that is used for receiving events. */
ReceiverClass: string;
ReceiverClass?: string;
/** The unique identifier of the event receiver. */
ReceiverId: string;
ReceiverId?: string;

@@ -27,9 +27,9 @@ /** The name of the event receiver. */

/** The URL of a web service that is used for receiving events. */
ReceiverUrl: string;
ReceiverUrl?: string;
/** An integer that represents the relative sequence of the event. */
SequenceNumber: number;
SequenceNumber?: number;
/** The execution synchronization of the event receiver. */
Synchronization: $REST.Types.EventReceiverSynchronizationType;
Synchronization?: GD.Types.EventReceiverSynchronizationType;

@@ -36,0 +36,0 @@ /**

@@ -1,2 +0,2 @@

declare module $REST.Types {
declare module GD.Types {
/**

@@ -21,3 +21,3 @@ * Event Receivers

*/
add(parameters:Settings.EventReceiverDefinitionCreationInformation): IEventReceiver;
add(parameters:ComplexTypes.EventReceiverDefinitionCreationInformation): IEventReceiver;

@@ -58,4 +58,4 @@ /**

*/
query(oData:Settings.ODataSettings): IEventReceivers;
query(oData:ComplexTypes.ODataQuery): IEventReceivers;
}
}

@@ -1,2 +0,2 @@

declare module $REST.Types {
declare module GD.Types {
/**

@@ -10,4 +10,6 @@ * Field

AutoIndexed: boolean;
/** Gets a value that specifies whether the field can be deleted. */
CanBeDeleted: string;
CanBeDeleted: boolean;

@@ -20,2 +22,4 @@ /** Gets or sets a value that specifies the default value for the field. */

DescriptionResource(): ComplexTypes.ResourcePath;
/** Gets or sets a value that specifies the reading order of the field. */

@@ -25,3 +29,3 @@ Direction: string;

/** Gets or sets a value that specifies whether to require unique field values in a list or library column. */
EnforceUniqueValues: string;
EnforceUniqueValues: boolean;

@@ -35,6 +39,6 @@ /** Gets the name of the entity property for the list item entity that uses this field. */

/** Gets a value that specifies whether list items in the list can be filtered by the field value. */
Filterable: string;
Filterable: boolean;
/** Gets a Boolean value that indicates whether the field derives from a base field type. */
FromBaseType: string;
FromBaseType: boolean;

@@ -45,3 +49,3 @@ /** Gets or sets a value that specifies the field group. */

/** Gets or sets a value that specifies whether the field is hidden in list views and list forms. */
Hidden: string;
Hidden: boolean;

@@ -52,3 +56,3 @@ /** Gets a value that specifies the field identifier. */

/** Gets or sets a Boolean value that specifies whether the field is indexed. */
Indexed: string;
Indexed: boolean;

@@ -62,6 +66,6 @@ /** Gets a value that specifies the field internal name. */

/** Gets or sets a value that specifies whether the value of the field is read-only. */
ReadOnlyField: string;
ReadOnlyField: boolean;
/** Gets or sets a value that specifies whether the field requires a value. */
Required: string;
Required: boolean;

@@ -75,6 +79,6 @@ /** Gets or sets a value that specifies the XML schema that defines the field. */

/** Gets a value that specifies whether properties on the field cannot be changed and whether the field cannot be deleted. */
Sealed: string;
Sealed: boolean;
/** Gets a value that specifies whether list items in the list can be sorted by the field value. */
Sortable: string;
Sortable: boolean;

@@ -87,2 +91,4 @@ /** Gets or sets a value that specifies a customizable identifier of the field. */

TitleResource(): ComplexTypes.ResourcePath;
/** Gets or sets a value that specifies the type of the field. */

@@ -89,0 +95,0 @@ TypeAsString: string;

@@ -1,2 +0,2 @@

declare module $REST.Types {
declare module GD.Types {
/**

@@ -11,3 +11,3 @@ * Field Links

/** The field link collection. */
results: Array<any>;
results: Array<IFieldLink>;

@@ -58,4 +58,4 @@ /**

*/
query(oData:Settings.ODataSettings): IFieldLinks;
query(oData:ComplexTypes.ODataQuery): IFieldLinks;
}
}

@@ -1,2 +0,2 @@

declare module $REST.Types {
declare module GD.Types {
/**

@@ -27,3 +27,3 @@ * Fields

*/
addField(parameters:Settings.FieldCreationInformation): IField;
addField(parameters:ComplexTypes.FieldCreationInformation): IField;

@@ -91,4 +91,4 @@ /**

*/
query(oData:Settings.ODataSettings): IFields;
query(oData:ComplexTypes.ODataQuery): IFields;
}
}

@@ -1,2 +0,2 @@

declare module $REST.Types {
declare module GD.Types {
/**

@@ -23,4 +23,4 @@ * File

/** Gets a value that indicates how the file is checked out of a document library. Represents an SP.CheckOutType value: Online = 0; Offline = 1; None = 2. The checkout state of a file is independent of its locked state. */
CheckOutType: string;
/** Gets a value that indicates how the file is checked out of a document library. Represents an SP.CheckOutType value: . The checkout state of a file is independent of its locked state. */
CheckOutType: Types.CheckOutType;

@@ -31,4 +31,6 @@ /** Returns internal version of content, used to validate document equality for read purposes. */

/** Gets a value that specifies the customization status of the file. Represents an SP.CustomizedPageStatus value: None = 0; Uncustomized = 1; Customized = 2. */
CustomizedPageStatus: string;
CustomizedPageStatus: number;
EffectiveInformationRightsManagementSettings(): IBase;
/** Gets a value that specifies the ETag value. */

@@ -38,10 +40,14 @@ ETag: string;

/** Gets a value that specifies whether the file exists. */
Exists: string;
Exists: boolean;
InformationRightsManagementSettings(): IBase;
/** Gets the size of the file in bytes, excluding the size of any Web Parts that are used in the file. */
Length: string;
Length: number;
/** Gets a value that specifies the publishing level of the file. Represents an SP.FileLevel value: Published = 1; Draft = 2; Checkout = 255. */
Level: string;
Level: number;
LinkingUrl: string;
/**

@@ -58,6 +64,6 @@ * Gets a value that specifies the list item field values for the list item corresponding to the file.

/** Gets a value that specifies the major version of the file. */
MajorVersion: string;
MajorVersion: number;
/** Gets a value that specifies the minor version of the file. */
MinorVersion: string;
MinorVersion: number;

@@ -72,5 +78,14 @@ /**

/**
* Property Bag
*/
Properties(): IPropertyValues;
ServerRelativePath: ComplexTypes.ResourcePath;
/** Gets the relative URL of the file based on the URL for the server. */
ServerRelativeUrl: string;
SiteId: string;
/** Gets a value that specifies when the file was created. */

@@ -86,3 +101,3 @@ TimeCreated: string;

/** Gets a value that specifies the implementation-specific version identifier of the file. */
UiVersion: string;
UiVersion: number;

@@ -92,2 +107,6 @@ /** Gets a value that specifies the implementation-specific version identifier of the file. */

UniqueId: string;
VersionEvents(): IBase;
/**

@@ -98,2 +117,4 @@ * Gets a value that returns a collection of file version objects that represent the versions of the file.

WebId: string;
/**

@@ -100,0 +121,0 @@ * Methods

@@ -1,2 +0,2 @@

declare module $REST.Types {
declare module GD.Types {
/**

@@ -66,4 +66,4 @@ * Files

*/
query(oData:Settings.ODataSettings): IFiles;
query(oData:ComplexTypes.ODataQuery): IFiles;
}
}

@@ -1,2 +0,2 @@

declare module $REST.Types {
declare module GD.Types {
/**

@@ -22,3 +22,3 @@ * File Version

/** Gets the internal identifier for the file version. */
ID: string;
ID: number;

@@ -29,3 +29,3 @@ /** Gets a value that specifies whether the file version is the current version. */

/** */
Size: string;
Size: number;

@@ -32,0 +32,0 @@ /** Gets a value that specifies the relative URL of the file version based on the URL for the site or subsite. */

@@ -1,2 +0,2 @@

declare module $REST.Types {
declare module GD.Types {
/**

@@ -45,4 +45,4 @@ * File Versions

*/
query(oData:Settings.ODataSettings): IFileVersions;
query(oData:ComplexTypes.ODataQuery): IFileVersions;
}
}

@@ -1,2 +0,2 @@

declare module $REST.Types {
declare module GD.Types {
/**

@@ -11,6 +11,6 @@ * Folder

/** Specifies the sequence in which content types are displayed. */
ContentTypeOrder: string;
ContentTypeOrder: Results.ContentTypeId;
/** Gets a value that specifies whether the file exists. */
Exists: string;
Exists: boolean;

@@ -59,12 +59,22 @@ /**

/**
* Gets the collection of all files contained in the folder.
* Property Bag
*/
Properties(): IBase;
Properties(): IPropertyValues;
ServerRelativePath: ComplexTypes.ResourcePath;
/** Gets the server-relative URL of the list folder. */
ServerRelativeUrl: string;
StorageMetrics(): IBase;
TimeCreated: string;
TimeLastModified: string;
/** Gets or sets a value that specifies the content type order. */
UniqueContentTypeOrder: string;
UniqueContentTypeOrder: Results.ContentTypeId;
UniqueId: string;
/** Gets or sets a value that specifies folder-relative URL for the list folder welcome page. */

@@ -71,0 +81,0 @@ WelcomePage: string;

@@ -1,2 +0,2 @@

declare module $REST.Types {
declare module GD.Types {
/**

@@ -57,4 +57,4 @@ * Folders

*/
query(oData:Settings.ODataSettings): IFolders;
query(oData:ComplexTypes.ODataQuery): IFolders;
}
}

@@ -1,2 +0,2 @@

declare module $REST.Types {
declare module GD.Types {
/**

@@ -11,6 +11,6 @@ * Group

/** Gets or sets a value that indicates whether the group members can edit membership in the group. */
AllowMembersEditMembership: string;
AllowMembersEditMembership: boolean;
/** Gets or sets a value that indicates whether to allow users to request membership in the group and request to leave the group. */
AllowRequestToJoinLeave: string;
AllowRequestToJoinLeave: boolean;

@@ -20,3 +20,3 @@ /**

*/
AutoAcceptRequestToJoinLeave(): string;
AutoAcceptRequestToJoinLeave(): boolean;

@@ -26,3 +26,3 @@ /**

*/
CanCurrentUserEditMembership(): string;
CanCurrentUserEditMembership(): boolean;

@@ -32,3 +32,3 @@ /**

*/
CanCurrentUserManageGroup(): string;
CanCurrentUserManageGroup(): boolean;

@@ -38,3 +38,3 @@ /**

*/
CanCurrentUserViewMembership(): string;
CanCurrentUserViewMembership(): boolean;

@@ -54,3 +54,3 @@ /** Gets or sets the description of the group. */

/** Gets or sets a value that indicates whether only group members are allowed to view the membership of the group. */
OnlyAllowMembersViewMembership: string;
OnlyAllowMembersViewMembership: boolean;

@@ -57,0 +57,0 @@ /**

@@ -1,2 +0,2 @@

declare module $REST.Types {
declare module GD.Types {
/**

@@ -42,3 +42,3 @@ * Helper Methods

*/
getFolder(web:$REST.Types.IWeb, folderUrl:string, createFl?:boolean): Types.IPromise;
getFolder(web:GD.Types.IWeb, folderUrl:string, createFl?:boolean): Types.IPromise;

@@ -50,3 +50,3 @@ /**

*/
removeEmptyFolders(web:$REST.Types.IWeb, folderUrls:Array<string>): Types.IPromise;
removeEmptyFolders(web:GD.Types.IWeb, folderUrls:Array<string>): Types.IPromise;

@@ -58,3 +58,3 @@ /**

*/
removeFile(web:$REST.Types.IWeb, fileUrl:string): Types.IPromise;
removeFile(web:GD.Types.IWeb, fileUrl:string): Types.IPromise;

@@ -66,4 +66,4 @@ /**

*/
removeFiles(web:$REST.Types.IWeb, fileUrls:Array<string>): Types.IPromise;
removeFiles(web:GD.Types.IWeb, fileUrls:Array<string>): Types.IPromise;
}
}

@@ -1,2 +0,2 @@

declare module $REST.Types {
declare module GD.Types {
/**

@@ -57,4 +57,4 @@ * List Items

*/
query(oData:Settings.ODataSettings): IListItems;
query(oData:ComplexTypes.ODataQuery): IListItems;
}
}

@@ -1,2 +0,2 @@

declare module $REST.Types {
declare module GD.Types {
/**

@@ -6,4 +6,15 @@ * Limited Web Part Manager

interface ILimitedWebPartManager extends IBase {
/**
* Properties
*/
HasPersonalizedParts: boolean;
Scope: number;
/**
* Methods
*/
/**
* Method to execute the request.

@@ -10,0 +21,0 @@ * @param callback - The method to be executed after the request completes.

@@ -1,2 +0,2 @@

declare module $REST.Types {
declare module GD.Types {
/**

@@ -11,3 +11,3 @@ * List

*/
new(listName:string, targetInfo?:Settings.TargetInfoSettings): IList;
new(listName:string, targetInfo?:ComplexTypes.TargetInfoSettings): IList;

@@ -19,9 +19,11 @@ /**

/** Gets a value that specifies whether the list supports content types. */
AllowContentTypes: string;
AllowContentTypes: boolean;
AllowDeletion: boolean;
/** Gets the list definition type on which the list is based. Represents a ListTemplateType value. See ListTemplateType in the .NET client object model reference for template type values. */
BaseTemplate: string;
BaseTemplate: Types.ListTemplateType;
/** Gets the base type for the list. Represents an SP.BaseType value: Generic List = 0; Document Library = 1; Discussion Board = 3; Survey = 4; Issue = 5. */
BaseType: string;
BaseType: number;

@@ -31,3 +33,3 @@ /**

*/
BrowserFileHandling(): string;
BrowserFileHandling: number;

@@ -46,3 +48,3 @@ /**

/** Gets or sets a value that specifies whether content types are enabled for the list. */
ContentTypesEnabled: string;
ContentTypesEnabled: boolean;

@@ -52,6 +54,8 @@ /** Gets a value that specifies when the list was created. */

CurrentChangeToken: ComplexTypes.ChangeToken;
/**
* Gets the data source associated with the list, or null if the list is not a virtual list. Returns null if the HasExternalDataSource property is false.
*/
DataSource(): string;
DataSource(): ComplexTypes.ListDataSource;

@@ -89,2 +93,4 @@ /** Gets a value that specifies the default workflow identifier for content approval on the list. Returns an empty GUID if there is no default content approval workflow. */

DescriptionResouce(): ComplexTypes.ResourcePath;
/** Gets or sets a value that specifies the reading order of the list. Returns ""NONE"", ""LTR"", or ""RTL"". */

@@ -97,3 +103,3 @@ Direction: string;

/** Gets or sets a value that specifies the minimum permission required to view minor versions and drafts within the list. Represents an SP.DraftVisibilityType value: Reader = 0; Author = 1; Approver = 2. */
DraftVersionVisibility: string;
DraftVersionVisibility: number;

@@ -103,3 +109,3 @@ /**

*/
EffectiveBasePermissions(): IBase;
EffectiveBasePermissions(): ComplexTypes.BasePermissions;

@@ -109,18 +115,20 @@ /**

*/
EffectiveBasePermissionsForUI(): IBase;
EffectiveBasePermissionsForUI(): ComplexTypes.BasePermissions;
EnableAssignToEmail: boolean;
/** Gets or sets a value that specifies whether list item attachments are enabled for the list. */
EnableAttachments: string;
EnableAttachments: boolean;
/** Gets or sets a value that specifies whether new list folders can be added to the list. */
EnableFolderCreation: string;
EnableFolderCreation: boolean;
/** Gets or sets a value that specifies whether minor versions are enabled for the list. */
EnableMinorVersions: string;
EnableMinorVersions: boolean;
/** Gets or sets a value that specifies whether content approval is enabled for the list. */
EnableModeration: string;
EnableModeration: boolean;
/** Gets or sets a value that specifies whether historical versions of list items and documents can be created in the list. */
EnableVersioning: string;
EnableVersioning: boolean;

@@ -141,2 +149,4 @@ /** */

ExcludeFromOfflineClient: boolean;
/**

@@ -153,2 +163,4 @@ * Gets the fields in the list.

FileSavePostProcessingEnabled: boolean;
/**

@@ -160,3 +172,3 @@ * Gets the object where role assignments for this object are defined. If role assignments are defined directly on the current object, the current object is returned.

/** Gets or sets a value that indicates whether forced checkout is enabled for the document library. */
ForceCheckout: string;
ForceCheckout: boolean;

@@ -175,3 +187,3 @@ /**

/** Gets a value that specifies whether the list is an external list. */
HasExternalDataSource: string;
HasExternalDataSource: boolean;

@@ -184,3 +196,3 @@ /**

/** Gets or sets a Boolean value that specifies whether the list is hidden. If true, the server sets the OnQuickLaunch property to false. */
Hidden: string;
Hidden: boolean;

@@ -199,18 +211,18 @@ /** Gets the GUID that identifies the list in the database. */

/** */
IrmEnabled: string;
IrmEnabled: boolean;
/** */
IrmExpire: string;
IrmExpire: boolean;
/** */
IrmReject: string;
IrmReject: boolean;
/** Gets or sets a value that specifies a flag that a client application can use to determine whether to display the list. */
IsApplicationList: string;
IsApplicationList: boolean;
/** Gets a value that specifies whether the list is a gallery. */
IsCatalog: string;
IsCatalog: boolean;
/** */
IsPrivate: string;
IsPrivate: boolean;

@@ -220,6 +232,6 @@ /**

*/
IsSiteAssetsLibrary(): string;
IsSiteAssetsLibrary(): boolean;
/** Gets a value that specifies the number of list items in the list. */
ItemCount: string;
ItemCount: number;

@@ -243,10 +255,16 @@ /**

ListExperienceOptions: number;
/** */
ListItemEntityTypeFullName: string;
MajorVersionLimit: number;
MajorWithMinorVersionsLimit: number;
/** Gets or sets a value that indicates whether the list in a Meeting Workspace site contains data for multiple meeting instances within the site. */
MultipleDataList: string;
MultipleDataList: boolean;
/** Gets or sets a value that specifies that the crawler must not crawl the list. */
NoCrawl: string;
NoCrawl: boolean;

@@ -256,3 +274,3 @@ /**

*/
OnQuickLaunch(): string;
OnQuickLaunch(): boolean;

@@ -267,2 +285,6 @@ /**

ParserDisabled: boolean;
ReadSecurity: number;
/**

@@ -296,4 +318,6 @@ * Gets the role assignments for the securable object.

/** Gets a value that indicates whether folders can be created within the list. */
ServerTemplateCanCreateFolders: string;
ServerTemplateCanCreateFolders: boolean;
Subscriptions(): IBase;
/** Gets a value that specifies the feature identifier of the feature that contains the list schema for the list. Returns an empty GUID if the list schema is not contained within a feature. */

@@ -305,2 +329,4 @@ TemplateFeatureId: string;

TitleResource(): ComplexTypes.ResourcePath;
/**

@@ -343,2 +369,4 @@ * Gets the user custom actions for the list.

WriteSecurity(): number;
/**

@@ -345,0 +373,0 @@ * Methods

@@ -1,2 +0,2 @@

declare module $REST.Types {
declare module GD.Types {
/**

@@ -29,9 +29,9 @@ * List Item

*/
DisplayName(): string;
DisplayName: string;
/** Gets a value that specifies the effective permissions on the list item that are assigned to the current user. */
EffectiveBasePermissions: string;
EffectiveBasePermissions: ComplexTypes.BasePermissions;
/** Gets the effective base permissions for the current user, as they should be displayed in UI. */
EffectiveBasePermissionsForUI: string;
EffectiveBasePermissionsForUI: ComplexTypes.BasePermissions;

@@ -41,3 +41,3 @@ /**

*/
FieldValuesAsHtml(): string;
FieldValuesAsHtml(): IBase;

@@ -47,3 +47,3 @@ /**

*/
FieldValuesAsText(): string;
FieldValuesAsText(): IBase;

@@ -53,3 +53,3 @@ /**

*/
FieldValuesForEdit(): string;
FieldValuesForEdit(): IBase;

@@ -62,3 +62,3 @@ /**

/** Gets a value that specifies whether the list item is a file or a list folder. Represents an SP.FileSystemObjectType value: Invalid = -1; File = 0; Folder = 1; Web = 2. */
FileSystemObjectType: string;
FileSystemObjectType: number;

@@ -75,2 +75,4 @@ /**

GetDlpPolicyTip(): IBase;
/**

@@ -81,4 +83,6 @@ * Gets a value that specifies whether the role assignments are uniquely defined for this securable object or inherited from a parent securable object.

IconOverlay: string;
/** Gets a value that specifies the list item identifier. */
Id: string;
Id: number;

@@ -91,2 +95,7 @@ /**

/**
* Property Bag
*/
Properties(): IPropertyValues;
/**
* Gets the role assignments for the securable object.

@@ -102,2 +111,4 @@ */

ServerRedirectedEmbedUrl: string;
/**

@@ -104,0 +115,0 @@ * Methods

@@ -1,2 +0,2 @@

declare module $REST.Types {
declare module GD.Types {
/**

@@ -21,3 +21,3 @@ * Lists

*/
add(parameters:Settings.ListCreationInformation): IList;
add(parameters:ComplexTypes.ListCreationInformation): IList;

@@ -74,4 +74,4 @@ /**

*/
query(oData:Settings.ODataSettings): ILists;
query(oData:ComplexTypes.ODataQuery): ILists;
}
}

@@ -1,2 +0,2 @@

declare module $REST.Settings {
declare module GD.ComplexTypes {

@@ -7,4 +7,4 @@ /**

interface MethodInfoSettings {
argNames?: [string];
argValues?: [any];
argNames?: Array<string>;
argValues?: Array<any>;
data?: any;

@@ -16,5 +16,5 @@ inheritMetadataType?: boolean;

requestMethod?: string;
requestType: $REST.Types.RequestType;
requestType: GD.Types.RequestType;
returnType?: string;
}
}

@@ -1,6 +0,6 @@

declare module $REST.Settings {
declare module GD.ComplexTypes {
/**
* OData Settings
*/
interface ODataSettings {
interface ODataQuery {
/** The fields to expand. */

@@ -7,0 +7,0 @@ Expand?: Array<string>;

@@ -1,2 +0,2 @@

declare module $REST.Types {
declare module GD.Types {
/**

@@ -3,0 +3,0 @@ * The promise class

@@ -1,2 +0,2 @@

declare module $REST.Types {
declare module GD.Types {
// Request Type

@@ -3,0 +3,0 @@ enum RequestType {

@@ -1,2 +0,2 @@

declare module $REST.Types {
declare module GD.Types {
/**

@@ -3,0 +3,0 @@ * Role Assignment

@@ -1,2 +0,2 @@

declare module $REST.Types {
declare module GD.Types {
/**

@@ -65,4 +65,4 @@ * RoleAssignments

*/
query(oData:Settings.ODataSettings): IRoleAssignments;
query(oData:ComplexTypes.ODataQuery): IRoleAssignments;
}
}

@@ -1,2 +0,2 @@

declare module $REST.Types {
declare module GD.Types {
/**

@@ -11,3 +11,3 @@ * Role Definition

/** Gets or sets a value that specifies the base permissions for the role definition. */
BasePermissions: any;
BasePermissions: ComplexTypes.BasePermissions;

@@ -18,6 +18,6 @@ /** Gets or sets a value that specifies the description of the role definition. */

/** Gets a value that specifies whether the role definition is displayed. */
Hidden: string;
Hidden: boolean;
/** Gets a value that specifies the Id of the role definition. */
Id: string;
Id: number;

@@ -28,6 +28,6 @@ /** Gets or sets a value that specifies the role definition name. */

/** Gets or sets a value that specifies the order position of the object in the site collection Permission Levels page. */
Order: string;
Order: number;
/** Gets a value that specifies the type of the role definition. Represents an SP.RoleType value. See RoleType in the .NET client object model reference for a list of role type values. */
RoleTypeKind: string;
RoleTypeKind: Types.RoleType;

@@ -34,0 +34,0 @@ /**

@@ -1,2 +0,2 @@

declare module $REST.Types {
declare module GD.Types {
/**

@@ -57,3 +57,3 @@ * Role Definitions

*/
getByType(roleType:$REST.Types.RoleType): IRoleDefinition;
getByType(roleType:GD.Types.RoleType): IRoleDefinition;

@@ -64,4 +64,4 @@ /**

*/
query(oData:Settings.ODataSettings): IRoleDefinitions;
query(oData:ComplexTypes.ODataQuery): IRoleDefinitions;
}
}

@@ -1,20 +0,3 @@

declare module $REST.Types {
declare module GD.Types {
/**
* Data Table
*/
interface IDataTable {
/** The rows. */
Rows: Array<IDataTableRow>;
}
/**
* Data Table Row
*/
interface IDataTableRow {
/** The cells. */
Cells: Array<Settings.KeyValuePair>
}
/**
* Search

@@ -25,6 +8,6 @@ */

* Constructor
* @param url - The optional url to execute the search against.
* @param settings - The search settings.
* @param targetInfo - (Optional) The target information.
*/
new(url?:string, targetInfo?:Settings.TargetInfoSettings): ISearch;
new(url?:string, settings?:ComplexTypes.TargetInfoSettings): ISearch;

@@ -36,105 +19,109 @@ /**

/** Method to execute a search query.
* @param settings - The query settings.
* @param settings - The search request settings.
*/
postquery(settings:Settings.SearchQueryCreationInformation) : IQuery;
postquery(settings:ComplexTypes.SearchRequest) : SearchPostQueryResult;
/** Method to execute a search query.
* @param settings - The query settings.
* @param settings - The search request settings.
*/
query(settings:Settings.SearchQueryCreationInformation) : IQuery;
query(settings:ComplexTypes.SearchRequest) : SearchQueryResult;
/** Method to execute a search suggestion.
* @param settings - The suggestion settings.
* @param settings - The search suggest settings.
*/
suggest(settings:Settings.SearchSuggestionCreationInformation) : ISuggestion;
suggest(settings:ComplexTypes.SearchSuggestion) : SearchSuggestionResult;
}
/**
* Query
* Search Query Result
*/
interface IQuery {
/** The primary query results. */
PrimaryQueryResult: IQueryResult;
interface SearchQueryResult extends Types.IBase {
query: ComplexTypes.SearchResult;
/** The properties. */
Properties: Array<Settings.KeyValuePair>;
/**
* Method to execute the request.
* @param callback - The method to be executed after the request completes.
*/
execute(callback?:(...args) => any): SearchQueryResult;
/** The secondary query results. */
SecondaryQueryResults: Array<IQueryResult>;
/**
* Method to execute the request.
* @param waitFl - Flag to execute the request, after the previous requests have completed.
*/
execute(waitFl:boolean): SearchQueryResult;
/** The spelling suggestions. */
SpellingSuggestions: any;
/**
* Method to execute the request.
* @param callback - The method to be executed after the request completes.
* @param waitFl - Flag to execute the request, after the previous requests have completed.
*/
execute(callback:any, waitFl:boolean): SearchQueryResult;
/** The trigger rules. */
TriggeredRules: Array<string>;
/**
* Method to execute the request synchronously.
*/
executeAndWait(): SearchQueryResult;
}
/**
* Query Result
* Search Post Query Result
*/
interface IQueryResult {
/** The custom results. */
CustomResults: Array<any>;
interface SearchPostQueryResult extends Types.IBase {
postquery: ComplexTypes.SearchResult;
/** The query id. */
QueryId: string;
/**
* Method to execute the request.
* @param callback - The method to be executed after the request completes.
*/
execute(callback?:(...args) => any): SearchPostQueryResult;
/** The query rule id. */
QueryRuleId: string;
/**
* Method to execute the request.
* @param waitFl - Flag to execute the request, after the previous requests have completed.
*/
execute(waitFl:boolean): SearchPostQueryResult;
/** The refinement results. */
RefinementResults: any;
/**
* Method to execute the request.
* @param callback - The method to be executed after the request completes.
* @param waitFl - Flag to execute the request, after the previous requests have completed.
*/
execute(callback:any, waitFl:boolean): SearchPostQueryResult;
/** The relevant results. */
RelevantResults: IRelevantResults;
/** The special term results. */
SpecialTermResults: any;
/**
* Method to execute the request synchronously.
*/
executeAndWait(): SearchPostQueryResult;
}
/**
* Relevant Results
* Search Suggestion Result
*/
interface IRelevantResults {
/** The group template id. */
GroupTemplateId: string;
interface SearchSuggestionResult extends Types.IBase {
suggest: ComplexTypes.QuerySuggestionResults;
/** The item template id. */
ItemTemplateId: string;
/**
* Method to execute the request.
* @param callback - The method to be executed after the request completes.
*/
execute(callback?:(...args) => any): SearchSuggestionResult;
/** The properties. */
Properties: Array<Settings.KeyValuePair>;
/**
* Method to execute the request.
* @param waitFl - Flag to execute the request, after the previous requests have completed.
*/
execute(waitFl:boolean): SearchSuggestionResult;
/** The result title. */
ResultTitle: string;
/**
* Method to execute the request.
* @param callback - The method to be executed after the request completes.
* @param waitFl - Flag to execute the request, after the previous requests have completed.
*/
execute(callback:any, waitFl:boolean): SearchSuggestionResult;
/** The result title url. */
ResultTitleUrl: string;
/** The row count. */
RowCount: number;
/** The table. */
Table: IDataTable;
/** The total rows. */
TotalRows: number;
/** The total rows including duplicates. */
TotalRowsIncludingDuplicates: number;
/**
* Method to execute the request synchronously.
*/
executeAndWait(): SearchSuggestionResult;
}
/**
* Suggestion
*/
interface ISuggestion {
/** The people names. */
PeopleNames: Array<string>;
/** The personal results. */
PersonalResults: Array<any>;
/** The queries. */
Queries: Array<any>;
}
}

@@ -1,2 +0,2 @@

declare module $REST.Types {
declare module GD.Types {
/**

@@ -11,3 +11,3 @@ * Site

*/
new(url?:string, targetInfo?:Settings.TargetInfoSettings): ISite;
new(url?:string, targetInfo?:ComplexTypes.TargetInfoSettings): ISite;

@@ -18,23 +18,44 @@ /**

/** A value that specifies whether creation of declarative workflows can be used on this site collection. */
AllowCreationDeclarativeWorkflow: boolean;
/** Gets or sets a value that specifies whether a designer can be used on this site collection. */
AllowDesigner: string;
AllowDesigner: boolean;
/** Gets or sets a value that specifies whether master page editing is allowed on this site collection. */
AllowMasterPageEditing: string;
AllowMasterPageEditing: boolean;
/** Gets or sets a value that specifies whether this site collection can be reverted to its base template. */
AllowRevertFromTemplate: string;
AllowRevertFromTemplate: boolean;
AllowSaveDeclarativeWorkflowAsTemplate: boolean;
AllowSavePublishDeclarativeWorkflow: boolean;
/** Whether version to version upgrade is allowed on this site. */
AllowSelfServiceUpgrade: string;
AllowSelfServiceUpgrade: boolean;
/** Whether upgrade evaluation site collection is allowed. */
AllowSelfServiceUpgradeEvaluation: string;
AllowSelfServiceUpgradeEvaluation: boolean;
Audit(): IAudit;
AuditLogTrimmingRetention: number;
/** Property indicating whether or not this object can be upgraded. */
CanUpgrade: string;
CanUpgrade: boolean;
Classification: string;
/** Gets the major version of this site collection for purposes of major version-level compatibility checks. */
CompatibilityLevel: string;
CurrentChangeToken: string;
DisableAppViews: boolean;
DisableCompanyWideSharingLinks: boolean;
DisableFlows: boolean;
/**

@@ -51,2 +72,4 @@ * Gets the event receivers associated with the site.

ExternalSharingTipsEnabled: boolean;
/**

@@ -57,2 +80,4 @@ * Gets a value that specifies the collection of the site collection features for the site collection that contains the site.

GroupId: string;
/** Gets the GUID that identifies the site collection. */

@@ -65,4 +90,6 @@ Id: string;

/** Gets a value that specifies the maximum number of list items allowed per operation before throttling will occur. */
MaxItemsPerThrottledOperation: string;
MaxItemsPerThrottledOperation: number;
NeedsB2BUpgrade: boolean;
/**

@@ -77,7 +104,9 @@ * Gets or sets the owner of the site collection. (Read-only in sandboxed solutions.)

/** Gets or sets a Boolean value that specifies whether the site collection is read-only, locked, and unavailable for write access. */
ReadOnly: string;
ReadOnly: boolean;
/** Gets a value that specifies the collection of recycle bin items for the site collection. */
RecycleBin: string;
RecycleBin(): IBase;
RequiredDesignerVersion: string;
/**

@@ -88,16 +117,32 @@ * Gets a value that returns the top-level site of the site collection.

SandboxedCodeActivationCapability: number;
SecondaryContact(): IBase;
ServerRelativePath: ComplexTypes.ResourcePath;
/** Gets the server-relative URL of the root Web site in the site collection. */
ServerRelativeUrl: string;
ShareByEmailEnabled: boolean;
ShowPeoplePickerSuggestionsForGuestUsers: boolean;
/** Property that indicates whether users will be able to share links to documents that can be accessed without logging in. */
ShareByLinkEnabled: string;
ShareByLinkEnabled: boolean;
/** Gets or sets a value that specifies whether the URL structure of this site collection is viewable. */
ShowUrlStructure: string;
ShowUrlStructure: boolean;
StatusBarLink: string;
StatusBarText: string;
TrimAuditLog: boolean;
/** Gets or sets a value that specifies whether the Visual Upgrade UI of this site collection is displayed. */
UiVersionConfigurationEnabled: string;
UIVersionConfigurationEnabled: boolean;
/** Specifies the upgrade information of this site collection. */
UpgradeInfo: string;
UpgradeInfo: ComplexTypes.UpgradeInfo;

@@ -107,4 +152,8 @@ /** Specifies a date, after which site collection administrators will be reminded to upgrade the site collection. */

UpgradeScheduled: boolean;
UpgradeScheduledDate: string;
/** Specifies whether the site is currently upgrading. */
Upgrading: string;
Upgrading: boolean;

@@ -115,3 +164,3 @@ /** Gets the full URL to the root Web site of the site collection, including host name, port number, and path. */

/** Gets a value that specifies usage information about the site, including bandwidth, storage, and the number of visits to the site collection. */
Usage: string;
Usage: ComplexTypes.UsageInfo;

@@ -118,0 +167,0 @@ /**

@@ -1,2 +0,2 @@

declare module $REST.Types {
declare module GD.Types {
/**

@@ -21,3 +21,3 @@ * Site Groups

*/
add(groupInfo:Settings.GroupCreationInformation): IGroup;
add(groupInfo:ComplexTypes.GroupCreationInformation): IGroup;

@@ -76,4 +76,4 @@ /**

*/
query(oData:Settings.ODataSettings): ISiteGroups;
query(oData:ComplexTypes.ODataQuery): ISiteGroups;
}
}

@@ -1,2 +0,2 @@

declare module $REST.Settings {
declare module GD.ComplexTypes {

@@ -3,0 +3,0 @@ /**

@@ -1,4 +0,18 @@

declare module $REST.Types {
declare module GD.Types {
/**
* Check Out Types
*/
enum CheckOutType {
/** Online */
Online = 0,
/** Offline */
Offline = 1,
/** None */
None = 2
}
/**
* Control Modes

@@ -616,5 +630,39 @@ */

/**
* Master Page Gallery Types
*/
/*
enum MasterPageGalleryType {
DisplayTemplateControl = <any>"0x0101002039C03B61C64EC4A04F5361F385106601",
DisplayTemplateItem = <any>"0x0101002039C03B61C64EC4A04F5361F385106603",
MasterPage = <any>"0x01010500A8B69F8A072C384090BB2F363986E5EA",
PageLayout = <any>"0x01010007FF3E057FA8AB4AA42FCB67B453FFC100E214EEE741181F4E9F7ACC43278EE811",
}
*/
/**
* Page Layout Types
*/
/*
enum PageLayoutType {
Article = <any>";#Article Page;#0x010100C568DB52D9D0A14D9B2FDCC96666E9F2007948130EC3DB064584E219954237AF3900242457EFB8B24247815D688C526CD44D;#"
}
*/
/**
* Personal Site Capabilities
*/
enum PersonalSiteCapabilities {
Education = 16,
Guest = 32,
MyTasksDashboard = 8,
None = 0,
Profile = 1,
Social = 2,
Storage = 4
}
/**
* Reordering Rule Match Types
*/
enum ReordingRuleMathType {
enum ReordingRuleMatchType {
ResultContainsKeyword,

@@ -699,2 +747,3 @@ TitleContainsKeyword,

}
}

@@ -1,2 +0,2 @@

declare module $REST.Types {
declare module GD.Types {
/**

@@ -28,6 +28,8 @@ * User

/** Gets a value that indicates whether this member should be hidden in the UI. */
IsHiddenInUI: string;
IsHiddenInUI: boolean;
IsSharedByEmailGuestUser: boolean;
/** Gets or sets a Boolean value that specifies whether the user is a site collection administrator. */
IsSiteAdmin: string;
IsSiteAdmin: boolean;

@@ -34,0 +36,0 @@ /** Gets the login name of the user. */

@@ -1,2 +0,2 @@

declare module $REST.Types {
declare module GD.Types {
/**

@@ -34,10 +34,10 @@ * User Custom Action

/** Gets or sets the value that specifies the type of object associated with the custom action. Represents an SP.UserCustomActionRegistrationType value: None = 0; List = 1; ContentType = 2; ProgId = 3; FileType = 4. */
RegistrationType: string;
/** Gets or sets the value that specifies the type of object associated with the custom action. */
RegistrationType: Types.UserCustomActionRegistrationType;
/** Gets or sets the value that specifies the permissions needed for the custom action. */
Rights: string;
Rights: ComplexTypes.BasePermissions;
/** Gets a value that specifies the scope of the custom action. */
Scope: string;
Scope: number;

@@ -51,3 +51,3 @@ /** Gets or sets the value that specifies the ECMAScript to be executed when the custom action is performed. */

/** Gets or sets the value that specifies an implementation-specific value that determines the order of the custom action that appears on the page. */
Sequence: string;
Sequence: number;

@@ -54,0 +54,0 @@ /** Gets or sets the display title of the custom action. */

@@ -1,2 +0,2 @@

declare module $REST.Types {
declare module GD.Types {
/**

@@ -21,3 +21,3 @@ * User Custom Actions

*/
add(parameters:Settings.UserCustomActionCreationInformation): IUserCustomAction;
add(parameters:ComplexTypes.UserCustomActionCreationInformation): IUserCustomAction;

@@ -63,4 +63,4 @@ /**

*/
query(oData:Settings.ODataSettings): IUserCustomActions;
query(oData:ComplexTypes.ODataQuery): IUserCustomActions;
}
}

@@ -1,2 +0,2 @@

declare module $REST.Types {
declare module GD.Types {
/**

@@ -21,3 +21,3 @@ * Users

*/
add(userInfo:Settings.UserCreationInformation): IUser;
add(userInfo:ComplexTypes.UserCreationInformation): IUser;

@@ -82,4 +82,4 @@ /**

*/
query(oData:Settings.ODataSettings): IUsers;
query(oData:ComplexTypes.ODataQuery): IUsers;
}
}

@@ -1,2 +0,2 @@

declare module $REST.Types {
declare module GD.Types {
/**

@@ -62,2 +62,8 @@ * Versions

/**
* Queries the collection.
* @param oData - The OData information.
*/
query(oData:ComplexTypes.ODataQuery): IVersions;
/**
* Restores a version, by the specified label.

@@ -64,0 +70,0 @@ * @param label - The version label to restore.

@@ -1,2 +0,2 @@

declare module $REST.Types {
declare module GD.Types {
/**

@@ -20,12 +20,12 @@ * View

/** Gets or sets the identifier of the content type with which the view is associated so that the view is available only on folders of this content type. */
ContentTypeId: string;
ContentTypeId: ComplexTypes.ContentTypeId;
/** Gets or sets a value that specifies whether the list view is the default list view. */
DefaultView: string;
DefaultView: boolean;
/** Gets or sets a value that specifies whether the list view is the default list view for the content type specified by contentTypeId. */
DefaultViewForContentType: string;
DefaultViewForContentType: boolean;
/** Gets or sets a value that specifies whether the list view was modified in an editor. */
EditorModified: string;
EditorModified: boolean;

@@ -36,3 +36,3 @@ /** Gets or sets a value that specifies the column and row formatting for the list view. If not null, the XML must conform to ViewFormatDefinitions, as specified in [MS-WSSCAML]. */

/** Gets or sets a value that specifies whether the list view is hidden. */
Hidden: string;
Hidden: boolean;

@@ -49,3 +49,3 @@ /** Gets a value that specifies the XML document that represents the list view. */

/** Gets or sets a value that specifies whether the current folder is displayed in the list view. */
IncludeRootFolder: string;
IncludeRootFolder: boolean;

@@ -62,6 +62,6 @@ /** Gets or sets the name of the JavaScript file used for the view. */

/** Gets or sets a value that specifies whether the list view is the default mobile list view. */
MobileDefaultView: string;
MobileDefaultView: boolean;
/** Gets or sets a value that specifies whether the list view is a mobile list view. */
MobileView: string;
MobileView: boolean;

@@ -72,21 +72,21 @@ /** Gets a value that specifies the content approval type for the list view. */

/** Gets a value that specifies whether list items can be reordered in the list view. */
OrderedView: string;
OrderedView: boolean;
/** Gets or sets a value that specifies whether the list view is a paged view. */
Paged: string;
Paged: boolean;
/** Gets a value that specifies whether the list view is a personal view. */
PersonalView: string;
PersonalView: boolean;
/** Gets a value that specifies whether the list view is read-only. */
ReadOnlyView: string;
ReadOnlyView: boolean;
/** Gets a value that specifies whether the list view requires client integration rights. */
RequiresClientIntegration: string;
RequiresClientIntegration: boolean;
/** Gets or sets a value that specifies the maximum number of list items to display in a visual page of the list view. */
RowLimit: string;
RowLimit: number;
/** Gets or sets a value that specifies the scope for the list view. Represents a ViewScope value. DefaultValue = 0, Recursive = 1, RecursiveAll = 2, FilesOnly = 3. */
Scope: string;
Scope: number;

@@ -99,4 +99,6 @@ /** Gets a value that specifies the server-relative URL of the list view page. */

TabularView: boolean;
/** Gets a value that specifies whether the list view is a threaded view. */
Threaded: string;
Threaded: boolean;

@@ -115,2 +117,4 @@ /** Gets or sets a value that specifies the display name of the list view. */

VisualizationInfo: ComplexTypes.Visualization;
/**

@@ -117,0 +121,0 @@ * Gets a value that specifies the collection of fields in the list view.

@@ -1,2 +0,2 @@

declare module $REST.Types {
declare module GD.Types {
/**

@@ -14,3 +14,3 @@ * View Fields

/** Specifies the XML schema of the collection of fields. The Items property is returned with the resource, but it doesn't have a URI-addressable endpoint. */
Items: string;
Items: Results.String;

@@ -76,4 +76,4 @@ /** The view field collection. */

*/
query(oData:Settings.ODataSettings): IViewFields;
query(oData:ComplexTypes.ODataQuery): IViewFields;
}
}

@@ -1,2 +0,2 @@

declare module $REST.Types {
declare module GD.Types {
/**

@@ -20,3 +20,3 @@ * Views

*/
add(parameters:Settings.ViewCreationInformation): IView;
add(parameters:ComplexTypes.ViewCreationInformation): IView;

@@ -63,4 +63,4 @@ /**

*/
query(oData:Settings.ODataSettings): IViews;
query(oData:ComplexTypes.ODataQuery): IViews;
}
}

@@ -1,2 +0,2 @@

declare module $REST.Types {
declare module GD.Types {
/**

@@ -11,3 +11,3 @@ * Web

*/
new(url?:string, targetInfo?:Settings.TargetInfoSettings): IWeb;
new(url?:string, targetInfo?:ComplexTypes.TargetInfoSettings): IWeb;

@@ -34,2 +34,7 @@ /**

/**
* Property Bag
*/
AllProperties(): IPropertyValues;
/**
* Gets a value that specifies whether the current user is allowed to revert the site to a default site template.

@@ -40,3 +45,3 @@ */

/** Gets a value that specifies whether the site allows RSS feeds. */
AllowRssFeeds: string;
AllowRssFeeds: boolean;

@@ -61,2 +66,4 @@ /**

AppTiles(): IBase;
/**

@@ -77,2 +84,4 @@ * Gets or sets the group of users who have been given contribute permissions to the Web site.

Author(): IUser;
/**

@@ -88,4 +97,6 @@ * Gets the collection of all content types that apply to the current scope, including those of the current Web site, as well as any parent Web sites.

ClientWebParts(): IBase;
/** Gets either the identifier (ID) of the site definition configuration that was used to create the site, or the ID of the site definition configuration from which the site template used to create the site was derived. */
Configuration: string;
Configuration: number;

@@ -114,5 +125,9 @@ /**

DataLeakagePreventionStatusInfo(): IBase;
/** Gets or sets the description for the site. */
Description: string;
DescriptionResource(): ComplexTypes.ResourcePath;
/**

@@ -124,3 +139,3 @@ * Gets the URL where the current user can download SharePoint Designer.

/** Determines if the Document Library Callout's WAC previewers are enabled or not. */
DocumentLibraryCalloutOfficeWebAppPreviewersDisabled: string;
DocumentLibraryCalloutOfficeWebAppPreviewersDisabled: boolean;

@@ -133,4 +148,6 @@ /**

/** Gets or sets a Boolean value that specifies whether the Web site should use Minimal Download Strategy. */
EnableMinimalDownload: string;
EnableMinimalDownload: boolean;
ExcludeFromOfflineClient: boolean;
/**

@@ -178,3 +195,3 @@ * Gets the event receivers associated with the web.

/** Gets a value that specifies the LCID for the language that is used on the site. */
Language: string;
Language: boolean;

@@ -209,2 +226,4 @@ /** Gets a value that specifies when an item was last modified in the site. */

MembersCanShare: boolean;
/**

@@ -215,2 +234,10 @@ * Gets a value that specifies the navigation structure on the site, including the Quick Launch area and the top navigation bar.

NoCrawl: boolean;
NotificationsInOneDriveForBusinessEnabled: boolean;
NotificationsInSharePointEnabled: boolean;
OverwriteTranslationsOnChange: boolean;
/**

@@ -221,2 +248,4 @@ * Gets the parent website of the specified website.

PreviewFeaturesEnabled: boolean;
/**

@@ -228,3 +257,3 @@ * Gets the collection of push notification subscribers over the site.

/** Gets or sets a value that specifies whether the Quick Launch area is enabled on the site. */
QuickLaunchEnabled: string;
QuickLaunchEnabled: boolean;

@@ -237,3 +266,3 @@ /**

/** Gets or sets a value that determines whether the recycle bin is enabled for the website. */
RecycleBinEnabled: string;
RecycleBinEnabled: boolean;

@@ -245,2 +274,4 @@ /**

RequestAccessEmail: string;
/**

@@ -271,3 +302,5 @@ * Gets the role definitions for the web.

*/
SaveSiteAsTemplateEnabled(): IBase;
SaveSiteAsTemplateEnabled: boolean;
ServerRelativePath: ComplexTypes.ResourcePath;

@@ -293,2 +326,6 @@ /** Gets or sets the server-relative URL for the Web site. */

SiteLogoDescription: string;
SiteLogoUrl: string;
/**

@@ -313,7 +350,13 @@ * Gets the UserInfo list of the site collection that contains the Web site.

*/
SupportedUILanguageIds(): IBase;
SupportedUILanguageIds(): Results.Number;
/** Gets or sets a value that specifies whether the RSS feeds are enabled on the site. */
SyndicationEnabled: string;
SyndicationEnabled: boolean;
TenantTagPolicyEnabled: boolean;
ThemeData: string;
ThemedCssFolderUrl: string;
/**

@@ -324,13 +367,17 @@ * The theming information for this site. This includes information like colors, fonts, border radii sizes etc.

ThirdPartyMdmEnabled: boolean;
/** Gets or sets the title for the Web site. */
Title: string;
TitleResource(): ComplexTypes.ResourcePath;
/** Gets or sets value that specifies whether the tree view is enabled on the site. */
TreeViewEnabled: string;
TreeViewEnabled: boolean;
/** Gets or sets the user interface (UI) version of the Web site. */
UIVersion: string;
UIVersion: number;
/** Gets or sets a value that specifies whether the settings UI for visual upgrade is shown or hidden. */
UIVersionConfigurationEnabled: string;
UIVersionConfigurationEnabled: boolean;

@@ -337,0 +384,0 @@ /** Gets the absolute URL for the website. */

@@ -1,2 +0,2 @@

declare module $REST.Types {
declare module GD.Types {
/**

@@ -21,3 +21,3 @@ * Webs

*/
add(parameters:Settings.WebCreationInformation): IWeb;
add(parameters:ComplexTypes.WebCreationInformation): IWeb;

@@ -52,4 +52,4 @@ /**

*/
query(oData:Settings.ODataSettings): IWebs;
query(oData:ComplexTypes.ODataQuery): IWebs;
}
}

@@ -1,2 +0,2 @@

module $REST {
module GD {
/*********************************************************************************************************************************/

@@ -7,9 +7,9 @@ // Helper Methods

// Method to copy a file in this app web to the host web
static copyFileToHostWeb(fileUrl:string, dstFolder:(string | $REST.Types.IFolder), overwriteFl?:boolean) {
static copyFileToHostWeb(fileUrl:string, dstFolder:(string | GD.Types.IFolder), overwriteFl?:boolean) {
let srcFile = null;
let promise = new $REST.Utils.Promise();
let origVal = $REST.DefaultRequestToHostWebFl;
let promise = new GD.Utils.Promise();
let origVal = GD.DefaultRequestToHostWebFl;
// Ensure the current web is an app web
if(!window["_spPageContextInfo"].isAppWeb) {
if(!Utils.ContextInfo.isAppWeb) {
// Error

@@ -21,4 +21,4 @@ console.error("[gd-sprest] The current web is not an app web.");

//Get the host web
$REST.DefaultRequestToHostWebFl = true;
let web = (<$REST.Types.IWeb><any>new $REST.Web());
GD.DefaultRequestToHostWebFl = true;
let web = (<GD.Types.IWeb><any>new GD.Web());

@@ -42,3 +42,3 @@ // See if the folder url was given

let dstFileUrl = window["SP"].Utilities.UrlBuilder.urlCombine(dstFolder.ServerRelativeUrl, fileName);
let srcFileUrl = window["SP"].Utilities.UrlBuilder.urlCombine(window["_spPageContextInfo"].webServerRelativeUrl, fileUrl.substr(fileUrl[0] == "/" ? 1 : 0));
let srcFileUrl = window["SP"].Utilities.UrlBuilder.urlCombine(Utils.ContextInfo.webServerRelativeUrl, fileUrl.substr(fileUrl[0] == "/" ? 1 : 0));

@@ -48,4 +48,4 @@ // Get the destination file

// Execute the request
.execute((file:$REST.Types.IFile) => {
let promise = new $REST.Utils.Promise();
.execute((file:GD.Types.IFile) => {
let promise = new GD.Utils.Promise();

@@ -66,3 +66,3 @@ // See if the file exists

// Target the current web
$REST.DefaultRequestToHostWebFl = false;
GD.DefaultRequestToHostWebFl = false;

@@ -74,4 +74,4 @@ // Get the file

// Execute the request
.execute((content:$REST.Types.IBase) => {
let promise = new $REST.Utils.Promise();
.execute((content:GD.Types.IBase) => {
let promise = new GD.Utils.Promise();

@@ -83,8 +83,8 @@ // Get the file name

// Target the host web
$REST.DefaultRequestToHostWebFl = true;
GD.DefaultRequestToHostWebFl = true;
// Add the file to the folder
(<$REST.Types.IFolder>dstFolder).Files().add(true, fileName, content.response)
(<GD.Types.IFolder>dstFolder).Files().add(true, fileName, content.response)
// Execute the request
.execute((file:$REST.Types.IFile) => {
.execute((file:GD.Types.IFile) => {
// Save a reference to this file

@@ -119,3 +119,3 @@ srcFile = file;

// Method to copy a file in this app web to the host web
static copyFilesToHostWeb(fileUrls:Array<string>, folderUrls:Array<string>, overwriteFl?:boolean, idx?:number, promise?:Utils.Promise, files?:Array<$REST.Types.IFile>, folders?:Array<$REST.Types.IFolder>) {
static copyFilesToHostWeb(fileUrls:Array<string>, folderUrls:Array<string>, overwriteFl?:boolean, idx?:number, promise?:Utils.Promise, files?:Array<GD.Types.IFile>, folders?:Array<GD.Types.IFolder>) {
files = files ? files : [];

@@ -150,3 +150,3 @@ folders = folders ? folders : [];

// Method to create sub-folders
static createSubFolders(folder:Types.IFolder, subFolderUrl:string, promise?:Utils.Promise): $REST.Utils.Promise {
static createSubFolders(folder:Types.IFolder, subFolderUrl:string, promise?:Utils.Promise): GD.Utils.Promise {
// Ensure the promise exists

@@ -190,5 +190,5 @@ promise = promise ? promise : new Utils.Promise();

// Method to get a folder
static getFolder(web:$REST.Types.IWeb, folderUrl:string, createFl?:boolean) {
static getFolder(web:GD.Types.IWeb, folderUrl:string, createFl?:boolean) {
let dstFolder = null;
let promise = new $REST.Utils.Promise();
let promise = new GD.Utils.Promise();

@@ -209,4 +209,4 @@ // Ensure the web exists

// Execute the request
.execute((folder:$REST.Types.IFolder) => {
let promise = new $REST.Utils.Promise();
.execute((folder:GD.Types.IFolder) => {
let promise = new GD.Utils.Promise();

@@ -247,3 +247,3 @@ // Ensure the folder exists

// Method to remove empty folders
static removeEmptyFolders(web:$REST.Types.IWeb, folderUrls:Array<string>) {
static removeEmptyFolders(web:GD.Types.IWeb, folderUrls:Array<string>) {
let promise = new Utils.Promise();

@@ -277,3 +277,3 @@

// Execute the request
folder.execute((folder:$REST.Types.IFolder) => {
folder.execute((folder:GD.Types.IFolder) => {
let promise = new Utils.Promise();

@@ -304,3 +304,3 @@

// Method to remove a file
static removeFile(web:$REST.Types.IWeb, fileUrl:string) {
static removeFile(web:GD.Types.IWeb, fileUrl:string) {
let promise = new Utils.Promise();

@@ -317,3 +317,3 @@ let folder = null;

// Get the file
folder.Files(folders[folders.length-1]).execute((file:$REST.Types.IFile) => {
folder.Files(folders[folders.length-1]).execute((file:GD.Types.IFile) => {
// See if it exists

@@ -334,3 +334,3 @@ if(file.Exists) {

// Method to remove files
static removeFiles(web:$REST.Types.IWeb, fileUrls:Array<string>, idx?:number, promise?:Utils.Promise) {
static removeFiles(web:GD.Types.IWeb, fileUrls:Array<string>, idx?:number, promise?:Utils.Promise) {
idx = idx ? idx : 0;

@@ -337,0 +337,0 @@ promise = promise ? promise : new Utils.Promise();

@@ -1,2 +0,2 @@

module $REST {
module GD {
/*********************************************************************************************************************************/

@@ -3,0 +3,0 @@ // Methods

@@ -1,4 +0,4 @@

module $REST {
module GD {
/*********************************************************************************************************************************/
// Methods
// Library
/*********************************************************************************************************************************/

@@ -22,4 +22,2 @@ Library.attachmentfiles = {

};
// { name: "addFile", "function": function (file) { var thisObj = this; var promise = new Promise(); window["dev"].getFileInfo(file).done(function (name, buffer) { if (name && buffer) { thisObj.add(name, buffer).done(function (file) { promise.resolve(file); }); } else { promise.resolve(); } }); return promise; } },
}

@@ -1,2 +0,2 @@

module $REST {
module GD {
Library.contenttype = {

@@ -3,0 +3,0 @@ /*********************************************************************************************************************************/

@@ -1,2 +0,2 @@

module $REST {
module GD {
/*********************************************************************************************************************************/

@@ -3,0 +3,0 @@ // Methods

@@ -1,2 +0,2 @@

module $REST {
module GD {
/*********************************************************************************************************************************/

@@ -6,3 +6,3 @@ // Email

/*********************************************************************************************************************************/
export class Email extends Base {
class _Email extends Base {

@@ -12,3 +12,3 @@ /*********************************************************************************************************************************/

/*********************************************************************************************************************************/
constructor(targetInfo?:Settings.TargetInfoSettings) {
constructor(targetInfo?:ComplexTypes.TargetInfoSettings) {
// Call the base constructor

@@ -57,2 +57,3 @@ super(targetInfo);

}
export let Email = new _Email();
}

@@ -1,2 +0,2 @@

module $REST {
module GD {
/*********************************************************************************************************************************/

@@ -3,0 +3,0 @@ // Methods

@@ -1,2 +0,2 @@

module $REST {
module GD {
/*********************************************************************************************************************************/

@@ -3,0 +3,0 @@ // Methods

@@ -1,2 +0,2 @@

module $REST {
module GD {
/*********************************************************************************************************************************/

@@ -3,0 +3,0 @@ // Methods

@@ -1,2 +0,2 @@

module $REST {
module GD {
/*********************************************************************************************************************************/

@@ -3,0 +3,0 @@ // Methods

@@ -1,2 +0,2 @@

module $REST {
module GD {
/*********************************************************************************************************************************/

@@ -3,0 +3,0 @@ // Methods

@@ -1,2 +0,2 @@

module $REST {
module GD {
/*********************************************************************************************************************************/

@@ -13,3 +13,3 @@ // Library

"Author|user", "CheckedOutByUser|user", "EffectiveInformationRightsManagementSettings", "InformationRightsManagementSettings",
"ListItemAllFields", "LockedByUser|user", "ModifiedBy|user", "Properties", "VersionEvents", "Versions|fileversions"
"ListItemAllFields", "LockedByUser|user", "ModifiedBy|user", "Properties|propertyvalues", "VersionEvents", "Versions|fileversions"
],

@@ -16,0 +16,0 @@

@@ -1,2 +0,2 @@

module $REST {
module GD {
/*********************************************************************************************************************************/

@@ -3,0 +3,0 @@ // Methods

@@ -1,2 +0,2 @@

module $REST {
module GD {
Library.fileversion = {

@@ -3,0 +3,0 @@ /*********************************************************************************************************************************/

@@ -1,2 +0,2 @@

module $REST {
module GD {
/*********************************************************************************************************************************/

@@ -3,0 +3,0 @@ // Methods

@@ -1,2 +0,2 @@

module $REST {
module GD {
Library.folder = {

@@ -9,3 +9,3 @@ /*********************************************************************************************************************************/

"Files|files|/getByUrl('[Name]')|file", "Folders|folders|/getByUrl('[Name]')|folder", "ListItemAllFields",
"ParentFolder|folder", "Properties", "StorageMetrics"
"ParentFolder|folder", "Properties|propertyvalues", "StorageMetrics"
],

@@ -12,0 +12,0 @@

@@ -1,2 +0,2 @@

module $REST {
module GD {
/*********************************************************************************************************************************/

@@ -10,4 +10,4 @@ // Library

properties: [
"Files|files|/getByUrl('[Name]')|file", "Folders|folders|/getByUrl('[Name]')|folder", "ListItemAllFields", "ParentFolder",
"Properties", "StorageMetrics"
"Files|files|/getByUrl('[Name]')|file", "Folders|folders|/getByUrl('[Name]')|folder", "ListItemAllFields",
"ParentFolder", "StorageMetrics"
],

@@ -14,0 +14,0 @@

@@ -1,2 +0,2 @@

module $REST {
module GD {
Library.group = {

@@ -3,0 +3,0 @@ /*********************************************************************************************************************************/

@@ -1,2 +0,2 @@

module $REST {
module GD {
/*********************************************************************************************************************************/

@@ -3,0 +3,0 @@ // Methods

@@ -1,2 +0,2 @@

module $REST {
module GD {
/*********************************************************************************************************************************/

@@ -3,0 +3,0 @@ // Methods

@@ -1,2 +0,2 @@

module $REST {
module GD {
/*********************************************************************************************************************************/

@@ -10,3 +10,3 @@ // List

/*********************************************************************************************************************************/
constructor(listName:string, targetInfo?:Settings.TargetInfoSettings) {
constructor(listName:string, targetInfo?:ComplexTypes.TargetInfoSettings) {
// Call the base constructor

@@ -13,0 +13,0 @@ super(targetInfo);

@@ -1,2 +0,2 @@

module $REST {
module GD {
Library.listitem = {

@@ -10,3 +10,3 @@ /*********************************************************************************************************************************/

"File|file", "FirstUniqueAncestorSecurableObject", "Folder|folder", "GetDlpPolicyTip", "ParentList|list",
"RoleAssignments|roleassignments|roleassignments|([Name])|roleassignment"
"Properties|propertyvalues", "RoleAssignments|roleassignments|roleassignments|([Name])|roleassignment"
],

@@ -13,0 +13,0 @@

@@ -1,2 +0,2 @@

module $REST {
module GD {
/*********************************************************************************************************************************/

@@ -3,0 +3,0 @@ // Methods

@@ -1,13 +0,120 @@

module $REST {
module GD {
/*********************************************************************************************************************************/
// People Manager
/*********************************************************************************************************************************/
Library.peoplemanager = {};
Library.peoplemanager[Types.RequestType.Get] = [
"amlFollowedBy", "amlFollowing", "getFollowedTags", "getFollowersFor", "getMyFollowers", "getMyProperties", "getMySuggestions",
"getPeopleFollowedBy", "getPeopleFollowedByMe", "getPropertiesFor", "getUserProfilePropertyFor"
];
Library.peoplemanager[Types.RequestType.GetAppendMethodToEndPoint] = ["getTrendingTags", "isFollowing"];
Library.peoplemanager[Types.RequestType.Post] = ["follow", "followTag", "hideSuggestion", "stopFollowing", "stopFollowingTag"];
Library.peoplemanager[Types.RequestType.PostDataInBody] = ["setMyProfilePicture"];
}
export class PeopleManager extends Base {
/*********************************************************************************************************************************/
// Constructor
/*********************************************************************************************************************************/
constructor(targetInfo?:ComplexTypes.TargetInfoSettings) {
// Call the base constructor
super(targetInfo);
// Default the properties
this.defaultToWebFl = true;
this.responses = [];
this.targetInfo.endpoint = "sp.userprofiles.peoplemanager";
// Add the methods
this.addMethods(this, { __metadata: { type: "peoplemanager" } } );
}
}
/*********************************************************************************************************************************/
// Methods
/*********************************************************************************************************************************/
Library.peoplemanager = {
amIFollowedBy:{
argNames: ["accountName"],
requestType: Types.RequestType.GetWithArgsInQS
},
amIFollowing:{
argNames: ["accountName"],
requestType: Types.RequestType.GetWithArgsInQS
},
follow:{
argNames: ["accountName"],
requestType: Types.RequestType.PostWithArgsInQS
},
followTag:{
argNames: ["id"],
requestType: Types.RequestType.PostWithArgsValueOnly
},
getFollowedTags:{
argNames: ["maxCount"],
requestType: Types.RequestType.GetWithArgsValueOnly
},
getFollowersFor:{
argNames: ["accountName"],
requestType: Types.RequestType.GetWithArgsInQS
},
getMyFollowers:{
requestType: Types.RequestType.Get
},
getMyProperties:{
requestType: Types.RequestType.Get
},
getMySuggestions:{
requestType: Types.RequestType.Get
},
getPeopleFollowedBy:{
argNames: ["accountName"],
requestType: Types.RequestType.GetWithArgsInQS
},
getPeopleFollowedByMe:{
requestType: Types.RequestType.Get
},
getPropertiesFor:{
argNames: ["accountName"],
requestType: Types.RequestType.GetWithArgsInQS
},
getTrendingTags:{
name: "sp.userprofiles.peoplemanager.gettrendingtags",
replaceEndpointFl: true,
requestType: Types.RequestType.Get
},
getUserProfilePropertyFor:{
argNames: ["accountName", "propertyName"],
requestType: Types.RequestType.GetWithArgsInQS
},
hideSuggestion:{
argNames: ["accountName"],
requestType: Types.RequestType.PostWithArgsInQS
},
isFollowing:{
argNames: ["possibleFollowerAccountName", "possibleFolloweeAccountName"],
name: "sp.userprofiles.peoplemanager.isfollowing",
replaceEndpointFl: true,
requestType: Types.RequestType.GetWithArgsInQS
},
setMyProfilePicture:{
requestType: Types.RequestType.PostWithArgsInBody
},
stopFollowing:{
argNames: ["accountName"],
requestType: Types.RequestType.PostWithArgsInQS
},
stopFollowingTag:{
argNames: ["id"],
requestType: Types.RequestType.PostWithArgsValueOnly
},
}
}

@@ -1,9 +0,45 @@

module $REST {
module GD {
/*********************************************************************************************************************************/
// Profile Loader
/*********************************************************************************************************************************/
export class ProfileLoader extends Base {
/*********************************************************************************************************************************/
// Constructor
/*********************************************************************************************************************************/
constructor(targetInfo?:ComplexTypes.TargetInfoSettings) {
// Call the base constructor
super(targetInfo);
// Default the properties
this.defaultToWebFl = true;
this.responses = [];
this.targetInfo.endpoint = "sp.userprofiles.profileloader.getprofileloader";
this.targetInfo.method = "POST";
// Add the methods
this.addMethods(this, { __metadata: { type: "profileloader" } } );
}
}
/*********************************************************************************************************************************/
// Methods
/*********************************************************************************************************************************/
Library.profileloader = {
//Library.[Types.RequestType.Post] = ["getOwnerUserProfile", "getUserProfile"];
//Library.profileloader[Types.RequestType.PostDataInBody] = ["createPersonalSiteEnqueueBulk"];
createPersonalSiteEnqueueBulk:{
argNames: ["emailIDs"],
requestType: Types.RequestType.PostWithArgsInBody
},
getOwnerUserProfile:{
name: "sp.userprofiles.profileloader.getowneruserprofile",
replaceEndpointFl: true,
requestType: Types.RequestType.Post,
returnType: "userprofile"
},
getUserProfile:{
requestType: Types.RequestType.Post,
returnType: "userprofile"
},
};
}

@@ -1,2 +0,2 @@

module $REST {
module GD {
Library.roleassignment = {

@@ -3,0 +3,0 @@ /*********************************************************************************************************************************/

@@ -1,2 +0,2 @@

module $REST {
module GD {
/*********************************************************************************************************************************/

@@ -3,0 +3,0 @@ // Methods

@@ -1,2 +0,2 @@

module $REST {
module GD {
/*********************************************************************************************************************************/

@@ -3,0 +3,0 @@ // Methods

@@ -1,2 +0,2 @@

module $REST {
module GD {
/*********************************************************************************************************************************/

@@ -3,0 +3,0 @@ // Methods

@@ -1,2 +0,2 @@

module $REST {
module GD {
/*********************************************************************************************************************************/

@@ -9,3 +9,3 @@ // Search

/*********************************************************************************************************************************/
constructor(url?:string, targetInfo?:Settings.TargetInfoSettings) {
constructor(url?:string, targetInfo?:ComplexTypes.TargetInfoSettings) {
// Call the base constructor

@@ -28,2 +28,40 @@ super(targetInfo);

}
/*********************************************************************************************************************************/
// Methods
/*********************************************************************************************************************************/
// Method to compute the argument names
private getArgNames(parameters) {
let argNames = [];
// Parse the arguments
for(let key in parameters) {
// Append the argument to the array
argNames.push(key);
}
// Return the argument names
return argNames;
}
/** The query method */
query(settings:ComplexTypes.SearchRequest) {
// Execute the request
return this.executeMethod("query", {
argNames: this.getArgNames(settings),
name: "query",
requestType: Types.RequestType.GetWithArgs
}, settings);
}
/** The suggest method */
suggest(settings:ComplexTypes.SearchSuggestion) {
// Execute the request
return this.executeMethod("suggest", {
argNames: this.getArgNames(settings),
name: "suggest",
requestType: Types.RequestType.GetWithArgs
}, settings);
}
}

@@ -35,8 +73,2 @@

Library.search = {
query: {
argNames: ["settings"],
metadataType: "Microsoft.Office.Server.Search.REST.SearchRequest",
requestType: Types.RequestType.GetWithArgsInQS
},
postquery: {

@@ -46,10 +78,4 @@ argNames: ["request"],

requestType: Types.RequestType.PostWithArgsInBody
},
suggest: {
argNames: ["queryText"],
metadataType: "Microsoft.Office.Server.Search.REST.SearchRequest",
requestType: Types.RequestType.GetWithArgs
}
}
}

@@ -1,2 +0,2 @@

module $REST {
module GD {
/*********************************************************************************************************************************/

@@ -10,3 +10,3 @@ // Site

/*********************************************************************************************************************************/
constructor(url?:string, targetInfo?:Settings.TargetInfoSettings) {
constructor(url?:string, targetInfo?:ComplexTypes.TargetInfoSettings) {
// Call the base constructor

@@ -13,0 +13,0 @@ super(targetInfo);

@@ -1,2 +0,2 @@

module $REST {
module GD {
/*********************************************************************************************************************************/

@@ -3,0 +3,0 @@ // Methods

@@ -1,2 +0,2 @@

module $REST {
module GD {
Library.user = {

@@ -3,0 +3,0 @@ /*********************************************************************************************************************************/

@@ -1,2 +0,2 @@

module $REST {
module GD {
/*********************************************************************************************************************************/

@@ -3,0 +3,0 @@ // Methods

@@ -1,2 +0,2 @@

module $REST {
module GD {
/*********************************************************************************************************************************/

@@ -3,0 +3,0 @@ // Methods

@@ -1,10 +0,48 @@

module $REST {
module GD {
/*********************************************************************************************************************************/
// User Profile
/*********************************************************************************************************************************/
Library.userprofile = {};
Library.userprofile[Types.RequestType.Post] = ["createPersonalSiteEnque", "shareAllSocialData"];
Library.userprofile[Types.RequestType.Custom] = [
{ name: "getOneDriveUrl", "function": function () { return this.FollowPersonalSiteUrl + "_layouts/15/onedrive.aspx" } }
];
export class UserProfile extends Base {
/*********************************************************************************************************************************/
// Constructor
/*********************************************************************************************************************************/
constructor(targetInfo?:ComplexTypes.TargetInfoSettings) {
// Call the base constructor
super(targetInfo);
// Default the properties
this.defaultToWebFl = true;
this.responses = [];
this.targetInfo.endpoint = "sp.userprofiles.profileloader.getprofileloader/getUserProfile";
this.targetInfo.method = "POST";
// Add the methods
this.addMethods(this, { __metadata: { type: "userprofile" } } );
}
}
/*********************************************************************************************************************************/
// Methods
/*********************************************************************************************************************************/
Library.userprofile = {
/*********************************************************************************************************************************/
// Properties
/*********************************************************************************************************************************/
properties: [
"PersonalSite|site"
],
/*********************************************************************************************************************************/
// Methods
/*********************************************************************************************************************************/
createPersonalSiteEnque: {
requestType: Types.RequestType.PostWithArgsValueOnly
},
shareAllSocialData: {
requestType: Types.RequestType.PostWithArgsValueOnly
}
}
}

@@ -1,2 +0,2 @@

module $REST {
module GD {
/*********************************************************************************************************************************/

@@ -3,0 +3,0 @@ // Methods

@@ -1,2 +0,2 @@

module $REST {
module GD {
/*********************************************************************************************************************************/

@@ -3,0 +3,0 @@ // Methods

@@ -1,2 +0,2 @@

module $REST {
module GD {
Library.view = {

@@ -3,0 +3,0 @@ /*********************************************************************************************************************************/

@@ -1,2 +0,2 @@

module $REST {
module GD {
/*********************************************************************************************************************************/

@@ -3,0 +3,0 @@ // Methods

@@ -1,2 +0,2 @@

module $REST {
module GD {
/*********************************************************************************************************************************/

@@ -3,0 +3,0 @@ // Methods

@@ -1,2 +0,2 @@

module $REST {
module GD {
/*********************************************************************************************************************************/

@@ -10,3 +10,3 @@ // Web

/*********************************************************************************************************************************/
constructor(url?:string, targetInfo?:Settings.TargetInfoSettings) {
constructor(url?:string, targetInfo?:ComplexTypes.TargetInfoSettings) {
// Call the base constructor

@@ -46,10 +46,10 @@ super(targetInfo);

properties: [
"AllProperties", "AppTiles", "AssociatedMemberGroup|group", "AssociatedOwnerGroup|group", "AssociatedVisitorGroup|group",
"Author|user", "AvailableContentTypes|contenttypes", "AvailableFields|fields", "ClientWebParts",
"ContentTypes|contenttypes|('[Name]')|contenttype", "CurrentUser|user", "DataLeakagePreventionStatusInfo",
"AllProperties|propertyvalues", "AppTiles", "AssociatedMemberGroup|group", "AssociatedOwnerGroup|group",
"AssociatedVisitorGroup|group", "Author|user", "AvailableContentTypes|contenttypes", "AvailableFields|fields",
"ClientWebParts", "ContentTypes|contenttypes|('[Name]')|contenttype", "CurrentUser|user", "DataLeakagePreventionStatusInfo",
"DescriptionResource", "EventReceivers|eventreceivers|('[Name]')|eventreceiver", "Features",
"Fields|fields|/getByInternalNameOrTitle('[Name]')|field", "FirstUniqueAncestorSecurableObject",
"Folders|folders|/getByUrl('[Name]')|folder", "Lists|lists|/getByTitle('[Name]')|list",
"ListTemplates|listtemplates|('[Name]')|listtemplate", "Navigation", "ParentWeb", "PushNotificationSubscribers", "RecycleBin",
"RegionalSettings", "RoleAssignments|roleassignments|([Name])|roleassignment",
"ListTemplates|listtemplates|('[Name]')|listtemplate", "Navigation", "ParentWeb",
"PushNotificationSubscribers", "RecycleBin", "RegionalSettings", "RoleAssignments|roleassignments|([Name])|roleassignment",
"RoleDefinitions|roledefinitions|/getByName('[Name]')|roledefinition", "RootFolder|folder|/getByUrl('[Name]')|file",

@@ -56,0 +56,0 @@ "SiteGroups|sitegroups|/getByName('[Name]')|group", "SiteUserInfoList", "SiteUsers|users|/getById([Name])|user", "ThemeInfo", "TitleResource",

@@ -1,2 +0,2 @@

module $REST {
module GD {
/*********************************************************************************************************************************/

@@ -3,0 +3,0 @@ // Methods

@@ -1,2 +0,2 @@

module $REST.Types {
module GD.Types {
// Request Type

@@ -9,9 +9,12 @@ export enum RequestType {

OData = 3,
// Get Requests
Get = 10,
GetWithArgs = 11,
GetWithArgsInBody = 12,
GetWithArgsInQS = 13,
GetWithArgsValueOnly = 14,
GetReplace = 15,
GetBuffer = 11,
GetWithArgs = 12,
GetWithArgsInBody = 13,
GetWithArgsInQS = 14,
GetWithArgsValueOnly = 15,
GetReplace = 16,
// Post Requests

@@ -24,13 +27,3 @@ Post = 20,

PostReplace = 25,
// Remove if no longer needed
GetAppendMethodToEndPoint = 30,
GetBuffer = 31,
GetDataAsParameter = 32,
GetDataInBody = 33,
GetDataInBodyNoArgs = 34,
PostAppendMethodToEndPoint = 35,
PostDataAsParameter = 36,
PostDataInBody = 37,
PostDataInBodyNoArgs = 38
}
}

@@ -1,4 +0,18 @@

module $REST.Types {
module GD.Types {
/**
* Check Out Types
*/
export enum CheckOutType {
/** Online */
Online = 0,
/** Offline */
Offline = 1,
/** None */
None = 2
}
/**
* Control Modes

@@ -616,5 +630,39 @@ */

/**
* Master Page Gallery Types
*/
/*
export enum MasterPageGalleryType {
DisplayTemplateControl = <any>"0x0101002039C03B61C64EC4A04F5361F385106601",
DisplayTemplateItem = <any>"0x0101002039C03B61C64EC4A04F5361F385106603",
MasterPage = <any>"0x01010500A8B69F8A072C384090BB2F363986E5EA",
PageLayout = <any>"0x01010007FF3E057FA8AB4AA42FCB67B453FFC100E214EEE741181F4E9F7ACC43278EE811",
}
*/
/**
* Page Layout Types
*/
/*
export enum PageLayoutType {
Article = <any>";#Article Page;#0x010100C568DB52D9D0A14D9B2FDCC96666E9F2007948130EC3DB064584E219954237AF3900242457EFB8B24247815D688C526CD44D;#"
}
*/
/**
* Personal Site Capabilities
*/
export enum PersonalSiteCapabilities {
Education = 16,
Guest = 32,
MyTasksDashboard = 8,
None = 0,
Profile = 1,
Social = 2,
Storage = 4
}
/**
* Reordering Rule Match Types
*/
export enum ReordingRuleMathType {
export enum ReordingRuleMatchType {
ResultContainsKeyword,

@@ -621,0 +669,0 @@ TitleContainsKeyword,

@@ -1,2 +0,2 @@

module $REST {
module GD {
/*********************************************************************************************************************************/

@@ -33,3 +33,3 @@ // Dependencies

// Flag to determine if the page context information exists
private get pageContextExistsFl():boolean { return window.hasOwnProperty("_spPageContextInfo"); }
private get pageContextExistsFl():boolean { return Utils.ContextInfo.webAbsoluteUrl != ""; }

@@ -36,0 +36,0 @@ /*********************************************************************************************************************************/

@@ -1,2 +0,2 @@

module $REST.Utils {
module GD.Utils {
/*********************************************************************************************************************************/

@@ -10,3 +10,3 @@ // Method Information

/*********************************************************************************************************************************/
constructor(methodName:string, methodInfo:Settings.MethodInfoSettings, args:any) {
constructor(methodName:string, methodInfo:ComplexTypes.MethodInfoSettings, args:any) {
// Default the properties

@@ -66,3 +66,3 @@ this.methodInfo = methodInfo;

private methodData:any;
private methodInfo:Settings.MethodInfoSettings;
private methodInfo:ComplexTypes.MethodInfoSettings;
private methodParams:any;

@@ -69,0 +69,0 @@ private methodUrl:string;

@@ -1,2 +0,2 @@

module $REST.Utils {
module GD.Utils {
/*********************************************************************************************************************************/

@@ -22,3 +22,3 @@ // OData

// The class constructor
constructor(oData:Settings.ODataSettings) {
constructor(oData:ComplexTypes.ODataQuery) {
// Default the Variables

@@ -25,0 +25,0 @@ this._expand = oData && oData.Expand ? oData.Expand : [];

@@ -1,2 +0,2 @@

module $REST.Utils {
module GD.Utils {
/*********************************************************************************************************************************/

@@ -3,0 +3,0 @@ // Promise

@@ -1,2 +0,2 @@

module $REST.Utils {
module GD.Utils {
/*********************************************************************************************************************************/

@@ -3,0 +3,0 @@ // Request

@@ -1,2 +0,2 @@

module $REST.Utils {
module GD.Utils {
/*********************************************************************************************************************************/

@@ -10,3 +10,3 @@ // Target Information

/*********************************************************************************************************************************/
constructor(targetInfo:Settings.TargetInfoSettings) {
constructor(targetInfo:ComplexTypes.TargetInfoSettings) {
// Default the properties

@@ -48,10 +48,4 @@ this.targetInfo = targetInfo || {};

// The target information
private targetInfo:Settings.TargetInfoSettings;
private targetInfo:ComplexTypes.TargetInfoSettings;
// Reference to the page context information
private get context():any { return window["_spPageContextInfo"]; }
// Flag to determine if we are currently in an app web
private get isAppWeb():boolean { return this.context.isAppWeb; }
/*********************************************************************************************************************************/

@@ -66,3 +60,3 @@ // Methods

// See if this is an app web
if (this.isAppWeb) {
if (Utils.ContextInfo.isAppWeb) {
// Set the url to the host url

@@ -113,3 +107,3 @@ url = TargetInfo.getQueryStringValue("SPHostUrl") + "";

// See if we are defaulting the url for the app web
if($REST.DefaultRequestToHostWebFl && this.isAppWeb && this.targetInfo.url == null) {
if(GD.DefaultRequestToHostWebFl && Utils.ContextInfo.isAppWeb && this.targetInfo.url == null) {
// Default the url to the host web

@@ -122,3 +116,3 @@ this.targetInfo.url = hostUrl;

// Default the url to the current site/web url
this.targetInfo.url = this.context[this.targetInfo.defaultToWebFl == false ? "siteAbsoluteUrl" : "webAbsoluteUrl"];
this.targetInfo.url = this.targetInfo.defaultToWebFl == false ? Utils.ContextInfo.siteAbsoluteUrl : Utils.ContextInfo.webAbsoluteUrl;
}

@@ -131,5 +125,5 @@ // Else, see if the url already contains the full request

// See if this is the app web and we are executing against a different web
if(this.isAppWeb && url[0] != this.context["webAbsoluteUrl"].toLowerCase()) {
if(Utils.ContextInfo.isAppWeb && url[0] != Utils.ContextInfo.webAbsoluteUrl.toLowerCase()) {
// Set the request url
this.requestUrl = this.context["webAbsoluteUrl"] + "/_api/SP.AppContextSite(@target)/" + url[1] +
this.requestUrl = Utils.ContextInfo.webAbsoluteUrl + "/_api/SP.AppContextSite(@target)/" + url[1] +
(this.targetInfo.endpoint ? "/" + this.targetInfo.endpoint : "") +

@@ -152,3 +146,3 @@ "?@target='" + url[0] + "'";

// See if this is the app web, and we are executing against a different web
if(this.isAppWeb && this.targetInfo.url != this.context["webAbsoluteUrl"]) {
if(Utils.ContextInfo.isAppWeb && this.targetInfo.url != Utils.ContextInfo.webAbsoluteUrl) {
// Append the start character for the query string

@@ -160,3 +154,3 @@ let endpoint = this.targetInfo.endpoint +

this.requestUrl = template
.replace(/{{Url}}/g, this.context["webAbsoluteUrl"])
.replace(/{{Url}}/g, Utils.ContextInfo.webAbsoluteUrl)
.replace(/{{EndPoint}}/g, "SP.AppContextSite(@target)/" + endpoint)

@@ -163,0 +157,0 @@ .replace(/{{TargetUrl}}/g, "@target='" + this.targetInfo.url + "'");

@@ -78,3 +78,3 @@ /// <reference path="../dist/sprest.d.ts" />

// Create the content type
var web = new $REST.Web();
var web = new GD.Web();
var ct = web.ContentTypes()

@@ -100,3 +100,3 @@ .add({

// Read the content types
ct = (new $REST.Web()).ContentTypes(ct.Id.StringValue).executeAndWait();
ct = (new GD.Web()).ContentTypes(ct.Id.StringValue).executeAndWait();

@@ -110,3 +110,3 @@ // Test

// Get the test field
var field = (new $REST.Web()).Fields("SPRestText").executeAndWait();
var field = (new GD.Web()).Fields("SPRestText").executeAndWait();
if(!field.existsFl) {

@@ -154,3 +154,3 @@ // Create the test field

// Delete the content type from the list
ctList.delete().executeAndWait();
ctList = ctList.delete().executeAndWait();

@@ -197,3 +197,3 @@ // Test

// Get this file
var file = (new $REST.Web()).getFileByServerRelativeUrl(_spPageContextInfo.serverRequestPath).executeAndWait();
var file = (new GD.Web()).getFileByServerRelativeUrl(_spPageContextInfo.serverRequestPath).executeAndWait();

@@ -207,3 +207,3 @@ // Test

// Get the parent folder
var folder = (new $REST.Web()).getFolderByServerRelativeUrl(file.ServerRelativeUrl.substr(0, file.ServerRelativeUrl.length - file.Name.length - 1)).executeAndWait();
var folder = (new GD.Web()).getFolderByServerRelativeUrl(file.ServerRelativeUrl.substr(0, file.ServerRelativeUrl.length - file.Name.length - 1)).executeAndWait();

@@ -217,3 +217,3 @@ // Test

// Create a sub-folder
var subFolder = folder.addSubFolder("Test").executeAndWait();
var subFolder = folder.Folders().add("Test").executeAndWait();

@@ -241,3 +241,3 @@ // Test

// Copy the file
file = subFolder.addFile("test.aspx", true, buffer).executeAndWait();
file = subFolder.Files().add(true, "test.aspx", buffer).executeAndWait();

@@ -274,3 +274,3 @@ // Test

// Create the list
var web = new $REST.Web();
var web = new GD.Web();
var list = web.Lists()

@@ -298,3 +298,3 @@ .add({

// Read the updated list
list = new $REST.List(list.Title).executeAndWait();
list = new GD.List(list.Title).executeAndWait();

@@ -336,48 +336,44 @@ // Test

// Get the web
(new $REST.Web())
// Get the list collection
.Lists()
// Add the list
.add({
BaseTemplate: 100,
Description: "This is a test list.",
Title: "SPRest" + SP.Guid.newGuid().toString()
})
// Execute the request
.execute(function(list) {
// Test
assert(list, "create", "existsFl", true);
// Create a list
(new GD.Web()).Lists().add({
BaseTemplate: 100,
Description: "This is a test list.",
Title: "SPRest" + SP.Guid.newGuid().toString()
}).execute(function(list) {
// Test
assert(list, "create", "existsFl", true);
// Log
writeToLog("Creating the list items", LogType.SubHeader);
// Log
writeToLog("Creating the list items", LogType.SubHeader);
// Create a counter
for(var i=0; i<5; i++) {
// Get the item collection
list.Items()
// Add the item
.add({ Title: "New Item " + i})
// Execute and wait for the previous item
.execute(true);
// Create a counter
for(var i=0; i<5; i++) {
// Get the item collection
list.Items()
// Add the item
.add({ Title: "New Item " + i})
// Execute and wait for the previous item
.execute(true);
}
// Wait for the requests to complete
list.done(function() {
var idx = 0;
// Assert the items
for(var i=arguments.length-5; i<arguments.length; i++) {
// Test
assert(arguments[i], "create item " + idx, "Title", "New Item " + idx++);
}
// Execute the request
list.execute(function() {
// Assert the items
for(var i=0; i<5; i++) {
// Test
assert(arguments[i], "create item " + i, "Title", "New Item " + i);
}
// Log
writeToLog("Deleting the list", LogType.SubHeader);
// Log
writeToLog("Deleting the list", LogType.SubHeader);
// Delete the list
list.delete().execute(function(result) {
// Test
assert(result.d, "delete", "DeleteObject", null);
});
// Delete the list
list.delete().execute(function(result) {
// Test
assert(result.d, "delete", "DeleteObject", null);
});
})
});
});
}

@@ -407,3 +403,3 @@

// Read the updated item
item = (new $REST.List(list.Title)).Items(item.ID).executeAndWait();
item = (new GD.List(list.Title)).Items(item.ID).executeAndWait();

@@ -459,3 +455,3 @@ // Test

// Get the items
items = (new $REST.List(list.Title, false)).getItemsByQuery(caml).executeAndWait();
items = (new GD.List(list.Title, false)).getItemsByQuery(caml).executeAndWait();

@@ -474,3 +470,3 @@ // Test

// Get the web
var web = new $REST.Web();
var web = new GD.Web();

@@ -477,0 +473,0 @@ // Get the 'View Only' permission

/// <reference path="../dist/sprest.d.ts" />
(new $REST.Web())
.Lists("Dev")
.Fields()
.query({
Filter: "Title eq 'Title'"
})
.execute();
module GD {
export class Test {
}
}
var web = new GD.Web();
// Get the source folder
var srcFile = web.getFileByServerRelativeUrl("/sites/dev/siteassets/sprest/test.aspx").execute();
// Get the master page gallery root folder
var mpgFolder = web.Lists("Master Page Gallery").RootFolder().execute();
// Get the dev folder
var devFolder = mpgFolder.Folders("Dev").execute((folder) => {
var promise = new GD.Utils.Promise();
// Ensure it exists
if(folder.Exists) {
// Resolve the promise
promise.resolve();
} else {
// Create the folder, and resolve the promise
mpgFolder.Folders().add("Dev").execute((folder) => { devFolder = folder; promise.resolve(); });
}
// Return the promise
return promise;
}, true);
// Wait for the requests to complete
web.done(() => {
let fileUrl = devFolder.ServerRelativeUrl + "/" + srcFile.Name;
// Copy the file
srcFile.copyTo(fileUrl, true).execute();
// Get the assoicated list item for this file
web.Lists("Master Page Gallery").getItems("<View Scope='RecursiveAll'><Query><Where><Eq><FieldRef Name='FileRef' /><Value>" + fileUrl + "</Value></Eq></Where></Query></View>").execute(true);
// Wait for the requests to complete
web.done((dstFile, dstItem) => {
debugger;
// Update the item
// PublishingAssociatedContentType: ";#Article Page;#0x010100C568DB52D9D0A14D9B2FDCC96666E9F2007948130EC3DB064584E219954237AF3900242457EFB8B24247815D688C526CD44D;#",
dstItem.update({
ContentTypeId: "0x01010007FF3E057FA8AB4AA42FCB67B453FFC100E214EEE741181F4E9F7ACC43278EE811",
UIVersion: {
__metadata: { type: "Collection(Edm.String)"},
results: ["15"]
}
}).execute(() => {
debugger;
});
});
});

@@ -13,3 +13,5 @@ // TypeScript configuration file

"src/definitions/attachmentFiles.d.ts",
"src/definitions/audit.d.ts",
"src/definitions/base.d.ts",
"src/definitions/complexTypes.d.ts",
"src/definitions/contentType.d.ts",

@@ -21,2 +23,3 @@ "src/definitions/contentTypes.d.ts",

"src/definitions/field.d.ts",
"src/definitions/fieldLink.d.ts",
"src/definitions/fieldLinks.d.ts",

@@ -30,2 +33,3 @@ "src/definitions/fields.d.ts",

"src/definitions/folders.d.ts",
"src/definitions/gd-sprest.d.ts",
"src/definitions/group.d.ts",

@@ -41,4 +45,8 @@ "src/definitions/helper.d.ts",

"src/definitions/peopleManager.d.ts",
"src/definitions/personProperties.d.ts",
"src/definitions/profileLoader.d.ts",
"src/definitions/promise.d.ts",
"src/definitions/propertyValues.d.ts",
"src/definitions/recycleBinItem.d.ts",
"src/definitions/results.d.ts",
"src/definitions/roleAssignment.d.ts",

@@ -49,8 +57,5 @@ "src/definitions/roleAssignments.d.ts",

"src/definitions/search.d.ts",
"src/definitions/settings.d.ts",
"src/definitions/site.d.ts",
"src/definitions/siteGroups.d.ts",
"src/definitions/socialRestActor.d.ts",
"src/definitions/socialRestFeedManager.d.ts",
"src/definitions/socialRestThread.d.ts",
"src/definitions/socialFeed.d.ts",
"src/definitions/targetInfo.d.ts",

@@ -70,2 +75,3 @@ "src/definitions/user.d.ts",

"src/lib/attachmentFiles.ts",
"src/lib/audit.ts",
"src/lib/contentType.ts",

@@ -93,2 +99,3 @@ "src/lib/contentTypes.ts",

"src/lib/profileLoader.ts",
"src/lib/propertyValues.ts",
"src/lib/roleAssignment.ts",

@@ -101,5 +108,3 @@ "src/lib/roleAssignments.ts",

"src/lib/siteGroups.ts",
"src/lib/socialRestActor.ts",
"src/lib/socialRestFeedManager.ts",
"src/lib/socialRestThread.ts",
"src/lib/socialFeed.ts",
"src/lib/user.ts",

@@ -118,2 +123,3 @@ "src/lib/userCustomAction.ts",

"src/types/types.ts",
"src/utils/contextInfo.ts",
"src/utils/dependencies.ts",

@@ -120,0 +126,0 @@ "src/utils/methodInfo.ts",

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc