@pnp/cli-microsoft365 10.10.0-beta.bd186ba → 10.10.0-beta.eb74779

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.
Files changed (77) hide show
  1. package/.devproxy/api-specs/sharepoint-admin.yaml +67 -0
  2. package/.devproxy/api-specs/sharepoint.yaml +230 -0
  3. package/.devproxy/devproxyrc.json +48 -0
  4. package/.devproxy/generate-openapi-spec.json +24 -0
  5. package/.devproxy/spo-csom-types.json +54 -0
  6. package/.eslintrc.cjs +8 -0
  7. package/allCommands.json +1 -1
  8. package/allCommandsFull.json +1 -1
  9. package/dist/cli/cli.js +2 -2
  10. package/dist/m365/app/commands/permission/permission-add.js +8 -1
  11. package/dist/m365/base/SpoCommand.js +1 -0
  12. package/dist/m365/entra/commands/app/app-permission-add.js +5 -18
  13. package/dist/m365/file/commands/file-copy.js +2 -2
  14. package/dist/m365/file/commands/file-move.js +1 -1
  15. package/dist/m365/planner/commands/tenant/tenant-settings-list.js +0 -3
  16. package/dist/m365/spo/commands/contenttype/contenttype-add.js +3 -65
  17. package/dist/m365/spo/commands/contenttype/contenttype-field-remove.js +5 -50
  18. package/dist/m365/spo/commands/contenttype/contenttype-field-set.js +4 -48
  19. package/dist/m365/spo/commands/contenttype/contenttype-set.js +8 -58
  20. package/dist/m365/spo/commands/contenttype/contenttype-sync.js +2 -2
  21. package/dist/m365/spo/commands/folder/folder-sharinglink-add.js +1 -1
  22. package/dist/m365/spo/commands/folder/folder-sharinglink-clear.js +1 -1
  23. package/dist/m365/spo/commands/folder/folder-sharinglink-get.js +1 -1
  24. package/dist/m365/spo/commands/folder/folder-sharinglink-list.js +1 -1
  25. package/dist/m365/spo/commands/folder/folder-sharinglink-remove.js +1 -1
  26. package/dist/m365/spo/commands/folder/folder-sharinglink-set.js +1 -1
  27. package/dist/m365/spo/commands/listitem/listitem-batch-set.js +3 -27
  28. package/dist/m365/spo/commands/page/Page.js +16 -1
  29. package/dist/m365/spo/commands/page/page-add.js +1 -1
  30. package/dist/m365/spo/commands/page/page-clientsidewebpart-add.js +2 -8
  31. package/dist/m365/spo/commands/page/page-control-remove.js +99 -0
  32. package/dist/m365/spo/commands/page/page-control-set.js +1 -1
  33. package/dist/m365/spo/commands/page/page-header-set.js +9 -40
  34. package/dist/m365/spo/commands/page/page-publish.js +2 -10
  35. package/dist/m365/spo/commands/page/page-section-add.js +2 -8
  36. package/dist/m365/spo/commands/page/page-set.js +1 -1
  37. package/dist/m365/spo/commands/site/site-admin-add.js +1 -12
  38. package/dist/m365/spo/commands/site/site-set.js +2 -2
  39. package/dist/m365/spo/commands.js +1 -0
  40. package/dist/utils/entraServicePrincipal.js +21 -0
  41. package/dist/utils/md.js +3 -3
  42. package/dist/utils/spo.js +87 -3
  43. package/docs/docs/cmd/_global.mdx +1 -1
  44. package/docs/docs/cmd/planner/bucket/bucket-add.mdx +19 -0
  45. package/docs/docs/cmd/planner/bucket/bucket-get.mdx +19 -0
  46. package/docs/docs/cmd/planner/bucket/bucket-list.mdx +19 -0
  47. package/docs/docs/cmd/planner/bucket/bucket-remove.mdx +21 -0
  48. package/docs/docs/cmd/planner/bucket/bucket-set.mdx +21 -0
  49. package/docs/docs/cmd/planner/plan/plan-add.mdx +19 -0
  50. package/docs/docs/cmd/planner/plan/plan-get.mdx +19 -0
  51. package/docs/docs/cmd/planner/plan/plan-list.mdx +19 -0
  52. package/docs/docs/cmd/planner/plan/plan-remove.mdx +21 -0
  53. package/docs/docs/cmd/planner/plan/plan-set.mdx +19 -0
  54. package/docs/docs/cmd/planner/roster/roster-add.mdx +19 -0
  55. package/docs/docs/cmd/planner/roster/roster-get.mdx +19 -0
  56. package/docs/docs/cmd/planner/roster/roster-member-add.mdx +19 -0
  57. package/docs/docs/cmd/planner/roster/roster-member-get.mdx +19 -0
  58. package/docs/docs/cmd/planner/roster/roster-member-list.mdx +19 -0
  59. package/docs/docs/cmd/planner/roster/roster-member-remove.mdx +21 -0
  60. package/docs/docs/cmd/planner/roster/roster-plan-list.mdx +19 -0
  61. package/docs/docs/cmd/planner/roster/roster-remove.mdx +21 -0
  62. package/docs/docs/cmd/planner/task/task-add.mdx +19 -0
  63. package/docs/docs/cmd/planner/task/task-checklistitem-add.mdx +19 -0
  64. package/docs/docs/cmd/planner/task/task-checklistitem-list.mdx +19 -0
  65. package/docs/docs/cmd/planner/task/task-checklistitem-remove.mdx +21 -0
  66. package/docs/docs/cmd/planner/task/task-get.mdx +27 -0
  67. package/docs/docs/cmd/planner/task/task-list.mdx +19 -0
  68. package/docs/docs/cmd/planner/task/task-reference-add.mdx +19 -0
  69. package/docs/docs/cmd/planner/task/task-reference-list.mdx +19 -0
  70. package/docs/docs/cmd/planner/task/task-reference-remove.mdx +21 -0
  71. package/docs/docs/cmd/planner/task/task-remove.mdx +21 -0
  72. package/docs/docs/cmd/planner/task/task-set.mdx +19 -0
  73. package/docs/docs/cmd/planner/tenant/tenant-settings-list.mdx +44 -7
  74. package/docs/docs/cmd/planner/tenant/tenant-settings-set.mdx +43 -8
  75. package/docs/docs/cmd/spo/page/page-control-remove.mdx +56 -0
  76. package/npm-shrinkwrap.json +2322 -534
  77. package/package.json +16 -13
@@ -0,0 +1,67 @@
1
+ openapi: 3.0.4
2
+ info:
3
+ title: SharePoint Tenant Admin site API
4
+ description: SharePoint Tenant Admin site API
5
+ version: v1.0
6
+ servers:
7
+ - url: https://{tenant}-admin.sharepoint.com
8
+ variables:
9
+ tenant:
10
+ default: contoso
11
+ components:
12
+ securitySchemes:
13
+ delegated:
14
+ type: oauth2
15
+ flows:
16
+ authorizationCode:
17
+ authorizationUrl: https://login.microsoftonline.com/common/v2.0/oauth2/authorize
18
+ tokenUrl: https://login.microsoftonline.com/common/v2.0/oauth2/token
19
+ scopes:
20
+ AllSites.FullControl: AllSites.FullControl
21
+ AllSites.Manage: AllSites.Manage
22
+ AllSites.Read: AllSites.Read
23
+ AllSites.Write: AllSites.Write
24
+ EnterpriseResource.Read: EnterpriseResource.Read
25
+ EnterpriseResource.Write: EnterpriseResource.Write
26
+ MyFiles.Read: MyFiles.Read
27
+ MyFiles.Write: MyFiles.Write
28
+ Project.Read: Project.Read
29
+ Project.Write: Project.Write
30
+ ProjectWebApp.FullControl: ProjectWebApp.FullControl
31
+ ProjectWebAppReporting.Read: ProjectWebAppReporting.Read
32
+ Sites.Search.All: Sites.Search.All
33
+ TaskStatus.Submit: TaskStatus.Submit
34
+ TermStore.Read.All: TermStore.Read.All
35
+ TermStore.ReadWrite.All: TermStore.ReadWrite.All
36
+ User.Read.All: User.Read.All
37
+ User.ReadWrite.All: User.ReadWrite.All
38
+ application:
39
+ type: oauth2
40
+ flows:
41
+ clientCredentials:
42
+ tokenUrl: https://login.microsoftonline.com/common/v2.0/oauth2/token
43
+ scopes:
44
+ Sites.FullControl.All: Sites.FullControl.All
45
+ Sites.Manage.All: Sites.Manage.All
46
+ Sites.Read.All: Sites.Read.All
47
+ Sites.ReadWrite.All: Sites.ReadWrite.All
48
+ Sites.Selected: Sites.Selected
49
+ TermStore.Read.All: TermStore.Read.All
50
+ TermStore.ReadWrite.All: TermStore.ReadWrite.All
51
+ User.Read.All: User.Read.All
52
+ User.ReadWrite.All: User.ReadWrite.All
53
+ paths:
54
+ /_api/contextinfo:
55
+ post:
56
+ security:
57
+ - delegated:
58
+ - AllSites.Read
59
+ - AllSites.Write
60
+ - AllSites.Manage
61
+ - AllSites.FullControl
62
+ responses:
63
+ 200:
64
+ description: OK
65
+ x-ms-generated-by:
66
+ toolName: Dev Proxy
67
+ toolVersion: 0.25.0
@@ -0,0 +1,230 @@
1
+ openapi: 3.0.4
2
+ info:
3
+ title: SharePoint REST API
4
+ description: SharePoint REST API
5
+ version: v1.0
6
+ servers:
7
+ - url: https://{tenant}.sharepoint.com/{site}
8
+ variables:
9
+ tenant:
10
+ default: contoso
11
+ site:
12
+ default: ""
13
+ components:
14
+ securitySchemes:
15
+ delegated:
16
+ type: oauth2
17
+ flows:
18
+ authorizationCode:
19
+ authorizationUrl: https://login.microsoftonline.com/common/v2.0/oauth2/authorize
20
+ tokenUrl: https://login.microsoftonline.com/common/v2.0/oauth2/token
21
+ scopes:
22
+ AllSites.FullControl: AllSites.FullControl
23
+ AllSites.Manage: AllSites.Manage
24
+ AllSites.Read: AllSites.Read
25
+ AllSites.Write: AllSites.Write
26
+ EnterpriseResource.Read: EnterpriseResource.Read
27
+ EnterpriseResource.Write: EnterpriseResource.Write
28
+ MyFiles.Read: MyFiles.Read
29
+ MyFiles.Write: MyFiles.Write
30
+ Project.Read: Project.Read
31
+ Project.Write: Project.Write
32
+ ProjectWebApp.FullControl: ProjectWebApp.FullControl
33
+ ProjectWebAppReporting.Read: ProjectWebAppReporting.Read
34
+ Sites.Search.All: Sites.Search.All
35
+ TaskStatus.Submit: TaskStatus.Submit
36
+ TermStore.Read.All: TermStore.Read.All
37
+ TermStore.ReadWrite.All: TermStore.ReadWrite.All
38
+ User.Read.All: User.Read.All
39
+ User.ReadWrite.All: User.ReadWrite.All
40
+ application:
41
+ type: oauth2
42
+ flows:
43
+ clientCredentials:
44
+ tokenUrl: https://login.microsoftonline.com/common/v2.0/oauth2/token
45
+ scopes:
46
+ Sites.FullControl.All: Sites.FullControl.All
47
+ Sites.Manage.All: Sites.Manage.All
48
+ Sites.Read.All: Sites.Read.All
49
+ Sites.ReadWrite.All: Sites.ReadWrite.All
50
+ Sites.Selected: Sites.Selected
51
+ TermStore.Read.All: TermStore.Read.All
52
+ TermStore.ReadWrite.All: TermStore.ReadWrite.All
53
+ User.Read.All: User.Read.All
54
+ User.ReadWrite.All: User.ReadWrite.All
55
+ paths:
56
+ /_api/contextinfo:
57
+ post:
58
+ security:
59
+ - delegated:
60
+ - AllSites.Read
61
+ - AllSites.Write
62
+ - AllSites.Manage
63
+ - AllSites.FullControl
64
+ responses:
65
+ 200:
66
+ description: OK
67
+ /_api/SP_TenantSettings_Current:
68
+ get:
69
+ security:
70
+ - delegated:
71
+ - AllSites.Read
72
+ - AllSites.Write
73
+ - AllSites.Manage
74
+ - AllSites.FullControl
75
+ responses:
76
+ 200:
77
+ description: OK
78
+ /_api/web:
79
+ get:
80
+ security:
81
+ - delegated:
82
+ - AllSites.Read
83
+ - AllSites.Write
84
+ - AllSites.Manage
85
+ - AllSites.FullControl
86
+ responses:
87
+ 200:
88
+ description: OK
89
+ /_api/web/folders/addUsingPath(decodedUrl={folderPath}):
90
+ post:
91
+ parameters:
92
+ - name: folderPath
93
+ in: path
94
+ required: true
95
+ description: URL-encoded server-relative path to the folder
96
+ schema:
97
+ type: string
98
+ example: "'%2FShared%20Documents%2FMy%20Folder%20Name'"
99
+ security:
100
+ - delegated:
101
+ - AllSites.Write
102
+ - AllSites.Manage
103
+ - AllSites.FullControl
104
+ responses:
105
+ 200:
106
+ description: OK
107
+ /_api/web/GetFolderByServerRelativePath(DecodedUrl={folderPath}):
108
+ get:
109
+ parameters:
110
+ - name: folderPath
111
+ in: path
112
+ required: true
113
+ description: URL-encoded server-relative path to the folder
114
+ schema:
115
+ type: string
116
+ example: "'%2FShared%20Documents'"
117
+ security:
118
+ - delegated:
119
+ - AllSites.Read
120
+ - AllSites.Write
121
+ - AllSites.Manage
122
+ - AllSites.FullControl
123
+ responses:
124
+ 200:
125
+ description: OK
126
+ /_api/web/GetFolderByServerRelativePath(DecodedUrl={folderPath})/Files/Add({filesAddOptions}):
127
+ post:
128
+ parameters:
129
+ - name: folderPath
130
+ in: path
131
+ required: true
132
+ description: URL-encoded server-relative path to the folder
133
+ schema:
134
+ type: string
135
+ example: "'%2FShared%20Documents'"
136
+ - name: filesAddOptions
137
+ in: path
138
+ required: true
139
+ description: Options for adding files
140
+ schema:
141
+ type: string
142
+ example: "url='README.md',%20overwrite=true"
143
+ security:
144
+ - delegated:
145
+ - AllSites.Write
146
+ - AllSites.Manage
147
+ - AllSites.FullControl
148
+ responses:
149
+ 200:
150
+ description: OK
151
+ /_api/web/lists:
152
+ get:
153
+ security:
154
+ - delegated:
155
+ - AllSites.Read
156
+ - AllSites.Write
157
+ - AllSites.Manage
158
+ - AllSites.FullControl
159
+ - application:
160
+ - Sites.Read.All
161
+ - Sites.Manage.All
162
+ - Sites.ReadWrite.All
163
+ - Sites.FullControl.All
164
+ responses:
165
+ 200:
166
+ description: OK
167
+ /_api/web/webs:
168
+ get:
169
+ security:
170
+ - delegated:
171
+ - AllSites.Write
172
+ - AllSites.Manage
173
+ - AllSites.FullControl
174
+ - application:
175
+ - Sites.Read.All
176
+ - Sites.Manage.All
177
+ - Sites.ReadWrite.All
178
+ - Sites.FullControl.All
179
+ responses:
180
+ 200:
181
+ description: OK
182
+ /sites/{appCatalog}/_api/web/tenantappcatalog/Add({addOptions}):
183
+ post:
184
+ parameters:
185
+ - name: appCatalog
186
+ in: path
187
+ required: true
188
+ description: App catalog site URL
189
+ schema:
190
+ type: string
191
+ example: "appcatalog"
192
+ - name: addOptions
193
+ in: path
194
+ required: true
195
+ description: Options for adding the app package
196
+ schema:
197
+ type: string
198
+ example: "overwrite=false,%20url='spfx.sppkg'"
199
+ security:
200
+ - delegated:
201
+ - AllSites.FullControl
202
+ responses:
203
+ 200:
204
+ description: OK
205
+ /sites/{appCatalog}/_api/web/tenantappcatalog/AvailableApps/GetById({appId})/deploy:
206
+ post:
207
+ parameters:
208
+ - name: appCatalog
209
+ in: path
210
+ required: true
211
+ description: App catalog site URL
212
+ schema:
213
+ type: string
214
+ example: "appcatalog"
215
+ - name: appId
216
+ in: path
217
+ required: true
218
+ description: App ID to deploy
219
+ schema:
220
+ type: string
221
+ example: "'f55e3c17-63ea-456a-8451-48d2839760f7'"
222
+ security:
223
+ - delegated:
224
+ - AllSites.FullControl
225
+ responses:
226
+ 200:
227
+ description: OK
228
+ x-ms-generated-by:
229
+ toolName: Dev Proxy
230
+ toolVersion: 0.25.0
@@ -0,0 +1,48 @@
1
+ {
2
+ "$schema": "https://raw.githubusercontent.com/dotnet/dev-proxy/main/schemas/v1.0.0/rc.schema.json",
3
+ "plugins": [
4
+ {
5
+ "name": "GraphMinimalPermissionsPlugin",
6
+ "enabled": true,
7
+ "pluginPath": "~appFolder/plugins/DevProxy.Plugins.dll",
8
+ "urlsToWatch": [
9
+ "https://graph.microsoft.com/*"
10
+ ]
11
+ },
12
+ {
13
+ "name": "MinimalPermissionsPlugin",
14
+ "enabled": true,
15
+ "pluginPath": "~appFolder/plugins/DevProxy.Plugins.dll",
16
+ "configSection": "minimalPermissionsPlugin",
17
+ "urlsToWatch": [
18
+ "https://*.sharepoint.com/*_api/*"
19
+ ]
20
+ },
21
+ {
22
+ "name": "MinimalCsomPermissionsPlugin",
23
+ "enabled": true,
24
+ "pluginPath": "~appFolder/plugins/DevProxy.Plugins.dll",
25
+ "configSection": "minimalCsomPermissionsPlugin",
26
+ "urlsToWatch": [
27
+ "https://*.sharepoint.com/*_vti_bin/client.svc/ProcessQuery"
28
+ ]
29
+ }
30
+ ],
31
+ "urlsToWatch": [
32
+ "https://*.sharepoint.com/*",
33
+ "https://graph.microsoft.com/*"
34
+ ],
35
+ "minimalPermissionsPlugin": {
36
+ "$schema": "https://raw.githubusercontent.com/dotnet/dev-proxy/main/schemas/v1.0.0/minimalpermissionsplugin.schema.json",
37
+ "apiSpecsFolderPath": "./api-specs"
38
+ },
39
+ "minimalCsomPermissionsPlugin": {
40
+ "$schema": "https://raw.githubusercontent.com/dotnet/dev-proxy/main/schemas/v1.0.0/minimalcsompermissionsplugin.schema.json",
41
+ "typesFilePath": "./spo-csom-types.json"
42
+ },
43
+ "asSystemProxy": false,
44
+ "logLevel": "information",
45
+ "newVersionNotification": "stable",
46
+ "showSkipMessages": true,
47
+ "record": true
48
+ }
@@ -0,0 +1,24 @@
1
+ {
2
+ "$schema": "https://raw.githubusercontent.com/dotnet/dev-proxy/main/schemas/v1.0.0/rc.schema.json",
3
+ "plugins": [
4
+ {
5
+ "name": "OpenApiSpecGeneratorPlugin",
6
+ "enabled": true,
7
+ "pluginPath": "~appFolder/plugins/DevProxy.Plugins.dll",
8
+ "configSection": "openApiSpecGeneratorPlugin"
9
+ }
10
+ ],
11
+ "urlsToWatch": [
12
+ "!https://login.microsoftonline.com/*",
13
+ "!https://*.applicationinsights.azure.com/*",
14
+ "*"
15
+ ],
16
+ "openApiSpecGeneratorPlugin": {
17
+ "$schema": "https://raw.githubusercontent.com/dotnet/dev-proxy/main/schemas/v1.0.0/openapispecgeneratorplugin.schema.json",
18
+ "includeOptionsRequests": false,
19
+ "specVersion": "v3_0",
20
+ "specFormat": "Yaml"
21
+ },
22
+ "asSystemProxy": false,
23
+ "record": true
24
+ }
@@ -0,0 +1,54 @@
1
+ {
2
+ "$schema": "https://raw.githubusercontent.com/dotnet/dev-proxy/main/schemas/v1.0.0/minimalcsompermissions.types.schema.json",
3
+ "types": {
4
+ "104e8f06-1e00-4675-99c6-1b9b504ed8d8": "Microsoft.Online.SharePoint.TenantAdministration.Internal.SPOWebAppServicePrincipal",
5
+ "268004ae-ef6b-4e9b-8425-127220d84719": "Microsoft.Online.SharePoint.TenantAdministration.Tenant",
6
+ "3747adcd-a3c3-41b9-bfab-4a64dd2f1e0a": "Microsoft.SharePoint.Client.RequestContext"
7
+ },
8
+ "returnTypes": {
9
+ "Microsoft.SharePoint.Client.RequestContext.Current.Site": "Microsoft.SharePoint.Client.Site"
10
+ },
11
+ "actions": {
12
+ "Microsoft.SharePoint.Client.RequestContext.Current": {
13
+ "delegated": [
14
+ "AllSites.Read",
15
+ "AllSites.Write",
16
+ "AllSites.Manage",
17
+ "AllSites.FullControl"
18
+ ],
19
+ "application": []
20
+ },
21
+ "Microsoft.SharePoint.Client.Site.setProperty": {
22
+ "delegated": [
23
+ "AllSites.FullControl"
24
+ ],
25
+ "application": []
26
+ },
27
+ "Microsoft.Online.SharePoint.TenantAdministration.Tenant.ctor": {
28
+ "delegated": [
29
+ "AllSites.Read",
30
+ "AllSites.Write",
31
+ "AllSites.Manage",
32
+ "AllSites.FullControl"
33
+ ],
34
+ "application": [
35
+ ]
36
+ },
37
+ "Microsoft.Online.SharePoint.TenantAdministration.Tenant.query": {
38
+ "delegated": [
39
+ "AllSites.Write",
40
+ "AllSites.Manage",
41
+ "AllSites.FullControl"
42
+ ],
43
+ "application": [
44
+ ]
45
+ },
46
+ "Microsoft.Online.SharePoint.TenantAdministration.Tenant.GetSitePropertiesFromSharePointByFilters": {
47
+ "delegated": [
48
+ "AllSites.FullControl"
49
+ ],
50
+ "application": [
51
+ ]
52
+ }
53
+ }
54
+ }
package/.eslintrc.cjs CHANGED
@@ -272,6 +272,14 @@ module.exports = {
272
272
  "rules": {
273
273
  "camelcase": "off"
274
274
  }
275
+ },
276
+ {
277
+ "files": [
278
+ "*.mjs"
279
+ ],
280
+ "rules": {
281
+ "@typescript-eslint/explicit-function-return-type": "off"
282
+ }
275
283
  }
276
284
  ]
277
285
  };