Skip to content

Commit 7d1c8a4

Browse files
committed
Fix vulerbilities, remove obselete libraries, fix lint issues
1 parent 9cd15dd commit 7d1c8a4

17 files changed

Lines changed: 1280 additions & 3420 deletions
Lines changed: 171 additions & 133 deletions
Original file line numberDiff line numberDiff line change
@@ -1,134 +1,172 @@
1-
# Microsoft Sharepoint
2-
3-
**Connection:**
4-
5-
- Cloud Authentication
6-
- [Docu](https://github.com/s-KaiNet/node-sp-auth/wiki/SharePoint%20Online%20addin%20only%20authentication)
7-
8-
- key: clientId
9-
- value: Microsoft organization client id
10-
- key: clientSecret
11-
- value: Microsoft organization client secret
12-
13-
- Basic Authentication
14-
- key: username
15-
- value: Microsoft Login username (e.g. email)
16-
- key: password
17-
- value: Microsoft Login password
18-
## Node: Get Sharepoint Site Info
19-
20-
Returns the entire information of a given Sharepoint site. Therefore, you have to define the `url` as `https://[your-tenant].sharepoint.com/sites/[your-site]`.
21-
22-
```json
23-
{
24-
"info": {
25-
"d": {
26-
"__metadata": {
27-
"id": "https://sharepoint.com/sites/TestWebseite/_api/Web",
28-
"uri": "https://sharepoint.com/sites/TestWebseite/_api/Web",
29-
"type": "SP.Web"
30-
},
31-
"FirstUniqueAncestorSecurableObject": {
32-
"__deferred": {
33-
"uri": "https://sharepoint.com/sites/TestWebseite/_api/Web/FirstUniqueAncestorSecurableObject"
34-
}
35-
},
36-
37-
"...": "...",
38-
39-
"AllowRssFeeds": true,
40-
"AlternateCssUrl": "",
41-
"AppInstanceId": "00000000-0000-0000-0000-000000000000",
42-
"ClassicWelcomePage": null,
43-
"Configuration": 0,
44-
"Created": "2019-09-06T09:07:24.087",
45-
"CurrentChangeToken": {
46-
"__metadata": {
47-
"type": "SP.ChangeToken"
48-
},
49-
"StringValue": ""
50-
},
51-
"CustomMasterUrl": "/sites/TestWebseite/_catalogs/masterpage/seattle.master",
52-
"Description": "TestWebseite",
53-
"DesignPackageId": "00000000-0000-0000-0000-000000000000",
54-
"DocumentLibraryCalloutOfficeWebAppPreviewersDisabled": false,
55-
"EnableMinimalDownload": false,
56-
"FooterEmphasis": 0,
57-
"FooterEnabled": false,
58-
"FooterLayout": 0,
59-
"HeaderEmphasis": 0,
60-
"HeaderLayout": 0,
61-
"HorizontalQuickLaunch": false,
62-
"Id": "f2dd83bb-f3aa-4d2a-9eef-9d85ff9b5cae",
63-
"IsHomepageModernized": false,
64-
"IsMultilingual": true,
65-
"Language": 1033,
66-
"LastItemModifiedDate": "2019-09-11T09:47:16Z",
67-
"LastItemUserModifiedDate": "2019-09-06T10:57:26Z",
68-
"MasterUrl": "/sites/TestWebseite/_catalogs/masterpage/seattle.master",
69-
"MegaMenuEnabled": false,
70-
"NoCrawl": false,
71-
"ObjectCacheEnabled": false,
72-
"OverwriteTranslationsOnChange": false,
73-
"ResourcePath": {
74-
"__metadata": {
75-
"type": "SP.ResourcePath"
76-
},
77-
"DecodedUrl": "https://sharepoint.com/sites/TestWebseite"
78-
},
79-
"QuickLaunchEnabled": true,
80-
"RecycleBinEnabled": true,
81-
"SearchScope": 0,
82-
"ServerRelativeUrl": "/sites/TestWebseite",
83-
"SiteLogoUrl": "",
84-
"SyndicationEnabled": true,
85-
"TenantAdminMembersCanShare": 0,
86-
"Title": "TestWebseite",
87-
"TreeViewEnabled": false,
88-
"UIVersion": 15,
89-
"UIVersionConfigurationEnabled": false,
90-
"Url": "https://sharepoint.com/sites/TestWebseite",
91-
"WebTemplate": "GROUP",
92-
"WelcomePage": "SitePages/Home.aspx"
93-
}
94-
}
95-
}
96-
```
97-
98-
## Node: Get Sharepoint List Items
99-
100-
This node returns all items of a specified list. You have to define your `url` such as for the upper node but now you need the SharePoint `list`, too. The node will return all data stored in this specific SharePoint list:
101-
102-
```json
103-
{
104-
"list": {
105-
"d": {
106-
"results": [
107-
{
108-
"__metadata": {
109-
"id": "",
110-
"uri": "https://sharepoint.com/sites/TestWebseite/_api/Web/Lists(...)",
111-
"etag": "\"1\"",
112-
"type": "SP.Data.TestListItem"
113-
},
114-
"FileSystemObjectType": 0,
115-
"Id": 2,
116-
"ServerRedirectedEmbedUri": null,
117-
"ServerRedirectedEmbedUrl": "",
118-
"ID": 2,
119-
"ContentTypeId": "",
120-
"Title": "Cognigy",
121-
"Modified": "2019-09-06T10:10:05Z",
122-
"Created": "2019-09-06T10:10:05Z",
123-
"AuthorId": 6,
124-
"EditorId": 6,
125-
"OData__UIVersionString": "1.0",
126-
"Attachments": false,
127-
"GUID": "",
128-
"ComplianceAssetId": null
129-
}
130-
]
131-
}
132-
}
133-
}
1+
# Microsoft SharePoint
2+
3+
Integrates Cognigy.AI with Microsoft SharePoint.
4+
5+
This extension provides:
6+
- A cloud connection for Microsoft credentials,
7+
- A Knowledge Connector that ingests files from SharePoint document libraries,
8+
- Flow Nodes for reading site info and list items.
9+
10+
## Table of Contents
11+
- [SharePoint Connection](#sharepoint-connection)
12+
- [SharePoint Knowledge Connector](#sharepoint-knowledge-connector)
13+
- [SharePoint Flow Nodes](#sharepoint-flow-nodes)
14+
15+
---
16+
17+
## SharePoint Connection
18+
19+
The extension uses a connection of type `cloud` with the following keys:
20+
21+
- `tenantId`: Microsoft Entra tenant ID
22+
- `clientId`: Application (client) ID
23+
- `clientSecret`: Client secret
24+
25+
The extension authenticates via OAuth2 client credentials against Microsoft Graph.
26+
27+
---
28+
29+
## SharePoint Knowledge Connector
30+
31+
The connector reads files from given directory of a SharePoint site and creates Knowledge Sources plus Knowledge Chunks.
32+
33+
### Connector Fields
34+
35+
- **Connection** (`connection`, required): Cloud connection with `tenantId`, `clientId`, `clientSecret`
36+
- **SharePoint Hostname** (`hostname`, required): for example `yourtenant.sharepoint.com`
37+
- **Site Path** (`sitePath`, required): for example `/sites/yoursite`
38+
- **Source Tags** (`sourceTags`): tags assigned to each created Knowledge Source (default: `sharepoint`)
39+
40+
### Supported File Extensions
41+
42+
- `pdf`
43+
- `docx`
44+
- `txt`
45+
- `csv`
46+
- `json`
47+
- `jsonl`
48+
- `md`
49+
- `pptx`
50+
51+
---
52+
53+
## SharePoint Flow Nodes
54+
55+
## Node: Get Sharepoint Site Info
56+
57+
Returns the entire information of a given Sharepoint site. Therefore, you have to define the `url` as `https://[your-tenant].sharepoint.com/sites/[your-site]`.
58+
59+
```json
60+
{
61+
"info": {
62+
"d": {
63+
"__metadata": {
64+
"id": "https://sharepoint.com/sites/TestWebseite/_api/Web",
65+
"uri": "https://sharepoint.com/sites/TestWebseite/_api/Web",
66+
"type": "SP.Web"
67+
},
68+
"FirstUniqueAncestorSecurableObject": {
69+
"__deferred": {
70+
"uri": "https://sharepoint.com/sites/TestWebseite/_api/Web/FirstUniqueAncestorSecurableObject"
71+
}
72+
},
73+
74+
"...": "...",
75+
76+
"AllowRssFeeds": true,
77+
"AlternateCssUrl": "",
78+
"AppInstanceId": "00000000-0000-0000-0000-000000000000",
79+
"ClassicWelcomePage": null,
80+
"Configuration": 0,
81+
"Created": "2019-09-06T09:07:24.087",
82+
"CurrentChangeToken": {
83+
"__metadata": {
84+
"type": "SP.ChangeToken"
85+
},
86+
"StringValue": ""
87+
},
88+
"CustomMasterUrl": "/sites/TestWebseite/_catalogs/masterpage/seattle.master",
89+
"Description": "TestWebseite",
90+
"DesignPackageId": "00000000-0000-0000-0000-000000000000",
91+
"DocumentLibraryCalloutOfficeWebAppPreviewersDisabled": false,
92+
"EnableMinimalDownload": false,
93+
"FooterEmphasis": 0,
94+
"FooterEnabled": false,
95+
"FooterLayout": 0,
96+
"HeaderEmphasis": 0,
97+
"HeaderLayout": 0,
98+
"HorizontalQuickLaunch": false,
99+
"Id": "f2dd83bb-f3aa-4d2a-9eef-9d85ff9b5cae",
100+
"IsHomepageModernized": false,
101+
"IsMultilingual": true,
102+
"Language": 1033,
103+
"LastItemModifiedDate": "2019-09-11T09:47:16Z",
104+
"LastItemUserModifiedDate": "2019-09-06T10:57:26Z",
105+
"MasterUrl": "/sites/TestWebseite/_catalogs/masterpage/seattle.master",
106+
"MegaMenuEnabled": false,
107+
"NoCrawl": false,
108+
"ObjectCacheEnabled": false,
109+
"OverwriteTranslationsOnChange": false,
110+
"ResourcePath": {
111+
"__metadata": {
112+
"type": "SP.ResourcePath"
113+
},
114+
"DecodedUrl": "https://sharepoint.com/sites/TestWebseite"
115+
},
116+
"QuickLaunchEnabled": true,
117+
"RecycleBinEnabled": true,
118+
"SearchScope": 0,
119+
"ServerRelativeUrl": "/sites/TestWebseite",
120+
"SiteLogoUrl": "",
121+
"SyndicationEnabled": true,
122+
"TenantAdminMembersCanShare": 0,
123+
"Title": "TestWebseite",
124+
"TreeViewEnabled": false,
125+
"UIVersion": 15,
126+
"UIVersionConfigurationEnabled": false,
127+
"Url": "https://sharepoint.com/sites/TestWebseite",
128+
"WebTemplate": "GROUP",
129+
"WelcomePage": "SitePages/Home.aspx"
130+
}
131+
}
132+
}
133+
```
134+
135+
## Node: Get Sharepoint List Items
136+
137+
This node returns all items of a specified list. You have to define your `url` such as for the upper node but now you need the SharePoint `list`, too. The node will return all data stored in this specific SharePoint list:
138+
139+
```json
140+
{
141+
"list": {
142+
"d": {
143+
"results": [
144+
{
145+
"__metadata": {
146+
"id": "",
147+
"uri": "https://sharepoint.com/sites/TestWebseite/_api/Web/Lists(...)",
148+
"etag": "\"1\"",
149+
"type": "SP.Data.TestListItem"
150+
},
151+
"FileSystemObjectType": 0,
152+
"Id": 2,
153+
"ServerRedirectedEmbedUri": null,
154+
"ServerRedirectedEmbedUrl": "",
155+
"ID": 2,
156+
"ContentTypeId": "",
157+
"Title": "Cognigy",
158+
"Modified": "2019-09-06T10:10:05Z",
159+
"Created": "2019-09-06T10:10:05Z",
160+
"AuthorId": 6,
161+
"EditorId": 6,
162+
"OData__UIVersionString": "1.0",
163+
"Attachments": false,
164+
"GUID": "",
165+
"ComplianceAssetId": null
166+
}
167+
]
168+
}
169+
}
170+
}
171+
134172
```

0 commit comments

Comments
 (0)