@contractspec/example.integration-hub 1.46.1 → 1.47.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.
Files changed (73) hide show
  1. package/dist/connection/connection.operation.d.ts +2 -2
  2. package/dist/connection/connection.operation.d.ts.map +1 -1
  3. package/dist/connection/connection.presentation.d.ts +3 -3
  4. package/dist/connection/connection.presentation.d.ts.map +1 -1
  5. package/dist/connection/connection.presentation.js +5 -5
  6. package/dist/connection/connection.presentation.js.map +1 -1
  7. package/dist/events.d.ts +10 -10
  8. package/dist/example.d.ts +2 -2
  9. package/dist/example.d.ts.map +1 -1
  10. package/dist/example.js +4 -2
  11. package/dist/example.js.map +1 -1
  12. package/dist/handlers/index.d.ts +2 -0
  13. package/dist/handlers/index.js +3 -0
  14. package/dist/handlers/integration.handlers.d.ts +130 -0
  15. package/dist/handlers/integration.handlers.d.ts.map +1 -0
  16. package/dist/handlers/integration.handlers.js +282 -0
  17. package/dist/handlers/integration.handlers.js.map +1 -0
  18. package/dist/index.d.ts +6 -1
  19. package/dist/index.js +6 -1
  20. package/dist/integration/integration.enum.d.ts +2 -2
  21. package/dist/integration/integration.enum.d.ts.map +1 -1
  22. package/dist/integration/integration.operations.d.ts +25 -25
  23. package/dist/integration/integration.operations.d.ts.map +1 -1
  24. package/dist/integration/integration.presentation.d.ts +4 -4
  25. package/dist/integration/integration.presentation.d.ts.map +1 -1
  26. package/dist/integration/integration.presentation.js +7 -7
  27. package/dist/integration/integration.presentation.js.map +1 -1
  28. package/dist/integration/integration.schema.d.ts +16 -16
  29. package/dist/integration/integration.schema.d.ts.map +1 -1
  30. package/dist/integration-hub.capability.d.ts +9 -0
  31. package/dist/integration-hub.capability.d.ts.map +1 -0
  32. package/dist/integration-hub.capability.js +38 -0
  33. package/dist/integration-hub.capability.js.map +1 -0
  34. package/dist/integration-hub.feature.d.ts +2 -3
  35. package/dist/integration-hub.feature.d.ts.map +1 -1
  36. package/dist/integration-hub.feature.js +7 -2
  37. package/dist/integration-hub.feature.js.map +1 -1
  38. package/dist/seeders/index.d.ts +10 -0
  39. package/dist/seeders/index.d.ts.map +1 -0
  40. package/dist/seeders/index.js +19 -0
  41. package/dist/seeders/index.js.map +1 -0
  42. package/dist/sync/sync.enum.d.ts +4 -4
  43. package/dist/sync/sync.operations.d.ts +126 -126
  44. package/dist/sync/sync.presentation.d.ts +7 -7
  45. package/dist/sync/sync.presentation.d.ts.map +1 -1
  46. package/dist/sync/sync.presentation.js +13 -13
  47. package/dist/sync/sync.presentation.js.map +1 -1
  48. package/dist/sync/sync.schema.d.ts +85 -85
  49. package/dist/sync/sync.schema.d.ts.map +1 -1
  50. package/dist/sync-engine/index.js.map +1 -1
  51. package/dist/tests/operations.test-spec.d.ts +9 -0
  52. package/dist/tests/operations.test-spec.d.ts.map +1 -0
  53. package/dist/tests/operations.test-spec.js +94 -0
  54. package/dist/tests/operations.test-spec.js.map +1 -0
  55. package/dist/ui/IntegrationDashboard.d.ts +7 -0
  56. package/dist/ui/IntegrationDashboard.d.ts.map +1 -0
  57. package/dist/ui/IntegrationDashboard.js +266 -0
  58. package/dist/ui/IntegrationDashboard.js.map +1 -0
  59. package/dist/ui/hooks/index.d.ts +2 -0
  60. package/dist/ui/hooks/index.js +5 -0
  61. package/dist/ui/hooks/useIntegrationData.d.ts +23 -0
  62. package/dist/ui/hooks/useIntegrationData.d.ts.map +1 -0
  63. package/dist/ui/hooks/useIntegrationData.js +59 -0
  64. package/dist/ui/hooks/useIntegrationData.js.map +1 -0
  65. package/dist/ui/index.d.ts +6 -0
  66. package/dist/ui/index.js +6 -0
  67. package/dist/ui/renderers/index.d.ts +2 -0
  68. package/dist/ui/renderers/index.js +3 -0
  69. package/dist/ui/renderers/integration.markdown.d.ts +28 -0
  70. package/dist/ui/renderers/integration.markdown.d.ts.map +1 -0
  71. package/dist/ui/renderers/integration.markdown.js +256 -0
  72. package/dist/ui/renderers/integration.markdown.js.map +1 -0
  73. package/package.json +24 -8
@@ -0,0 +1 @@
1
+ {"version":3,"file":"integration.handlers.js","names":[],"sources":["../../src/handlers/integration.handlers.ts"],"sourcesContent":["/**\n * Runtime-local Integration Hub handlers\n *\n * Database-backed handlers for the integration-hub template.\n */\nimport type { DatabasePort, DbRow } from '@contractspec/lib.runtime-sandbox';\n/* eslint-disable @typescript-eslint/no-non-null-assertion */\nimport { web } from '@contractspec/lib.runtime-sandbox';\nconst { generateId } = web;\n\n// ============ Types ============\n\nexport interface Integration {\n id: string;\n projectId: string;\n organizationId: string;\n name: string;\n description?: string;\n type: 'CRM' | 'MARKETING' | 'PAYMENT' | 'COMMUNICATION' | 'DATA' | 'CUSTOM';\n status: 'ACTIVE' | 'INACTIVE';\n iconUrl?: string;\n createdAt: Date;\n updatedAt: Date;\n}\n\nexport interface Connection {\n id: string;\n integrationId: string;\n name: string;\n status: 'CONNECTED' | 'DISCONNECTED' | 'ERROR' | 'PENDING';\n credentials?: Record<string, unknown>;\n config?: Record<string, unknown>;\n lastSyncAt?: Date;\n errorMessage?: string;\n createdAt: Date;\n updatedAt: Date;\n}\n\nexport interface SyncConfig {\n id: string;\n connectionId: string;\n name: string;\n sourceEntity: string;\n targetEntity: string;\n frequency: 'REALTIME' | 'HOURLY' | 'DAILY' | 'WEEKLY' | 'MANUAL';\n status: 'ACTIVE' | 'PAUSED' | 'ERROR';\n lastRunAt?: Date;\n lastRunStatus?: 'SUCCESS' | 'FAILED' | 'PARTIAL';\n recordsSynced: number;\n createdAt: Date;\n updatedAt: Date;\n}\n\nexport interface FieldMapping {\n id: string;\n syncConfigId: string;\n sourceField: string;\n targetField: string;\n transformType?: 'DIRECT' | 'FORMAT' | 'LOOKUP' | 'CUSTOM';\n transformConfig?: Record<string, unknown>;\n createdAt: Date;\n}\n\nexport interface CreateIntegrationInput {\n name: string;\n description?: string;\n type: Integration['type'];\n iconUrl?: string;\n}\n\nexport interface ConnectServiceInput {\n integrationId: string;\n name: string;\n credentials?: Record<string, unknown>;\n config?: Record<string, unknown>;\n}\n\nexport interface ConfigureSyncInput {\n connectionId: string;\n name: string;\n sourceEntity: string;\n targetEntity: string;\n frequency?: SyncConfig['frequency'];\n}\n\nexport interface MapFieldsInput {\n syncConfigId: string;\n mappings: {\n sourceField: string;\n targetField: string;\n transformType?: FieldMapping['transformType'];\n transformConfig?: Record<string, unknown>;\n }[];\n}\n\nexport interface ListIntegrationsInput {\n projectId: string;\n type?: Integration['type'] | 'all';\n status?: 'ACTIVE' | 'INACTIVE' | 'all';\n search?: string;\n limit?: number;\n offset?: number;\n}\n\nexport interface ListIntegrationsOutput {\n integrations: Integration[];\n total: number;\n}\n\nexport interface ListConnectionsInput {\n integrationId?: string;\n status?: Connection['status'] | 'all';\n limit?: number;\n offset?: number;\n}\n\nexport interface ListConnectionsOutput {\n connections: Connection[];\n total: number;\n}\n\nexport interface ListSyncConfigsInput {\n connectionId?: string;\n status?: SyncConfig['status'] | 'all';\n limit?: number;\n offset?: number;\n}\n\nexport interface ListSyncConfigsOutput {\n configs: SyncConfig[];\n total: number;\n}\n\n// ============ Row Types ============\n\ninterface IntegrationRow {\n id: string;\n projectId: string;\n organizationId: string;\n name: string;\n description: string | null;\n type: string;\n status: string;\n iconUrl: string | null;\n createdAt: string;\n updatedAt: string;\n}\n\ninterface ConnectionRow {\n id: string;\n integrationId: string;\n name: string;\n status: string;\n credentials: string | null;\n config: string | null;\n lastSyncAt: string | null;\n errorMessage: string | null;\n createdAt: string;\n updatedAt: string;\n}\n\ninterface SyncConfigRow {\n id: string;\n connectionId: string;\n name: string;\n sourceEntity: string;\n targetEntity: string;\n frequency: string;\n status: string;\n lastRunAt: string | null;\n lastRunStatus: string | null;\n recordsSynced: number;\n createdAt: string;\n updatedAt: string;\n}\n\ninterface FieldMappingRow {\n id: string;\n syncConfigId: string;\n sourceField: string;\n targetField: string;\n transformType: string | null;\n transformConfig: string | null;\n createdAt: string;\n}\n\nfunction rowToIntegration(row: IntegrationRow): Integration {\n return {\n id: row.id,\n projectId: row.projectId,\n organizationId: row.organizationId,\n name: row.name,\n description: row.description ?? undefined,\n type: row.type as Integration['type'],\n status: row.status as Integration['status'],\n iconUrl: row.iconUrl ?? undefined,\n createdAt: new Date(row.createdAt),\n updatedAt: new Date(row.updatedAt),\n };\n}\n\nfunction rowToConnection(row: ConnectionRow): Connection {\n return {\n id: row.id,\n integrationId: row.integrationId,\n name: row.name,\n status: row.status as Connection['status'],\n credentials: row.credentials ? JSON.parse(row.credentials) : undefined,\n config: row.config ? JSON.parse(row.config) : undefined,\n lastSyncAt: row.lastSyncAt ? new Date(row.lastSyncAt) : undefined,\n errorMessage: row.errorMessage ?? undefined,\n createdAt: new Date(row.createdAt),\n updatedAt: new Date(row.updatedAt),\n };\n}\n\nfunction rowToSyncConfig(row: SyncConfigRow): SyncConfig {\n return {\n id: row.id,\n connectionId: row.connectionId,\n name: row.name,\n sourceEntity: row.sourceEntity,\n targetEntity: row.targetEntity,\n frequency: row.frequency as SyncConfig['frequency'],\n status: row.status as SyncConfig['status'],\n lastRunAt: row.lastRunAt ? new Date(row.lastRunAt) : undefined,\n lastRunStatus:\n (row.lastRunStatus as SyncConfig['lastRunStatus']) ?? undefined,\n recordsSynced: row.recordsSynced,\n createdAt: new Date(row.createdAt),\n updatedAt: new Date(row.updatedAt),\n };\n}\n\nfunction rowToFieldMapping(row: FieldMappingRow): FieldMapping {\n return {\n id: row.id,\n syncConfigId: row.syncConfigId,\n sourceField: row.sourceField,\n targetField: row.targetField,\n transformType:\n (row.transformType as FieldMapping['transformType']) ?? undefined,\n transformConfig: row.transformConfig\n ? JSON.parse(row.transformConfig)\n : undefined,\n createdAt: new Date(row.createdAt),\n };\n}\n\n// ============ Handler Factory ============\n\nexport function createIntegrationHandlers(db: DatabasePort) {\n /**\n * List integrations\n */\n async function listIntegrations(\n input: ListIntegrationsInput\n ): Promise<ListIntegrationsOutput> {\n const { projectId, type, status, search, limit = 20, offset = 0 } = input;\n\n let whereClause = 'WHERE projectId = ?';\n const params: (string | number)[] = [projectId];\n\n if (type && type !== 'all') {\n whereClause += ' AND type = ?';\n params.push(type);\n }\n\n if (status && status !== 'all') {\n whereClause += ' AND status = ?';\n params.push(status);\n }\n\n if (search) {\n whereClause += ' AND name LIKE ?';\n params.push(`%${search}%`);\n }\n\n const countResult = (\n await db.query(\n `SELECT COUNT(*) as count FROM integration ${whereClause}`,\n params\n )\n ).rows as DbRow[];\n const total = (countResult[0]?.count as number) ?? 0;\n\n const rows = (\n await db.query(\n `SELECT * FROM integration ${whereClause} ORDER BY name LIMIT ? OFFSET ?`,\n [...params, limit, offset]\n )\n ).rows as unknown as IntegrationRow[];\n\n return {\n integrations: rows.map(rowToIntegration),\n total,\n };\n }\n\n /**\n * Create an integration\n */\n async function createIntegration(\n input: CreateIntegrationInput,\n context: { projectId: string; organizationId: string }\n ): Promise<Integration> {\n const id = generateId('integ');\n const now = new Date().toISOString();\n\n await db.execute(\n `INSERT INTO integration (id, projectId, organizationId, name, description, type, status, iconUrl, createdAt, updatedAt)\n VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)`,\n [\n id,\n context.projectId,\n context.organizationId,\n input.name,\n input.description ?? null,\n input.type,\n 'INACTIVE',\n input.iconUrl ?? null,\n now,\n now,\n ]\n );\n\n const rows = (\n await db.query(`SELECT * FROM integration WHERE id = ?`, [id])\n ).rows as unknown as IntegrationRow[];\n\n return rowToIntegration(rows[0]!);\n }\n\n /**\n * List connections\n */\n async function listConnections(\n input: ListConnectionsInput\n ): Promise<ListConnectionsOutput> {\n const { integrationId, status, limit = 20, offset = 0 } = input;\n\n let whereClause = 'WHERE 1=1';\n const params: (string | number)[] = [];\n\n if (integrationId) {\n whereClause += ' AND integrationId = ?';\n params.push(integrationId);\n }\n\n if (status && status !== 'all') {\n whereClause += ' AND status = ?';\n params.push(status);\n }\n\n const countResult = (\n await db.query(\n `SELECT COUNT(*) as count FROM integration_connection ${whereClause}`,\n params\n )\n ).rows as DbRow[];\n const total = (countResult[0]?.count as number) ?? 0;\n\n const rows = (\n await db.query(\n `SELECT * FROM integration_connection ${whereClause} ORDER BY updatedAt DESC LIMIT ? OFFSET ?`,\n [...params, limit, offset]\n )\n ).rows as unknown as ConnectionRow[];\n\n return {\n connections: rows.map(rowToConnection),\n total,\n };\n }\n\n /**\n * Connect a service\n */\n async function connectService(\n input: ConnectServiceInput\n ): Promise<Connection> {\n const id = generateId('conn');\n const now = new Date().toISOString();\n\n await db.execute(\n `INSERT INTO integration_connection (id, integrationId, name, status, credentials, config, createdAt, updatedAt)\n VALUES (?, ?, ?, ?, ?, ?, ?, ?)`,\n [\n id,\n input.integrationId,\n input.name,\n 'PENDING',\n input.credentials ? JSON.stringify(input.credentials) : null,\n input.config ? JSON.stringify(input.config) : null,\n now,\n now,\n ]\n );\n\n // Simulate connection success\n await db.execute(\n `UPDATE integration_connection SET status = 'CONNECTED', updatedAt = ? WHERE id = ?`,\n [now, id]\n );\n\n // Activate integration\n await db.execute(\n `UPDATE integration SET status = 'ACTIVE', updatedAt = ? WHERE id = ?`,\n [now, input.integrationId]\n );\n\n const rows = (\n await db.query(`SELECT * FROM integration_connection WHERE id = ?`, [id])\n ).rows as unknown as ConnectionRow[];\n\n return rowToConnection(rows[0]!);\n }\n\n /**\n * Disconnect a service\n */\n async function disconnectService(connectionId: string): Promise<Connection> {\n const now = new Date().toISOString();\n\n await db.execute(\n `UPDATE integration_connection SET status = 'DISCONNECTED', updatedAt = ? WHERE id = ?`,\n [now, connectionId]\n );\n\n const rows = (\n await db.query(`SELECT * FROM integration_connection WHERE id = ?`, [\n connectionId,\n ])\n ).rows as unknown as ConnectionRow[];\n\n return rowToConnection(rows[0]!);\n }\n\n /**\n * List sync configs\n */\n async function listSyncConfigs(\n input: ListSyncConfigsInput\n ): Promise<ListSyncConfigsOutput> {\n const { connectionId, status, limit = 20, offset = 0 } = input;\n\n let whereClause = 'WHERE 1=1';\n const params: (string | number)[] = [];\n\n if (connectionId) {\n whereClause += ' AND connectionId = ?';\n params.push(connectionId);\n }\n\n if (status && status !== 'all') {\n whereClause += ' AND status = ?';\n params.push(status);\n }\n\n const countResult = (\n await db.query(\n `SELECT COUNT(*) as count FROM integration_sync_config ${whereClause}`,\n params\n )\n ).rows as DbRow[];\n const total = (countResult[0]?.count as number) ?? 0;\n\n const rows = (\n await db.query(\n `SELECT * FROM integration_sync_config ${whereClause} ORDER BY updatedAt DESC LIMIT ? OFFSET ?`,\n [...params, limit, offset]\n )\n ).rows as unknown as SyncConfigRow[];\n\n return {\n configs: rows.map(rowToSyncConfig),\n total,\n };\n }\n\n /**\n * Configure a sync\n */\n async function configureSync(input: ConfigureSyncInput): Promise<SyncConfig> {\n const id = generateId('sync');\n const now = new Date().toISOString();\n\n await db.execute(\n `INSERT INTO integration_sync_config (id, connectionId, name, sourceEntity, targetEntity, frequency, status, recordsSynced, createdAt, updatedAt)\n VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)`,\n [\n id,\n input.connectionId,\n input.name,\n input.sourceEntity,\n input.targetEntity,\n input.frequency ?? 'DAILY',\n 'ACTIVE',\n 0,\n now,\n now,\n ]\n );\n\n const rows = (\n await db.query(`SELECT * FROM integration_sync_config WHERE id = ?`, [id])\n ).rows as unknown as SyncConfigRow[];\n\n return rowToSyncConfig(rows[0]!);\n }\n\n /**\n * Map fields for a sync\n */\n async function mapFields(input: MapFieldsInput): Promise<FieldMapping[]> {\n const now = new Date().toISOString();\n const mappings: FieldMapping[] = [];\n\n // Clear existing mappings\n await db.execute(\n `DELETE FROM integration_field_mapping WHERE syncConfigId = ?`,\n [input.syncConfigId]\n );\n\n for (const mapping of input.mappings) {\n const id = generateId('fmap');\n\n await db.execute(\n `INSERT INTO integration_field_mapping (id, syncConfigId, sourceField, targetField, transformType, transformConfig, createdAt)\n VALUES (?, ?, ?, ?, ?, ?, ?)`,\n [\n id,\n input.syncConfigId,\n mapping.sourceField,\n mapping.targetField,\n mapping.transformType ?? null,\n mapping.transformConfig\n ? JSON.stringify(mapping.transformConfig)\n : null,\n now,\n ]\n );\n\n const rows = (\n await db.query(`SELECT * FROM integration_field_mapping WHERE id = ?`, [\n id,\n ])\n ).rows as unknown as FieldMappingRow[];\n\n mappings.push(rowToFieldMapping(rows[0]!));\n }\n\n return mappings;\n }\n\n /**\n * Get field mappings for a sync config\n */\n async function getFieldMappings(\n syncConfigId: string\n ): Promise<FieldMapping[]> {\n const rows = (\n await db.query(\n `SELECT * FROM integration_field_mapping WHERE syncConfigId = ?`,\n [syncConfigId]\n )\n ).rows as unknown as FieldMappingRow[];\n\n return rows.map(rowToFieldMapping);\n }\n\n /**\n * Run a sync (simulated)\n */\n async function runSync(syncConfigId: string): Promise<SyncConfig> {\n const now = new Date().toISOString();\n\n // Simulate sync execution\n const recordsSynced = Math.floor(Math.random() * 1000) + 50;\n\n await db.execute(\n `UPDATE integration_sync_config SET lastRunAt = ?, lastRunStatus = 'SUCCESS', recordsSynced = recordsSynced + ?, updatedAt = ? WHERE id = ?`,\n [now, recordsSynced, now, syncConfigId]\n );\n\n // Update connection lastSyncAt\n const config = (\n await db.query(`SELECT * FROM integration_sync_config WHERE id = ?`, [\n syncConfigId,\n ])\n ).rows as unknown as SyncConfigRow[];\n\n if (config[0]) {\n await db.execute(\n `UPDATE integration_connection SET lastSyncAt = ?, updatedAt = ? WHERE id = ?`,\n [now, now, config[0].connectionId]\n );\n }\n\n const rows = (\n await db.query(`SELECT * FROM integration_sync_config WHERE id = ?`, [\n syncConfigId,\n ])\n ).rows as unknown as SyncConfigRow[];\n\n return rowToSyncConfig(rows[0]!);\n }\n\n return {\n listIntegrations,\n createIntegration,\n listConnections,\n connectService,\n disconnectService,\n listSyncConfigs,\n configureSync,\n mapFields,\n getFieldMappings,\n runSync,\n };\n}\n\nexport type IntegrationHandlers = ReturnType<typeof createIntegrationHandlers>;\n"],"mappings":";;;AAQA,MAAM,EAAE,eAAe;AAkLvB,SAAS,iBAAiB,KAAkC;AAC1D,QAAO;EACL,IAAI,IAAI;EACR,WAAW,IAAI;EACf,gBAAgB,IAAI;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M,UACJ,MAAM,GAAG,MAAM,sDAAsD,CACnE,aACD,CAAC,EACF;AAEF,MAAI,OAAO,GACT,OAAM,GAAG,QACP,gFACA;GAAC;GAAK;GAAK,OAAO,GAAG;GAAa,CACnC;EAGH,MAAM,QACJ,MAAM,GAAG,MAAM,sDAAsD,CACnE,aACD,CAAC,EACF;AAEF,SAAO,gBAAgB,KAAK,GAAI;;AAGlC,QAAO;EACL;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACD"}
package/dist/index.d.ts CHANGED
@@ -2,6 +2,7 @@ import { ConnectionStatusEnum } from "./connection/connection.enum.js";
2
2
  import { CreateConnectionContract } from "./connection/connection.operation.js";
3
3
  import { ConnectionModel, CreateConnectionInputModel } from "./connection/connection.schema.js";
4
4
  import "./connection/index.js";
5
+ import { IntegrationHandlers, createIntegrationHandlers } from "./handlers/integration.handlers.js";
5
6
  import { IntegrationStatusEnum } from "./integration/integration.enum.js";
6
7
  import { CreateIntegrationInputModel, IntegrationModel } from "./integration/integration.schema.js";
7
8
  import { CreateIntegrationContract } from "./integration/integration.operations.js";
@@ -10,5 +11,9 @@ import { MappingTypeEnum, SyncDirectionEnum, SyncStatusEnum } from "./sync/sync.
10
11
  import { AddFieldMappingInputModel, CreateSyncConfigInputModel, FieldMappingModel, ListSyncRunsInputModel, ListSyncRunsOutputModel, SyncConfigModel, SyncRunModel, TriggerSyncInputModel } from "./sync/sync.schema.js";
11
12
  import { AddFieldMappingContract, CreateSyncConfigContract, ListSyncRunsContract, TriggerSyncContract } from "./sync/sync.operations.js";
12
13
  import "./sync/index.js";
14
+ import { connectionListMarkdownRenderer, integrationDashboardMarkdownRenderer, syncConfigMarkdownRenderer } from "./ui/renderers/integration.markdown.js";
15
+ import { IntegrationDashboard } from "./ui/IntegrationDashboard.js";
16
+ import { IntegrationStats, useIntegrationData } from "./ui/hooks/useIntegrationData.js";
17
+ import "./ui/index.js";
13
18
  import { BasicFieldTransformer, BasicSyncEngine, FieldMapping, IFieldTransformer, ISyncEngine, LookupConfig, SourceRecord, SyncConfig, SyncContext, SyncError, SyncResult, TargetRecord, computeChecksum, createSyncEngine, hasChanges } from "./sync-engine/index.js";
14
- export { AddFieldMappingContract, AddFieldMappingInputModel, BasicFieldTransformer, BasicSyncEngine, ConnectionModel, ConnectionStatusEnum, CreateConnectionContract, CreateConnectionInputModel, CreateIntegrationContract, CreateIntegrationInputModel, CreateSyncConfigContract, CreateSyncConfigInputModel, FieldMapping, FieldMappingModel, IFieldTransformer, ISyncEngine, IntegrationModel, IntegrationStatusEnum, ListSyncRunsContract, ListSyncRunsInputModel, ListSyncRunsOutputModel, LookupConfig, MappingTypeEnum, SourceRecord, SyncConfig, SyncConfigModel, SyncContext, SyncDirectionEnum, SyncError, SyncResult, SyncRunModel, SyncStatusEnum, TargetRecord, TriggerSyncContract, TriggerSyncInputModel, computeChecksum, createSyncEngine, hasChanges };
19
+ export { AddFieldMappingContract, AddFieldMappingInputModel, BasicFieldTransformer, BasicSyncEngine, ConnectionModel, ConnectionStatusEnum, CreateConnectionContract, CreateConnectionInputModel, CreateIntegrationContract, CreateIntegrationInputModel, CreateSyncConfigContract, CreateSyncConfigInputModel, FieldMapping, FieldMappingModel, IFieldTransformer, ISyncEngine, IntegrationDashboard, type IntegrationHandlers, IntegrationModel, IntegrationStats, IntegrationStatusEnum, ListSyncRunsContract, ListSyncRunsInputModel, ListSyncRunsOutputModel, LookupConfig, MappingTypeEnum, SourceRecord, SyncConfig, SyncConfigModel, SyncContext, SyncDirectionEnum, SyncError, SyncResult, SyncRunModel, SyncStatusEnum, TargetRecord, TriggerSyncContract, TriggerSyncInputModel, computeChecksum, connectionListMarkdownRenderer, createIntegrationHandlers, createSyncEngine, hasChanges, integrationDashboardMarkdownRenderer, syncConfigMarkdownRenderer, useIntegrationData };
package/dist/index.js CHANGED
@@ -10,6 +10,11 @@ import { MappingTypeEnum, SyncDirectionEnum, SyncStatusEnum } from "./sync/sync.
10
10
  import { AddFieldMappingInputModel, CreateSyncConfigInputModel, FieldMappingModel, ListSyncRunsInputModel, ListSyncRunsOutputModel, SyncConfigModel, SyncRunModel, TriggerSyncInputModel } from "./sync/sync.schema.js";
11
11
  import { AddFieldMappingContract, CreateSyncConfigContract, ListSyncRunsContract, TriggerSyncContract } from "./sync/sync.operations.js";
12
12
  import "./sync/index.js";
13
+ import { createIntegrationHandlers } from "./handlers/integration.handlers.js";
14
+ import { connectionListMarkdownRenderer, integrationDashboardMarkdownRenderer, syncConfigMarkdownRenderer } from "./ui/renderers/integration.markdown.js";
15
+ import { useIntegrationData } from "./ui/hooks/useIntegrationData.js";
16
+ import { IntegrationDashboard } from "./ui/IntegrationDashboard.js";
17
+ import "./ui/index.js";
13
18
  import { BasicFieldTransformer, BasicSyncEngine, computeChecksum, createSyncEngine, hasChanges } from "./sync-engine/index.js";
14
19
 
15
- export { AddFieldMappingContract, AddFieldMappingInputModel, BasicFieldTransformer, BasicSyncEngine, ConnectionModel, ConnectionStatusEnum, CreateConnectionContract, CreateConnectionInputModel, CreateIntegrationContract, CreateIntegrationInputModel, CreateSyncConfigContract, CreateSyncConfigInputModel, FieldMappingModel, IntegrationModel, IntegrationStatusEnum, ListSyncRunsContract, ListSyncRunsInputModel, ListSyncRunsOutputModel, MappingTypeEnum, SyncConfigModel, SyncDirectionEnum, SyncRunModel, SyncStatusEnum, TriggerSyncContract, TriggerSyncInputModel, computeChecksum, createSyncEngine, hasChanges };
20
+ export { AddFieldMappingContract, AddFieldMappingInputModel, BasicFieldTransformer, BasicSyncEngine, ConnectionModel, ConnectionStatusEnum, CreateConnectionContract, CreateConnectionInputModel, CreateIntegrationContract, CreateIntegrationInputModel, CreateSyncConfigContract, CreateSyncConfigInputModel, FieldMappingModel, IntegrationDashboard, IntegrationModel, IntegrationStatusEnum, ListSyncRunsContract, ListSyncRunsInputModel, ListSyncRunsOutputModel, MappingTypeEnum, SyncConfigModel, SyncDirectionEnum, SyncRunModel, SyncStatusEnum, TriggerSyncContract, TriggerSyncInputModel, computeChecksum, connectionListMarkdownRenderer, createIntegrationHandlers, createSyncEngine, hasChanges, integrationDashboardMarkdownRenderer, syncConfigMarkdownRenderer, useIntegrationData };
@@ -1,10 +1,10 @@
1
- import * as _contractspec_lib_schema81 from "@contractspec/lib.schema";
1
+ import * as _contractspec_lib_schema165 from "@contractspec/lib.schema";
2
2
 
3
3
  //#region src/integration/integration.enum.d.ts
4
4
  /**
5
5
  * Integration status enum.
6
6
  */
7
- declare const IntegrationStatusEnum: _contractspec_lib_schema81.EnumType<[string, string, string, string, string]>;
7
+ declare const IntegrationStatusEnum: _contractspec_lib_schema165.EnumType<[string, string, string, string, string]>;
8
8
  //#endregion
9
9
  export { IntegrationStatusEnum };
10
10
  //# sourceMappingURL=integration.enum.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"integration.enum.d.ts","names":[],"sources":["../../src/integration/integration.enum.ts"],"sourcesContent":[],"mappings":";;;;;;AAKa,cAAA,qBAMX,EAAA,0BAAA,CANgC,QAAA,CAAA,CAAA,MAAA,EAAA,MAAA,EAAA,MAAA,EAAA,MAAA,EAAA,MAAA,CAAA,CAAA"}
1
+ {"version":3,"file":"integration.enum.d.ts","names":[],"sources":["../../src/integration/integration.enum.ts"],"sourcesContent":[],"mappings":";;;;;;AAKa,cAAA,qBAMX,EAAA,2BAAA,CANgC,QAAA,CAAA,CAAA,MAAA,EAAA,MAAA,EAAA,MAAA,EAAA,MAAA,EAAA,MAAA,CAAA,CAAA"}
@@ -1,95 +1,95 @@
1
- import * as _contractspec_lib_contracts9 from "@contractspec/lib.contracts";
2
- import * as _contractspec_lib_schema97 from "@contractspec/lib.schema";
1
+ import * as _contractspec_lib_contracts25 from "@contractspec/lib.contracts";
2
+ import * as _contractspec_lib_schema184 from "@contractspec/lib.schema";
3
3
 
4
4
  //#region src/integration/integration.operations.d.ts
5
5
  /**
6
6
  * Create a new integration.
7
7
  */
8
- declare const CreateIntegrationContract: _contractspec_lib_contracts9.OperationSpec<_contractspec_lib_schema97.SchemaModel<{
8
+ declare const CreateIntegrationContract: _contractspec_lib_contracts25.OperationSpec<_contractspec_lib_schema184.SchemaModel<{
9
9
  name: {
10
- type: _contractspec_lib_schema97.FieldType<string, string>;
10
+ type: _contractspec_lib_schema184.FieldType<string, string>;
11
11
  isOptional: false;
12
12
  };
13
13
  slug: {
14
- type: _contractspec_lib_schema97.FieldType<string, string>;
14
+ type: _contractspec_lib_schema184.FieldType<string, string>;
15
15
  isOptional: false;
16
16
  };
17
17
  description: {
18
- type: _contractspec_lib_schema97.FieldType<string, string>;
18
+ type: _contractspec_lib_schema184.FieldType<string, string>;
19
19
  isOptional: true;
20
20
  };
21
21
  provider: {
22
- type: _contractspec_lib_schema97.FieldType<string, string>;
22
+ type: _contractspec_lib_schema184.FieldType<string, string>;
23
23
  isOptional: false;
24
24
  };
25
25
  config: {
26
- type: _contractspec_lib_schema97.FieldType<unknown, unknown>;
26
+ type: _contractspec_lib_schema184.FieldType<unknown, unknown>;
27
27
  isOptional: true;
28
28
  };
29
29
  featureFlagKey: {
30
- type: _contractspec_lib_schema97.FieldType<string, string>;
30
+ type: _contractspec_lib_schema184.FieldType<string, string>;
31
31
  isOptional: true;
32
32
  };
33
- }>, _contractspec_lib_schema97.SchemaModel<{
33
+ }>, _contractspec_lib_schema184.SchemaModel<{
34
34
  id: {
35
- type: _contractspec_lib_schema97.FieldType<string, string>;
35
+ type: _contractspec_lib_schema184.FieldType<string, string>;
36
36
  isOptional: false;
37
37
  };
38
38
  name: {
39
- type: _contractspec_lib_schema97.FieldType<string, string>;
39
+ type: _contractspec_lib_schema184.FieldType<string, string>;
40
40
  isOptional: false;
41
41
  };
42
42
  slug: {
43
- type: _contractspec_lib_schema97.FieldType<string, string>;
43
+ type: _contractspec_lib_schema184.FieldType<string, string>;
44
44
  isOptional: false;
45
45
  };
46
46
  description: {
47
- type: _contractspec_lib_schema97.FieldType<string, string>;
47
+ type: _contractspec_lib_schema184.FieldType<string, string>;
48
48
  isOptional: true;
49
49
  };
50
50
  provider: {
51
- type: _contractspec_lib_schema97.FieldType<string, string>;
51
+ type: _contractspec_lib_schema184.FieldType<string, string>;
52
52
  isOptional: false;
53
53
  };
54
54
  status: {
55
- type: _contractspec_lib_schema97.EnumType<[string, string, string, string, string]>;
55
+ type: _contractspec_lib_schema184.EnumType<[string, string, string, string, string]>;
56
56
  isOptional: false;
57
57
  };
58
58
  createdAt: {
59
- type: _contractspec_lib_schema97.FieldType<Date, string>;
59
+ type: _contractspec_lib_schema184.FieldType<Date, string>;
60
60
  isOptional: false;
61
61
  };
62
62
  }>, {
63
63
  key: string;
64
64
  version: string;
65
65
  when: string;
66
- payload: _contractspec_lib_schema97.SchemaModel<{
66
+ payload: _contractspec_lib_schema184.SchemaModel<{
67
67
  id: {
68
- type: _contractspec_lib_schema97.FieldType<string, string>;
68
+ type: _contractspec_lib_schema184.FieldType<string, string>;
69
69
  isOptional: false;
70
70
  };
71
71
  name: {
72
- type: _contractspec_lib_schema97.FieldType<string, string>;
72
+ type: _contractspec_lib_schema184.FieldType<string, string>;
73
73
  isOptional: false;
74
74
  };
75
75
  slug: {
76
- type: _contractspec_lib_schema97.FieldType<string, string>;
76
+ type: _contractspec_lib_schema184.FieldType<string, string>;
77
77
  isOptional: false;
78
78
  };
79
79
  description: {
80
- type: _contractspec_lib_schema97.FieldType<string, string>;
80
+ type: _contractspec_lib_schema184.FieldType<string, string>;
81
81
  isOptional: true;
82
82
  };
83
83
  provider: {
84
- type: _contractspec_lib_schema97.FieldType<string, string>;
84
+ type: _contractspec_lib_schema184.FieldType<string, string>;
85
85
  isOptional: false;
86
86
  };
87
87
  status: {
88
- type: _contractspec_lib_schema97.EnumType<[string, string, string, string, string]>;
88
+ type: _contractspec_lib_schema184.EnumType<[string, string, string, string, string]>;
89
89
  isOptional: false;
90
90
  };
91
91
  createdAt: {
92
- type: _contractspec_lib_schema97.FieldType<Date, string>;
92
+ type: _contractspec_lib_schema184.FieldType<Date, string>;
93
93
  isOptional: false;
94
94
  };
95
95
  }>;
@@ -1 +1 @@
1
- {"version":3,"file":"integration.operations.d.ts","names":[],"sources":["../../src/integration/integration.operations.ts"],"sourcesContent":[],"mappings":";;;;;;;cASa,wDAAyB,yCAAA;EAAzB,IAAA,EAAA;IA4CX,IAAA,EAAA,0BAAA,CAAA,SAAA,CAAA,MAAA,EAAA,MAAA,CAAA;;;;;;;EA5CoC,WAAA,EAAA;;;;;;;;;;;;;;;;;;UAAA,0BAAA,CAAA,SAAA,CAAA,MAAA,EAAA,MAAA,CAAA;IAAA,UAAA,EAAA,KAAA"}
1
+ {"version":3,"file":"integration.operations.d.ts","names":[],"sources":["../../src/integration/integration.operations.ts"],"sourcesContent":[],"mappings":";;;;;;;cASa,yDAAyB,0CAAA;EAAzB,IAAA,EAAA;IA4CX,IAAA,EAAA,2BAAA,CAAA,SAAA,CAAA,MAAA,EAAA,MAAA,CAAA;;;;;;;EA5CoC,WAAA,EAAA;;;;;;;;;;;;;;;;;;UAAA,2BAAA,CAAA,SAAA,CAAA,MAAA,EAAA,MAAA,CAAA;IAAA,UAAA,EAAA,KAAA"}
@@ -1,9 +1,9 @@
1
- import { PresentationSpec } from "@contractspec/lib.contracts";
1
+ import * as _contractspec_lib_contracts30 from "@contractspec/lib.contracts";
2
2
 
3
3
  //#region src/integration/integration.presentation.d.ts
4
- declare const IntegrationListPresentation: PresentationSpec;
5
- declare const IntegrationDetailPresentation: PresentationSpec;
6
- declare const IntegrationHealthPresentation: PresentationSpec;
4
+ declare const IntegrationListPresentation: _contractspec_lib_contracts30.PresentationSpec;
5
+ declare const IntegrationDetailPresentation: _contractspec_lib_contracts30.PresentationSpec;
6
+ declare const IntegrationHealthPresentation: _contractspec_lib_contracts30.PresentationSpec;
7
7
  //#endregion
8
8
  export { IntegrationDetailPresentation, IntegrationHealthPresentation, IntegrationListPresentation };
9
9
  //# sourceMappingURL=integration.presentation.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"integration.presentation.d.ts","names":[],"sources":["../../src/integration/integration.presentation.ts"],"sourcesContent":[],"mappings":";;;cAIa,6BAA6B;cAyB7B,+BAA+B;AAzB/B,cAkDA,6BAlD6B,EAkDE,gBA3B3C"}
1
+ {"version":3,"file":"integration.presentation.d.ts","names":[],"sources":["../../src/integration/integration.presentation.ts"],"sourcesContent":[],"mappings":";;;cAGa,6BAuBX,6BAAA,CAvBsC;cAyB3B,+BAuBX,6BAAA,CAvBwC;cAyB7B,+BAsBX,6BAAA,CAtBwC"}
@@ -1,8 +1,8 @@
1
1
  import { IntegrationModel } from "./integration.schema.js";
2
- import { StabilityEnum } from "@contractspec/lib.contracts";
2
+ import { StabilityEnum, definePresentation } from "@contractspec/lib.contracts";
3
3
 
4
4
  //#region src/integration/integration.presentation.ts
5
- const IntegrationListPresentation = {
5
+ const IntegrationListPresentation = definePresentation({
6
6
  meta: {
7
7
  key: "integration.list",
8
8
  version: "1.0.0",
@@ -23,8 +23,8 @@ const IntegrationListPresentation = {
23
23
  },
24
24
  targets: ["react", "markdown"],
25
25
  policy: { flags: ["integration.enabled"] }
26
- };
27
- const IntegrationDetailPresentation = {
26
+ });
27
+ const IntegrationDetailPresentation = definePresentation({
28
28
  meta: {
29
29
  key: "integration.detail",
30
30
  version: "1.0.0",
@@ -45,8 +45,8 @@ const IntegrationDetailPresentation = {
45
45
  },
46
46
  targets: ["react", "markdown"],
47
47
  policy: { flags: ["integration.enabled"] }
48
- };
49
- const IntegrationHealthPresentation = {
48
+ });
49
+ const IntegrationHealthPresentation = definePresentation({
50
50
  meta: {
51
51
  key: "integration.health",
52
52
  version: "1.0.0",
@@ -70,7 +70,7 @@ const IntegrationHealthPresentation = {
70
70
  },
71
71
  targets: ["react", "markdown"],
72
72
  policy: { flags: ["integration.monitoring.enabled"] }
73
- };
73
+ });
74
74
 
75
75
  //#endregion
76
76
  export { IntegrationDetailPresentation, IntegrationHealthPresentation, IntegrationListPresentation };
@@ -1 +1 @@
1
- {"version":3,"file":"integration.presentation.js","names":["IntegrationListPresentation: PresentationSpec","IntegrationDetailPresentation: PresentationSpec","IntegrationHealthPresentation: PresentationSpec"],"sources":["../../src/integration/integration.presentation.ts"],"sourcesContent":["import type { PresentationSpec } from '@contractspec/lib.contracts';\nimport { StabilityEnum } from '@contractspec/lib.contracts';\nimport { IntegrationModel } from './integration.schema';\n\nexport const IntegrationListPresentation: PresentationSpec = {\n meta: {\n key: 'integration.list',\n version: '1.0.0',\n title: 'Integration List',\n description: 'List of available integrations',\n domain: 'integration',\n owners: ['@integration-team'],\n tags: ['integration', 'list'],\n stability: StabilityEnum.Experimental,\n goal: 'Show users available integrations they can connect to.',\n context: 'The marketplace of integrations within the hub.',\n },\n source: {\n type: 'component',\n framework: 'react',\n componentKey: 'IntegrationList',\n props: IntegrationModel,\n },\n targets: ['react', 'markdown'],\n policy: {\n flags: ['integration.enabled'],\n },\n};\n\nexport const IntegrationDetailPresentation: PresentationSpec = {\n meta: {\n key: 'integration.detail',\n version: '1.0.0',\n title: 'Integration Details',\n description: 'Detailed view of an integration',\n domain: 'integration',\n owners: ['@integration-team'],\n tags: ['integration', 'detail'],\n stability: StabilityEnum.Experimental,\n goal: 'Show capabilities and documentation for a specific integration.',\n context: 'Integration showcase and support page.',\n },\n source: {\n type: 'component',\n framework: 'react',\n componentKey: 'IntegrationDetail',\n props: IntegrationModel,\n },\n targets: ['react', 'markdown'],\n policy: {\n flags: ['integration.enabled'],\n },\n};\n\nexport const IntegrationHealthPresentation: PresentationSpec = {\n meta: {\n key: 'integration.health',\n version: '1.0.0',\n title: 'Integration Health',\n description: 'Integration health monitoring dashboard',\n domain: 'integration',\n owners: ['@integration-team'],\n tags: ['integration', 'health', 'monitoring'],\n stability: StabilityEnum.Experimental,\n goal: 'Monitor connectivity and error rates for active integrations.',\n context: 'Operations dashboard for integration hub health.',\n },\n source: {\n type: 'component',\n framework: 'react',\n componentKey: 'IntegrationHealth',\n },\n targets: ['react', 'markdown'],\n policy: {\n flags: ['integration.monitoring.enabled'],\n },\n};\n"],"mappings":";;;;AAIA,MAAaA,8BAAgD;CAC3D,MAAM;EACJ,KAAK;EACL,SAAS;EACT,OAAO;EACP,aAAa;EACb,QAAQ;EACR,QAAQ,CAAC,oBAAoB;EAC7B,MAAM,CAAC,eAAe,OAAO;EAC7B,WAAW,cAAc;EACzB,MAAM;EACN,SAAS;EACV;CACD,QAAQ;EACN,MAAM;EACN,WAAW;EACX,cAAc;EACd,OAAO;EACR;CACD,SAAS,CAAC,SAAS,WAAW;CAC9B,QAAQ,EACN,OAAO,CAAC,sBAAsB,EAC/B;CACF;AAED,MAAaC,gCAAkD;CAC7D,MAAM;EACJ,KAAK;EACL,SAAS;EACT,OAAO;EACP,aAAa;EACb,QAAQ;EACR,QAAQ,CAAC,oBAAoB;EAC7B,MAAM,CAAC,eAAe,SAAS;EAC/B,WAAW,cAAc;EACzB,MAAM;EACN,SAAS;EACV;CACD,QAAQ;EACN,MAAM;EACN,WAAW;EACX,cAAc;EACd,OAAO;EACR;CACD,SAAS,CAAC,SAAS,WAAW;CAC9B,QAAQ,EACN,OAAO,CAAC,sBAAsB,EAC/B;CACF;AAED,MAAaC,gCAAkD;CAC7D,MAAM;EACJ,KAAK;EACL,SAAS;EACT,OAAO;EACP,aAAa;EACb,QAAQ;EACR,QAAQ,CAAC,oBAAoB;EAC7B,MAAM;GAAC;GAAe;GAAU;GAAa;EAC7C,WAAW,cAAc;EACzB,MAAM;EACN,SAAS;EACV;CACD,QAAQ;EACN,MAAM;EACN,WAAW;EACX,cAAc;EACf;CACD,SAAS,CAAC,SAAS,WAAW;CAC9B,QAAQ,EACN,OAAO,CAAC,iCAAiC,EAC1C;CACF"}
1
+ {"version":3,"file":"integration.presentation.js","names":[],"sources":["../../src/integration/integration.presentation.ts"],"sourcesContent":["import { definePresentation, StabilityEnum } from '@contractspec/lib.contracts';\nimport { IntegrationModel } from './integration.schema';\n\nexport const IntegrationListPresentation = definePresentation({\n meta: {\n key: 'integration.list',\n version: '1.0.0',\n title: 'Integration List',\n description: 'List of available integrations',\n domain: 'integration',\n owners: ['@integration-team'],\n tags: ['integration', 'list'],\n stability: StabilityEnum.Experimental,\n goal: 'Show users available integrations they can connect to.',\n context: 'The marketplace of integrations within the hub.',\n },\n source: {\n type: 'component',\n framework: 'react',\n componentKey: 'IntegrationList',\n props: IntegrationModel,\n },\n targets: ['react', 'markdown'],\n policy: {\n flags: ['integration.enabled'],\n },\n});\n\nexport const IntegrationDetailPresentation = definePresentation({\n meta: {\n key: 'integration.detail',\n version: '1.0.0',\n title: 'Integration Details',\n description: 'Detailed view of an integration',\n domain: 'integration',\n owners: ['@integration-team'],\n tags: ['integration', 'detail'],\n stability: StabilityEnum.Experimental,\n goal: 'Show capabilities and documentation for a specific integration.',\n context: 'Integration showcase and support page.',\n },\n source: {\n type: 'component',\n framework: 'react',\n componentKey: 'IntegrationDetail',\n props: IntegrationModel,\n },\n targets: ['react', 'markdown'],\n policy: {\n flags: ['integration.enabled'],\n },\n});\n\nexport const IntegrationHealthPresentation = definePresentation({\n meta: {\n key: 'integration.health',\n version: '1.0.0',\n title: 'Integration Health',\n description: 'Integration health monitoring dashboard',\n domain: 'integration',\n owners: ['@integration-team'],\n tags: ['integration', 'health', 'monitoring'],\n stability: StabilityEnum.Experimental,\n goal: 'Monitor connectivity and error rates for active integrations.',\n context: 'Operations dashboard for integration hub health.',\n },\n source: {\n type: 'component',\n framework: 'react',\n componentKey: 'IntegrationHealth',\n },\n targets: ['react', 'markdown'],\n policy: {\n flags: ['integration.monitoring.enabled'],\n },\n});\n"],"mappings":";;;;AAGA,MAAa,8BAA8B,mBAAmB;CAC5D,MAAM;EACJ,KAAK;EACL,SAAS;EACT,OAAO;EACP,aAAa;EACb,QAAQ;EACR,QAAQ,CAAC,oBAAoB;EAC7B,MAAM,CAAC,eAAe,OAAO;EAC7B,WAAW,cAAc;EACzB,MAAM;EACN,SAAS;EACV;CACD,QAAQ;EACN,MAAM;EACN,WAAW;EACX,cAAc;EACd,OAAO;EACR;CACD,SAAS,CAAC,SAAS,WAAW;CAC9B,QAAQ,EACN,OAAO,CAAC,sBAAsB,EAC/B;CACF,CAAC;AAEF,MAAa,gCAAgC,mBAAmB;CAC9D,MAAM;EACJ,KAAK;EACL,SAAS;EACT,OAAO;EACP,aAAa;EACb,QAAQ;EACR,QAAQ,CAAC,oBAAoB;EAC7B,MAAM,CAAC,eAAe,SAAS;EAC/B,WAAW,cAAc;EACzB,MAAM;EACN,SAAS;EACV;CACD,QAAQ;EACN,MAAM;EACN,WAAW;EACX,cAAc;EACd,OAAO;EACR;CACD,SAAS,CAAC,SAAS,WAAW;CAC9B,QAAQ,EACN,OAAO,CAAC,sBAAsB,EAC/B;CACF,CAAC;AAEF,MAAa,gCAAgC,mBAAmB;CAC9D,MAAM;EACJ,KAAK;EACL,SAAS;EACT,OAAO;EACP,aAAa;EACb,QAAQ;EACR,QAAQ,CAAC,oBAAoB;EAC7B,MAAM;GAAC;GAAe;GAAU;GAAa;EAC7C,WAAW,cAAc;EACzB,MAAM;EACN,SAAS;EACV;CACD,QAAQ;EACN,MAAM;EACN,WAAW;EACX,cAAc;EACf;CACD,SAAS,CAAC,SAAS,WAAW;CAC9B,QAAQ,EACN,OAAO,CAAC,iCAAiC,EAC1C;CACF,CAAC"}
@@ -1,65 +1,65 @@
1
- import * as _contractspec_lib_schema82 from "@contractspec/lib.schema";
1
+ import * as _contractspec_lib_schema166 from "@contractspec/lib.schema";
2
2
 
3
3
  //#region src/integration/integration.schema.d.ts
4
4
  /**
5
5
  * An integration with an external system.
6
6
  */
7
- declare const IntegrationModel: _contractspec_lib_schema82.SchemaModel<{
7
+ declare const IntegrationModel: _contractspec_lib_schema166.SchemaModel<{
8
8
  id: {
9
- type: _contractspec_lib_schema82.FieldType<string, string>;
9
+ type: _contractspec_lib_schema166.FieldType<string, string>;
10
10
  isOptional: false;
11
11
  };
12
12
  name: {
13
- type: _contractspec_lib_schema82.FieldType<string, string>;
13
+ type: _contractspec_lib_schema166.FieldType<string, string>;
14
14
  isOptional: false;
15
15
  };
16
16
  slug: {
17
- type: _contractspec_lib_schema82.FieldType<string, string>;
17
+ type: _contractspec_lib_schema166.FieldType<string, string>;
18
18
  isOptional: false;
19
19
  };
20
20
  description: {
21
- type: _contractspec_lib_schema82.FieldType<string, string>;
21
+ type: _contractspec_lib_schema166.FieldType<string, string>;
22
22
  isOptional: true;
23
23
  };
24
24
  provider: {
25
- type: _contractspec_lib_schema82.FieldType<string, string>;
25
+ type: _contractspec_lib_schema166.FieldType<string, string>;
26
26
  isOptional: false;
27
27
  };
28
28
  status: {
29
- type: _contractspec_lib_schema82.EnumType<[string, string, string, string, string]>;
29
+ type: _contractspec_lib_schema166.EnumType<[string, string, string, string, string]>;
30
30
  isOptional: false;
31
31
  };
32
32
  createdAt: {
33
- type: _contractspec_lib_schema82.FieldType<Date, string>;
33
+ type: _contractspec_lib_schema166.FieldType<Date, string>;
34
34
  isOptional: false;
35
35
  };
36
36
  }>;
37
37
  /**
38
38
  * Input for creating an integration.
39
39
  */
40
- declare const CreateIntegrationInputModel: _contractspec_lib_schema82.SchemaModel<{
40
+ declare const CreateIntegrationInputModel: _contractspec_lib_schema166.SchemaModel<{
41
41
  name: {
42
- type: _contractspec_lib_schema82.FieldType<string, string>;
42
+ type: _contractspec_lib_schema166.FieldType<string, string>;
43
43
  isOptional: false;
44
44
  };
45
45
  slug: {
46
- type: _contractspec_lib_schema82.FieldType<string, string>;
46
+ type: _contractspec_lib_schema166.FieldType<string, string>;
47
47
  isOptional: false;
48
48
  };
49
49
  description: {
50
- type: _contractspec_lib_schema82.FieldType<string, string>;
50
+ type: _contractspec_lib_schema166.FieldType<string, string>;
51
51
  isOptional: true;
52
52
  };
53
53
  provider: {
54
- type: _contractspec_lib_schema82.FieldType<string, string>;
54
+ type: _contractspec_lib_schema166.FieldType<string, string>;
55
55
  isOptional: false;
56
56
  };
57
57
  config: {
58
- type: _contractspec_lib_schema82.FieldType<unknown, unknown>;
58
+ type: _contractspec_lib_schema166.FieldType<unknown, unknown>;
59
59
  isOptional: true;
60
60
  };
61
61
  featureFlagKey: {
62
- type: _contractspec_lib_schema82.FieldType<string, string>;
62
+ type: _contractspec_lib_schema166.FieldType<string, string>;
63
63
  isOptional: true;
64
64
  };
65
65
  }>;
@@ -1 +1 @@
1
- {"version":3,"file":"integration.schema.d.ts","names":[],"sources":["../../src/integration/integration.schema.ts"],"sourcesContent":[],"mappings":";;;;;;AAMa,cAAA,gBAWX,6BAX2B,WAW3B,CAAA;EAAA,EAAA,EAAA;UAAA,0BAAA,CAAA;;;;;;;;IAX2B,IAAA,sCAAA,CAAA,MAAA,EAAA,MAAA,CAAA;IAgBhB,UAAA,EAAA,KAAA;EAaX,CAAA;;;;;;8CAbsC,CAAA,MAAA,EAAA,MAAA,CAAA;IAAA,UAAA,EAAA,KAAA;;;;;;;;;;;;;;cAA3B,wDAA2B;;UAatC,0BAAA,CAAA"}
1
+ {"version":3,"file":"integration.schema.d.ts","names":[],"sources":["../../src/integration/integration.schema.ts"],"sourcesContent":[],"mappings":";;;;;;AAMa,cAAA,gBAWX,8BAX2B,WAW3B,CAAA;EAAA,EAAA,EAAA;UAAA,2BAAA,CAAA;;;;;;;;IAX2B,IAAA,uCAAA,CAAA,MAAA,EAAA,MAAA,CAAA;IAgBhB,UAAA,EAAA,KAAA;EAaX,CAAA;;;;;;+CAbsC,CAAA,MAAA,EAAA,MAAA,CAAA;IAAA,UAAA,EAAA,KAAA;;;;;;;;;;;;;;cAA3B,yDAA2B;;UAatC,2BAAA,CAAA"}
@@ -0,0 +1,9 @@
1
+ import * as _contractspec_lib_contracts11 from "@contractspec/lib.contracts";
2
+
3
+ //#region src/integration-hub.capability.d.ts
4
+ declare const IntegrationCapability: _contractspec_lib_contracts11.CapabilitySpec;
5
+ declare const SyncCapability: _contractspec_lib_contracts11.CapabilitySpec;
6
+ declare const EtlCapability: _contractspec_lib_contracts11.CapabilitySpec;
7
+ //#endregion
8
+ export { EtlCapability, IntegrationCapability, SyncCapability };
9
+ //# sourceMappingURL=integration-hub.capability.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"integration-hub.capability.d.ts","names":[],"sources":["../src/integration-hub.capability.ts"],"sourcesContent":[],"mappings":";;;cAEa,uBAUX,6BAAA,CAVgC;cAYrB,gBAUX,6BAAA,CAVyB;cAYd,eAUX,6BAAA,CAVwB"}
@@ -0,0 +1,38 @@
1
+ import { StabilityEnum, defineCapability } from "@contractspec/lib.contracts";
2
+
3
+ //#region src/integration-hub.capability.ts
4
+ const IntegrationCapability = defineCapability({ meta: {
5
+ key: "integration",
6
+ version: "1.0.0",
7
+ kind: "integration",
8
+ stability: StabilityEnum.Experimental,
9
+ description: "Third-party integration connections",
10
+ owners: ["platform.core"],
11
+ tags: ["integration", "connections"]
12
+ } });
13
+ const SyncCapability = defineCapability({ meta: {
14
+ key: "sync",
15
+ version: "1.0.0",
16
+ kind: "api",
17
+ stability: StabilityEnum.Experimental,
18
+ description: "Data synchronization between systems",
19
+ owners: ["platform.core"],
20
+ tags: ["sync", "data"]
21
+ } });
22
+ const EtlCapability = defineCapability({ meta: {
23
+ key: "etl",
24
+ version: "1.0.0",
25
+ kind: "api",
26
+ stability: StabilityEnum.Experimental,
27
+ description: "Extract, transform, load data pipelines",
28
+ owners: ["platform.core"],
29
+ tags: [
30
+ "etl",
31
+ "data",
32
+ "pipeline"
33
+ ]
34
+ } });
35
+
36
+ //#endregion
37
+ export { EtlCapability, IntegrationCapability, SyncCapability };
38
+ //# sourceMappingURL=integration-hub.capability.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"integration-hub.capability.js","names":[],"sources":["../src/integration-hub.capability.ts"],"sourcesContent":["import { defineCapability, StabilityEnum } from '@contractspec/lib.contracts';\n\nexport const IntegrationCapability = defineCapability({\n meta: {\n key: 'integration',\n version: '1.0.0',\n kind: 'integration',\n stability: StabilityEnum.Experimental,\n description: 'Third-party integration connections',\n owners: ['platform.core'],\n tags: ['integration', 'connections'],\n },\n});\n\nexport const SyncCapability = defineCapability({\n meta: {\n key: 'sync',\n version: '1.0.0',\n kind: 'api',\n stability: StabilityEnum.Experimental,\n description: 'Data synchronization between systems',\n owners: ['platform.core'],\n tags: ['sync', 'data'],\n },\n});\n\nexport const EtlCapability = defineCapability({\n meta: {\n key: 'etl',\n version: '1.0.0',\n kind: 'api',\n stability: StabilityEnum.Experimental,\n description: 'Extract, transform, load data pipelines',\n owners: ['platform.core'],\n tags: ['etl', 'data', 'pipeline'],\n },\n});\n"],"mappings":";;;AAEA,MAAa,wBAAwB,iBAAiB,EACpD,MAAM;CACJ,KAAK;CACL,SAAS;CACT,MAAM;CACN,WAAW,cAAc;CACzB,aAAa;CACb,QAAQ,CAAC,gBAAgB;CACzB,MAAM,CAAC,eAAe,cAAc;CACrC,EACF,CAAC;AAEF,MAAa,iBAAiB,iBAAiB,EAC7C,MAAM;CACJ,KAAK;CACL,SAAS;CACT,MAAM;CACN,WAAW,cAAc;CACzB,aAAa;CACb,QAAQ,CAAC,gBAAgB;CACzB,MAAM,CAAC,QAAQ,OAAO;CACvB,EACF,CAAC;AAEF,MAAa,gBAAgB,iBAAiB,EAC5C,MAAM;CACJ,KAAK;CACL,SAAS;CACT,MAAM;CACN,WAAW,cAAc;CACzB,aAAa;CACb,QAAQ,CAAC,gBAAgB;CACzB,MAAM;EAAC;EAAO;EAAQ;EAAW;CAClC,EACF,CAAC"}
@@ -1,8 +1,7 @@
1
- import { FeatureModuleSpec } from "@contractspec/lib.contracts";
1
+ import * as _contractspec_lib_contracts14 from "@contractspec/lib.contracts";
2
2
 
3
3
  //#region src/integration-hub.feature.d.ts
4
-
5
- declare const IntegrationHubFeature: FeatureModuleSpec;
4
+ declare const IntegrationHubFeature: _contractspec_lib_contracts14.FeatureModuleSpec;
6
5
  //#endregion
7
6
  export { IntegrationHubFeature };
8
7
  //# sourceMappingURL=integration-hub.feature.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"integration-hub.feature.d.ts","names":[],"sources":["../src/integration-hub.feature.ts"],"sourcesContent":[],"mappings":";;;;cAKa,uBAAuB"}
1
+ {"version":3,"file":"integration-hub.feature.d.ts","names":[],"sources":["../src/integration-hub.feature.ts"],"sourcesContent":[],"mappings":";;;cAKa,uBAmHX,6BAAA,CAnHgC"}
@@ -1,5 +1,10 @@
1
+ import { defineFeature } from "@contractspec/lib.contracts";
2
+
1
3
  //#region src/integration-hub.feature.ts
2
- const IntegrationHubFeature = {
4
+ /**
5
+ * Integration Hub Feature Module Specification
6
+ */
7
+ const IntegrationHubFeature = defineFeature({
3
8
  meta: {
4
9
  key: "integration-hub",
5
10
  version: "1.0.0",
@@ -232,7 +237,7 @@ const IntegrationHubFeature = {
232
237
  }
233
238
  ]
234
239
  }
235
- };
240
+ });
236
241
 
237
242
  //#endregion
238
243
  export { IntegrationHubFeature };
@@ -1 +1 @@
1
- {"version":3,"file":"integration-hub.feature.js","names":["IntegrationHubFeature: FeatureModuleSpec"],"sources":["../src/integration-hub.feature.ts"],"sourcesContent":["/**\n * Integration Hub Feature Module Specification\n */\nimport type { FeatureModuleSpec } from '@contractspec/lib.contracts';\n\nexport const IntegrationHubFeature: FeatureModuleSpec = {\n meta: {\n key: 'integration-hub',\n version: '1.0.0',\n title: 'Integration Hub',\n description:\n 'Connect and sync data with external systems through configurable integrations',\n domain: 'integration',\n owners: ['@integration-team'],\n tags: ['integration', 'sync', 'etl', 'connectors'],\n stability: 'experimental',\n },\n\n operations: [\n { key: 'integration.create', version: '1.0.0' },\n { key: 'integration.connection.create', version: '1.0.0' },\n { key: 'integration.syncConfig.create', version: '1.0.0' },\n { key: 'integration.fieldMapping.add', version: '1.0.0' },\n { key: 'integration.sync.trigger', version: '1.0.0' },\n { key: 'integration.syncRun.list', version: '1.0.0' },\n ],\n\n events: [\n { key: 'integration.created', version: '1.0.0' },\n { key: 'integration.connection.created', version: '1.0.0' },\n { key: 'integration.connection.statusChanged', version: '1.0.0' },\n { key: 'integration.syncConfig.created', version: '1.0.0' },\n { key: 'integration.sync.started', version: '1.0.0' },\n { key: 'integration.sync.completed', version: '1.0.0' },\n { key: 'integration.sync.failed', version: '1.0.0' },\n { key: 'integration.record.synced', version: '1.0.0' },\n { key: 'integration.fieldMapping.added', version: '1.0.0' },\n ],\n\n presentations: [\n { key: 'integration.list', version: '1.0.0' },\n { key: 'integration.detail', version: '1.0.0' },\n { key: 'integration.connection.list', version: '1.0.0' },\n { key: 'integration.connection.setup', version: '1.0.0' },\n { key: 'integration.syncConfig.list', version: '1.0.0' },\n { key: 'integration.syncConfig.editor', version: '1.0.0' },\n { key: 'integration.fieldMapping.editor', version: '1.0.0' },\n { key: 'integration.syncRun.list', version: '1.0.0' },\n { key: 'integration.syncRun.detail', version: '1.0.0' },\n { key: 'integration.health', version: '1.0.0' },\n { key: 'integration.sync.activity', version: '1.0.0' },\n ],\n\n opToPresentation: [\n {\n op: { key: 'integration.syncConfig.create', version: '1.0.0' },\n pres: { key: 'integration.syncConfig.editor', version: '1.0.0' },\n },\n {\n op: { key: 'integration.fieldMapping.add', version: '1.0.0' },\n pres: { key: 'integration.fieldMapping.editor', version: '1.0.0' },\n },\n {\n op: { key: 'integration.syncRun.list', version: '1.0.0' },\n pres: { key: 'integration.syncRun.list', version: '1.0.0' },\n },\n ],\n\n presentationsTargets: [\n {\n key: 'integration.list',\n version: '1.0.0',\n targets: ['react', 'markdown'],\n },\n {\n key: 'integration.detail',\n version: '1.0.0',\n targets: ['react', 'markdown'],\n },\n {\n key: 'integration.syncConfig.list',\n version: '1.0.0',\n targets: ['react', 'markdown'],\n },\n {\n key: 'integration.syncConfig.editor',\n version: '1.0.0',\n targets: ['react'],\n },\n {\n key: 'integration.fieldMapping.editor',\n version: '1.0.0',\n targets: ['react'],\n },\n {\n key: 'integration.syncRun.list',\n version: '1.0.0',\n targets: ['react', 'markdown'],\n },\n {\n key: 'integration.syncRun.detail',\n version: '1.0.0',\n targets: ['react', 'markdown'],\n },\n ],\n\n capabilities: {\n requires: [\n { key: 'identity', version: '1.0.0' },\n { key: 'audit-trail', version: '1.0.0' },\n { key: 'feature-flags', version: '1.0.0' },\n { key: 'jobs', version: '1.0.0' },\n { key: 'files', version: '1.0.0' },\n ],\n provides: [\n { key: 'integration', version: '1.0.0' },\n { key: 'sync', version: '1.0.0' },\n { key: 'etl', version: '1.0.0' },\n ],\n },\n};\n"],"mappings":";AAKA,MAAaA,wBAA2C;CACtD,MAAM;EACJ,KAAK;EACL,SAAS;EACT,OAAO;EACP,aACE;EACF,QAAQ;EACR,QAAQ,CAAC,oBAAoB;EAC7B,MAAM;GAAC;GAAe;GAAQ;GAAO;GAAa;EAClD,WAAW;EACZ;CAED,YAAY;EACV;GAAE,KAAK;GAAsB,SAAS;GAAS;EAC/C;GAAE,KAAK;GAAiC,SAAS;GAAS;EAC1D;GAAE,KAAK;GAAiC,SAAS;GAAS;EAC1D;GAAE,KAAK;GAAgC,SAAS;GAAS;EACzD;GAAE,KAAK;GAA4B,SAAS;GAAS;EACrD;GAAE,KAAK;GAA4B,SAAS;GAAS;EACtD;CAED,QAAQ;EACN;GAAE,KAAK;GAAuB,SAAS;GAAS;EAChD;GAAE,KAAK;GAAkC,SAAS;GAAS;EAC3D;GAAE,KAAK;GAAwC,SAAS;GAAS;EACjE;GAAE,KAAK;GAAkC,SAAS;GAAS;EAC3D;GAAE,KAAK;GAA4B,SAAS;GAAS;EACrD;GAAE,KAAK;GAA8B,SAAS;GAAS;EACvD;GAAE,KAAK;GAA2B,SAAS;GAAS;EACpD;GAAE,KAAK;GAA6B,SAAS;GAAS;EACtD;GAAE,KAAK;GAAkC,SAAS;GAAS;EAC5D;CAED,eAAe;EACb;GAAE,KAAK;GAAoB,SAAS;GAAS;EAC7C;GAAE,KAAK;GAAsB,SAAS;GAAS;EAC/C;GAAE,KAAK;GAA+B,SAAS;GAAS;EACxD;GAAE,KAAK;GAAgC,SAAS;GAAS;EACzD;GAAE,KAAK;GAA+B,SAAS;GAAS;EACxD;GAAE,KAAK;GAAiC,SAAS;GAAS;EAC1D;GAAE,KAAK;GAAmC,SAAS;GAAS;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,SAAS;IAAS;GACjC;EACF;CACF"}
1
+ {"version":3,"file":"integration-hub.feature.js","names":[],"sources":["../src/integration-hub.feature.ts"],"sourcesContent":["/**\n * Integration Hub Feature Module Specification\n */\nimport { defineFeature } from '@contractspec/lib.contracts';\n\nexport const IntegrationHubFeature = defineFeature({\n meta: {\n key: 'integration-hub',\n version: '1.0.0',\n title: 'Integration Hub',\n description:\n 'Connect and sync data with external systems through configurable integrations',\n domain: 'integration',\n owners: ['@integration-team'],\n tags: ['integration', 'sync', 'etl', 'connectors'],\n stability: 'experimental',\n },\n\n operations: [\n { key: 'integration.create', version: '1.0.0' },\n { key: 'integration.connection.create', version: '1.0.0' },\n { key: 'integration.syncConfig.create', version: '1.0.0' },\n { key: 'integration.fieldMapping.add', version: '1.0.0' },\n { key: 'integration.sync.trigger', version: '1.0.0' },\n { key: 'integration.syncRun.list', version: '1.0.0' },\n ],\n\n events: [\n { key: 'integration.created', version: '1.0.0' },\n { key: 'integration.connection.created', version: '1.0.0' },\n { key: 'integration.connection.statusChanged', version: '1.0.0' },\n { key: 'integration.syncConfig.created', version: '1.0.0' },\n { key: 'integration.sync.started', version: '1.0.0' },\n { key: 'integration.sync.completed', version: '1.0.0' },\n { key: 'integration.sync.failed', version: '1.0.0' },\n { key: 'integration.record.synced', version: '1.0.0' },\n { key: 'integration.fieldMapping.added', version: '1.0.0' },\n ],\n\n presentations: [\n { key: 'integration.list', version: '1.0.0' },\n { key: 'integration.detail', version: '1.0.0' },\n { key: 'integration.connection.list', version: '1.0.0' },\n { key: 'integration.connection.setup', version: '1.0.0' },\n { key: 'integration.syncConfig.list', version: '1.0.0' },\n { key: 'integration.syncConfig.editor', version: '1.0.0' },\n { key: 'integration.fieldMapping.editor', version: '1.0.0' },\n { key: 'integration.syncRun.list', version: '1.0.0' },\n { key: 'integration.syncRun.detail', version: '1.0.0' },\n { key: 'integration.health', version: '1.0.0' },\n { key: 'integration.sync.activity', version: '1.0.0' },\n ],\n\n opToPresentation: [\n {\n op: { key: 'integration.syncConfig.create', version: '1.0.0' },\n pres: { key: 'integration.syncConfig.editor', version: '1.0.0' },\n },\n {\n op: { key: 'integration.fieldMapping.add', version: '1.0.0' },\n pres: { key: 'integration.fieldMapping.editor', version: '1.0.0' },\n },\n {\n op: { key: 'integration.syncRun.list', version: '1.0.0' },\n pres: { key: 'integration.syncRun.list', version: '1.0.0' },\n },\n ],\n\n presentationsTargets: [\n {\n key: 'integration.list',\n version: '1.0.0',\n targets: ['react', 'markdown'],\n },\n {\n key: 'integration.detail',\n version: '1.0.0',\n targets: ['react', 'markdown'],\n },\n {\n key: 'integration.syncConfig.list',\n version: '1.0.0',\n targets: ['react', 'markdown'],\n },\n {\n key: 'integration.syncConfig.editor',\n version: '1.0.0',\n targets: ['react'],\n },\n {\n key: 'integration.fieldMapping.editor',\n version: '1.0.0',\n targets: ['react'],\n },\n {\n key: 'integration.syncRun.list',\n version: '1.0.0',\n targets: ['react', 'markdown'],\n },\n {\n key: 'integration.syncRun.detail',\n version: '1.0.0',\n targets: ['react', 'markdown'],\n },\n ],\n\n capabilities: {\n requires: [\n { key: 'identity', version: '1.0.0' },\n { key: 'audit-trail', version: '1.0.0' },\n { key: 'feature-flags', version: '1.0.0' },\n { key: 'jobs', version: '1.0.0' },\n { key: 'files', version: '1.0.0' },\n ],\n provides: [\n { key: 'integration', version: '1.0.0' },\n { key: 'sync', version: '1.0.0' },\n { key: 'etl', version: '1.0.0' },\n ],\n },\n});\n"],"mappings":";;;;;;AAKA,MAAa,wBAAwB,cAAc;CACjD,MAAM;EACJ,KAAK;EACL,SAAS;EACT,OAAO;EACP,aACE;EACF,QAAQ;EACR,QAAQ,CAAC,oBAAoB;EAC7B,MAAM;GAAC;GAAe;GAAQ;GAAO;GAAa;EAClD,WAAW;EACZ;CAED,YAAY;EACV;GAAE,KAAK;GAAsB,SAAS;GAAS;EAC/C;GAAE,KAAK;GAAiC,SAAS;GAAS;EAC1D;GAAE,KAAK;GAAiC,SAAS;GAAS;EAC1D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GACE,KAAK;GACL,SAAS;GACT,SAAS,CAAC,SAAS,WAAW;GAC/B;EACD;GACE,KAAK;GACL,SAAS;GACT,SAAS,CAAC,SAAS,WAAW;GAC/B;EACD;GACE,KAAK;GACL,SAAS;GACT,SAAS,CAAC,SAAS,WAAW;GAC/B;EACD;GACE,KAAK;GACL,SAAS;GACT,SAAS,CAAC,QAAQ;GACnB;EACD;GACE,KAAK;GACL,SAAS;GACT,SAAS,CAAC,QAAQ;GACnB;EACD;GACE,KAAK;GACL,SAAS;GACT,SAAS,CAAC,SAAS,WAAW;GAC/B;EACD;GACE,KAAK;GACL,SAAS;GACT,SAAS,CAAC,SAAS,WAAW;GAC/B;EACF;CAED,cAAc;EACZ,UAAU;GACR;IAAE,KAAK;IAAY,SAAS;IAAS;GACrC;IAAE,KAAK;IAAe,SAAS;IAAS;GACxC;IAAE,KAAK;IAAiB,SAAS;IAAS;GAC1C;IAAE,KAAK;IAAQ,SAAS;IAAS;GACjC;IAAE,KAAK;IAAS,SAAS;IAAS;GACnC;EACD,UAAU;GACR;IAAE,KAAK;IAAe,SAAS;IAAS;GACxC;IAAE,KAAK;IAAQ,SAAS;IAAS;GACjC;IAAE,KAAK;IAAO,SAAS;IAAS;GACjC;EACF;CACF,CAAC"}
@@ -0,0 +1,10 @@
1
+ import { DatabasePort } from "@contractspec/lib.runtime-sandbox";
2
+
3
+ //#region src/seeders/index.d.ts
4
+ declare function seedIntegrationHub(params: {
5
+ projectId: string;
6
+ db: DatabasePort;
7
+ }): Promise<void>;
8
+ //#endregion
9
+ export { seedIntegrationHub };
10
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","names":[],"sources":["../../src/seeders/index.ts"],"sourcesContent":[],"mappings":";;;iBAEsB,kBAAA;;EAAA,EAAA,EAEhB,YAFgB;IAGrB"}
@@ -0,0 +1,19 @@
1
+ //#region src/seeders/index.ts
2
+ async function seedIntegrationHub(params) {
3
+ const { projectId, db } = params;
4
+ if ((await db.query(`SELECT COUNT(*) as count FROM integration WHERE "projectId" = $1`, [projectId])).rows[0]?.count > 0) return;
5
+ await db.execute(`INSERT INTO integration (id, "projectId", "organizationId", name, description, type, status)
6
+ VALUES ($1, $2, $3, $4, $5, $6, $7)`, [
7
+ "int_1",
8
+ projectId,
9
+ "org_demo",
10
+ "Salesforce",
11
+ "Salesforce CRM integration",
12
+ "CRM",
13
+ "ACTIVE"
14
+ ]);
15
+ }
16
+
17
+ //#endregion
18
+ export { seedIntegrationHub };
19
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../src/seeders/index.ts"],"sourcesContent":["import type { DatabasePort } from '@contractspec/lib.runtime-sandbox';\n\nexport async function seedIntegrationHub(params: {\n projectId: string;\n db: DatabasePort;\n}) {\n const { projectId, db } = params;\n\n const existing = await db.query(\n `SELECT COUNT(*) as count FROM integration WHERE \"projectId\" = $1`,\n [projectId]\n );\n if ((existing.rows[0]?.count as number) > 0) return;\n\n await db.execute(\n `INSERT INTO integration (id, \"projectId\", \"organizationId\", name, description, type, status)\n VALUES ($1, $2, $3, $4, $5, $6, $7)`,\n [\n 'int_1',\n projectId,\n 'org_demo',\n 'Salesforce',\n 'Salesforce CRM integration',\n 'CRM',\n 'ACTIVE',\n ]\n );\n}\n"],"mappings":";AAEA,eAAsB,mBAAmB,QAGtC;CACD,MAAM,EAAE,WAAW,OAAO;AAM1B,MAJiB,MAAM,GAAG,MACxB,oEACA,CAAC,UAAU,CACZ,EACa,KAAK,IAAI,QAAmB,EAAG;AAE7C,OAAM,GAAG,QACP;2CAEA;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACD,CACF"}
@@ -1,18 +1,18 @@
1
- import * as _contractspec_lib_schema120 from "@contractspec/lib.schema";
1
+ import * as _contractspec_lib_schema181 from "@contractspec/lib.schema";
2
2
 
3
3
  //#region src/sync/sync.enum.d.ts
4
4
  /**
5
5
  * Sync direction enum.
6
6
  */
7
- declare const SyncDirectionEnum: _contractspec_lib_schema120.EnumType<[string, string, string]>;
7
+ declare const SyncDirectionEnum: _contractspec_lib_schema181.EnumType<[string, string, string]>;
8
8
  /**
9
9
  * Sync status enum.
10
10
  */
11
- declare const SyncStatusEnum: _contractspec_lib_schema120.EnumType<[string, string, string, string, string]>;
11
+ declare const SyncStatusEnum: _contractspec_lib_schema181.EnumType<[string, string, string, string, string]>;
12
12
  /**
13
13
  * Mapping type enum.
14
14
  */
15
- declare const MappingTypeEnum: _contractspec_lib_schema120.EnumType<[string, string, string, string, string]>;
15
+ declare const MappingTypeEnum: _contractspec_lib_schema181.EnumType<[string, string, string, string, string]>;
16
16
  //#endregion
17
17
  export { MappingTypeEnum, SyncDirectionEnum, SyncStatusEnum };
18
18
  //# sourceMappingURL=sync.enum.d.ts.map