@substrat-run/contract-tests 0.142.0 → 0.144.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/attachment-refusal-suite.d.ts +3 -0
- package/dist/attachment-refusal-suite.d.ts.map +1 -0
- package/dist/attachment-refusal-suite.js +128 -0
- package/dist/attachment-refusal-suite.js.map +1 -0
- package/dist/bind-module.d.ts +199 -0
- package/dist/bind-module.d.ts.map +1 -0
- package/dist/bind-module.js +104 -0
- package/dist/bind-module.js.map +1 -0
- package/dist/binding-invite-suite.d.ts +12 -0
- package/dist/binding-invite-suite.d.ts.map +1 -0
- package/dist/binding-invite-suite.js +507 -0
- package/dist/binding-invite-suite.js.map +1 -0
- 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 +690 -0
- package/dist/derived-module.d.ts.map +1 -0
- package/dist/derived-module.js +320 -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 +481 -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 +8 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +8 -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 +78 -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-backfill-ties.d.ts +29 -0
- package/dist/shape-backfill-ties.d.ts.map +1 -0
- package/dist/shape-backfill-ties.js +113 -0
- package/dist/shape-backfill-ties.js.map +1 -0
- package/dist/shape-reconcile-plan.d.ts +37 -0
- package/dist/shape-reconcile-plan.d.ts.map +1 -0
- package/dist/shape-reconcile-plan.js +143 -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
|
@@ -0,0 +1,690 @@
|
|
|
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
|
+
* - `dtag` — another child of `dfolder`, made by a derived CREATE (#2157): keyed per folder, its
|
|
12
|
+
* time and author stamped, linked to the folder it was checked on; read and changed derived too.
|
|
13
|
+
* - `dlabel` — a scope-wide derived create, with no parent and no natural key.
|
|
14
|
+
* - `dshelf` — archivable and trashable, each under its own key (#119): derived archive /
|
|
15
|
+
* unarchive / trash / restore, the bin page, and a list with the archive view.
|
|
16
|
+
*/
|
|
17
|
+
import { z } from 'zod';
|
|
18
|
+
import { type ModuleRegistration } from '@substrat-run/kernel';
|
|
19
|
+
export declare const DERIVED_MODULE_ID = "@test/derived";
|
|
20
|
+
export declare const derivedEntities: {
|
|
21
|
+
readonly dfolder: {
|
|
22
|
+
readonly table: "derived_folders";
|
|
23
|
+
readonly fields: z.ZodObject<{
|
|
24
|
+
id: z.ZodString;
|
|
25
|
+
name: z.ZodString;
|
|
26
|
+
}, z.core.$strip>;
|
|
27
|
+
};
|
|
28
|
+
readonly dnote: {
|
|
29
|
+
readonly table: "derived_notes";
|
|
30
|
+
readonly fields: z.ZodObject<{
|
|
31
|
+
id: z.ZodString;
|
|
32
|
+
dfolder_id: z.ZodString;
|
|
33
|
+
title: z.ZodString;
|
|
34
|
+
body: z.ZodNullable<z.ZodString>;
|
|
35
|
+
rank: z.ZodNumber;
|
|
36
|
+
}, z.core.$strip>;
|
|
37
|
+
readonly parents: readonly ["dfolder"];
|
|
38
|
+
};
|
|
39
|
+
readonly dtag: {
|
|
40
|
+
readonly table: "derived_tags";
|
|
41
|
+
readonly fields: z.ZodObject<{
|
|
42
|
+
id: z.ZodString;
|
|
43
|
+
dfolder_id: z.ZodString;
|
|
44
|
+
label: z.ZodString;
|
|
45
|
+
note: z.ZodNullable<z.ZodString>;
|
|
46
|
+
created_at: z.ZodString;
|
|
47
|
+
created_by: z.ZodString;
|
|
48
|
+
}, z.core.$strip>;
|
|
49
|
+
readonly parents: readonly ["dfolder"];
|
|
50
|
+
readonly key: readonly ["dfolder_id", "label"];
|
|
51
|
+
readonly stamps: {
|
|
52
|
+
readonly created_at: "createdAt";
|
|
53
|
+
readonly created_by: "createdBy";
|
|
54
|
+
};
|
|
55
|
+
};
|
|
56
|
+
readonly dlabel: {
|
|
57
|
+
readonly table: "derived_labels";
|
|
58
|
+
readonly fields: z.ZodObject<{
|
|
59
|
+
id: z.ZodString;
|
|
60
|
+
name: z.ZodString;
|
|
61
|
+
}, z.core.$strip>;
|
|
62
|
+
};
|
|
63
|
+
readonly dshelf: {
|
|
64
|
+
readonly table: "derived_shelves";
|
|
65
|
+
readonly fields: z.ZodObject<{
|
|
66
|
+
id: z.ZodString;
|
|
67
|
+
label: z.ZodString;
|
|
68
|
+
}, z.core.$strip>;
|
|
69
|
+
readonly archive: {
|
|
70
|
+
readonly permission: "dshelf:archive";
|
|
71
|
+
};
|
|
72
|
+
readonly trash: {
|
|
73
|
+
readonly permission: "dshelf:trash";
|
|
74
|
+
};
|
|
75
|
+
};
|
|
76
|
+
};
|
|
77
|
+
export declare const derivedOperations: {
|
|
78
|
+
readonly 'derived/add-folder': {
|
|
79
|
+
readonly summary: "Add a folder";
|
|
80
|
+
readonly permission: "dnote:write";
|
|
81
|
+
readonly input: z.ZodObject<{
|
|
82
|
+
id: z.ZodString;
|
|
83
|
+
name: z.ZodString;
|
|
84
|
+
}, z.core.$strip>;
|
|
85
|
+
readonly output: z.ZodObject<{
|
|
86
|
+
ok: z.ZodBoolean;
|
|
87
|
+
}, z.core.$strip>;
|
|
88
|
+
};
|
|
89
|
+
readonly 'derived/add-note': {
|
|
90
|
+
readonly summary: "Add a note — authored, and emitting, so the note has a version to hold";
|
|
91
|
+
readonly permission: "dnote:write";
|
|
92
|
+
readonly input: z.ZodObject<{
|
|
93
|
+
id: z.ZodString;
|
|
94
|
+
folderId: z.ZodString;
|
|
95
|
+
title: z.ZodString;
|
|
96
|
+
body: z.ZodNullable<z.ZodString>;
|
|
97
|
+
rank: z.ZodNumber;
|
|
98
|
+
}, z.core.$strip>;
|
|
99
|
+
readonly output: z.ZodObject<{
|
|
100
|
+
id: z.ZodString;
|
|
101
|
+
}, z.core.$strip>;
|
|
102
|
+
readonly emits: {
|
|
103
|
+
readonly entity: "dnote";
|
|
104
|
+
readonly entityIdFrom: "id";
|
|
105
|
+
readonly type: "dnote.added";
|
|
106
|
+
readonly schemaVersion: 1;
|
|
107
|
+
readonly piiClass: "none";
|
|
108
|
+
readonly payload: readonly ["id"];
|
|
109
|
+
};
|
|
110
|
+
};
|
|
111
|
+
readonly 'derived/get-note': {
|
|
112
|
+
readonly summary: "One note";
|
|
113
|
+
readonly derive: "get";
|
|
114
|
+
readonly permission: {
|
|
115
|
+
readonly key: "dnote:read" | "dnote:write" | "dshelf:archive" | "dshelf:trash";
|
|
116
|
+
readonly entity: 'dnote';
|
|
117
|
+
readonly idFrom: 'noteId';
|
|
118
|
+
};
|
|
119
|
+
readonly input: z.ZodObject<{
|
|
120
|
+
noteId: z.ZodString;
|
|
121
|
+
}, z.core.$strip>;
|
|
122
|
+
readonly output: z.ZodObject<{
|
|
123
|
+
id: z.ZodString;
|
|
124
|
+
dfolder_id: z.ZodString;
|
|
125
|
+
title: z.ZodString;
|
|
126
|
+
body: z.ZodNullable<z.ZodString>;
|
|
127
|
+
rank: z.ZodNumber;
|
|
128
|
+
}, z.core.$strip>;
|
|
129
|
+
readonly http: {
|
|
130
|
+
readonly method: "GET";
|
|
131
|
+
readonly path: "/notes/{noteId}";
|
|
132
|
+
};
|
|
133
|
+
};
|
|
134
|
+
readonly 'derived/list-notes': {
|
|
135
|
+
readonly summary: "A folder's notes";
|
|
136
|
+
readonly derive: "list";
|
|
137
|
+
readonly permission: {
|
|
138
|
+
readonly key: "dnote:read";
|
|
139
|
+
readonly entity: "dfolder";
|
|
140
|
+
readonly idFrom: "dfolderId";
|
|
141
|
+
};
|
|
142
|
+
readonly input: z.ZodObject<{
|
|
143
|
+
dfolderId: z.ZodString;
|
|
144
|
+
title: z.ZodOptional<z.ZodString>;
|
|
145
|
+
}, z.core.$strip>;
|
|
146
|
+
readonly output: z.ZodObject<{
|
|
147
|
+
id: z.ZodString;
|
|
148
|
+
dfolder_id: z.ZodString;
|
|
149
|
+
title: z.ZodString;
|
|
150
|
+
body: z.ZodNullable<z.ZodString>;
|
|
151
|
+
rank: z.ZodNumber;
|
|
152
|
+
}, z.core.$strip>;
|
|
153
|
+
readonly paged: {
|
|
154
|
+
readonly over: {
|
|
155
|
+
readonly entity: "dnote";
|
|
156
|
+
readonly sortable: readonly ["rank"];
|
|
157
|
+
readonly filterable: readonly ["dfolder_id", "title"];
|
|
158
|
+
};
|
|
159
|
+
readonly total: true;
|
|
160
|
+
};
|
|
161
|
+
readonly http: {
|
|
162
|
+
readonly method: "GET";
|
|
163
|
+
readonly path: "/folders/{dfolderId}/notes";
|
|
164
|
+
};
|
|
165
|
+
};
|
|
166
|
+
readonly 'derived/update-note': {
|
|
167
|
+
readonly summary: "Change a note";
|
|
168
|
+
readonly derive: "update";
|
|
169
|
+
readonly permission: {
|
|
170
|
+
readonly key: "dnote:read" | "dnote:write" | "dshelf:archive" | "dshelf:trash";
|
|
171
|
+
readonly entity: 'dnote';
|
|
172
|
+
readonly idFrom: 'noteId';
|
|
173
|
+
};
|
|
174
|
+
readonly input: z.ZodObject<{
|
|
175
|
+
noteId: z.ZodString;
|
|
176
|
+
title: z.ZodOptional<z.ZodString>;
|
|
177
|
+
body: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
178
|
+
rank: z.ZodOptional<z.ZodNumber>;
|
|
179
|
+
}, z.core.$strip>;
|
|
180
|
+
readonly output: z.ZodObject<{
|
|
181
|
+
id: z.ZodString;
|
|
182
|
+
dfolder_id: z.ZodString;
|
|
183
|
+
title: z.ZodString;
|
|
184
|
+
body: z.ZodNullable<z.ZodString>;
|
|
185
|
+
rank: z.ZodNumber;
|
|
186
|
+
}, z.core.$strip>;
|
|
187
|
+
readonly http: {
|
|
188
|
+
readonly method: "PATCH";
|
|
189
|
+
readonly path: "/notes/{noteId}";
|
|
190
|
+
};
|
|
191
|
+
readonly concurrency: {
|
|
192
|
+
readonly over: "dnote";
|
|
193
|
+
readonly idFrom: "noteId";
|
|
194
|
+
};
|
|
195
|
+
readonly emits: {
|
|
196
|
+
readonly entity: "dnote";
|
|
197
|
+
readonly entityIdFrom: "id";
|
|
198
|
+
readonly type: "dnote.updated";
|
|
199
|
+
readonly schemaVersion: 1;
|
|
200
|
+
readonly piiClass: "none";
|
|
201
|
+
readonly payload: readonly ["id", "title", "body", "rank"];
|
|
202
|
+
};
|
|
203
|
+
};
|
|
204
|
+
readonly 'derived/delete-note': {
|
|
205
|
+
readonly summary: "Remove a note";
|
|
206
|
+
readonly derive: "delete";
|
|
207
|
+
readonly permission: {
|
|
208
|
+
readonly key: "dnote:read" | "dnote:write" | "dshelf:archive" | "dshelf:trash";
|
|
209
|
+
readonly entity: 'dnote';
|
|
210
|
+
readonly idFrom: 'noteId';
|
|
211
|
+
};
|
|
212
|
+
readonly input: z.ZodObject<{
|
|
213
|
+
noteId: z.ZodString;
|
|
214
|
+
}, z.core.$strip>;
|
|
215
|
+
readonly output: z.ZodObject<{
|
|
216
|
+
id: z.ZodString;
|
|
217
|
+
deleted: z.ZodBoolean;
|
|
218
|
+
}, z.core.$strip>;
|
|
219
|
+
readonly http: {
|
|
220
|
+
readonly method: "DELETE";
|
|
221
|
+
readonly path: "/notes/{noteId}";
|
|
222
|
+
};
|
|
223
|
+
readonly emits: {
|
|
224
|
+
readonly entity: "dnote";
|
|
225
|
+
readonly entityIdFrom: "id";
|
|
226
|
+
readonly type: "dnote.deleted";
|
|
227
|
+
readonly schemaVersion: 1;
|
|
228
|
+
readonly piiClass: "none";
|
|
229
|
+
readonly payload: readonly ["id"];
|
|
230
|
+
};
|
|
231
|
+
};
|
|
232
|
+
readonly 'derived/create-tag': {
|
|
233
|
+
readonly summary: "Tag a folder";
|
|
234
|
+
readonly derive: "create";
|
|
235
|
+
readonly permission: {
|
|
236
|
+
readonly key: "dnote:write";
|
|
237
|
+
readonly entity: "dfolder";
|
|
238
|
+
readonly idFrom: "dfolderId";
|
|
239
|
+
};
|
|
240
|
+
readonly input: z.ZodObject<{
|
|
241
|
+
dfolderId: z.ZodString;
|
|
242
|
+
label: z.ZodString;
|
|
243
|
+
note: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
244
|
+
}, z.core.$strip>;
|
|
245
|
+
readonly output: z.ZodObject<{
|
|
246
|
+
id: z.ZodString;
|
|
247
|
+
dfolder_id: z.ZodString;
|
|
248
|
+
label: z.ZodString;
|
|
249
|
+
note: z.ZodNullable<z.ZodString>;
|
|
250
|
+
created_at: z.ZodString;
|
|
251
|
+
created_by: z.ZodString;
|
|
252
|
+
}, z.core.$strip>;
|
|
253
|
+
readonly http: {
|
|
254
|
+
readonly method: "POST";
|
|
255
|
+
readonly path: "/folders/{dfolderId}/tags";
|
|
256
|
+
};
|
|
257
|
+
readonly emits: {
|
|
258
|
+
readonly entity: "dtag";
|
|
259
|
+
readonly entityIdFrom: "id";
|
|
260
|
+
readonly type: "dtag.created";
|
|
261
|
+
readonly schemaVersion: 1;
|
|
262
|
+
readonly piiClass: "none";
|
|
263
|
+
readonly payload: readonly ["id", "dfolder_id", "label", "created_at", "created_by"];
|
|
264
|
+
};
|
|
265
|
+
};
|
|
266
|
+
readonly 'derived/get-tag': {
|
|
267
|
+
readonly summary: "One tag — narrowed to the tag, so a grant on its folder reaches it only through the link";
|
|
268
|
+
readonly derive: "get";
|
|
269
|
+
readonly permission: {
|
|
270
|
+
readonly key: "dnote:read";
|
|
271
|
+
readonly entity: "dtag";
|
|
272
|
+
readonly idFrom: "tagId";
|
|
273
|
+
};
|
|
274
|
+
readonly input: z.ZodObject<{
|
|
275
|
+
tagId: z.ZodString;
|
|
276
|
+
}, z.core.$strip>;
|
|
277
|
+
readonly output: z.ZodObject<{
|
|
278
|
+
id: z.ZodString;
|
|
279
|
+
dfolder_id: z.ZodString;
|
|
280
|
+
label: z.ZodString;
|
|
281
|
+
note: z.ZodNullable<z.ZodString>;
|
|
282
|
+
created_at: z.ZodString;
|
|
283
|
+
created_by: z.ZodString;
|
|
284
|
+
}, z.core.$strip>;
|
|
285
|
+
readonly http: {
|
|
286
|
+
readonly method: "GET";
|
|
287
|
+
readonly path: "/tags/{tagId}";
|
|
288
|
+
};
|
|
289
|
+
};
|
|
290
|
+
readonly 'derived/update-tag': {
|
|
291
|
+
readonly summary: "Change a tag's note";
|
|
292
|
+
readonly derive: "update";
|
|
293
|
+
readonly permission: {
|
|
294
|
+
readonly key: "dnote:write";
|
|
295
|
+
readonly entity: "dtag";
|
|
296
|
+
readonly idFrom: "tagId";
|
|
297
|
+
};
|
|
298
|
+
readonly input: z.ZodObject<{
|
|
299
|
+
tagId: z.ZodString;
|
|
300
|
+
note: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
301
|
+
}, z.core.$strip>;
|
|
302
|
+
readonly output: z.ZodObject<{
|
|
303
|
+
id: z.ZodString;
|
|
304
|
+
dfolder_id: z.ZodString;
|
|
305
|
+
label: z.ZodString;
|
|
306
|
+
note: z.ZodNullable<z.ZodString>;
|
|
307
|
+
created_at: z.ZodString;
|
|
308
|
+
created_by: z.ZodString;
|
|
309
|
+
}, z.core.$strip>;
|
|
310
|
+
readonly http: {
|
|
311
|
+
readonly method: "PATCH";
|
|
312
|
+
readonly path: "/tags/{tagId}";
|
|
313
|
+
};
|
|
314
|
+
readonly concurrency: {
|
|
315
|
+
readonly over: "dtag";
|
|
316
|
+
readonly idFrom: "tagId";
|
|
317
|
+
};
|
|
318
|
+
readonly emits: {
|
|
319
|
+
readonly entity: "dtag";
|
|
320
|
+
readonly entityIdFrom: "id";
|
|
321
|
+
readonly type: "dtag.updated";
|
|
322
|
+
readonly schemaVersion: 1;
|
|
323
|
+
readonly piiClass: "none";
|
|
324
|
+
readonly payload: readonly ["id", "note", "created_by"];
|
|
325
|
+
};
|
|
326
|
+
};
|
|
327
|
+
readonly 'derived/create-label': {
|
|
328
|
+
readonly summary: "Add a label";
|
|
329
|
+
readonly derive: "create";
|
|
330
|
+
readonly permission: "dnote:write";
|
|
331
|
+
readonly input: z.ZodObject<{
|
|
332
|
+
name: z.ZodString;
|
|
333
|
+
}, z.core.$strip>;
|
|
334
|
+
readonly output: z.ZodObject<{
|
|
335
|
+
id: z.ZodString;
|
|
336
|
+
name: z.ZodString;
|
|
337
|
+
}, z.core.$strip>;
|
|
338
|
+
readonly http: {
|
|
339
|
+
readonly method: "POST";
|
|
340
|
+
readonly path: "/labels";
|
|
341
|
+
};
|
|
342
|
+
readonly emits: {
|
|
343
|
+
readonly entity: "dlabel";
|
|
344
|
+
readonly entityIdFrom: "id";
|
|
345
|
+
readonly type: "dlabel.created";
|
|
346
|
+
readonly schemaVersion: 1;
|
|
347
|
+
readonly piiClass: "none";
|
|
348
|
+
readonly payload: readonly ["id", "name"];
|
|
349
|
+
};
|
|
350
|
+
};
|
|
351
|
+
readonly 'derived/add-shelf': {
|
|
352
|
+
readonly summary: "Add a shelf";
|
|
353
|
+
readonly permission: "dnote:write";
|
|
354
|
+
readonly input: z.ZodObject<{
|
|
355
|
+
id: z.ZodString;
|
|
356
|
+
label: z.ZodString;
|
|
357
|
+
}, z.core.$strip>;
|
|
358
|
+
readonly output: z.ZodObject<{
|
|
359
|
+
ok: z.ZodBoolean;
|
|
360
|
+
}, z.core.$strip>;
|
|
361
|
+
};
|
|
362
|
+
readonly 'derived/create-shelf': {
|
|
363
|
+
readonly summary: "Add a shelf, its id minted";
|
|
364
|
+
readonly derive: "create";
|
|
365
|
+
readonly permission: "dnote:write";
|
|
366
|
+
readonly input: z.ZodObject<{
|
|
367
|
+
label: z.ZodString;
|
|
368
|
+
}, z.core.$strip>;
|
|
369
|
+
readonly output: z.ZodObject<{
|
|
370
|
+
id: z.ZodString;
|
|
371
|
+
label: z.ZodString;
|
|
372
|
+
}, z.core.$strip>;
|
|
373
|
+
readonly http: {
|
|
374
|
+
readonly method: "POST";
|
|
375
|
+
readonly path: "/shelves";
|
|
376
|
+
};
|
|
377
|
+
readonly emits: {
|
|
378
|
+
readonly entity: "dshelf";
|
|
379
|
+
readonly entityIdFrom: "id";
|
|
380
|
+
readonly type: "dshelf.created";
|
|
381
|
+
readonly schemaVersion: 1;
|
|
382
|
+
readonly piiClass: "none";
|
|
383
|
+
readonly payload: readonly ["id", "label"];
|
|
384
|
+
};
|
|
385
|
+
};
|
|
386
|
+
readonly 'derived/list-shelves': {
|
|
387
|
+
readonly summary: "The shelves, active unless the archive is asked for";
|
|
388
|
+
readonly derive: "list";
|
|
389
|
+
readonly permission: "dnote:read";
|
|
390
|
+
readonly input: z.ZodObject<{
|
|
391
|
+
view: z.ZodOptional<z.ZodEnum<{
|
|
392
|
+
active: "active";
|
|
393
|
+
archived: "archived";
|
|
394
|
+
}>>;
|
|
395
|
+
}, z.core.$strip>;
|
|
396
|
+
readonly output: z.ZodObject<{
|
|
397
|
+
id: z.ZodString;
|
|
398
|
+
label: z.ZodString;
|
|
399
|
+
}, z.core.$strip>;
|
|
400
|
+
readonly paged: {
|
|
401
|
+
readonly over: {
|
|
402
|
+
readonly entity: "dshelf";
|
|
403
|
+
readonly sortable: readonly ["label"];
|
|
404
|
+
};
|
|
405
|
+
};
|
|
406
|
+
readonly http: {
|
|
407
|
+
readonly method: "GET";
|
|
408
|
+
readonly path: "/shelves";
|
|
409
|
+
};
|
|
410
|
+
};
|
|
411
|
+
readonly 'derived/archive-shelf': {
|
|
412
|
+
readonly summary: "File a shelf away";
|
|
413
|
+
readonly derive: "archive";
|
|
414
|
+
readonly permission: {
|
|
415
|
+
readonly key: "dshelf:archive" | "dshelf:trash";
|
|
416
|
+
readonly entity: 'dshelf';
|
|
417
|
+
readonly idFrom: 'shelfId';
|
|
418
|
+
};
|
|
419
|
+
readonly input: z.ZodObject<{
|
|
420
|
+
shelfId: z.ZodString;
|
|
421
|
+
}, z.core.$strip>;
|
|
422
|
+
readonly output: z.ZodObject<{
|
|
423
|
+
id: z.ZodString;
|
|
424
|
+
state: z.ZodEnum<{
|
|
425
|
+
active: "active";
|
|
426
|
+
archived: "archived";
|
|
427
|
+
trashed: "trashed";
|
|
428
|
+
}>;
|
|
429
|
+
}, z.core.$strip>;
|
|
430
|
+
readonly http: {
|
|
431
|
+
readonly method: "POST";
|
|
432
|
+
readonly path: "/shelves/{shelfId}/archive";
|
|
433
|
+
};
|
|
434
|
+
};
|
|
435
|
+
readonly 'derived/unarchive-shelf': {
|
|
436
|
+
readonly summary: "Bring a shelf back from the archive";
|
|
437
|
+
readonly derive: "unarchive";
|
|
438
|
+
readonly permission: {
|
|
439
|
+
readonly key: "dshelf:archive" | "dshelf:trash";
|
|
440
|
+
readonly entity: 'dshelf';
|
|
441
|
+
readonly idFrom: 'shelfId';
|
|
442
|
+
};
|
|
443
|
+
readonly input: z.ZodObject<{
|
|
444
|
+
shelfId: z.ZodString;
|
|
445
|
+
}, z.core.$strip>;
|
|
446
|
+
readonly output: z.ZodObject<{
|
|
447
|
+
id: z.ZodString;
|
|
448
|
+
state: z.ZodEnum<{
|
|
449
|
+
active: "active";
|
|
450
|
+
archived: "archived";
|
|
451
|
+
trashed: "trashed";
|
|
452
|
+
}>;
|
|
453
|
+
}, z.core.$strip>;
|
|
454
|
+
readonly http: {
|
|
455
|
+
readonly method: "POST";
|
|
456
|
+
readonly path: "/shelves/{shelfId}/unarchive";
|
|
457
|
+
};
|
|
458
|
+
};
|
|
459
|
+
readonly 'derived/trash-shelf': {
|
|
460
|
+
readonly summary: "Bin a shelf";
|
|
461
|
+
readonly derive: "trash";
|
|
462
|
+
readonly permission: {
|
|
463
|
+
readonly key: "dshelf:archive" | "dshelf:trash";
|
|
464
|
+
readonly entity: 'dshelf';
|
|
465
|
+
readonly idFrom: 'shelfId';
|
|
466
|
+
};
|
|
467
|
+
readonly input: z.ZodObject<{
|
|
468
|
+
shelfId: z.ZodString;
|
|
469
|
+
}, z.core.$strip>;
|
|
470
|
+
readonly output: z.ZodObject<{
|
|
471
|
+
id: z.ZodString;
|
|
472
|
+
state: z.ZodEnum<{
|
|
473
|
+
active: "active";
|
|
474
|
+
archived: "archived";
|
|
475
|
+
trashed: "trashed";
|
|
476
|
+
}>;
|
|
477
|
+
}, z.core.$strip>;
|
|
478
|
+
readonly http: {
|
|
479
|
+
readonly method: "POST";
|
|
480
|
+
readonly path: "/shelves/{shelfId}/trash";
|
|
481
|
+
};
|
|
482
|
+
};
|
|
483
|
+
readonly 'derived/restore-shelf': {
|
|
484
|
+
readonly summary: "Take a shelf out of the bin";
|
|
485
|
+
readonly derive: "restore";
|
|
486
|
+
readonly permission: {
|
|
487
|
+
readonly key: "dshelf:archive" | "dshelf:trash";
|
|
488
|
+
readonly entity: 'dshelf';
|
|
489
|
+
readonly idFrom: 'shelfId';
|
|
490
|
+
};
|
|
491
|
+
readonly trashed: "admits";
|
|
492
|
+
readonly input: z.ZodObject<{
|
|
493
|
+
shelfId: z.ZodString;
|
|
494
|
+
}, z.core.$strip>;
|
|
495
|
+
readonly output: z.ZodObject<{
|
|
496
|
+
id: z.ZodString;
|
|
497
|
+
state: z.ZodEnum<{
|
|
498
|
+
active: "active";
|
|
499
|
+
archived: "archived";
|
|
500
|
+
trashed: "trashed";
|
|
501
|
+
}>;
|
|
502
|
+
}, z.core.$strip>;
|
|
503
|
+
readonly http: {
|
|
504
|
+
readonly method: "POST";
|
|
505
|
+
readonly path: "/shelves/{shelfId}/restore";
|
|
506
|
+
};
|
|
507
|
+
};
|
|
508
|
+
readonly 'derived/trashed-shelves': {
|
|
509
|
+
readonly summary: "The bin";
|
|
510
|
+
readonly derive: "trashed";
|
|
511
|
+
readonly narrows: {
|
|
512
|
+
readonly reason: "Only the binned shelves the caller may restore";
|
|
513
|
+
readonly checks: readonly ["dshelf:trash"];
|
|
514
|
+
};
|
|
515
|
+
readonly output: z.ZodObject<{
|
|
516
|
+
id: z.ZodString;
|
|
517
|
+
label: z.ZodString;
|
|
518
|
+
}, z.core.$strip>;
|
|
519
|
+
readonly paged: {
|
|
520
|
+
readonly over: {
|
|
521
|
+
readonly entity: "dshelf";
|
|
522
|
+
readonly sortable: readonly ["label"];
|
|
523
|
+
};
|
|
524
|
+
};
|
|
525
|
+
readonly http: {
|
|
526
|
+
readonly method: "GET";
|
|
527
|
+
readonly path: "/shelves/trash";
|
|
528
|
+
};
|
|
529
|
+
};
|
|
530
|
+
readonly 'derived/history': {
|
|
531
|
+
readonly summary: "A note's events, after it is gone too";
|
|
532
|
+
readonly permission: "dnote:read";
|
|
533
|
+
readonly input: z.ZodObject<{
|
|
534
|
+
noteId: z.ZodString;
|
|
535
|
+
}, z.core.$strip>;
|
|
536
|
+
readonly output: z.ZodObject<{
|
|
537
|
+
entries: z.ZodArray<z.ZodUnknown>;
|
|
538
|
+
}, z.core.$strip>;
|
|
539
|
+
};
|
|
540
|
+
};
|
|
541
|
+
export declare const derivedModManifest: {
|
|
542
|
+
id: string & z.$brand<"ModuleId">;
|
|
543
|
+
version: string;
|
|
544
|
+
kernelContract: string;
|
|
545
|
+
permissions: {
|
|
546
|
+
key: string & z.$brand<"PermissionKey">;
|
|
547
|
+
description: string;
|
|
548
|
+
}[];
|
|
549
|
+
events: {
|
|
550
|
+
emits: {
|
|
551
|
+
type: string;
|
|
552
|
+
schemaVersion: number;
|
|
553
|
+
}[];
|
|
554
|
+
consumes: {
|
|
555
|
+
type: string;
|
|
556
|
+
schemaVersion: number;
|
|
557
|
+
from?: string | undefined;
|
|
558
|
+
}[];
|
|
559
|
+
exports?: {
|
|
560
|
+
type: string;
|
|
561
|
+
schemaVersion: number;
|
|
562
|
+
readPermission: string & z.$brand<"PermissionKey">;
|
|
563
|
+
}[] | undefined;
|
|
564
|
+
};
|
|
565
|
+
migrations: {
|
|
566
|
+
journalDir: string;
|
|
567
|
+
compatibleFrom: string;
|
|
568
|
+
};
|
|
569
|
+
attachmentTargets: {
|
|
570
|
+
entityType: string;
|
|
571
|
+
readPermission: string & z.$brand<"PermissionKey">;
|
|
572
|
+
writePermission?: (string & z.$brand<"PermissionKey">) | undefined;
|
|
573
|
+
}[];
|
|
574
|
+
liveTargets?: {
|
|
575
|
+
entityType: string;
|
|
576
|
+
readPermission: string & z.$brand<"PermissionKey">;
|
|
577
|
+
}[] | undefined;
|
|
578
|
+
entityRelations?: {
|
|
579
|
+
entityType: string;
|
|
580
|
+
parentType: string;
|
|
581
|
+
}[] | undefined;
|
|
582
|
+
guards?: {
|
|
583
|
+
before: string;
|
|
584
|
+
predicate: string;
|
|
585
|
+
config: Record<string, unknown>;
|
|
586
|
+
}[] | undefined;
|
|
587
|
+
schedules?: {
|
|
588
|
+
operation: string;
|
|
589
|
+
cadence: {
|
|
590
|
+
everyMinutes: number;
|
|
591
|
+
};
|
|
592
|
+
input?: Record<string, unknown> | undefined;
|
|
593
|
+
permissions: (string & z.$brand<"PermissionKey">)[];
|
|
594
|
+
purge?: {
|
|
595
|
+
entityType: string;
|
|
596
|
+
} | undefined;
|
|
597
|
+
}[] | undefined;
|
|
598
|
+
peers?: {
|
|
599
|
+
vertical: string;
|
|
600
|
+
operations: string[];
|
|
601
|
+
permissions: (string & z.$brand<"PermissionKey">)[];
|
|
602
|
+
}[] | undefined;
|
|
603
|
+
freshness?: {
|
|
604
|
+
eventType: string;
|
|
605
|
+
within: {
|
|
606
|
+
hours: number;
|
|
607
|
+
};
|
|
608
|
+
}[] | undefined;
|
|
609
|
+
withdraws?: string[] | undefined;
|
|
610
|
+
entitlementKey: string;
|
|
611
|
+
envSpec?: {
|
|
612
|
+
key: string;
|
|
613
|
+
label?: string | undefined;
|
|
614
|
+
description: string;
|
|
615
|
+
placeholder?: string | undefined;
|
|
616
|
+
required: boolean;
|
|
617
|
+
secret: boolean;
|
|
618
|
+
default?: string | undefined;
|
|
619
|
+
group?: string | undefined;
|
|
620
|
+
}[] | undefined;
|
|
621
|
+
ownerGrants?: (string & z.$brand<"PermissionKey">)[] | undefined;
|
|
622
|
+
entitlements?: string[] | undefined;
|
|
623
|
+
provides?: string[] | undefined;
|
|
624
|
+
requires?: string[] | undefined;
|
|
625
|
+
api?: string | undefined;
|
|
626
|
+
searchables?: {
|
|
627
|
+
entityType: string;
|
|
628
|
+
fields: string[];
|
|
629
|
+
table?: string | undefined;
|
|
630
|
+
idColumn?: string | undefined;
|
|
631
|
+
tokenizer?: "prefix" | "substring" | undefined;
|
|
632
|
+
}[] | undefined;
|
|
633
|
+
lists?: {
|
|
634
|
+
entityType: string;
|
|
635
|
+
sortable: string[];
|
|
636
|
+
filterable?: string[] | undefined;
|
|
637
|
+
table?: string | undefined;
|
|
638
|
+
idColumn?: string | undefined;
|
|
639
|
+
}[] | undefined;
|
|
640
|
+
entityStates?: {
|
|
641
|
+
archivePermission?: (string & z.$brand<"PermissionKey">) | undefined;
|
|
642
|
+
trashPermission?: (string & z.$brand<"PermissionKey">) | undefined;
|
|
643
|
+
purgeAfterDays?: number | undefined;
|
|
644
|
+
table?: string | undefined;
|
|
645
|
+
idColumn?: string | undefined;
|
|
646
|
+
entityType: string;
|
|
647
|
+
}[] | undefined;
|
|
648
|
+
erasure?: {
|
|
649
|
+
tables: string[];
|
|
650
|
+
entities: {
|
|
651
|
+
entityType: string;
|
|
652
|
+
table: string;
|
|
653
|
+
mode: "blank" | "custom" | "delete" | "unreached";
|
|
654
|
+
subjects?: string[] | undefined;
|
|
655
|
+
fields: {
|
|
656
|
+
name: string;
|
|
657
|
+
blank: "" | null;
|
|
658
|
+
}[];
|
|
659
|
+
}[];
|
|
660
|
+
} | undefined;
|
|
661
|
+
ui?: {
|
|
662
|
+
routes?: {
|
|
663
|
+
path: string;
|
|
664
|
+
screen: string;
|
|
665
|
+
permission: string & z.$brand<"PermissionKey">;
|
|
666
|
+
}[] | undefined;
|
|
667
|
+
nav?: {
|
|
668
|
+
label: string;
|
|
669
|
+
icon?: string | undefined;
|
|
670
|
+
to: string;
|
|
671
|
+
permission: string & z.$brand<"PermissionKey">;
|
|
672
|
+
}[] | undefined;
|
|
673
|
+
entityViews?: {
|
|
674
|
+
entityType: string;
|
|
675
|
+
view: string;
|
|
676
|
+
}[] | undefined;
|
|
677
|
+
widgets?: {
|
|
678
|
+
slot: string;
|
|
679
|
+
component: string;
|
|
680
|
+
permission: string & z.$brand<"PermissionKey">;
|
|
681
|
+
}[] | undefined;
|
|
682
|
+
settingsPanels?: {
|
|
683
|
+
label: string;
|
|
684
|
+
component: string;
|
|
685
|
+
permission: string & z.$brand<"PermissionKey">;
|
|
686
|
+
}[] | undefined;
|
|
687
|
+
} | undefined;
|
|
688
|
+
};
|
|
689
|
+
export declare const derivedMod: ModuleRegistration;
|
|
690
|
+
//# 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;;;;;;;;;;;;;;;GAeG;AACH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAYxB,OAAO,EAA6C,KAAK,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAE1G,eAAO,MAAM,iBAAiB,kBAAkB,CAAC;AAEjD,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkC1B,CAAC;AAQH,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6BAHsC,OAAO;6BAAU,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6BAFnB,QAAQ;6BAAU,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8LnG,CAAC;AAEH,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiB7B,CAAC;AAMH,eAAO,MAAM,UAAU,EAAE,kBAkDxB,CAAC"}
|