@lssm/lib.contracts 0.0.0-canary-20251217083314 → 0.0.0-canary-20251220002821
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/LICENSE +21 -0
- package/dist/app-config/contracts.d.ts +50 -50
- package/dist/app-config/contracts.js +54 -56
- package/dist/app-config/events.d.ts +27 -27
- package/dist/app-config/events.js +31 -33
- package/dist/app-config/lifecycle-contracts.d.ts +80 -80
- package/dist/app-config/lifecycle-contracts.js +66 -68
- package/dist/client/react/form-render.d.ts +6 -6
- package/dist/client/react/form-render.js +15 -15
- package/dist/contracts-adapter-hydration.js +2 -2
- package/dist/data-views/query-generator.d.ts +2 -2
- package/dist/data-views/query-generator.js +1 -1
- package/dist/data-views/runtime.d.ts +2 -2
- package/dist/data-views/runtime.js +2 -2
- package/dist/docs/index.js +0 -6
- package/dist/docs/meta.docs.js +3 -0
- package/dist/docs/tech-contracts.docs.js +3 -0
- package/dist/forms.d.ts +4 -4
- package/dist/forms.js +3 -2
- package/dist/index.js +2 -3
- package/dist/integrations/contracts.d.ts +105 -104
- package/dist/integrations/contracts.js +63 -65
- package/dist/integrations/openbanking/contracts/accounts.d.ts +69 -68
- package/dist/integrations/openbanking/contracts/accounts.js +29 -31
- package/dist/integrations/openbanking/contracts/balances.d.ts +37 -36
- package/dist/integrations/openbanking/contracts/balances.js +16 -18
- package/dist/integrations/openbanking/contracts/transactions.d.ts +51 -50
- package/dist/integrations/openbanking/contracts/transactions.js +30 -32
- package/dist/integrations/openbanking/guards.js +1 -0
- package/dist/integrations/openbanking/models.d.ts +55 -55
- package/dist/integrations/openbanking/models.js +58 -60
- package/dist/integrations/providers/impls/gmail-inbound.js +1 -1
- package/dist/integrations/providers/impls/gmail-outbound.js +4 -4
- package/dist/integrations/providers/impls/mistral-llm.d.ts +1 -1
- package/dist/integrations/providers/impls/mistral-llm.js +1 -1
- package/dist/integrations/providers/impls/powens-openbanking.d.ts +1 -1
- package/dist/integrations/providers/impls/provider-factory.js +4 -1
- package/dist/integrations/providers/impls/qdrant-vector.js +2 -2
- package/dist/integrations/runtime.d.ts +1 -1
- package/dist/integrations/runtime.js +1 -1
- package/dist/integrations/secrets/manager.js +1 -1
- package/dist/jobs/handlers/gmail-sync-handler.d.ts +1 -1
- package/dist/jsonschema.d.ts +3 -3
- package/dist/knowledge/contracts.d.ts +69 -68
- package/dist/knowledge/contracts.js +42 -44
- package/dist/markdown.d.ts +1 -1
- package/dist/markdown.js +1 -1
- package/dist/onboarding-base.d.ts +29 -29
- package/dist/onboarding-base.js +20 -22
- package/dist/ownership.d.ts +4 -6
- package/dist/ownership.js +4 -5
- package/dist/presentations.d.ts +3 -3
- package/dist/presentations.v2.js +5 -2
- package/dist/promptRegistry.d.ts +2 -2
- package/dist/registry.d.ts +1 -1
- package/dist/registry.js +1 -0
- package/dist/resources.js +4 -1
- package/dist/schema/dist/index.js +4683 -6
- package/dist/schema-to-markdown.d.ts +1 -1
- package/dist/schema-to-markdown.js +1 -1
- package/dist/server/graphql-pothos.js +0 -1
- package/dist/server/rest-elysia.d.ts +1 -1
- package/dist/server/rest-express.js +0 -3
- package/dist/server/rest-generic.d.ts +1 -1
- package/dist/server/rest-generic.js +0 -1
- package/dist/server/rest-next-mcp.js +1 -1
- package/dist/server/rest-next-pages.js +0 -3
- package/dist/workflow/adapters/db-adapter.d.ts +19 -7
- package/dist/workflow/adapters/db-adapter.js +3 -3
- package/dist/workflow/expression.js +3 -2
- package/dist/workflow/validation.js +1 -0
- package/package.json +19 -18
- package/dist/docs/PUBLISHING.docblock.d.ts +0 -6
- package/dist/docs/PUBLISHING.docblock.js +0 -17
- package/dist/docs/tech/PHASE_1_QUICKSTART.docblock.d.ts +0 -6
- package/dist/docs/tech/PHASE_1_QUICKSTART.docblock.js +0 -17
- package/dist/docs/tech/PHASE_2_AI_NATIVE_OPERATIONS.docblock.d.ts +0 -6
- package/dist/docs/tech/PHASE_2_AI_NATIVE_OPERATIONS.docblock.js +0 -17
- package/dist/docs/tech/PHASE_3_AUTO_EVOLUTION.docblock.d.ts +0 -6
- package/dist/docs/tech/PHASE_3_AUTO_EVOLUTION.docblock.js +0 -17
- package/dist/docs/tech/PHASE_4_PERSONALIZATION_ENGINE.docblock.d.ts +0 -6
- package/dist/docs/tech/PHASE_4_PERSONALIZATION_ENGINE.docblock.js +0 -17
- package/dist/docs/tech/PHASE_5_ZERO_TOUCH_OPERATIONS.docblock.d.ts +0 -6
- package/dist/docs/tech/PHASE_5_ZERO_TOUCH_OPERATIONS.docblock.js +0 -17
- package/dist/schema/dist/EnumType.js +0 -2
- package/dist/schema/dist/FieldType.js +0 -49
- package/dist/schema/dist/ScalarTypeEnum.js +0 -236
- package/dist/schema/dist/SchemaModel.js +0 -39
- package/dist/schema/dist/entity/defineEntity.js +0 -1
- package/dist/schema/dist/entity/index.js +0 -2
- package/dist/schema/dist/entity/types.js +0 -1
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { SchemaModel } from "../schema/dist/SchemaModel.js";
|
|
3
|
-
import "../schema/dist/index.js";
|
|
1
|
+
import { E5, x8 } from "../schema/dist/index.js";
|
|
4
2
|
import { defineCommand, defineQuery } from "../spec.js";
|
|
5
3
|
import { OwnersEnum, StabilityEnum, TagsEnum } from "../ownership.js";
|
|
6
4
|
import { ConfigDraftCreatedEvent, ConfigPromotedToPreviewEvent, ConfigPublishedEvent, ConfigRolledBackEvent } from "./events.js";
|
|
@@ -20,102 +18,102 @@ const LifecycleReadPolicy = {
|
|
|
20
18
|
version: 1
|
|
21
19
|
}]
|
|
22
20
|
};
|
|
23
|
-
const ConfigVersionRecord = new
|
|
21
|
+
const ConfigVersionRecord = new x8({
|
|
24
22
|
name: "ConfigVersionRecord",
|
|
25
23
|
fields: {
|
|
26
24
|
meta: {
|
|
27
|
-
type:
|
|
25
|
+
type: E5.JSONObject(),
|
|
28
26
|
isOptional: false
|
|
29
27
|
},
|
|
30
28
|
config: {
|
|
31
|
-
type:
|
|
29
|
+
type: E5.JSONObject(),
|
|
32
30
|
isOptional: false
|
|
33
31
|
}
|
|
34
32
|
}
|
|
35
33
|
});
|
|
36
|
-
const ConfigTransitionRecord = new
|
|
34
|
+
const ConfigTransitionRecord = new x8({
|
|
37
35
|
name: "ConfigTransitionRecord",
|
|
38
36
|
fields: {
|
|
39
37
|
tenantId: {
|
|
40
|
-
type:
|
|
38
|
+
type: E5.ID(),
|
|
41
39
|
isOptional: false
|
|
42
40
|
},
|
|
43
41
|
appId: {
|
|
44
|
-
type:
|
|
42
|
+
type: E5.ID(),
|
|
45
43
|
isOptional: false
|
|
46
44
|
},
|
|
47
45
|
fromStatus: {
|
|
48
|
-
type:
|
|
46
|
+
type: E5.String_unsecure(),
|
|
49
47
|
isOptional: false
|
|
50
48
|
},
|
|
51
49
|
toStatus: {
|
|
52
|
-
type:
|
|
50
|
+
type: E5.String_unsecure(),
|
|
53
51
|
isOptional: false
|
|
54
52
|
},
|
|
55
53
|
version: {
|
|
56
|
-
type:
|
|
54
|
+
type: E5.Int_unsecure(),
|
|
57
55
|
isOptional: false
|
|
58
56
|
},
|
|
59
57
|
timestamp: {
|
|
60
|
-
type:
|
|
58
|
+
type: E5.DateTime(),
|
|
61
59
|
isOptional: false
|
|
62
60
|
},
|
|
63
61
|
actor: {
|
|
64
|
-
type:
|
|
62
|
+
type: E5.String_unsecure(),
|
|
65
63
|
isOptional: false
|
|
66
64
|
},
|
|
67
65
|
reason: {
|
|
68
|
-
type:
|
|
66
|
+
type: E5.String_unsecure(),
|
|
69
67
|
isOptional: true
|
|
70
68
|
}
|
|
71
69
|
}
|
|
72
70
|
});
|
|
73
|
-
const CreateDraftInput = new
|
|
71
|
+
const CreateDraftInput = new x8({
|
|
74
72
|
name: "CreateTenantConfigDraftInput",
|
|
75
73
|
fields: {
|
|
76
74
|
tenantId: {
|
|
77
|
-
type:
|
|
75
|
+
type: E5.ID(),
|
|
78
76
|
isOptional: false
|
|
79
77
|
},
|
|
80
78
|
appId: {
|
|
81
|
-
type:
|
|
79
|
+
type: E5.ID(),
|
|
82
80
|
isOptional: false
|
|
83
81
|
},
|
|
84
82
|
blueprintName: {
|
|
85
|
-
type:
|
|
83
|
+
type: E5.String_unsecure(),
|
|
86
84
|
isOptional: false
|
|
87
85
|
},
|
|
88
86
|
blueprintVersion: {
|
|
89
|
-
type:
|
|
87
|
+
type: E5.Int_unsecure(),
|
|
90
88
|
isOptional: false
|
|
91
89
|
},
|
|
92
90
|
environment: {
|
|
93
|
-
type:
|
|
91
|
+
type: E5.String_unsecure(),
|
|
94
92
|
isOptional: true
|
|
95
93
|
},
|
|
96
94
|
fromVersion: {
|
|
97
|
-
type:
|
|
95
|
+
type: E5.Int_unsecure(),
|
|
98
96
|
isOptional: true
|
|
99
97
|
},
|
|
100
98
|
createdBy: {
|
|
101
|
-
type:
|
|
99
|
+
type: E5.String_unsecure(),
|
|
102
100
|
isOptional: false
|
|
103
101
|
}
|
|
104
102
|
}
|
|
105
103
|
});
|
|
106
|
-
const CreateDraftOutput = new
|
|
104
|
+
const CreateDraftOutput = new x8({
|
|
107
105
|
name: "CreateTenantConfigDraftOutput",
|
|
108
106
|
fields: {
|
|
109
107
|
version: {
|
|
110
|
-
type:
|
|
108
|
+
type: E5.Int_unsecure(),
|
|
111
109
|
isOptional: false
|
|
112
110
|
},
|
|
113
111
|
status: {
|
|
114
|
-
type:
|
|
112
|
+
type: E5.String_unsecure(),
|
|
115
113
|
isOptional: false
|
|
116
114
|
},
|
|
117
115
|
createdAt: {
|
|
118
|
-
type:
|
|
116
|
+
type: E5.DateTime(),
|
|
119
117
|
isOptional: false
|
|
120
118
|
}
|
|
121
119
|
}
|
|
@@ -141,40 +139,40 @@ const CreateTenantConfigDraftCommand = defineCommand({
|
|
|
141
139
|
when: "after successful draft creation"
|
|
142
140
|
}] }
|
|
143
141
|
});
|
|
144
|
-
const PromotePreviewInput = new
|
|
142
|
+
const PromotePreviewInput = new x8({
|
|
145
143
|
name: "PromoteTenantConfigPreviewInput",
|
|
146
144
|
fields: {
|
|
147
145
|
tenantId: {
|
|
148
|
-
type:
|
|
146
|
+
type: E5.ID(),
|
|
149
147
|
isOptional: false
|
|
150
148
|
},
|
|
151
149
|
appId: {
|
|
152
|
-
type:
|
|
150
|
+
type: E5.ID(),
|
|
153
151
|
isOptional: false
|
|
154
152
|
},
|
|
155
153
|
version: {
|
|
156
|
-
type:
|
|
154
|
+
type: E5.Int_unsecure(),
|
|
157
155
|
isOptional: false
|
|
158
156
|
},
|
|
159
157
|
promotedBy: {
|
|
160
|
-
type:
|
|
158
|
+
type: E5.String_unsecure(),
|
|
161
159
|
isOptional: false
|
|
162
160
|
}
|
|
163
161
|
}
|
|
164
162
|
});
|
|
165
|
-
const PromotePreviewOutput = new
|
|
163
|
+
const PromotePreviewOutput = new x8({
|
|
166
164
|
name: "PromoteTenantConfigPreviewOutput",
|
|
167
165
|
fields: {
|
|
168
166
|
version: {
|
|
169
|
-
type:
|
|
167
|
+
type: E5.Int_unsecure(),
|
|
170
168
|
isOptional: false
|
|
171
169
|
},
|
|
172
170
|
status: {
|
|
173
|
-
type:
|
|
171
|
+
type: E5.String_unsecure(),
|
|
174
172
|
isOptional: false
|
|
175
173
|
},
|
|
176
174
|
warnings: {
|
|
177
|
-
type:
|
|
175
|
+
type: E5.String_unsecure(),
|
|
178
176
|
isOptional: true,
|
|
179
177
|
isArray: true
|
|
180
178
|
}
|
|
@@ -201,52 +199,52 @@ const PromoteTenantConfigToPreviewCommand = defineCommand({
|
|
|
201
199
|
when: "after promotion to preview"
|
|
202
200
|
}] }
|
|
203
201
|
});
|
|
204
|
-
const PublishConfigInput = new
|
|
202
|
+
const PublishConfigInput = new x8({
|
|
205
203
|
name: "PublishTenantConfigInput",
|
|
206
204
|
fields: {
|
|
207
205
|
tenantId: {
|
|
208
|
-
type:
|
|
206
|
+
type: E5.ID(),
|
|
209
207
|
isOptional: false
|
|
210
208
|
},
|
|
211
209
|
appId: {
|
|
212
|
-
type:
|
|
210
|
+
type: E5.ID(),
|
|
213
211
|
isOptional: false
|
|
214
212
|
},
|
|
215
213
|
version: {
|
|
216
|
-
type:
|
|
214
|
+
type: E5.Int_unsecure(),
|
|
217
215
|
isOptional: false
|
|
218
216
|
},
|
|
219
217
|
environment: {
|
|
220
|
-
type:
|
|
218
|
+
type: E5.String_unsecure(),
|
|
221
219
|
isOptional: true
|
|
222
220
|
},
|
|
223
221
|
publishedBy: {
|
|
224
|
-
type:
|
|
222
|
+
type: E5.String_unsecure(),
|
|
225
223
|
isOptional: false
|
|
226
224
|
},
|
|
227
225
|
changeSummary: {
|
|
228
|
-
type:
|
|
226
|
+
type: E5.String_unsecure(),
|
|
229
227
|
isOptional: true
|
|
230
228
|
}
|
|
231
229
|
}
|
|
232
230
|
});
|
|
233
|
-
const PublishConfigOutput = new
|
|
231
|
+
const PublishConfigOutput = new x8({
|
|
234
232
|
name: "PublishTenantConfigOutput",
|
|
235
233
|
fields: {
|
|
236
234
|
version: {
|
|
237
|
-
type:
|
|
235
|
+
type: E5.Int_unsecure(),
|
|
238
236
|
isOptional: false
|
|
239
237
|
},
|
|
240
238
|
status: {
|
|
241
|
-
type:
|
|
239
|
+
type: E5.String_unsecure(),
|
|
242
240
|
isOptional: false
|
|
243
241
|
},
|
|
244
242
|
previousVersion: {
|
|
245
|
-
type:
|
|
243
|
+
type: E5.Int_unsecure(),
|
|
246
244
|
isOptional: true
|
|
247
245
|
},
|
|
248
246
|
publishedAt: {
|
|
249
|
-
type:
|
|
247
|
+
type: E5.DateTime(),
|
|
250
248
|
isOptional: false
|
|
251
249
|
}
|
|
252
250
|
}
|
|
@@ -272,48 +270,48 @@ const PublishTenantConfigCommand = defineCommand({
|
|
|
272
270
|
when: "after publish succeeds"
|
|
273
271
|
}] }
|
|
274
272
|
});
|
|
275
|
-
const RollbackConfigInput = new
|
|
273
|
+
const RollbackConfigInput = new x8({
|
|
276
274
|
name: "RollbackTenantConfigInput",
|
|
277
275
|
fields: {
|
|
278
276
|
tenantId: {
|
|
279
|
-
type:
|
|
277
|
+
type: E5.ID(),
|
|
280
278
|
isOptional: false
|
|
281
279
|
},
|
|
282
280
|
appId: {
|
|
283
|
-
type:
|
|
281
|
+
type: E5.ID(),
|
|
284
282
|
isOptional: false
|
|
285
283
|
},
|
|
286
284
|
toVersion: {
|
|
287
|
-
type:
|
|
285
|
+
type: E5.Int_unsecure(),
|
|
288
286
|
isOptional: false
|
|
289
287
|
},
|
|
290
288
|
environment: {
|
|
291
|
-
type:
|
|
289
|
+
type: E5.String_unsecure(),
|
|
292
290
|
isOptional: true
|
|
293
291
|
},
|
|
294
292
|
rolledBackBy: {
|
|
295
|
-
type:
|
|
293
|
+
type: E5.String_unsecure(),
|
|
296
294
|
isOptional: false
|
|
297
295
|
},
|
|
298
296
|
reason: {
|
|
299
|
-
type:
|
|
297
|
+
type: E5.String_unsecure(),
|
|
300
298
|
isOptional: false
|
|
301
299
|
}
|
|
302
300
|
}
|
|
303
301
|
});
|
|
304
|
-
const RollbackConfigOutput = new
|
|
302
|
+
const RollbackConfigOutput = new x8({
|
|
305
303
|
name: "RollbackTenantConfigOutput",
|
|
306
304
|
fields: {
|
|
307
305
|
newVersion: {
|
|
308
|
-
type:
|
|
306
|
+
type: E5.Int_unsecure(),
|
|
309
307
|
isOptional: false
|
|
310
308
|
},
|
|
311
309
|
status: {
|
|
312
|
-
type:
|
|
310
|
+
type: E5.String_unsecure(),
|
|
313
311
|
isOptional: false
|
|
314
312
|
},
|
|
315
313
|
rolledBackFrom: {
|
|
316
|
-
type:
|
|
314
|
+
type: E5.Int_unsecure(),
|
|
317
315
|
isOptional: false
|
|
318
316
|
}
|
|
319
317
|
}
|
|
@@ -339,20 +337,20 @@ const RollbackTenantConfigCommand = defineCommand({
|
|
|
339
337
|
when: "after rollback completes"
|
|
340
338
|
}] }
|
|
341
339
|
});
|
|
342
|
-
const ListVersionsInput = new
|
|
340
|
+
const ListVersionsInput = new x8({
|
|
343
341
|
name: "ListTenantConfigVersionsInput",
|
|
344
342
|
fields: {
|
|
345
343
|
tenantId: {
|
|
346
|
-
type:
|
|
344
|
+
type: E5.ID(),
|
|
347
345
|
isOptional: false
|
|
348
346
|
},
|
|
349
347
|
appId: {
|
|
350
|
-
type:
|
|
348
|
+
type: E5.ID(),
|
|
351
349
|
isOptional: false
|
|
352
350
|
}
|
|
353
351
|
}
|
|
354
352
|
});
|
|
355
|
-
const ListVersionsOutput = new
|
|
353
|
+
const ListVersionsOutput = new x8({
|
|
356
354
|
name: "ListTenantConfigVersionsOutput",
|
|
357
355
|
fields: {
|
|
358
356
|
versions: {
|
|
@@ -384,24 +382,24 @@ const ListTenantConfigVersionsQuery = defineQuery({
|
|
|
384
382
|
},
|
|
385
383
|
policy: LifecycleReadPolicy
|
|
386
384
|
});
|
|
387
|
-
const GetVersionInput = new
|
|
385
|
+
const GetVersionInput = new x8({
|
|
388
386
|
name: "GetTenantConfigVersionInput",
|
|
389
387
|
fields: {
|
|
390
388
|
tenantId: {
|
|
391
|
-
type:
|
|
389
|
+
type: E5.ID(),
|
|
392
390
|
isOptional: false
|
|
393
391
|
},
|
|
394
392
|
appId: {
|
|
395
|
-
type:
|
|
393
|
+
type: E5.ID(),
|
|
396
394
|
isOptional: false
|
|
397
395
|
},
|
|
398
396
|
version: {
|
|
399
|
-
type:
|
|
397
|
+
type: E5.Int_unsecure(),
|
|
400
398
|
isOptional: false
|
|
401
399
|
}
|
|
402
400
|
}
|
|
403
401
|
});
|
|
404
|
-
const GetVersionOutput = new
|
|
402
|
+
const GetVersionOutput = new x8({
|
|
405
403
|
name: "GetTenantConfigVersionOutput",
|
|
406
404
|
fields: { version: {
|
|
407
405
|
type: ConfigVersionRecord,
|
|
@@ -34,7 +34,7 @@ interface DriverSlots {
|
|
|
34
34
|
id?: string;
|
|
35
35
|
name?: string;
|
|
36
36
|
value?: unknown;
|
|
37
|
-
onChange?: (v:
|
|
37
|
+
onChange?: (v: unknown) => void;
|
|
38
38
|
disabled?: boolean;
|
|
39
39
|
'aria-invalid'?: boolean;
|
|
40
40
|
options: FormOption[];
|
|
@@ -50,7 +50,7 @@ interface DriverSlots {
|
|
|
50
50
|
id?: string;
|
|
51
51
|
name?: string;
|
|
52
52
|
value?: unknown;
|
|
53
|
-
onValueChange?: (v:
|
|
53
|
+
onValueChange?: (v: unknown) => void;
|
|
54
54
|
disabled?: boolean;
|
|
55
55
|
options: FormOption[];
|
|
56
56
|
} & Record<string, unknown>>;
|
|
@@ -69,9 +69,9 @@ interface DriverSlots {
|
|
|
69
69
|
disabled?: boolean;
|
|
70
70
|
}>>;
|
|
71
71
|
}
|
|
72
|
-
type ResolverMap<TValues> = Record<string, (values: TValues, args?:
|
|
73
|
-
type ComputationMap<TValues> = Record<string, (values: TValues) =>
|
|
74
|
-
interface CreateRendererOptions<TValues =
|
|
72
|
+
type ResolverMap<TValues> = Record<string, (values: TValues, args?: unknown) => Promise<FormOption[]> | FormOption[]>;
|
|
73
|
+
type ComputationMap<TValues> = Record<string, (values: TValues) => unknown>;
|
|
74
|
+
interface CreateRendererOptions<TValues = Record<string, unknown>> {
|
|
75
75
|
driver: DriverSlots;
|
|
76
76
|
formOptions?: Record<string, unknown>;
|
|
77
77
|
onSubmitOverride?: (values: TValues, actionKey: string) => Promise<void> | void;
|
|
@@ -80,7 +80,7 @@ interface CreateRendererOptions<TValues = any> {
|
|
|
80
80
|
computations?: ComputationMap<TValues>;
|
|
81
81
|
unmountStrategy?: 'keep' | 'clear';
|
|
82
82
|
}
|
|
83
|
-
interface RenderOptions<TValues =
|
|
83
|
+
interface RenderOptions<TValues = Record<string, unknown>> {
|
|
84
84
|
defaultValues?: Partial<TValues>;
|
|
85
85
|
overrides?: Partial<CreateRendererOptions<TValues>>;
|
|
86
86
|
}
|
|
@@ -51,7 +51,7 @@ function useResolvedOptions(values, source, resolvers) {
|
|
|
51
51
|
if (!source) return "nil";
|
|
52
52
|
if (source.kind === "static") return JSON.stringify(source.options ?? []);
|
|
53
53
|
return makeDepsKey(values, source.deps);
|
|
54
|
-
}, [source, values]), source && source.resolverKey]);
|
|
54
|
+
}, [source, values]), source && source.kind === "resolver" ? source.resolverKey : void 0]);
|
|
55
55
|
return opts;
|
|
56
56
|
}
|
|
57
57
|
function fieldPath(parent, name, arrayIndex) {
|
|
@@ -111,6 +111,7 @@ function createFormRenderer(base) {
|
|
|
111
111
|
const err = fieldState.error ? [fieldState.error] : [];
|
|
112
112
|
const ariaInvalid = fieldState.invalid || void 0;
|
|
113
113
|
if (f.kind === "text") {
|
|
114
|
+
const textField = f;
|
|
114
115
|
const Input = driver.Input;
|
|
115
116
|
return /* @__PURE__ */ jsxs(DriverField, {
|
|
116
117
|
...commonWrapProps,
|
|
@@ -120,15 +121,13 @@ function createFormRenderer(base) {
|
|
|
120
121
|
id,
|
|
121
122
|
"aria-invalid": ariaInvalid,
|
|
122
123
|
placeholder: f.placeholderI18n,
|
|
123
|
-
autoComplete:
|
|
124
|
-
inputMode:
|
|
125
|
-
maxLength:
|
|
126
|
-
minLength:
|
|
124
|
+
autoComplete: textField.autoComplete,
|
|
125
|
+
inputMode: textField.inputMode,
|
|
126
|
+
maxLength: textField.maxLength,
|
|
127
|
+
minLength: textField.minLength,
|
|
127
128
|
disabled: !enabled,
|
|
128
129
|
...field,
|
|
129
|
-
...f.uiProps
|
|
130
|
-
keyboard: f.keyboard,
|
|
131
|
-
autoComplete: f.keyboard?.autoComplete ?? f.autoComplete
|
|
130
|
+
...f.uiProps
|
|
132
131
|
}),
|
|
133
132
|
descNode,
|
|
134
133
|
fieldState.invalid ? /* @__PURE__ */ jsx(DriverError, { errors: err }) : null
|
|
@@ -136,6 +135,7 @@ function createFormRenderer(base) {
|
|
|
136
135
|
});
|
|
137
136
|
}
|
|
138
137
|
if (f.kind === "textarea") {
|
|
138
|
+
const textareaField = f;
|
|
139
139
|
const Textarea = driver.Textarea;
|
|
140
140
|
return /* @__PURE__ */ jsxs(DriverField, {
|
|
141
141
|
...commonWrapProps,
|
|
@@ -145,13 +145,11 @@ function createFormRenderer(base) {
|
|
|
145
145
|
id,
|
|
146
146
|
"aria-invalid": ariaInvalid,
|
|
147
147
|
placeholder: f.placeholderI18n,
|
|
148
|
-
rows:
|
|
149
|
-
maxLength:
|
|
148
|
+
rows: textareaField.rows,
|
|
149
|
+
maxLength: textareaField.maxLength,
|
|
150
150
|
disabled: !enabled,
|
|
151
151
|
...field,
|
|
152
|
-
...f.uiProps
|
|
153
|
-
keyboard: f.keyboard,
|
|
154
|
-
autoComplete: f.keyboard?.autoComplete ?? f.autoComplete
|
|
152
|
+
...f.uiProps
|
|
155
153
|
}),
|
|
156
154
|
descNode,
|
|
157
155
|
fieldState.invalid ? /* @__PURE__ */ jsx(DriverError, { errors: err }) : null
|
|
@@ -159,8 +157,9 @@ function createFormRenderer(base) {
|
|
|
159
157
|
});
|
|
160
158
|
}
|
|
161
159
|
if (f.kind === "select") {
|
|
160
|
+
const selectField = f;
|
|
162
161
|
const Select = driver.Select;
|
|
163
|
-
const opts = useResolvedOptions(values, toOptionsArray(
|
|
162
|
+
const opts = useResolvedOptions(values, toOptionsArray(selectField.options), merged.resolvers);
|
|
164
163
|
return /* @__PURE__ */ jsxs(DriverField, {
|
|
165
164
|
...commonWrapProps,
|
|
166
165
|
children: [
|
|
@@ -200,8 +199,9 @@ function createFormRenderer(base) {
|
|
|
200
199
|
});
|
|
201
200
|
}
|
|
202
201
|
if (f.kind === "radio") {
|
|
202
|
+
const radioField = f;
|
|
203
203
|
const RadioGroup = driver.RadioGroup;
|
|
204
|
-
const opts = useResolvedOptions(values, toOptionsArray(
|
|
204
|
+
const opts = useResolvedOptions(values, toOptionsArray(radioField.options), merged.resolvers);
|
|
205
205
|
return /* @__PURE__ */ jsxs(DriverField, {
|
|
206
206
|
...commonWrapProps,
|
|
207
207
|
children: [
|
|
@@ -18,9 +18,9 @@ async function hydrateResourceIfNeeded(resources, result, opts) {
|
|
|
18
18
|
if (!resources || !opts.template) return result;
|
|
19
19
|
const varName = opts.varName ?? "id";
|
|
20
20
|
const hydrateOne = async (item) => {
|
|
21
|
-
if (item && typeof item
|
|
21
|
+
if (item && typeof item === "object" && varName in item) {
|
|
22
22
|
const key = String(item[varName]);
|
|
23
|
-
const uri = opts.template.replace("{id}", key);
|
|
23
|
+
const uri = (opts.template ?? "").replace("{id}", key);
|
|
24
24
|
const match = resources.match(uri);
|
|
25
25
|
if (match) {
|
|
26
26
|
const resolved = await match.tmpl.resolve(match.params, {});
|
|
@@ -2,7 +2,7 @@ import { DataViewSpec } from "../data-views.js";
|
|
|
2
2
|
|
|
3
3
|
//#region src/data-views/query-generator.d.ts
|
|
4
4
|
interface DataViewQueryParams {
|
|
5
|
-
filters?: Record<string,
|
|
5
|
+
filters?: Record<string, unknown>;
|
|
6
6
|
sort?: {
|
|
7
7
|
field: string;
|
|
8
8
|
direction: 'asc' | 'desc';
|
|
@@ -15,7 +15,7 @@ interface DataViewQueryParams {
|
|
|
15
15
|
}
|
|
16
16
|
interface DataViewQuery {
|
|
17
17
|
operationName: string;
|
|
18
|
-
input: Record<string,
|
|
18
|
+
input: Record<string, unknown>;
|
|
19
19
|
meta: {
|
|
20
20
|
pagination: {
|
|
21
21
|
page: number;
|
|
@@ -36,7 +36,7 @@ var DataViewQueryGenerator = class {
|
|
|
36
36
|
for (const key of Object.keys(params.filters)) if (!this.spec.view.filters.find((f) => f.key === key)) errors.push(`Unknown filter key: ${key}`);
|
|
37
37
|
}
|
|
38
38
|
if (params.sort) {
|
|
39
|
-
const field = this.spec.view.fields.find((f) => f.key === params.sort
|
|
39
|
+
const field = this.spec.view.fields.find((f) => f.key === params.sort?.field);
|
|
40
40
|
if (!field) errors.push(`Unknown sort field: ${params.sort.field}`);
|
|
41
41
|
else if (field.sortable === false) errors.push(`Field is not sortable: ${params.sort.field}`);
|
|
42
42
|
}
|
|
@@ -4,7 +4,7 @@ import { DataViewRegistry, DataViewSpec } from "../data-views.js";
|
|
|
4
4
|
interface DataViewRuntimeConfig {
|
|
5
5
|
registry: DataViewRegistry;
|
|
6
6
|
}
|
|
7
|
-
interface DataViewResult<T =
|
|
7
|
+
interface DataViewResult<T = unknown> {
|
|
8
8
|
data: T[];
|
|
9
9
|
total: number;
|
|
10
10
|
loading: boolean;
|
|
@@ -17,7 +17,7 @@ declare class DataViewRuntime {
|
|
|
17
17
|
constructor(config: DataViewRuntimeConfig);
|
|
18
18
|
register(spec: DataViewSpec): void;
|
|
19
19
|
getSpec(name: string, version?: number): DataViewSpec | undefined;
|
|
20
|
-
executeQuery(specName: string,
|
|
20
|
+
executeQuery(specName: string, _params: unknown): Promise<DataViewResult>;
|
|
21
21
|
invalidate(specName: string): void;
|
|
22
22
|
subscribe(specName: string, callback: () => void): () => void;
|
|
23
23
|
private notifySubscribers;
|
|
@@ -11,7 +11,7 @@ var DataViewRuntime = class {
|
|
|
11
11
|
getSpec(name, version) {
|
|
12
12
|
return this.config.registry.get(name, version);
|
|
13
13
|
}
|
|
14
|
-
async executeQuery(specName,
|
|
14
|
+
async executeQuery(specName, _params) {
|
|
15
15
|
if (!this.getSpec(specName)) throw new Error(`DataView spec not found: ${specName}`);
|
|
16
16
|
return {
|
|
17
17
|
data: [],
|
|
@@ -25,7 +25,7 @@ var DataViewRuntime = class {
|
|
|
25
25
|
}
|
|
26
26
|
subscribe(specName, callback) {
|
|
27
27
|
if (!this.subscriptions.has(specName)) this.subscriptions.set(specName, /* @__PURE__ */ new Set());
|
|
28
|
-
this.subscriptions.get(specName)
|
|
28
|
+
this.subscriptions.get(specName)?.add(callback);
|
|
29
29
|
return () => {
|
|
30
30
|
this.subscriptions.get(specName)?.delete(callback);
|
|
31
31
|
};
|
package/dist/docs/index.js
CHANGED
|
@@ -2,13 +2,7 @@ import { docBlockToPresentationSpec, docBlockToPresentationV2, docBlocksToPresen
|
|
|
2
2
|
import { DocRegistry, defaultDocRegistry, docId, listRegisteredDocBlocks, registerDocBlocks } from "./registry.js";
|
|
3
3
|
import { techContractsDocs } from "./tech-contracts.docs.js";
|
|
4
4
|
import { metaDocs } from "./meta.docs.js";
|
|
5
|
-
import "./PUBLISHING.docblock.js";
|
|
6
5
|
import "./accessibility_wcag_compliance_specs.docblock.js";
|
|
7
|
-
import "./tech/PHASE_1_QUICKSTART.docblock.js";
|
|
8
|
-
import "./tech/PHASE_2_AI_NATIVE_OPERATIONS.docblock.js";
|
|
9
|
-
import "./tech/PHASE_3_AUTO_EVOLUTION.docblock.js";
|
|
10
|
-
import "./tech/PHASE_4_PERSONALIZATION_ENGINE.docblock.js";
|
|
11
|
-
import "./tech/PHASE_5_ZERO_TOUCH_OPERATIONS.docblock.js";
|
|
12
6
|
import "./tech/lifecycle-stage-system.docblock.js";
|
|
13
7
|
import "./tech/presentation-runtime.docblock.js";
|
|
14
8
|
import "./tech/auth/better-auth-nextjs.docblock.js";
|
package/dist/docs/meta.docs.js
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { registerDocBlocks } from "./registry.js";
|
|
2
|
+
|
|
1
3
|
//#region src/docs/meta.docs.ts
|
|
2
4
|
const metaDocs = [{
|
|
3
5
|
id: "docs.meta.docblocks-process",
|
|
@@ -21,6 +23,7 @@ const metaDocs = [{
|
|
|
21
23
|
- For presentations/markdown outputs, rely on TransformEngine via DocRegistry.
|
|
22
24
|
- No sourcePath; DocBlocks are canonical.`
|
|
23
25
|
}];
|
|
26
|
+
registerDocBlocks(metaDocs);
|
|
24
27
|
|
|
25
28
|
//#endregion
|
|
26
29
|
export { metaDocs };
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { registerDocBlocks } from "./registry.js";
|
|
2
|
+
|
|
1
3
|
//#region src/docs/tech-contracts.docs.ts
|
|
2
4
|
const techContractsDocs = [{
|
|
3
5
|
id: "docs.tech.contracts.presentations-v2",
|
|
@@ -88,6 +90,7 @@ PII paths (JSON-like) are redacted from rendered outputs.
|
|
|
88
90
|
|
|
89
91
|
Host apps use a \`componentMap\` (e.g., \`'sigil.webauth.tabs' → WebAuthTabs\`) and a BlockNote renderer to turn the React render descriptor into elements.`
|
|
90
92
|
}];
|
|
93
|
+
registerDocBlocks(techContractsDocs);
|
|
91
94
|
|
|
92
95
|
//#endregion
|
|
93
96
|
export { techContractsDocs };
|
package/dist/forms.d.ts
CHANGED
|
@@ -12,7 +12,7 @@ interface WhenClause {
|
|
|
12
12
|
interface Predicate {
|
|
13
13
|
when?: WhenClause;
|
|
14
14
|
all?: Predicate[];
|
|
15
|
-
|
|
15
|
+
anyOf?: Predicate[];
|
|
16
16
|
not?: Predicate;
|
|
17
17
|
}
|
|
18
18
|
interface FormOption {
|
|
@@ -208,7 +208,7 @@ interface TypedWhenClause<P extends string> {
|
|
|
208
208
|
interface TypedPredicate<P extends string> {
|
|
209
209
|
when?: TypedWhenClause<P>;
|
|
210
210
|
all?: TypedPredicate<P>[];
|
|
211
|
-
|
|
211
|
+
anyOf?: TypedPredicate<P>[];
|
|
212
212
|
not?: TypedPredicate<P>;
|
|
213
213
|
}
|
|
214
214
|
type TypedOptionsSource<P extends string> = {
|
|
@@ -228,11 +228,11 @@ type EnhanceFields<F extends readonly AnyFieldLike[], P extends string> = { [K i
|
|
|
228
228
|
kind: 'select';
|
|
229
229
|
} ? {
|
|
230
230
|
options: TypedOptionsSource<P> | readonly FormOption[];
|
|
231
|
-
} :
|
|
231
|
+
} : unknown) & (F[K] extends {
|
|
232
232
|
kind: 'radio';
|
|
233
233
|
} ? {
|
|
234
234
|
options: TypedOptionsSource<P> | readonly FormOption[];
|
|
235
|
-
} :
|
|
235
|
+
} : unknown) & {
|
|
236
236
|
computeFrom?: {
|
|
237
237
|
computeKey: string;
|
|
238
238
|
deps: P[];
|
package/dist/forms.js
CHANGED
|
@@ -33,7 +33,8 @@ function getAtPath(values, path) {
|
|
|
33
33
|
let cur = values;
|
|
34
34
|
for (const s of segs) {
|
|
35
35
|
if (cur == null) return void 0;
|
|
36
|
-
cur = cur[s];
|
|
36
|
+
if (cur && typeof cur === "object" && s in cur) cur = cur[s];
|
|
37
|
+
else return;
|
|
37
38
|
}
|
|
38
39
|
return cur;
|
|
39
40
|
}
|
|
@@ -41,7 +42,7 @@ function evalPredicate(values, pred) {
|
|
|
41
42
|
if (!pred) return true;
|
|
42
43
|
if (pred.not) return !evalPredicate(values, pred.not);
|
|
43
44
|
if (pred.all && pred.all.length) return pred.all.every((p) => evalPredicate(values, p));
|
|
44
|
-
if (pred.
|
|
45
|
+
if (pred.anyOf && pred.anyOf.length) return pred.anyOf.some((p) => evalPredicate(values, p));
|
|
45
46
|
if (pred.when) {
|
|
46
47
|
const { path, op = "truthy", value } = pred.when;
|
|
47
48
|
const v = getAtPath(values, path);
|