Update hivegrid-cloud reference to latest main

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
davidandClaude Fable 5 committed 2026-07-08 16:15:37 +02:00
1 parent e98d38e716
commit 7b21524c86
3781 files changed
+373484 -225607

No files matched your search

@@ -0,0 +1,127 @@
// R-P5 (P5) — the Apps-Engine App catalog (global definition table seed).
//
// One entry per integratable app. The `connectionSchema` drives the
// auto-generated credential form in the connect wizard. v1 ships ONLY the
// reference `sample-data-sync` adapter; concrete apps (Gmail/Outlook/AirCall/
// Mollie/KWP) add their catalog entry + adapter together in P14/P15/P16/P20, so
// the catalog and the adapter registry stay drift-free.
//
// Pure data (no node/Prisma) — importable by web, worker, the catalog upsert, and
// the drift check.
import type { AdapterConnectionType } from "@hivegrid/foundation";
/** A credential field rendered by the connect wizard (from connectionSchema). */
export interface AppCredentialField {
readonly name: string;
/** i18n label key (M003). */
readonly labelKey: string;
readonly type: "text" | "secret" | "url";
readonly required: boolean;
}
export interface AppConnectionSchema {
readonly fields: readonly AppCredentialField[];
}
export type AppCatalogCategory = "erp" | "communication" | "calendar" | "signature" | "payment" | "ki";
export interface AppCatalogEntry {
readonly key: string;
/** i18n key for the app's display name (M003). Brand names route through i18n
* too, staying identical across locales. */
readonly titleKey: string;
readonly category: AppCatalogCategory;
readonly connectionType: AdapterConnectionType;
readonly connectionSchema: AppConnectionSchema;
readonly phase: string;
readonly icon?: string;
}
export const INTEGRATION_CATALOG: readonly AppCatalogEntry[] = [
{
key: "sample-data-sync",
titleKey: "integrations.app.sampleDataSync.title",
category: "erp",
connectionType: "rest_api",
phase: "P5",
connectionSchema: {
fields: [
{ name: "baseUrl", labelKey: "integrations.field.baseUrl", type: "url", required: true },
{ name: "apiKey", labelKey: "integrations.field.apiKey", type: "secret", required: true },
],
},
},
{
// AK-P16a · Google Calendar. connectionType oauth2 → the connect flow is the
// OAuth redirect (no manual credential form), so `fields` is empty. The
// per-USER connection + bidirectional sync lives in the calendar module
// (CalendarConnection); this catalog entry keeps the app reachable in the
// integrations surface and drift-free with its registered adapter.
key: "google-calendar",
titleKey: "integrations.app.googleCalendar.title",
category: "calendar",
connectionType: "oauth2",
phase: "P16",
connectionSchema: { fields: [] },
},
{
// VA-P23 · Gmail mailbox sync. connectionType oauth2 → the connect flow is
// the OAuth redirect (no manual credential form). The per-USER mailbox +
// push sync lives in the email-inbox module (EmailIntegrationMailbox); this
// catalog entry keeps the app reachable in the integrations surface and
// drift-free with its registered adapter.
key: "gmail",
titleKey: "integrations.app.gmail.title",
category: "communication",
connectionType: "oauth2",
phase: "P23",
connectionSchema: { fields: [] },
},
{
// VA-P23 · Microsoft (Outlook/Graph) mailbox sync — same pattern as gmail.
key: "microsoft-mail",
titleKey: "integrations.app.microsoftMail.title",
category: "communication",
connectionType: "oauth2",
phase: "P23",
connectionSchema: { fields: [] },
},
{
// AK-P16d · AD-25 default: hardened self-hosted SES. No external provider
// credentials are required; the app entry keeps the module visible in the
// integration surface and drift-free with the registered adapter.
key: "ses-selfhosted",
titleKey: "integrations.app.sesSelfhosted.title",
category: "signature",
connectionType: "rest_api",
phase: "P16",
connectionSchema: { fields: [] },
},
{
// AK-P16d · Optional PandaDoc BYOK bridge. AD-25 keeps PandaDoc out of the
// default flow; tenants can connect their own key/template when needed.
key: "pandadoc-byok",
titleKey: "integrations.app.pandadocByok.title",
category: "signature",
connectionType: "api_key",
phase: "P16",
connectionSchema: {
fields: [
{ name: "apiKey", labelKey: "integrations.field.apiKey", type: "secret", required: true },
{ name: "templateUuid", labelKey: "integrations.field.templateUuid", type: "text", required: true },
{ name: "webhookSharedKey", labelKey: "integrations.field.webhookSharedKey", type: "secret", required: false },
],
},
},
];
/** All catalog keys (for drift comparison). */
export function catalogKeys(): string[] {
return INTEGRATION_CATALOG.map((entry) => entry.key);
}
/** Look up a catalog entry by key. */
export function getCatalogEntry(key: string): AppCatalogEntry | undefined {
return INTEGRATION_CATALOG.find((entry) => entry.key === key);
}