@contractspec/example.integration-hub 0.0.0-canary-20260113170453

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 (116) 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 +7 -0
  31. package/dist/example.d.ts.map +1 -0
  32. package/dist/example.js +58 -0
  33. package/dist/example.js.map +1 -0
  34. package/dist/handlers/index.d.ts +2 -0
  35. package/dist/handlers/index.js +3 -0
  36. package/dist/handlers/integration.handlers.d.ts +130 -0
  37. package/dist/handlers/integration.handlers.d.ts.map +1 -0
  38. package/dist/handlers/integration.handlers.js +282 -0
  39. package/dist/handlers/integration.handlers.js.map +1 -0
  40. package/dist/index.d.ts +19 -0
  41. package/dist/index.js +20 -0
  42. package/dist/integration/index.d.ts +4 -0
  43. package/dist/integration/index.js +5 -0
  44. package/dist/integration/integration.enum.d.ts +10 -0
  45. package/dist/integration/integration.enum.d.ts.map +1 -0
  46. package/dist/integration/integration.enum.js +17 -0
  47. package/dist/integration/integration.enum.js.map +1 -0
  48. package/dist/integration/integration.operations.d.ts +99 -0
  49. package/dist/integration/integration.operations.d.ts.map +1 -0
  50. package/dist/integration/integration.operations.js +57 -0
  51. package/dist/integration/integration.operations.js.map +1 -0
  52. package/dist/integration/integration.presentation.d.ts +9 -0
  53. package/dist/integration/integration.presentation.d.ts.map +1 -0
  54. package/dist/integration/integration.presentation.js +77 -0
  55. package/dist/integration/integration.presentation.js.map +1 -0
  56. package/dist/integration/integration.schema.d.ts +68 -0
  57. package/dist/integration/integration.schema.d.ts.map +1 -0
  58. package/dist/integration/integration.schema.js +76 -0
  59. package/dist/integration/integration.schema.js.map +1 -0
  60. package/dist/integration-hub.capability.d.ts +9 -0
  61. package/dist/integration-hub.capability.d.ts.map +1 -0
  62. package/dist/integration-hub.capability.js +38 -0
  63. package/dist/integration-hub.capability.js.map +1 -0
  64. package/dist/integration-hub.feature.d.ts +7 -0
  65. package/dist/integration-hub.feature.d.ts.map +1 -0
  66. package/dist/integration-hub.feature.js +244 -0
  67. package/dist/integration-hub.feature.js.map +1 -0
  68. package/dist/seeders/index.d.ts +10 -0
  69. package/dist/seeders/index.d.ts.map +1 -0
  70. package/dist/seeders/index.js +19 -0
  71. package/dist/seeders/index.js.map +1 -0
  72. package/dist/sync/index.d.ts +4 -0
  73. package/dist/sync/index.js +5 -0
  74. package/dist/sync/sync.enum.d.ts +18 -0
  75. package/dist/sync/sync.enum.d.ts.map +1 -0
  76. package/dist/sync/sync.enum.js +35 -0
  77. package/dist/sync/sync.enum.js.map +1 -0
  78. package/dist/sync/sync.operations.d.ts +509 -0
  79. package/dist/sync/sync.operations.d.ts.map +1 -0
  80. package/dist/sync/sync.operations.js +203 -0
  81. package/dist/sync/sync.operations.js.map +1 -0
  82. package/dist/sync/sync.presentation.d.ts +12 -0
  83. package/dist/sync/sync.presentation.d.ts.map +1 -0
  84. package/dist/sync/sync.presentation.js +168 -0
  85. package/dist/sync/sync.presentation.js.map +1 -0
  86. package/dist/sync/sync.schema.d.ts +356 -0
  87. package/dist/sync/sync.schema.d.ts.map +1 -0
  88. package/dist/sync/sync.schema.js +304 -0
  89. package/dist/sync/sync.schema.js.map +1 -0
  90. package/dist/sync-engine/index.d.ts +109 -0
  91. package/dist/sync-engine/index.d.ts.map +1 -0
  92. package/dist/sync-engine/index.js +148 -0
  93. package/dist/sync-engine/index.js.map +1 -0
  94. package/dist/tests/operations.test-spec.d.ts +9 -0
  95. package/dist/tests/operations.test-spec.d.ts.map +1 -0
  96. package/dist/tests/operations.test-spec.js +94 -0
  97. package/dist/tests/operations.test-spec.js.map +1 -0
  98. package/dist/ui/IntegrationDashboard.d.ts +7 -0
  99. package/dist/ui/IntegrationDashboard.d.ts.map +1 -0
  100. package/dist/ui/IntegrationDashboard.js +266 -0
  101. package/dist/ui/IntegrationDashboard.js.map +1 -0
  102. package/dist/ui/hooks/index.d.ts +2 -0
  103. package/dist/ui/hooks/index.js +5 -0
  104. package/dist/ui/hooks/useIntegrationData.d.ts +23 -0
  105. package/dist/ui/hooks/useIntegrationData.d.ts.map +1 -0
  106. package/dist/ui/hooks/useIntegrationData.js +59 -0
  107. package/dist/ui/hooks/useIntegrationData.js.map +1 -0
  108. package/dist/ui/index.d.ts +6 -0
  109. package/dist/ui/index.js +6 -0
  110. package/dist/ui/renderers/index.d.ts +2 -0
  111. package/dist/ui/renderers/index.js +3 -0
  112. package/dist/ui/renderers/integration.markdown.d.ts +28 -0
  113. package/dist/ui/renderers/integration.markdown.d.ts.map +1 -0
  114. package/dist/ui/renderers/integration.markdown.js +256 -0
  115. package/dist/ui/renderers/integration.markdown.js.map +1 -0
  116. package/package.json +111 -0
@@ -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"}
@@ -0,0 +1,4 @@
1
+ import { MappingTypeEnum, SyncDirectionEnum, SyncStatusEnum } from "./sync.enum.js";
2
+ import { AddFieldMappingInputModel, CreateSyncConfigInputModel, FieldMappingModel, ListSyncRunsInputModel, ListSyncRunsOutputModel, SyncConfigModel, SyncRunModel, TriggerSyncInputModel } from "./sync.schema.js";
3
+ import { AddFieldMappingContract, CreateSyncConfigContract, ListSyncRunsContract, TriggerSyncContract } from "./sync.operations.js";
4
+ export { AddFieldMappingContract, AddFieldMappingInputModel, CreateSyncConfigContract, CreateSyncConfigInputModel, FieldMappingModel, ListSyncRunsContract, ListSyncRunsInputModel, ListSyncRunsOutputModel, MappingTypeEnum, SyncConfigModel, SyncDirectionEnum, SyncRunModel, SyncStatusEnum, TriggerSyncContract, TriggerSyncInputModel };
@@ -0,0 +1,5 @@
1
+ import { MappingTypeEnum, SyncDirectionEnum, SyncStatusEnum } from "./sync.enum.js";
2
+ import { AddFieldMappingInputModel, CreateSyncConfigInputModel, FieldMappingModel, ListSyncRunsInputModel, ListSyncRunsOutputModel, SyncConfigModel, SyncRunModel, TriggerSyncInputModel } from "./sync.schema.js";
3
+ import { AddFieldMappingContract, CreateSyncConfigContract, ListSyncRunsContract, TriggerSyncContract } from "./sync.operations.js";
4
+
5
+ export { AddFieldMappingContract, AddFieldMappingInputModel, CreateSyncConfigContract, CreateSyncConfigInputModel, FieldMappingModel, ListSyncRunsContract, ListSyncRunsInputModel, ListSyncRunsOutputModel, MappingTypeEnum, SyncConfigModel, SyncDirectionEnum, SyncRunModel, SyncStatusEnum, TriggerSyncContract, TriggerSyncInputModel };
@@ -0,0 +1,18 @@
1
+ import * as _contractspec_lib_schema120 from "@contractspec/lib.schema";
2
+
3
+ //#region src/sync/sync.enum.d.ts
4
+ /**
5
+ * Sync direction enum.
6
+ */
7
+ declare const SyncDirectionEnum: _contractspec_lib_schema120.EnumType<[string, string, string]>;
8
+ /**
9
+ * Sync status enum.
10
+ */
11
+ declare const SyncStatusEnum: _contractspec_lib_schema120.EnumType<[string, string, string, string, string]>;
12
+ /**
13
+ * Mapping type enum.
14
+ */
15
+ declare const MappingTypeEnum: _contractspec_lib_schema120.EnumType<[string, string, string, string, string]>;
16
+ //#endregion
17
+ export { MappingTypeEnum, SyncDirectionEnum, SyncStatusEnum };
18
+ //# sourceMappingURL=sync.enum.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sync.enum.d.ts","names":[],"sources":["../../src/sync/sync.enum.ts"],"sourcesContent":[],"mappings":";;;;;;AAKa,cAAA,iBAIX,EAAA,2BAAA,CAJ4B,QAAA,CAAA,CAAA,MAAA,EAAA,MAAA,EAAA,MAAA,CAAA,CAAA;AAS9B;AAWA;;cAXa,gBAMX,2BAAA,CANyB;;;;cAWd,iBAMX,2BAAA,CAN0B"}
@@ -0,0 +1,35 @@
1
+ import { defineEnum } from "@contractspec/lib.schema";
2
+
3
+ //#region src/sync/sync.enum.ts
4
+ /**
5
+ * Sync direction enum.
6
+ */
7
+ const SyncDirectionEnum = defineEnum("SyncDirection", [
8
+ "INBOUND",
9
+ "OUTBOUND",
10
+ "BIDIRECTIONAL"
11
+ ]);
12
+ /**
13
+ * Sync status enum.
14
+ */
15
+ const SyncStatusEnum = defineEnum("SyncStatus", [
16
+ "PENDING",
17
+ "RUNNING",
18
+ "COMPLETED",
19
+ "FAILED",
20
+ "CANCELLED"
21
+ ]);
22
+ /**
23
+ * Mapping type enum.
24
+ */
25
+ const MappingTypeEnum = defineEnum("MappingType", [
26
+ "DIRECT",
27
+ "TRANSFORM",
28
+ "LOOKUP",
29
+ "CONSTANT",
30
+ "COMPUTED"
31
+ ]);
32
+
33
+ //#endregion
34
+ export { MappingTypeEnum, SyncDirectionEnum, SyncStatusEnum };
35
+ //# sourceMappingURL=sync.enum.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sync.enum.js","names":[],"sources":["../../src/sync/sync.enum.ts"],"sourcesContent":["import { defineEnum } from '@contractspec/lib.schema';\n\n/**\n * Sync direction enum.\n */\nexport const SyncDirectionEnum = defineEnum('SyncDirection', [\n 'INBOUND',\n 'OUTBOUND',\n 'BIDIRECTIONAL',\n]);\n\n/**\n * Sync status enum.\n */\nexport const SyncStatusEnum = defineEnum('SyncStatus', [\n 'PENDING',\n 'RUNNING',\n 'COMPLETED',\n 'FAILED',\n 'CANCELLED',\n]);\n\n/**\n * Mapping type enum.\n */\nexport const MappingTypeEnum = defineEnum('MappingType', [\n 'DIRECT',\n 'TRANSFORM',\n 'LOOKUP',\n 'CONSTANT',\n 'COMPUTED',\n]);\n"],"mappings":";;;;;;AAKA,MAAa,oBAAoB,WAAW,iBAAiB;CAC3D;CACA;CACA;CACD,CAAC;;;;AAKF,MAAa,iBAAiB,WAAW,cAAc;CACrD;CACA;CACA;CACA;CACA;CACD,CAAC;;;;AAKF,MAAa,kBAAkB,WAAW,eAAe;CACvD;CACA;CACA;CACA;CACA;CACD,CAAC"}
@@ -0,0 +1,509 @@
1
+ import * as _contractspec_lib_contracts26 from "@contractspec/lib.contracts";
2
+ import * as _contractspec_lib_schema123 from "@contractspec/lib.schema";
3
+
4
+ //#region src/sync/sync.operations.d.ts
5
+ /**
6
+ * Create a sync configuration.
7
+ */
8
+ declare const CreateSyncConfigContract: _contractspec_lib_contracts26.OperationSpec<_contractspec_lib_schema123.SchemaModel<{
9
+ integrationId: {
10
+ type: _contractspec_lib_schema123.FieldType<string, string>;
11
+ isOptional: false;
12
+ };
13
+ connectionId: {
14
+ type: _contractspec_lib_schema123.FieldType<string, string>;
15
+ isOptional: false;
16
+ };
17
+ name: {
18
+ type: _contractspec_lib_schema123.FieldType<string, string>;
19
+ isOptional: false;
20
+ };
21
+ direction: {
22
+ type: _contractspec_lib_schema123.EnumType<[string, string, string]>;
23
+ isOptional: false;
24
+ };
25
+ sourceObject: {
26
+ type: _contractspec_lib_schema123.FieldType<string, string>;
27
+ isOptional: false;
28
+ };
29
+ targetObject: {
30
+ type: _contractspec_lib_schema123.FieldType<string, string>;
31
+ isOptional: false;
32
+ };
33
+ scheduleEnabled: {
34
+ type: _contractspec_lib_schema123.FieldType<boolean, boolean>;
35
+ isOptional: true;
36
+ };
37
+ scheduleCron: {
38
+ type: _contractspec_lib_schema123.FieldType<string, string>;
39
+ isOptional: true;
40
+ };
41
+ }>, _contractspec_lib_schema123.SchemaModel<{
42
+ id: {
43
+ type: _contractspec_lib_schema123.FieldType<string, string>;
44
+ isOptional: false;
45
+ };
46
+ integrationId: {
47
+ type: _contractspec_lib_schema123.FieldType<string, string>;
48
+ isOptional: false;
49
+ };
50
+ connectionId: {
51
+ type: _contractspec_lib_schema123.FieldType<string, string>;
52
+ isOptional: false;
53
+ };
54
+ name: {
55
+ type: _contractspec_lib_schema123.FieldType<string, string>;
56
+ isOptional: false;
57
+ };
58
+ direction: {
59
+ type: _contractspec_lib_schema123.EnumType<[string, string, string]>;
60
+ isOptional: false;
61
+ };
62
+ sourceObject: {
63
+ type: _contractspec_lib_schema123.FieldType<string, string>;
64
+ isOptional: false;
65
+ };
66
+ targetObject: {
67
+ type: _contractspec_lib_schema123.FieldType<string, string>;
68
+ isOptional: false;
69
+ };
70
+ scheduleEnabled: {
71
+ type: _contractspec_lib_schema123.FieldType<boolean, boolean>;
72
+ isOptional: false;
73
+ };
74
+ scheduleCron: {
75
+ type: _contractspec_lib_schema123.FieldType<string, string>;
76
+ isOptional: true;
77
+ };
78
+ isActive: {
79
+ type: _contractspec_lib_schema123.FieldType<boolean, boolean>;
80
+ isOptional: false;
81
+ };
82
+ lastSyncAt: {
83
+ type: _contractspec_lib_schema123.FieldType<Date, string>;
84
+ isOptional: true;
85
+ };
86
+ fieldMappings: {
87
+ type: _contractspec_lib_schema123.SchemaModel<{
88
+ id: {
89
+ type: _contractspec_lib_schema123.FieldType<string, string>;
90
+ isOptional: false;
91
+ };
92
+ sourceField: {
93
+ type: _contractspec_lib_schema123.FieldType<string, string>;
94
+ isOptional: false;
95
+ };
96
+ targetField: {
97
+ type: _contractspec_lib_schema123.FieldType<string, string>;
98
+ isOptional: false;
99
+ };
100
+ mappingType: {
101
+ type: _contractspec_lib_schema123.EnumType<[string, string, string, string, string]>;
102
+ isOptional: false;
103
+ };
104
+ transformExpression: {
105
+ type: _contractspec_lib_schema123.FieldType<string, string>;
106
+ isOptional: true;
107
+ };
108
+ isRequired: {
109
+ type: _contractspec_lib_schema123.FieldType<boolean, boolean>;
110
+ isOptional: false;
111
+ };
112
+ }>;
113
+ isArray: true;
114
+ isOptional: true;
115
+ };
116
+ }>, {
117
+ key: string;
118
+ version: string;
119
+ when: string;
120
+ payload: _contractspec_lib_schema123.SchemaModel<{
121
+ id: {
122
+ type: _contractspec_lib_schema123.FieldType<string, string>;
123
+ isOptional: false;
124
+ };
125
+ integrationId: {
126
+ type: _contractspec_lib_schema123.FieldType<string, string>;
127
+ isOptional: false;
128
+ };
129
+ connectionId: {
130
+ type: _contractspec_lib_schema123.FieldType<string, string>;
131
+ isOptional: false;
132
+ };
133
+ name: {
134
+ type: _contractspec_lib_schema123.FieldType<string, string>;
135
+ isOptional: false;
136
+ };
137
+ direction: {
138
+ type: _contractspec_lib_schema123.EnumType<[string, string, string]>;
139
+ isOptional: false;
140
+ };
141
+ sourceObject: {
142
+ type: _contractspec_lib_schema123.FieldType<string, string>;
143
+ isOptional: false;
144
+ };
145
+ targetObject: {
146
+ type: _contractspec_lib_schema123.FieldType<string, string>;
147
+ isOptional: false;
148
+ };
149
+ scheduleEnabled: {
150
+ type: _contractspec_lib_schema123.FieldType<boolean, boolean>;
151
+ isOptional: false;
152
+ };
153
+ scheduleCron: {
154
+ type: _contractspec_lib_schema123.FieldType<string, string>;
155
+ isOptional: true;
156
+ };
157
+ isActive: {
158
+ type: _contractspec_lib_schema123.FieldType<boolean, boolean>;
159
+ isOptional: false;
160
+ };
161
+ lastSyncAt: {
162
+ type: _contractspec_lib_schema123.FieldType<Date, string>;
163
+ isOptional: true;
164
+ };
165
+ fieldMappings: {
166
+ type: _contractspec_lib_schema123.SchemaModel<{
167
+ id: {
168
+ type: _contractspec_lib_schema123.FieldType<string, string>;
169
+ isOptional: false;
170
+ };
171
+ sourceField: {
172
+ type: _contractspec_lib_schema123.FieldType<string, string>;
173
+ isOptional: false;
174
+ };
175
+ targetField: {
176
+ type: _contractspec_lib_schema123.FieldType<string, string>;
177
+ isOptional: false;
178
+ };
179
+ mappingType: {
180
+ type: _contractspec_lib_schema123.EnumType<[string, string, string, string, string]>;
181
+ isOptional: false;
182
+ };
183
+ transformExpression: {
184
+ type: _contractspec_lib_schema123.FieldType<string, string>;
185
+ isOptional: true;
186
+ };
187
+ isRequired: {
188
+ type: _contractspec_lib_schema123.FieldType<boolean, boolean>;
189
+ isOptional: false;
190
+ };
191
+ }>;
192
+ isArray: true;
193
+ isOptional: true;
194
+ };
195
+ }>;
196
+ }[]>;
197
+ /**
198
+ * Add a field mapping to a sync config.
199
+ */
200
+ declare const AddFieldMappingContract: _contractspec_lib_contracts26.OperationSpec<_contractspec_lib_schema123.SchemaModel<{
201
+ syncConfigId: {
202
+ type: _contractspec_lib_schema123.FieldType<string, string>;
203
+ isOptional: false;
204
+ };
205
+ sourceField: {
206
+ type: _contractspec_lib_schema123.FieldType<string, string>;
207
+ isOptional: false;
208
+ };
209
+ targetField: {
210
+ type: _contractspec_lib_schema123.FieldType<string, string>;
211
+ isOptional: false;
212
+ };
213
+ mappingType: {
214
+ type: _contractspec_lib_schema123.EnumType<[string, string, string, string, string]>;
215
+ isOptional: false;
216
+ };
217
+ transformExpression: {
218
+ type: _contractspec_lib_schema123.FieldType<string, string>;
219
+ isOptional: true;
220
+ };
221
+ lookupConfig: {
222
+ type: _contractspec_lib_schema123.FieldType<unknown, unknown>;
223
+ isOptional: true;
224
+ };
225
+ constantValue: {
226
+ type: _contractspec_lib_schema123.FieldType<unknown, unknown>;
227
+ isOptional: true;
228
+ };
229
+ isRequired: {
230
+ type: _contractspec_lib_schema123.FieldType<boolean, boolean>;
231
+ isOptional: true;
232
+ };
233
+ defaultValue: {
234
+ type: _contractspec_lib_schema123.FieldType<unknown, unknown>;
235
+ isOptional: true;
236
+ };
237
+ }>, _contractspec_lib_schema123.SchemaModel<{
238
+ id: {
239
+ type: _contractspec_lib_schema123.FieldType<string, string>;
240
+ isOptional: false;
241
+ };
242
+ sourceField: {
243
+ type: _contractspec_lib_schema123.FieldType<string, string>;
244
+ isOptional: false;
245
+ };
246
+ targetField: {
247
+ type: _contractspec_lib_schema123.FieldType<string, string>;
248
+ isOptional: false;
249
+ };
250
+ mappingType: {
251
+ type: _contractspec_lib_schema123.EnumType<[string, string, string, string, string]>;
252
+ isOptional: false;
253
+ };
254
+ transformExpression: {
255
+ type: _contractspec_lib_schema123.FieldType<string, string>;
256
+ isOptional: true;
257
+ };
258
+ isRequired: {
259
+ type: _contractspec_lib_schema123.FieldType<boolean, boolean>;
260
+ isOptional: false;
261
+ };
262
+ }>, {
263
+ key: string;
264
+ version: string;
265
+ when: string;
266
+ payload: _contractspec_lib_schema123.SchemaModel<{
267
+ id: {
268
+ type: _contractspec_lib_schema123.FieldType<string, string>;
269
+ isOptional: false;
270
+ };
271
+ sourceField: {
272
+ type: _contractspec_lib_schema123.FieldType<string, string>;
273
+ isOptional: false;
274
+ };
275
+ targetField: {
276
+ type: _contractspec_lib_schema123.FieldType<string, string>;
277
+ isOptional: false;
278
+ };
279
+ mappingType: {
280
+ type: _contractspec_lib_schema123.EnumType<[string, string, string, string, string]>;
281
+ isOptional: false;
282
+ };
283
+ transformExpression: {
284
+ type: _contractspec_lib_schema123.FieldType<string, string>;
285
+ isOptional: true;
286
+ };
287
+ isRequired: {
288
+ type: _contractspec_lib_schema123.FieldType<boolean, boolean>;
289
+ isOptional: false;
290
+ };
291
+ }>;
292
+ }[]>;
293
+ /**
294
+ * Trigger a manual sync.
295
+ */
296
+ declare const TriggerSyncContract: _contractspec_lib_contracts26.OperationSpec<_contractspec_lib_schema123.SchemaModel<{
297
+ syncConfigId: {
298
+ type: _contractspec_lib_schema123.FieldType<string, string>;
299
+ isOptional: false;
300
+ };
301
+ direction: {
302
+ type: _contractspec_lib_schema123.EnumType<[string, string, string]>;
303
+ isOptional: true;
304
+ };
305
+ fullSync: {
306
+ type: _contractspec_lib_schema123.FieldType<boolean, boolean>;
307
+ isOptional: true;
308
+ };
309
+ }>, _contractspec_lib_schema123.SchemaModel<{
310
+ id: {
311
+ type: _contractspec_lib_schema123.FieldType<string, string>;
312
+ isOptional: false;
313
+ };
314
+ syncConfigId: {
315
+ type: _contractspec_lib_schema123.FieldType<string, string>;
316
+ isOptional: false;
317
+ };
318
+ status: {
319
+ type: _contractspec_lib_schema123.EnumType<[string, string, string, string, string]>;
320
+ isOptional: false;
321
+ };
322
+ direction: {
323
+ type: _contractspec_lib_schema123.EnumType<[string, string, string]>;
324
+ isOptional: false;
325
+ };
326
+ trigger: {
327
+ type: _contractspec_lib_schema123.FieldType<string, string>;
328
+ isOptional: false;
329
+ };
330
+ recordsProcessed: {
331
+ type: _contractspec_lib_schema123.FieldType<number, number>;
332
+ isOptional: false;
333
+ };
334
+ recordsCreated: {
335
+ type: _contractspec_lib_schema123.FieldType<number, number>;
336
+ isOptional: false;
337
+ };
338
+ recordsUpdated: {
339
+ type: _contractspec_lib_schema123.FieldType<number, number>;
340
+ isOptional: false;
341
+ };
342
+ recordsFailed: {
343
+ type: _contractspec_lib_schema123.FieldType<number, number>;
344
+ isOptional: false;
345
+ };
346
+ errorMessage: {
347
+ type: _contractspec_lib_schema123.FieldType<string, string>;
348
+ isOptional: true;
349
+ };
350
+ startedAt: {
351
+ type: _contractspec_lib_schema123.FieldType<Date, string>;
352
+ isOptional: true;
353
+ };
354
+ completedAt: {
355
+ type: _contractspec_lib_schema123.FieldType<Date, string>;
356
+ isOptional: true;
357
+ };
358
+ createdAt: {
359
+ type: _contractspec_lib_schema123.FieldType<Date, string>;
360
+ isOptional: false;
361
+ };
362
+ }>, {
363
+ key: string;
364
+ version: string;
365
+ when: string;
366
+ payload: _contractspec_lib_schema123.SchemaModel<{
367
+ id: {
368
+ type: _contractspec_lib_schema123.FieldType<string, string>;
369
+ isOptional: false;
370
+ };
371
+ syncConfigId: {
372
+ type: _contractspec_lib_schema123.FieldType<string, string>;
373
+ isOptional: false;
374
+ };
375
+ status: {
376
+ type: _contractspec_lib_schema123.EnumType<[string, string, string, string, string]>;
377
+ isOptional: false;
378
+ };
379
+ direction: {
380
+ type: _contractspec_lib_schema123.EnumType<[string, string, string]>;
381
+ isOptional: false;
382
+ };
383
+ trigger: {
384
+ type: _contractspec_lib_schema123.FieldType<string, string>;
385
+ isOptional: false;
386
+ };
387
+ recordsProcessed: {
388
+ type: _contractspec_lib_schema123.FieldType<number, number>;
389
+ isOptional: false;
390
+ };
391
+ recordsCreated: {
392
+ type: _contractspec_lib_schema123.FieldType<number, number>;
393
+ isOptional: false;
394
+ };
395
+ recordsUpdated: {
396
+ type: _contractspec_lib_schema123.FieldType<number, number>;
397
+ isOptional: false;
398
+ };
399
+ recordsFailed: {
400
+ type: _contractspec_lib_schema123.FieldType<number, number>;
401
+ isOptional: false;
402
+ };
403
+ errorMessage: {
404
+ type: _contractspec_lib_schema123.FieldType<string, string>;
405
+ isOptional: true;
406
+ };
407
+ startedAt: {
408
+ type: _contractspec_lib_schema123.FieldType<Date, string>;
409
+ isOptional: true;
410
+ };
411
+ completedAt: {
412
+ type: _contractspec_lib_schema123.FieldType<Date, string>;
413
+ isOptional: true;
414
+ };
415
+ createdAt: {
416
+ type: _contractspec_lib_schema123.FieldType<Date, string>;
417
+ isOptional: false;
418
+ };
419
+ }>;
420
+ }[]>;
421
+ /**
422
+ * List sync run history.
423
+ */
424
+ declare const ListSyncRunsContract: _contractspec_lib_contracts26.OperationSpec<_contractspec_lib_schema123.SchemaModel<{
425
+ syncConfigId: {
426
+ type: _contractspec_lib_schema123.FieldType<string, string>;
427
+ isOptional: false;
428
+ };
429
+ status: {
430
+ type: _contractspec_lib_schema123.EnumType<[string, string, string, string, string]>;
431
+ isOptional: true;
432
+ };
433
+ limit: {
434
+ type: _contractspec_lib_schema123.FieldType<number, number>;
435
+ isOptional: true;
436
+ defaultValue: number;
437
+ };
438
+ offset: {
439
+ type: _contractspec_lib_schema123.FieldType<number, number>;
440
+ isOptional: true;
441
+ defaultValue: number;
442
+ };
443
+ }>, _contractspec_lib_schema123.SchemaModel<{
444
+ runs: {
445
+ type: _contractspec_lib_schema123.SchemaModel<{
446
+ id: {
447
+ type: _contractspec_lib_schema123.FieldType<string, string>;
448
+ isOptional: false;
449
+ };
450
+ syncConfigId: {
451
+ type: _contractspec_lib_schema123.FieldType<string, string>;
452
+ isOptional: false;
453
+ };
454
+ status: {
455
+ type: _contractspec_lib_schema123.EnumType<[string, string, string, string, string]>;
456
+ isOptional: false;
457
+ };
458
+ direction: {
459
+ type: _contractspec_lib_schema123.EnumType<[string, string, string]>;
460
+ isOptional: false;
461
+ };
462
+ trigger: {
463
+ type: _contractspec_lib_schema123.FieldType<string, string>;
464
+ isOptional: false;
465
+ };
466
+ recordsProcessed: {
467
+ type: _contractspec_lib_schema123.FieldType<number, number>;
468
+ isOptional: false;
469
+ };
470
+ recordsCreated: {
471
+ type: _contractspec_lib_schema123.FieldType<number, number>;
472
+ isOptional: false;
473
+ };
474
+ recordsUpdated: {
475
+ type: _contractspec_lib_schema123.FieldType<number, number>;
476
+ isOptional: false;
477
+ };
478
+ recordsFailed: {
479
+ type: _contractspec_lib_schema123.FieldType<number, number>;
480
+ isOptional: false;
481
+ };
482
+ errorMessage: {
483
+ type: _contractspec_lib_schema123.FieldType<string, string>;
484
+ isOptional: true;
485
+ };
486
+ startedAt: {
487
+ type: _contractspec_lib_schema123.FieldType<Date, string>;
488
+ isOptional: true;
489
+ };
490
+ completedAt: {
491
+ type: _contractspec_lib_schema123.FieldType<Date, string>;
492
+ isOptional: true;
493
+ };
494
+ createdAt: {
495
+ type: _contractspec_lib_schema123.FieldType<Date, string>;
496
+ isOptional: false;
497
+ };
498
+ }>;
499
+ isArray: true;
500
+ isOptional: false;
501
+ };
502
+ total: {
503
+ type: _contractspec_lib_schema123.FieldType<number, number>;
504
+ isOptional: false;
505
+ };
506
+ }>, undefined>;
507
+ //#endregion
508
+ export { AddFieldMappingContract, CreateSyncConfigContract, ListSyncRunsContract, TriggerSyncContract };
509
+ //# sourceMappingURL=sync.operations.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sync.operations.d.ts","names":[],"sources":["../../src/sync/sync.operations.ts"],"sourcesContent":[],"mappings":";;;;;;;cAoBa,wDAAwB,0CAAA;EAAxB,aAAA,EAAA;IA6CX,IAAA,EAAA,2BAAA,CAAA,SAAA,CAAA,MAAA,EAAA,MAAA,CAAA;;;;;;;;+CA7CmC,CAAA,MAAA,EAAA,MAAA,CAAA;IAAA,UAAA,EAAA,KAAA;;;;;;;;;;;;;;;;;;;;;;;;UAAA,2BAAA,CAAA;;;;;;;;;;;;;;;;8CAAA,CAAA,CAAA,MAAA,EAAA,MAAA,EAAA,MAAA,CAAA,CAAA;IAAA,UAAA,EAAA,KAAA;EAkDxB,CAAA;EA4CX,YAAA,EAAA;;;;;;;;;+CA5CkC,CAAA,OAAA,EAAA,OAAA,CAAA;IAAA,UAAA,EAAA,KAAA;;;;;;;;;;;;;;;IAAA,IAAA,yCAAA,CAAA;MAiDvB,EAAA,EAAA;QAyCX,IAAA,uCAAA,CAAA,MAAA,EAAA,MAAA,CAAA;;;;QAzC8B,IAAA,uCAAA,CAAA,MAAA,EAAA,MAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAAA,CAAA;IA8CnB,YAAA,EAAA;MA8BX,IAAA,uCAAA,CAAA,MAAA,EAAA,MAAA,CAAA;;;;iDA9B+B,CAAA,MAAA,EAAA,MAAA,CAAA;MAAA,UAAA,EAAA,KAAA;;;;;;;;;;;;;;;;;;;iDAAA,CAAA,MAAA,EAAA,MAAA,CAAA;MAAA,UAAA,EAAA,IAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cA/FpB,uDAAuB,0CAAA;;UA4ClC,2BAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UA5CkC,2BAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAiDvB,mDAAmB,0CAAA;;UAyC9B,2BAAA,CAAA;;;;;;;;;;;;;UAzC8B,2BAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cA8CnB,oDAAoB,0CAAA;;UA8B/B,2BAAA,CAAA;;;;;;;;;;;;;;;;;;;;;cA9B+B,2BAAA,CAAA"}