@pnp/cli-microsoft365 12.1.0-beta.0c2915d → 12.1.0-beta.ab87e08
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/allCommands.json +1 -1
- package/allCommandsFull.json +1 -1
- package/dist/m365/spo/commands/page/page-add.js +31 -68
- package/dist/m365/spo/commands/page/page-clientsidewebpart-add.js +74 -101
- package/dist/m365/spo/commands/page/page-column-get.js +15 -32
- package/dist/m365/spo/commands/page/page-column-list.js +14 -27
- package/dist/m365/spo/commands/page/page-control-get.js +18 -27
- package/dist/m365/spo/commands/page/page-control-list.js +13 -20
- package/dist/m365/spo/commands/page/page-control-remove.js +1 -1
- package/dist/m365/spo/commands/page/page-control-set.js +51 -61
- package/dist/m365/spo/commands/page/page-copy.js +15 -31
- package/dist/m365/spo/commands/page/page-header-set.js +25 -89
- package/dist/m365/spo/commands/page/page-list.js +12 -18
- package/dist/m365/spo/commands/page/page-remove.js +16 -39
- package/dist/m365/spo/commands/page/page-section-add.js +108 -173
- package/dist/m365/spo/commands/page/page-section-get.js +17 -27
- package/dist/m365/spo/commands/page/page-section-list.js +13 -20
- package/dist/m365/spo/commands/page/page-section-remove.js +4 -1
- package/dist/m365/spo/commands/page/page-set.js +50 -100
- package/dist/m365/spo/commands/page/page-template-list.js +12 -18
- package/dist/m365/spo/commands/page/page-text-add.js +23 -45
- package/docs/docs/cmd/spo/listitem/listitem-record-declare.mdx +19 -0
- package/docs/docs/cmd/spo/listitem/listitem-record-lock.mdx +21 -0
- package/docs/docs/cmd/spo/listitem/listitem-record-undeclare.mdx +21 -0
- package/docs/docs/cmd/spo/listitem/listitem-record-unlock.mdx +21 -0
- package/docs/docs/cmd/spo/page/page-text-add.mdx +1 -1
- package/docs/docs/cmd/viva/engage/engage-community-add.mdx +19 -0
- package/docs/docs/cmd/viva/engage/engage-community-get.mdx +19 -0
- package/docs/docs/cmd/viva/engage/engage-community-remove.mdx +21 -0
- package/docs/docs/cmd/viva/engage/engage-community-set.mdx +19 -0
- package/package.json +1 -1
|
@@ -1,13 +1,17 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
4
|
-
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
5
|
-
};
|
|
6
|
-
var _SpoPageTemplateListCommand_instances, _SpoPageTemplateListCommand_initOptions, _SpoPageTemplateListCommand_initValidators;
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { globalOptionsZod } from '../../../../Command.js';
|
|
7
3
|
import { odata } from '../../../../utils/odata.js';
|
|
8
4
|
import { validation } from '../../../../utils/validation.js';
|
|
9
5
|
import SpoCommand from '../../../base/SpoCommand.js';
|
|
10
6
|
import commands from '../../commands.js';
|
|
7
|
+
export const options = z.strictObject({
|
|
8
|
+
...globalOptionsZod.shape,
|
|
9
|
+
webUrl: z.string()
|
|
10
|
+
.refine(url => validation.isValidSharePointUrl(url) === true, {
|
|
11
|
+
error: e => `'${e.input}' is not a valid SharePoint Online site URL.`
|
|
12
|
+
})
|
|
13
|
+
.alias('u')
|
|
14
|
+
});
|
|
11
15
|
class SpoPageTemplateListCommand extends SpoCommand {
|
|
12
16
|
get name() {
|
|
13
17
|
return commands.PAGE_TEMPLATE_LIST;
|
|
@@ -18,11 +22,8 @@ class SpoPageTemplateListCommand extends SpoCommand {
|
|
|
18
22
|
defaultProperties() {
|
|
19
23
|
return ['Title', 'FileName', 'Id', 'PageLayoutType', 'Url'];
|
|
20
24
|
}
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
_SpoPageTemplateListCommand_instances.add(this);
|
|
24
|
-
__classPrivateFieldGet(this, _SpoPageTemplateListCommand_instances, "m", _SpoPageTemplateListCommand_initOptions).call(this);
|
|
25
|
-
__classPrivateFieldGet(this, _SpoPageTemplateListCommand_instances, "m", _SpoPageTemplateListCommand_initValidators).call(this);
|
|
25
|
+
get schema() {
|
|
26
|
+
return options;
|
|
26
27
|
}
|
|
27
28
|
async commandAction(logger, args) {
|
|
28
29
|
if (this.verbose) {
|
|
@@ -42,12 +43,5 @@ class SpoPageTemplateListCommand extends SpoCommand {
|
|
|
42
43
|
}
|
|
43
44
|
}
|
|
44
45
|
}
|
|
45
|
-
_SpoPageTemplateListCommand_instances = new WeakSet(), _SpoPageTemplateListCommand_initOptions = function _SpoPageTemplateListCommand_initOptions() {
|
|
46
|
-
this.options.unshift({
|
|
47
|
-
option: '-u, --webUrl <webUrl>'
|
|
48
|
-
});
|
|
49
|
-
}, _SpoPageTemplateListCommand_initValidators = function _SpoPageTemplateListCommand_initValidators() {
|
|
50
|
-
this.validators.push(async (args) => validation.isValidSharePointUrl(args.options.webUrl));
|
|
51
|
-
};
|
|
52
46
|
export default new SpoPageTemplateListCommand();
|
|
53
47
|
//# sourceMappingURL=page-template-list.js.map
|
|
@@ -1,9 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
4
|
-
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
5
|
-
};
|
|
6
|
-
var _SpoPageTextAddCommand_instances, _SpoPageTextAddCommand_initTelemetry, _SpoPageTextAddCommand_initOptions, _SpoPageTextAddCommand_initValidators;
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { globalOptionsZod } from '../../../../Command.js';
|
|
7
3
|
import request from '../../../../request.js';
|
|
8
4
|
import { spo } from '../../../../utils/spo.js';
|
|
9
5
|
import { urlUtil } from '../../../../utils/urlUtil.js';
|
|
@@ -12,6 +8,25 @@ import SpoCommand from '../../../base/SpoCommand.js';
|
|
|
12
8
|
import commands from '../../commands.js';
|
|
13
9
|
import { CanvasSection, ClientSideText } from './clientsidepages.js';
|
|
14
10
|
import { Page } from './Page.js';
|
|
11
|
+
export const options = z.strictObject({
|
|
12
|
+
...globalOptionsZod.shape,
|
|
13
|
+
webUrl: z.string()
|
|
14
|
+
.refine(url => validation.isValidSharePointUrl(url) === true, {
|
|
15
|
+
error: e => `'${e.input}' is not a valid SharePoint Online site URL.`
|
|
16
|
+
})
|
|
17
|
+
.alias('u'),
|
|
18
|
+
pageName: z.string().alias('n'),
|
|
19
|
+
text: z.string().alias('t'),
|
|
20
|
+
section: z.number()
|
|
21
|
+
.int()
|
|
22
|
+
.min(1, { error: 'The value of parameter section must be 1 or higher' })
|
|
23
|
+
.optional(),
|
|
24
|
+
column: z.number()
|
|
25
|
+
.int()
|
|
26
|
+
.min(1, { error: 'The value of parameter column must be 1 or higher' })
|
|
27
|
+
.optional(),
|
|
28
|
+
order: z.number().int().min(1, { error: 'The value of parameter order must be 1 or higher' }).optional()
|
|
29
|
+
});
|
|
15
30
|
class SpoPageTextAddCommand extends SpoCommand {
|
|
16
31
|
get name() {
|
|
17
32
|
return commands.PAGE_TEXT_ADD;
|
|
@@ -19,12 +34,8 @@ class SpoPageTextAddCommand extends SpoCommand {
|
|
|
19
34
|
get description() {
|
|
20
35
|
return 'Adds text to a modern page';
|
|
21
36
|
}
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
_SpoPageTextAddCommand_instances.add(this);
|
|
25
|
-
__classPrivateFieldGet(this, _SpoPageTextAddCommand_instances, "m", _SpoPageTextAddCommand_initTelemetry).call(this);
|
|
26
|
-
__classPrivateFieldGet(this, _SpoPageTextAddCommand_instances, "m", _SpoPageTextAddCommand_initOptions).call(this);
|
|
27
|
-
__classPrivateFieldGet(this, _SpoPageTextAddCommand_instances, "m", _SpoPageTextAddCommand_initValidators).call(this);
|
|
37
|
+
get schema() {
|
|
38
|
+
return options;
|
|
28
39
|
}
|
|
29
40
|
async commandAction(logger, args) {
|
|
30
41
|
let pageName = args.options.pageName;
|
|
@@ -100,38 +111,5 @@ class SpoPageTextAddCommand extends SpoCommand {
|
|
|
100
111
|
return request.post(requestOptions);
|
|
101
112
|
}
|
|
102
113
|
}
|
|
103
|
-
_SpoPageTextAddCommand_instances = new WeakSet(), _SpoPageTextAddCommand_initTelemetry = function _SpoPageTextAddCommand_initTelemetry() {
|
|
104
|
-
this.telemetry.push((args) => {
|
|
105
|
-
Object.assign(this.telemetryProperties, {
|
|
106
|
-
section: typeof args.options.section !== 'undefined',
|
|
107
|
-
column: typeof args.options.column !== 'undefined',
|
|
108
|
-
order: typeof args.options.order !== 'undefined'
|
|
109
|
-
});
|
|
110
|
-
});
|
|
111
|
-
}, _SpoPageTextAddCommand_initOptions = function _SpoPageTextAddCommand_initOptions() {
|
|
112
|
-
this.options.unshift({
|
|
113
|
-
option: '-u, --webUrl <webUrl>'
|
|
114
|
-
}, {
|
|
115
|
-
option: '-n, --pageName <pageName>'
|
|
116
|
-
}, {
|
|
117
|
-
option: '-t, --text <text>'
|
|
118
|
-
}, {
|
|
119
|
-
option: '--section [section]'
|
|
120
|
-
}, {
|
|
121
|
-
option: '--column [column]'
|
|
122
|
-
}, {
|
|
123
|
-
option: '--order [order]'
|
|
124
|
-
});
|
|
125
|
-
}, _SpoPageTextAddCommand_initValidators = function _SpoPageTextAddCommand_initValidators() {
|
|
126
|
-
this.validators.push(async (args) => {
|
|
127
|
-
if (args.options.section && (!Number.isInteger(args.options.section) || args.options.section < 1)) {
|
|
128
|
-
return 'The value of parameter section must be 1 or higher';
|
|
129
|
-
}
|
|
130
|
-
if (args.options.column && (!Number.isInteger(args.options.column) || args.options.column < 1)) {
|
|
131
|
-
return 'The value of parameter column must be 1 or higher';
|
|
132
|
-
}
|
|
133
|
-
return validation.isValidSharePointUrl(args.options.webUrl);
|
|
134
|
-
});
|
|
135
|
-
};
|
|
136
114
|
export default new SpoPageTextAddCommand();
|
|
137
115
|
//# sourceMappingURL=page-text-add.js.map
|
|
@@ -36,6 +36,25 @@ m365 spo listitem record declare [options]
|
|
|
36
36
|
|
|
37
37
|
<Global />
|
|
38
38
|
|
|
39
|
+
## Permissions
|
|
40
|
+
|
|
41
|
+
<Tabs>
|
|
42
|
+
<TabItem value="Delegated">
|
|
43
|
+
|
|
44
|
+
| Resource | Permissions |
|
|
45
|
+
|------------|----------------------|
|
|
46
|
+
| SharePoint | AllSites.FullControl |
|
|
47
|
+
|
|
48
|
+
</TabItem>
|
|
49
|
+
<TabItem value="Application">
|
|
50
|
+
|
|
51
|
+
| Resource | Permissions |
|
|
52
|
+
|------------|-----------------------|
|
|
53
|
+
| SharePoint | Sites.FullControl.All |
|
|
54
|
+
|
|
55
|
+
</TabItem>
|
|
56
|
+
</Tabs>
|
|
57
|
+
|
|
39
58
|
## Examples
|
|
40
59
|
|
|
41
60
|
Declare a document with id _1_ as a record in list with title _Demo List_ located in site _https://contoso.sharepoint.com/sites/project-x_
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import Global from '../../_global.mdx';
|
|
2
|
+
import Tabs from '@theme/Tabs';
|
|
3
|
+
import TabItem from '@theme/TabItem';
|
|
2
4
|
|
|
3
5
|
# spo listitem record lock
|
|
4
6
|
|
|
@@ -31,6 +33,25 @@ m365 spo listitem record lock [options]
|
|
|
31
33
|
|
|
32
34
|
<Global />
|
|
33
35
|
|
|
36
|
+
## Permissions
|
|
37
|
+
|
|
38
|
+
<Tabs>
|
|
39
|
+
<TabItem value="Delegated">
|
|
40
|
+
|
|
41
|
+
| Resource | Permissions |
|
|
42
|
+
|------------|----------------|
|
|
43
|
+
| SharePoint | AllSites.Write |
|
|
44
|
+
|
|
45
|
+
</TabItem>
|
|
46
|
+
<TabItem value="Application">
|
|
47
|
+
|
|
48
|
+
| Resource | Permissions |
|
|
49
|
+
|------------|---------------------|
|
|
50
|
+
| SharePoint | Sites.ReadWrite.All |
|
|
51
|
+
|
|
52
|
+
</TabItem>
|
|
53
|
+
</Tabs>
|
|
54
|
+
|
|
34
55
|
## Examples
|
|
35
56
|
|
|
36
57
|
Locks the list item record in a given site based on the list id
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import Global from '../../_global.mdx';
|
|
2
|
+
import Tabs from '@theme/Tabs';
|
|
3
|
+
import TabItem from '@theme/TabItem';
|
|
2
4
|
|
|
3
5
|
# spo listitem record undeclare
|
|
4
6
|
|
|
@@ -31,6 +33,25 @@ m365 spo listitem record undeclare [options]
|
|
|
31
33
|
|
|
32
34
|
<Global />
|
|
33
35
|
|
|
36
|
+
## Permissions
|
|
37
|
+
|
|
38
|
+
<Tabs>
|
|
39
|
+
<TabItem value="Delegated">
|
|
40
|
+
|
|
41
|
+
| Resource | Permissions |
|
|
42
|
+
|------------|----------------------|
|
|
43
|
+
| SharePoint | AllSites.FullControl |
|
|
44
|
+
|
|
45
|
+
</TabItem>
|
|
46
|
+
<TabItem value="Application">
|
|
47
|
+
|
|
48
|
+
| Resource | Permissions |
|
|
49
|
+
|------------|-----------------------|
|
|
50
|
+
| SharePoint | Sites.FullControl.All |
|
|
51
|
+
|
|
52
|
+
</TabItem>
|
|
53
|
+
</Tabs>
|
|
54
|
+
|
|
34
55
|
## Examples
|
|
35
56
|
|
|
36
57
|
Undeclare the list item as a record with ID _1_ from list with ID _0cd891ef-afce-4e55-b836-fce03286cccf_ located in site _https://contoso.sharepoint.com/sites/project-x
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import Global from '../../_global.mdx';
|
|
2
|
+
import Tabs from '@theme/Tabs';
|
|
3
|
+
import TabItem from '@theme/TabItem';
|
|
2
4
|
|
|
3
5
|
# spo listitem record unlock
|
|
4
6
|
|
|
@@ -31,6 +33,25 @@ m365 spo listitem record unlock [options]
|
|
|
31
33
|
|
|
32
34
|
<Global />
|
|
33
35
|
|
|
36
|
+
## Permissions
|
|
37
|
+
|
|
38
|
+
<Tabs>
|
|
39
|
+
<TabItem value="Delegated">
|
|
40
|
+
|
|
41
|
+
| Resource | Permissions |
|
|
42
|
+
|------------|----------------|
|
|
43
|
+
| SharePoint | AllSites.Write |
|
|
44
|
+
|
|
45
|
+
</TabItem>
|
|
46
|
+
<TabItem value="Application">
|
|
47
|
+
|
|
48
|
+
| Resource | Permissions |
|
|
49
|
+
|------------|---------------------|
|
|
50
|
+
| SharePoint | Sites.ReadWrite.All |
|
|
51
|
+
|
|
52
|
+
</TabItem>
|
|
53
|
+
</Tabs>
|
|
54
|
+
|
|
34
55
|
## Examples
|
|
35
56
|
|
|
36
57
|
Unlocks the list item record in a given site based on the list id
|
|
@@ -29,7 +29,7 @@ m365 spo page text add [options]
|
|
|
29
29
|
: Number of the column in which the text should be added (1 or higher).
|
|
30
30
|
|
|
31
31
|
`--order [order]`
|
|
32
|
-
: Order of the text in the column.
|
|
32
|
+
: Order of the text in the column. Must be integer value of 1 or higher.
|
|
33
33
|
```
|
|
34
34
|
|
|
35
35
|
<Global />
|
|
@@ -46,6 +46,25 @@ This command is based on an API that is currently in preview and is subject to c
|
|
|
46
46
|
|
|
47
47
|
Creating a community is limited to networks in Native mode only - legacy and external Yammer networks will not be able to use this API for community creation.
|
|
48
48
|
|
|
49
|
+
## Permissions
|
|
50
|
+
|
|
51
|
+
<Tabs>
|
|
52
|
+
<TabItem value="Delegated">
|
|
53
|
+
|
|
54
|
+
| Resource | Permissions |
|
|
55
|
+
|-----------------|---------------------------------------------|
|
|
56
|
+
| Microsoft Graph | Community.ReadWrite.All, User.ReadBasic.All |
|
|
57
|
+
|
|
58
|
+
</TabItem>
|
|
59
|
+
<TabItem value="Application">
|
|
60
|
+
|
|
61
|
+
| Resource | Permissions |
|
|
62
|
+
|-----------------|---------------------------------------------|
|
|
63
|
+
| Microsoft Graph | Community.ReadWrite.All, User.ReadBasic.All |
|
|
64
|
+
|
|
65
|
+
</TabItem>
|
|
66
|
+
</Tabs>
|
|
67
|
+
|
|
49
68
|
## Examples
|
|
50
69
|
|
|
51
70
|
Create a public community and wait for the community to be created
|
|
@@ -29,6 +29,25 @@ This command is based on an API that is currently in preview and is subject to c
|
|
|
29
29
|
|
|
30
30
|
:::
|
|
31
31
|
|
|
32
|
+
## Permissions
|
|
33
|
+
|
|
34
|
+
<Tabs>
|
|
35
|
+
<TabItem value="Delegated">
|
|
36
|
+
|
|
37
|
+
| Resource | Permissions |
|
|
38
|
+
|-----------------|--------------------|
|
|
39
|
+
| Microsoft Graph | Community.Read.All |
|
|
40
|
+
|
|
41
|
+
</TabItem>
|
|
42
|
+
<TabItem value="Application">
|
|
43
|
+
|
|
44
|
+
| Resource | Permissions |
|
|
45
|
+
|-----------------|--------------------|
|
|
46
|
+
| Microsoft Graph | Community.Read.All |
|
|
47
|
+
|
|
48
|
+
</TabItem>
|
|
49
|
+
</Tabs>
|
|
50
|
+
|
|
32
51
|
## Examples
|
|
33
52
|
|
|
34
53
|
Get a specific community by ID.
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import Global from '../../_global.mdx';
|
|
2
|
+
import Tabs from '@theme/Tabs';
|
|
3
|
+
import TabItem from '@theme/TabItem';
|
|
2
4
|
|
|
3
5
|
# viva engage community remove
|
|
4
6
|
|
|
@@ -36,6 +38,25 @@ When the Viva Engage community is removed, all the associated Microsoft 365 cont
|
|
|
36
38
|
|
|
37
39
|
:::
|
|
38
40
|
|
|
41
|
+
## Permissions
|
|
42
|
+
|
|
43
|
+
<Tabs>
|
|
44
|
+
<TabItem value="Delegated">
|
|
45
|
+
|
|
46
|
+
| Resource | Permissions |
|
|
47
|
+
|-----------------|-------------------------|
|
|
48
|
+
| Microsoft Graph | Community.ReadWrite.All |
|
|
49
|
+
|
|
50
|
+
</TabItem>
|
|
51
|
+
<TabItem value="Application">
|
|
52
|
+
|
|
53
|
+
| Resource | Permissions |
|
|
54
|
+
|-----------------|-------------------------|
|
|
55
|
+
| Microsoft Graph | Community.ReadWrite.All |
|
|
56
|
+
|
|
57
|
+
</TabItem>
|
|
58
|
+
</Tabs>
|
|
59
|
+
|
|
39
60
|
## Examples
|
|
40
61
|
|
|
41
62
|
Remove a community specified by id without prompting
|
|
@@ -36,6 +36,25 @@ m365 viva engage community set [options]
|
|
|
36
36
|
|
|
37
37
|
<Global />
|
|
38
38
|
|
|
39
|
+
## Permissions
|
|
40
|
+
|
|
41
|
+
<Tabs>
|
|
42
|
+
<TabItem value="Delegated">
|
|
43
|
+
|
|
44
|
+
| Resource | Permissions |
|
|
45
|
+
|-----------------|-------------------------|
|
|
46
|
+
| Microsoft Graph | Community.ReadWrite.All |
|
|
47
|
+
|
|
48
|
+
</TabItem>
|
|
49
|
+
<TabItem value="Application">
|
|
50
|
+
|
|
51
|
+
| Resource | Permissions |
|
|
52
|
+
|-----------------|-------------------------|
|
|
53
|
+
| Microsoft Graph | Community.ReadWrite.All |
|
|
54
|
+
|
|
55
|
+
</TabItem>
|
|
56
|
+
</Tabs>
|
|
57
|
+
|
|
39
58
|
## Examples
|
|
40
59
|
|
|
41
60
|
Update info about the community specified by id
|
package/package.json
CHANGED