@pipedream/sharepoint 0.5.1 → 0.6.0
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/actions/create-folder/create-folder.mjs +1 -1
- package/actions/create-item/create-item.mjs +1 -1
- package/actions/create-link/create-link.mjs +1 -1
- package/actions/create-list/create-list.mjs +1 -1
- package/actions/download-file/download-file.mjs +1 -1
- package/actions/find-file-by-name/find-file-by-name.mjs +1 -1
- package/actions/get-excel-table/get-excel-table.mjs +1 -1
- package/actions/get-file-by-id/get-file-by-id.mjs +10 -1
- package/actions/get-site/get-site.mjs +40 -0
- package/actions/list-files-in-folder/list-files-in-folder.mjs +20 -1
- package/actions/list-sites/list-sites.mjs +57 -0
- package/actions/search-files/search-files.mjs +84 -0
- package/actions/search-sites/search-sites.mjs +63 -0
- package/actions/select-files/select-files.mjs +9 -12
- package/actions/update-item/update-item.mjs +1 -1
- package/actions/upload-file/upload-file.mjs +1 -1
- package/package.json +1 -1
- package/sharepoint.app.mjs +45 -3
- package/sources/new-file-created/new-file-created.mjs +1 -1
- package/sources/new-folder-created/new-folder-created.mjs +1 -1
- package/sources/new-list-item/new-list-item.mjs +1 -1
- package/sources/updated-list-item/updated-list-item.mjs +1 -1
|
@@ -4,7 +4,7 @@ export default {
|
|
|
4
4
|
key: "sharepoint-create-folder",
|
|
5
5
|
name: "Create Folder",
|
|
6
6
|
description: "Create a new folder in SharePoint. [See the documentation](https://learn.microsoft.com/en-us/onedrive/developer/rest-api/api/driveitem_post_children?view=odsp-graph-online)",
|
|
7
|
-
version: "0.0.
|
|
7
|
+
version: "0.0.3",
|
|
8
8
|
type: "action",
|
|
9
9
|
annotations: {
|
|
10
10
|
destructiveHint: false,
|
|
@@ -4,7 +4,7 @@ export default {
|
|
|
4
4
|
key: "sharepoint-create-item",
|
|
5
5
|
name: "Create Item",
|
|
6
6
|
description: "Create a new item in Microsoft Sharepoint. [See the documentation](https://learn.microsoft.com/en-us/graph/api/listitem-create?view=graph-rest-1.0&tabs=http)",
|
|
7
|
-
version: "0.0.
|
|
7
|
+
version: "0.0.9",
|
|
8
8
|
annotations: {
|
|
9
9
|
destructiveHint: false,
|
|
10
10
|
openWorldHint: true,
|
|
@@ -5,7 +5,7 @@ export default {
|
|
|
5
5
|
key: "sharepoint-create-link",
|
|
6
6
|
name: "Create Link",
|
|
7
7
|
description: "Create a sharing link for a DriveItem. [See the documentation](https://docs.microsoft.com/en-us/graph/api/driveitem-createlink?view=graph-rest-1.0&tabs=http)",
|
|
8
|
-
version: "0.0.
|
|
8
|
+
version: "0.0.4",
|
|
9
9
|
type: "action",
|
|
10
10
|
annotations: {
|
|
11
11
|
destructiveHint: false,
|
|
@@ -4,7 +4,7 @@ export default {
|
|
|
4
4
|
key: "sharepoint-create-list",
|
|
5
5
|
name: "Create List",
|
|
6
6
|
description: "Create a new list in Microsoft Sharepoint. [See the documentation](https://learn.microsoft.com/en-us/graph/api/list-create?view=graph-rest-1.0&tabs=http)",
|
|
7
|
-
version: "0.0.
|
|
7
|
+
version: "0.0.9",
|
|
8
8
|
annotations: {
|
|
9
9
|
destructiveHint: false,
|
|
10
10
|
openWorldHint: true,
|
|
@@ -5,7 +5,7 @@ export default {
|
|
|
5
5
|
key: "sharepoint-download-file",
|
|
6
6
|
name: "Download File",
|
|
7
7
|
description: "Download a Microsoft Sharepoint file to the /tmp directory. [See the documentation](https://learn.microsoft.com/en-us/graph/api/driveitem-get-content?view=graph-rest-1.0&tabs=http)",
|
|
8
|
-
version: "0.0.
|
|
8
|
+
version: "0.0.9",
|
|
9
9
|
annotations: {
|
|
10
10
|
destructiveHint: false,
|
|
11
11
|
openWorldHint: true,
|
|
@@ -6,7 +6,7 @@ export default {
|
|
|
6
6
|
key: "sharepoint-find-file-by-name",
|
|
7
7
|
name: "Find File by Name",
|
|
8
8
|
description: "Search for a file or folder by name. [See the documentation](https://learn.microsoft.com/en-us/onedrive/developer/rest-api/api/driveitem_search)",
|
|
9
|
-
version: "0.1.
|
|
9
|
+
version: "0.1.1",
|
|
10
10
|
type: "action",
|
|
11
11
|
annotations: {
|
|
12
12
|
destructiveHint: false,
|
|
@@ -4,7 +4,7 @@ export default {
|
|
|
4
4
|
key: "sharepoint-get-excel-table",
|
|
5
5
|
name: "Get Excel Table",
|
|
6
6
|
description: "Retrieve a table from an Excel spreadsheet stored in Sharepoint [See the documentation](https://learn.microsoft.com/en-us/graph/api/table-range?view=graph-rest-1.0&tabs=http)",
|
|
7
|
-
version: "0.0.
|
|
7
|
+
version: "0.0.3",
|
|
8
8
|
type: "action",
|
|
9
9
|
annotations: {
|
|
10
10
|
destructiveHint: false,
|
|
@@ -4,7 +4,7 @@ export default {
|
|
|
4
4
|
key: "sharepoint-get-file-by-id",
|
|
5
5
|
name: "Get File by ID",
|
|
6
6
|
description: "Retrieves a file by ID. [See the documentation](https://learn.microsoft.com/en-us/onedrive/developer/rest-api/api/driveitem_get)",
|
|
7
|
-
version: "0.0.
|
|
7
|
+
version: "0.0.3",
|
|
8
8
|
type: "action",
|
|
9
9
|
annotations: {
|
|
10
10
|
destructiveHint: false,
|
|
@@ -39,12 +39,21 @@ export default {
|
|
|
39
39
|
],
|
|
40
40
|
description: "The file to retrieve. You can either search for the file here or provide a custom *File ID*.",
|
|
41
41
|
},
|
|
42
|
+
select: {
|
|
43
|
+
propDefinition: [
|
|
44
|
+
sharepoint,
|
|
45
|
+
"select",
|
|
46
|
+
],
|
|
47
|
+
},
|
|
42
48
|
},
|
|
43
49
|
async run({ $ }) {
|
|
44
50
|
const response = await this.sharepoint.getDriveItem({
|
|
45
51
|
$,
|
|
46
52
|
siteId: this.siteId,
|
|
47
53
|
fileId: this.fileId,
|
|
54
|
+
params: {
|
|
55
|
+
select: this.select,
|
|
56
|
+
},
|
|
48
57
|
});
|
|
49
58
|
$.export("$summary", `Successfully retrieved file with ID: ${this.fileId}`);
|
|
50
59
|
return response;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import sharepoint from "../../sharepoint.app.mjs";
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
key: "sharepoint-get-site",
|
|
5
|
+
name: "Get Site",
|
|
6
|
+
description: "Get a site in Microsoft Sharepoint. [See the documentation](https://learn.microsoft.com/en-us/graph/api/site-get?view=graph-rest-1.0&tabs=http)",
|
|
7
|
+
version: "0.0.1",
|
|
8
|
+
type: "action",
|
|
9
|
+
annotations: {
|
|
10
|
+
destructiveHint: false,
|
|
11
|
+
openWorldHint: true,
|
|
12
|
+
readOnlyHint: true,
|
|
13
|
+
},
|
|
14
|
+
props: {
|
|
15
|
+
sharepoint,
|
|
16
|
+
siteId: {
|
|
17
|
+
propDefinition: [
|
|
18
|
+
sharepoint,
|
|
19
|
+
"siteId",
|
|
20
|
+
],
|
|
21
|
+
},
|
|
22
|
+
select: {
|
|
23
|
+
propDefinition: [
|
|
24
|
+
sharepoint,
|
|
25
|
+
"select",
|
|
26
|
+
],
|
|
27
|
+
},
|
|
28
|
+
},
|
|
29
|
+
async run({ $ }) {
|
|
30
|
+
const response = await this.sharepoint.getSite({
|
|
31
|
+
$,
|
|
32
|
+
siteId: this.siteId,
|
|
33
|
+
params: {
|
|
34
|
+
select: this.select,
|
|
35
|
+
},
|
|
36
|
+
});
|
|
37
|
+
$.export("$summary", `Successfully retrieved site with ID: ${this.siteId}`);
|
|
38
|
+
return response;
|
|
39
|
+
},
|
|
40
|
+
};
|
|
@@ -4,7 +4,7 @@ export default {
|
|
|
4
4
|
key: "sharepoint-list-files-in-folder",
|
|
5
5
|
name: "List Files in Folder",
|
|
6
6
|
description: "Retrieves a list of the files and/or folders directly within a folder. [See the documentation](https://learn.microsoft.com/en-us/onedrive/developer/rest-api/api/driveitem_list_children)",
|
|
7
|
-
version: "0.0.
|
|
7
|
+
version: "0.0.3",
|
|
8
8
|
type: "action",
|
|
9
9
|
annotations: {
|
|
10
10
|
destructiveHint: false,
|
|
@@ -44,18 +44,37 @@ export default {
|
|
|
44
44
|
"excludeFolders",
|
|
45
45
|
],
|
|
46
46
|
},
|
|
47
|
+
select: {
|
|
48
|
+
propDefinition: [
|
|
49
|
+
sharepoint,
|
|
50
|
+
"select",
|
|
51
|
+
],
|
|
52
|
+
},
|
|
53
|
+
orderBy: {
|
|
54
|
+
type: "string",
|
|
55
|
+
label: "Order By",
|
|
56
|
+
description: "The field to order the results by",
|
|
57
|
+
default: "lastModifiedDateTime",
|
|
58
|
+
optional: true,
|
|
59
|
+
},
|
|
47
60
|
},
|
|
48
61
|
async run({ $ }) {
|
|
62
|
+
const params = {
|
|
63
|
+
select: this.select,
|
|
64
|
+
orderby: this.orderBy,
|
|
65
|
+
};
|
|
49
66
|
const response = this.folderId
|
|
50
67
|
? await this.sharepoint.listDriveItemsInFolder({
|
|
51
68
|
$,
|
|
52
69
|
driveId: this.driveId,
|
|
53
70
|
folderId: this.folderId,
|
|
71
|
+
params,
|
|
54
72
|
})
|
|
55
73
|
: await this.sharepoint.listDriveItems({
|
|
56
74
|
$,
|
|
57
75
|
siteId: this.siteId,
|
|
58
76
|
driveId: this.driveId,
|
|
77
|
+
params,
|
|
59
78
|
});
|
|
60
79
|
const values = this.excludeFolders
|
|
61
80
|
? response.value.filter(({ folder }) => !folder)
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import sharepoint from "../../sharepoint.app.mjs";
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
key: "sharepoint-list-sites",
|
|
5
|
+
name: "List Sites",
|
|
6
|
+
description: "List all sites in Microsoft Sharepoint. [See the documentation](https://learn.microsoft.com/en-us/graph/api/site-list?view=graph-rest-1.0&tabs=http)",
|
|
7
|
+
version: "0.0.1",
|
|
8
|
+
type: "action",
|
|
9
|
+
annotations: {
|
|
10
|
+
destructiveHint: false,
|
|
11
|
+
openWorldHint: true,
|
|
12
|
+
readOnlyHint: true,
|
|
13
|
+
},
|
|
14
|
+
props: {
|
|
15
|
+
sharepoint,
|
|
16
|
+
select: {
|
|
17
|
+
propDefinition: [
|
|
18
|
+
sharepoint,
|
|
19
|
+
"select",
|
|
20
|
+
],
|
|
21
|
+
},
|
|
22
|
+
maxResults: {
|
|
23
|
+
propDefinition: [
|
|
24
|
+
sharepoint,
|
|
25
|
+
"maxResults",
|
|
26
|
+
],
|
|
27
|
+
},
|
|
28
|
+
},
|
|
29
|
+
async run({ $ }) {
|
|
30
|
+
const sites = [];
|
|
31
|
+
let count = 0;
|
|
32
|
+
|
|
33
|
+
const results = this.sharepoint.paginate({
|
|
34
|
+
fn: this.sharepoint.listAllSites,
|
|
35
|
+
args: {
|
|
36
|
+
$,
|
|
37
|
+
params: {
|
|
38
|
+
select: this.select,
|
|
39
|
+
},
|
|
40
|
+
},
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
for await (const site of results) {
|
|
44
|
+
sites.push(site);
|
|
45
|
+
count++;
|
|
46
|
+
if (this.maxResults && count >= this.maxResults) {
|
|
47
|
+
break;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
$.export("$summary", `Successfully listed ${count} site${count === 1
|
|
52
|
+
? ""
|
|
53
|
+
: "s"}`);
|
|
54
|
+
|
|
55
|
+
return sites;
|
|
56
|
+
},
|
|
57
|
+
};
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import sharepoint from "../../sharepoint.app.mjs";
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
key: "sharepoint-search-files",
|
|
5
|
+
name: "Search Files",
|
|
6
|
+
description: "Search for files in Microsoft Sharepoint. [See the documentation](https://learn.microsoft.com/en-us/graph/api/search-query?view=graph-rest-1.0&tabs=http)",
|
|
7
|
+
version: "0.0.1",
|
|
8
|
+
type: "action",
|
|
9
|
+
annotations: {
|
|
10
|
+
destructiveHint: false,
|
|
11
|
+
openWorldHint: true,
|
|
12
|
+
readOnlyHint: true,
|
|
13
|
+
},
|
|
14
|
+
props: {
|
|
15
|
+
sharepoint,
|
|
16
|
+
queryString: {
|
|
17
|
+
type: "string",
|
|
18
|
+
label: "Query String",
|
|
19
|
+
description: "The search query containing the search terms",
|
|
20
|
+
},
|
|
21
|
+
queryTemplate: {
|
|
22
|
+
type: "string",
|
|
23
|
+
label: "Query Template",
|
|
24
|
+
description: "Provides a way to decorate the query string. Supports both KQL and query variables. Example: `({searchTerms}) AuthorOWSUSER:Adventure` [See the documentation](https://learn.microsoft.com/en-us/graph/search-concept-query-template) for more information.",
|
|
25
|
+
optional: true,
|
|
26
|
+
},
|
|
27
|
+
select: {
|
|
28
|
+
propDefinition: [
|
|
29
|
+
sharepoint,
|
|
30
|
+
"select",
|
|
31
|
+
],
|
|
32
|
+
},
|
|
33
|
+
size: {
|
|
34
|
+
propDefinition: [
|
|
35
|
+
sharepoint,
|
|
36
|
+
"maxResults",
|
|
37
|
+
],
|
|
38
|
+
max: 500,
|
|
39
|
+
},
|
|
40
|
+
sortField: {
|
|
41
|
+
type: "string",
|
|
42
|
+
label: "Sort Field",
|
|
43
|
+
description: "The field to sort the results by",
|
|
44
|
+
default: "lastModifiedDateTime",
|
|
45
|
+
optional: true,
|
|
46
|
+
},
|
|
47
|
+
descending: {
|
|
48
|
+
type: "boolean",
|
|
49
|
+
label: "Descending",
|
|
50
|
+
description: "Whether to sort the results in descending order",
|
|
51
|
+
optional: true,
|
|
52
|
+
},
|
|
53
|
+
},
|
|
54
|
+
async run({ $ }) {
|
|
55
|
+
const response = await this.sharepoint.searchQuery({
|
|
56
|
+
$,
|
|
57
|
+
data: {
|
|
58
|
+
requests: [
|
|
59
|
+
{
|
|
60
|
+
entityTypes: [
|
|
61
|
+
"driveItem",
|
|
62
|
+
],
|
|
63
|
+
query: {
|
|
64
|
+
queryString: this.queryString,
|
|
65
|
+
queryTemplate: this.queryTemplate,
|
|
66
|
+
},
|
|
67
|
+
fields: this.select
|
|
68
|
+
? this.select.split(",").map((f) => f.trim())
|
|
69
|
+
: undefined,
|
|
70
|
+
size: this.size,
|
|
71
|
+
sortProperties: [
|
|
72
|
+
{
|
|
73
|
+
name: this.sortField,
|
|
74
|
+
isDescending: this.descending,
|
|
75
|
+
},
|
|
76
|
+
],
|
|
77
|
+
},
|
|
78
|
+
],
|
|
79
|
+
},
|
|
80
|
+
});
|
|
81
|
+
$.export("$summary", `Successfully searched for ${this.queryString}`);
|
|
82
|
+
return response;
|
|
83
|
+
},
|
|
84
|
+
};
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import sharepoint from "../../sharepoint.app.mjs";
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
key: "sharepoint-search-sites",
|
|
5
|
+
name: "Search Sites",
|
|
6
|
+
description: "Search for sites in Microsoft Sharepoint. [See the documentation](https://learn.microsoft.com/en-us/graph/api/site-search?view=graph-rest-1.0&tabs=http)",
|
|
7
|
+
version: "0.0.1",
|
|
8
|
+
type: "action",
|
|
9
|
+
annotations: {
|
|
10
|
+
destructiveHint: false,
|
|
11
|
+
openWorldHint: true,
|
|
12
|
+
readOnlyHint: true,
|
|
13
|
+
},
|
|
14
|
+
props: {
|
|
15
|
+
sharepoint,
|
|
16
|
+
query: {
|
|
17
|
+
type: "string",
|
|
18
|
+
label: "Query",
|
|
19
|
+
description: "The query to search for",
|
|
20
|
+
},
|
|
21
|
+
select: {
|
|
22
|
+
propDefinition: [
|
|
23
|
+
sharepoint,
|
|
24
|
+
"select",
|
|
25
|
+
],
|
|
26
|
+
},
|
|
27
|
+
maxResults: {
|
|
28
|
+
propDefinition: [
|
|
29
|
+
sharepoint,
|
|
30
|
+
"maxResults",
|
|
31
|
+
],
|
|
32
|
+
},
|
|
33
|
+
},
|
|
34
|
+
async run({ $ }) {
|
|
35
|
+
const sites = [];
|
|
36
|
+
let count = 0;
|
|
37
|
+
|
|
38
|
+
const results = this.sharepoint.paginate({
|
|
39
|
+
fn: this.sharepoint.listAllSites,
|
|
40
|
+
args: {
|
|
41
|
+
$,
|
|
42
|
+
params: {
|
|
43
|
+
search: this.query,
|
|
44
|
+
select: this.select,
|
|
45
|
+
},
|
|
46
|
+
},
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
for await (const site of results) {
|
|
50
|
+
sites.push(site);
|
|
51
|
+
count++;
|
|
52
|
+
if (this.maxResults && count >= this.maxResults) {
|
|
53
|
+
break;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
$.export("$summary", `Successfully listed ${count} site${count === 1
|
|
58
|
+
? ""
|
|
59
|
+
: "s"}`);
|
|
60
|
+
|
|
61
|
+
return sites;
|
|
62
|
+
},
|
|
63
|
+
};
|
|
@@ -4,7 +4,7 @@ export default {
|
|
|
4
4
|
key: "sharepoint-select-files",
|
|
5
5
|
name: "Select Files",
|
|
6
6
|
description: "A file picker action that allows browsing and selecting one or more files from SharePoint. Returns the selected files' metadata including pre-authenticated download URLs. [See the documentation](https://learn.microsoft.com/en-us/graph/api/driveitem-get)",
|
|
7
|
-
version: "0.0.
|
|
7
|
+
version: "0.0.2",
|
|
8
8
|
type: "action",
|
|
9
9
|
annotations: {
|
|
10
10
|
destructiveHint: false,
|
|
@@ -19,42 +19,39 @@ export default {
|
|
|
19
19
|
"siteId",
|
|
20
20
|
],
|
|
21
21
|
withLabel: true,
|
|
22
|
-
reloadProps: true,
|
|
23
22
|
},
|
|
24
23
|
driveId: {
|
|
25
24
|
propDefinition: [
|
|
26
25
|
sharepoint,
|
|
27
26
|
"driveId",
|
|
28
27
|
(c) => ({
|
|
29
|
-
siteId: c.siteId?.
|
|
28
|
+
siteId: c.siteId?.value || c.siteId,
|
|
30
29
|
}),
|
|
31
30
|
],
|
|
32
31
|
withLabel: true,
|
|
33
|
-
reloadProps: true,
|
|
34
32
|
},
|
|
35
33
|
folderId: {
|
|
36
34
|
propDefinition: [
|
|
37
35
|
sharepoint,
|
|
38
36
|
"folderId",
|
|
39
37
|
(c) => ({
|
|
40
|
-
siteId: c.siteId?.
|
|
41
|
-
driveId: c.driveId?.
|
|
38
|
+
siteId: c.siteId?.value || c.siteId,
|
|
39
|
+
driveId: c.driveId?.value || c.driveId,
|
|
42
40
|
}),
|
|
43
41
|
],
|
|
44
42
|
label: "Folder",
|
|
45
43
|
description: "The folder to browse. Leave empty to browse the root of the drive.",
|
|
46
44
|
optional: true,
|
|
47
45
|
withLabel: true,
|
|
48
|
-
reloadProps: true,
|
|
49
46
|
},
|
|
50
47
|
fileOrFolderIds: {
|
|
51
48
|
propDefinition: [
|
|
52
49
|
sharepoint,
|
|
53
50
|
"fileOrFolderId",
|
|
54
51
|
(c) => ({
|
|
55
|
-
siteId: c.siteId?.
|
|
56
|
-
driveId: c.driveId?.
|
|
57
|
-
folderId: c.folderId?.
|
|
52
|
+
siteId: c.siteId?.value || c.siteId,
|
|
53
|
+
driveId: c.driveId?.value || c.driveId,
|
|
54
|
+
folderId: c.folderId?.value || c.folderId,
|
|
58
55
|
}),
|
|
59
56
|
],
|
|
60
57
|
type: "string[]",
|
|
@@ -66,8 +63,8 @@ export default {
|
|
|
66
63
|
methods: {
|
|
67
64
|
resolveValue(prop) {
|
|
68
65
|
if (!prop) return null;
|
|
69
|
-
if (typeof prop === "object" && prop
|
|
70
|
-
return prop.
|
|
66
|
+
if (typeof prop === "object" && prop?.value) {
|
|
67
|
+
return prop.value;
|
|
71
68
|
}
|
|
72
69
|
return prop;
|
|
73
70
|
},
|
|
@@ -5,7 +5,7 @@ export default {
|
|
|
5
5
|
key: "sharepoint-update-item",
|
|
6
6
|
name: "Update Item",
|
|
7
7
|
description: "Updates an existing item in Microsoft Sharepoint. [See the documentation](https://learn.microsoft.com/en-us/graph/api/listitem-update?view=graph-rest-1.0&tabs=http)",
|
|
8
|
-
version: "0.0.
|
|
8
|
+
version: "0.0.9",
|
|
9
9
|
annotations: {
|
|
10
10
|
destructiveHint: true,
|
|
11
11
|
openWorldHint: true,
|
|
@@ -5,7 +5,7 @@ export default {
|
|
|
5
5
|
key: "sharepoint-upload-file",
|
|
6
6
|
name: "Upload File",
|
|
7
7
|
description: "Upload a file to OneDrive. [See the documentation](https://learn.microsoft.com/en-us/onedrive/developer/rest-api/api/driveitem_put_content?view=odsp-graph-online)",
|
|
8
|
-
version: "0.0.
|
|
8
|
+
version: "0.0.3",
|
|
9
9
|
type: "action",
|
|
10
10
|
annotations: {
|
|
11
11
|
destructiveHint: false,
|
package/package.json
CHANGED
package/sharepoint.app.mjs
CHANGED
|
@@ -8,12 +8,20 @@ export default {
|
|
|
8
8
|
type: "string",
|
|
9
9
|
label: "Site",
|
|
10
10
|
description: "Identifier of a site",
|
|
11
|
-
|
|
11
|
+
useQuery: true,
|
|
12
|
+
async options({
|
|
13
|
+
prevContext, query,
|
|
14
|
+
}) {
|
|
12
15
|
const args = prevContext?.nextLink
|
|
13
16
|
? {
|
|
14
17
|
url: prevContext.nextLink,
|
|
15
18
|
}
|
|
16
19
|
: {};
|
|
20
|
+
if (query) {
|
|
21
|
+
args.params = {
|
|
22
|
+
search: query,
|
|
23
|
+
};
|
|
24
|
+
}
|
|
17
25
|
const response = await this.listAllSites(args);
|
|
18
26
|
const options = response.value?.map(({
|
|
19
27
|
id: value, displayName: label,
|
|
@@ -266,6 +274,19 @@ export default {
|
|
|
266
274
|
description: "Set to `true` to return only files in the response. Defaults to `false`",
|
|
267
275
|
optional: true,
|
|
268
276
|
},
|
|
277
|
+
select: {
|
|
278
|
+
type: "string",
|
|
279
|
+
label: "Select",
|
|
280
|
+
description: "A comma-separated list of properties to return in the response",
|
|
281
|
+
optional: true,
|
|
282
|
+
},
|
|
283
|
+
maxResults: {
|
|
284
|
+
type: "integer",
|
|
285
|
+
label: "Max Results",
|
|
286
|
+
description: "The maximum number of results to return",
|
|
287
|
+
optional: true,
|
|
288
|
+
default: 100,
|
|
289
|
+
},
|
|
269
290
|
fileOrFolderId: {
|
|
270
291
|
type: "string",
|
|
271
292
|
label: "File or Folder",
|
|
@@ -331,15 +352,29 @@ export default {
|
|
|
331
352
|
...args,
|
|
332
353
|
});
|
|
333
354
|
},
|
|
355
|
+
getSite({
|
|
356
|
+
siteId, ...args
|
|
357
|
+
}) {
|
|
358
|
+
return this._makeRequest({
|
|
359
|
+
path: `/sites/${siteId}`,
|
|
360
|
+
...args,
|
|
361
|
+
});
|
|
362
|
+
},
|
|
334
363
|
listSites(args = {}) {
|
|
335
364
|
return this._makeRequest({
|
|
336
365
|
path: "/me/followedSites",
|
|
337
366
|
...args,
|
|
338
367
|
});
|
|
339
368
|
},
|
|
340
|
-
listAllSites(
|
|
369
|
+
listAllSites({
|
|
370
|
+
params = {}, ...args
|
|
371
|
+
} = {}) {
|
|
372
|
+
if (!params.search) {
|
|
373
|
+
params.search = "*";
|
|
374
|
+
}
|
|
341
375
|
return this._makeRequest({
|
|
342
|
-
path: "/sites
|
|
376
|
+
path: "/sites",
|
|
377
|
+
params,
|
|
343
378
|
...args,
|
|
344
379
|
});
|
|
345
380
|
},
|
|
@@ -503,6 +538,13 @@ export default {
|
|
|
503
538
|
...args,
|
|
504
539
|
});
|
|
505
540
|
},
|
|
541
|
+
searchQuery(args = {}) {
|
|
542
|
+
return this._makeRequest({
|
|
543
|
+
method: "POST",
|
|
544
|
+
path: "/search/query",
|
|
545
|
+
...args,
|
|
546
|
+
});
|
|
547
|
+
},
|
|
506
548
|
async *paginate({
|
|
507
549
|
fn, args,
|
|
508
550
|
}) {
|