feat: améliorations SharePoint - test connexion Azure AD, alerte expiration secret, log statut upload dans BapHistory

This commit is contained in:
Manus
2026-05-06 07:55:46 -04:00
parent bbee4cd7c9
commit 6553aee8a6
5 changed files with 176 additions and 1 deletions

View File

@@ -0,0 +1,4 @@
ALTER TABLE `bapHistory` ADD `sharepointUploadStatus` enum('success','error','skipped');--> statement-breakpoint
ALTER TABLE `bapHistory` ADD `sharepointUploadPath` text;--> statement-breakpoint
ALTER TABLE `bapHistory` ADD `sharepointUploadError` text;--> statement-breakpoint
ALTER TABLE `importSettings` ADD `azureSecretExpiresAt` timestamp;

View File

@@ -191,6 +191,7 @@ export const importSettings = mysqlTable("importSettings", {
azureTenantId: varchar("azureTenantId", { length: 100 }), // Azure AD Tenant ID
azureClientId: varchar("azureClientId", { length: 100 }), // Azure AD Application (client) ID
azureClientSecret: text("azureClientSecret"), // Azure AD Client Secret (encrypted)
azureSecretExpiresAt: timestamp("azureSecretExpiresAt"), // Azure AD Client Secret expiration date
// AI Engine settings
aiProvider: mysqlEnum("aiProvider", ["mistral", "manus"]).default("mistral").notNull(), // AI provider for invoice extraction
@@ -386,6 +387,9 @@ export const bapHistory = mysqlTable("bapHistory", {
exportPath: text("exportPath"), // null for browser mode
pdfUrl: text("pdfUrl"), // S3 URL for browser mode
signatureName: varchar("signatureName", { length: 255 }), // Signer name if applied
sharepointUploadStatus: mysqlEnum("sharepointUploadStatus", ["success", "error", "skipped"]), // SharePoint upload result
sharepointUploadPath: text("sharepointUploadPath"), // Path/URL of uploaded file in SharePoint
sharepointUploadError: text("sharepointUploadError"), // Error message if upload failed
validatedAt: timestamp("validatedAt").defaultNow().notNull(),
});
export type BapHistory = typeof bapHistory.$inferSelect;