gd-sprest 9.7.2 → 9.7.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/@types/utils/base.d.ts +0 -3
- package/build/helper/executor.js +10 -20
- package/build/helper/fieldSchemaXML.js +85 -89
- package/build/helper/index.js +12 -28
- package/build/helper/jslink.js +124 -128
- package/build/helper/listForm.js +109 -118
- package/build/helper/listFormField.js +62 -65
- package/build/helper/methods/addContentEditorWebPart.js +9 -17
- package/build/helper/methods/addPermissionLevel.js +12 -16
- package/build/helper/methods/addScriptEditorWebPart.js +9 -17
- package/build/helper/methods/copyPermissionLevel.js +22 -26
- package/build/helper/methods/createContentType.js +96 -19
- package/build/helper/methods/createDocSet.js +10 -14
- package/build/helper/methods/getCurrentTheme.js +26 -31
- package/build/helper/methods/hasPermissions.js +8 -13
- package/build/helper/methods/index.js +16 -32
- package/build/helper/methods/loadSPCore.js +13 -17
- package/build/helper/methods/parse.js +5 -9
- package/build/helper/methods/request.js +4 -8
- package/build/helper/methods/setContentTypeFields.js +71 -79
- package/build/helper/methods/setGroupOwner.js +6 -10
- package/build/helper/methods/setWebProperty.js +26 -30
- package/build/helper/methods/stringify.js +3 -7
- package/build/helper/methods/webWorker.js +40 -20
- package/build/helper/ribbonLink.js +10 -14
- package/build/helper/sbLink.js +11 -15
- package/build/helper/sp/calloutManager.js +22 -25
- package/build/helper/sp/index.js +13 -16
- package/build/helper/sp/modalDialog.js +32 -35
- package/build/helper/sp/notify.js +9 -12
- package/build/helper/sp/ribbon.js +1 -4
- package/build/helper/sp/sod.js +9 -18
- package/build/helper/sp/status.js +18 -21
- package/build/helper/spCfg.js +232 -259
- package/build/helper/spCfgTypes.js +2 -5
- package/build/helper/taxonomy.js +144 -182
- package/build/helper/webpart.js +110 -94
- package/build/index.js +6 -23
- package/build/lib/apps.js +4 -7
- package/build/lib/contextInfo.js +217 -781
- package/build/lib/directorySession.js +4 -7
- package/build/lib/graph.js +16 -19
- package/build/lib/groupService.js +4 -7
- package/build/lib/groupSiteManager.js +4 -7
- package/build/lib/hubSites.js +11 -25
- package/build/lib/hubSitesUtility.js +4 -7
- package/build/lib/index.js +27 -43
- package/build/lib/list.js +49 -53
- package/build/lib/navigation.js +4 -7
- package/build/lib/peopleManager.js +4 -7
- package/build/lib/peoplePicker.js +4 -7
- package/build/lib/profileLoader.js +4 -7
- package/build/lib/search.js +30 -33
- package/build/lib/sensitivityLabels.js +6 -9
- package/build/lib/site.js +20 -35
- package/build/lib/siteIconManager.js +4 -7
- package/build/lib/siteManager.js +4 -7
- package/build/lib/sitePages.js +37 -51
- package/build/lib/socialFeed.js +13 -16
- package/build/lib/themeManager.js +4 -7
- package/build/lib/userProfile.js +4 -7
- package/build/lib/utility.js +12 -17
- package/build/lib/web.js +34 -49
- package/build/lib/webTemplateExtensions.js +4 -7
- package/build/lib/wfInstanceService.js +4 -7
- package/build/lib/wfSubscriptionService.js +4 -7
- package/build/mapper/custom/audit.js +3 -6
- package/build/mapper/custom/graph.js +13 -16
- package/build/mapper/custom/index.js +8 -24
- package/build/mapper/custom/odata.js +3 -6
- package/build/mapper/custom/old.js +42 -45
- package/build/mapper/custom/peoplePicker.js +4 -7
- package/build/mapper/custom/propertyValues.js +3 -6
- package/build/mapper/custom/utility.js +17 -20
- package/build/mapper/custom/webTemplateExtensions.js +19 -22
- package/build/mapper/def.js +1032 -989
- package/build/mapper/index.js +4 -9
- package/build/mapper/v2.js +2629 -2632
- package/build/rest.js +16 -19
- package/build/sptypes/graphtypes.js +694 -710
- package/build/sptypes/index.js +3 -7
- package/build/sptypes/sptypes.js +49 -52
- package/build/utils/base.js +20 -37
- package/build/utils/batch.js +53 -63
- package/build/utils/helper.js +79 -83
- package/build/utils/index.js +9 -25
- package/build/utils/methodInfo.js +88 -141
- package/build/utils/oData.js +62 -112
- package/build/utils/request.js +137 -155
- package/build/utils/requestType.js +1 -4
- package/build/utils/targetInfo.js +39 -52
- package/build/utils/xhrRequest.js +59 -107
- package/build/v2/drive.js +9 -13
- package/build/v2/drives.js +8 -12
- package/build/v2/index.js +3 -19
- package/build/v2/sites.js +61 -65
- package/dist/gd-sprest.d.ts +0 -3
- package/dist/gd-sprest.js +1 -1
- package/dist/gd-sprest.min.js +1 -1
- package/package.json +2 -2
package/build/helper/webpart.js
CHANGED
|
@@ -1,35 +1,31 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.WebPart = void 0;
|
|
4
|
-
var ribbon_1 = require("./sp/ribbon");
|
|
1
|
+
import { Ribbon } from "./sp/ribbon";
|
|
5
2
|
/**
|
|
6
3
|
* Web Part
|
|
7
4
|
*/
|
|
8
|
-
|
|
5
|
+
class _WebPart {
|
|
9
6
|
/**
|
|
10
7
|
* Constructor
|
|
11
8
|
* @param props - The webpart properties.
|
|
12
9
|
*/
|
|
13
|
-
|
|
14
|
-
var _this = this;
|
|
10
|
+
constructor(props) {
|
|
15
11
|
this._props = null;
|
|
16
12
|
this._wp = null;
|
|
17
13
|
/**
|
|
18
14
|
* Method to add the help link to a script part editor.
|
|
19
15
|
* @wpId - The webpart id.
|
|
20
16
|
*/
|
|
21
|
-
this.addHelpLink =
|
|
17
|
+
this.addHelpLink = () => {
|
|
22
18
|
// Ensure the help properties exist
|
|
23
|
-
if (
|
|
19
|
+
if (this._props.helpProps) {
|
|
24
20
|
// Get the webpart's "Snippet"
|
|
25
|
-
|
|
21
|
+
let link = document.querySelector("div[webpartid='" + this._wp.wpId + "'] a[title='Edit Snippet']");
|
|
26
22
|
if (link) {
|
|
27
23
|
// Create the help link
|
|
28
|
-
|
|
29
|
-
helpLink.href =
|
|
24
|
+
let helpLink = document.createElement("a");
|
|
25
|
+
helpLink.href = this._props.helpProps.url || "#";
|
|
30
26
|
helpLink.style.paddingLeft = "10px";
|
|
31
27
|
helpLink.setAttribute("role", "button");
|
|
32
|
-
helpLink.title =
|
|
28
|
+
helpLink.title = this._props.helpProps.title || "Help";
|
|
33
29
|
helpLink.innerHTML = "<span class='ms-metadata'>" + helpLink.title + "</span>";
|
|
34
30
|
helpLink.target = "_blank";
|
|
35
31
|
// Append the link
|
|
@@ -41,11 +37,11 @@ var _WebPart = /** @class */ (function () {
|
|
|
41
37
|
* Method to get the webpart id for a specified element
|
|
42
38
|
* @param el - The target element.
|
|
43
39
|
*/
|
|
44
|
-
this.getWebPartId =
|
|
40
|
+
this.getWebPartId = (el) => {
|
|
45
41
|
// Loop until we find the webpart id
|
|
46
42
|
while (el) {
|
|
47
43
|
// See if this element contains the webpart id
|
|
48
|
-
|
|
44
|
+
let wpId = el.getAttribute("webpartid");
|
|
49
45
|
if (wpId) {
|
|
50
46
|
// Return the webpart id
|
|
51
47
|
return wpId;
|
|
@@ -59,38 +55,38 @@ var _WebPart = /** @class */ (function () {
|
|
|
59
55
|
/**
|
|
60
56
|
* Method to get the webpart information
|
|
61
57
|
*/
|
|
62
|
-
this.getWebPartInfo =
|
|
63
|
-
|
|
58
|
+
this.getWebPartInfo = () => {
|
|
59
|
+
let targetInfo = {
|
|
64
60
|
cfg: null,
|
|
65
61
|
el: null,
|
|
66
62
|
wpId: null
|
|
67
63
|
};
|
|
68
64
|
// Ensure the element id exists
|
|
69
|
-
if (
|
|
65
|
+
if (this._props.elementId) {
|
|
70
66
|
// Get the webpart elements
|
|
71
|
-
|
|
72
|
-
for (
|
|
73
|
-
|
|
67
|
+
let elements = document.querySelectorAll("#" + this._props.elementId);
|
|
68
|
+
for (let i = 0; i < elements.length; i++) {
|
|
69
|
+
let elWebPart = elements[i];
|
|
74
70
|
// See if we have already configured this element
|
|
75
71
|
if (elWebPart.getAttribute("data-isConfigured")) {
|
|
76
72
|
continue;
|
|
77
73
|
}
|
|
78
74
|
// Get the webpart id
|
|
79
|
-
|
|
75
|
+
let wpId = this.getWebPartId(elWebPart);
|
|
80
76
|
if (wpId) {
|
|
81
77
|
// See if the configuration element exists
|
|
82
|
-
|
|
78
|
+
let elCfg = this._props.cfgElementId ? elWebPart.parentElement.querySelector("#" + this._props.cfgElementId) : null;
|
|
83
79
|
if (elCfg) {
|
|
84
80
|
try {
|
|
85
81
|
// Parse the configuration
|
|
86
|
-
|
|
82
|
+
let cfg = JSON.parse(elCfg.innerText.trim());
|
|
87
83
|
// See if the webaprt id exists
|
|
88
84
|
if (cfg.WebPartId) {
|
|
89
85
|
// See if it's for this webpart
|
|
90
86
|
if (cfg.WebPartId == wpId) {
|
|
91
87
|
// Set the target information
|
|
92
88
|
targetInfo = {
|
|
93
|
-
cfg
|
|
89
|
+
cfg,
|
|
94
90
|
el: elWebPart,
|
|
95
91
|
wpId: wpId
|
|
96
92
|
};
|
|
@@ -119,7 +115,7 @@ var _WebPart = /** @class */ (function () {
|
|
|
119
115
|
wpId: wpId
|
|
120
116
|
};
|
|
121
117
|
// Log
|
|
122
|
-
console.log("[sp-webpart] Error parsing the configuration for element '" +
|
|
118
|
+
console.log("[sp-webpart] Error parsing the configuration for element '" + this._props.cfgElementId + "'.");
|
|
123
119
|
}
|
|
124
120
|
// Break from the loop
|
|
125
121
|
break;
|
|
@@ -140,7 +136,7 @@ var _WebPart = /** @class */ (function () {
|
|
|
140
136
|
// Ensure elements were found
|
|
141
137
|
if (elements.length == 0) {
|
|
142
138
|
// Log
|
|
143
|
-
console.log("[sp-webpart] Error - Unable to find elements with id '" +
|
|
139
|
+
console.log("[sp-webpart] Error - Unable to find elements with id '" + this._props.elementId + "'.");
|
|
144
140
|
}
|
|
145
141
|
}
|
|
146
142
|
else {
|
|
@@ -158,107 +154,127 @@ var _WebPart = /** @class */ (function () {
|
|
|
158
154
|
/**
|
|
159
155
|
* Method to render the webpart
|
|
160
156
|
*/
|
|
161
|
-
this.render =
|
|
162
|
-
|
|
157
|
+
this.render = () => {
|
|
158
|
+
let element = null;
|
|
163
159
|
// Get the webpart information
|
|
164
|
-
|
|
165
|
-
if (
|
|
160
|
+
this._wp = this.getWebPartInfo();
|
|
161
|
+
if (this._wp == null || this._wp.el == null) {
|
|
166
162
|
// Log
|
|
167
|
-
console.log("[sp-webpart] The target webpart element '" +
|
|
163
|
+
console.log("[sp-webpart] The target webpart element '" + this._props.elementId + "' was not found.");
|
|
168
164
|
return;
|
|
169
165
|
}
|
|
170
166
|
// See if the page is being edited
|
|
171
|
-
|
|
172
|
-
if (
|
|
167
|
+
let returnVal = null;
|
|
168
|
+
if (WebPart.isEditMode()) {
|
|
173
169
|
// Add the help link
|
|
174
|
-
|
|
170
|
+
this.addHelpLink();
|
|
175
171
|
// Call the render event
|
|
176
|
-
if (
|
|
172
|
+
if (this._props.onRenderEdit) {
|
|
177
173
|
// Execute the render edit event
|
|
178
|
-
returnVal =
|
|
174
|
+
returnVal = this._props.onRenderEdit(this._wp);
|
|
179
175
|
}
|
|
180
176
|
}
|
|
181
177
|
else {
|
|
182
178
|
// See if the configuration is defined, but has no value
|
|
183
|
-
if (
|
|
179
|
+
if (this._wp.cfg || (this._props.cfgElementId || "").length == 0) {
|
|
184
180
|
// Execute the render edit event
|
|
185
|
-
returnVal =
|
|
181
|
+
returnVal = this._props.onRenderDisplay(this._wp);
|
|
186
182
|
}
|
|
187
183
|
else {
|
|
188
184
|
// Render a message
|
|
189
|
-
|
|
185
|
+
this._wp.el.innerHTML = '<h3>Please edit the page and configure the webpart.</h3>';
|
|
190
186
|
}
|
|
191
187
|
}
|
|
192
188
|
// See if a promise was returned
|
|
193
189
|
if (returnVal && returnVal.then) {
|
|
194
190
|
// Wait for the request to complete
|
|
195
|
-
returnVal.then(
|
|
196
|
-
var args = [];
|
|
197
|
-
for (var _i = 0; _i < arguments.length; _i++) {
|
|
198
|
-
args[_i] = arguments[_i];
|
|
199
|
-
}
|
|
191
|
+
returnVal.then((...args) => {
|
|
200
192
|
// Execute the post render event
|
|
201
|
-
|
|
193
|
+
this._props.onPostRender ? this._props.onPostRender(this._wp) : null;
|
|
202
194
|
});
|
|
203
195
|
}
|
|
204
196
|
else {
|
|
205
197
|
// Execute the post render event
|
|
206
|
-
|
|
198
|
+
this._props.onPostRender ? this._props.onPostRender(this._wp) : null;
|
|
207
199
|
}
|
|
208
200
|
};
|
|
209
201
|
// Set the properties
|
|
210
202
|
this._props = props || {};
|
|
211
203
|
// Add a load event
|
|
212
|
-
window.addEventListener("load",
|
|
204
|
+
window.addEventListener("load", () => {
|
|
213
205
|
// Render the component
|
|
214
|
-
|
|
206
|
+
this.render();
|
|
215
207
|
});
|
|
216
208
|
}
|
|
217
209
|
// Method to create an instance of the webpart
|
|
218
|
-
|
|
210
|
+
static create(props) {
|
|
219
211
|
// Return an instance of the webpart
|
|
220
212
|
return new _WebPart(props);
|
|
221
|
-
}
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
// Generates the XML for a content editor webpart
|
|
216
|
+
_WebPart.generateContentEditorXML = (props) => {
|
|
217
|
+
return `<?xml version="1.0" encoding="utf-8"?>
|
|
218
|
+
<WebPart xmlns="http://schemas.microsoft.com/WebPart/v2">
|
|
219
|
+
<Assembly>Microsoft.SharePoint, Version=16.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c</Assembly>
|
|
220
|
+
<TypeName>Microsoft.SharePoint.WebPartPages.ContentEditorWebPart</TypeName>
|
|
221
|
+
<Title>[[Title]]</Title>
|
|
222
|
+
<Description>[[Description]]</Description>
|
|
223
|
+
<FrameType>[[FrameType]]</FrameType>
|
|
224
|
+
<ContentLink xmlns="http://schemas.microsoft.com/WebPart/v2/ContentEditor">[[ContentLink]]</ContentLink>
|
|
225
|
+
<Content xmlns="http://schemas.microsoft.com/WebPart/v2/ContentEditor"><![CDATA[[[Content]]]]></Content>
|
|
226
|
+
</WebPart>`.replace(/\r?\n/g, '')
|
|
227
|
+
.replace(/\[\[FrameType\]\]/g, props.frameType || "Default")
|
|
228
|
+
.replace(/\[\[Content\]\]/g, props.content || "")
|
|
229
|
+
.replace(/\[\[ContentLink\]\]/g, props.contentLink || "")
|
|
230
|
+
.replace(/\[\[Description\]\]/g, props.description || "")
|
|
231
|
+
.replace(/\[\[Title\]\]/g, props.title || "");
|
|
232
|
+
};
|
|
233
|
+
// Generates the XML for a script editor webpart
|
|
234
|
+
_WebPart.generateScriptEditorXML = (props) => {
|
|
235
|
+
return `<?xml version="1.0" encoding="utf-8"?>
|
|
236
|
+
<webParts>
|
|
237
|
+
<webPart xmlns="http://schemas.microsoft.com/WebPart/v3">
|
|
238
|
+
<metaData>
|
|
239
|
+
<type name="Microsoft.SharePoint.WebPartPages.ScriptEditorWebPart, Microsoft.SharePoint, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" />
|
|
240
|
+
<importErrorMessage>$Resources:core,ImportantErrorMessage;</importErrorMessage>
|
|
241
|
+
</metaData>
|
|
242
|
+
<data>
|
|
243
|
+
<properties>
|
|
244
|
+
<property name="Title" type="string">[[Title]]</property>
|
|
245
|
+
<property name="Description" type="string">[[Description]]</property>
|
|
246
|
+
<property name="ChromeType" type="chrometype">[[ChromeType]]</property>
|
|
247
|
+
<property name="Content" type="string">[[Content]]</property>
|
|
248
|
+
</properties>
|
|
249
|
+
</data>
|
|
250
|
+
</webPart>
|
|
251
|
+
</webParts>`.replace(/\r?\n/g, '')
|
|
252
|
+
.replace(/\[\[ChromeType\]\]/g, props.chromeType || "TitleOnly")
|
|
253
|
+
.replace(/\[\[Content\]\]/g, props.content.replace(/\</g, '<').replace(/\>/g, '>'))
|
|
254
|
+
.replace(/\[\[Description\]\]/g, props.description || "")
|
|
255
|
+
.replace(/\[\[Title\]\]/g, props.title || "");
|
|
256
|
+
};
|
|
257
|
+
/**
|
|
258
|
+
* Method to detect if a page is being edited
|
|
259
|
+
*/
|
|
260
|
+
_WebPart.isEditMode = () => {
|
|
261
|
+
// See if the ribbon page state exists
|
|
262
|
+
if (Ribbon.PageState.Handlers.isInEditMode != null) {
|
|
263
|
+
// Return the mode
|
|
264
|
+
return Ribbon.PageState.Handlers.isInEditMode;
|
|
265
|
+
}
|
|
266
|
+
// Get the form
|
|
267
|
+
let formName = window["MSOWebPartPageFormName"];
|
|
268
|
+
let form = formName ? document.forms[formName] : null;
|
|
269
|
+
if (form) {
|
|
270
|
+
// Get the wiki page mode
|
|
271
|
+
let wikiPageMode = form._wikiPageMode ? form._wikiPageMode.value : null;
|
|
272
|
+
// Get the webpart page mode
|
|
273
|
+
let wpPageMode = form.MSOLayout_InDesignMode ? form.MSOLayout_InDesignMode.value : null;
|
|
274
|
+
// Determine if the page is being edited
|
|
275
|
+
return wikiPageMode == "Edit" || wpPageMode == "1";
|
|
276
|
+
}
|
|
277
|
+
// Unable to determine
|
|
278
|
+
return false;
|
|
279
|
+
};
|
|
280
|
+
export const WebPart = _WebPart;
|
package/build/index.js
CHANGED
|
@@ -1,20 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.v2 = exports.Helper = void 0;
|
|
18
2
|
// Type definitions for gd-sprest
|
|
19
3
|
// Project: https://dattabase.com
|
|
20
4
|
// Definitions by: Gunjan Datta <https://github.com/gunjandatta>
|
|
@@ -41,10 +25,9 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
|
41
25
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
42
26
|
SOFTWARE.
|
|
43
27
|
***************************************************************************************************/
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
exports.v2 = v2;
|
|
28
|
+
import * as Helper from "./helper";
|
|
29
|
+
export * from "./lib";
|
|
30
|
+
export * from "./rest";
|
|
31
|
+
export * from "./sptypes";
|
|
32
|
+
import * as v2 from "./v2";
|
|
33
|
+
export { Helper, v2 };
|
package/build/lib/apps.js
CHANGED
|
@@ -1,17 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Apps = void 0;
|
|
4
|
-
var utils_1 = require("../utils");
|
|
1
|
+
import { Base, Request } from "../utils";
|
|
5
2
|
/**
|
|
6
3
|
* Apps
|
|
7
4
|
*/
|
|
8
|
-
|
|
9
|
-
|
|
5
|
+
export const Apps = ((targetInfo) => {
|
|
6
|
+
let apps = new Base(targetInfo);
|
|
10
7
|
// Default the properties
|
|
11
8
|
apps.targetInfo.defaultToWebFl = true;
|
|
12
9
|
apps.targetInfo.endpoint = "apps";
|
|
13
10
|
// Add the methods
|
|
14
|
-
|
|
11
|
+
Request.addMethods(apps, { __metadata: { type: "Microsoft.AppServices.AppCollection" } });
|
|
15
12
|
// Return the apps
|
|
16
13
|
return apps;
|
|
17
14
|
});
|