sp-jsom-node
Version:
SharePoint JavaScript Object Model for Node.js
1,085 lines (936 loc) • 257 kB
JavaScript
// JScript File
Type.registerNamespace('Microsoft.SharePoint.Client.Search.Query');
Microsoft.SharePoint.Client.Search.Query.QueryPropertyValueType = function() {}
Microsoft.SharePoint.Client.Search.Query.QueryPropertyValueType.prototype = {
none: 0,
stringType: 1,
int32TYpe: 2,
booleanType: 3,
stringArrayType: 4,
unSupportedType: 5
}
Microsoft.SharePoint.Client.Search.Query.QueryPropertyValueType.registerEnum('Microsoft.SharePoint.Client.Search.Query.QueryPropertyValueType', false);
Microsoft.SharePoint.Client.Search.Query.ReorderingRuleMatchType = function() {}
Microsoft.SharePoint.Client.Search.Query.ReorderingRuleMatchType.prototype = {
resultContainsKeyword: 0,
titleContainsKeyword: 1,
titleMatchesKeyword: 2,
urlStartsWith: 3,
urlExactlyMatches: 4,
contentTypeIs: 5,
fileExtensionMatches: 6,
resultHasTag: 7,
manualCondition: 8
}
Microsoft.SharePoint.Client.Search.Query.ReorderingRuleMatchType.registerEnum('Microsoft.SharePoint.Client.Search.Query.ReorderingRuleMatchType', false);
Microsoft.SharePoint.Client.Search.Query.SortDirection = function() {}
Microsoft.SharePoint.Client.Search.Query.SortDirection.prototype = {
ascending: 0,
descending: 1,
fqlFormula: 2
}
Microsoft.SharePoint.Client.Search.Query.SortDirection.registerEnum('Microsoft.SharePoint.Client.Search.Query.SortDirection', false);
Microsoft.SharePoint.Client.Search.Query.KeywordQueryProperties = function Microsoft_SharePoint_Client_Search_Query_KeywordQueryProperties(context, objectPath) {
Microsoft.SharePoint.Client.Search.Query.KeywordQueryProperties.initializeBase(this, [ context, objectPath ]);
}
Microsoft.SharePoint.Client.Search.Query.KeywordQueryProperties.prototype = {
get_item: function Microsoft_SharePoint_Client_Search_Query_KeywordQueryProperties$get_item(key) {
return null;
},
set_item: function Microsoft_SharePoint_Client_Search_Query_KeywordQueryProperties$set_item(key, value) {
this.setQueryPropertyValue(key, Microsoft.SharePoint.Client.Search.Query.QueryUtility.create(key, value));
return value;
},
setQueryPropertyValue: function Microsoft_SharePoint_Client_Search_Query_KeywordQueryProperties$setQueryPropertyValue(name, val) {
var $v_0 = this.get_context();
var $v_1 = new SP.ClientActionInvokeMethod(this, 'SetQueryPropertyValue', [ name, val ]);
$v_0.addQuery($v_1);
},
getQueryPropertyValue: function Microsoft_SharePoint_Client_Search_Query_KeywordQueryProperties$getQueryPropertyValue(name) {
var $v_0 = this.get_context();
var $v_1;
var $v_2 = new SP.ClientActionInvokeMethod(this, 'GetQueryPropertyValue', [ name ]);
$v_0.addQuery($v_2);
$v_1 = new Microsoft.SharePoint.Client.Search.Query.QueryPropertyValue();
$v_0.addQueryIdAndResultObject($v_2.get_id(), $v_1);
return $v_1;
}
}
Microsoft.SharePoint.Client.Search.Query.QueryUtility = function Microsoft_SharePoint_Client_Search_Query_QueryUtility() {
}
Microsoft.SharePoint.Client.Search.Query.QueryUtility.create = function Microsoft_SharePoint_Client_Search_Query_QueryUtility$create(name, val) {
if (name && name.length > 0) {
var $v_0 = new Microsoft.SharePoint.Client.Search.Query.QueryPropertyValue();
if (val) {
var $v_1 = Object.getType(val);
switch (Array.indexOf(Microsoft.SharePoint.Client.Search.Query.QueryUtility.$24, $v_1)) {
case 1:
$v_0.$T_1 = val;
$v_0.$8_1 = 1;
break;
case 2:
$v_0.$Q_1 = val;
$v_0.$8_1 = 2;
break;
case 3:
$v_0.$P_1 = val;
$v_0.$8_1 = 3;
break;
case 4:
$v_0.$S_1 = val;
$v_0.$8_1 = 4;
break;
default:
var $v_2 = 'Type ' + $v_1.toString() + 'is not valid. Only String, Int32, Boolean and String[] are supported.';
throw Error.argument($v_2);
}
}
return $v_0;
}
else {
throw Error.argumentNull('The name a of a property cannot be null or empty!');
}
}
Microsoft.SharePoint.Client.Search.Query.QueryUtility.queryPropertyValueToObject = function Microsoft_SharePoint_Client_Search_Query_QueryUtility$queryPropertyValueToObject(val) {
if (val && val.$8_1 !== 0) {
switch (val.$8_1) {
case 1:
return val.$T_1;
case 2:
return val.$Q_1;
case 3:
return val.$P_1;
case 4:
return val.$S_1;
default:
throw Error.argument('The Payload type is not valid. Only String, Int32, Boolean and String[] are supported.');
}
}
else {
return null;
}
}
Microsoft.SharePoint.Client.Search.Query.QueryUtility.getQueryPropertyValueType = function Microsoft_SharePoint_Client_Search_Query_QueryUtility$getQueryPropertyValueType(val) {
if (val) {
return val.$8_1;
}
else {
return 0;
}
}
Microsoft.SharePoint.Client.Search.Query.CustomQuerySuggestions = function Microsoft_SharePoint_Client_Search_Query_CustomQuerySuggestions() {
Microsoft.SharePoint.Client.Search.Query.CustomQuerySuggestions.initializeBase(this);
}
Microsoft.SharePoint.Client.Search.Query.CustomQuerySuggestions.prototype = {
$5_1: 0,
$6_1: null,
get_LCID: function Microsoft_SharePoint_Client_Search_Query_CustomQuerySuggestions$get_LCID() {
return this.$5_1;
},
set_LCID: function Microsoft_SharePoint_Client_Search_Query_CustomQuerySuggestions$set_LCID(value) {
this.$5_1 = value;
return value;
},
get_queries: function Microsoft_SharePoint_Client_Search_Query_CustomQuerySuggestions$get_queries() {
return this.$6_1;
},
set_queries: function Microsoft_SharePoint_Client_Search_Query_CustomQuerySuggestions$set_queries(value) {
this.$6_1 = value;
return value;
},
get_typeId: function Microsoft_SharePoint_Client_Search_Query_CustomQuerySuggestions$get_typeId() {
return '{5830381c-6d28-4f44-80a7-1d8093ca7d9d}';
},
writeToXml: function Microsoft_SharePoint_Client_Search_Query_CustomQuerySuggestions$writeToXml(writer, serializationContext) {
if (!writer) {
throw Error.argumentNull('writer');
}
if (!serializationContext) {
throw Error.argumentNull('serializationContext');
}
var $v_0 = [ 'LCID', 'Queries' ];
SP.DataConvert.writePropertiesToXml(writer, this, $v_0, serializationContext);
SP.ClientValueObject.prototype.writeToXml.call(this, writer, serializationContext);
},
initPropertiesFromJson: function Microsoft_SharePoint_Client_Search_Query_CustomQuerySuggestions$initPropertiesFromJson(parentNode) {
SP.ClientValueObject.prototype.initPropertiesFromJson.call(this, parentNode);
var $v_0;
$v_0 = parentNode.LCID;
if (!SP.ScriptUtility.isUndefined($v_0)) {
this.$5_1 = ($v_0);
delete parentNode.LCID;
}
$v_0 = parentNode.Queries;
if (!SP.ScriptUtility.isUndefined($v_0)) {
this.$6_1 = ((SP.DataConvert.fixupType(null, $v_0)));
delete parentNode.Queries;
}
}
}
Microsoft.SharePoint.Client.Search.Query.KeywordQuery = function Microsoft_SharePoint_Client_Search_Query_KeywordQuery(context) {
Microsoft.SharePoint.Client.Search.Query.KeywordQuery.initializeBase(this, [ context, SP.ClientUtility.getOrCreateObjectPathForConstructor(context, '{80173281-fffd-47b6-9a49-312e06ff8428}', arguments) ]);
}
Microsoft.SharePoint.Client.Search.Query.KeywordQuery.newObject = function Microsoft_SharePoint_Client_Search_Query_KeywordQuery$newObject(context) {
return new Microsoft.SharePoint.Client.Search.Query.KeywordQuery(context, new SP.ObjectPathConstructor(context, '{80173281-fffd-47b6-9a49-312e06ff8428}', null));
}
Microsoft.SharePoint.Client.Search.Query.KeywordQuery.prototype = {
get_collapseSpecification: function Microsoft_SharePoint_Client_Search_Query_KeywordQuery$get_collapseSpecification() {
this.checkUninitializedProperty('CollapseSpecification');
return ((this.get_objectData().get_properties()['CollapseSpecification']));
},
set_collapseSpecification: function Microsoft_SharePoint_Client_Search_Query_KeywordQuery$set_collapseSpecification(value) {
this.get_objectData().get_properties()['CollapseSpecification'] = value;
if ((this.get_context())) {
this.get_context().addQuery(new SP.ClientActionSetProperty(this, 'CollapseSpecification', value));
}
return value;
},
get_enableSorting: function Microsoft_SharePoint_Client_Search_Query_KeywordQuery$get_enableSorting() {
this.checkUninitializedProperty('EnableSorting');
return ((this.get_objectData().get_properties()['EnableSorting']));
},
set_enableSorting: function Microsoft_SharePoint_Client_Search_Query_KeywordQuery$set_enableSorting(value) {
this.get_objectData().get_properties()['EnableSorting'] = value;
if ((this.get_context())) {
this.get_context().addQuery(new SP.ClientActionSetProperty(this, 'EnableSorting', value));
}
return value;
},
get_hiddenConstraints: function Microsoft_SharePoint_Client_Search_Query_KeywordQuery$get_hiddenConstraints() {
this.checkUninitializedProperty('HiddenConstraints');
return ((this.get_objectData().get_properties()['HiddenConstraints']));
},
set_hiddenConstraints: function Microsoft_SharePoint_Client_Search_Query_KeywordQuery$set_hiddenConstraints(value) {
this.get_objectData().get_properties()['HiddenConstraints'] = value;
if ((this.get_context())) {
this.get_context().addQuery(new SP.ClientActionSetProperty(this, 'HiddenConstraints', value));
}
return value;
},
get_properties: function Microsoft_SharePoint_Client_Search_Query_KeywordQuery$get_properties() {
var $v_0 = ((this.get_objectData().get_clientObjectProperties()['Properties']));
if (SP.ScriptUtility.isUndefined($v_0)) {
$v_0 = new Microsoft.SharePoint.Client.Search.Query.KeywordQueryProperties(this.get_context(), new SP.ObjectPathProperty(this.get_context(), this.get_path(), 'Properties'));
this.get_objectData().get_clientObjectProperties()['Properties'] = $v_0;
}
return $v_0;
},
get_olsQuerySession: function Microsoft_SharePoint_Client_Search_Query_KeywordQuery$get_olsQuerySession() {
this.checkUninitializedProperty('OLSQuerySession');
return ((this.get_objectData().get_properties()['OLSQuerySession']));
},
set_olsQuerySession: function Microsoft_SharePoint_Client_Search_Query_KeywordQuery$set_olsQuerySession(value) {
this.get_objectData().get_properties()['OLSQuerySession'] = value;
if ((this.get_context())) {
this.get_context().addQuery(new SP.ClientActionSetProperty(this, 'OLSQuerySession', value));
}
return value;
},
get_refinementFilters: function Microsoft_SharePoint_Client_Search_Query_KeywordQuery$get_refinementFilters() {
var $v_0 = ((this.get_objectData().get_clientObjectProperties()['RefinementFilters']));
if (SP.ScriptUtility.isUndefined($v_0)) {
$v_0 = new Microsoft.SharePoint.Client.Search.Query.StringCollection(this.get_context(), new SP.ObjectPathProperty(this.get_context(), this.get_path(), 'RefinementFilters'));
this.get_objectData().get_clientObjectProperties()['RefinementFilters'] = $v_0;
}
return $v_0;
},
set_refinementFilters: function Microsoft_SharePoint_Client_Search_Query_KeywordQuery$set_refinementFilters(value) {
this.get_objectData().get_clientObjectProperties()['RefinementFilters'] = value;
if ((this.get_context())) {
this.get_context().addQuery(new SP.ClientActionSetProperty(this, 'RefinementFilters', value));
}
return value;
},
get_refiners: function Microsoft_SharePoint_Client_Search_Query_KeywordQuery$get_refiners() {
this.checkUninitializedProperty('Refiners');
return ((this.get_objectData().get_properties()['Refiners']));
},
set_refiners: function Microsoft_SharePoint_Client_Search_Query_KeywordQuery$set_refiners(value) {
this.get_objectData().get_properties()['Refiners'] = value;
if ((this.get_context())) {
this.get_context().addQuery(new SP.ClientActionSetProperty(this, 'Refiners', value));
}
return value;
},
get_reorderingRules: function Microsoft_SharePoint_Client_Search_Query_KeywordQuery$get_reorderingRules() {
var $v_0 = ((this.get_objectData().get_clientObjectProperties()['ReorderingRules']));
if (SP.ScriptUtility.isUndefined($v_0)) {
$v_0 = new Microsoft.SharePoint.Client.Search.Query.ReorderingRuleCollection(this.get_context(), new SP.ObjectPathProperty(this.get_context(), this.get_path(), 'ReorderingRules'));
this.get_objectData().get_clientObjectProperties()['ReorderingRules'] = $v_0;
}
return $v_0;
},
set_reorderingRules: function Microsoft_SharePoint_Client_Search_Query_KeywordQuery$set_reorderingRules(value) {
this.get_objectData().get_clientObjectProperties()['ReorderingRules'] = value;
if ((this.get_context())) {
this.get_context().addQuery(new SP.ClientActionSetProperty(this, 'ReorderingRules', value));
}
return value;
},
get_selectProperties: function Microsoft_SharePoint_Client_Search_Query_KeywordQuery$get_selectProperties() {
var $v_0 = ((this.get_objectData().get_clientObjectProperties()['SelectProperties']));
if (SP.ScriptUtility.isUndefined($v_0)) {
$v_0 = new Microsoft.SharePoint.Client.Search.Query.StringCollection(this.get_context(), new SP.ObjectPathProperty(this.get_context(), this.get_path(), 'SelectProperties'));
this.get_objectData().get_clientObjectProperties()['SelectProperties'] = $v_0;
}
return $v_0;
},
get_sortList: function Microsoft_SharePoint_Client_Search_Query_KeywordQuery$get_sortList() {
var $v_0 = ((this.get_objectData().get_clientObjectProperties()['SortList']));
if (SP.ScriptUtility.isUndefined($v_0)) {
$v_0 = new Microsoft.SharePoint.Client.Search.Query.SortCollection(this.get_context(), new SP.ObjectPathProperty(this.get_context(), this.get_path(), 'SortList'));
this.get_objectData().get_clientObjectProperties()['SortList'] = $v_0;
}
return $v_0;
},
get_timeZoneId: function Microsoft_SharePoint_Client_Search_Query_KeywordQuery$get_timeZoneId() {
this.checkUninitializedProperty('TimeZoneId');
return ((this.get_objectData().get_properties()['TimeZoneId']));
},
set_timeZoneId: function Microsoft_SharePoint_Client_Search_Query_KeywordQuery$set_timeZoneId(value) {
this.get_objectData().get_properties()['TimeZoneId'] = value;
if ((this.get_context())) {
this.get_context().addQuery(new SP.ClientActionSetProperty(this, 'TimeZoneId', value));
}
return value;
},
get_trimDuplicatesIncludeId: function Microsoft_SharePoint_Client_Search_Query_KeywordQuery$get_trimDuplicatesIncludeId() {
this.checkUninitializedProperty('TrimDuplicatesIncludeId');
return ((this.get_objectData().get_properties()['TrimDuplicatesIncludeId']));
},
set_trimDuplicatesIncludeId: function Microsoft_SharePoint_Client_Search_Query_KeywordQuery$set_trimDuplicatesIncludeId(value) {
this.get_objectData().get_properties()['TrimDuplicatesIncludeId'] = value;
if ((this.get_context())) {
this.get_context().addQuery(new SP.ClientActionSetProperty(this, 'TrimDuplicatesIncludeId', value));
}
return value;
},
get_useOLSQuery: function Microsoft_SharePoint_Client_Search_Query_KeywordQuery$get_useOLSQuery() {
this.checkUninitializedProperty('UseOLSQuery');
return ((this.get_objectData().get_properties()['UseOLSQuery']));
},
set_useOLSQuery: function Microsoft_SharePoint_Client_Search_Query_KeywordQuery$set_useOLSQuery(value) {
this.get_objectData().get_properties()['UseOLSQuery'] = value;
if ((this.get_context())) {
this.get_context().addQuery(new SP.ClientActionSetProperty(this, 'UseOLSQuery', value));
}
return value;
},
initPropertiesFromJson: function Microsoft_SharePoint_Client_Search_Query_KeywordQuery$initPropertiesFromJson(parentNode) {
Microsoft.SharePoint.Client.Search.Query.Query.prototype.initPropertiesFromJson.call(this, parentNode);
var $v_0;
$v_0 = parentNode.CollapseSpecification;
if (!SP.ScriptUtility.isUndefined($v_0)) {
this.get_objectData().get_properties()['CollapseSpecification'] = ($v_0);
delete parentNode.CollapseSpecification;
}
$v_0 = parentNode.EnableSorting;
if (!SP.ScriptUtility.isUndefined($v_0)) {
this.get_objectData().get_properties()['EnableSorting'] = ($v_0);
delete parentNode.EnableSorting;
}
$v_0 = parentNode.HiddenConstraints;
if (!SP.ScriptUtility.isUndefined($v_0)) {
this.get_objectData().get_properties()['HiddenConstraints'] = ($v_0);
delete parentNode.HiddenConstraints;
}
$v_0 = parentNode.Properties;
if (!SP.ScriptUtility.isUndefined($v_0)) {
this.updateClientObjectPropertyType('Properties', this.get_properties(), $v_0);
this.get_properties().fromJson($v_0);
delete parentNode.Properties;
}
$v_0 = parentNode.OLSQuerySession;
if (!SP.ScriptUtility.isUndefined($v_0)) {
this.get_objectData().get_properties()['OLSQuerySession'] = ($v_0);
delete parentNode.OLSQuerySession;
}
$v_0 = parentNode.RefinementFilters;
if (!SP.ScriptUtility.isUndefined($v_0)) {
this.updateClientObjectPropertyType('RefinementFilters', this.get_refinementFilters(), $v_0);
this.get_refinementFilters().fromJson($v_0);
delete parentNode.RefinementFilters;
}
$v_0 = parentNode.Refiners;
if (!SP.ScriptUtility.isUndefined($v_0)) {
this.get_objectData().get_properties()['Refiners'] = ($v_0);
delete parentNode.Refiners;
}
$v_0 = parentNode.ReorderingRules;
if (!SP.ScriptUtility.isUndefined($v_0)) {
this.updateClientObjectPropertyType('ReorderingRules', this.get_reorderingRules(), $v_0);
this.get_reorderingRules().fromJson($v_0);
delete parentNode.ReorderingRules;
}
$v_0 = parentNode.SelectProperties;
if (!SP.ScriptUtility.isUndefined($v_0)) {
this.updateClientObjectPropertyType('SelectProperties', this.get_selectProperties(), $v_0);
this.get_selectProperties().fromJson($v_0);
delete parentNode.SelectProperties;
}
$v_0 = parentNode.SortList;
if (!SP.ScriptUtility.isUndefined($v_0)) {
this.updateClientObjectPropertyType('SortList', this.get_sortList(), $v_0);
this.get_sortList().fromJson($v_0);
delete parentNode.SortList;
}
$v_0 = parentNode.TimeZoneId;
if (!SP.ScriptUtility.isUndefined($v_0)) {
this.get_objectData().get_properties()['TimeZoneId'] = ($v_0);
delete parentNode.TimeZoneId;
}
$v_0 = parentNode.TrimDuplicatesIncludeId;
if (!SP.ScriptUtility.isUndefined($v_0)) {
this.get_objectData().get_properties()['TrimDuplicatesIncludeId'] = ($v_0);
delete parentNode.TrimDuplicatesIncludeId;
}
$v_0 = parentNode.UseOLSQuery;
if (!SP.ScriptUtility.isUndefined($v_0)) {
this.get_objectData().get_properties()['UseOLSQuery'] = ($v_0);
delete parentNode.UseOLSQuery;
}
}
}
Microsoft.SharePoint.Client.Search.Query.KeywordQueryPropertyNames = function Microsoft_SharePoint_Client_Search_Query_KeywordQueryPropertyNames() {
}
Microsoft.SharePoint.Client.Search.Query.KeywordQueryObjectPropertyNames = function Microsoft_SharePoint_Client_Search_Query_KeywordQueryObjectPropertyNames() {
}
Microsoft.SharePoint.Client.Search.Query.PersonalResultSuggestion = function Microsoft_SharePoint_Client_Search_Query_PersonalResultSuggestion() {
Microsoft.SharePoint.Client.Search.Query.PersonalResultSuggestion.initializeBase(this);
}
Microsoft.SharePoint.Client.Search.Query.PersonalResultSuggestion.prototype = {
$w_1: null,
$y_1: false,
$M_1: null,
$N_1: null,
get_highlightedTitle: function Microsoft_SharePoint_Client_Search_Query_PersonalResultSuggestion$get_highlightedTitle() {
return this.$w_1;
},
set_highlightedTitle: function Microsoft_SharePoint_Client_Search_Query_PersonalResultSuggestion$set_highlightedTitle(value) {
this.$w_1 = value;
return value;
},
get_isBestBet: function Microsoft_SharePoint_Client_Search_Query_PersonalResultSuggestion$get_isBestBet() {
return this.$y_1;
},
set_isBestBet: function Microsoft_SharePoint_Client_Search_Query_PersonalResultSuggestion$set_isBestBet(value) {
this.$y_1 = value;
return value;
},
get_title: function Microsoft_SharePoint_Client_Search_Query_PersonalResultSuggestion$get_title() {
return this.$M_1;
},
set_title: function Microsoft_SharePoint_Client_Search_Query_PersonalResultSuggestion$set_title(value) {
this.$M_1 = value;
return value;
},
get_url: function Microsoft_SharePoint_Client_Search_Query_PersonalResultSuggestion$get_url() {
return this.$N_1;
},
set_url: function Microsoft_SharePoint_Client_Search_Query_PersonalResultSuggestion$set_url(value) {
this.$N_1 = value;
return value;
},
get_typeId: function Microsoft_SharePoint_Client_Search_Query_PersonalResultSuggestion$get_typeId() {
return '{aafd94af-525a-4759-8410-f571a26f04bc}';
},
writeToXml: function Microsoft_SharePoint_Client_Search_Query_PersonalResultSuggestion$writeToXml(writer, serializationContext) {
if (!writer) {
throw Error.argumentNull('writer');
}
if (!serializationContext) {
throw Error.argumentNull('serializationContext');
}
var $v_0 = [ 'HighlightedTitle', 'IsBestBet', 'Title', 'Url' ];
SP.DataConvert.writePropertiesToXml(writer, this, $v_0, serializationContext);
SP.ClientValueObject.prototype.writeToXml.call(this, writer, serializationContext);
},
initPropertiesFromJson: function Microsoft_SharePoint_Client_Search_Query_PersonalResultSuggestion$initPropertiesFromJson(parentNode) {
SP.ClientValueObject.prototype.initPropertiesFromJson.call(this, parentNode);
var $v_0;
$v_0 = parentNode.HighlightedTitle;
if (!SP.ScriptUtility.isUndefined($v_0)) {
this.$w_1 = ($v_0);
delete parentNode.HighlightedTitle;
}
$v_0 = parentNode.IsBestBet;
if (!SP.ScriptUtility.isUndefined($v_0)) {
this.$y_1 = ($v_0);
delete parentNode.IsBestBet;
}
$v_0 = parentNode.Title;
if (!SP.ScriptUtility.isUndefined($v_0)) {
this.$M_1 = ($v_0);
delete parentNode.Title;
}
$v_0 = parentNode.Url;
if (!SP.ScriptUtility.isUndefined($v_0)) {
this.$N_1 = ($v_0);
delete parentNode.Url;
}
}
}
Microsoft.SharePoint.Client.Search.Query.PopularQuery = function Microsoft_SharePoint_Client_Search_Query_PopularQuery() {
Microsoft.SharePoint.Client.Search.Query.PopularQuery.initializeBase(this);
}
Microsoft.SharePoint.Client.Search.Query.PopularQuery.prototype = {
$C_1: 0,
$5_1: 0,
$H_1: 0,
$3_1: null,
get_clickCount: function Microsoft_SharePoint_Client_Search_Query_PopularQuery$get_clickCount() {
return this.$C_1;
},
set_clickCount: function Microsoft_SharePoint_Client_Search_Query_PopularQuery$set_clickCount(value) {
this.$C_1 = value;
return value;
},
get_LCID: function Microsoft_SharePoint_Client_Search_Query_PopularQuery$get_LCID() {
return this.$5_1;
},
set_LCID: function Microsoft_SharePoint_Client_Search_Query_PopularQuery$set_LCID(value) {
this.$5_1 = value;
return value;
},
get_queryCount: function Microsoft_SharePoint_Client_Search_Query_PopularQuery$get_queryCount() {
return this.$H_1;
},
set_queryCount: function Microsoft_SharePoint_Client_Search_Query_PopularQuery$set_queryCount(value) {
this.$H_1 = value;
return value;
},
get_queryText: function Microsoft_SharePoint_Client_Search_Query_PopularQuery$get_queryText() {
return this.$3_1;
},
set_queryText: function Microsoft_SharePoint_Client_Search_Query_PopularQuery$set_queryText(value) {
this.$3_1 = value;
return value;
},
get_typeId: function Microsoft_SharePoint_Client_Search_Query_PopularQuery$get_typeId() {
return '{cea115d6-87ec-4e1c-aa4a-b8d44d6cd10d}';
},
writeToXml: function Microsoft_SharePoint_Client_Search_Query_PopularQuery$writeToXml(writer, serializationContext) {
if (!writer) {
throw Error.argumentNull('writer');
}
if (!serializationContext) {
throw Error.argumentNull('serializationContext');
}
var $v_0 = [ 'ClickCount', 'LCID', 'QueryCount', 'QueryText' ];
SP.DataConvert.writePropertiesToXml(writer, this, $v_0, serializationContext);
SP.ClientValueObject.prototype.writeToXml.call(this, writer, serializationContext);
},
initPropertiesFromJson: function Microsoft_SharePoint_Client_Search_Query_PopularQuery$initPropertiesFromJson(parentNode) {
SP.ClientValueObject.prototype.initPropertiesFromJson.call(this, parentNode);
var $v_0;
$v_0 = parentNode.ClickCount;
if (!SP.ScriptUtility.isUndefined($v_0)) {
this.$C_1 = ($v_0);
delete parentNode.ClickCount;
}
$v_0 = parentNode.LCID;
if (!SP.ScriptUtility.isUndefined($v_0)) {
this.$5_1 = ($v_0);
delete parentNode.LCID;
}
$v_0 = parentNode.QueryCount;
if (!SP.ScriptUtility.isUndefined($v_0)) {
this.$H_1 = ($v_0);
delete parentNode.QueryCount;
}
$v_0 = parentNode.QueryText;
if (!SP.ScriptUtility.isUndefined($v_0)) {
this.$3_1 = ($v_0);
delete parentNode.QueryText;
}
}
}
Microsoft.SharePoint.Client.Search.Query.PopularTenantQuery = function Microsoft_SharePoint_Client_Search_Query_PopularTenantQuery() {
Microsoft.SharePoint.Client.Search.Query.PopularTenantQuery.initializeBase(this);
}
Microsoft.SharePoint.Client.Search.Query.PopularTenantQuery.prototype = {
$A_1: false,
$C_1: 0,
$5_1: 0,
$H_1: 0,
$3_1: null,
$J_1: null,
$K_1: null,
$1f_1: null,
get_alwaysSuggest: function Microsoft_SharePoint_Client_Search_Query_PopularTenantQuery$get_alwaysSuggest() {
return this.$A_1;
},
set_alwaysSuggest: function Microsoft_SharePoint_Client_Search_Query_PopularTenantQuery$set_alwaysSuggest(value) {
this.$A_1 = value;
return value;
},
get_clickCount: function Microsoft_SharePoint_Client_Search_Query_PopularTenantQuery$get_clickCount() {
return this.$C_1;
},
set_clickCount: function Microsoft_SharePoint_Client_Search_Query_PopularTenantQuery$set_clickCount(value) {
this.$C_1 = value;
return value;
},
get_LCID: function Microsoft_SharePoint_Client_Search_Query_PopularTenantQuery$get_LCID() {
return this.$5_1;
},
set_LCID: function Microsoft_SharePoint_Client_Search_Query_PopularTenantQuery$set_LCID(value) {
this.$5_1 = value;
return value;
},
get_queryCount: function Microsoft_SharePoint_Client_Search_Query_PopularTenantQuery$get_queryCount() {
return this.$H_1;
},
set_queryCount: function Microsoft_SharePoint_Client_Search_Query_PopularTenantQuery$set_queryCount(value) {
this.$H_1 = value;
return value;
},
get_queryText: function Microsoft_SharePoint_Client_Search_Query_PopularTenantQuery$get_queryText() {
return this.$3_1;
},
set_queryText: function Microsoft_SharePoint_Client_Search_Query_PopularTenantQuery$set_queryText(value) {
this.$3_1 = value;
return value;
},
get_siteId: function Microsoft_SharePoint_Client_Search_Query_PopularTenantQuery$get_siteId() {
return this.$J_1;
},
set_siteId: function Microsoft_SharePoint_Client_Search_Query_PopularTenantQuery$set_siteId(value) {
this.$J_1 = value;
return value;
},
get_sourceId: function Microsoft_SharePoint_Client_Search_Query_PopularTenantQuery$get_sourceId() {
return this.$K_1;
},
set_sourceId: function Microsoft_SharePoint_Client_Search_Query_PopularTenantQuery$set_sourceId(value) {
this.$K_1 = value;
return value;
},
get_webId: function Microsoft_SharePoint_Client_Search_Query_PopularTenantQuery$get_webId() {
return this.$1f_1;
},
set_webId: function Microsoft_SharePoint_Client_Search_Query_PopularTenantQuery$set_webId(value) {
this.$1f_1 = value;
return value;
},
get_typeId: function Microsoft_SharePoint_Client_Search_Query_PopularTenantQuery$get_typeId() {
return '{0b50623e-3537-473b-9aa2-cc73f251534b}';
},
writeToXml: function Microsoft_SharePoint_Client_Search_Query_PopularTenantQuery$writeToXml(writer, serializationContext) {
if (!writer) {
throw Error.argumentNull('writer');
}
if (!serializationContext) {
throw Error.argumentNull('serializationContext');
}
var $v_0 = [ 'AlwaysSuggest', 'ClickCount', 'LCID', 'QueryCount', 'QueryText', 'SiteId', 'SourceId', 'WebId' ];
SP.DataConvert.writePropertiesToXml(writer, this, $v_0, serializationContext);
SP.ClientValueObject.prototype.writeToXml.call(this, writer, serializationContext);
},
initPropertiesFromJson: function Microsoft_SharePoint_Client_Search_Query_PopularTenantQuery$initPropertiesFromJson(parentNode) {
SP.ClientValueObject.prototype.initPropertiesFromJson.call(this, parentNode);
var $v_0;
$v_0 = parentNode.AlwaysSuggest;
if (!SP.ScriptUtility.isUndefined($v_0)) {
this.$A_1 = ($v_0);
delete parentNode.AlwaysSuggest;
}
$v_0 = parentNode.ClickCount;
if (!SP.ScriptUtility.isUndefined($v_0)) {
this.$C_1 = ($v_0);
delete parentNode.ClickCount;
}
$v_0 = parentNode.LCID;
if (!SP.ScriptUtility.isUndefined($v_0)) {
this.$5_1 = ($v_0);
delete parentNode.LCID;
}
$v_0 = parentNode.QueryCount;
if (!SP.ScriptUtility.isUndefined($v_0)) {
this.$H_1 = ($v_0);
delete parentNode.QueryCount;
}
$v_0 = parentNode.QueryText;
if (!SP.ScriptUtility.isUndefined($v_0)) {
this.$3_1 = ($v_0);
delete parentNode.QueryText;
}
$v_0 = parentNode.SiteId;
if (!SP.ScriptUtility.isUndefined($v_0)) {
this.$J_1 = ($v_0);
delete parentNode.SiteId;
}
$v_0 = parentNode.SourceId;
if (!SP.ScriptUtility.isUndefined($v_0)) {
this.$K_1 = ($v_0);
delete parentNode.SourceId;
}
$v_0 = parentNode.WebId;
if (!SP.ScriptUtility.isUndefined($v_0)) {
this.$1f_1 = ($v_0);
delete parentNode.WebId;
}
}
}
Microsoft.SharePoint.Client.Search.Query.Query = function Microsoft_SharePoint_Client_Search_Query_Query(context, objectPath) {
Microsoft.SharePoint.Client.Search.Query.Query.initializeBase(this, [ context, objectPath ]);
}
Microsoft.SharePoint.Client.Search.Query.Query.prototype = {
get_blockDedupeMode: function Microsoft_SharePoint_Client_Search_Query_Query$get_blockDedupeMode() {
this.checkUninitializedProperty('BlockDedupeMode');
return ((this.get_objectData().get_properties()['BlockDedupeMode']));
},
set_blockDedupeMode: function Microsoft_SharePoint_Client_Search_Query_Query$set_blockDedupeMode(value) {
this.get_objectData().get_properties()['BlockDedupeMode'] = value;
if ((this.get_context())) {
this.get_context().addQuery(new SP.ClientActionSetProperty(this, 'BlockDedupeMode', value));
}
return value;
},
get_bypassResultTypes: function Microsoft_SharePoint_Client_Search_Query_Query$get_bypassResultTypes() {
this.checkUninitializedProperty('BypassResultTypes');
return ((this.get_objectData().get_properties()['BypassResultTypes']));
},
set_bypassResultTypes: function Microsoft_SharePoint_Client_Search_Query_Query$set_bypassResultTypes(value) {
this.get_objectData().get_properties()['BypassResultTypes'] = value;
if ((this.get_context())) {
this.get_context().addQuery(new SP.ClientActionSetProperty(this, 'BypassResultTypes', value));
}
return value;
},
get_clientType: function Microsoft_SharePoint_Client_Search_Query_Query$get_clientType() {
this.checkUninitializedProperty('ClientType');
return ((this.get_objectData().get_properties()['ClientType']));
},
set_clientType: function Microsoft_SharePoint_Client_Search_Query_Query$set_clientType(value) {
this.get_objectData().get_properties()['ClientType'] = value;
if ((this.get_context())) {
this.get_context().addQuery(new SP.ClientActionSetProperty(this, 'ClientType', value));
}
return value;
},
get_culture: function Microsoft_SharePoint_Client_Search_Query_Query$get_culture() {
this.checkUninitializedProperty('Culture');
return ((this.get_objectData().get_properties()['Culture']));
},
set_culture: function Microsoft_SharePoint_Client_Search_Query_Query$set_culture(value) {
this.get_objectData().get_properties()['Culture'] = value;
if ((this.get_context())) {
this.get_context().addQuery(new SP.ClientActionSetProperty(this, 'Culture', value));
}
return value;
},
get_desiredSnippetLength: function Microsoft_SharePoint_Client_Search_Query_Query$get_desiredSnippetLength() {
this.checkUninitializedProperty('DesiredSnippetLength');
return ((this.get_objectData().get_properties()['DesiredSnippetLength']));
},
set_desiredSnippetLength: function Microsoft_SharePoint_Client_Search_Query_Query$set_desiredSnippetLength(value) {
this.get_objectData().get_properties()['DesiredSnippetLength'] = value;
if ((this.get_context())) {
this.get_context().addQuery(new SP.ClientActionSetProperty(this, 'DesiredSnippetLength', value));
}
return value;
},
get_enableInterleaving: function Microsoft_SharePoint_Client_Search_Query_Query$get_enableInterleaving() {
this.checkUninitializedProperty('EnableInterleaving');
return ((this.get_objectData().get_properties()['EnableInterleaving']));
},
set_enableInterleaving: function Microsoft_SharePoint_Client_Search_Query_Query$set_enableInterleaving(value) {
this.get_objectData().get_properties()['EnableInterleaving'] = value;
if ((this.get_context())) {
this.get_context().addQuery(new SP.ClientActionSetProperty(this, 'EnableInterleaving', value));
}
return value;
},
get_enableNicknames: function Microsoft_SharePoint_Client_Search_Query_Query$get_enableNicknames() {
this.checkUninitializedProperty('EnableNicknames');
return ((this.get_objectData().get_properties()['EnableNicknames']));
},
set_enableNicknames: function Microsoft_SharePoint_Client_Search_Query_Query$set_enableNicknames(value) {
this.get_objectData().get_properties()['EnableNicknames'] = value;
if ((this.get_context())) {
this.get_context().addQuery(new SP.ClientActionSetProperty(this, 'EnableNicknames', value));
}
return value;
},
get_enableOrderingHitHighlightedProperty: function Microsoft_SharePoint_Client_Search_Query_Query$get_enableOrderingHitHighlightedProperty() {
this.checkUninitializedProperty('EnableOrderingHitHighlightedProperty');
return ((this.get_objectData().get_properties()['EnableOrderingHitHighlightedProperty']));
},
set_enableOrderingHitHighlightedProperty: function Microsoft_SharePoint_Client_Search_Query_Query$set_enableOrderingHitHighlightedProperty(value) {
this.get_objectData().get_properties()['EnableOrderingHitHighlightedProperty'] = value;
if ((this.get_context())) {
this.get_context().addQuery(new SP.ClientActionSetProperty(this, 'EnableOrderingHitHighlightedProperty', value));
}
return value;
},
get_enablePhonetic: function Microsoft_SharePoint_Client_Search_Query_Query$get_enablePhonetic() {
this.checkUninitializedProperty('EnablePhonetic');
return ((this.get_objectData().get_properties()['EnablePhonetic']));
},
set_enablePhonetic: function Microsoft_SharePoint_Client_Search_Query_Query$set_enablePhonetic(value) {
this.get_objectData().get_properties()['EnablePhonetic'] = value;
if ((this.get_context())) {
this.get_context().addQuery(new SP.ClientActionSetProperty(this, 'EnablePhonetic', value));
}
return value;
},
get_enableQueryRules: function Microsoft_SharePoint_Client_Search_Query_Query$get_enableQueryRules() {
this.checkUninitializedProperty('EnableQueryRules');
return ((this.get_objectData().get_properties()['EnableQueryRules']));
},
set_enableQueryRules: function Microsoft_SharePoint_Client_Search_Query_Query$set_enableQueryRules(value) {
this.get_objectData().get_properties()['EnableQueryRules'] = value;
if ((this.get_context())) {
this.get_context().addQuery(new SP.ClientActionSetProperty(this, 'EnableQueryRules', value));
}
return value;
},
get_enableStemming: function Microsoft_SharePoint_Client_Search_Query_Query$get_enableStemming() {
this.checkUninitializedProperty('EnableStemming');
return ((this.get_objectData().get_properties()['EnableStemming']));
},
set_enableStemming: function Microsoft_SharePoint_Client_Search_Query_Query$set_enableStemming(value) {
this.get_objectData().get_properties()['EnableStemming'] = value;
if ((this.get_context())) {
this.get_context().addQuery(new SP.ClientActionSetProperty(this, 'EnableStemming', value));
}
return value;
},
get_generateBlockRankLog: function Microsoft_SharePoint_Client_Search_Query_Query$get_generateBlockRankLog() {
this.checkUninitializedProperty('GenerateBlockRankLog');
return ((this.get_objectData().get_properties()['GenerateBlockRankLog']));
},
set_generateBlockRankLog: function Microsoft_SharePoint_Client_Search_Query_Query$set_generateBlockRankLog(value) {
this.get_objectData().get_properties()['GenerateBlockRankLog'] = value;
if ((this.get_context())) {
this.get_context().addQuery(new SP.ClientActionSetProperty(this, 'GenerateBlockRankLog', value));
}
return value;
},
get_hitHighlightedMultivaluePropertyLimit: function Microsoft_SharePoint_Client_Search_Query_Query$get_hitHighlightedMultivaluePropertyLimit() {
this.checkUninitializedProperty('HitHighlightedMultivaluePropertyLimit');
return ((this.get_objectData().get_properties()['HitHighlightedMultivaluePropertyLimit']));
},
set_hitHighlightedMultivaluePropertyLimit: function Microsoft_SharePoint_Client_Search_Query_Query$set_hitHighlightedMultivaluePropertyLimit(value) {
this.get_objectData().get_properties()['HitHighlightedMultivaluePropertyLimit'] = value;
if ((this.get_context())) {
this.get_context().addQuery(new SP.ClientActionSetProperty(this, 'HitHighlightedMultivaluePropertyLimit', value));
}
return value;
},
get_hitHighlightedProperties: function Microsoft_SharePoint_Client_Search_Query_Query$get_hitHighlightedProperties() {
var $v_0 = ((this.get_objectData().get_clientObjectProperties()['HitHighlightedProperties']));
if (SP.ScriptUtility.isUndefined($v_0)) {
$v_0 = new Microsoft.SharePoint.Client.Search.Query.StringCollection(this.get_context(), new SP.ObjectPathProperty(this.get_context(), this.get_path(), 'HitHighlightedProperties'));
this.get_objectData().get_clientObjectProperties()['HitHighlightedProperties'] = $v_0;
}
return $v_0;
},
get_ignoreSafeQueryPropertiesTemplateUrl: function Microsoft_SharePoint_Client_Search_Query_Query$get_ignoreSafeQueryPropertiesTemplateUrl() {
this.checkUninitializedProperty('IgnoreSafeQueryPropertiesTemplateUrl');
return ((this.get_objectData().get_properties()['IgnoreSafeQueryPropertiesTemplateUrl']));
},
set_ignoreSafeQueryPropertiesTemplateUrl: function Microsoft_SharePoint_Client_Search_Query_Query$set_ignoreSafeQueryPropertiesTemplateUrl(value) {
this.get_objectData().get_properties()['IgnoreSafeQueryPropertiesTemplateUrl'] = value;
if ((this.get_context())) {
this.get_context().addQuery(new SP.ClientActionSetProperty(this, 'IgnoreSafeQueryPropertiesTemplateUrl', value));
}
return value;
},
get_impressionID: function Microsoft_SharePoint_Client_Search_Query_Query$get_impressionID() {
this.checkUninitializedProperty('ImpressionID');
return ((this.get_objectData().get_properties()['ImpressionID']));
},
set_impressionID: function Microsoft_SharePoint_Client_Search_Query_Query$set_impressionID(value) {
this.get_objectData().get_properties()['ImpressionID'] = value;
if ((this.get_context())) {
this.get_context().addQuery(new SP.ClientActionSetProperty(this, 'ImpressionID', value));
}
return value;
},
get_maxSnippetLength: function Microsoft_SharePoint_Client_Search_Query_Query$get_maxSnippetLength() {
this.checkUninitializedProperty('MaxSnippetLength');
return ((this.get_objectData().get_properties()['MaxSnippetLength']));
},
set_maxSnippetLength: function Microsoft_SharePoint_Client_Search_Query_Query$set_maxSnippetLength(value) {
this.get_objectData().get_properties()['MaxSnippetLength'] = value;
if ((this.get_context())) {
this.get_context().addQuery(new SP.ClientActionSetProperty(this, 'MaxSnippetLength', value));
}
return value;
},
get_personalizationData: function Microsoft_SharePoint_Client_Search_Query_Query$get_personalizationData() {
var $v_0 = ((this.get_objectData().get_clientObjectProperties()['PersonalizationData']));
if (SP.ScriptUtility.isUndefined($v_0)) {
$v_0 = new Microsoft.SharePoint.Client.Search.Query.QueryPersonalizationData(this.get_context(), new SP.ObjectPathProperty(this.get_context(), this.get_path(), 'PersonalizationData'));
this.get_objectData().get_clientObjectProperties()['PersonalizationData'] = $v_0;
}
return $v_0;
},
set_personalizationData: function Microsoft_SharePoint_Client_Search_Query_Query$set_personalizationData(value) {
this.get_objectData().get_clientObjectProperties()['PersonalizationData'] = value;
if ((this.get_context())) {
this.get_context().addQuery(new SP.ClientActionSetProperty(this, 'PersonalizationData', value));
}
return value;
},
get_processBestBets: function Microsoft_SharePoint_Client_Search_Query_Query$get_processBestBets() {
this.checkUninitializedProperty('ProcessBestBets');
return ((this.get_objectData().get_properties()['ProcessBestBets']));
},
set_processBestBets: function Microsoft_SharePoint_Client_Search_Query_Query$set_processBestBets(value) {
this.get_objectData().get_properties()['ProcessBestBets'] = value;
if ((this.get_context())) {
this.get_context().addQuery(new SP.ClientActionSetProperty(this, 'ProcessBestBets', value));
}
return value;
},
get_processPersonalFavorites: function Microsoft_SharePoint_Client_Search_Query_Query$get_processPersonalFavorites() {
this.checkUninitializedProperty('ProcessPersonalFavorites');
return ((this.get_objectData().get_properties()['ProcessPersonalFavorites']));
},
set_processPersonalFavorites: function Microsoft_SharePoint_Client_Search_Query_Query$set_processPersonalFavorites(value) {
this.get_objectData().get_properties()['ProcessPersonalFavorites'] = value;
if ((this.get_context())) {
this.get_context().addQuery(new SP.ClientActionSetProperty(this, 'ProcessPersonalFavorites', value));
}
return value;
},
get_propertiesToGenerateAcronyms: function Microsoft_SharePoint_Client_Search_Query_Query$get_propertiesToGenerateAcronyms() {
var $v_0 = ((this.get_objectData().get_clientObjectProperties()['PropertiesToGenerateAcronyms']));
if (SP.ScriptUtility.isUndefined($v_0)) {
$v_0 = new Microsoft.SharePoint.Client.Search.Query.StringCollection(this.get_context(), new SP.ObjectPathProperty(this.get_context(), this.get_path(), 'PropertiesToGenerateAcronyms'));
this.get_objectData().get_clientObjectProperties()['PropertiesToGenerateAcronyms'] = $v_0;
}
return $v_0;
},
get_queryTag: function Microsoft_SharePoint_Client_Search_Query_Query$get_queryTag() {
this.checkUninitializedProperty('QueryTag');
return ((this.get_objectData().get_properties()['QueryTag']));
},
set_queryTag: function Microsoft_SharePoint_Client_Search_Query_Query$set_queryTag(value) {
this.get_objectData().get_properties()['QueryTag'] = value;
if ((this.get_context())) {
this.get_context().addQuery(new SP.ClientActionSetProperty(this, 'QueryTag', value));
}
return value;
},
get_queryTemplate: function Microsoft_SharePoint_Client_Search_Query_Query$get_queryTemplate() {
this.checkUninitializedProperty('QueryTemplate');
return ((this.get_objectData().get_properties()['QueryTemplate']));
},
set_queryTemplate: function Microsoft_SharePoint_Client_Search_Query_Query$set_queryTemplate(value) {
this.get_objectData().get_properties()['QueryTemplate'] = value;
if ((this.get_context())) {
this.get_context().addQuery(new SP.ClientActionSetProperty(this, 'QueryTemplate', value));
}
return value;
},
get_queryTemplateParameters: function Microsoft_SharePoint_Client_Search_Query_Query$get_queryTemplateParameters() {
this.checkUninitializedProperty('QueryTemplateParameters');
return ((this.get_objectData().get_properties()['QueryTemplateParameters']));
},
get_queryText: function Microsoft_SharePoint_Client_Search_Query_Query$get_queryText() {
this.checkUninitializedProperty('QueryText');
return ((this.get_objectData().get_properties()['Qu