@lssm/example.integration-hub 0.0.0-canary-20251221132705 → 0.0.0-canary-20251221153314
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.
- package/dist/connection/connection.enum.d.ts +2 -2
- package/dist/connection/connection.enum.d.ts.map +1 -1
- package/dist/connection/connection.operation.d.ts +27 -27
- package/dist/connection/connection.operation.d.ts.map +1 -1
- package/dist/connection/connection.operation.js +2 -1
- package/dist/connection/connection.operation.js.map +1 -1
- package/dist/connection/connection.schema.d.ts +16 -16
- package/dist/connection/connection.schema.d.ts.map +1 -1
- package/dist/events.d.ts +43 -43
- package/dist/events.d.ts.map +1 -1
- package/dist/integration/integration.contracts.d.ts +25 -25
- package/dist/integration/integration.contracts.d.ts.map +1 -1
- package/dist/integration/integration.contracts.js +2 -1
- package/dist/integration/integration.contracts.js.map +1 -1
- package/dist/integration/integration.enum.d.ts +2 -2
- package/dist/integration/integration.schema.d.ts +16 -16
- package/dist/integration/integration.schema.d.ts.map +1 -1
- package/dist/libs/contracts/dist/capabilities/index.js +1 -0
- package/dist/libs/contracts/dist/client/react/feature-render.js +2 -1
- package/dist/libs/contracts/dist/client/react/form-render.js +1 -1
- package/dist/libs/contracts/dist/data-views/data-views.js +1 -0
- package/dist/libs/contracts/dist/docs/tech/llm/llm-integration.docblock.js +2 -2
- package/dist/libs/contracts/dist/docs/tech/llm/llm-integration.docblock.js.map +1 -1
- package/dist/libs/contracts/dist/forms/forms.js +1 -0
- package/dist/libs/contracts/dist/index.js +15 -12
- package/dist/libs/contracts/dist/index.js.map +1 -1
- package/dist/libs/contracts/dist/install.js +1 -1
- package/dist/libs/contracts/dist/integrations/openbanking/contracts/accounts.js +2 -1
- package/dist/libs/contracts/dist/integrations/openbanking/contracts/accounts.js.map +1 -1
- package/dist/libs/contracts/dist/integrations/openbanking/contracts/balances.js +2 -1
- package/dist/libs/contracts/dist/integrations/openbanking/contracts/balances.js.map +1 -1
- package/dist/libs/contracts/dist/integrations/openbanking/contracts/transactions.js +2 -1
- package/dist/libs/contracts/dist/integrations/openbanking/contracts/transactions.js.map +1 -1
- package/dist/libs/contracts/dist/integrations/{contracts.js → operations.js} +4 -3
- package/dist/libs/contracts/dist/integrations/operations.js.map +1 -0
- package/dist/libs/contracts/dist/knowledge/{contracts.js → operations.js} +4 -3
- package/dist/libs/contracts/dist/knowledge/operations.js.map +1 -0
- package/dist/libs/contracts/dist/llm/exporters.js +1 -0
- package/dist/libs/contracts/dist/llm/exporters.js.map +1 -1
- package/dist/libs/contracts/dist/onboarding-base.js +2 -1
- package/dist/libs/contracts/dist/onboarding-base.js.map +1 -1
- package/dist/libs/contracts/dist/operations/index.js +2 -0
- package/dist/libs/contracts/dist/{operation.js → operations/operation.js} +1 -1
- package/dist/libs/contracts/dist/operations/operation.js.map +1 -0
- package/dist/libs/contracts/dist/operations/registry.js +2 -0
- package/dist/libs/contracts/dist/presentations/index.js +2 -0
- package/dist/libs/contracts/dist/presentations/presentations.js +2 -0
- package/dist/libs/contracts/dist/{presentations.v2.js → presentations/transform-engine.js} +2 -2
- package/dist/libs/contracts/dist/presentations/transform-engine.js.map +1 -0
- package/dist/libs/contracts/dist/server/mcp/registerPresentations.js +3 -2
- package/dist/sync/sync.contracts.d.ts +126 -126
- package/dist/sync/sync.contracts.d.ts.map +1 -1
- package/dist/sync/sync.contracts.js +2 -1
- package/dist/sync/sync.contracts.js.map +1 -1
- package/dist/sync/sync.enum.d.ts +4 -4
- package/dist/sync/sync.schema.d.ts +85 -85
- package/dist/sync/sync.schema.d.ts.map +1 -1
- package/package.json +12 -12
- package/dist/libs/contracts/dist/data-views.js +0 -1
- package/dist/libs/contracts/dist/forms.js +0 -1
- package/dist/libs/contracts/dist/integrations/contracts.js.map +0 -1
- package/dist/libs/contracts/dist/knowledge/contracts.js.map +0 -1
- package/dist/libs/contracts/dist/operation.js.map +0 -1
- package/dist/libs/contracts/dist/presentations.js +0 -2
- package/dist/libs/contracts/dist/presentations.v2.js.map +0 -1
- package/dist/libs/contracts/dist/registry.js +0 -3
package/dist/sync/sync.enum.d.ts
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as _lssm_lib_schema203 from "@lssm/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:
|
|
7
|
+
declare const SyncDirectionEnum: _lssm_lib_schema203.EnumType<[string, string, string]>;
|
|
8
8
|
/**
|
|
9
9
|
* Sync status enum.
|
|
10
10
|
*/
|
|
11
|
-
declare const SyncStatusEnum:
|
|
11
|
+
declare const SyncStatusEnum: _lssm_lib_schema203.EnumType<[string, string, string, string, string]>;
|
|
12
12
|
/**
|
|
13
13
|
* Mapping type enum.
|
|
14
14
|
*/
|
|
15
|
-
declare const MappingTypeEnum:
|
|
15
|
+
declare const MappingTypeEnum: _lssm_lib_schema203.EnumType<[string, string, string, string, string]>;
|
|
16
16
|
//#endregion
|
|
17
17
|
export { MappingTypeEnum, SyncDirectionEnum, SyncStatusEnum };
|
|
18
18
|
//# sourceMappingURL=sync.enum.d.ts.map
|
|
@@ -1,107 +1,107 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as _lssm_lib_schema206 from "@lssm/lib.schema";
|
|
2
2
|
|
|
3
3
|
//#region src/sync/sync.schema.d.ts
|
|
4
4
|
/**
|
|
5
5
|
* A field mapping configuration.
|
|
6
6
|
*/
|
|
7
|
-
declare const FieldMappingModel:
|
|
7
|
+
declare const FieldMappingModel: _lssm_lib_schema206.SchemaModel<{
|
|
8
8
|
id: {
|
|
9
|
-
type:
|
|
9
|
+
type: _lssm_lib_schema206.FieldType<string, string>;
|
|
10
10
|
isOptional: false;
|
|
11
11
|
};
|
|
12
12
|
sourceField: {
|
|
13
|
-
type:
|
|
13
|
+
type: _lssm_lib_schema206.FieldType<string, string>;
|
|
14
14
|
isOptional: false;
|
|
15
15
|
};
|
|
16
16
|
targetField: {
|
|
17
|
-
type:
|
|
17
|
+
type: _lssm_lib_schema206.FieldType<string, string>;
|
|
18
18
|
isOptional: false;
|
|
19
19
|
};
|
|
20
20
|
mappingType: {
|
|
21
|
-
type:
|
|
21
|
+
type: _lssm_lib_schema206.EnumType<[string, string, string, string, string]>;
|
|
22
22
|
isOptional: false;
|
|
23
23
|
};
|
|
24
24
|
transformExpression: {
|
|
25
|
-
type:
|
|
25
|
+
type: _lssm_lib_schema206.FieldType<string, string>;
|
|
26
26
|
isOptional: true;
|
|
27
27
|
};
|
|
28
28
|
isRequired: {
|
|
29
|
-
type:
|
|
29
|
+
type: _lssm_lib_schema206.FieldType<boolean, boolean>;
|
|
30
30
|
isOptional: false;
|
|
31
31
|
};
|
|
32
32
|
}>;
|
|
33
33
|
/**
|
|
34
34
|
* A sync configuration.
|
|
35
35
|
*/
|
|
36
|
-
declare const SyncConfigModel:
|
|
36
|
+
declare const SyncConfigModel: _lssm_lib_schema206.SchemaModel<{
|
|
37
37
|
id: {
|
|
38
|
-
type:
|
|
38
|
+
type: _lssm_lib_schema206.FieldType<string, string>;
|
|
39
39
|
isOptional: false;
|
|
40
40
|
};
|
|
41
41
|
integrationId: {
|
|
42
|
-
type:
|
|
42
|
+
type: _lssm_lib_schema206.FieldType<string, string>;
|
|
43
43
|
isOptional: false;
|
|
44
44
|
};
|
|
45
45
|
connectionId: {
|
|
46
|
-
type:
|
|
46
|
+
type: _lssm_lib_schema206.FieldType<string, string>;
|
|
47
47
|
isOptional: false;
|
|
48
48
|
};
|
|
49
49
|
name: {
|
|
50
|
-
type:
|
|
50
|
+
type: _lssm_lib_schema206.FieldType<string, string>;
|
|
51
51
|
isOptional: false;
|
|
52
52
|
};
|
|
53
53
|
direction: {
|
|
54
|
-
type:
|
|
54
|
+
type: _lssm_lib_schema206.EnumType<[string, string, string]>;
|
|
55
55
|
isOptional: false;
|
|
56
56
|
};
|
|
57
57
|
sourceObject: {
|
|
58
|
-
type:
|
|
58
|
+
type: _lssm_lib_schema206.FieldType<string, string>;
|
|
59
59
|
isOptional: false;
|
|
60
60
|
};
|
|
61
61
|
targetObject: {
|
|
62
|
-
type:
|
|
62
|
+
type: _lssm_lib_schema206.FieldType<string, string>;
|
|
63
63
|
isOptional: false;
|
|
64
64
|
};
|
|
65
65
|
scheduleEnabled: {
|
|
66
|
-
type:
|
|
66
|
+
type: _lssm_lib_schema206.FieldType<boolean, boolean>;
|
|
67
67
|
isOptional: false;
|
|
68
68
|
};
|
|
69
69
|
scheduleCron: {
|
|
70
|
-
type:
|
|
70
|
+
type: _lssm_lib_schema206.FieldType<string, string>;
|
|
71
71
|
isOptional: true;
|
|
72
72
|
};
|
|
73
73
|
isActive: {
|
|
74
|
-
type:
|
|
74
|
+
type: _lssm_lib_schema206.FieldType<boolean, boolean>;
|
|
75
75
|
isOptional: false;
|
|
76
76
|
};
|
|
77
77
|
lastSyncAt: {
|
|
78
|
-
type:
|
|
78
|
+
type: _lssm_lib_schema206.FieldType<Date, string>;
|
|
79
79
|
isOptional: true;
|
|
80
80
|
};
|
|
81
81
|
fieldMappings: {
|
|
82
|
-
type:
|
|
82
|
+
type: _lssm_lib_schema206.SchemaModel<{
|
|
83
83
|
id: {
|
|
84
|
-
type:
|
|
84
|
+
type: _lssm_lib_schema206.FieldType<string, string>;
|
|
85
85
|
isOptional: false;
|
|
86
86
|
};
|
|
87
87
|
sourceField: {
|
|
88
|
-
type:
|
|
88
|
+
type: _lssm_lib_schema206.FieldType<string, string>;
|
|
89
89
|
isOptional: false;
|
|
90
90
|
};
|
|
91
91
|
targetField: {
|
|
92
|
-
type:
|
|
92
|
+
type: _lssm_lib_schema206.FieldType<string, string>;
|
|
93
93
|
isOptional: false;
|
|
94
94
|
};
|
|
95
95
|
mappingType: {
|
|
96
|
-
type:
|
|
96
|
+
type: _lssm_lib_schema206.EnumType<[string, string, string, string, string]>;
|
|
97
97
|
isOptional: false;
|
|
98
98
|
};
|
|
99
99
|
transformExpression: {
|
|
100
|
-
type:
|
|
100
|
+
type: _lssm_lib_schema206.FieldType<string, string>;
|
|
101
101
|
isOptional: true;
|
|
102
102
|
};
|
|
103
103
|
isRequired: {
|
|
104
|
-
type:
|
|
104
|
+
type: _lssm_lib_schema206.FieldType<boolean, boolean>;
|
|
105
105
|
isOptional: false;
|
|
106
106
|
};
|
|
107
107
|
}>;
|
|
@@ -112,174 +112,174 @@ declare const SyncConfigModel: _lssm_lib_schema41.SchemaModel<{
|
|
|
112
112
|
/**
|
|
113
113
|
* A sync run.
|
|
114
114
|
*/
|
|
115
|
-
declare const SyncRunModel:
|
|
115
|
+
declare const SyncRunModel: _lssm_lib_schema206.SchemaModel<{
|
|
116
116
|
id: {
|
|
117
|
-
type:
|
|
117
|
+
type: _lssm_lib_schema206.FieldType<string, string>;
|
|
118
118
|
isOptional: false;
|
|
119
119
|
};
|
|
120
120
|
syncConfigId: {
|
|
121
|
-
type:
|
|
121
|
+
type: _lssm_lib_schema206.FieldType<string, string>;
|
|
122
122
|
isOptional: false;
|
|
123
123
|
};
|
|
124
124
|
status: {
|
|
125
|
-
type:
|
|
125
|
+
type: _lssm_lib_schema206.EnumType<[string, string, string, string, string]>;
|
|
126
126
|
isOptional: false;
|
|
127
127
|
};
|
|
128
128
|
direction: {
|
|
129
|
-
type:
|
|
129
|
+
type: _lssm_lib_schema206.EnumType<[string, string, string]>;
|
|
130
130
|
isOptional: false;
|
|
131
131
|
};
|
|
132
132
|
trigger: {
|
|
133
|
-
type:
|
|
133
|
+
type: _lssm_lib_schema206.FieldType<string, string>;
|
|
134
134
|
isOptional: false;
|
|
135
135
|
};
|
|
136
136
|
recordsProcessed: {
|
|
137
|
-
type:
|
|
137
|
+
type: _lssm_lib_schema206.FieldType<number, number>;
|
|
138
138
|
isOptional: false;
|
|
139
139
|
};
|
|
140
140
|
recordsCreated: {
|
|
141
|
-
type:
|
|
141
|
+
type: _lssm_lib_schema206.FieldType<number, number>;
|
|
142
142
|
isOptional: false;
|
|
143
143
|
};
|
|
144
144
|
recordsUpdated: {
|
|
145
|
-
type:
|
|
145
|
+
type: _lssm_lib_schema206.FieldType<number, number>;
|
|
146
146
|
isOptional: false;
|
|
147
147
|
};
|
|
148
148
|
recordsFailed: {
|
|
149
|
-
type:
|
|
149
|
+
type: _lssm_lib_schema206.FieldType<number, number>;
|
|
150
150
|
isOptional: false;
|
|
151
151
|
};
|
|
152
152
|
errorMessage: {
|
|
153
|
-
type:
|
|
153
|
+
type: _lssm_lib_schema206.FieldType<string, string>;
|
|
154
154
|
isOptional: true;
|
|
155
155
|
};
|
|
156
156
|
startedAt: {
|
|
157
|
-
type:
|
|
157
|
+
type: _lssm_lib_schema206.FieldType<Date, string>;
|
|
158
158
|
isOptional: true;
|
|
159
159
|
};
|
|
160
160
|
completedAt: {
|
|
161
|
-
type:
|
|
161
|
+
type: _lssm_lib_schema206.FieldType<Date, string>;
|
|
162
162
|
isOptional: true;
|
|
163
163
|
};
|
|
164
164
|
createdAt: {
|
|
165
|
-
type:
|
|
165
|
+
type: _lssm_lib_schema206.FieldType<Date, string>;
|
|
166
166
|
isOptional: false;
|
|
167
167
|
};
|
|
168
168
|
}>;
|
|
169
169
|
/**
|
|
170
170
|
* Input for creating a sync config.
|
|
171
171
|
*/
|
|
172
|
-
declare const CreateSyncConfigInputModel:
|
|
172
|
+
declare const CreateSyncConfigInputModel: _lssm_lib_schema206.SchemaModel<{
|
|
173
173
|
integrationId: {
|
|
174
|
-
type:
|
|
174
|
+
type: _lssm_lib_schema206.FieldType<string, string>;
|
|
175
175
|
isOptional: false;
|
|
176
176
|
};
|
|
177
177
|
connectionId: {
|
|
178
|
-
type:
|
|
178
|
+
type: _lssm_lib_schema206.FieldType<string, string>;
|
|
179
179
|
isOptional: false;
|
|
180
180
|
};
|
|
181
181
|
name: {
|
|
182
|
-
type:
|
|
182
|
+
type: _lssm_lib_schema206.FieldType<string, string>;
|
|
183
183
|
isOptional: false;
|
|
184
184
|
};
|
|
185
185
|
direction: {
|
|
186
|
-
type:
|
|
186
|
+
type: _lssm_lib_schema206.EnumType<[string, string, string]>;
|
|
187
187
|
isOptional: false;
|
|
188
188
|
};
|
|
189
189
|
sourceObject: {
|
|
190
|
-
type:
|
|
190
|
+
type: _lssm_lib_schema206.FieldType<string, string>;
|
|
191
191
|
isOptional: false;
|
|
192
192
|
};
|
|
193
193
|
targetObject: {
|
|
194
|
-
type:
|
|
194
|
+
type: _lssm_lib_schema206.FieldType<string, string>;
|
|
195
195
|
isOptional: false;
|
|
196
196
|
};
|
|
197
197
|
scheduleEnabled: {
|
|
198
|
-
type:
|
|
198
|
+
type: _lssm_lib_schema206.FieldType<boolean, boolean>;
|
|
199
199
|
isOptional: true;
|
|
200
200
|
};
|
|
201
201
|
scheduleCron: {
|
|
202
|
-
type:
|
|
202
|
+
type: _lssm_lib_schema206.FieldType<string, string>;
|
|
203
203
|
isOptional: true;
|
|
204
204
|
};
|
|
205
205
|
}>;
|
|
206
206
|
/**
|
|
207
207
|
* Input for adding a field mapping.
|
|
208
208
|
*/
|
|
209
|
-
declare const AddFieldMappingInputModel:
|
|
209
|
+
declare const AddFieldMappingInputModel: _lssm_lib_schema206.SchemaModel<{
|
|
210
210
|
syncConfigId: {
|
|
211
|
-
type:
|
|
211
|
+
type: _lssm_lib_schema206.FieldType<string, string>;
|
|
212
212
|
isOptional: false;
|
|
213
213
|
};
|
|
214
214
|
sourceField: {
|
|
215
|
-
type:
|
|
215
|
+
type: _lssm_lib_schema206.FieldType<string, string>;
|
|
216
216
|
isOptional: false;
|
|
217
217
|
};
|
|
218
218
|
targetField: {
|
|
219
|
-
type:
|
|
219
|
+
type: _lssm_lib_schema206.FieldType<string, string>;
|
|
220
220
|
isOptional: false;
|
|
221
221
|
};
|
|
222
222
|
mappingType: {
|
|
223
|
-
type:
|
|
223
|
+
type: _lssm_lib_schema206.EnumType<[string, string, string, string, string]>;
|
|
224
224
|
isOptional: false;
|
|
225
225
|
};
|
|
226
226
|
transformExpression: {
|
|
227
|
-
type:
|
|
227
|
+
type: _lssm_lib_schema206.FieldType<string, string>;
|
|
228
228
|
isOptional: true;
|
|
229
229
|
};
|
|
230
230
|
lookupConfig: {
|
|
231
|
-
type:
|
|
231
|
+
type: _lssm_lib_schema206.FieldType<unknown, unknown>;
|
|
232
232
|
isOptional: true;
|
|
233
233
|
};
|
|
234
234
|
constantValue: {
|
|
235
|
-
type:
|
|
235
|
+
type: _lssm_lib_schema206.FieldType<unknown, unknown>;
|
|
236
236
|
isOptional: true;
|
|
237
237
|
};
|
|
238
238
|
isRequired: {
|
|
239
|
-
type:
|
|
239
|
+
type: _lssm_lib_schema206.FieldType<boolean, boolean>;
|
|
240
240
|
isOptional: true;
|
|
241
241
|
};
|
|
242
242
|
defaultValue: {
|
|
243
|
-
type:
|
|
243
|
+
type: _lssm_lib_schema206.FieldType<unknown, unknown>;
|
|
244
244
|
isOptional: true;
|
|
245
245
|
};
|
|
246
246
|
}>;
|
|
247
247
|
/**
|
|
248
248
|
* Input for triggering a sync.
|
|
249
249
|
*/
|
|
250
|
-
declare const TriggerSyncInputModel:
|
|
250
|
+
declare const TriggerSyncInputModel: _lssm_lib_schema206.SchemaModel<{
|
|
251
251
|
syncConfigId: {
|
|
252
|
-
type:
|
|
252
|
+
type: _lssm_lib_schema206.FieldType<string, string>;
|
|
253
253
|
isOptional: false;
|
|
254
254
|
};
|
|
255
255
|
direction: {
|
|
256
|
-
type:
|
|
256
|
+
type: _lssm_lib_schema206.EnumType<[string, string, string]>;
|
|
257
257
|
isOptional: true;
|
|
258
258
|
};
|
|
259
259
|
fullSync: {
|
|
260
|
-
type:
|
|
260
|
+
type: _lssm_lib_schema206.FieldType<boolean, boolean>;
|
|
261
261
|
isOptional: true;
|
|
262
262
|
};
|
|
263
263
|
}>;
|
|
264
264
|
/**
|
|
265
265
|
* Input for listing sync runs.
|
|
266
266
|
*/
|
|
267
|
-
declare const ListSyncRunsInputModel:
|
|
267
|
+
declare const ListSyncRunsInputModel: _lssm_lib_schema206.SchemaModel<{
|
|
268
268
|
syncConfigId: {
|
|
269
|
-
type:
|
|
269
|
+
type: _lssm_lib_schema206.FieldType<string, string>;
|
|
270
270
|
isOptional: false;
|
|
271
271
|
};
|
|
272
272
|
status: {
|
|
273
|
-
type:
|
|
273
|
+
type: _lssm_lib_schema206.EnumType<[string, string, string, string, string]>;
|
|
274
274
|
isOptional: true;
|
|
275
275
|
};
|
|
276
276
|
limit: {
|
|
277
|
-
type:
|
|
277
|
+
type: _lssm_lib_schema206.FieldType<number, number>;
|
|
278
278
|
isOptional: true;
|
|
279
279
|
defaultValue: number;
|
|
280
280
|
};
|
|
281
281
|
offset: {
|
|
282
|
-
type:
|
|
282
|
+
type: _lssm_lib_schema206.FieldType<number, number>;
|
|
283
283
|
isOptional: true;
|
|
284
284
|
defaultValue: number;
|
|
285
285
|
};
|
|
@@ -287,59 +287,59 @@ declare const ListSyncRunsInputModel: _lssm_lib_schema41.SchemaModel<{
|
|
|
287
287
|
/**
|
|
288
288
|
* Output for listing sync runs.
|
|
289
289
|
*/
|
|
290
|
-
declare const ListSyncRunsOutputModel:
|
|
290
|
+
declare const ListSyncRunsOutputModel: _lssm_lib_schema206.SchemaModel<{
|
|
291
291
|
runs: {
|
|
292
|
-
type:
|
|
292
|
+
type: _lssm_lib_schema206.SchemaModel<{
|
|
293
293
|
id: {
|
|
294
|
-
type:
|
|
294
|
+
type: _lssm_lib_schema206.FieldType<string, string>;
|
|
295
295
|
isOptional: false;
|
|
296
296
|
};
|
|
297
297
|
syncConfigId: {
|
|
298
|
-
type:
|
|
298
|
+
type: _lssm_lib_schema206.FieldType<string, string>;
|
|
299
299
|
isOptional: false;
|
|
300
300
|
};
|
|
301
301
|
status: {
|
|
302
|
-
type:
|
|
302
|
+
type: _lssm_lib_schema206.EnumType<[string, string, string, string, string]>;
|
|
303
303
|
isOptional: false;
|
|
304
304
|
};
|
|
305
305
|
direction: {
|
|
306
|
-
type:
|
|
306
|
+
type: _lssm_lib_schema206.EnumType<[string, string, string]>;
|
|
307
307
|
isOptional: false;
|
|
308
308
|
};
|
|
309
309
|
trigger: {
|
|
310
|
-
type:
|
|
310
|
+
type: _lssm_lib_schema206.FieldType<string, string>;
|
|
311
311
|
isOptional: false;
|
|
312
312
|
};
|
|
313
313
|
recordsProcessed: {
|
|
314
|
-
type:
|
|
314
|
+
type: _lssm_lib_schema206.FieldType<number, number>;
|
|
315
315
|
isOptional: false;
|
|
316
316
|
};
|
|
317
317
|
recordsCreated: {
|
|
318
|
-
type:
|
|
318
|
+
type: _lssm_lib_schema206.FieldType<number, number>;
|
|
319
319
|
isOptional: false;
|
|
320
320
|
};
|
|
321
321
|
recordsUpdated: {
|
|
322
|
-
type:
|
|
322
|
+
type: _lssm_lib_schema206.FieldType<number, number>;
|
|
323
323
|
isOptional: false;
|
|
324
324
|
};
|
|
325
325
|
recordsFailed: {
|
|
326
|
-
type:
|
|
326
|
+
type: _lssm_lib_schema206.FieldType<number, number>;
|
|
327
327
|
isOptional: false;
|
|
328
328
|
};
|
|
329
329
|
errorMessage: {
|
|
330
|
-
type:
|
|
330
|
+
type: _lssm_lib_schema206.FieldType<string, string>;
|
|
331
331
|
isOptional: true;
|
|
332
332
|
};
|
|
333
333
|
startedAt: {
|
|
334
|
-
type:
|
|
334
|
+
type: _lssm_lib_schema206.FieldType<Date, string>;
|
|
335
335
|
isOptional: true;
|
|
336
336
|
};
|
|
337
337
|
completedAt: {
|
|
338
|
-
type:
|
|
338
|
+
type: _lssm_lib_schema206.FieldType<Date, string>;
|
|
339
339
|
isOptional: true;
|
|
340
340
|
};
|
|
341
341
|
createdAt: {
|
|
342
|
-
type:
|
|
342
|
+
type: _lssm_lib_schema206.FieldType<Date, string>;
|
|
343
343
|
isOptional: false;
|
|
344
344
|
};
|
|
345
345
|
}>;
|
|
@@ -347,7 +347,7 @@ declare const ListSyncRunsOutputModel: _lssm_lib_schema41.SchemaModel<{
|
|
|
347
347
|
isOptional: false;
|
|
348
348
|
};
|
|
349
349
|
total: {
|
|
350
|
-
type:
|
|
350
|
+
type: _lssm_lib_schema206.FieldType<number, number>;
|
|
351
351
|
isOptional: false;
|
|
352
352
|
};
|
|
353
353
|
}>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sync.schema.d.ts","names":[],"sources":["../../src/sync/sync.schema.ts"],"sourcesContent":[],"mappings":";;;;;;AAUa,cAAA,iBAaX,
|
|
1
|
+
{"version":3,"file":"sync.schema.d.ts","names":[],"sources":["../../src/sync/sync.schema.ts"],"sourcesContent":[],"mappings":";;;;;;AAUa,cAAA,iBAaX,sBAb4B,WAa5B,CAAA;EAAA,EAAA,EAAA;UAAA,mBAAA,CAAA;;;;;qBAb4B;EAAA,CAAA;EAkBjB,WAAA,EAAA;IAmBX,IAAA,+BAAA,CAAA,MAAA,EAAA,MAAA,CAAA;;;;;;;;;;;;;;;;;;;cAnBW,eAAe,sBAAA,WAAA,CAAA;EAAA,EAAA,EAAA;IAwBf,IAAA,EALX,mBAAA,CAAA,SAyBA,CAAA,MAAA,EAAA,MAAA,CAAA;IAAA,UAAA,EAAA,KAAA;;;;;;;;;;;;;;;;qBApBuB;EAAA,CAAA;EAyBZ,YAAA,EAAA;IAeX,IAAA,+BAAA,CAAA,MAAA,EAAA,MAAA,CAAA;;;;;;;;uCAfqC,CAAA,OAAA,EAAA,OAAA,CAAA;IAAA,UAAA,EAAA,KAAA;EAoB1B,CAAA;EAgBX,YAAA,EAAA;;;;;;;;;uCAhBoC,KAAA,EAAA,MAAA,CAAA;IAAA,UAAA,EAAA,IAAA;EAqBzB,CAAA;EAOX,aAAA,EAAA;;;2CAPgC,CAAA,MAAA,EAAA,MAAA,CAAA;QAAA,UAAA,EAAA,KAAA;MAYrB,CAAA;MAgBX,WAAA,EAAA;;;;iBAhBiC,EAAA;QAAA,IAAA,+BAAA,CAAA,MAAA,EAAA,MAAA,CAAA;QAqBtB,UAAA,EAAA,KAMX;MAAA,CAAA;;;;;;;;;;;;;;;;;;;;;cAzGW,kCAAY;;UAoBvB,mBAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAKW,gDAA0B;;UAerC,mBAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAKW,+CAAyB;;UAgBpC,mBAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAKW,2CAAqB;;UAOhC,mBAAA,CAAA;;;;;;;;;;;;;;;cAKW,4CAAsB;;UAgBjC,mBAAA,CAAA;;;;;;;;;;;;;;;;;;;;;cAKW,6CAAuB;;;;cAMlC,mBAAA,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lssm/example.integration-hub",
|
|
3
|
-
"version": "0.0.0-canary-
|
|
3
|
+
"version": "0.0.0-canary-20251221153314",
|
|
4
4
|
"description": "Integration Hub example with sync engine and field mappings for ContractSpec",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -18,20 +18,20 @@
|
|
|
18
18
|
"lint:check": "eslint src"
|
|
19
19
|
},
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@lssm/lib.schema": "0.0.0-canary-
|
|
22
|
-
"@lssm/lib.contracts": "0.0.0-canary-
|
|
23
|
-
"@lssm/lib.bus": "0.0.0-canary-
|
|
24
|
-
"@lssm/lib.identity-rbac": "0.0.0-canary-
|
|
25
|
-
"@lssm/lib.files": "0.0.0-canary-
|
|
26
|
-
"@lssm/lib.feature-flags": "0.0.0-canary-
|
|
27
|
-
"@lssm/lib.jobs": "0.0.0-canary-
|
|
28
|
-
"@lssm/module.audit-trail": "0.0.0-canary-
|
|
29
|
-
"@lssm/module.notifications": "0.0.0-canary-
|
|
21
|
+
"@lssm/lib.schema": "0.0.0-canary-20251221153314",
|
|
22
|
+
"@lssm/lib.contracts": "0.0.0-canary-20251221153314",
|
|
23
|
+
"@lssm/lib.bus": "0.0.0-canary-20251221153314",
|
|
24
|
+
"@lssm/lib.identity-rbac": "0.0.0-canary-20251221153314",
|
|
25
|
+
"@lssm/lib.files": "0.0.0-canary-20251221153314",
|
|
26
|
+
"@lssm/lib.feature-flags": "0.0.0-canary-20251221153314",
|
|
27
|
+
"@lssm/lib.jobs": "0.0.0-canary-20251221153314",
|
|
28
|
+
"@lssm/module.audit-trail": "0.0.0-canary-20251221153314",
|
|
29
|
+
"@lssm/module.notifications": "0.0.0-canary-20251221153314",
|
|
30
30
|
"zod": "^4.1.13"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
|
-
"@lssm/tool.typescript": "0.0.0-canary-
|
|
34
|
-
"@lssm/tool.tsdown": "0.0.0-canary-
|
|
33
|
+
"@lssm/tool.typescript": "0.0.0-canary-20251221153314",
|
|
34
|
+
"@lssm/tool.tsdown": "0.0.0-canary-20251221153314",
|
|
35
35
|
"typescript": "^5.9.3"
|
|
36
36
|
},
|
|
37
37
|
"exports": {
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import "./registry-utils.js";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import "./registry-utils.js";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"contracts.js","names":[],"sources":["../../../../../../../libs/contracts/dist/integrations/contracts.js"],"sourcesContent":["import { E5, x8 } from \"../schema/dist/index.js\";\nimport { defineCommand, defineQuery } from \"../operation.js\";\n\n//#region src/integrations/contracts.ts\nconst IntegrationConnectionRecord = new x8({\n\tname: \"IntegrationConnectionRecord\",\n\tfields: {\n\t\tid: {\n\t\t\ttype: E5.ID(),\n\t\t\tisOptional: false\n\t\t},\n\t\ttenantId: {\n\t\t\ttype: E5.ID(),\n\t\t\tisOptional: false\n\t\t},\n\t\tintegrationKey: {\n\t\t\ttype: E5.NonEmptyString(),\n\t\t\tisOptional: false\n\t\t},\n\t\tintegrationVersion: {\n\t\t\ttype: E5.Int_unsecure(),\n\t\t\tisOptional: false\n\t\t},\n\t\tlabel: {\n\t\t\ttype: E5.String_unsecure(),\n\t\t\tisOptional: false\n\t\t},\n\t\townershipMode: {\n\t\t\ttype: E5.String_unsecure(),\n\t\t\tisOptional: false\n\t\t},\n\t\texternalAccountId: {\n\t\t\ttype: E5.String_unsecure(),\n\t\t\tisOptional: true\n\t\t},\n\t\tsecretProvider: {\n\t\t\ttype: E5.String_unsecure(),\n\t\t\tisOptional: false\n\t\t},\n\t\tsecretRef: {\n\t\t\ttype: E5.String_unsecure(),\n\t\t\tisOptional: false\n\t\t},\n\t\tstatus: {\n\t\t\ttype: E5.String_unsecure(),\n\t\t\tisOptional: false\n\t\t},\n\t\tenvironment: {\n\t\t\ttype: E5.String_unsecure(),\n\t\t\tisOptional: true\n\t\t},\n\t\thealthStatus: {\n\t\t\ttype: E5.String_unsecure(),\n\t\t\tisOptional: true\n\t\t},\n\t\thealthCheckedAt: {\n\t\t\ttype: E5.DateTime(),\n\t\t\tisOptional: true\n\t\t},\n\t\thealthLatencyMs: {\n\t\t\ttype: E5.Float_unsecure(),\n\t\t\tisOptional: true\n\t\t},\n\t\thealthErrorCode: {\n\t\t\ttype: E5.String_unsecure(),\n\t\t\tisOptional: true\n\t\t},\n\t\thealthErrorMessage: {\n\t\t\ttype: E5.String_unsecure(),\n\t\t\tisOptional: true\n\t\t},\n\t\tusageRequestCount: {\n\t\t\ttype: E5.Int_unsecure(),\n\t\t\tisOptional: true\n\t\t},\n\t\tusageSuccessCount: {\n\t\t\ttype: E5.Int_unsecure(),\n\t\t\tisOptional: true\n\t\t},\n\t\tusageErrorCount: {\n\t\t\ttype: E5.Int_unsecure(),\n\t\t\tisOptional: true\n\t\t},\n\t\tusageLastUsedAt: {\n\t\t\ttype: E5.DateTime(),\n\t\t\tisOptional: true\n\t\t},\n\t\tusageLastErrorAt: {\n\t\t\ttype: E5.DateTime(),\n\t\t\tisOptional: true\n\t\t},\n\t\tusageLastErrorCode: {\n\t\t\ttype: E5.String_unsecure(),\n\t\t\tisOptional: true\n\t\t},\n\t\tcreatedAt: {\n\t\t\ttype: E5.DateTime(),\n\t\t\tisOptional: true\n\t\t},\n\t\tupdatedAt: {\n\t\t\ttype: E5.DateTime(),\n\t\t\tisOptional: true\n\t\t}\n\t}\n});\nconst CreateIntegrationConnectionInput = new x8({\n\tname: \"CreateIntegrationConnectionInput\",\n\tfields: {\n\t\ttenantId: {\n\t\t\ttype: E5.ID(),\n\t\t\tisOptional: false\n\t\t},\n\t\tintegrationKey: {\n\t\t\ttype: E5.NonEmptyString(),\n\t\t\tisOptional: false\n\t\t},\n\t\tintegrationVersion: {\n\t\t\ttype: E5.Int_unsecure(),\n\t\t\tisOptional: false\n\t\t},\n\t\tlabel: {\n\t\t\ttype: E5.String_unsecure(),\n\t\t\tisOptional: false\n\t\t},\n\t\townershipMode: {\n\t\t\ttype: E5.String_unsecure(),\n\t\t\tisOptional: false\n\t\t},\n\t\texternalAccountId: {\n\t\t\ttype: E5.String_unsecure(),\n\t\t\tisOptional: true\n\t\t},\n\t\tsecretProvider: {\n\t\t\ttype: E5.String_unsecure(),\n\t\t\tisOptional: false\n\t\t},\n\t\tsecretRef: {\n\t\t\ttype: E5.String_unsecure(),\n\t\t\tisOptional: false\n\t\t},\n\t\tenvironment: {\n\t\t\ttype: E5.String_unsecure(),\n\t\t\tisOptional: true\n\t\t},\n\t\tconfig: {\n\t\t\ttype: E5.JSONObject(),\n\t\t\tisOptional: false\n\t\t}\n\t}\n});\nconst UpdateIntegrationConnectionInput = new x8({\n\tname: \"UpdateIntegrationConnectionInput\",\n\tfields: {\n\t\tconnectionId: {\n\t\t\ttype: E5.ID(),\n\t\t\tisOptional: false\n\t\t},\n\t\tlabel: {\n\t\t\ttype: E5.String_unsecure(),\n\t\t\tisOptional: true\n\t\t},\n\t\tstatus: {\n\t\t\ttype: E5.String_unsecure(),\n\t\t\tisOptional: true\n\t\t},\n\t\townershipMode: {\n\t\t\ttype: E5.String_unsecure(),\n\t\t\tisOptional: true\n\t\t},\n\t\texternalAccountId: {\n\t\t\ttype: E5.String_unsecure(),\n\t\t\tisOptional: true\n\t\t},\n\t\tsecretProvider: {\n\t\t\ttype: E5.String_unsecure(),\n\t\t\tisOptional: true\n\t\t},\n\t\tsecretRef: {\n\t\t\ttype: E5.String_unsecure(),\n\t\t\tisOptional: true\n\t\t},\n\t\tconfig: {\n\t\t\ttype: E5.JSONObject(),\n\t\t\tisOptional: true\n\t\t}\n\t}\n});\nconst DeleteIntegrationConnectionInput = new x8({\n\tname: \"DeleteIntegrationConnectionInput\",\n\tfields: { connectionId: {\n\t\ttype: E5.ID(),\n\t\tisOptional: false\n\t} }\n});\nconst ListIntegrationConnectionsInput = new x8({\n\tname: \"ListIntegrationConnectionsInput\",\n\tfields: {\n\t\ttenantId: {\n\t\t\ttype: E5.ID(),\n\t\t\tisOptional: false\n\t\t},\n\t\tcategory: {\n\t\t\ttype: E5.String_unsecure(),\n\t\t\tisOptional: true\n\t\t},\n\t\tstatus: {\n\t\t\ttype: E5.String_unsecure(),\n\t\t\tisOptional: true\n\t\t}\n\t}\n});\nconst ListIntegrationConnectionsOutput = new x8({\n\tname: \"ListIntegrationConnectionsOutput\",\n\tfields: { connections: {\n\t\ttype: IntegrationConnectionRecord,\n\t\tisOptional: false,\n\t\tisArray: true\n\t} }\n});\nconst TestIntegrationConnectionInput = new x8({\n\tname: \"TestIntegrationConnectionInput\",\n\tfields: { connectionId: {\n\t\ttype: E5.ID(),\n\t\tisOptional: false\n\t} }\n});\nconst TestIntegrationConnectionOutput = new x8({\n\tname: \"TestIntegrationConnectionOutput\",\n\tfields: {\n\t\tsuccess: {\n\t\t\ttype: E5.Boolean(),\n\t\t\tisOptional: false\n\t\t},\n\t\tstatus: {\n\t\t\ttype: E5.String_unsecure(),\n\t\t\tisOptional: true\n\t\t},\n\t\tlatencyMs: {\n\t\t\ttype: E5.Float_unsecure(),\n\t\t\tisOptional: true\n\t\t},\n\t\terror: {\n\t\t\ttype: E5.String_unsecure(),\n\t\t\tisOptional: true\n\t\t},\n\t\terrorCode: {\n\t\t\ttype: E5.String_unsecure(),\n\t\t\tisOptional: true\n\t\t}\n\t}\n});\nconst DeleteIntegrationConnectionOutput = new x8({\n\tname: \"DeleteIntegrationConnectionOutput\",\n\tfields: { success: {\n\t\ttype: E5.Boolean(),\n\t\tisOptional: false\n\t} }\n});\nconst CreateIntegrationConnection = defineCommand({\n\tmeta: {\n\t\tname: \"integrations.connection.create\",\n\t\tversion: 1,\n\t\tdescription: \"Create a new integration connection for a tenant.\",\n\t\tgoal: \"Provision a tenant-scoped connection to an external provider.\",\n\t\tcontext: \"Used by Ops or the App Studio to configure external integrations such as Stripe or Qdrant.\",\n\t\towners: [\"platform.integrations\"],\n\t\ttags: [\"integration\", \"connections\"],\n\t\tstability: \"experimental\"\n\t},\n\tio: {\n\t\tinput: CreateIntegrationConnectionInput,\n\t\toutput: IntegrationConnectionRecord\n\t},\n\tpolicy: {\n\t\tauth: \"admin\",\n\t\tpolicies: [{\n\t\t\tname: \"platform.integration.manage\",\n\t\t\tversion: 1\n\t\t}]\n\t}\n});\nconst UpdateIntegrationConnection = defineCommand({\n\tmeta: {\n\t\tname: \"integrations.connection.update\",\n\t\tversion: 1,\n\t\tdescription: \"Update metadata or credentials for an integration connection.\",\n\t\tgoal: \"Allow secure rotation of credentials and metadata adjustments.\",\n\t\tcontext: \"Supports rotating API keys, toggling status, or updating labels for tenant integrations.\",\n\t\towners: [\"platform.integrations\"],\n\t\ttags: [\"integration\", \"connections\"],\n\t\tstability: \"experimental\"\n\t},\n\tio: {\n\t\tinput: UpdateIntegrationConnectionInput,\n\t\toutput: IntegrationConnectionRecord\n\t},\n\tpolicy: {\n\t\tauth: \"admin\",\n\t\tpolicies: [{\n\t\t\tname: \"platform.integration.manage\",\n\t\t\tversion: 1\n\t\t}]\n\t}\n});\nconst DeleteIntegrationConnection = defineCommand({\n\tmeta: {\n\t\tname: \"integrations.connection.delete\",\n\t\tversion: 1,\n\t\tdescription: \"Delete an integration connection for a tenant.\",\n\t\tgoal: \"Safely remove credentials and disable connector usage.\",\n\t\tcontext: \"Ensures connections are de-provisioned when no longer needed or breached.\",\n\t\towners: [\"platform.integrations\"],\n\t\ttags: [\"integration\", \"connections\"],\n\t\tstability: \"experimental\"\n\t},\n\tio: {\n\t\tinput: DeleteIntegrationConnectionInput,\n\t\toutput: DeleteIntegrationConnectionOutput\n\t},\n\tpolicy: {\n\t\tauth: \"admin\",\n\t\tpolicies: [{\n\t\t\tname: \"platform.integration.manage\",\n\t\t\tversion: 1\n\t\t}]\n\t}\n});\nconst ListIntegrationConnections = defineQuery({\n\tmeta: {\n\t\tname: \"integrations.connection.list\",\n\t\tversion: 1,\n\t\tdescription: \"List integration connections for a tenant.\",\n\t\tgoal: \"Provide visibility into configured integrations and their status.\",\n\t\tcontext: \"Used by the App Studio and Ops flows to show bindings and health.\",\n\t\towners: [\"platform.integrations\"],\n\t\ttags: [\"integration\", \"connections\"],\n\t\tstability: \"experimental\"\n\t},\n\tio: {\n\t\tinput: ListIntegrationConnectionsInput,\n\t\toutput: ListIntegrationConnectionsOutput\n\t},\n\tpolicy: {\n\t\tauth: \"admin\",\n\t\tpolicies: [{\n\t\t\tname: \"platform.integration.read\",\n\t\t\tversion: 1\n\t\t}]\n\t}\n});\nconst TestIntegrationConnection = defineCommand({\n\tmeta: {\n\t\tname: \"integrations.connection.test\",\n\t\tversion: 1,\n\t\tdescription: \"Run a health check against a configured integration connection.\",\n\t\tgoal: \"Validate credentials and connectivity for external providers.\",\n\t\tcontext: \"Triggered manually or by background monitors to confirm provider availability.\",\n\t\towners: [\"platform.integrations\"],\n\t\ttags: [\"integration\", \"connections\"],\n\t\tstability: \"experimental\"\n\t},\n\tio: {\n\t\tinput: TestIntegrationConnectionInput,\n\t\toutput: TestIntegrationConnectionOutput\n\t},\n\tpolicy: {\n\t\tauth: \"admin\",\n\t\tpolicies: [{\n\t\t\tname: \"platform.integration.manage\",\n\t\t\tversion: 1\n\t\t}]\n\t}\n});\nconst integrationContracts = {\n\tCreateIntegrationConnection,\n\tUpdateIntegrationConnection,\n\tDeleteIntegrationConnection,\n\tListIntegrationConnections,\n\tTestIntegrationConnection\n};\nfunction registerIntegrationContracts(registry) {\n\treturn registry.register(CreateIntegrationConnection).register(UpdateIntegrationConnection).register(DeleteIntegrationConnection).register(ListIntegrationConnections).register(TestIntegrationConnection);\n}\n\n//#endregion\nexport { CreateIntegrationConnection, DeleteIntegrationConnection, ListIntegrationConnections, TestIntegrationConnection, UpdateIntegrationConnection, integrationContracts, registerIntegrationContracts };"],"mappings":";;;;AAIA,MAAM,8BAA8B,IAAI,GAAG;CAC1C,MAAM;CACN,QAAQ;EACP,IAAI;GACH,MAAM,GAAG,IAAI;GACb,YAAY;GACZ;EACD,UAAU;GACT,MAAM,GAAG,IAAI;GACb,YAAY;GACZ;EACD,gBAAgB;GACf,MAAM,GAAG,gBAAgB;GACzB,YAAY;GACZ;EACD,oBAAoB;GACnB,MAAM,GAAG,cAAc;GACvB,YAAY;GACZ;EACD,OAAO;GACN,MAAM,GAAG,iBAAiB;GAC1B,YAAY;GACZ;EACD,eAAe;GACd,MAAM,GAAG,iBAAiB;GAC1B,YAAY;GACZ;EACD,mBAAmB;GAClB,MAAM,GAAG,iBAAiB;GAC1B,YAAY;GACZ;EACD,gBAAgB;GACf,MAAM,GAAG,iBAAiB;GAC1B,YAAY;GACZ;EACD,WAAW;GACV,MAAM,GAAG,iBAAiB;GAC1B,YAAY;GACZ;EACD,QAAQ;GACP,MAAM,GAAG,iBAAiB;GAC1B,YAAY;GACZ;EACD,aAAa;GACZ,MAAM,GAAG,iBAAiB;GAC1B,YAAY;GACZ;EACD,cAAc;GACb,MAAM,GAAG,iBAAiB;GAC1B,YAAY;GACZ;EACD,iBAAiB;GAChB,MAAM,GAAG,UAAU;GACnB,YAAY;GACZ;EACD,iBAAiB;GAChB,MAAM,GAAG,gBAAgB;GACzB,YAAY;GACZ;EACD,iBAAiB;GACh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L,MAAM;EACN,SAAS;EACT,aAAa;EACb,MAAM;EACN,SAAS;EACT,QAAQ,CAAC,wBAAwB;EACjC,MAAM,CAAC,eAAe,cAAc;EACpC,WAAW;EACX;CACD,IAAI;EACH,OAAO;EACP,QAAQ;EACR;CACD,QAAQ;EACP,MAAM;EACN,UAAU,CAAC;GACV,MAAM;GACN,SAAS;GACT,CAAC;EACF;CACD,CAAC;AACF,MAAM,4BAA4B,cAAc;CAC/C,MAAM;EACL,MAAM;EACN,SAAS;EACT,aAAa;EACb,MAAM;EACN,SAAS;EACT,QAAQ,CAAC,wBAAwB;EACjC,MAAM,CAAC,eAAe,cAAc;EACpC,WAAW;EACX;CACD,IAAI;EACH,OAAO;EACP,QAAQ;EACR;CACD,QAAQ;EACP,MAAM;EACN,UAAU,CAAC;GACV,MAAM;GACN,SAAS;GACT,CAAC;EACF;CACD,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"contracts.js","names":[],"sources":["../../../../../../../libs/contracts/dist/knowledge/contracts.js"],"sourcesContent":["import { E5, x8 } from \"../schema/dist/index.js\";\nimport { defineCommand, defineQuery } from \"../operation.js\";\n\n//#region src/knowledge/contracts.ts\nconst KnowledgeSyncSchedule = new x8({\n\tname: \"KnowledgeSyncSchedule\",\n\tfields: {\n\t\tenabled: {\n\t\t\ttype: E5.Boolean(),\n\t\t\tisOptional: false\n\t\t},\n\t\tcron: {\n\t\t\ttype: E5.String_unsecure(),\n\t\t\tisOptional: true\n\t\t},\n\t\tintervalMs: {\n\t\t\ttype: E5.Int_unsecure(),\n\t\t\tisOptional: true\n\t\t}\n\t}\n});\nconst KnowledgeSourceRecord = new x8({\n\tname: \"KnowledgeSourceRecord\",\n\tfields: {\n\t\tid: {\n\t\t\ttype: E5.ID(),\n\t\t\tisOptional: false\n\t\t},\n\t\ttenantId: {\n\t\t\ttype: E5.ID(),\n\t\t\tisOptional: false\n\t\t},\n\t\tspaceKey: {\n\t\t\ttype: E5.NonEmptyString(),\n\t\t\tisOptional: false\n\t\t},\n\t\tspaceVersion: {\n\t\t\ttype: E5.Int_unsecure(),\n\t\t\tisOptional: false\n\t\t},\n\t\tlabel: {\n\t\t\ttype: E5.String_unsecure(),\n\t\t\tisOptional: false\n\t\t},\n\t\tsourceType: {\n\t\t\ttype: E5.String_unsecure(),\n\t\t\tisOptional: false\n\t\t},\n\t\tsyncSchedule: {\n\t\t\ttype: KnowledgeSyncSchedule,\n\t\t\tisOptional: true\n\t\t},\n\t\tlastSyncStatus: {\n\t\t\ttype: E5.String_unsecure(),\n\t\t\tisOptional: true\n\t\t},\n\t\tlastSyncAt: {\n\t\t\ttype: E5.DateTime(),\n\t\t\tisOptional: true\n\t\t},\n\t\titemsProcessed: {\n\t\t\ttype: E5.Int_unsecure(),\n\t\t\tisOptional: true\n\t\t},\n\t\tcreatedAt: {\n\t\t\ttype: E5.DateTime(),\n\t\t\tisOptional: true\n\t\t},\n\t\tupdatedAt: {\n\t\t\ttype: E5.DateTime(),\n\t\t\tisOptional: true\n\t\t}\n\t}\n});\nconst CreateKnowledgeSourceInput = new x8({\n\tname: \"CreateKnowledgeSourceInput\",\n\tfields: {\n\t\ttenantId: {\n\t\t\ttype: E5.ID(),\n\t\t\tisOptional: false\n\t\t},\n\t\tspaceKey: {\n\t\t\ttype: E5.NonEmptyString(),\n\t\t\tisOptional: false\n\t\t},\n\t\tspaceVersion: {\n\t\t\ttype: E5.Int_unsecure(),\n\t\t\tisOptional: false\n\t\t},\n\t\tlabel: {\n\t\t\ttype: E5.String_unsecure(),\n\t\t\tisOptional: false\n\t\t},\n\t\tsourceType: {\n\t\t\ttype: E5.NonEmptyString(),\n\t\t\tisOptional: false\n\t\t},\n\t\tconfig: {\n\t\t\ttype: E5.JSONObject(),\n\t\t\tisOptional: false\n\t\t},\n\t\tsyncSchedule: {\n\t\t\ttype: KnowledgeSyncSchedule,\n\t\t\tisOptional: true\n\t\t}\n\t}\n});\nconst UpdateKnowledgeSourceInput = new x8({\n\tname: \"UpdateKnowledgeSourceInput\",\n\tfields: {\n\t\tsourceId: {\n\t\t\ttype: E5.ID(),\n\t\t\tisOptional: false\n\t\t},\n\t\tlabel: {\n\t\t\ttype: E5.String_unsecure(),\n\t\t\tisOptional: true\n\t\t},\n\t\tconfig: {\n\t\t\ttype: E5.JSONObject(),\n\t\t\tisOptional: true\n\t\t},\n\t\tsyncSchedule: {\n\t\t\ttype: KnowledgeSyncSchedule,\n\t\t\tisOptional: true\n\t\t}\n\t}\n});\nconst DeleteKnowledgeSourceInput = new x8({\n\tname: \"DeleteKnowledgeSourceInput\",\n\tfields: { sourceId: {\n\t\ttype: E5.ID(),\n\t\tisOptional: false\n\t} }\n});\nconst DeleteKnowledgeSourceOutput = new x8({\n\tname: \"DeleteKnowledgeSourceOutput\",\n\tfields: { success: {\n\t\ttype: E5.Boolean(),\n\t\tisOptional: false\n\t} }\n});\nconst ListKnowledgeSourcesInput = new x8({\n\tname: \"ListKnowledgeSourcesInput\",\n\tfields: {\n\t\ttenantId: {\n\t\t\ttype: E5.ID(),\n\t\t\tisOptional: false\n\t\t},\n\t\tspaceKey: {\n\t\t\ttype: E5.NonEmptyString(),\n\t\t\tisOptional: true\n\t\t}\n\t}\n});\nconst ListKnowledgeSourcesOutput = new x8({\n\tname: \"ListKnowledgeSourcesOutput\",\n\tfields: { sources: {\n\t\ttype: KnowledgeSourceRecord,\n\t\tisOptional: false,\n\t\tisArray: true\n\t} }\n});\nconst TriggerKnowledgeSyncInput = new x8({\n\tname: \"TriggerKnowledgeSyncInput\",\n\tfields: { sourceId: {\n\t\ttype: E5.ID(),\n\t\tisOptional: false\n\t} }\n});\nconst TriggerKnowledgeSyncOutput = new x8({\n\tname: \"TriggerKnowledgeSyncOutput\",\n\tfields: {\n\t\tsuccess: {\n\t\t\ttype: E5.Boolean(),\n\t\t\tisOptional: false\n\t\t},\n\t\titemsProcessed: {\n\t\t\ttype: E5.Int_unsecure(),\n\t\t\tisOptional: true\n\t\t},\n\t\terror: {\n\t\t\ttype: E5.String_unsecure(),\n\t\t\tisOptional: true\n\t\t}\n\t}\n});\nconst CreateKnowledgeSource = defineCommand({\n\tmeta: {\n\t\tname: \"knowledge.source.create\",\n\t\tversion: 1,\n\t\tdescription: \"Create a knowledge source binding for a tenant.\",\n\t\tgoal: \"Onboard a new knowledge ingestion source such as Notion or uploads.\",\n\t\tcontext: \"Used by Ops and App Studio to configure knowledge ingestion per tenant and space.\",\n\t\towners: [\"platform.knowledge\"],\n\t\ttags: [\"knowledge\", \"sources\"],\n\t\tstability: \"experimental\"\n\t},\n\tio: {\n\t\tinput: CreateKnowledgeSourceInput,\n\t\toutput: KnowledgeSourceRecord\n\t},\n\tpolicy: {\n\t\tauth: \"admin\",\n\t\tpolicies: [{\n\t\t\tname: \"platform.knowledge.manage\",\n\t\t\tversion: 1\n\t\t}]\n\t}\n});\nconst UpdateKnowledgeSource = defineCommand({\n\tmeta: {\n\t\tname: \"knowledge.source.update\",\n\t\tversion: 1,\n\t\tdescription: \"Update metadata or configuration for a knowledge source.\",\n\t\tgoal: \"Allow rotation of credentials, sync schedules, and labels.\",\n\t\tcontext: \"Supports editing how a tenant ingests knowledge (e.g., toggling sync cadence).\",\n\t\towners: [\"platform.knowledge\"],\n\t\ttags: [\"knowledge\", \"sources\"],\n\t\tstability: \"experimental\"\n\t},\n\tio: {\n\t\tinput: UpdateKnowledgeSourceInput,\n\t\toutput: KnowledgeSourceRecord\n\t},\n\tpolicy: {\n\t\tauth: \"admin\",\n\t\tpolicies: [{\n\t\t\tname: \"platform.knowledge.manage\",\n\t\t\tversion: 1\n\t\t}]\n\t}\n});\nconst DeleteKnowledgeSource = defineCommand({\n\tmeta: {\n\t\tname: \"knowledge.source.delete\",\n\t\tversion: 1,\n\t\tdescription: \"Delete a knowledge source binding for a tenant.\",\n\t\tgoal: \"Remove obsolete or compromised knowledge ingestion paths.\",\n\t\tcontext: \"Ensures ephemeral or external sources can be removed cleanly without leaving residual bindings.\",\n\t\towners: [\"platform.knowledge\"],\n\t\ttags: [\"knowledge\", \"sources\"],\n\t\tstability: \"experimental\"\n\t},\n\tio: {\n\t\tinput: DeleteKnowledgeSourceInput,\n\t\toutput: DeleteKnowledgeSourceOutput\n\t},\n\tpolicy: {\n\t\tauth: \"admin\",\n\t\tpolicies: [{\n\t\t\tname: \"platform.knowledge.manage\",\n\t\t\tversion: 1\n\t\t}]\n\t}\n});\nconst ListKnowledgeSources = defineQuery({\n\tmeta: {\n\t\tname: \"knowledge.source.list\",\n\t\tversion: 1,\n\t\tdescription: \"List knowledge sources configured for a tenant.\",\n\t\tgoal: \"Provide visibility into knowledge ingest configuration and schedules.\",\n\t\tcontext: \"Used by App Studio and Ops flows to surface knowledge sources and their health.\",\n\t\towners: [\"platform.knowledge\"],\n\t\ttags: [\"knowledge\", \"sources\"],\n\t\tstability: \"experimental\"\n\t},\n\tio: {\n\t\tinput: ListKnowledgeSourcesInput,\n\t\toutput: ListKnowledgeSourcesOutput\n\t},\n\tpolicy: {\n\t\tauth: \"admin\",\n\t\tpolicies: [{\n\t\t\tname: \"platform.knowledge.read\",\n\t\t\tversion: 1\n\t\t}]\n\t}\n});\nconst TriggerKnowledgeSourceSync = defineCommand({\n\tmeta: {\n\t\tname: \"knowledge.source.triggerSync\",\n\t\tversion: 1,\n\t\tdescription: \"Trigger an immediate sync for a knowledge source.\",\n\t\tgoal: \"Support manual or automated sync retries for knowledge ingestion.\",\n\t\tcontext: \"Invoked by Ops tooling or monitors when knowledge content must be refreshed or reprocessed.\",\n\t\towners: [\"platform.knowledge\"],\n\t\ttags: [\"knowledge\", \"sources\"],\n\t\tstability: \"experimental\"\n\t},\n\tio: {\n\t\tinput: TriggerKnowledgeSyncInput,\n\t\toutput: TriggerKnowledgeSyncOutput\n\t},\n\tpolicy: {\n\t\tauth: \"admin\",\n\t\tpolicies: [{\n\t\t\tname: \"platform.knowledge.manage\",\n\t\t\tversion: 1\n\t\t}]\n\t}\n});\nconst knowledgeContracts = {\n\tCreateKnowledgeSource,\n\tUpdateKnowledgeSource,\n\tDeleteKnowledgeSource,\n\tListKnowledgeSources,\n\tTriggerKnowledgeSourceSync\n};\nfunction registerKnowledgeContracts(registry) {\n\treturn registry.register(CreateKnowledgeSource).register(UpdateKnowledgeSource).register(DeleteKnowledgeSource).register(ListKnowledgeSources).register(TriggerKnowledgeSourceSync);\n}\n\n//#endregion\nexport { CreateKnowledgeSource, DeleteKnowledgeSource, ListKnowledgeSources, TriggerKnowledgeSourceSync, UpdateKnowledgeSource, knowledgeContracts, registerKnowledgeContracts };"],"mappings":";;;;AAIA,MAAM,wBAAwB,IAAI,GAAG;CACpC,MAAM;CACN,QAAQ;EACP,SAAS;GACR,MAAM,GAAG,SAAS;GAClB,YAAY;GACZ;EACD,MAAM;GACL,MAAM,GAAG,iBAAiB;GAC1B,YAAY;GACZ;EACD,YAAY;GACX,MAAM,GAAG,cAAc;GACvB,YAAY;GACZ;EACD;CACD,CAAC;AACF,MAAM,wBAAwB,IAAI,GAAG;CACpC,MAAM;CACN,QAAQ;EACP,IAAI;GACH,MAAM,GAAG,IAAI;GACb,YAAY;GACZ;EACD,UAAU;GACT,MAAM,GAAG,IAAI;GACb,YAAY;GACZ;EACD,UAAU;GACT,MAAM,GAAG,gBAAgB;GACzB,YAAY;GACZ;EACD,cAAc;GACb,MAAM,GAAG,cAAc;GACvB,YAAY;GACZ;EACD,OAAO;GACN,MAAM,GAAG,iBAAiB;GAC1B,YAAY;GACZ;EACD,YAAY;GACX,MAAM,GAAG,iBAAiB;GAC1B,YAAY;GACZ;EACD,cAAc;GACb,MAAM;GACN,YAAY;GACZ;EACD,gBAAgB;GACf,MAAM,GAAG,iBAAiB;GAC1B,YAAY;GACZ;EACD,YAAY;GACX,MAAM,GAAG,UAAU;GACnB,YAAY;GACZ;EACD,gBAAgB;GACf,MAAM,GAAG,cAAc;GACvB,YAAY;GACZ;EACD,WAAW;GACV,MAAM,GAAG,UAAU;GACnB,YAAY;GACZ;EACD,WAAW;GACV,MAAM,GAAG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M;EACN,UAAU,CAAC;GACV,MAAM;GACN,SAAS;GACT,CAAC;EACF;CACD,CAAC;AACF,MAAM,uBAAuB,YAAY;CACxC,MAAM;EACL,MAAM;EACN,SAAS;EACT,aAAa;EACb,MAAM;EACN,SAAS;EACT,QAAQ,CAAC,qBAAqB;EAC9B,MAAM,CAAC,aAAa,UAAU;EAC9B,WAAW;EACX;CACD,IAAI;EACH,OAAO;EACP,QAAQ;EACR;CACD,QAAQ;EACP,MAAM;EACN,UAAU,CAAC;GACV,MAAM;GACN,SAAS;GACT,CAAC;EACF;CACD,CAAC;AACF,MAAM,6BAA6B,cAAc;CAChD,MAAM;EACL,MAAM;EACN,SAAS;EACT,aAAa;EACb,MAAM;EACN,SAAS;EACT,QAAQ,CAAC,qBAAqB;EAC9B,MAAM,CAAC,aAAa,UAAU;EAC9B,WAAW;EACX;CACD,IAAI;EACH,OAAO;EACP,QAAQ;EACR;CACD,QAAQ;EACP,MAAM;EACN,UAAU,CAAC;GACV,MAAM;GACN,SAAS;GACT,CAAC;EACF;CACD,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"operation.js","names":[],"sources":["../../../../../../libs/contracts/dist/operation.js"],"sourcesContent":["//#region src/operation.ts\nconst isEmitDeclRef = (e) => \"ref\" in e;\n/**\n* Helper to define a Command (write operation).\n* Sets `kind: 'command'` and defaults `idempotent: false`.\n*/\nconst defineCommand = (spec) => ({\n\t...spec,\n\tmeta: {\n\t\t...spec.meta,\n\t\tkind: \"command\"\n\t},\n\tpolicy: {\n\t\t...spec.policy,\n\t\tidempotent: spec.policy?.[\"policy\"]?.idempotent ?? false\n\t}\n});\n/**\n* Helper to define a Query (read-only operation).\n* Sets `kind: 'query'` and forces `idempotent: true`.\n*/\nconst defineQuery = (spec) => ({\n\t...spec,\n\tmeta: {\n\t\t...spec.meta,\n\t\tkind: \"query\"\n\t},\n\tpolicy: {\n\t\t...spec.policy,\n\t\tidempotent: true\n\t}\n});\n\n//#endregion\nexport { defineCommand, defineQuery, isEmitDeclRef };"],"mappings":";;;;;AAMA,MAAM,iBAAiB,UAAU;CAChC,GAAG;CACH,MAAM;EACL,GAAG,KAAK;EACR,MAAM;EACN;CACD,QAAQ;EACP,GAAG,KAAK;EACR,YAAY,KAAK,SAAS,WAAW,cAAc;EACnD;CACD;;;;;AAKD,MAAM,eAAe,UAAU;CAC9B,GAAG;CACH,MAAM;EACL,GAAG,KAAK;EACR,MAAM;EACN;CACD,QAAQ;EACP,GAAG,KAAK;EACR,YAAY;EACZ;CACD"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"presentations.v2.js","names":[],"sources":["../../../../../../libs/contracts/dist/presentations.v2.js"],"sourcesContent":["import { schemaToMarkdown } from \"./schema-to-markdown.js\";\nimport React from \"react\";\nimport TurndownService from \"turndown\";\n\n//#region src/presentations.v2.ts\n/**\n* Pluggable transform engine that renders descriptors to various targets\n* and runs validators (e.g., basic metadata checks, PII redaction policies).\n*/\nconst turndown = new TurndownService();\nfunction renderTextNode(node) {\n\tconst text = node.text ?? \"\";\n\tif (!node.marks || node.marks.length === 0) return text;\n\treturn node.marks.reduce((acc, mark) => {\n\t\tswitch (mark.type) {\n\t\t\tcase \"bold\": return `**${acc}**`;\n\t\t\tcase \"italic\": return `*${acc}*`;\n\t\t\tcase \"underline\": return `__${acc}__`;\n\t\t\tcase \"strike\": return `~~${acc}~~`;\n\t\t\tcase \"code\": return `\\`${acc}\\``;\n\t\t\tcase \"link\": {\n\t\t\t\tconst href = mark.attrs?.href ?? \"\";\n\t\t\t\treturn href ? `[${acc}](${href})` : acc;\n\t\t\t}\n\t\t\tdefault: return acc;\n\t\t}\n\t}, text);\n}\nfunction renderInline(nodes) {\n\tif (!nodes?.length) return \"\";\n\treturn nodes.map((child) => renderNode(child)).join(\"\");\n}\nfunction renderList(nodes, ordered = false) {\n\tif (!nodes?.length) return \"\";\n\tlet counter = 1;\n\treturn nodes.map((item) => {\n\t\tconst body = renderInline(item.content ?? []);\n\t\tif (!body) return \"\";\n\t\treturn `${ordered ? `${counter++}. ` : \"- \"}${body}`;\n\t}).filter(Boolean).join(\"\\n\");\n}\nfunction renderNode(node) {\n\tswitch (node.type) {\n\t\tcase \"doc\": return renderInline(node.content);\n\t\tcase \"paragraph\": {\n\t\t\tconst text = renderInline(node.content);\n\t\t\treturn text.trim().length ? text : \"\";\n\t\t}\n\t\tcase \"heading\": {\n\t\t\tconst levelAttr = node.attrs?.level;\n\t\t\tconst levelVal = typeof levelAttr === \"number\" ? levelAttr : 1;\n\t\t\tconst level = Math.min(Math.max(levelVal, 1), 6);\n\t\t\treturn `${\"#\".repeat(level)} ${renderInline(node.content)}`.trim();\n\t\t}\n\t\tcase \"bullet_list\": return renderList(node.content, false);\n\t\tcase \"ordered_list\": return renderList(node.content, true);\n\t\tcase \"list_item\": return renderInline(node.content);\n\t\tcase \"blockquote\": return renderInline(node.content).split(\"\\n\").map((line) => `> ${line}`).join(\"\\n\");\n\t\tcase \"code_block\": {\n\t\t\tconst body = renderInline(node.content);\n\t\t\treturn body ? `\\`\\`\\`\\n${body}\\n\\`\\`\\`` : \"\";\n\t\t}\n\t\tcase \"horizontal_rule\": return \"---\";\n\t\tcase \"hard_break\": return \"\\n\";\n\t\tcase \"text\": return renderTextNode(node);\n\t\tdefault:\n\t\t\tif (node.text) return renderTextNode(node);\n\t\t\treturn \"\";\n\t}\n}\nfunction blockNoteToMarkdown(docJson) {\n\tif (typeof docJson === \"string\") return docJson;\n\tif (docJson && typeof docJson === \"object\" && \"html\" in docJson) {\n\t\tconst html = String(docJson.html);\n\t\treturn turndown.turndown(html);\n\t}\n\tconst root = docJson;\n\tif (root?.type === \"doc\" || root?.content) return (root.content ?? []).map((n) => renderNode(n)).filter(Boolean).join(\"\\n\\n\").trim();\n\ttry {\n\t\treturn JSON.stringify(docJson, null, 2);\n\t} catch {\n\t\treturn String(docJson);\n\t}\n}\nvar TransformEngine = class {\n\trenderers = /* @__PURE__ */ new Map();\n\tvalidators = [];\n\tregister(renderer) {\n\t\tconst arr = this.renderers.get(renderer.target) ?? [];\n\t\tarr.push(renderer);\n\t\tthis.renderers.set(renderer.target, arr);\n\t\treturn this;\n\t}\n\t/**\n\t* Register a renderer that will be tried BEFORE existing renderers for the same target.\n\t* Useful for custom renderers that should take priority over default ones.\n\t*/\n\tprependRegister(renderer) {\n\t\tconst arr = this.renderers.get(renderer.target) ?? [];\n\t\tarr.unshift(renderer);\n\t\tthis.renderers.set(renderer.target, arr);\n\t\treturn this;\n\t}\n\taddValidator(v) {\n\t\tthis.validators.push(v);\n\t\treturn this;\n\t}\n\tasync render(target, desc, ctx) {\n\t\tif (!desc.targets.includes(target)) throw new Error(`Target ${target} not declared for ${desc.meta.name}.v${desc.meta.version}`);\n\t\tfor (const v of this.validators) await v.validate(desc, target, ctx);\n\t\tconst arr = this.renderers.get(target) ?? [];\n\t\tfor (const r of arr) try {\n\t\t\treturn await r.render(desc, ctx);\n\t\t} catch (_e) {}\n\t\tthrow new Error(`No renderer available for ${target}`);\n\t}\n};\n/** Create a TransformEngine instance with default markdown/json/xml renderers. */\nfunction createDefaultTransformEngine() {\n\tconst engine = new TransformEngine();\n\tconst applyPii = (desc, obj) => {\n\t\tconst clone = JSON.parse(JSON.stringify(obj));\n\t\tconst paths = desc.policy?.pii ?? [];\n\t\tconst setAtPath = (root, path) => {\n\t\t\tconst segs = path.replace(/^\\//, \"\").replace(/\\[(\\d+)\\]/g, \".$1\").split(\".\").filter(Boolean);\n\t\t\tlet cur = root;\n\t\t\tfor (let i = 0; i < segs.length - 1; i++) {\n\t\t\t\tconst k = segs[i];\n\t\t\t\tif (!k) continue;\n\t\t\t\tif (cur && typeof cur === \"object\" && k in cur) cur = cur[k];\n\t\t\t\telse return;\n\t\t\t}\n\t\t\tconst last = segs[segs.length - 1];\n\t\t\tif (cur && typeof cur === \"object\" && last && last in cur) cur[last] = \"[REDACTED]\";\n\t\t};\n\t\tfor (const p of paths) setAtPath(clone, p);\n\t\treturn clone;\n\t};\n\tengine.register({\n\t\ttarget: \"markdown\",\n\t\tasync render(desc, ctx) {\n\t\t\tlet data = ctx?.data;\n\t\t\tif (!data && ctx?.fetchData) data = await ctx.fetchData();\n\t\t\tif (desc.source.type === \"component\" && desc.source.props && data !== void 0) {\n\t\t\t\tconst isArray = Array.isArray(data);\n\t\t\t\tconst isSimpleObject = !isArray && typeof data === \"object\" && data !== null && !Object.values(data).some((v) => Array.isArray(v) || typeof v === \"object\" && v !== null);\n\t\t\t\tif (isArray || isSimpleObject) return {\n\t\t\t\t\tmimeType: \"text/markdown\",\n\t\t\t\t\tbody: schemaToMarkdown(desc.source.props, data, {\n\t\t\t\t\t\ttitle: desc.meta.description ?? desc.meta.name,\n\t\t\t\t\t\tdescription: `${desc.meta.name} v${desc.meta.version}`\n\t\t\t\t\t})\n\t\t\t\t};\n\t\t\t\tthrow new Error(`Complex data structure for ${desc.meta.name} - expecting custom renderer`);\n\t\t\t}\n\t\t\tif (desc.source.type === \"blocknotejs\") {\n\t\t\t\tconst redacted = applyPii(desc, { text: blockNoteToMarkdown(desc.source.docJson) });\n\t\t\t\treturn {\n\t\t\t\t\tmimeType: \"text/markdown\",\n\t\t\t\t\tbody: String(redacted.text)\n\t\t\t\t};\n\t\t\t}\n\t\t\tif (desc.source.type === \"component\" && data !== void 0) throw new Error(`No schema (source.props) available for ${desc.meta.name} - expecting custom renderer`);\n\t\t\tif (desc.source.type === \"component\") return {\n\t\t\t\tmimeType: \"text/markdown\",\n\t\t\t\tbody: `${`# ${desc.meta.name} v${desc.meta.version}`}${desc.meta.description ? `\\n\\n${desc.meta.description}` : \"\"}${desc.meta.tags && desc.meta.tags.length ? `\\n\\nTags: ${desc.meta.tags.join(\", \")}` : \"\"}${desc.meta.owners && desc.meta.owners.length ? `\\n\\nOwners: ${desc.meta.owners.join(\", \")}` : \"\"}${`\\n\\nComponent: \\`${desc.source.componentKey}\\``}${desc.policy?.pii?.length ? `\\n\\nRedacted paths: ${desc.policy.pii.map((p) => `\\`${p}\\``).join(\", \")}` : \"\"}`\n\t\t\t};\n\t\t\tthrow new Error(\"unsupported\");\n\t\t}\n\t});\n\tengine.register({\n\t\ttarget: \"application/json\",\n\t\tasync render(desc) {\n\t\t\tconst payload = applyPii(desc, {\n\t\t\t\tmeta: desc.meta,\n\t\t\t\tsource: desc.source\n\t\t\t});\n\t\t\treturn {\n\t\t\t\tmimeType: \"application/json\",\n\t\t\t\tbody: JSON.stringify(payload, null, 2)\n\t\t\t};\n\t\t}\n\t});\n\tengine.register({\n\t\ttarget: \"application/xml\",\n\t\tasync render(desc) {\n\t\t\tconst json = applyPii(desc, {\n\t\t\t\tmeta: desc.meta,\n\t\t\t\tsource: desc.source\n\t\t\t});\n\t\t\treturn {\n\t\t\t\tmimeType: \"application/xml\",\n\t\t\t\tbody: `<presentation name=\"${desc.meta.name}\" version=\"${desc.meta.version}\"><json>${encodeURIComponent(JSON.stringify(json))}</json></presentation>`\n\t\t\t};\n\t\t}\n\t});\n\treturn engine;\n}\n/** Register a default React target renderer that returns a serializable descriptor. */\nfunction registerDefaultReactRenderer(engine) {\n\tengine.register({\n\t\ttarget: \"react\",\n\t\tasync render(desc) {\n\t\t\tif (desc.source.type === \"component\") {\n\t\t\t\tconst props = desc.source.props ? desc.source.props.getZod().safeParse({}).success ? {} : void 0 : void 0;\n\t\t\t\treturn {\n\t\t\t\t\tkind: \"react_component\",\n\t\t\t\t\tcomponentKey: desc.source.componentKey,\n\t\t\t\t\tprops\n\t\t\t\t};\n\t\t\t}\n\t\t\treturn {\n\t\t\t\tkind: \"blocknotejs\",\n\t\t\t\tdocJson: desc.source.docJson,\n\t\t\t\tblockConfig: desc.source.blockConfig\n\t\t\t};\n\t\t}\n\t});\n\treturn engine;\n}\n/**\n* Add basic validators (e.g., meta.description presence) to the engine.\n*/\nfunction registerBasicValidation(engine) {\n\tengine.addValidator({ validate(desc) {\n\t\tif (!desc.meta.description || desc.meta.description.length < 3) throw new Error(`Presentation ${desc.meta.name}.v${desc.meta.version} missing meta.description`);\n\t} });\n\treturn engine;\n}\n/**\n* Register a React-to-markdown renderer that renders React components to HTML\n* and converts them to markdown using turndown.\n* This renderer takes priority over the default metadata-only renderer.\n*/\nfunction registerReactToMarkdownRenderer(engine, componentMap) {\n\tconst turndownService = new TurndownService({\n\t\theadingStyle: \"atx\",\n\t\tcodeBlockStyle: \"fenced\",\n\t\tbulletListMarker: \"-\"\n\t});\n\tturndownService.addRule(\"link\", {\n\t\tfilter: \"a\",\n\t\treplacement: (content, node) => {\n\t\t\tconst href = node.href;\n\t\t\tif (href && content) return `[${content}](${href})`;\n\t\t\treturn content || \"\";\n\t\t}\n\t});\n\tengine.prependRegister({\n\t\ttarget: \"markdown\",\n\t\tasync render(desc, _ctx) {\n\t\t\tif (desc.source.type !== \"component\") throw new Error(\"React-to-markdown renderer only handles component presentations\");\n\t\t\tconst { renderToStaticMarkup } = await import(\"react-dom/server\");\n\t\t\tconst Component = componentMap[desc.source.componentKey];\n\t\t\tif (!Component) throw new Error(`Component ${desc.source.componentKey} not found in componentMap`);\n\t\t\tlet html;\n\t\t\ttry {\n\t\t\t\thtml = renderToStaticMarkup(React.createElement(Component, desc.source.props ? {} : void 0));\n\t\t\t} catch (error) {\n\t\t\t\tthrow new Error(`Failed to render component ${desc.source.componentKey}: ${error instanceof Error ? error.message : \"Unknown error\"}`);\n\t\t\t}\n\t\t\tlet markdown;\n\t\t\ttry {\n\t\t\t\tmarkdown = turndownService.turndown(html);\n\t\t\t} catch (error) {\n\t\t\t\tthrow new Error(`Failed to convert HTML to markdown: ${error instanceof Error ? error.message : \"Unknown error\"}`);\n\t\t\t}\n\t\t\tif (desc.policy?.pii && desc.policy.pii.length > 0) return {\n\t\t\t\tmimeType: \"text/markdown\",\n\t\t\t\tbody: markdown.replace(/\\[REDACTED\\]/g, \"[REDACTED]\")\n\t\t\t};\n\t\t\treturn {\n\t\t\t\tmimeType: \"text/markdown\",\n\t\t\t\tbody: markdown\n\t\t\t};\n\t\t}\n\t});\n\treturn engine;\n}\n\n//#endregion\nexport { TransformEngine, createDefaultTransformEngine, registerBasicValidation, registerDefaultReactRenderer, registerReactToMarkdownRenderer };"],"mappings":";;;;;;;;AASA,MAAM,WAAW,IAAI,iBAAiB"}
|