-
Notifications
You must be signed in to change notification settings - Fork 16
Add automatic column synchronization for Excel-to-table syncs #198
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
303bdc4
646c61c
97f47c6
c6f9a1e
7622e4d
1024d1c
aee0435
8fa2736
83f5475
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -2,7 +2,7 @@ import { z, IntegrationDefinition } from '@botpress/sdk' | |||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||
| export default new IntegrationDefinition({ | ||||||||||||||||||||||||||||||||||||||||||||||||
| name: 'plus/sharepoint-excel', | ||||||||||||||||||||||||||||||||||||||||||||||||
| version: '2.2.1', | ||||||||||||||||||||||||||||||||||||||||||||||||
| version: '2.3.1', | ||||||||||||||||||||||||||||||||||||||||||||||||
| title: 'SharePoint Excel', | ||||||||||||||||||||||||||||||||||||||||||||||||
| description: 'Sync one or many SharePoint document libraries with one or more Botpress knowledge bases.', | ||||||||||||||||||||||||||||||||||||||||||||||||
| readme: 'hub.md', | ||||||||||||||||||||||||||||||||||||||||||||||||
|
|
@@ -19,7 +19,6 @@ export default new IntegrationDefinition({ | |||||||||||||||||||||||||||||||||||||||||||||||
| privateKey: z.string().min(1).describe('PEM‑formatted certificate private key'), | ||||||||||||||||||||||||||||||||||||||||||||||||
| primaryDomain: z.string().min(1).describe('SharePoint primary domain (e.g. contoso)'), | ||||||||||||||||||||||||||||||||||||||||||||||||
| siteName: z.string().min(1).describe('SharePoint site name'), | ||||||||||||||||||||||||||||||||||||||||||||||||
| personalAccessToken: z.string().min(1).describe('Botpress Personal Access Token (PAT) for Tables API access'), | ||||||||||||||||||||||||||||||||||||||||||||||||
| }), | ||||||||||||||||||||||||||||||||||||||||||||||||
| }, | ||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||
|
|
@@ -41,7 +40,7 @@ export default new IntegrationDefinition({ | |||||||||||||||||||||||||||||||||||||||||||||||
| sheetTableMapping: z | ||||||||||||||||||||||||||||||||||||||||||||||||
| .string() | ||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||
| .string() | |
| .string() | |
| .refine((val) => { | |
| // Accept either comma-separated or JSON mapping | |
| let mapping: Record<string, string> = {}; | |
| try { | |
| if (val.trim().startsWith('{')) { | |
| mapping = JSON.parse(val); | |
| } else { | |
| val.split(',').forEach(pair => { | |
| const [sheet, table] = pair.split(':').map(s => s.trim()); | |
| if (sheet && table) mapping[sheet] = table; | |
| }); | |
| } | |
| } catch { | |
| // If parsing fails, let Zod handle invalid format | |
| return false; | |
| } | |
| // Validate all table names | |
| return Object.values(mapping).every(tableName => typeof tableName === 'string' && tableName.endsWith('Table')); | |
| }, { | |
| message: "All table names must end with 'Table'." | |
| }) |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -11,16 +11,16 @@ | |
| "private": true, | ||
| "dependencies": { | ||
| "@azure/msal-node": "^2.15.0", | ||
| "@botpress/client": "^1.13.0", | ||
| "@botpress/client": "1.22.0", | ||
| "@botpress/sdk": "4.15.2", | ||
| "axios": "^1.8.1", | ||
| "@botpress/sdk": "0.11.8", | ||
| "xlsx": "^0.18.5" | ||
| }, | ||
| "devDependencies": { | ||
| "@botpress/cli": "^0.11.5", | ||
| "@types/node": "^18.11.17", | ||
| "@botpress/cli": "^4.17.2", | ||
| "@types/node": "^20.19.0", | ||
| "nodemon": "^3.1.7", | ||
| "ts-node": "^10.9.1", | ||
| "typescript": "^4.9.4" | ||
| "ts-node": "^10.9.2", | ||
| "typescript": "^5.8.2" | ||
|
Comment on lines
+14
to
+24
|
||
| } | ||
| } | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
issue: The
personalAccessTokenconfiguration field was removed from the integration definition (line 22 removed), but the old code relied on it for authentication to the Tables API. The new code uses theclientparameter instead, which is correct. However, users who have this field configured will experience a breaking change. Consider: