@contractspec/example.integration-hub 1.44.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 (80) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +156 -0
  3. package/dist/connection/connection.enum.d.ts +10 -0
  4. package/dist/connection/connection.enum.d.ts.map +1 -0
  5. package/dist/connection/connection.enum.js +17 -0
  6. package/dist/connection/connection.enum.js.map +1 -0
  7. package/dist/connection/connection.operation.d.ts +107 -0
  8. package/dist/connection/connection.operation.d.ts.map +1 -0
  9. package/dist/connection/connection.operation.js +63 -0
  10. package/dist/connection/connection.operation.js.map +1 -0
  11. package/dist/connection/connection.presentation.d.ts +8 -0
  12. package/dist/connection/connection.presentation.d.ts.map +1 -0
  13. package/dist/connection/connection.presentation.js +60 -0
  14. package/dist/connection/connection.presentation.js.map +1 -0
  15. package/dist/connection/connection.schema.d.ts +68 -0
  16. package/dist/connection/connection.schema.d.ts.map +1 -0
  17. package/dist/connection/connection.schema.js +76 -0
  18. package/dist/connection/connection.schema.js.map +1 -0
  19. package/dist/connection/index.d.ts +4 -0
  20. package/dist/connection/index.js +5 -0
  21. package/dist/docs/index.d.ts +1 -0
  22. package/dist/docs/index.js +1 -0
  23. package/dist/docs/integration-hub.docblock.d.ts +1 -0
  24. package/dist/docs/integration-hub.docblock.js +115 -0
  25. package/dist/docs/integration-hub.docblock.js.map +1 -0
  26. package/dist/events.d.ts +153 -0
  27. package/dist/events.d.ts.map +1 -0
  28. package/dist/events.js +289 -0
  29. package/dist/events.js.map +1 -0
  30. package/dist/example.d.ts +40 -0
  31. package/dist/example.d.ts.map +1 -0
  32. package/dist/example.js +51 -0
  33. package/dist/example.js.map +1 -0
  34. package/dist/index.d.ts +14 -0
  35. package/dist/index.js +15 -0
  36. package/dist/integration/index.d.ts +4 -0
  37. package/dist/integration/index.js +5 -0
  38. package/dist/integration/integration.enum.d.ts +10 -0
  39. package/dist/integration/integration.enum.d.ts.map +1 -0
  40. package/dist/integration/integration.enum.js +17 -0
  41. package/dist/integration/integration.enum.js.map +1 -0
  42. package/dist/integration/integration.operations.d.ts +99 -0
  43. package/dist/integration/integration.operations.d.ts.map +1 -0
  44. package/dist/integration/integration.operations.js +57 -0
  45. package/dist/integration/integration.operations.js.map +1 -0
  46. package/dist/integration/integration.presentation.d.ts +9 -0
  47. package/dist/integration/integration.presentation.d.ts.map +1 -0
  48. package/dist/integration/integration.presentation.js +77 -0
  49. package/dist/integration/integration.presentation.js.map +1 -0
  50. package/dist/integration/integration.schema.d.ts +68 -0
  51. package/dist/integration/integration.schema.d.ts.map +1 -0
  52. package/dist/integration/integration.schema.js +76 -0
  53. package/dist/integration/integration.schema.js.map +1 -0
  54. package/dist/integration-hub.feature.d.ts +8 -0
  55. package/dist/integration-hub.feature.d.ts.map +1 -0
  56. package/dist/integration-hub.feature.js +239 -0
  57. package/dist/integration-hub.feature.js.map +1 -0
  58. package/dist/sync/index.d.ts +4 -0
  59. package/dist/sync/index.js +5 -0
  60. package/dist/sync/sync.enum.d.ts +18 -0
  61. package/dist/sync/sync.enum.d.ts.map +1 -0
  62. package/dist/sync/sync.enum.js +35 -0
  63. package/dist/sync/sync.enum.js.map +1 -0
  64. package/dist/sync/sync.operations.d.ts +509 -0
  65. package/dist/sync/sync.operations.d.ts.map +1 -0
  66. package/dist/sync/sync.operations.js +203 -0
  67. package/dist/sync/sync.operations.js.map +1 -0
  68. package/dist/sync/sync.presentation.d.ts +12 -0
  69. package/dist/sync/sync.presentation.d.ts.map +1 -0
  70. package/dist/sync/sync.presentation.js +168 -0
  71. package/dist/sync/sync.presentation.js.map +1 -0
  72. package/dist/sync/sync.schema.d.ts +356 -0
  73. package/dist/sync/sync.schema.d.ts.map +1 -0
  74. package/dist/sync/sync.schema.js +304 -0
  75. package/dist/sync/sync.schema.js.map +1 -0
  76. package/dist/sync-engine/index.d.ts +109 -0
  77. package/dist/sync-engine/index.d.ts.map +1 -0
  78. package/dist/sync-engine/index.js +148 -0
  79. package/dist/sync-engine/index.js.map +1 -0
  80. package/package.json +103 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sync.operations.js","names":[],"sources":["../../src/sync/sync.operations.ts"],"sourcesContent":["import {\n defineCommand,\n defineQuery,\n} from '@contractspec/lib.contracts/operations';\nimport {\n SyncConfigModel,\n SyncRunModel,\n FieldMappingModel,\n CreateSyncConfigInputModel,\n AddFieldMappingInputModel,\n TriggerSyncInputModel,\n ListSyncRunsInputModel,\n ListSyncRunsOutputModel,\n} from './sync.schema';\n\nconst OWNERS = ['@example.integration-hub'] as const;\n\n/**\n * Create a sync configuration.\n */\nexport const CreateSyncConfigContract = defineCommand({\n meta: {\n key: 'integration.syncConfig.create',\n version: 1,\n stability: 'stable',\n owners: [...OWNERS],\n tags: ['integration', 'sync', 'config', 'create'],\n description: 'Create a sync configuration.',\n goal: 'Define how data should be synchronized.',\n context: 'Sync setup.',\n },\n io: { input: CreateSyncConfigInputModel, output: SyncConfigModel },\n policy: { auth: 'user' },\n sideEffects: {\n emits: [\n {\n key: 'integration.syncConfig.created',\n version: 1,\n when: 'Sync config created',\n payload: SyncConfigModel,\n },\n ],\n audit: ['integration.syncConfig.created'],\n },\n acceptance: {\n scenarios: [\n {\n key: 'create-sync-happy-path',\n given: ['User is authenticated'],\n when: ['User creates sync config'],\n then: ['Sync config is created', 'SyncConfigCreated event is emitted'],\n },\n ],\n examples: [\n {\n key: 'create-contact-sync',\n input: {\n name: 'Contacts Sync',\n sourceConnectionId: 'conn-1',\n targetConnectionId: 'conn-2',\n },\n output: { id: 'sync-123', status: 'active' },\n },\n ],\n },\n});\n\n/**\n * Add a field mapping to a sync config.\n */\nexport const AddFieldMappingContract = defineCommand({\n meta: {\n key: 'integration.fieldMapping.add',\n version: 1,\n stability: 'stable',\n owners: [...OWNERS],\n tags: ['integration', 'mapping', 'field'],\n description: 'Add a field mapping to a sync config.',\n goal: 'Map fields between systems.',\n context: 'Mapping configuration.',\n },\n io: { input: AddFieldMappingInputModel, output: FieldMappingModel },\n policy: { auth: 'user' },\n sideEffects: {\n emits: [\n {\n key: 'integration.fieldMapping.added',\n version: 1,\n when: 'Mapping added',\n payload: FieldMappingModel,\n },\n ],\n },\n acceptance: {\n scenarios: [\n {\n key: 'add-mapping-happy-path',\n given: ['Sync config exists'],\n when: ['User adds field mapping'],\n then: ['Mapping is added', 'FieldMappingAdded event is emitted'],\n },\n ],\n examples: [\n {\n key: 'map-email',\n input: {\n syncConfigId: 'sync-123',\n sourceField: 'email',\n targetField: 'user_email',\n },\n output: { id: 'map-456', type: 'string' },\n },\n ],\n },\n});\n\n/**\n * Trigger a manual sync.\n */\nexport const TriggerSyncContract = defineCommand({\n meta: {\n key: 'integration.sync.trigger',\n version: 1,\n stability: 'stable',\n owners: [...OWNERS],\n tags: ['integration', 'sync', 'trigger'],\n description: 'Trigger a manual sync.',\n goal: 'Start data synchronization.',\n context: 'Manual sync or webhook trigger.',\n },\n io: { input: TriggerSyncInputModel, output: SyncRunModel },\n policy: { auth: 'user' },\n sideEffects: {\n emits: [\n {\n key: 'integration.sync.started',\n version: 1,\n when: 'Sync starts',\n payload: SyncRunModel,\n },\n ],\n audit: ['integration.sync.triggered'],\n },\n acceptance: {\n scenarios: [\n {\n key: 'trigger-sync-happy-path',\n given: ['Sync config exists'],\n when: ['User triggers sync'],\n then: ['Sync run starts', 'SyncStarted event is emitted'],\n },\n ],\n examples: [\n {\n key: 'manual-trigger',\n input: { syncConfigId: 'sync-123' },\n output: { id: 'run-789', status: 'pending' },\n },\n ],\n },\n});\n\n/**\n * List sync run history.\n */\nexport const ListSyncRunsContract = defineQuery({\n meta: {\n key: 'integration.syncRun.list',\n version: 1,\n stability: 'stable',\n owners: [...OWNERS],\n tags: ['integration', 'sync', 'run', 'list'],\n description: 'List sync run history.',\n goal: 'View sync history and status.',\n context: 'Sync monitoring.',\n },\n io: { input: ListSyncRunsInputModel, output: ListSyncRunsOutputModel },\n policy: { auth: 'user' },\n acceptance: {\n scenarios: [\n {\n key: 'list-runs-happy-path',\n given: ['User has access to syncs'],\n when: ['User lists sync runs'],\n then: ['List of runs is returned'],\n },\n ],\n examples: [\n {\n key: 'list-recent',\n input: { limit: 10 },\n output: { items: [], total: 50 },\n },\n ],\n },\n});\n"],"mappings":";;;;AAeA,MAAM,SAAS,CAAC,2BAA2B;;;;AAK3C,MAAa,2BAA2B,cAAc;CACpD,MAAM;EACJ,KAAK;EACL,SAAS;EACT,WAAW;EACX,QAAQ,CAAC,GAAG,OAAO;EACnB,MAAM;GAAC;GAAe;GAAQ;GAAU;GAAS;EACjD,aAAa;EACb,MAAM;EACN,SAAS;EACV;CACD,IAAI;EAAE,OAAO;EAA4B,QAAQ;EAAiB;CAClE,QAAQ,EAAE,MAAM,QAAQ;CACxB,aAAa;EACX,OAAO,CACL;GACE,KAAK;GACL,SAAS;GACT,MAAM;GACN,SAAS;GACV,CACF;EACD,OAAO,CAAC,iCAAiC;EAC1C;CACD,YAAY;EACV,WAAW,CACT;GACE,KAAK;GACL,OAAO,CAAC,wBAAwB;GAChC,MAAM,CAAC,2BAA2B;GAClC,MAAM,CAAC,0BAA0B,qCAAqC;GACvE,CACF;EACD,UAAU,CACR;GACE,KAAK;GACL,OAAO;IACL,MAAM;IACN,oBAAoB;IACpB,oBAAoB;IACrB;GACD,QAAQ;IAAE,IAAI;IAAY,QAAQ;IAAU;GAC7C,CACF;EACF;CACF,CAAC;;;;AAKF,MAAa,0BAA0B,cAAc;CACnD,MAAM;EACJ,KAAK;EACL,SAAS;EACT,WAAW;EACX,QAAQ,CAAC,GAAG,OAAO;EACnB,MAAM;GAAC;GAAe;GAAW;GAAQ;EACzC,aAAa;EACb,MAAM;EACN,SAAS;EACV;CACD,IAAI;EAAE,OAAO;EAA2B,QAAQ;EAAmB;CACnE,QAAQ,EAAE,MAAM,QAAQ;CACxB,aAAa,EACX,OAAO,CACL;EACE,KAAK;EACL,SAAS;EACT,MAAM;EACN,SAAS;EACV,CACF,EACF;CACD,YAAY;EACV,WAAW,CACT;GACE,KAAK;GACL,OAAO,CAAC,qBAAqB;GAC7B,MAAM,CAAC,0BAA0B;GACjC,MAAM,CAAC,oBAAoB,qCAAqC;GACjE,CACF;EACD,UAAU,CACR;GACE,KAAK;GACL,OAAO;IACL,cAAc;IACd,aAAa;IACb,aAAa;IACd;GACD,QAAQ;IAAE,IAAI;IAAW,MAAM;IAAU;GAC1C,CACF;EACF;CACF,CAAC;;;;AAKF,MAAa,sBAAsB,cAAc;CAC/C,MAAM;EACJ,KAAK;EACL,SAAS;EACT,WAAW;EACX,QAAQ,CAAC,GAAG,OAAO;EACnB,MAAM;GAAC;GAAe;GAAQ;GAAU;EACxC,aAAa;EACb,MAAM;EACN,SAAS;EACV;CACD,IAAI;EAAE,OAAO;EAAuB,QAAQ;EAAc;CAC1D,QAAQ,EAAE,MAAM,QAAQ;CACxB,aAAa;EACX,OAAO,CACL;GACE,KAAK;GACL,SAAS;GACT,MAAM;GACN,SAAS;GACV,CACF;EACD,OAAO,CAAC,6BAA6B;EACtC;CACD,YAAY;EACV,WAAW,CACT;GACE,KAAK;GACL,OAAO,CAAC,qBAAqB;GAC7B,MAAM,CAAC,qBAAqB;GAC5B,MAAM,CAAC,mBAAmB,+BAA+B;GAC1D,CACF;EACD,UAAU,CACR;GACE,KAAK;GACL,OAAO,EAAE,cAAc,YAAY;GACnC,QAAQ;IAAE,IAAI;IAAW,QAAQ;IAAW;GAC7C,CACF;EACF;CACF,CAAC;;;;AAKF,MAAa,uBAAuB,YAAY;CAC9C,MAAM;EACJ,KAAK;EACL,SAAS;EACT,WAAW;EACX,QAAQ,CAAC,GAAG,OAAO;EACnB,MAAM;GAAC;GAAe;GAAQ;GAAO;GAAO;EAC5C,aAAa;EACb,MAAM;EACN,SAAS;EACV;CACD,IAAI;EAAE,OAAO;EAAwB,QAAQ;EAAyB;CACtE,QAAQ,EAAE,MAAM,QAAQ;CACxB,YAAY;EACV,WAAW,CACT;GACE,KAAK;GACL,OAAO,CAAC,2BAA2B;GACnC,MAAM,CAAC,uBAAuB;GAC9B,MAAM,CAAC,2BAA2B;GACnC,CACF;EACD,UAAU,CACR;GACE,KAAK;GACL,OAAO,EAAE,OAAO,IAAI;GACpB,QAAQ;IAAE,OAAO,EAAE;IAAE,OAAO;IAAI;GACjC,CACF;EACF;CACF,CAAC"}
@@ -0,0 +1,12 @@
1
+ import { PresentationSpec } from "@contractspec/lib.contracts";
2
+
3
+ //#region src/sync/sync.presentation.d.ts
4
+ declare const SyncConfigListPresentation: PresentationSpec;
5
+ declare const SyncConfigEditorPresentation: PresentationSpec;
6
+ declare const FieldMappingEditorPresentation: PresentationSpec;
7
+ declare const SyncRunListPresentation: PresentationSpec;
8
+ declare const SyncRunDetailPresentation: PresentationSpec;
9
+ declare const SyncActivityPresentation: PresentationSpec;
10
+ //#endregion
11
+ export { FieldMappingEditorPresentation, SyncActivityPresentation, SyncConfigEditorPresentation, SyncConfigListPresentation, SyncRunDetailPresentation, SyncRunListPresentation };
12
+ //# sourceMappingURL=sync.presentation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sync.presentation.d.ts","names":[],"sources":["../../src/sync/sync.presentation.ts"],"sourcesContent":[],"mappings":";;;cAQa,4BAA4B;cAyB5B,8BAA8B;AAzB9B,cAkDA,8BAlD4B,EAkDI,gBA3B5C;AAEY,cAkDA,uBA3BZ,EA2BqC,gBAlDK;AAyB9B,cAkDA,yBA3BZ,EA2BuC,gBAlDK;AAyBhC,cAkDA,wBAlDyB,EAkDC,gBA3BtC"}
@@ -0,0 +1,168 @@
1
+ import { FieldMappingModel, SyncConfigModel, SyncRunModel } from "./sync.schema.js";
2
+ import { StabilityEnum } from "@contractspec/lib.contracts";
3
+
4
+ //#region src/sync/sync.presentation.ts
5
+ const SyncConfigListPresentation = {
6
+ meta: {
7
+ key: "integration.syncConfig.list",
8
+ version: 1,
9
+ title: "Sync Config List",
10
+ description: "List of sync configurations",
11
+ domain: "integration",
12
+ owners: ["@integration-team"],
13
+ tags: [
14
+ "integration",
15
+ "sync",
16
+ "config",
17
+ "list"
18
+ ],
19
+ stability: StabilityEnum.Experimental,
20
+ goal: "Show users their current sync configurations.",
21
+ context: "Management view for data synchronization."
22
+ },
23
+ source: {
24
+ type: "component",
25
+ framework: "react",
26
+ componentKey: "SyncConfigList",
27
+ props: SyncConfigModel
28
+ },
29
+ targets: ["react", "markdown"],
30
+ policy: { flags: ["integration.sync.enabled"] }
31
+ };
32
+ const SyncConfigEditorPresentation = {
33
+ meta: {
34
+ key: "integration.syncConfig.editor",
35
+ version: 1,
36
+ title: "Sync Config Editor",
37
+ description: "Editor for sync configuration settings",
38
+ domain: "integration",
39
+ owners: ["@integration-team"],
40
+ tags: [
41
+ "integration",
42
+ "sync",
43
+ "config",
44
+ "editor"
45
+ ],
46
+ stability: StabilityEnum.Experimental,
47
+ goal: "Allow users to configure schedule, filters, and settings for a sync.",
48
+ context: "Configuration interface for sync jobs."
49
+ },
50
+ source: {
51
+ type: "component",
52
+ framework: "react",
53
+ componentKey: "SyncConfigEditor",
54
+ props: SyncConfigModel
55
+ },
56
+ targets: ["react"],
57
+ policy: { flags: ["integration.sync.enabled"] }
58
+ };
59
+ const FieldMappingEditorPresentation = {
60
+ meta: {
61
+ key: "integration.fieldMapping.editor",
62
+ version: 1,
63
+ title: "Field Mapping Editor",
64
+ description: "Visual field mapping editor",
65
+ domain: "integration",
66
+ owners: ["@integration-team"],
67
+ tags: [
68
+ "integration",
69
+ "field-mapping",
70
+ "editor"
71
+ ],
72
+ stability: StabilityEnum.Experimental,
73
+ goal: "Allow users to map source fields to target fields visually.",
74
+ context: "Schema mapping tool for data consistency."
75
+ },
76
+ source: {
77
+ type: "component",
78
+ framework: "react",
79
+ componentKey: "FieldMappingEditor",
80
+ props: FieldMappingModel
81
+ },
82
+ targets: ["react"],
83
+ policy: { flags: ["integration.sync.enabled"] }
84
+ };
85
+ const SyncRunListPresentation = {
86
+ meta: {
87
+ key: "integration.syncRun.list",
88
+ version: 1,
89
+ title: "Sync Run History",
90
+ description: "History of sync runs",
91
+ domain: "integration",
92
+ owners: ["@integration-team"],
93
+ tags: [
94
+ "integration",
95
+ "sync",
96
+ "runs",
97
+ "history"
98
+ ],
99
+ stability: StabilityEnum.Experimental,
100
+ goal: "Provide a historical log of all sync attempts and their results.",
101
+ context: "Audit and troubleshooting view for sync jobs."
102
+ },
103
+ source: {
104
+ type: "component",
105
+ framework: "react",
106
+ componentKey: "SyncRunList",
107
+ props: SyncRunModel
108
+ },
109
+ targets: ["react", "markdown"],
110
+ policy: { flags: ["integration.sync.enabled"] }
111
+ };
112
+ const SyncRunDetailPresentation = {
113
+ meta: {
114
+ key: "integration.syncRun.detail",
115
+ version: 1,
116
+ title: "Sync Run Details",
117
+ description: "Detailed view of a sync run with logs",
118
+ domain: "integration",
119
+ owners: ["@integration-team"],
120
+ tags: [
121
+ "integration",
122
+ "sync",
123
+ "run",
124
+ "detail"
125
+ ],
126
+ stability: StabilityEnum.Experimental,
127
+ goal: "Show granular details and logs for a specific sync run.",
128
+ context: "Detailed troubleshooting view."
129
+ },
130
+ source: {
131
+ type: "component",
132
+ framework: "react",
133
+ componentKey: "SyncRunDetail",
134
+ props: SyncRunModel
135
+ },
136
+ targets: ["react", "markdown"],
137
+ policy: { flags: ["integration.sync.enabled"] }
138
+ };
139
+ const SyncActivityPresentation = {
140
+ meta: {
141
+ key: "integration.sync.activity",
142
+ version: 1,
143
+ title: "Sync Activity Monitor",
144
+ description: "Real-time sync activity monitor",
145
+ domain: "integration",
146
+ owners: ["@integration-team"],
147
+ tags: [
148
+ "integration",
149
+ "sync",
150
+ "activity",
151
+ "realtime"
152
+ ],
153
+ stability: StabilityEnum.Experimental,
154
+ goal: "Monitor live data flow and sync performance.",
155
+ context: "Real-time operations monitor."
156
+ },
157
+ source: {
158
+ type: "component",
159
+ framework: "react",
160
+ componentKey: "SyncActivity"
161
+ },
162
+ targets: ["react", "markdown"],
163
+ policy: { flags: ["integration.sync.enabled"] }
164
+ };
165
+
166
+ //#endregion
167
+ export { FieldMappingEditorPresentation, SyncActivityPresentation, SyncConfigEditorPresentation, SyncConfigListPresentation, SyncRunDetailPresentation, SyncRunListPresentation };
168
+ //# sourceMappingURL=sync.presentation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sync.presentation.js","names":["SyncConfigListPresentation: PresentationSpec","SyncConfigEditorPresentation: PresentationSpec","FieldMappingEditorPresentation: PresentationSpec","SyncRunListPresentation: PresentationSpec","SyncRunDetailPresentation: PresentationSpec","SyncActivityPresentation: PresentationSpec"],"sources":["../../src/sync/sync.presentation.ts"],"sourcesContent":["import type { PresentationSpec } from '@contractspec/lib.contracts';\nimport { StabilityEnum } from '@contractspec/lib.contracts';\nimport {\n SyncConfigModel,\n SyncRunModel,\n FieldMappingModel,\n} from './sync.schema';\n\nexport const SyncConfigListPresentation: PresentationSpec = {\n meta: {\n key: 'integration.syncConfig.list',\n version: 1,\n title: 'Sync Config List',\n description: 'List of sync configurations',\n domain: 'integration',\n owners: ['@integration-team'],\n tags: ['integration', 'sync', 'config', 'list'],\n stability: StabilityEnum.Experimental,\n goal: 'Show users their current sync configurations.',\n context: 'Management view for data synchronization.',\n },\n source: {\n type: 'component',\n framework: 'react',\n componentKey: 'SyncConfigList',\n props: SyncConfigModel,\n },\n targets: ['react', 'markdown'],\n policy: {\n flags: ['integration.sync.enabled'],\n },\n};\n\nexport const SyncConfigEditorPresentation: PresentationSpec = {\n meta: {\n key: 'integration.syncConfig.editor',\n version: 1,\n title: 'Sync Config Editor',\n description: 'Editor for sync configuration settings',\n domain: 'integration',\n owners: ['@integration-team'],\n tags: ['integration', 'sync', 'config', 'editor'],\n stability: StabilityEnum.Experimental,\n goal: 'Allow users to configure schedule, filters, and settings for a sync.',\n context: 'Configuration interface for sync jobs.',\n },\n source: {\n type: 'component',\n framework: 'react',\n componentKey: 'SyncConfigEditor',\n props: SyncConfigModel,\n },\n targets: ['react'],\n policy: {\n flags: ['integration.sync.enabled'],\n },\n};\n\nexport const FieldMappingEditorPresentation: PresentationSpec = {\n meta: {\n key: 'integration.fieldMapping.editor',\n version: 1,\n title: 'Field Mapping Editor',\n description: 'Visual field mapping editor',\n domain: 'integration',\n owners: ['@integration-team'],\n tags: ['integration', 'field-mapping', 'editor'],\n stability: StabilityEnum.Experimental,\n goal: 'Allow users to map source fields to target fields visually.',\n context: 'Schema mapping tool for data consistency.',\n },\n source: {\n type: 'component',\n framework: 'react',\n componentKey: 'FieldMappingEditor',\n props: FieldMappingModel,\n },\n targets: ['react'],\n policy: {\n flags: ['integration.sync.enabled'],\n },\n};\n\nexport const SyncRunListPresentation: PresentationSpec = {\n meta: {\n key: 'integration.syncRun.list',\n version: 1,\n title: 'Sync Run History',\n description: 'History of sync runs',\n domain: 'integration',\n owners: ['@integration-team'],\n tags: ['integration', 'sync', 'runs', 'history'],\n stability: StabilityEnum.Experimental,\n goal: 'Provide a historical log of all sync attempts and their results.',\n context: 'Audit and troubleshooting view for sync jobs.',\n },\n source: {\n type: 'component',\n framework: 'react',\n componentKey: 'SyncRunList',\n props: SyncRunModel,\n },\n targets: ['react', 'markdown'],\n policy: {\n flags: ['integration.sync.enabled'],\n },\n};\n\nexport const SyncRunDetailPresentation: PresentationSpec = {\n meta: {\n key: 'integration.syncRun.detail',\n version: 1,\n title: 'Sync Run Details',\n description: 'Detailed view of a sync run with logs',\n domain: 'integration',\n owners: ['@integration-team'],\n tags: ['integration', 'sync', 'run', 'detail'],\n stability: StabilityEnum.Experimental,\n goal: 'Show granular details and logs for a specific sync run.',\n context: 'Detailed troubleshooting view.',\n },\n source: {\n type: 'component',\n framework: 'react',\n componentKey: 'SyncRunDetail',\n props: SyncRunModel,\n },\n targets: ['react', 'markdown'],\n policy: {\n flags: ['integration.sync.enabled'],\n },\n};\n\nexport const SyncActivityPresentation: PresentationSpec = {\n meta: {\n key: 'integration.sync.activity',\n version: 1,\n title: 'Sync Activity Monitor',\n description: 'Real-time sync activity monitor',\n domain: 'integration',\n owners: ['@integration-team'],\n tags: ['integration', 'sync', 'activity', 'realtime'],\n stability: StabilityEnum.Experimental,\n goal: 'Monitor live data flow and sync performance.',\n context: 'Real-time operations monitor.',\n },\n source: {\n type: 'component',\n framework: 'react',\n componentKey: 'SyncActivity',\n },\n targets: ['react', 'markdown'],\n policy: {\n flags: ['integration.sync.enabled'],\n },\n};\n"],"mappings":";;;;AAQA,MAAaA,6BAA+C;CAC1D,MAAM;EACJ,KAAK;EACL,SAAS;EACT,OAAO;EACP,aAAa;EACb,QAAQ;EACR,QAAQ,CAAC,oBAAoB;EAC7B,MAAM;GAAC;GAAe;GAAQ;GAAU;GAAO;EAC/C,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,2BAA2B,EACpC;CACF;AAED,MAAaC,+BAAiD;CAC5D,MAAM;EACJ,KAAK;EACL,SAAS;EACT,OAAO;EACP,aAAa;EACb,QAAQ;EACR,QAAQ,CAAC,oBAAoB;EAC7B,MAAM;GAAC;GAAe;GAAQ;GAAU;GAAS;EACjD,WAAW,cAAc;EACzB,MAAM;EACN,SAAS;EACV;CACD,QAAQ;EACN,MAAM;EACN,WAAW;EACX,cAAc;EACd,OAAO;EACR;CACD,SAAS,CAAC,QAAQ;CAClB,QAAQ,EACN,OAAO,CAAC,2BAA2B,EACpC;CACF;AAED,MAAaC,iCAAmD;CAC9D,MAAM;EACJ,KAAK;EACL,SAAS;EACT,OAAO;EACP,aAAa;EACb,QAAQ;EACR,QAAQ,CAAC,oBAAoB;EAC7B,MAAM;GAAC;GAAe;GAAiB;GAAS;EAChD,WAAW,cAAc;EACzB,MAAM;EACN,SAAS;EACV;CACD,QAAQ;EACN,MAAM;EACN,WAAW;EACX,cAAc;EACd,OAAO;EACR;CACD,SAAS,CAAC,QAAQ;CAClB,QAAQ,EACN,OAAO,CAAC,2BAA2B,EACpC;CACF;AAED,MAAaC,0BAA4C;CACvD,MAAM;EACJ,KAAK;EACL,SAAS;EACT,OAAO;EACP,aAAa;EACb,QAAQ;EACR,QAAQ,CAAC,oBAAoB;EAC7B,MAAM;GAAC;GAAe;GAAQ;GAAQ;GAAU;EAChD,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,2BAA2B,EACpC;CACF;AAED,MAAaC,4BAA8C;CACzD,MAAM;EACJ,KAAK;EACL,SAAS;EACT,OAAO;EACP,aAAa;EACb,QAAQ;EACR,QAAQ,CAAC,oBAAoB;EAC7B,MAAM;GAAC;GAAe;GAAQ;GAAO;GAAS;EAC9C,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,2BAA2B,EACpC;CACF;AAED,MAAaC,2BAA6C;CACxD,MAAM;EACJ,KAAK;EACL,SAAS;EACT,OAAO;EACP,aAAa;EACb,QAAQ;EACR,QAAQ,CAAC,oBAAoB;EAC7B,MAAM;GAAC;GAAe;GAAQ;GAAY;GAAW;EACrD,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,2BAA2B,EACpC;CACF"}
@@ -0,0 +1,356 @@
1
+ import * as _contractspec_lib_schema123 from "@contractspec/lib.schema";
2
+
3
+ //#region src/sync/sync.schema.d.ts
4
+ /**
5
+ * A field mapping configuration.
6
+ */
7
+ declare const FieldMappingModel: _contractspec_lib_schema123.SchemaModel<{
8
+ id: {
9
+ type: _contractspec_lib_schema123.FieldType<string, string>;
10
+ isOptional: false;
11
+ };
12
+ sourceField: {
13
+ type: _contractspec_lib_schema123.FieldType<string, string>;
14
+ isOptional: false;
15
+ };
16
+ targetField: {
17
+ type: _contractspec_lib_schema123.FieldType<string, string>;
18
+ isOptional: false;
19
+ };
20
+ mappingType: {
21
+ type: _contractspec_lib_schema123.EnumType<[string, string, string, string, string]>;
22
+ isOptional: false;
23
+ };
24
+ transformExpression: {
25
+ type: _contractspec_lib_schema123.FieldType<string, string>;
26
+ isOptional: true;
27
+ };
28
+ isRequired: {
29
+ type: _contractspec_lib_schema123.FieldType<boolean, boolean>;
30
+ isOptional: false;
31
+ };
32
+ }>;
33
+ /**
34
+ * A sync configuration.
35
+ */
36
+ declare const SyncConfigModel: _contractspec_lib_schema123.SchemaModel<{
37
+ id: {
38
+ type: _contractspec_lib_schema123.FieldType<string, string>;
39
+ isOptional: false;
40
+ };
41
+ integrationId: {
42
+ type: _contractspec_lib_schema123.FieldType<string, string>;
43
+ isOptional: false;
44
+ };
45
+ connectionId: {
46
+ type: _contractspec_lib_schema123.FieldType<string, string>;
47
+ isOptional: false;
48
+ };
49
+ name: {
50
+ type: _contractspec_lib_schema123.FieldType<string, string>;
51
+ isOptional: false;
52
+ };
53
+ direction: {
54
+ type: _contractspec_lib_schema123.EnumType<[string, string, string]>;
55
+ isOptional: false;
56
+ };
57
+ sourceObject: {
58
+ type: _contractspec_lib_schema123.FieldType<string, string>;
59
+ isOptional: false;
60
+ };
61
+ targetObject: {
62
+ type: _contractspec_lib_schema123.FieldType<string, string>;
63
+ isOptional: false;
64
+ };
65
+ scheduleEnabled: {
66
+ type: _contractspec_lib_schema123.FieldType<boolean, boolean>;
67
+ isOptional: false;
68
+ };
69
+ scheduleCron: {
70
+ type: _contractspec_lib_schema123.FieldType<string, string>;
71
+ isOptional: true;
72
+ };
73
+ isActive: {
74
+ type: _contractspec_lib_schema123.FieldType<boolean, boolean>;
75
+ isOptional: false;
76
+ };
77
+ lastSyncAt: {
78
+ type: _contractspec_lib_schema123.FieldType<Date, string>;
79
+ isOptional: true;
80
+ };
81
+ fieldMappings: {
82
+ type: _contractspec_lib_schema123.SchemaModel<{
83
+ id: {
84
+ type: _contractspec_lib_schema123.FieldType<string, string>;
85
+ isOptional: false;
86
+ };
87
+ sourceField: {
88
+ type: _contractspec_lib_schema123.FieldType<string, string>;
89
+ isOptional: false;
90
+ };
91
+ targetField: {
92
+ type: _contractspec_lib_schema123.FieldType<string, string>;
93
+ isOptional: false;
94
+ };
95
+ mappingType: {
96
+ type: _contractspec_lib_schema123.EnumType<[string, string, string, string, string]>;
97
+ isOptional: false;
98
+ };
99
+ transformExpression: {
100
+ type: _contractspec_lib_schema123.FieldType<string, string>;
101
+ isOptional: true;
102
+ };
103
+ isRequired: {
104
+ type: _contractspec_lib_schema123.FieldType<boolean, boolean>;
105
+ isOptional: false;
106
+ };
107
+ }>;
108
+ isArray: true;
109
+ isOptional: true;
110
+ };
111
+ }>;
112
+ /**
113
+ * A sync run.
114
+ */
115
+ declare const SyncRunModel: _contractspec_lib_schema123.SchemaModel<{
116
+ id: {
117
+ type: _contractspec_lib_schema123.FieldType<string, string>;
118
+ isOptional: false;
119
+ };
120
+ syncConfigId: {
121
+ type: _contractspec_lib_schema123.FieldType<string, string>;
122
+ isOptional: false;
123
+ };
124
+ status: {
125
+ type: _contractspec_lib_schema123.EnumType<[string, string, string, string, string]>;
126
+ isOptional: false;
127
+ };
128
+ direction: {
129
+ type: _contractspec_lib_schema123.EnumType<[string, string, string]>;
130
+ isOptional: false;
131
+ };
132
+ trigger: {
133
+ type: _contractspec_lib_schema123.FieldType<string, string>;
134
+ isOptional: false;
135
+ };
136
+ recordsProcessed: {
137
+ type: _contractspec_lib_schema123.FieldType<number, number>;
138
+ isOptional: false;
139
+ };
140
+ recordsCreated: {
141
+ type: _contractspec_lib_schema123.FieldType<number, number>;
142
+ isOptional: false;
143
+ };
144
+ recordsUpdated: {
145
+ type: _contractspec_lib_schema123.FieldType<number, number>;
146
+ isOptional: false;
147
+ };
148
+ recordsFailed: {
149
+ type: _contractspec_lib_schema123.FieldType<number, number>;
150
+ isOptional: false;
151
+ };
152
+ errorMessage: {
153
+ type: _contractspec_lib_schema123.FieldType<string, string>;
154
+ isOptional: true;
155
+ };
156
+ startedAt: {
157
+ type: _contractspec_lib_schema123.FieldType<Date, string>;
158
+ isOptional: true;
159
+ };
160
+ completedAt: {
161
+ type: _contractspec_lib_schema123.FieldType<Date, string>;
162
+ isOptional: true;
163
+ };
164
+ createdAt: {
165
+ type: _contractspec_lib_schema123.FieldType<Date, string>;
166
+ isOptional: false;
167
+ };
168
+ }>;
169
+ /**
170
+ * Input for creating a sync config.
171
+ */
172
+ declare const CreateSyncConfigInputModel: _contractspec_lib_schema123.SchemaModel<{
173
+ integrationId: {
174
+ type: _contractspec_lib_schema123.FieldType<string, string>;
175
+ isOptional: false;
176
+ };
177
+ connectionId: {
178
+ type: _contractspec_lib_schema123.FieldType<string, string>;
179
+ isOptional: false;
180
+ };
181
+ name: {
182
+ type: _contractspec_lib_schema123.FieldType<string, string>;
183
+ isOptional: false;
184
+ };
185
+ direction: {
186
+ type: _contractspec_lib_schema123.EnumType<[string, string, string]>;
187
+ isOptional: false;
188
+ };
189
+ sourceObject: {
190
+ type: _contractspec_lib_schema123.FieldType<string, string>;
191
+ isOptional: false;
192
+ };
193
+ targetObject: {
194
+ type: _contractspec_lib_schema123.FieldType<string, string>;
195
+ isOptional: false;
196
+ };
197
+ scheduleEnabled: {
198
+ type: _contractspec_lib_schema123.FieldType<boolean, boolean>;
199
+ isOptional: true;
200
+ };
201
+ scheduleCron: {
202
+ type: _contractspec_lib_schema123.FieldType<string, string>;
203
+ isOptional: true;
204
+ };
205
+ }>;
206
+ /**
207
+ * Input for adding a field mapping.
208
+ */
209
+ declare const AddFieldMappingInputModel: _contractspec_lib_schema123.SchemaModel<{
210
+ syncConfigId: {
211
+ type: _contractspec_lib_schema123.FieldType<string, string>;
212
+ isOptional: false;
213
+ };
214
+ sourceField: {
215
+ type: _contractspec_lib_schema123.FieldType<string, string>;
216
+ isOptional: false;
217
+ };
218
+ targetField: {
219
+ type: _contractspec_lib_schema123.FieldType<string, string>;
220
+ isOptional: false;
221
+ };
222
+ mappingType: {
223
+ type: _contractspec_lib_schema123.EnumType<[string, string, string, string, string]>;
224
+ isOptional: false;
225
+ };
226
+ transformExpression: {
227
+ type: _contractspec_lib_schema123.FieldType<string, string>;
228
+ isOptional: true;
229
+ };
230
+ lookupConfig: {
231
+ type: _contractspec_lib_schema123.FieldType<unknown, unknown>;
232
+ isOptional: true;
233
+ };
234
+ constantValue: {
235
+ type: _contractspec_lib_schema123.FieldType<unknown, unknown>;
236
+ isOptional: true;
237
+ };
238
+ isRequired: {
239
+ type: _contractspec_lib_schema123.FieldType<boolean, boolean>;
240
+ isOptional: true;
241
+ };
242
+ defaultValue: {
243
+ type: _contractspec_lib_schema123.FieldType<unknown, unknown>;
244
+ isOptional: true;
245
+ };
246
+ }>;
247
+ /**
248
+ * Input for triggering a sync.
249
+ */
250
+ declare const TriggerSyncInputModel: _contractspec_lib_schema123.SchemaModel<{
251
+ syncConfigId: {
252
+ type: _contractspec_lib_schema123.FieldType<string, string>;
253
+ isOptional: false;
254
+ };
255
+ direction: {
256
+ type: _contractspec_lib_schema123.EnumType<[string, string, string]>;
257
+ isOptional: true;
258
+ };
259
+ fullSync: {
260
+ type: _contractspec_lib_schema123.FieldType<boolean, boolean>;
261
+ isOptional: true;
262
+ };
263
+ }>;
264
+ /**
265
+ * Input for listing sync runs.
266
+ */
267
+ declare const ListSyncRunsInputModel: _contractspec_lib_schema123.SchemaModel<{
268
+ syncConfigId: {
269
+ type: _contractspec_lib_schema123.FieldType<string, string>;
270
+ isOptional: false;
271
+ };
272
+ status: {
273
+ type: _contractspec_lib_schema123.EnumType<[string, string, string, string, string]>;
274
+ isOptional: true;
275
+ };
276
+ limit: {
277
+ type: _contractspec_lib_schema123.FieldType<number, number>;
278
+ isOptional: true;
279
+ defaultValue: number;
280
+ };
281
+ offset: {
282
+ type: _contractspec_lib_schema123.FieldType<number, number>;
283
+ isOptional: true;
284
+ defaultValue: number;
285
+ };
286
+ }>;
287
+ /**
288
+ * Output for listing sync runs.
289
+ */
290
+ declare const ListSyncRunsOutputModel: _contractspec_lib_schema123.SchemaModel<{
291
+ runs: {
292
+ type: _contractspec_lib_schema123.SchemaModel<{
293
+ id: {
294
+ type: _contractspec_lib_schema123.FieldType<string, string>;
295
+ isOptional: false;
296
+ };
297
+ syncConfigId: {
298
+ type: _contractspec_lib_schema123.FieldType<string, string>;
299
+ isOptional: false;
300
+ };
301
+ status: {
302
+ type: _contractspec_lib_schema123.EnumType<[string, string, string, string, string]>;
303
+ isOptional: false;
304
+ };
305
+ direction: {
306
+ type: _contractspec_lib_schema123.EnumType<[string, string, string]>;
307
+ isOptional: false;
308
+ };
309
+ trigger: {
310
+ type: _contractspec_lib_schema123.FieldType<string, string>;
311
+ isOptional: false;
312
+ };
313
+ recordsProcessed: {
314
+ type: _contractspec_lib_schema123.FieldType<number, number>;
315
+ isOptional: false;
316
+ };
317
+ recordsCreated: {
318
+ type: _contractspec_lib_schema123.FieldType<number, number>;
319
+ isOptional: false;
320
+ };
321
+ recordsUpdated: {
322
+ type: _contractspec_lib_schema123.FieldType<number, number>;
323
+ isOptional: false;
324
+ };
325
+ recordsFailed: {
326
+ type: _contractspec_lib_schema123.FieldType<number, number>;
327
+ isOptional: false;
328
+ };
329
+ errorMessage: {
330
+ type: _contractspec_lib_schema123.FieldType<string, string>;
331
+ isOptional: true;
332
+ };
333
+ startedAt: {
334
+ type: _contractspec_lib_schema123.FieldType<Date, string>;
335
+ isOptional: true;
336
+ };
337
+ completedAt: {
338
+ type: _contractspec_lib_schema123.FieldType<Date, string>;
339
+ isOptional: true;
340
+ };
341
+ createdAt: {
342
+ type: _contractspec_lib_schema123.FieldType<Date, string>;
343
+ isOptional: false;
344
+ };
345
+ }>;
346
+ isArray: true;
347
+ isOptional: false;
348
+ };
349
+ total: {
350
+ type: _contractspec_lib_schema123.FieldType<number, number>;
351
+ isOptional: false;
352
+ };
353
+ }>;
354
+ //#endregion
355
+ export { AddFieldMappingInputModel, CreateSyncConfigInputModel, FieldMappingModel, ListSyncRunsInputModel, ListSyncRunsOutputModel, SyncConfigModel, SyncRunModel, TriggerSyncInputModel };
356
+ //# sourceMappingURL=sync.schema.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sync.schema.d.ts","names":[],"sources":["../../src/sync/sync.schema.ts"],"sourcesContent":[],"mappings":";;;;;;AAUa,cAAA,iBAaX,8BAb4B,WAa5B,CAAA;EAAA,EAAA,EAAA;UAAA,2BAAA,CAAA;;;;;;EAb4B,CAAA;EAkBjB,WAAA,EAAA;IAmBX,IAAA,uCAAA,CAAA,MAAA,EAAA,MAAA,CAAA;;;;;;;;;;;;;;;;;;;cAnBW,eAAe,8BAAA,WAAA,CAAA;EAAA,EAAA,EAAA;IAwBf,IAAA,EALX,2BAAA,CAAA,SAyBA,CAAA,MAAA,EAAA,MAAA,CAAA;IAAA,UAAA,EAAA,KAAA;;;;;;;;;;;;;;;;;EApBuB,CAAA;EAyBZ,YAAA,EAAA;IAeX,IAAA,uCAAA,CAAA,MAAA,EAAA,MAAA,CAAA;;;;;;;;+CAfqC,CAAA,OAAA,EAAA,OAAA,CAAA;IAAA,UAAA,EAAA,KAAA;EAoB1B,CAAA;EAgBX,YAAA,EAAA;;;;;;;;;+CAhBoC,KAAA,EAAA,MAAA,CAAA;IAAA,UAAA,EAAA,IAAA;EAqBzB,CAAA;EAOX,aAAA,EAAA;;;mDAPgC,CAAA,MAAA,EAAA,MAAA,CAAA;QAAA,UAAA,EAAA,KAAA;MAYrB,CAAA;MAgBX,WAAA,EAAA;;;;;QAhBiC,IAAA,uCAAA,CAAA,MAAA,EAAA,MAAA,CAAA;QAqBtB,UAAA,EAAA,KAMX;MAAA,CAAA;;;;;;;;;;;;;;;;;;;;;cAzGW,0CAAY;;UAoBvB,2BAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAKW,wDAA0B;;UAerC,2BAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAKW,uDAAyB;;UAgBpC,2BAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAKW,mDAAqB;;UAOhC,2BAAA,CAAA;;;;;;;;;;;;;;;cAKW,oDAAsB;;UAgBjC,2BAAA,CAAA;;;;;;;;;;;;;;;;;;;;;cAKW,qDAAuB;;;;cAMlC,2BAAA,CAAA"}