@pnp/cli-microsoft365 6.11.0-beta.69fd6f4 → 6.11.0-beta.79a1133
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/dist/Auth.js +2 -1
- package/dist/Command.js +1 -1
- package/dist/m365/cli/commands/config/config-list.js +29 -0
- package/dist/m365/cli/commands.js +1 -0
- package/dist/m365/pa/commands/app/app-permission-ensure.js +177 -0
- package/dist/m365/pa/commands/app/app-permission-remove.js +170 -0
- package/dist/m365/pa/commands.js +2 -0
- package/dist/m365/planner/commands/bucket/bucket-add.js +2 -2
- package/dist/m365/planner/commands/bucket/bucket-get.js +2 -2
- package/dist/m365/planner/commands/bucket/bucket-list.js +2 -2
- package/dist/m365/planner/commands/bucket/bucket-remove.js +2 -2
- package/dist/m365/planner/commands/bucket/bucket-set.js +2 -2
- package/dist/m365/planner/commands/plan/plan-get.js +1 -2
- package/dist/m365/planner/commands/plan/plan-list.js +4 -5
- package/dist/m365/planner/commands/plan/plan-set.js +2 -2
- package/dist/m365/planner/commands/task/task-add.js +17 -11
- package/dist/m365/planner/commands/task/task-get.js +35 -25
- package/dist/m365/planner/commands/task/task-list.js +26 -19
- package/dist/m365/planner/commands/task/task-remove.js +40 -35
- package/dist/m365/planner/commands/task/task-set.js +35 -23
- package/dist/m365/spfx/commands/project/DeployWorkflow.js +58 -0
- package/dist/m365/spfx/commands/project/project-doctor/{doctor-1.18.0-beta.1.js → doctor-1.18.0-beta.5.js} +1 -1
- package/dist/m365/spfx/commands/project/project-doctor.js +1 -1
- package/dist/m365/spfx/commands/project/project-externalize/rules/PnPJsRule.js +34 -23
- package/dist/m365/spfx/commands/project/project-github-workflow-add.js +171 -0
- package/dist/m365/spfx/commands/project/project-github-workflow-model.js +3 -0
- package/dist/m365/spfx/commands/project/project-upgrade/upgrade-1.15.2.js +1 -1
- package/dist/m365/spfx/commands/project/project-upgrade/{upgrade-1.18.0-beta.1.js → upgrade-1.18.0-beta.5.js} +26 -26
- package/dist/m365/spfx/commands/project/project-upgrade.js +1 -1
- package/dist/m365/spfx/commands/spfx-doctor.js +35 -51
- package/dist/m365/spfx/commands.js +1 -0
- package/dist/m365/spo/commands/app/SpoAppBaseCommand.js +26 -14
- package/dist/m365/spo/commands/app/app-add.js +9 -9
- package/dist/m365/spo/commands/file/file-add.js +13 -13
- package/dist/m365/spo/commands/file/file-checkin.js +1 -1
- package/dist/m365/spo/commands/file/file-checkout.js +1 -1
- package/dist/m365/spo/commands/file/file-copy.js +38 -4
- package/dist/m365/spo/commands/file/file-list.js +4 -4
- package/dist/m365/spo/commands/file/file-move.js +2 -2
- package/dist/m365/spo/commands/file/file-remove.js +6 -6
- package/dist/m365/spo/commands/file/file-rename.js +2 -2
- package/dist/m365/spo/commands/file/file-retentionlabel-ensure.js +1 -1
- package/dist/m365/spo/commands/file/file-retentionlabel-remove.js +1 -1
- package/dist/m365/spo/commands/file/file-roleassignment-add.js +1 -1
- package/dist/m365/spo/commands/file/file-roleassignment-remove.js +1 -1
- package/dist/m365/spo/commands/file/file-roleinheritance-break.js +1 -1
- package/dist/m365/spo/commands/file/file-roleinheritance-reset.js +1 -1
- package/dist/m365/spo/commands/file/file-version-clear.js +1 -1
- package/dist/m365/spo/commands/file/file-version-get.js +1 -1
- package/dist/m365/spo/commands/file/file-version-list.js +1 -1
- package/dist/m365/spo/commands/file/file-version-remove.js +1 -1
- package/dist/m365/spo/commands/file/file-version-restore.js +1 -1
- package/dist/m365/spo/commands/folder/folder-add.js +2 -4
- package/dist/m365/spo/commands/folder/folder-get.js +1 -1
- package/dist/m365/spo/commands/folder/folder-list.js +2 -2
- package/dist/m365/spo/commands/folder/folder-remove.js +7 -4
- package/dist/m365/spo/commands/folder/folder-rename.js +13 -17
- package/dist/m365/spo/commands/folder/folder-retentionlabel-ensure.js +1 -1
- package/dist/m365/spo/commands/folder/folder-retentionlabel-remove.js +1 -1
- package/dist/m365/spo/commands/folder/folder-roleassignment-add.js +1 -1
- package/dist/m365/spo/commands/folder/folder-roleassignment-remove.js +1 -1
- package/dist/m365/spo/commands/folder/folder-roleinheritance-break.js +1 -1
- package/dist/m365/spo/commands/folder/folder-roleinheritance-reset.js +1 -1
- package/dist/m365/spo/commands/group/group-list.js +0 -1
- package/dist/m365/spo/commands/navigation/navigation-node-set.js +2 -2
- package/dist/m365/spo/commands/orgassetslibrary/orgassetslibrary-add.js +32 -3
- package/dist/m365/spo/commands/page/Page.js +24 -32
- package/dist/m365/spo/commands/propertybag/propertybag-base.js +75 -54
- package/dist/m365/spo/commands/propertybag/propertybag-remove.js +41 -40
- package/dist/m365/spo/commands/serviceprincipal/serviceprincipal-set.js +32 -32
- package/dist/m365/spo/commands/site/FlowsPolicy.js +10 -0
- package/dist/m365/spo/commands/site/site-add.js +113 -154
- package/dist/m365/spo/commands/site/site-apppermission-add.js +26 -27
- package/dist/m365/spo/commands/site/site-apppermission-remove.js +37 -37
- package/dist/m365/spo/commands/site/site-apppermission-set.js +15 -16
- package/dist/m365/spo/commands/site/site-ensure.js +19 -70
- package/dist/m365/spo/commands/site/site-hubsite-disconnect.js +24 -22
- package/dist/m365/spo/commands/site/site-list.js +28 -36
- package/dist/m365/spo/commands/site/site-remove.js +139 -171
- package/dist/m365/spo/commands/site/site-set.js +179 -178
- package/dist/m365/spo/commands/theme/theme-remove.js +26 -24
- package/dist/m365/spo/commands/theme/theme-set.js +0 -1
- package/dist/m365/spo/commands/user/user-remove.js +29 -27
- package/dist/m365/spo/commands/web/web-reindex.js +17 -20
- package/dist/m365/spo/commands/web/web-remove.js +23 -21
- package/dist/m365/spo/commands/web/web-roleassignment-add.js +45 -52
- package/dist/m365/spo/commands/web/web-roleassignment-remove.js +58 -61
- package/dist/m365/spo/commands/web/web-roleinheritance-break.js +20 -18
- package/dist/m365/spo/commands/web/web-roleinheritance-reset.js +21 -19
- package/dist/m365/yammer/commands/message/message-like-set.js +29 -28
- package/dist/m365/yammer/commands/message/message-list.js +9 -26
- package/dist/m365/yammer/commands/message/message-remove.js +20 -18
- package/dist/m365/yammer/commands/yammer-search.js +42 -56
- package/dist/utils/aadGroup.js +20 -0
- package/dist/utils/fsUtil.js +5 -0
- package/dist/utils/planner.js +6 -3
- package/dist/utils/spo.js +601 -1
- package/docs/docs/cmd/cli/config/config-list.mdx +78 -0
- package/docs/docs/cmd/login.mdx +6 -0
- package/docs/docs/cmd/pa/app/app-permission-ensure.mdx +85 -0
- package/docs/docs/cmd/pa/app/app-permission-remove.mdx +74 -0
- package/docs/docs/cmd/planner/task/task-add.mdx +22 -7
- package/docs/docs/cmd/planner/task/task-get.mdx +13 -4
- package/docs/docs/cmd/planner/task/task-list.mdx +22 -7
- package/docs/docs/cmd/planner/task/task-remove.mdx +25 -8
- package/docs/docs/cmd/planner/task/task-set.mdx +22 -7
- package/docs/docs/cmd/spfx/project/project-github-workflow-add.mdx +94 -0
- package/docs/docs/cmd/spo/file/file-add.mdx +1 -1
- package/docs/docs/cmd/spo/file/file-checkin.mdx +1 -1
- package/docs/docs/cmd/spo/file/file-checkout-undo.mdx +1 -9
- package/docs/docs/cmd/spo/file/file-checkout.mdx +1 -1
- package/docs/docs/cmd/spo/file/file-copy.mdx +20 -16
- package/docs/docs/cmd/spo/file/file-get.mdx +1 -1
- package/docs/docs/cmd/spo/file/file-list.mdx +2 -2
- package/docs/docs/cmd/spo/file/file-move.mdx +2 -2
- package/docs/docs/cmd/spo/file/file-remove.mdx +8 -8
- package/docs/docs/cmd/spo/file/file-rename.mdx +3 -3
- package/docs/docs/cmd/spo/file/file-retentionlabel-ensure.mdx +2 -2
- package/docs/docs/cmd/spo/file/file-retentionlabel-remove.mdx +3 -3
- package/docs/docs/cmd/spo/file/file-roleassignment-add.mdx +1 -1
- package/docs/docs/cmd/spo/file/file-roleassignment-remove.mdx +1 -1
- package/docs/docs/cmd/spo/file/file-roleinheritance-break.mdx +1 -1
- package/docs/docs/cmd/spo/file/file-roleinheritance-reset.mdx +1 -1
- package/docs/docs/cmd/spo/file/file-sharinginfo-get.mdx +1 -1
- package/docs/docs/cmd/spo/file/file-sharinglink-add.mdx +1 -1
- package/docs/docs/cmd/spo/file/file-sharinglink-clear.mdx +1 -1
- package/docs/docs/cmd/spo/file/file-sharinglink-get.mdx +1 -1
- package/docs/docs/cmd/spo/file/file-sharinglink-list.mdx +1 -1
- package/docs/docs/cmd/spo/file/file-sharinglink-remove.mdx +1 -1
- package/docs/docs/cmd/spo/file/file-sharinglink-set.mdx +1 -1
- package/docs/docs/cmd/spo/file/file-version-clear.mdx +1 -1
- package/docs/docs/cmd/spo/file/file-version-get.mdx +1 -1
- package/docs/docs/cmd/spo/file/file-version-list.mdx +1 -1
- package/docs/docs/cmd/spo/file/file-version-remove.mdx +1 -1
- package/docs/docs/cmd/spo/file/file-version-restore.mdx +1 -1
- package/docs/docs/cmd/spo/folder/folder-add.mdx +76 -1
- package/docs/docs/cmd/spo/folder/folder-get.mdx +1 -1
- package/docs/docs/cmd/spo/folder/folder-list.mdx +1 -1
- package/docs/docs/cmd/spo/folder/folder-remove.mdx +1 -1
- package/docs/docs/cmd/spo/folder/folder-rename.mdx +5 -1
- package/docs/docs/cmd/spo/folder/folder-retentionlabel-ensure.mdx +1 -1
- package/docs/docs/cmd/spo/folder/folder-retentionlabel-remove.mdx +1 -1
- package/docs/docs/cmd/spo/folder/folder-roleassignment-add.mdx +2 -2
- package/docs/docs/cmd/spo/folder/folder-roleassignment-remove.mdx +1 -1
- package/docs/docs/cmd/spo/folder/folder-roleinheritance-break.mdx +1 -1
- package/docs/docs/cmd/spo/folder/folder-roleinheritance-reset.mdx +1 -1
- package/docs/docs/cmd/spo/orgassetslibrary/orgassetslibrary-add.mdx +14 -1
- package/docs/docs/cmd/spo/site/site-ensure.mdx +1 -1
- package/npm-shrinkwrap.json +698 -345
- package/package.json +15 -14
|
@@ -89,7 +89,7 @@ class SpoFolderRetentionLabelEnsureCommand extends SpoCommand_1.default {
|
|
|
89
89
|
}
|
|
90
90
|
else {
|
|
91
91
|
const serverRelativeUrl = urlUtil_1.urlUtil.getServerRelativePath(args.options.webUrl, args.options.folderUrl);
|
|
92
|
-
requestUrl += `
|
|
92
|
+
requestUrl += `GetFolderByServerRelativePath(DecodedUrl='${formatting_1.formatting.encodeQueryParameter(serverRelativeUrl)}')`;
|
|
93
93
|
}
|
|
94
94
|
const requestOptions = {
|
|
95
95
|
url: `${requestUrl}?$expand=ListItemAllFields,ListItemAllFields/ParentList&$select=ServerRelativeUrl,ListItemAllFields/ParentList/Id,ListItemAllFields/Id`,
|
|
@@ -107,7 +107,7 @@ class SpoFolderRetentionLabelRemoveCommand extends SpoCommand_1.default {
|
|
|
107
107
|
}
|
|
108
108
|
else {
|
|
109
109
|
const serverRelativeUrl = urlUtil_1.urlUtil.getServerRelativePath(args.options.webUrl, args.options.folderUrl);
|
|
110
|
-
requestUrl += `
|
|
110
|
+
requestUrl += `GetFolderByServerRelativePath(DecodedUrl='${formatting_1.formatting.encodeQueryParameter(serverRelativeUrl)}')`;
|
|
111
111
|
}
|
|
112
112
|
const requestOptions = {
|
|
113
113
|
url: `${requestUrl}?$expand=ListItemAllFields,ListItemAllFields/ParentList&$select=ServerRelativeUrl,ListItemAllFields/ParentList/Id,ListItemAllFields/Id`,
|
|
@@ -53,7 +53,7 @@ class SpoFolderRoleAssignmentAddCommand extends SpoCommand_1.default {
|
|
|
53
53
|
requestUrl += `GetList('${formatting_1.formatting.encodeQueryParameter(serverRelativeUrl)}')`;
|
|
54
54
|
}
|
|
55
55
|
else {
|
|
56
|
-
requestUrl += `
|
|
56
|
+
requestUrl += `GetFolderByServerRelativePath(DecodedUrl='${formatting_1.formatting.encodeQueryParameter(serverRelativeUrl)}')/ListItemAllFields`;
|
|
57
57
|
}
|
|
58
58
|
const roleDefinitionId = yield this.getRoleDefinitionId(args.options);
|
|
59
59
|
if (args.options.upn) {
|
|
@@ -45,7 +45,7 @@ class SpoFolderRoleAssignmentRemoveCommand extends SpoCommand_1.default {
|
|
|
45
45
|
logger.logToStderr(`Removing role assignment from folder in site at ${args.options.webUrl}...`);
|
|
46
46
|
}
|
|
47
47
|
const serverRelativeUrl = urlUtil_1.urlUtil.getServerRelativePath(args.options.webUrl, args.options.folderUrl);
|
|
48
|
-
const requestUrl = `${args.options.webUrl}/_api/web/
|
|
48
|
+
const requestUrl = `${args.options.webUrl}/_api/web/GetFolderByServerRelativePath(DecodedUrl='${formatting_1.formatting.encodeQueryParameter(serverRelativeUrl)}')/ListItemAllFields`;
|
|
49
49
|
try {
|
|
50
50
|
if (args.options.upn) {
|
|
51
51
|
args.options.principalId = yield this.getUserPrincipalId(args.options);
|
|
@@ -48,7 +48,7 @@ class SpoFolderRoleInheritanceBreakCommand extends SpoCommand_1.default {
|
|
|
48
48
|
requestUrl += `GetList('${formatting_1.formatting.encodeQueryParameter(serverRelativeUrl)}')`;
|
|
49
49
|
}
|
|
50
50
|
else {
|
|
51
|
-
requestUrl += `
|
|
51
|
+
requestUrl += `GetFolderByServerRelativePath(DecodedUrl='${formatting_1.formatting.encodeQueryParameter(serverRelativeUrl)}')/ListItemAllFields`;
|
|
52
52
|
}
|
|
53
53
|
const requestOptions = {
|
|
54
54
|
url: `${requestUrl}/breakroleinheritance(${keepExistingPermissions})`,
|
|
@@ -47,7 +47,7 @@ class SpoFolderRoleInheritanceResetCommand extends SpoCommand_1.default {
|
|
|
47
47
|
requestUrl += `GetList('${formatting_1.formatting.encodeQueryParameter(serverRelativeUrl)}')`;
|
|
48
48
|
}
|
|
49
49
|
else {
|
|
50
|
-
requestUrl += `
|
|
50
|
+
requestUrl += `GetFolderByServerRelativePath(DecodedUrl='${formatting_1.formatting.encodeQueryParameter(serverRelativeUrl)}')/ListItemAllFields`;
|
|
51
51
|
}
|
|
52
52
|
const requestOptions = {
|
|
53
53
|
url: `${requestUrl}/resetroleinheritance`,
|
|
@@ -73,7 +73,6 @@ class SpoGroupListCommand extends SpoCommand_1.default {
|
|
|
73
73
|
responseType: 'json'
|
|
74
74
|
};
|
|
75
75
|
const groupProperties = yield request_1.default.get(requestOptions);
|
|
76
|
-
logger.log(groupProperties);
|
|
77
76
|
if (!options.output || !Cli_1.Cli.shouldTrimOutput(options.output)) {
|
|
78
77
|
logger.log(groupProperties);
|
|
79
78
|
}
|
|
@@ -132,8 +132,8 @@ _SpoNavigationNodeSetCommand_instances = new WeakSet(), _SpoNavigationNodeSetCom
|
|
|
132
132
|
if (isValidSharePointUrl !== true) {
|
|
133
133
|
return isValidSharePointUrl;
|
|
134
134
|
}
|
|
135
|
-
if (args.options.audienceIds === undefined &&
|
|
136
|
-
return `Please specify
|
|
135
|
+
if (args.options.audienceIds === undefined && args.options.url === undefined && args.options.isExternal === undefined && !args.options.title && args.options.openInNewWindow === undefined) {
|
|
136
|
+
return `Please specify at least one property to update.`;
|
|
137
137
|
}
|
|
138
138
|
if (args.options.audienceIds) {
|
|
139
139
|
const audienceIdsSplitted = args.options.audienceIds.split(',');
|
|
@@ -21,6 +21,12 @@ const spo_1 = require("../../../../utils/spo");
|
|
|
21
21
|
const validation_1 = require("../../../../utils/validation");
|
|
22
22
|
const SpoCommand_1 = require("../../../base/SpoCommand");
|
|
23
23
|
const commands_1 = require("../../commands");
|
|
24
|
+
var OrgAssetType;
|
|
25
|
+
(function (OrgAssetType) {
|
|
26
|
+
OrgAssetType[OrgAssetType["ImageDocumentLibrary"] = 1] = "ImageDocumentLibrary";
|
|
27
|
+
OrgAssetType[OrgAssetType["OfficeTemplateLibrary"] = 2] = "OfficeTemplateLibrary";
|
|
28
|
+
OrgAssetType[OrgAssetType["OfficeFontLibrary"] = 4] = "OfficeFontLibrary";
|
|
29
|
+
})(OrgAssetType || (OrgAssetType = {}));
|
|
24
30
|
class SpoOrgAssetsLibraryAddCommand extends SpoCommand_1.default {
|
|
25
31
|
get name() {
|
|
26
32
|
return commands_1.default.ORGASSETSLIBRARY_ADD;
|
|
@@ -42,6 +48,7 @@ class SpoOrgAssetsLibraryAddCommand extends SpoCommand_1.default {
|
|
|
42
48
|
const cdnType = cdnTypeString === 'Private' ? 1 : 0;
|
|
43
49
|
const thumbnailSchema = typeof args.options.thumbnailUrl === 'undefined' ? `<Parameter Type="Null" />` : `<Parameter Type="String">${args.options.thumbnailUrl}</Parameter>`;
|
|
44
50
|
try {
|
|
51
|
+
const orgAssetType = this.getOrgAssetType(args.options.orgAssetType);
|
|
45
52
|
spoAdminUrl = yield spo_1.spo.getSpoAdminUrl(logger, this.debug);
|
|
46
53
|
const reqDigest = yield spo_1.spo.getRequestDigest(spoAdminUrl);
|
|
47
54
|
const requestOptions = {
|
|
@@ -49,7 +56,7 @@ class SpoOrgAssetsLibraryAddCommand extends SpoCommand_1.default {
|
|
|
49
56
|
headers: {
|
|
50
57
|
'X-RequestDigest': reqDigest.FormDigestValue
|
|
51
58
|
},
|
|
52
|
-
data: `<Request AddExpandoFieldTypeSuffix="true" SchemaVersion="15.0.0.0" LibraryVersion="16.0.0.0" ApplicationName="${config_1.default.applicationName}" xmlns="http://schemas.microsoft.com/sharepoint/clientquery/2009"><Actions><Method Name="AddToOrgAssetsLibAndCdnWithType" Id="11" ObjectPathId="8"><Parameters><Parameter Type="Enum">${cdnType}</Parameter><Parameter Type="String">${args.options.libraryUrl}</Parameter>${thumbnailSchema}<Parameter Type="Enum"
|
|
59
|
+
data: `<Request AddExpandoFieldTypeSuffix="true" SchemaVersion="15.0.0.0" LibraryVersion="16.0.0.0" ApplicationName="${config_1.default.applicationName}" xmlns="http://schemas.microsoft.com/sharepoint/clientquery/2009"><Actions><Method Name="AddToOrgAssetsLibAndCdnWithType" Id="11" ObjectPathId="8"><Parameters><Parameter Type="Enum">${cdnType}</Parameter><Parameter Type="String">${args.options.libraryUrl}</Parameter>${thumbnailSchema}<Parameter Type="Enum">${orgAssetType}</Parameter></Parameters></Method></Actions><ObjectPaths><Constructor Id="8" TypeId="{268004ae-ef6b-4e9b-8425-127220d84719}" /></ObjectPaths></Request>`
|
|
53
60
|
};
|
|
54
61
|
const res = yield request_1.default.post(requestOptions);
|
|
55
62
|
const json = JSON.parse(res);
|
|
@@ -63,12 +70,23 @@ class SpoOrgAssetsLibraryAddCommand extends SpoCommand_1.default {
|
|
|
63
70
|
}
|
|
64
71
|
});
|
|
65
72
|
}
|
|
73
|
+
getOrgAssetType(orgAssetType) {
|
|
74
|
+
switch (orgAssetType) {
|
|
75
|
+
case 'OfficeTemplateLibrary':
|
|
76
|
+
return OrgAssetType.OfficeTemplateLibrary;
|
|
77
|
+
case 'OfficeFontLibrary':
|
|
78
|
+
return OrgAssetType.OfficeFontLibrary;
|
|
79
|
+
default:
|
|
80
|
+
return OrgAssetType.ImageDocumentLibrary;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
66
83
|
}
|
|
67
84
|
_SpoOrgAssetsLibraryAddCommand_instances = new WeakSet(), _SpoOrgAssetsLibraryAddCommand_initTelemetry = function _SpoOrgAssetsLibraryAddCommand_initTelemetry() {
|
|
68
85
|
this.telemetry.push((args) => {
|
|
69
86
|
Object.assign(this.telemetryProperties, {
|
|
70
87
|
cdnType: args.options.cdnType || 'Private',
|
|
71
|
-
thumbnailUrl: typeof args.options.thumbnailUrl !== 'undefined'
|
|
88
|
+
thumbnailUrl: typeof args.options.thumbnailUrl !== 'undefined',
|
|
89
|
+
orgAssetType: args.options.orgAssetType
|
|
72
90
|
});
|
|
73
91
|
});
|
|
74
92
|
}, _SpoOrgAssetsLibraryAddCommand_initOptions = function _SpoOrgAssetsLibraryAddCommand_initOptions() {
|
|
@@ -78,7 +96,10 @@ _SpoOrgAssetsLibraryAddCommand_instances = new WeakSet(), _SpoOrgAssetsLibraryAd
|
|
|
78
96
|
option: '--thumbnailUrl [thumbnailUrl]'
|
|
79
97
|
}, {
|
|
80
98
|
option: '--cdnType [cdnType]',
|
|
81
|
-
autocomplete:
|
|
99
|
+
autocomplete: SpoOrgAssetsLibraryAddCommand.cdnTypes
|
|
100
|
+
}, {
|
|
101
|
+
option: '--orgAssetType [orgAssetType]',
|
|
102
|
+
autocomplete: SpoOrgAssetsLibraryAddCommand.orgAssetTypes
|
|
82
103
|
});
|
|
83
104
|
}, _SpoOrgAssetsLibraryAddCommand_initValidators = function _SpoOrgAssetsLibraryAddCommand_initValidators() {
|
|
84
105
|
this.validators.push((args) => __awaiter(this, void 0, void 0, function* () {
|
|
@@ -86,8 +107,16 @@ _SpoOrgAssetsLibraryAddCommand_instances = new WeakSet(), _SpoOrgAssetsLibraryAd
|
|
|
86
107
|
if (typeof args.options.thumbnailUrl !== 'undefined' && isValidThumbnailUrl !== true) {
|
|
87
108
|
return isValidThumbnailUrl;
|
|
88
109
|
}
|
|
110
|
+
if (args.options.cdnType && SpoOrgAssetsLibraryAddCommand.cdnTypes.indexOf(args.options.cdnType) < 0) {
|
|
111
|
+
return `${args.options.cdnType} is not a valid value for cdnType. Valid values are ${SpoOrgAssetsLibraryAddCommand.cdnTypes.join(', ')}`;
|
|
112
|
+
}
|
|
113
|
+
if (args.options.orgAssetType && SpoOrgAssetsLibraryAddCommand.orgAssetTypes.indexOf(args.options.orgAssetType) < 0) {
|
|
114
|
+
return `${args.options.orgAssetType} is not a valid value for orgAssetType. Valid values are ${SpoOrgAssetsLibraryAddCommand.orgAssetTypes.join(', ')}`;
|
|
115
|
+
}
|
|
89
116
|
return validation_1.validation.isValidSharePointUrl(args.options.libraryUrl);
|
|
90
117
|
}));
|
|
91
118
|
};
|
|
119
|
+
SpoOrgAssetsLibraryAddCommand.orgAssetTypes = ['ImageDocumentLibrary', 'OfficeTemplateLibrary', 'OfficeFontLibrary'];
|
|
120
|
+
SpoOrgAssetsLibraryAddCommand.cdnTypes = ['Public', 'Private'];
|
|
92
121
|
module.exports = new SpoOrgAssetsLibraryAddCommand();
|
|
93
122
|
//# sourceMappingURL=orgassetslibrary-add.js.map
|
|
@@ -1,4 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
2
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
12
|
exports.Page = exports.supportedPromoteAs = exports.supportedPageLayouts = void 0;
|
|
4
13
|
const request_1 = require("../../../../request");
|
|
@@ -10,7 +19,7 @@ exports.supportedPageLayouts = ['Article', 'Home', 'SingleWebPartAppPage', 'Repo
|
|
|
10
19
|
exports.supportedPromoteAs = ['HomePage', 'NewsPage', 'Template'];
|
|
11
20
|
class Page {
|
|
12
21
|
static getPage(name, webUrl, logger, debug, verbose) {
|
|
13
|
-
return
|
|
22
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
14
23
|
if (verbose) {
|
|
15
24
|
logger.logToStderr(`Retrieving information about the page...`);
|
|
16
25
|
}
|
|
@@ -23,26 +32,15 @@ class Page {
|
|
|
23
32
|
},
|
|
24
33
|
responseType: 'json'
|
|
25
34
|
};
|
|
26
|
-
request_1.default
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
return;
|
|
32
|
-
}
|
|
33
|
-
try {
|
|
34
|
-
resolve(clientsidepages_1.ClientSidePage.fromHtml(res.ListItemAllFields.CanvasContent1));
|
|
35
|
-
}
|
|
36
|
-
catch (e) {
|
|
37
|
-
reject(e);
|
|
38
|
-
}
|
|
39
|
-
}, (error) => {
|
|
40
|
-
reject(error);
|
|
41
|
-
});
|
|
35
|
+
const res = yield request_1.default.get(requestOptions);
|
|
36
|
+
if (res.ListItemAllFields.ClientSideApplicationId !== 'b6917cb1-93a0-4b97-a84d-7cf49975d4ec') {
|
|
37
|
+
throw `Page ${name} is not a modern page.`;
|
|
38
|
+
}
|
|
39
|
+
return clientsidepages_1.ClientSidePage.fromHtml(res.ListItemAllFields.CanvasContent1);
|
|
42
40
|
});
|
|
43
41
|
}
|
|
44
42
|
static checkout(name, webUrl, logger, debug, verbose) {
|
|
45
|
-
return
|
|
43
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
46
44
|
if (verbose) {
|
|
47
45
|
logger.log(`Checking out ${name} page...`);
|
|
48
46
|
}
|
|
@@ -54,20 +52,14 @@ class Page {
|
|
|
54
52
|
},
|
|
55
53
|
responseType: 'json'
|
|
56
54
|
};
|
|
57
|
-
request_1.default
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
logger.log(`Page ${name} is now checked out`);
|
|
66
|
-
}
|
|
67
|
-
resolve(pageData);
|
|
68
|
-
}, (error) => {
|
|
69
|
-
reject(error);
|
|
70
|
-
});
|
|
55
|
+
const pageData = yield request_1.default.post(requestOptions);
|
|
56
|
+
if (!pageData) {
|
|
57
|
+
throw `Page ${name} information not retrieved with the checkout`;
|
|
58
|
+
}
|
|
59
|
+
if (verbose) {
|
|
60
|
+
logger.log(`Page ${name} is now checked out`);
|
|
61
|
+
}
|
|
62
|
+
return pageData;
|
|
71
63
|
});
|
|
72
64
|
}
|
|
73
65
|
static getControlsInformation(control, isJSONOutput) {
|
|
@@ -1,4 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
2
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
12
|
exports.SpoPropertyBagBaseCommand = void 0;
|
|
4
13
|
const config_1 = require("../../../../config");
|
|
@@ -17,35 +26,37 @@ class SpoPropertyBagBaseCommand extends SpoCommand_1.default {
|
|
|
17
26
|
* This method is executed when folder option is specified. PnP PowerShell behaves the same way.
|
|
18
27
|
*/
|
|
19
28
|
getFolderPropertyBag(identityResp, webUrl, folder, logger) {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
.post(requestOptions)
|
|
34
|
-
.then((res) => {
|
|
29
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
30
|
+
let serverRelativeUrl = folder;
|
|
31
|
+
if (identityResp.serverRelativeUrl !== '/') {
|
|
32
|
+
serverRelativeUrl = `${identityResp.serverRelativeUrl}${serverRelativeUrl}`;
|
|
33
|
+
}
|
|
34
|
+
const requestOptions = {
|
|
35
|
+
url: `${webUrl}/_vti_bin/client.svc/ProcessQuery`,
|
|
36
|
+
headers: {
|
|
37
|
+
'X-RequestDigest': this.formDigestValue
|
|
38
|
+
},
|
|
39
|
+
data: `<Request AddExpandoFieldTypeSuffix="true" SchemaVersion="15.0.0.0" LibraryVersion="16.0.0.0" ApplicationName="${config_1.default.applicationName}" xmlns="http://schemas.microsoft.com/sharepoint/clientquery/2009"><Actions><ObjectPath Id="10" ObjectPathId="9" /><ObjectIdentityQuery Id="11" ObjectPathId="9" /><Query Id="12" ObjectPathId="9"><Query SelectAllProperties="false"><Properties><Property Name="Properties" SelectAll="true"><Query SelectAllProperties="false"><Properties /></Query></Property></Properties></Query></Query></Actions><ObjectPaths><Method Id="9" ParentId="5" Name="GetFolderByServerRelativeUrl"><Parameters><Parameter Type="String">${serverRelativeUrl}</Parameter></Parameters></Method><Identity Id="5" Name="${identityResp.objectIdentity}" /></ObjectPaths></Request>`
|
|
40
|
+
};
|
|
41
|
+
try {
|
|
42
|
+
const res = yield request_1.default.post(requestOptions);
|
|
35
43
|
if (this.debug) {
|
|
36
44
|
logger.logToStderr('Attempt to get Properties key values');
|
|
37
45
|
}
|
|
38
46
|
const json = JSON.parse(res);
|
|
39
47
|
const contents = json.find(x => { return x['ErrorInfo']; });
|
|
40
48
|
if (contents && contents.ErrorInfo) {
|
|
41
|
-
|
|
49
|
+
throw contents.ErrorInfo.ErrorMessage || 'ClientSvc unknown error';
|
|
42
50
|
}
|
|
43
51
|
const propertiesObj = json.find(x => { return x['Properties']; });
|
|
44
52
|
if (propertiesObj) {
|
|
45
|
-
return
|
|
53
|
+
return propertiesObj['Properties'];
|
|
46
54
|
}
|
|
47
|
-
|
|
48
|
-
}
|
|
55
|
+
throw 'Cannot proceed. Properties not found'; // this is not suppose to happen
|
|
56
|
+
}
|
|
57
|
+
catch (err) {
|
|
58
|
+
throw err;
|
|
59
|
+
}
|
|
49
60
|
});
|
|
50
61
|
}
|
|
51
62
|
/**
|
|
@@ -53,29 +64,33 @@ class SpoPropertyBagBaseCommand extends SpoCommand_1.default {
|
|
|
53
64
|
* This method is executed when no folder specified. PnP PowerShell behaves the same way.
|
|
54
65
|
*/
|
|
55
66
|
getWebPropertyBag(identityResp, webUrl, logger) {
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
67
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
68
|
+
const requestOptions = {
|
|
69
|
+
url: `${webUrl}/_vti_bin/client.svc/ProcessQuery`,
|
|
70
|
+
headers: {
|
|
71
|
+
'X-RequestDigest': this.formDigestValue
|
|
72
|
+
},
|
|
73
|
+
data: `<Request AddExpandoFieldTypeSuffix="true" SchemaVersion="15.0.0.0" LibraryVersion="16.0.0.0" ApplicationName="${config_1.default.applicationName}" xmlns="http://schemas.microsoft.com/sharepoint/clientquery/2009"><Actions><Query Id="97" ObjectPathId="5"><Query SelectAllProperties="false"><Properties><Property Name="ServerRelativeUrl" ScalarProperty="true" /><Property Name="AllProperties" SelectAll="true"><Query SelectAllProperties="false"><Properties /></Query></Property></Properties></Query></Query></Actions><ObjectPaths><Identity Id="5" Name="${identityResp.objectIdentity}" /></ObjectPaths></Request>`
|
|
74
|
+
};
|
|
75
|
+
try {
|
|
76
|
+
const res = yield request_1.default.post(requestOptions);
|
|
65
77
|
if (this.debug) {
|
|
66
78
|
logger.logToStderr('Attempt to get AllProperties key values');
|
|
67
79
|
}
|
|
68
80
|
const json = JSON.parse(res);
|
|
69
81
|
const contents = json.find(x => { return x['ErrorInfo']; });
|
|
70
82
|
if (contents && contents.ErrorInfo) {
|
|
71
|
-
|
|
83
|
+
throw contents.ErrorInfo.ErrorMessage || 'ClientSvc unknown error';
|
|
72
84
|
}
|
|
73
85
|
const allPropertiesObj = json.find(x => { return x['AllProperties']; });
|
|
74
86
|
if (allPropertiesObj) {
|
|
75
|
-
return
|
|
87
|
+
return allPropertiesObj['AllProperties'];
|
|
76
88
|
}
|
|
77
|
-
|
|
78
|
-
}
|
|
89
|
+
throw 'Cannot proceed. AllProperties not found'; // this is not supposed to happen
|
|
90
|
+
}
|
|
91
|
+
catch (err) {
|
|
92
|
+
throw err;
|
|
93
|
+
}
|
|
79
94
|
});
|
|
80
95
|
}
|
|
81
96
|
/**
|
|
@@ -112,28 +127,32 @@ class SpoPropertyBagBaseCommand extends SpoCommand_1.default {
|
|
|
112
127
|
return { key: objKey, value: objValue };
|
|
113
128
|
}
|
|
114
129
|
static setProperty(name, value, webUrl, formDigest, identityResp, logger, debug, folder) {
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
130
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
131
|
+
let objectType = 'AllProperties';
|
|
132
|
+
if (folder) {
|
|
133
|
+
objectType = 'Properties';
|
|
134
|
+
}
|
|
135
|
+
const requestOptions = {
|
|
136
|
+
url: `${webUrl}/_vti_bin/client.svc/ProcessQuery`,
|
|
137
|
+
headers: {
|
|
138
|
+
'X-RequestDigest': formDigest
|
|
139
|
+
},
|
|
140
|
+
data: `<Request AddExpandoFieldTypeSuffix="true" SchemaVersion="15.0.0.0" LibraryVersion="16.0.0.0" ApplicationName="${config_1.default.applicationName}" xmlns="http://schemas.microsoft.com/sharepoint/clientquery/2009"><Actions><Method Name="SetFieldValue" Id="206" ObjectPathId="205"><Parameters><Parameter Type="String">${formatting_1.formatting.escapeXml(name)}</Parameter><Parameter Type="String">${formatting_1.formatting.escapeXml(value)}</Parameter></Parameters></Method><Method Name="Update" Id="207" ObjectPathId="198" /></Actions><ObjectPaths><Property Id="205" ParentId="198" Name="${objectType}" /><Identity Id="198" Name="${identityResp.objectIdentity}" /></ObjectPaths></Request>`
|
|
141
|
+
};
|
|
142
|
+
try {
|
|
143
|
+
const res = yield request_1.default.post(requestOptions);
|
|
128
144
|
const json = JSON.parse(res);
|
|
129
145
|
const contents = json.find(x => { return x['ErrorInfo']; });
|
|
130
146
|
if (contents && contents.ErrorInfo) {
|
|
131
|
-
|
|
147
|
+
throw contents.ErrorInfo.ErrorMessage || 'ClientSvc unknown error';
|
|
132
148
|
}
|
|
133
149
|
else {
|
|
134
|
-
|
|
150
|
+
return res;
|
|
135
151
|
}
|
|
136
|
-
}
|
|
152
|
+
}
|
|
153
|
+
catch (err) {
|
|
154
|
+
throw err;
|
|
155
|
+
}
|
|
137
156
|
});
|
|
138
157
|
}
|
|
139
158
|
/**
|
|
@@ -145,12 +164,14 @@ class SpoPropertyBagBaseCommand extends SpoCommand_1.default {
|
|
|
145
164
|
* @param cmd command instance
|
|
146
165
|
*/
|
|
147
166
|
static isNoScriptSite(webUrl, formDigest, webIdentityResp, logger, debug) {
|
|
148
|
-
return
|
|
149
|
-
|
|
150
|
-
.
|
|
151
|
-
|
|
152
|
-
}
|
|
153
|
-
|
|
167
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
168
|
+
try {
|
|
169
|
+
const basePermissionsResp = yield spo_1.spo.getEffectiveBasePermissions(webIdentityResp.objectIdentity, webUrl, formDigest, logger, debug);
|
|
170
|
+
return basePermissionsResp.has(base_permissions_1.PermissionKind.AddAndCustomizePages) === false;
|
|
171
|
+
}
|
|
172
|
+
catch (err) {
|
|
173
|
+
throw err;
|
|
174
|
+
}
|
|
154
175
|
});
|
|
155
176
|
}
|
|
156
177
|
}
|
|
@@ -39,24 +39,8 @@ class SpoPropertyBagRemoveCommand extends propertybag_base_1.SpoPropertyBagBaseC
|
|
|
39
39
|
}
|
|
40
40
|
commandAction(logger, args) {
|
|
41
41
|
return __awaiter(this, void 0, void 0, function* () {
|
|
42
|
-
const removeProperty = () => __awaiter(this, void 0, void 0, function* () {
|
|
43
|
-
try {
|
|
44
|
-
const contextResponse = yield spo_1.spo.getRequestDigest(args.options.webUrl);
|
|
45
|
-
this.formDigestValue = contextResponse.FormDigestValue;
|
|
46
|
-
let identityResp = yield spo_1.spo.getCurrentWebIdentity(args.options.webUrl, this.formDigestValue);
|
|
47
|
-
const opts = args.options;
|
|
48
|
-
if (opts.folder) {
|
|
49
|
-
// get the folder guid instead of the web guid
|
|
50
|
-
identityResp = yield spo_1.spo.getFolderIdentity(identityResp.objectIdentity, opts.webUrl, opts.folder, this.formDigestValue);
|
|
51
|
-
}
|
|
52
|
-
yield this.removeProperty(identityResp, args.options);
|
|
53
|
-
}
|
|
54
|
-
catch (err) {
|
|
55
|
-
this.handleRejectedPromise(err);
|
|
56
|
-
}
|
|
57
|
-
});
|
|
58
42
|
if (args.options.confirm) {
|
|
59
|
-
yield removeProperty();
|
|
43
|
+
yield this.removeProperty(args);
|
|
60
44
|
}
|
|
61
45
|
else {
|
|
62
46
|
const result = yield Cli_1.Cli.prompt({
|
|
@@ -66,34 +50,51 @@ class SpoPropertyBagRemoveCommand extends propertybag_base_1.SpoPropertyBagBaseC
|
|
|
66
50
|
message: `Are you sure you want to remove the ${args.options.key} property?`
|
|
67
51
|
});
|
|
68
52
|
if (result.continue) {
|
|
69
|
-
yield removeProperty();
|
|
53
|
+
yield this.removeProperty(args);
|
|
70
54
|
}
|
|
71
55
|
}
|
|
72
56
|
});
|
|
73
57
|
}
|
|
74
|
-
removeProperty(
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
data: `<Request AddExpandoFieldTypeSuffix="true" SchemaVersion="15.0.0.0" LibraryVersion="16.0.0.0" ApplicationName="${config_1.default.applicationName}" xmlns="http://schemas.microsoft.com/sharepoint/clientquery/2009"><Actions><Method Name="SetFieldValue" Id="206" ObjectPathId="205"><Parameters><Parameter Type="String">${formatting_1.formatting.escapeXml(options.key)}</Parameter><Parameter Type="Null" /></Parameters></Method><Method Name="Update" Id="207" ObjectPathId="198" /></Actions><ObjectPaths><Property Id="205" ParentId="198" Name="${objectType}" /><Identity Id="198" Name="${identityResp.objectIdentity}" /></ObjectPaths></Request>`
|
|
85
|
-
};
|
|
86
|
-
return new Promise((resolve, reject) => {
|
|
87
|
-
request_1.default.post(requestOptions).then((res) => {
|
|
88
|
-
const json = JSON.parse(res);
|
|
89
|
-
const contents = json.find(x => { return x['ErrorInfo']; });
|
|
90
|
-
if (contents && contents.ErrorInfo) {
|
|
91
|
-
reject(contents.ErrorInfo.ErrorMessage || 'ClientSvc unknown error');
|
|
92
|
-
}
|
|
93
|
-
else {
|
|
94
|
-
resolve(res);
|
|
58
|
+
removeProperty(args) {
|
|
59
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
60
|
+
try {
|
|
61
|
+
const contextResponse = yield spo_1.spo.getRequestDigest(args.options.webUrl);
|
|
62
|
+
this.formDigestValue = contextResponse.FormDigestValue;
|
|
63
|
+
let identityResp = yield spo_1.spo.getCurrentWebIdentity(args.options.webUrl, this.formDigestValue);
|
|
64
|
+
const opts = args.options;
|
|
65
|
+
if (opts.folder) {
|
|
66
|
+
// get the folder guid instead of the web guid
|
|
67
|
+
identityResp = yield spo_1.spo.getFolderIdentity(identityResp.objectIdentity, opts.webUrl, opts.folder, this.formDigestValue);
|
|
95
68
|
}
|
|
96
|
-
|
|
69
|
+
yield this.removePropertyWithIdentityResp(identityResp, args.options);
|
|
70
|
+
}
|
|
71
|
+
catch (err) {
|
|
72
|
+
this.handleRejectedPromise(err);
|
|
73
|
+
}
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
removePropertyWithIdentityResp(identityResp, options) {
|
|
77
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
78
|
+
let objectType = 'AllProperties';
|
|
79
|
+
if (options.folder) {
|
|
80
|
+
objectType = 'Properties';
|
|
81
|
+
}
|
|
82
|
+
const requestOptions = {
|
|
83
|
+
url: `${options.webUrl}/_vti_bin/client.svc/ProcessQuery`,
|
|
84
|
+
headers: {
|
|
85
|
+
'X-RequestDigest': this.formDigestValue
|
|
86
|
+
},
|
|
87
|
+
data: `<Request AddExpandoFieldTypeSuffix="true" SchemaVersion="15.0.0.0" LibraryVersion="16.0.0.0" ApplicationName="${config_1.default.applicationName}" xmlns="http://schemas.microsoft.com/sharepoint/clientquery/2009"><Actions><Method Name="SetFieldValue" Id="206" ObjectPathId="205"><Parameters><Parameter Type="String">${formatting_1.formatting.escapeXml(options.key)}</Parameter><Parameter Type="Null" /></Parameters></Method><Method Name="Update" Id="207" ObjectPathId="198" /></Actions><ObjectPaths><Property Id="205" ParentId="198" Name="${objectType}" /><Identity Id="198" Name="${identityResp.objectIdentity}" /></ObjectPaths></Request>`
|
|
88
|
+
};
|
|
89
|
+
const res = yield request_1.default.post(requestOptions);
|
|
90
|
+
const json = JSON.parse(res);
|
|
91
|
+
const contents = json.find(x => { return x['ErrorInfo']; });
|
|
92
|
+
if (contents && contents.ErrorInfo) {
|
|
93
|
+
throw contents.ErrorInfo.ErrorMessage || 'ClientSvc unknown error';
|
|
94
|
+
}
|
|
95
|
+
else {
|
|
96
|
+
return res;
|
|
97
|
+
}
|
|
97
98
|
});
|
|
98
99
|
}
|
|
99
100
|
}
|