@composable-os/pack-knowledge 0.0.0-stage → 0.1.0-beta.13
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 +109 -0
- package/dist/automations.d.ts +14 -0
- package/dist/automations.js +42 -0
- package/dist/client/index.d.ts +468 -0
- package/dist/client/index.js +101 -0
- package/dist/index.d.ts +453 -0
- package/dist/index.js +325 -0
- package/dist/tools.d.ts +131 -0
- package/dist/tools.js +279 -0
- package/package.json +36 -4
- package/README.md +0 -3
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
// The Knowledge pack's headless entry (stage 38 step 5; ADRs 0418 and 0453): hooks over the typed
|
|
2
|
+
// client, no markup. A client app imports it as `@composable-os/pack-knowledge/client` and hands
|
|
3
|
+
// it its generated client; the blocks (step 6) render what it returns.
|
|
4
|
+
//
|
|
5
|
+
// Staff read procedures as published with the host's `content.staffGet`, `content.staffList` and
|
|
6
|
+
// `content.search` (ADR 0701), never the working copy, and confirm with this pack's `confirm`
|
|
7
|
+
// tool. The public reads help pages as published with `content.get`, `content.list` and
|
|
8
|
+
// `content.search` (ADRs 0442, 0700). Nothing here decides who may read what, what is to read,
|
|
9
|
+
// or whether a confirmation counts: those are the host's.
|
|
10
|
+
import { packHooks, } from "@composable-os/client";
|
|
11
|
+
/** The objects, as the host names them. */
|
|
12
|
+
export const PROCEDURE = "knowledge.procedure";
|
|
13
|
+
export const HELP_PAGE = "knowledge.helppage";
|
|
14
|
+
/**
|
|
15
|
+
* The operations each hook calls (ADR 0453). The staff client (a pack-role account's too) gets
|
|
16
|
+
* the procedure hooks; a customer's client and the public's get the help centre's.
|
|
17
|
+
*/
|
|
18
|
+
export const KNOWLEDGE_HOOKS_CALL = {
|
|
19
|
+
useProcedures: ["content.staffList"],
|
|
20
|
+
useProcedure: ["content.staffGet"],
|
|
21
|
+
useSearchProcedures: ["content.search"],
|
|
22
|
+
useToRead: ["x.knowledge.toRead"],
|
|
23
|
+
useConfirm: ["x.knowledge.confirm"],
|
|
24
|
+
useReadStatus: ["x.knowledge.readStatus"],
|
|
25
|
+
useHelpTopics: ["x.knowledge.helpTopics"],
|
|
26
|
+
useHelpPages: ["content.list"],
|
|
27
|
+
useHelpPage: ["content.get"],
|
|
28
|
+
useSearchHelp: ["content.search"],
|
|
29
|
+
};
|
|
30
|
+
/**
|
|
31
|
+
* Hooks for a React or React Native app:
|
|
32
|
+
* `const knowledge = createKnowledgeHooks({ useQuery, useMutation }, api)`. The hooks a client
|
|
33
|
+
* cannot back are not there, and calling one does not compile.
|
|
34
|
+
*/
|
|
35
|
+
export function createKnowledgeHooks(react, client) {
|
|
36
|
+
return packHooks(client, KNOWLEDGE_HOOKS_CALL, (api) => allKnowledgeHooks(react, api));
|
|
37
|
+
}
|
|
38
|
+
const idle = (name) => ({
|
|
39
|
+
queryKey: [name, "none"],
|
|
40
|
+
queryFn: async () => undefined,
|
|
41
|
+
});
|
|
42
|
+
function allKnowledgeHooks(react, api) {
|
|
43
|
+
const { useQuery, useMutation } = react;
|
|
44
|
+
return {
|
|
45
|
+
/** Staff: a page of published procedures (by section, or as asked). */
|
|
46
|
+
useProcedures(input = {}) {
|
|
47
|
+
return useQuery(api.query("content.staffList", { object: PROCEDURE, ...input }));
|
|
48
|
+
},
|
|
49
|
+
/** Staff: one procedure as published, by id or address. */
|
|
50
|
+
useProcedure(by) {
|
|
51
|
+
const options = by
|
|
52
|
+
? api.query("content.staffGet", { object: PROCEDURE, ...by })
|
|
53
|
+
: idle("content.staffGet");
|
|
54
|
+
return useQuery({ ...options, enabled: by !== null });
|
|
55
|
+
},
|
|
56
|
+
/** Staff: procedures whose published words match, each with its section's anchor. */
|
|
57
|
+
useSearchProcedures(q) {
|
|
58
|
+
const options = q.trim()
|
|
59
|
+
? api.query("content.search", { object: PROCEDURE, q })
|
|
60
|
+
: idle("content.search");
|
|
61
|
+
return useQuery({ ...options, enabled: q.trim() !== "" });
|
|
62
|
+
},
|
|
63
|
+
/** Staff: what I must read, and what I confirmed. */
|
|
64
|
+
useToRead() {
|
|
65
|
+
return useQuery(api.query("x.knowledge.toRead", {}));
|
|
66
|
+
},
|
|
67
|
+
/** Staff: "I have read and understood this", for the version read. */
|
|
68
|
+
useConfirm() {
|
|
69
|
+
return useMutation(api.mutation("x.knowledge.confirm"));
|
|
70
|
+
},
|
|
71
|
+
/** Those who manage: who has read what (one procedure, or every one's counts). */
|
|
72
|
+
useReadStatus(id) {
|
|
73
|
+
return useQuery(api.query("x.knowledge.readStatus", id === undefined ? {} : { id }));
|
|
74
|
+
},
|
|
75
|
+
/** Anyone: the help topics, in their order. */
|
|
76
|
+
useHelpTopics() {
|
|
77
|
+
return useQuery(api.query("x.knowledge.helpTopics", {}));
|
|
78
|
+
},
|
|
79
|
+
/** Anyone: a page of published help pages (a topic's, or as asked). */
|
|
80
|
+
useHelpPages(input = {}) {
|
|
81
|
+
return useQuery(api.query("content.list", { object: HELP_PAGE, ...input }));
|
|
82
|
+
},
|
|
83
|
+
/** Anyone: one published help page by its address; an old address answers `redirect`. */
|
|
84
|
+
useHelpPage(slug) {
|
|
85
|
+
const options = slug
|
|
86
|
+
? api.query("content.get", { object: HELP_PAGE, slug })
|
|
87
|
+
: idle("content.get");
|
|
88
|
+
return useQuery({
|
|
89
|
+
...options,
|
|
90
|
+
enabled: slug !== null,
|
|
91
|
+
});
|
|
92
|
+
},
|
|
93
|
+
/** Anyone: help pages whose published words match, as the reader types. */
|
|
94
|
+
useSearchHelp(q) {
|
|
95
|
+
const options = q.trim()
|
|
96
|
+
? api.query("content.search", { object: HELP_PAGE, q })
|
|
97
|
+
: idle("content.search");
|
|
98
|
+
return useQuery({ ...options, enabled: q.trim() !== "" });
|
|
99
|
+
},
|
|
100
|
+
};
|
|
101
|
+
}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,453 @@
|
|
|
1
|
+
declare const _default: import("@composable-os/sdk").Extension<{
|
|
2
|
+
readonly id: "knowledge";
|
|
3
|
+
readonly version: "0.1.0";
|
|
4
|
+
readonly contractVersion: 1;
|
|
5
|
+
readonly label: "Knowledge";
|
|
6
|
+
readonly description: string;
|
|
7
|
+
readonly permissions: {
|
|
8
|
+
readonly operations: ["ack.mine", "ack.confirm", "ack.status", "ack.overview", "public.list", "notification.send"];
|
|
9
|
+
readonly modules: ["ops"];
|
|
10
|
+
};
|
|
11
|
+
readonly grantable: readonly ["knowledge:manage", "knowledge:write"];
|
|
12
|
+
readonly restricted: readonly ["knowledge:manage"];
|
|
13
|
+
readonly grantableLabels: {
|
|
14
|
+
readonly "knowledge:manage": "See who has read and confirmed each procedure, and change who must read one once published";
|
|
15
|
+
readonly "knowledge:write": "Write procedures and help pages (a person allowed to publish publishes them)";
|
|
16
|
+
};
|
|
17
|
+
readonly objects: {
|
|
18
|
+
readonly procedure: {
|
|
19
|
+
readonly label: "Procedure";
|
|
20
|
+
readonly plural: "Procedures";
|
|
21
|
+
readonly icon: "list-checks";
|
|
22
|
+
readonly titleField: "title";
|
|
23
|
+
readonly owner: "owner";
|
|
24
|
+
readonly description: string;
|
|
25
|
+
readonly navigation: "main";
|
|
26
|
+
readonly navigationOrder: 60;
|
|
27
|
+
readonly fields: {
|
|
28
|
+
readonly title: {
|
|
29
|
+
readonly type: "text";
|
|
30
|
+
readonly label: "Title";
|
|
31
|
+
readonly required: true;
|
|
32
|
+
};
|
|
33
|
+
readonly slug: {
|
|
34
|
+
readonly type: "slug";
|
|
35
|
+
readonly label: "Address";
|
|
36
|
+
readonly description: "How a link names the procedure. Made from the title.";
|
|
37
|
+
};
|
|
38
|
+
readonly summary: {
|
|
39
|
+
readonly type: "text";
|
|
40
|
+
readonly label: "Summary";
|
|
41
|
+
readonly description: "One or two sentences for lists and search results.";
|
|
42
|
+
};
|
|
43
|
+
readonly body: {
|
|
44
|
+
readonly type: "richText";
|
|
45
|
+
readonly label: "Body";
|
|
46
|
+
readonly description: string;
|
|
47
|
+
};
|
|
48
|
+
readonly section: {
|
|
49
|
+
readonly type: "relation";
|
|
50
|
+
readonly label: "Section";
|
|
51
|
+
readonly to: "knowledge.section";
|
|
52
|
+
};
|
|
53
|
+
readonly owner: {
|
|
54
|
+
readonly type: "user";
|
|
55
|
+
readonly label: "Kept right by";
|
|
56
|
+
readonly description: string;
|
|
57
|
+
};
|
|
58
|
+
readonly mustRead: {
|
|
59
|
+
readonly type: "document";
|
|
60
|
+
readonly label: "Must read";
|
|
61
|
+
readonly schema: import("@composable-os/sdk").DocumentSchema;
|
|
62
|
+
readonly description: string;
|
|
63
|
+
};
|
|
64
|
+
readonly reviewEvery: {
|
|
65
|
+
readonly type: "number";
|
|
66
|
+
readonly label: "Review every (months)";
|
|
67
|
+
readonly default: 12;
|
|
68
|
+
readonly min: 0;
|
|
69
|
+
readonly max: 120;
|
|
70
|
+
readonly step: 1;
|
|
71
|
+
readonly description: "How often its owner is asked to check it is still right. 0: never.";
|
|
72
|
+
};
|
|
73
|
+
readonly nextReview: {
|
|
74
|
+
readonly type: "formula";
|
|
75
|
+
readonly label: "Next review";
|
|
76
|
+
readonly description: "Its last publish plus the review period. Empty when it is never reviewed.";
|
|
77
|
+
readonly expression: "if(coalesce(reviewEvery, 12) > 0, dateAdd(publishedAt, coalesce(reviewEvery, 12), \"month\"), null)";
|
|
78
|
+
};
|
|
79
|
+
};
|
|
80
|
+
readonly indexes: readonly [readonly ["section"], readonly ["owner"]];
|
|
81
|
+
readonly publishable: {
|
|
82
|
+
readonly content: readonly ["title", "summary", "body", "section"];
|
|
83
|
+
readonly slug: "slug";
|
|
84
|
+
readonly staffRead: true;
|
|
85
|
+
readonly acknowledge: {
|
|
86
|
+
readonly who: "mustRead";
|
|
87
|
+
readonly manage: "knowledge:manage";
|
|
88
|
+
readonly managed: readonly ["reviewEvery", "owner"];
|
|
89
|
+
readonly owner: "owner";
|
|
90
|
+
readonly notices: {
|
|
91
|
+
readonly asked: {
|
|
92
|
+
readonly title: "Please read: {record}";
|
|
93
|
+
readonly body: string;
|
|
94
|
+
};
|
|
95
|
+
readonly reminder: {
|
|
96
|
+
readonly title: "Still to read: {record}";
|
|
97
|
+
readonly body: "Read this procedure and confirm you have read and understood it.";
|
|
98
|
+
readonly afterDays: 7;
|
|
99
|
+
};
|
|
100
|
+
readonly outstanding: {
|
|
101
|
+
readonly title: "Not yet confirmed: {record}";
|
|
102
|
+
};
|
|
103
|
+
readonly welcome: {
|
|
104
|
+
readonly title: "Procedures to read";
|
|
105
|
+
readonly body: "Welcome. Read these procedures and confirm each one:";
|
|
106
|
+
};
|
|
107
|
+
};
|
|
108
|
+
};
|
|
109
|
+
};
|
|
110
|
+
};
|
|
111
|
+
readonly section: {
|
|
112
|
+
readonly label: "Section";
|
|
113
|
+
readonly plural: "Sections";
|
|
114
|
+
readonly icon: "shapes";
|
|
115
|
+
readonly titleField: "name";
|
|
116
|
+
readonly navigation: "settings";
|
|
117
|
+
readonly description: "A group of procedures (opening and closing, safety, the front desk). Staff only.";
|
|
118
|
+
readonly fields: {
|
|
119
|
+
readonly name: {
|
|
120
|
+
readonly type: "text";
|
|
121
|
+
readonly label: "Name";
|
|
122
|
+
readonly required: true;
|
|
123
|
+
};
|
|
124
|
+
readonly order: {
|
|
125
|
+
readonly type: "number";
|
|
126
|
+
readonly label: "Order";
|
|
127
|
+
readonly step: 1;
|
|
128
|
+
};
|
|
129
|
+
};
|
|
130
|
+
readonly indexes: readonly [readonly ["order"]];
|
|
131
|
+
};
|
|
132
|
+
readonly helppage: {
|
|
133
|
+
readonly label: "Help page";
|
|
134
|
+
readonly plural: "Help pages";
|
|
135
|
+
readonly icon: "newspaper";
|
|
136
|
+
readonly titleField: "title";
|
|
137
|
+
readonly description: string;
|
|
138
|
+
readonly navigation: "main";
|
|
139
|
+
readonly navigationOrder: 61;
|
|
140
|
+
readonly fields: {
|
|
141
|
+
readonly title: {
|
|
142
|
+
readonly type: "text";
|
|
143
|
+
readonly label: "Title";
|
|
144
|
+
readonly required: true;
|
|
145
|
+
};
|
|
146
|
+
readonly slug: {
|
|
147
|
+
readonly type: "slug";
|
|
148
|
+
readonly label: "Address";
|
|
149
|
+
readonly description: "Where the page is read: /help/<address>. Made from the title.";
|
|
150
|
+
};
|
|
151
|
+
readonly summary: {
|
|
152
|
+
readonly type: "text";
|
|
153
|
+
readonly label: "Summary";
|
|
154
|
+
readonly description: "One or two sentences for lists, search results and link previews.";
|
|
155
|
+
};
|
|
156
|
+
readonly body: {
|
|
157
|
+
readonly type: "richText";
|
|
158
|
+
readonly label: "Body";
|
|
159
|
+
};
|
|
160
|
+
readonly topic: {
|
|
161
|
+
readonly type: "relation";
|
|
162
|
+
readonly label: "Topic";
|
|
163
|
+
readonly to: "knowledge.helptopic";
|
|
164
|
+
};
|
|
165
|
+
readonly order: {
|
|
166
|
+
readonly type: "number";
|
|
167
|
+
readonly label: "Order in its topic";
|
|
168
|
+
readonly step: 1;
|
|
169
|
+
};
|
|
170
|
+
readonly related: {
|
|
171
|
+
readonly type: "relation";
|
|
172
|
+
readonly label: "Related pages";
|
|
173
|
+
readonly to: "knowledge.helppage";
|
|
174
|
+
readonly many: true;
|
|
175
|
+
};
|
|
176
|
+
readonly seoTitle: {
|
|
177
|
+
readonly type: "text";
|
|
178
|
+
readonly label: "Search title";
|
|
179
|
+
};
|
|
180
|
+
readonly seoDescription: {
|
|
181
|
+
readonly type: "text";
|
|
182
|
+
readonly label: "Search description";
|
|
183
|
+
};
|
|
184
|
+
readonly noindex: {
|
|
185
|
+
readonly type: "boolean";
|
|
186
|
+
readonly label: "Hide from search engines";
|
|
187
|
+
readonly description: "Asks search engines not to list the page.";
|
|
188
|
+
};
|
|
189
|
+
};
|
|
190
|
+
readonly indexes: readonly [readonly ["topic", "order"]];
|
|
191
|
+
readonly publishable: {
|
|
192
|
+
readonly content: readonly ["title", "summary", "body", "topic", "order", "related", "seoTitle", "seoDescription", "noindex"];
|
|
193
|
+
readonly slug: "slug";
|
|
194
|
+
};
|
|
195
|
+
readonly public: {
|
|
196
|
+
readonly read: readonly ["title", "slug", "summary", "body", "topic", "order", "related", "seoTitle", "seoDescription", "noindex", "publishedAt"];
|
|
197
|
+
};
|
|
198
|
+
};
|
|
199
|
+
readonly helptopic: {
|
|
200
|
+
readonly label: "Help topic";
|
|
201
|
+
readonly plural: "Help topics";
|
|
202
|
+
readonly icon: "tags";
|
|
203
|
+
readonly titleField: "name";
|
|
204
|
+
readonly navigation: "settings";
|
|
205
|
+
readonly description: "A group of help pages, as the help centre's menu shows them.";
|
|
206
|
+
readonly fields: {
|
|
207
|
+
readonly name: {
|
|
208
|
+
readonly type: "text";
|
|
209
|
+
readonly label: "Name";
|
|
210
|
+
readonly required: true;
|
|
211
|
+
};
|
|
212
|
+
readonly slug: {
|
|
213
|
+
readonly type: "slug";
|
|
214
|
+
readonly label: "Address";
|
|
215
|
+
};
|
|
216
|
+
readonly order: {
|
|
217
|
+
readonly type: "number";
|
|
218
|
+
readonly label: "Order";
|
|
219
|
+
readonly step: 1;
|
|
220
|
+
};
|
|
221
|
+
readonly icon: {
|
|
222
|
+
readonly type: "select";
|
|
223
|
+
readonly label: "Icon";
|
|
224
|
+
readonly options: {
|
|
225
|
+
value: string;
|
|
226
|
+
label: string;
|
|
227
|
+
}[];
|
|
228
|
+
};
|
|
229
|
+
};
|
|
230
|
+
readonly indexes: readonly [readonly ["order"]];
|
|
231
|
+
readonly public: {
|
|
232
|
+
readonly read: readonly ["name", "slug", "order", "icon"];
|
|
233
|
+
};
|
|
234
|
+
};
|
|
235
|
+
};
|
|
236
|
+
readonly views: {
|
|
237
|
+
readonly procedureDrafts: {
|
|
238
|
+
readonly label: "Procedure drafts";
|
|
239
|
+
readonly object: "knowledge.procedure";
|
|
240
|
+
readonly filter: {
|
|
241
|
+
readonly field: "publishState";
|
|
242
|
+
readonly op: "eq";
|
|
243
|
+
readonly value: "draft";
|
|
244
|
+
};
|
|
245
|
+
readonly sort: {
|
|
246
|
+
readonly field: "updatedAt";
|
|
247
|
+
readonly direction: "desc";
|
|
248
|
+
};
|
|
249
|
+
readonly columns: ["title", "section", "owner", "updatedAt"];
|
|
250
|
+
};
|
|
251
|
+
readonly procedures: {
|
|
252
|
+
readonly label: "Published procedures";
|
|
253
|
+
readonly object: "knowledge.procedure";
|
|
254
|
+
readonly filter: {
|
|
255
|
+
readonly field: "publishState";
|
|
256
|
+
readonly op: "eq";
|
|
257
|
+
readonly value: "published";
|
|
258
|
+
};
|
|
259
|
+
readonly sort: {
|
|
260
|
+
readonly field: "title";
|
|
261
|
+
readonly direction: "asc";
|
|
262
|
+
};
|
|
263
|
+
readonly columns: ["title", "section", "owner", "publishedVersion", "publishedAt", "nextReview"];
|
|
264
|
+
};
|
|
265
|
+
readonly reviewDue: {
|
|
266
|
+
readonly label: "Procedures by next review";
|
|
267
|
+
readonly object: "knowledge.procedure";
|
|
268
|
+
readonly filter: {
|
|
269
|
+
readonly and: [{
|
|
270
|
+
readonly field: "publishState";
|
|
271
|
+
readonly op: "eq";
|
|
272
|
+
readonly value: "published";
|
|
273
|
+
}, {
|
|
274
|
+
readonly field: "nextReview";
|
|
275
|
+
readonly op: "is_not_null";
|
|
276
|
+
}];
|
|
277
|
+
};
|
|
278
|
+
readonly sort: {
|
|
279
|
+
readonly field: "nextReview";
|
|
280
|
+
readonly direction: "asc";
|
|
281
|
+
};
|
|
282
|
+
readonly columns: ["title", "owner", "nextReview", "publishedAt"];
|
|
283
|
+
};
|
|
284
|
+
readonly helpDrafts: {
|
|
285
|
+
readonly label: "Help page drafts";
|
|
286
|
+
readonly object: "knowledge.helppage";
|
|
287
|
+
readonly filter: {
|
|
288
|
+
readonly field: "publishState";
|
|
289
|
+
readonly op: "eq";
|
|
290
|
+
readonly value: "draft";
|
|
291
|
+
};
|
|
292
|
+
readonly sort: {
|
|
293
|
+
readonly field: "updatedAt";
|
|
294
|
+
readonly direction: "desc";
|
|
295
|
+
};
|
|
296
|
+
readonly columns: ["title", "topic", "updatedAt"];
|
|
297
|
+
};
|
|
298
|
+
readonly helpPages: {
|
|
299
|
+
readonly label: "Published help pages";
|
|
300
|
+
readonly object: "knowledge.helppage";
|
|
301
|
+
readonly filter: {
|
|
302
|
+
readonly field: "publishState";
|
|
303
|
+
readonly op: "eq";
|
|
304
|
+
readonly value: "published";
|
|
305
|
+
};
|
|
306
|
+
readonly sort: {
|
|
307
|
+
readonly field: "title";
|
|
308
|
+
readonly direction: "asc";
|
|
309
|
+
};
|
|
310
|
+
readonly columns: ["title", "topic", "publishedVersion", "publishedAt"];
|
|
311
|
+
};
|
|
312
|
+
};
|
|
313
|
+
readonly recordTabs: {
|
|
314
|
+
readonly sectionProcedures: {
|
|
315
|
+
readonly label: "Procedures";
|
|
316
|
+
readonly on: "knowledge.section";
|
|
317
|
+
readonly view: {
|
|
318
|
+
readonly type: "table";
|
|
319
|
+
readonly object: "knowledge.procedure";
|
|
320
|
+
readonly relation: "section";
|
|
321
|
+
readonly columns: ["title", "publishState", "owner", "nextReview"];
|
|
322
|
+
readonly sort: {
|
|
323
|
+
readonly field: "title";
|
|
324
|
+
readonly direction: "asc";
|
|
325
|
+
};
|
|
326
|
+
};
|
|
327
|
+
readonly order: 10;
|
|
328
|
+
};
|
|
329
|
+
readonly topicPages: {
|
|
330
|
+
readonly label: "Help pages";
|
|
331
|
+
readonly on: "knowledge.helptopic";
|
|
332
|
+
readonly view: {
|
|
333
|
+
readonly type: "table";
|
|
334
|
+
readonly object: "knowledge.helppage";
|
|
335
|
+
readonly relation: "topic";
|
|
336
|
+
readonly columns: ["title", "publishState", "order"];
|
|
337
|
+
readonly sort: {
|
|
338
|
+
readonly field: "order";
|
|
339
|
+
readonly direction: "asc";
|
|
340
|
+
};
|
|
341
|
+
};
|
|
342
|
+
readonly order: 10;
|
|
343
|
+
};
|
|
344
|
+
};
|
|
345
|
+
readonly tools: {
|
|
346
|
+
readonly toRead: import("@composable-os/sdk").ToolSpec<import("zod").ZodObject<{}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
347
|
+
toRead: import("zod").ZodArray<import("zod").ZodObject<{
|
|
348
|
+
id: import("zod").ZodString;
|
|
349
|
+
title: import("zod").ZodNullable<import("zod").ZodString>;
|
|
350
|
+
version: import("zod").ZodNumber;
|
|
351
|
+
publishedAt: import("zod").ZodString;
|
|
352
|
+
since: import("zod").ZodString;
|
|
353
|
+
}, import("zod/v4/core").$strip>>;
|
|
354
|
+
confirmed: import("zod").ZodArray<import("zod").ZodObject<{
|
|
355
|
+
id: import("zod").ZodString;
|
|
356
|
+
title: import("zod").ZodNullable<import("zod").ZodString>;
|
|
357
|
+
version: import("zod").ZodNumber;
|
|
358
|
+
publishedAt: import("zod").ZodString;
|
|
359
|
+
confirmedAt: import("zod").ZodString;
|
|
360
|
+
}, import("zod/v4/core").$strip>>;
|
|
361
|
+
}, import("zod/v4/core").$strip>>;
|
|
362
|
+
readonly confirm: import("@composable-os/sdk").ToolSpec<import("zod").ZodObject<{
|
|
363
|
+
id: import("zod").ZodString;
|
|
364
|
+
version: import("zod").ZodNumber;
|
|
365
|
+
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
366
|
+
id: import("zod").ZodString;
|
|
367
|
+
version: import("zod").ZodNumber;
|
|
368
|
+
confirmedAt: import("zod").ZodString;
|
|
369
|
+
}, import("zod/v4/core").$strip>>;
|
|
370
|
+
readonly readStatus: import("@composable-os/sdk").ToolSpec<import("zod").ZodObject<{
|
|
371
|
+
id: import("zod").ZodOptional<import("zod").ZodString>;
|
|
372
|
+
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
373
|
+
procedures: import("zod").ZodArray<import("zod").ZodObject<{
|
|
374
|
+
id: import("zod").ZodString;
|
|
375
|
+
title: import("zod").ZodNullable<import("zod").ZodString>;
|
|
376
|
+
version: import("zod").ZodNumber;
|
|
377
|
+
publishedAt: import("zod").ZodString;
|
|
378
|
+
mustRead: import("zod").ZodNumber;
|
|
379
|
+
confirmed: import("zod").ZodNumber;
|
|
380
|
+
}, import("zod/v4/core").$strip>>;
|
|
381
|
+
procedure: import("zod").ZodNullable<import("zod").ZodObject<{
|
|
382
|
+
id: import("zod").ZodString;
|
|
383
|
+
title: import("zod").ZodNullable<import("zod").ZodString>;
|
|
384
|
+
version: import("zod").ZodNumber;
|
|
385
|
+
publishedAt: import("zod").ZodString;
|
|
386
|
+
everyone: import("zod").ZodBoolean;
|
|
387
|
+
roles: import("zod").ZodArray<import("zod").ZodString>;
|
|
388
|
+
people: import("zod").ZodArray<import("zod").ZodObject<{
|
|
389
|
+
account: import("zod").ZodString;
|
|
390
|
+
name: import("zod").ZodString;
|
|
391
|
+
email: import("zod").ZodString;
|
|
392
|
+
confirmed: import("zod").ZodNullable<import("zod").ZodObject<{
|
|
393
|
+
version: import("zod").ZodNumber;
|
|
394
|
+
confirmedAt: import("zod").ZodString;
|
|
395
|
+
}, import("zod/v4/core").$strip>>;
|
|
396
|
+
lastConfirmed: import("zod").ZodNullable<import("zod").ZodObject<{
|
|
397
|
+
version: import("zod").ZodNumber;
|
|
398
|
+
confirmedAt: import("zod").ZodString;
|
|
399
|
+
}, import("zod/v4/core").$strip>>;
|
|
400
|
+
since: import("zod").ZodNullable<import("zod").ZodString>;
|
|
401
|
+
}, import("zod/v4/core").$strip>>;
|
|
402
|
+
}, import("zod/v4/core").$strip>>;
|
|
403
|
+
}, import("zod/v4/core").$strip>>;
|
|
404
|
+
readonly helpTopics: import("@composable-os/sdk").ToolSpec<import("zod").ZodObject<{
|
|
405
|
+
limit: import("zod").ZodDefault<import("zod").ZodNumber>;
|
|
406
|
+
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
407
|
+
topics: import("zod").ZodArray<import("zod").ZodObject<{
|
|
408
|
+
id: import("zod").ZodString;
|
|
409
|
+
name: import("zod").ZodNullable<import("zod").ZodString>;
|
|
410
|
+
slug: import("zod").ZodNullable<import("zod").ZodString>;
|
|
411
|
+
order: import("zod").ZodNullable<import("zod").ZodNumber>;
|
|
412
|
+
icon: import("zod").ZodNullable<import("zod").ZodString>;
|
|
413
|
+
}, import("zod/v4/core").$strip>>;
|
|
414
|
+
}, import("zod/v4/core").$strip>>;
|
|
415
|
+
readonly draftProcedure: import("@composable-os/sdk").ToolSpec<import("zod").ZodObject<{
|
|
416
|
+
section: import("zod").ZodOptional<import("zod").ZodString>;
|
|
417
|
+
id: import("zod").ZodOptional<import("zod").ZodString>;
|
|
418
|
+
title: import("zod").ZodString;
|
|
419
|
+
summary: import("zod").ZodOptional<import("zod").ZodString>;
|
|
420
|
+
notes: import("zod").ZodOptional<import("zod").ZodString>;
|
|
421
|
+
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
422
|
+
id: import("zod").ZodString;
|
|
423
|
+
created: import("zod").ZodBoolean;
|
|
424
|
+
open: import("zod").ZodObject<{
|
|
425
|
+
object: import("zod").ZodString;
|
|
426
|
+
id: import("zod").ZodString;
|
|
427
|
+
}, import("zod/v4/core").$strip>;
|
|
428
|
+
}, import("zod/v4/core").$strip>>;
|
|
429
|
+
readonly draftHelpPage: import("@composable-os/sdk").ToolSpec<import("zod").ZodObject<{
|
|
430
|
+
topic: import("zod").ZodOptional<import("zod").ZodString>;
|
|
431
|
+
id: import("zod").ZodOptional<import("zod").ZodString>;
|
|
432
|
+
title: import("zod").ZodString;
|
|
433
|
+
summary: import("zod").ZodOptional<import("zod").ZodString>;
|
|
434
|
+
notes: import("zod").ZodOptional<import("zod").ZodString>;
|
|
435
|
+
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
436
|
+
id: import("zod").ZodString;
|
|
437
|
+
created: import("zod").ZodBoolean;
|
|
438
|
+
open: import("zod").ZodObject<{
|
|
439
|
+
object: import("zod").ZodString;
|
|
440
|
+
id: import("zod").ZodString;
|
|
441
|
+
}, import("zod/v4/core").$strip>;
|
|
442
|
+
}, import("zod/v4/core").$strip>>;
|
|
443
|
+
};
|
|
444
|
+
readonly automations: {
|
|
445
|
+
reviewDue: import("@composable-os/sdk").AutomationSpec<{
|
|
446
|
+
readonly type: "dateRelative";
|
|
447
|
+
readonly object: "knowledge.procedure";
|
|
448
|
+
readonly field: "nextReview";
|
|
449
|
+
readonly offsetDays: 0;
|
|
450
|
+
}>;
|
|
451
|
+
};
|
|
452
|
+
}>;
|
|
453
|
+
export default _default;
|