@substrat-run/contract-tests 0.142.0 → 0.143.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/caused-by-module.d.ts.map +1 -1
- package/dist/caused-by-module.js +3 -2
- package/dist/caused-by-module.js.map +1 -1
- package/dist/derived-module.d.ts +350 -0
- package/dist/derived-module.d.ts.map +1 -0
- package/dist/derived-module.js +153 -0
- package/dist/derived-module.js.map +1 -0
- package/dist/derived-suite.d.ts +3 -0
- package/dist/derived-suite.d.ts.map +1 -0
- package/dist/derived-suite.js +225 -0
- package/dist/derived-suite.js.map +1 -0
- package/dist/entity-state-module.d.ts.map +1 -1
- package/dist/entity-state-module.js +12 -6
- package/dist/entity-state-module.js.map +1 -1
- package/dist/entity-trash-module.d.ts.map +1 -1
- package/dist/entity-trash-module.js +4 -4
- package/dist/entity-trash-module.js.map +1 -1
- package/dist/entity-trash-suite.d.ts.map +1 -1
- package/dist/entity-trash-suite.js +17 -8
- package/dist/entity-trash-suite.js.map +1 -1
- package/dist/erasure-module.d.ts.map +1 -1
- package/dist/erasure-module.js +3 -2
- package/dist/erasure-module.js.map +1 -1
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -0
- package/dist/index.js.map +1 -1
- package/dist/input-parse-suite.d.ts.map +1 -1
- package/dist/input-parse-suite.js +33 -2
- package/dist/input-parse-suite.js.map +1 -1
- package/dist/membership-module.d.ts.map +1 -1
- package/dist/membership-module.js +3 -2
- package/dist/membership-module.js.map +1 -1
- package/dist/migration-comments.d.ts.map +1 -1
- package/dist/migration-comments.js +3 -2
- package/dist/migration-comments.js.map +1 -1
- package/dist/modules.d.ts.map +1 -1
- package/dist/modules.js +73 -68
- package/dist/modules.js.map +1 -1
- package/dist/permission-suite.d.ts.map +1 -1
- package/dist/permission-suite.js +28 -0
- package/dist/permission-suite.js.map +1 -1
- package/dist/scope-host-suite.d.ts.map +1 -1
- package/dist/scope-host-suite.js +151 -31
- package/dist/scope-host-suite.js.map +1 -1
- package/dist/shape-reconcile-plan.d.ts +23 -0
- package/dist/shape-reconcile-plan.d.ts.map +1 -0
- package/dist/shape-reconcile-plan.js +87 -0
- package/dist/shape-reconcile-plan.js.map +1 -0
- package/dist/test-operations.d.ts +25 -0
- package/dist/test-operations.d.ts.map +1 -0
- package/dist/test-operations.js +22 -0
- package/dist/test-operations.js.map +1 -0
- package/dist/vertical-events-suite.d.ts.map +1 -1
- package/dist/vertical-events-suite.js +72 -7
- package/dist/vertical-events-suite.js.map +1 -1
- package/package.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"caused-by-module.d.ts","sourceRoot":"","sources":["../src/caused-by-module.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAmB,kBAAkB,EAAsC,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"caused-by-module.d.ts","sourceRoot":"","sources":["../src/caused-by-module.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAmB,kBAAkB,EAAsC,MAAM,sBAAsB,CAAC;AAGpH;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,cAAc,2BAA2B,CAAC;AAEvD,oGAAoG;AACpG,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,OAAO,CAAC;IACd,OAAO,EAAE,OAAO,CAAC;CAClB;AAED,4BAA4B;AAC5B,eAAO,MAAM,IAAI,mCAAoD,CAAC;AAwBtE,eAAO,MAAM,WAAW,EAAE,kBAmBzB,CAAC"}
|
package/dist/caused-by-module.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { moduleManifest } from '@substrat-run/contracts';
|
|
2
|
+
import { testOperations } from './test-operations.js';
|
|
2
3
|
/**
|
|
3
4
|
* #2055: a consumer that can be held mid-handler, for `scopeCausedByContractSuite`.
|
|
4
5
|
*
|
|
@@ -37,10 +38,10 @@ const emitTagged = (ctx, type, tag) => {
|
|
|
37
38
|
export const causedByMod = {
|
|
38
39
|
manifest,
|
|
39
40
|
migrations: [],
|
|
40
|
-
|
|
41
|
+
...testOperations({
|
|
41
42
|
'causedby/start': ((ctx, input) => emitTagged(ctx, 'causedby.requested', input.tag)),
|
|
42
43
|
'causedby/other': ((ctx, input) => emitTagged(ctx, 'causedby.other', input.tag)),
|
|
43
|
-
},
|
|
44
|
+
}),
|
|
44
45
|
consumers: {
|
|
45
46
|
'causedby.requested': (async (ctx, event) => {
|
|
46
47
|
const hold = globalThis[CAUSED_BY_HOLD];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"caused-by-module.js","sourceRoot":"","sources":["../src/caused-by-module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"caused-by-module.js","sourceRoot":"","sources":["../src/caused-by-module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAEzD,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAEtD;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,wBAAwB,CAAC;AAQvD,4BAA4B;AAC5B,MAAM,CAAC,MAAM,IAAI,GAAG,CAAC,EAAE,GAAG,CAAC,EAAE,EAAE,CAAC,IAAI,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,UAAU,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC;AAEtE,MAAM,QAAQ,GAAG,cAAc,CAAC,KAAK,CAAC;IACpC,EAAE,EAAE,iBAAiB;IACrB,OAAO,EAAE,OAAO;IAChB,cAAc,EAAE,QAAQ;IACxB,WAAW,EAAE,EAAE;IACf,MAAM,EAAE;QACN,KAAK,EAAE;YACL,EAAE,IAAI,EAAE,oBAAoB,EAAE,aAAa,EAAE,CAAC,EAAE;YAChD,EAAE,IAAI,EAAE,mBAAmB,EAAE,aAAa,EAAE,CAAC,EAA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B,OAAO,IAAI,CAAC,IAAI;oBAAE,MAAM,IAAI,EAAE,CAAC;YACjC,CAAC;YACD,UAAU,CAAC,GAAG,EAAE,mBAAmB,EAAG,KAAK,CAAC,OAA2B,CAAC,GAAG,CAAC,CAAC;QAC/E,CAAC,CAAoB;KACtB;CACF,CAAC"}
|
|
@@ -0,0 +1,350 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The fixture behind `derivedHandlersContractSuite` (#1773): one module whose get, list, update
|
|
3
|
+
* and delete are DERIVED — declared with `derive` and handed no handler — bound through
|
|
4
|
+
* `operationsFor`, the path a vertical takes. So the suite holds the handlers the platform writes,
|
|
5
|
+
* on each adapter's SQL, to the behaviour a hand-written one owes: the check first, `not_found`,
|
|
6
|
+
* the partial PATCH, the 412, the event and its payload, the paged walk scoped to its parent.
|
|
7
|
+
*
|
|
8
|
+
* - `dfolder` — the parent a page is scoped to.
|
|
9
|
+
* - `dnote` — its child: derived get / list / update / delete. The writes that seed it, and the
|
|
10
|
+
* read of its history, are authored — none of them is a derivable shape.
|
|
11
|
+
*/
|
|
12
|
+
import { z } from 'zod';
|
|
13
|
+
import { type ModuleRegistration } from '@substrat-run/kernel';
|
|
14
|
+
export declare const DERIVED_MODULE_ID = "@test/derived";
|
|
15
|
+
export declare const derivedEntities: {
|
|
16
|
+
readonly dfolder: {
|
|
17
|
+
readonly table: "derived_folders";
|
|
18
|
+
readonly fields: z.ZodObject<{
|
|
19
|
+
id: z.ZodString;
|
|
20
|
+
name: z.ZodString;
|
|
21
|
+
}, z.core.$strip>;
|
|
22
|
+
};
|
|
23
|
+
readonly dnote: {
|
|
24
|
+
readonly table: "derived_notes";
|
|
25
|
+
readonly fields: z.ZodObject<{
|
|
26
|
+
id: z.ZodString;
|
|
27
|
+
dfolder_id: z.ZodString;
|
|
28
|
+
title: z.ZodString;
|
|
29
|
+
body: z.ZodNullable<z.ZodString>;
|
|
30
|
+
rank: z.ZodNumber;
|
|
31
|
+
}, z.core.$strip>;
|
|
32
|
+
readonly parents: readonly ["dfolder"];
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
export declare const derivedOperations: {
|
|
36
|
+
readonly 'derived/add-folder': {
|
|
37
|
+
readonly summary: "Add a folder";
|
|
38
|
+
readonly permission: "dnote:write";
|
|
39
|
+
readonly input: z.ZodObject<{
|
|
40
|
+
id: z.ZodString;
|
|
41
|
+
name: z.ZodString;
|
|
42
|
+
}, z.core.$strip>;
|
|
43
|
+
readonly output: z.ZodObject<{
|
|
44
|
+
ok: z.ZodBoolean;
|
|
45
|
+
}, z.core.$strip>;
|
|
46
|
+
};
|
|
47
|
+
readonly 'derived/add-note': {
|
|
48
|
+
readonly summary: "Add a note — authored, and emitting, so the note has a version to hold";
|
|
49
|
+
readonly permission: "dnote:write";
|
|
50
|
+
readonly input: z.ZodObject<{
|
|
51
|
+
id: z.ZodString;
|
|
52
|
+
folderId: z.ZodString;
|
|
53
|
+
title: z.ZodString;
|
|
54
|
+
body: z.ZodNullable<z.ZodString>;
|
|
55
|
+
rank: z.ZodNumber;
|
|
56
|
+
}, z.core.$strip>;
|
|
57
|
+
readonly output: z.ZodObject<{
|
|
58
|
+
id: z.ZodString;
|
|
59
|
+
}, z.core.$strip>;
|
|
60
|
+
readonly emits: {
|
|
61
|
+
readonly entity: "dnote";
|
|
62
|
+
readonly entityIdFrom: "id";
|
|
63
|
+
readonly type: "dnote.added";
|
|
64
|
+
readonly schemaVersion: 1;
|
|
65
|
+
readonly piiClass: "none";
|
|
66
|
+
readonly payload: readonly ["id"];
|
|
67
|
+
};
|
|
68
|
+
};
|
|
69
|
+
readonly 'derived/get-note': {
|
|
70
|
+
readonly summary: "One note";
|
|
71
|
+
readonly derive: "get";
|
|
72
|
+
readonly permission: {
|
|
73
|
+
readonly key: "dnote:read" | "dnote:write";
|
|
74
|
+
readonly entity: 'dnote';
|
|
75
|
+
readonly idFrom: 'noteId';
|
|
76
|
+
};
|
|
77
|
+
readonly input: z.ZodObject<{
|
|
78
|
+
noteId: z.ZodString;
|
|
79
|
+
}, z.core.$strip>;
|
|
80
|
+
readonly output: z.ZodObject<{
|
|
81
|
+
id: z.ZodString;
|
|
82
|
+
dfolder_id: z.ZodString;
|
|
83
|
+
title: z.ZodString;
|
|
84
|
+
body: z.ZodNullable<z.ZodString>;
|
|
85
|
+
rank: z.ZodNumber;
|
|
86
|
+
}, z.core.$strip>;
|
|
87
|
+
readonly http: {
|
|
88
|
+
readonly method: "GET";
|
|
89
|
+
readonly path: "/notes/{noteId}";
|
|
90
|
+
};
|
|
91
|
+
};
|
|
92
|
+
readonly 'derived/list-notes': {
|
|
93
|
+
readonly summary: "A folder's notes";
|
|
94
|
+
readonly derive: "list";
|
|
95
|
+
readonly permission: {
|
|
96
|
+
readonly key: "dnote:read";
|
|
97
|
+
readonly entity: "dfolder";
|
|
98
|
+
readonly idFrom: "dfolderId";
|
|
99
|
+
};
|
|
100
|
+
readonly input: z.ZodObject<{
|
|
101
|
+
dfolderId: z.ZodString;
|
|
102
|
+
title: z.ZodOptional<z.ZodString>;
|
|
103
|
+
}, z.core.$strip>;
|
|
104
|
+
readonly output: z.ZodObject<{
|
|
105
|
+
id: z.ZodString;
|
|
106
|
+
dfolder_id: z.ZodString;
|
|
107
|
+
title: z.ZodString;
|
|
108
|
+
body: z.ZodNullable<z.ZodString>;
|
|
109
|
+
rank: z.ZodNumber;
|
|
110
|
+
}, z.core.$strip>;
|
|
111
|
+
readonly paged: {
|
|
112
|
+
readonly over: {
|
|
113
|
+
readonly entity: "dnote";
|
|
114
|
+
readonly sortable: readonly ["rank"];
|
|
115
|
+
readonly filterable: readonly ["dfolder_id", "title"];
|
|
116
|
+
};
|
|
117
|
+
readonly total: true;
|
|
118
|
+
};
|
|
119
|
+
readonly http: {
|
|
120
|
+
readonly method: "GET";
|
|
121
|
+
readonly path: "/folders/{dfolderId}/notes";
|
|
122
|
+
};
|
|
123
|
+
};
|
|
124
|
+
readonly 'derived/update-note': {
|
|
125
|
+
readonly summary: "Change a note";
|
|
126
|
+
readonly derive: "update";
|
|
127
|
+
readonly permission: {
|
|
128
|
+
readonly key: "dnote:read" | "dnote:write";
|
|
129
|
+
readonly entity: 'dnote';
|
|
130
|
+
readonly idFrom: 'noteId';
|
|
131
|
+
};
|
|
132
|
+
readonly input: z.ZodObject<{
|
|
133
|
+
noteId: z.ZodString;
|
|
134
|
+
title: z.ZodOptional<z.ZodString>;
|
|
135
|
+
body: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
136
|
+
rank: z.ZodOptional<z.ZodNumber>;
|
|
137
|
+
}, z.core.$strip>;
|
|
138
|
+
readonly output: z.ZodObject<{
|
|
139
|
+
id: z.ZodString;
|
|
140
|
+
dfolder_id: z.ZodString;
|
|
141
|
+
title: z.ZodString;
|
|
142
|
+
body: z.ZodNullable<z.ZodString>;
|
|
143
|
+
rank: z.ZodNumber;
|
|
144
|
+
}, z.core.$strip>;
|
|
145
|
+
readonly http: {
|
|
146
|
+
readonly method: "PATCH";
|
|
147
|
+
readonly path: "/notes/{noteId}";
|
|
148
|
+
};
|
|
149
|
+
readonly concurrency: {
|
|
150
|
+
readonly over: "dnote";
|
|
151
|
+
readonly idFrom: "noteId";
|
|
152
|
+
};
|
|
153
|
+
readonly emits: {
|
|
154
|
+
readonly entity: "dnote";
|
|
155
|
+
readonly entityIdFrom: "id";
|
|
156
|
+
readonly type: "dnote.updated";
|
|
157
|
+
readonly schemaVersion: 1;
|
|
158
|
+
readonly piiClass: "none";
|
|
159
|
+
readonly payload: readonly ["id", "title", "body", "rank"];
|
|
160
|
+
};
|
|
161
|
+
};
|
|
162
|
+
readonly 'derived/delete-note': {
|
|
163
|
+
readonly summary: "Remove a note";
|
|
164
|
+
readonly derive: "delete";
|
|
165
|
+
readonly permission: {
|
|
166
|
+
readonly key: "dnote:read" | "dnote:write";
|
|
167
|
+
readonly entity: 'dnote';
|
|
168
|
+
readonly idFrom: 'noteId';
|
|
169
|
+
};
|
|
170
|
+
readonly input: z.ZodObject<{
|
|
171
|
+
noteId: z.ZodString;
|
|
172
|
+
}, z.core.$strip>;
|
|
173
|
+
readonly output: z.ZodObject<{
|
|
174
|
+
id: z.ZodString;
|
|
175
|
+
deleted: z.ZodBoolean;
|
|
176
|
+
}, z.core.$strip>;
|
|
177
|
+
readonly http: {
|
|
178
|
+
readonly method: "DELETE";
|
|
179
|
+
readonly path: "/notes/{noteId}";
|
|
180
|
+
};
|
|
181
|
+
readonly emits: {
|
|
182
|
+
readonly entity: "dnote";
|
|
183
|
+
readonly entityIdFrom: "id";
|
|
184
|
+
readonly type: "dnote.deleted";
|
|
185
|
+
readonly schemaVersion: 1;
|
|
186
|
+
readonly piiClass: "none";
|
|
187
|
+
readonly payload: readonly ["id"];
|
|
188
|
+
};
|
|
189
|
+
};
|
|
190
|
+
readonly 'derived/history': {
|
|
191
|
+
readonly summary: "A note's events, after it is gone too";
|
|
192
|
+
readonly permission: "dnote:read";
|
|
193
|
+
readonly input: z.ZodObject<{
|
|
194
|
+
noteId: z.ZodString;
|
|
195
|
+
}, z.core.$strip>;
|
|
196
|
+
readonly output: z.ZodObject<{
|
|
197
|
+
entries: z.ZodArray<z.ZodUnknown>;
|
|
198
|
+
}, z.core.$strip>;
|
|
199
|
+
};
|
|
200
|
+
};
|
|
201
|
+
export declare const derivedModManifest: {
|
|
202
|
+
id: string & z.$brand<"ModuleId">;
|
|
203
|
+
version: string;
|
|
204
|
+
kernelContract: string;
|
|
205
|
+
permissions: {
|
|
206
|
+
key: string & z.$brand<"PermissionKey">;
|
|
207
|
+
description: string;
|
|
208
|
+
}[];
|
|
209
|
+
events: {
|
|
210
|
+
emits: {
|
|
211
|
+
type: string;
|
|
212
|
+
schemaVersion: number;
|
|
213
|
+
}[];
|
|
214
|
+
consumes: {
|
|
215
|
+
type: string;
|
|
216
|
+
schemaVersion: number;
|
|
217
|
+
from?: string | undefined;
|
|
218
|
+
}[];
|
|
219
|
+
exports?: {
|
|
220
|
+
type: string;
|
|
221
|
+
schemaVersion: number;
|
|
222
|
+
readPermission: string & z.$brand<"PermissionKey">;
|
|
223
|
+
}[] | undefined;
|
|
224
|
+
};
|
|
225
|
+
migrations: {
|
|
226
|
+
journalDir: string;
|
|
227
|
+
compatibleFrom: string;
|
|
228
|
+
};
|
|
229
|
+
attachmentTargets: {
|
|
230
|
+
entityType: string;
|
|
231
|
+
readPermission: string & z.$brand<"PermissionKey">;
|
|
232
|
+
writePermission?: (string & z.$brand<"PermissionKey">) | undefined;
|
|
233
|
+
}[];
|
|
234
|
+
liveTargets?: {
|
|
235
|
+
entityType: string;
|
|
236
|
+
readPermission: string & z.$brand<"PermissionKey">;
|
|
237
|
+
}[] | undefined;
|
|
238
|
+
entityRelations?: {
|
|
239
|
+
entityType: string;
|
|
240
|
+
parentType: string;
|
|
241
|
+
}[] | undefined;
|
|
242
|
+
guards?: {
|
|
243
|
+
before: string;
|
|
244
|
+
predicate: string;
|
|
245
|
+
config: Record<string, unknown>;
|
|
246
|
+
}[] | undefined;
|
|
247
|
+
schedules?: {
|
|
248
|
+
operation: string;
|
|
249
|
+
cadence: {
|
|
250
|
+
everyMinutes: number;
|
|
251
|
+
};
|
|
252
|
+
input?: Record<string, unknown> | undefined;
|
|
253
|
+
permissions: (string & z.$brand<"PermissionKey">)[];
|
|
254
|
+
purge?: {
|
|
255
|
+
entityType: string;
|
|
256
|
+
} | undefined;
|
|
257
|
+
}[] | undefined;
|
|
258
|
+
peers?: {
|
|
259
|
+
vertical: string;
|
|
260
|
+
operations: string[];
|
|
261
|
+
permissions: (string & z.$brand<"PermissionKey">)[];
|
|
262
|
+
}[] | undefined;
|
|
263
|
+
freshness?: {
|
|
264
|
+
eventType: string;
|
|
265
|
+
within: {
|
|
266
|
+
hours: number;
|
|
267
|
+
};
|
|
268
|
+
}[] | undefined;
|
|
269
|
+
withdraws?: string[] | undefined;
|
|
270
|
+
entitlementKey: string;
|
|
271
|
+
envSpec?: {
|
|
272
|
+
key: string;
|
|
273
|
+
label?: string | undefined;
|
|
274
|
+
description: string;
|
|
275
|
+
placeholder?: string | undefined;
|
|
276
|
+
required: boolean;
|
|
277
|
+
secret: boolean;
|
|
278
|
+
default?: string | undefined;
|
|
279
|
+
group?: string | undefined;
|
|
280
|
+
}[] | undefined;
|
|
281
|
+
ownerGrants?: (string & z.$brand<"PermissionKey">)[] | undefined;
|
|
282
|
+
entitlements?: string[] | undefined;
|
|
283
|
+
provides?: string[] | undefined;
|
|
284
|
+
requires?: string[] | undefined;
|
|
285
|
+
api?: string | undefined;
|
|
286
|
+
searchables?: {
|
|
287
|
+
entityType: string;
|
|
288
|
+
fields: string[];
|
|
289
|
+
table?: string | undefined;
|
|
290
|
+
idColumn?: string | undefined;
|
|
291
|
+
tokenizer?: "prefix" | "substring" | undefined;
|
|
292
|
+
}[] | undefined;
|
|
293
|
+
lists?: {
|
|
294
|
+
entityType: string;
|
|
295
|
+
sortable: string[];
|
|
296
|
+
filterable?: string[] | undefined;
|
|
297
|
+
table?: string | undefined;
|
|
298
|
+
idColumn?: string | undefined;
|
|
299
|
+
}[] | undefined;
|
|
300
|
+
entityStates?: {
|
|
301
|
+
archivePermission?: (string & z.$brand<"PermissionKey">) | undefined;
|
|
302
|
+
trashPermission?: (string & z.$brand<"PermissionKey">) | undefined;
|
|
303
|
+
purgeAfterDays?: number | undefined;
|
|
304
|
+
table?: string | undefined;
|
|
305
|
+
idColumn?: string | undefined;
|
|
306
|
+
entityType: string;
|
|
307
|
+
}[] | undefined;
|
|
308
|
+
erasure?: {
|
|
309
|
+
tables: string[];
|
|
310
|
+
entities: {
|
|
311
|
+
entityType: string;
|
|
312
|
+
table: string;
|
|
313
|
+
mode: "blank" | "custom" | "delete" | "unreached";
|
|
314
|
+
subjects?: string[] | undefined;
|
|
315
|
+
fields: {
|
|
316
|
+
name: string;
|
|
317
|
+
blank: "" | null;
|
|
318
|
+
}[];
|
|
319
|
+
}[];
|
|
320
|
+
} | undefined;
|
|
321
|
+
ui?: {
|
|
322
|
+
routes?: {
|
|
323
|
+
path: string;
|
|
324
|
+
screen: string;
|
|
325
|
+
permission: string & z.$brand<"PermissionKey">;
|
|
326
|
+
}[] | undefined;
|
|
327
|
+
nav?: {
|
|
328
|
+
label: string;
|
|
329
|
+
icon?: string | undefined;
|
|
330
|
+
to: string;
|
|
331
|
+
permission: string & z.$brand<"PermissionKey">;
|
|
332
|
+
}[] | undefined;
|
|
333
|
+
entityViews?: {
|
|
334
|
+
entityType: string;
|
|
335
|
+
view: string;
|
|
336
|
+
}[] | undefined;
|
|
337
|
+
widgets?: {
|
|
338
|
+
slot: string;
|
|
339
|
+
component: string;
|
|
340
|
+
permission: string & z.$brand<"PermissionKey">;
|
|
341
|
+
}[] | undefined;
|
|
342
|
+
settingsPanels?: {
|
|
343
|
+
label: string;
|
|
344
|
+
component: string;
|
|
345
|
+
permission: string & z.$brand<"PermissionKey">;
|
|
346
|
+
}[] | undefined;
|
|
347
|
+
} | undefined;
|
|
348
|
+
};
|
|
349
|
+
export declare const derivedMod: ModuleRegistration;
|
|
350
|
+
//# sourceMappingURL=derived-module.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"derived-module.d.ts","sourceRoot":"","sources":["../src/derived-module.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAWxB,OAAO,EAA6C,KAAK,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAE1G,eAAO,MAAM,iBAAiB,kBAAkB,CAAC;AAEjD,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;CAa1B,CAAC;AAMH,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6BAHsC,OAAO;6BAAU,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAuE3F,CAAC;AAEH,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAY7B,CAAC;AAMH,eAAO,MAAM,UAAU,EAAE,kBAkCxB,CAAC"}
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The fixture behind `derivedHandlersContractSuite` (#1773): one module whose get, list, update
|
|
3
|
+
* and delete are DERIVED — declared with `derive` and handed no handler — bound through
|
|
4
|
+
* `operationsFor`, the path a vertical takes. So the suite holds the handlers the platform writes,
|
|
5
|
+
* on each adapter's SQL, to the behaviour a hand-written one owes: the check first, `not_found`,
|
|
6
|
+
* the partial PATCH, the 412, the event and its payload, the paged walk scoped to its parent.
|
|
7
|
+
*
|
|
8
|
+
* - `dfolder` — the parent a page is scoped to.
|
|
9
|
+
* - `dnote` — its child: derived get / list / update / delete. The writes that seed it, and the
|
|
10
|
+
* read of its history, are authored — none of them is a derivable shape.
|
|
11
|
+
*/
|
|
12
|
+
import { z } from 'zod';
|
|
13
|
+
import { defineEntities, defineOperations, listsDeclaredBy, manifestEntities, manifestOperations, moduleManifest, permissionKey, } from '@substrat-run/contracts';
|
|
14
|
+
import { assertAllowed, operationsFor, readHistory } from '@substrat-run/kernel';
|
|
15
|
+
export const DERIVED_MODULE_ID = '@test/derived';
|
|
16
|
+
export const derivedEntities = defineEntities({
|
|
17
|
+
dfolder: { table: 'derived_folders', fields: z.object({ id: z.string(), name: z.string() }) },
|
|
18
|
+
dnote: {
|
|
19
|
+
table: 'derived_notes',
|
|
20
|
+
fields: z.object({
|
|
21
|
+
id: z.string(),
|
|
22
|
+
dfolder_id: z.string(),
|
|
23
|
+
title: z.string(),
|
|
24
|
+
body: z.string().nullable(),
|
|
25
|
+
rank: z.number(),
|
|
26
|
+
}),
|
|
27
|
+
parents: ['dfolder'],
|
|
28
|
+
},
|
|
29
|
+
});
|
|
30
|
+
const PERMISSIONS = ['dnote:read', 'dnote:write'];
|
|
31
|
+
const note = (key) => ({ key, entity: 'dnote', idFrom: 'noteId' });
|
|
32
|
+
const ok = z.object({ ok: z.boolean() });
|
|
33
|
+
export const derivedOperations = defineOperations(derivedEntities, PERMISSIONS)({
|
|
34
|
+
'derived/add-folder': {
|
|
35
|
+
summary: 'Add a folder',
|
|
36
|
+
permission: 'dnote:write',
|
|
37
|
+
input: z.object({ id: z.string(), name: z.string() }),
|
|
38
|
+
output: ok,
|
|
39
|
+
},
|
|
40
|
+
'derived/add-note': {
|
|
41
|
+
summary: 'Add a note — authored, and emitting, so the note has a version to hold',
|
|
42
|
+
permission: 'dnote:write',
|
|
43
|
+
input: z.object({ id: z.string(), folderId: z.string(), title: z.string(), body: z.string().nullable(), rank: z.number() }),
|
|
44
|
+
output: z.object({ id: z.string() }),
|
|
45
|
+
emits: { entity: 'dnote', entityIdFrom: 'id', type: 'dnote.added', schemaVersion: 1, piiClass: 'none', payload: ['id'] },
|
|
46
|
+
},
|
|
47
|
+
'derived/get-note': {
|
|
48
|
+
summary: 'One note',
|
|
49
|
+
derive: 'get',
|
|
50
|
+
permission: note('dnote:read'),
|
|
51
|
+
input: z.object({ noteId: z.string() }),
|
|
52
|
+
output: derivedEntities.dnote.fields,
|
|
53
|
+
http: { method: 'GET', path: '/notes/{noteId}' },
|
|
54
|
+
},
|
|
55
|
+
'derived/list-notes': {
|
|
56
|
+
summary: "A folder's notes",
|
|
57
|
+
derive: 'list',
|
|
58
|
+
permission: { key: 'dnote:read', entity: 'dfolder', idFrom: 'dfolderId' },
|
|
59
|
+
input: z.object({ dfolderId: z.string(), title: z.string().optional() }),
|
|
60
|
+
output: derivedEntities.dnote.fields,
|
|
61
|
+
paged: { over: { entity: 'dnote', sortable: ['rank'], filterable: ['dfolder_id', 'title'] }, total: true },
|
|
62
|
+
http: { method: 'GET', path: '/folders/{dfolderId}/notes' },
|
|
63
|
+
},
|
|
64
|
+
'derived/update-note': {
|
|
65
|
+
summary: 'Change a note',
|
|
66
|
+
derive: 'update',
|
|
67
|
+
permission: note('dnote:write'),
|
|
68
|
+
input: z.object({
|
|
69
|
+
noteId: z.string(),
|
|
70
|
+
title: z.string().optional(),
|
|
71
|
+
body: z.string().nullable().optional(),
|
|
72
|
+
rank: z.number().optional(),
|
|
73
|
+
}),
|
|
74
|
+
output: derivedEntities.dnote.fields,
|
|
75
|
+
http: { method: 'PATCH', path: '/notes/{noteId}' },
|
|
76
|
+
concurrency: { over: 'dnote', idFrom: 'noteId' },
|
|
77
|
+
emits: {
|
|
78
|
+
entity: 'dnote',
|
|
79
|
+
entityIdFrom: 'id',
|
|
80
|
+
type: 'dnote.updated',
|
|
81
|
+
schemaVersion: 1,
|
|
82
|
+
piiClass: 'none',
|
|
83
|
+
payload: ['id', 'title', 'body', 'rank'],
|
|
84
|
+
},
|
|
85
|
+
},
|
|
86
|
+
'derived/delete-note': {
|
|
87
|
+
summary: 'Remove a note',
|
|
88
|
+
derive: 'delete',
|
|
89
|
+
permission: note('dnote:write'),
|
|
90
|
+
input: z.object({ noteId: z.string() }),
|
|
91
|
+
output: z.object({ id: z.string(), deleted: z.boolean() }),
|
|
92
|
+
http: { method: 'DELETE', path: '/notes/{noteId}' },
|
|
93
|
+
emits: { entity: 'dnote', entityIdFrom: 'id', type: 'dnote.deleted', schemaVersion: 1, piiClass: 'none', payload: ['id'] },
|
|
94
|
+
},
|
|
95
|
+
'derived/history': {
|
|
96
|
+
summary: "A note's events, after it is gone too",
|
|
97
|
+
permission: 'dnote:read',
|
|
98
|
+
input: z.object({ noteId: z.string() }),
|
|
99
|
+
output: z.object({ entries: z.array(z.unknown()) }),
|
|
100
|
+
},
|
|
101
|
+
});
|
|
102
|
+
export const derivedModManifest = moduleManifest.parse({
|
|
103
|
+
id: DERIVED_MODULE_ID,
|
|
104
|
+
version: '1.0.0',
|
|
105
|
+
kernelContract: '^0.0.1',
|
|
106
|
+
migrations: { journalDir: './migrations', compatibleFrom: '1.0.0' },
|
|
107
|
+
...manifestOperations(derivedOperations, {
|
|
108
|
+
permissions: { 'dnote:read': 'read notes', 'dnote:write': 'write notes' },
|
|
109
|
+
consumes: [],
|
|
110
|
+
}),
|
|
111
|
+
...manifestEntities(derivedEntities, {}),
|
|
112
|
+
lists: listsDeclaredBy(derivedOperations, derivedEntities),
|
|
113
|
+
entitlementKey: 'derived',
|
|
114
|
+
});
|
|
115
|
+
const WRITE = permissionKey.parse('dnote:write');
|
|
116
|
+
const READ = permissionKey.parse('dnote:read');
|
|
117
|
+
const noteRef = (id) => ({ entityType: 'dnote', entityId: id });
|
|
118
|
+
export const derivedMod = {
|
|
119
|
+
manifest: derivedModManifest,
|
|
120
|
+
migrations: [
|
|
121
|
+
{
|
|
122
|
+
version: '0001-init',
|
|
123
|
+
sql: `CREATE TABLE derived_folders (id TEXT PRIMARY KEY, name TEXT NOT NULL);
|
|
124
|
+
CREATE TABLE derived_notes (id TEXT PRIMARY KEY, dfolder_id TEXT NOT NULL, title TEXT NOT NULL,
|
|
125
|
+
body TEXT, rank INTEGER NOT NULL);`,
|
|
126
|
+
},
|
|
127
|
+
],
|
|
128
|
+
// The four derived operations are absent here — and could not be present: the type refuses them.
|
|
129
|
+
...operationsFor(derivedOperations)({
|
|
130
|
+
'derived/add-folder': async (ctx, i) => {
|
|
131
|
+
assertAllowed(await ctx.check(WRITE));
|
|
132
|
+
ctx.sql.exec('INSERT INTO derived_folders (id, name) VALUES (?, ?)', [i.id, i.name]);
|
|
133
|
+
return { ok: true };
|
|
134
|
+
},
|
|
135
|
+
'derived/add-note': async (ctx, i) => {
|
|
136
|
+
assertAllowed(await ctx.check(WRITE));
|
|
137
|
+
ctx.sql.exec('INSERT INTO derived_notes (id, dfolder_id, title, body, rank) VALUES (?, ?, ?, ?, ?)', [
|
|
138
|
+
i.id,
|
|
139
|
+
i.folderId,
|
|
140
|
+
i.title,
|
|
141
|
+
i.body,
|
|
142
|
+
i.rank,
|
|
143
|
+
]);
|
|
144
|
+
ctx.emit({ type: 'dnote.added', schemaVersion: 1, entity: noteRef(i.id), piiClass: 'none', payload: { id: i.id } });
|
|
145
|
+
return { id: i.id };
|
|
146
|
+
},
|
|
147
|
+
'derived/history': async (ctx, i) => {
|
|
148
|
+
assertAllowed(await ctx.check(READ));
|
|
149
|
+
return { entries: readHistory({ sql: ctx.sql }, noteRef(i.noteId)).entries };
|
|
150
|
+
},
|
|
151
|
+
}),
|
|
152
|
+
};
|
|
153
|
+
//# sourceMappingURL=derived-module.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"derived-module.js","sourceRoot":"","sources":["../src/derived-module.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EACL,cAAc,EACd,gBAAgB,EAChB,eAAe,EACf,gBAAgB,EAChB,kBAAkB,EAClB,cAAc,EACd,aAAa,GAEd,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,WAAW,EAA2B,MAAM,sBAAsB,CAAC;AAE1G,MAAM,CAAC,MAAM,iBAAiB,GAAG,eAAe,CAAC;AAEjD,MAAM,CAAC,MAAM,eAAe,GAAG,cAAc,CAAC;IAC5C,OAAO,EAAE,EAAE,KAAK,EAAE,iBAAiB,EAAE,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,EAAE;IAC7F,KAAK,EAAE;QACL,KAAK,EAAE,eAAe;QACtB,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC;YACf,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE;YACd,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE;YACtB,K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