plotwork 0.1.0__py3-none-any.whl

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.
plotwork/_generated.py ADDED
@@ -0,0 +1,2201 @@
1
+ # Generated by scripts/gen-python.mjs from spec/openapi.json. Do not edit by hand: run `pnpm gen:python`.
2
+ """Every schema of the Plotwork API as a ``TypedDict``, and every ``/v1`` operation as a typed method."""
3
+
4
+ from __future__ import annotations
5
+
6
+ import sys
7
+ from typing import TYPE_CHECKING, Any, Dict, List, Literal, NoReturn, Optional, TypedDict, Union, cast
8
+
9
+ from ._request import Transport
10
+
11
+ if sys.version_info >= (3, 11):
12
+ from typing import NotRequired, Unpack
13
+ elif TYPE_CHECKING:
14
+ from typing_extensions import NotRequired, Unpack
15
+
16
+
17
+ class ApprovalHold(TypedDict):
18
+ """Present when the organisation's "Publishing needs approval" or "Public sharing needs approval" held this. It is data, not an error: the diagram is stored, and only its publisher and the approvers can see it until an approver approves."""
19
+
20
+ state: Literal["pending"]
21
+ #: The request, as the Approvals queue lists it.
22
+ requestId: str
23
+ #: `publish` (a new diagram), `change` (a new version of one the library shows) or `share` (a public link).
24
+ kind: Literal["publish", "change", "share"]
25
+ #: When the daily sweep ends the request if nobody decides it, in milliseconds since the epoch: thirty days after it was made.
26
+ expiresAt: int
27
+ #: One sentence to tell the person: held for approval by the organisation, and what happens next.
28
+ message: str
29
+ #: The warning code a tool answer carries for it: W601.
30
+ code: str
31
+
32
+
33
+ class CheckPatternInputPatternTemplates(TypedDict):
34
+ neutral: NotRequired[str]
35
+ aws: NotRequired[str]
36
+ azure: NotRequired[str]
37
+ gcp: NotRequired[str]
38
+
39
+
40
+ class CheckPatternInputPatternSlotsItem(TypedDict):
41
+ id: str
42
+ default: str
43
+ meaning: str
44
+
45
+
46
+ class CheckPatternInputPatternNotes(TypedDict):
47
+ keep: NotRequired[str]
48
+ rename: NotRequired[str]
49
+ split: NotRequired[str]
50
+
51
+
52
+ # The pattern file. Every field is described at https://docs.plotwork.dev/schemas/plotwork.pattern.json; get_pattern with file true gives one to start from.
53
+ CheckPatternInputPattern = TypedDict(
54
+ "CheckPatternInputPattern",
55
+ {
56
+ "$schema": "NotRequired[str]",
57
+ "name": "str",
58
+ "title": "str",
59
+ "summary": "str",
60
+ "whenToUse": "NotRequired[str]",
61
+ "tags": "NotRequired[List[str]]",
62
+ "templates": "CheckPatternInputPatternTemplates",
63
+ "slots": "NotRequired[List[CheckPatternInputPatternSlotsItem]]",
64
+ "notes": "NotRequired[CheckPatternInputPatternNotes]",
65
+ },
66
+ )
67
+
68
+
69
+ class CheckPatternInput(TypedDict):
70
+ """A pattern file to check before it is published or imported."""
71
+
72
+ #: The pattern file. Every field is described at https://docs.plotwork.dev/schemas/plotwork.pattern.json; get_pattern with file true gives one to start from.
73
+ pattern: CheckPatternInputPattern
74
+
75
+
76
+ class CheckPatternResponseProblemsItem(TypedDict):
77
+ #: Where the problem is: name, title, templates.aws, slots.0.default, and so on; json for a file that is not JSON.
78
+ field: str
79
+ message: str
80
+ #: How to fix it.
81
+ hint: str
82
+
83
+
84
+ class CheckPatternResponse(TypedDict):
85
+ """Whether a pattern file would be saved, its problems with fixes, and the source each flavour draws."""
86
+
87
+ #: True when the file passes every check a save runs, so publish_pattern or the portal's import would take it.
88
+ valid: bool
89
+ #: The id it would have, org:<name>; null when the name is not valid.
90
+ id: Optional[str]
91
+ #: The kind of diagram every flavour draws; null when not valid.
92
+ kind: Optional[str]
93
+ #: The flavours the file gives.
94
+ flavours: List[Literal["neutral", "aws", "azure", "gcp"]]
95
+ #: Every problem at once, each with its field and a fix. Empty when valid.
96
+ problems: List[CheckPatternResponseProblemsItem]
97
+ #: Each flavour filled with the slot defaults, keyed by flavour: send one to draw_diagram to see it and its warnings. Empty when not valid.
98
+ sources: Dict[str, str]
99
+ #: The next step in one sentence.
100
+ next: str
101
+
102
+
103
+ class CompareDiagramsInput(TypedDict):
104
+ """Two versions of a diagram to compare."""
105
+
106
+ #: The old diagram: source, the text of a Plotwork SVG that carries its source, or a cdn.plotwork.dev link.
107
+ before: str
108
+ #: The new diagram, in any of the same three forms.
109
+ after: str
110
+ #: Also return a Markdown block ready to paste as a pull request comment.
111
+ markdown: NotRequired[bool]
112
+
113
+
114
+ CompareDiagramsResponseBefore = TypedDict(
115
+ "CompareDiagramsResponseBefore",
116
+ {
117
+ "from": "Literal[\"source\", \"svg\", \"url\"]",
118
+ # False when no source could be read from it; message says why.
119
+ "read": "bool",
120
+ # A diagram kind: flow, sequence, schema, git, gantt, class, state, timeline, journey, mindmap, treemap, pie, quadrant, layers, c4, matrix, sankey, xychart, tree, swimlane, requirement, block, packet, kanban, radar, usecase, venn, fishbone, or wardley today. Later versions add kinds, so expect others.
121
+ "kind": "Optional[str]",
122
+ "valid": "bool",
123
+ "message": "Optional[str]",
124
+ },
125
+ )
126
+
127
+
128
+ CompareDiagramsResponseAfter = TypedDict(
129
+ "CompareDiagramsResponseAfter",
130
+ {
131
+ "from": "Literal[\"source\", \"svg\", \"url\"]",
132
+ # False when no source could be read from it; message says why.
133
+ "read": "bool",
134
+ # A diagram kind: flow, sequence, schema, git, gantt, class, state, timeline, journey, mindmap, treemap, pie, quadrant, layers, c4, matrix, sankey, xychart, tree, swimlane, requirement, block, packet, kanban, radar, usecase, venn, fishbone, or wardley today. Later versions add kinds, so expect others.
135
+ "kind": "Optional[str]",
136
+ "valid": "bool",
137
+ "message": "Optional[str]",
138
+ },
139
+ )
140
+
141
+
142
+ class CompareDiagramsResponseCounts(TypedDict):
143
+ added: int
144
+ removed: int
145
+ renamed: int
146
+ moved: int
147
+ changed: int
148
+
149
+
150
+ class CompareDiagramsResponseChangesItem(TypedDict):
151
+ change: Literal["added", "removed", "renamed", "moved", "changed"]
152
+ subject: Literal["header", "node", "group", "edge", "row", "series", "line"]
153
+ #: The id, the label in quotes, or for an edge its ends.
154
+ name: str
155
+ #: The line in after, or in before for a removal.
156
+ line: Optional[int]
157
+ detail: str
158
+
159
+
160
+ class CompareDiagramsResponse(TypedDict):
161
+ """What changed between two versions of a diagram."""
162
+
163
+ same: bool
164
+ before: CompareDiagramsResponseBefore
165
+ after: CompareDiagramsResponseAfter
166
+ counts: CompareDiagramsResponseCounts
167
+ changes: List[CompareDiagramsResponseChangesItem]
168
+ #: True when more changes were found than are listed; counts covers all of them.
169
+ truncated: bool
170
+ #: The changes in plain words, for a pull request review.
171
+ summary: str
172
+ markdown: Optional[str]
173
+ next: str
174
+
175
+
176
+ class ConvertMermaidInput(TypedDict):
177
+ """Mermaid source and what to return with the converted Plotwork source."""
178
+
179
+ #: One Mermaid diagram: a flowchart or graph, sequenceDiagram, erDiagram, gitGraph, gantt, classDiagram, stateDiagram, timeline, journey, mindmap, treemap-beta or treemap, pie, quadrantChart, C4Context or C4Container or C4Component or C4Dynamic or C4Deployment, sankey-beta or sankey, xychart-beta or xychart, treeView-beta or treeView, requirementDiagram, block-beta or block, packet or packet-beta, kanban, radar-beta or radar, usecase-beta or usecase, venn-beta or venn, ishikawa-beta or ishikawa, wardley-beta, architecture-beta, or zenuml. Front matter and %%{init}%% directives are allowed and are dropped. Send the text inside a mermaid fence, without the fence.
180
+ source: str
181
+ #: false (the default): a line that cannot be read stops the conversion, so nothing is converted with a line missing. true: such a line is skipped with a warning and the rest is converted.
182
+ lenient: NotRequired[bool]
183
+ #: Also draw the converted diagram, in the color schemes schemes names.
184
+ render: NotRequired[bool]
185
+ #: light, dark, or both (the default): the light picture and the dark one a dark page needs.
186
+ schemes: NotRequired[Literal["light", "dark", "both"]]
187
+ #: summary (the default), or full: the whole outline, and the source embedded in each SVG.
188
+ detail: NotRequired[Literal["summary", "full"]]
189
+ #: auto (the default): over MCP the SVG text stays out of the answer (picturesOmitted). always returns it. never draws nothing, cheapest. Checks run either way. The HTTP API treats auto as always.
190
+ svg: NotRequired[Literal["auto", "always", "never"]]
191
+ #: Write the source into each SVG so read_diagram can give it back. Set it when you save the SVG in a repository or publish it to edit later; anyone with the file or link can then read the source.
192
+ embedSource: NotRequired[bool]
193
+ #: The repo's plotwork.config.json, if any. Schema: https://docs.plotwork.dev/schemas/plotwork.config.json
194
+ settings: NotRequired[Dict[str, Any]]
195
+
196
+
197
+ class ConvertMermaidResponseStats(TypedDict):
198
+ #: Flow nodes written.
199
+ nodes: int
200
+ #: Flow edges written.
201
+ edges: int
202
+ #: Flow groups written.
203
+ groups: int
204
+ #: Sequence participants written.
205
+ actors: int
206
+ #: Sequence messages written.
207
+ messages: int
208
+ #: Schema tables written.
209
+ tables: int
210
+ #: Schema columns written.
211
+ columns: int
212
+ #: Schema relations written.
213
+ relations: int
214
+ #: Warnings about constructs that were dropped: styling, links, activations, and so on.
215
+ dropped: int
216
+ #: Ids that were not valid Plotwork ids and were renamed.
217
+ renamed: int
218
+
219
+
220
+ class ConvertMermaidResponseValidationObjectSizeObject(TypedDict):
221
+ """Natural size of the laid-out diagram."""
222
+
223
+ #: Width in px.
224
+ width: int
225
+ #: Height in px.
226
+ height: int
227
+
228
+
229
+ class ConvertMermaidResponseValidationObject(TypedDict):
230
+ """The Plotwork validator run on `source`; null when nothing was converted."""
231
+
232
+ #: True when the converted source has no Plotwork errors. It always is when `ok` is true.
233
+ valid: bool
234
+ #: Plotwork errors in the converted source. Lines and columns point into `source`, not into the Mermaid.
235
+ errors: List[Diagnostic]
236
+ #: Plotwork quality warnings, including icon and group-type suggestions with the exact icon= to write. Lines and columns point into `source`, not into the Mermaid.
237
+ warnings: List[Diagnostic]
238
+ #: One-line description of the converted diagram, usable as alt text.
239
+ summary: Optional[str]
240
+ #: Natural size of the laid-out diagram.
241
+ size: Optional[ConvertMermaidResponseValidationObjectSizeObject]
242
+
243
+
244
+ class ConvertMermaidResponseQuality(TypedDict):
245
+ """How clean the converted diagram looks and up to three changes that would help (see draw_diagram); absent when it is not valid."""
246
+
247
+ #: 0 to 100; 100 is a picture with nothing to fix. The same diagram always gets the same score.
248
+ score: int
249
+ #: clean is 85 or more, fair 60 or more, cluttered below.
250
+ grade: Literal["clean", "fair", "cluttered"]
251
+ #: What the score is made from: crossings, lineOverBox, labelOverlaps, smallestTextPx (in an 880px column), aspectRatio, emptySpace (0 to 1), longestLine (px), detour (1 is straight), the counts of boxes, lines, labels, series, and slices, and any measure the kind adds.
252
+ measures: Dict[str, float]
253
+ #: Up to three changes, the one worth most first, each naming the statement or option to edit.
254
+ hints: List[str]
255
+ #: The grade, the score, and the first hint in one line.
256
+ line: str
257
+
258
+
259
+ class ConvertMermaidResponseRendersItem(TypedDict):
260
+ #: The color scheme this picture is drawn in.
261
+ scheme: Literal["light", "dark"]
262
+ #: Self-contained SVG markup with an accessible title and description.
263
+ svg: str
264
+ size: Size
265
+
266
+
267
+ class ConvertMermaidResponsePicturesOmitted(TypedDict):
268
+ """Present only when pictures were left out because the answer would have been too big for an AI client to read in one piece."""
269
+
270
+ #: The color schemes whose pictures were left out.
271
+ schemes: List[Literal["light", "dark"]]
272
+ #: How many characters the pictures left out came to.
273
+ characters: int
274
+ #: The most characters one answer may hold before the pictures are left out.
275
+ limit: int
276
+ #: Why they were left out, and what to do.
277
+ why: str
278
+
279
+
280
+ class ConvertMermaidResponse(TypedDict):
281
+ """The result of converting one Mermaid diagram to Plotwork."""
282
+
283
+ #: True when `source` is valid Plotwork source. False means nothing was converted and `source` is empty: read `diagnostics`.
284
+ ok: bool
285
+ #: The Plotwork kind the diagram became, or null when it could not be converted.
286
+ kind: Optional[str]
287
+ #: The Mermaid diagram type read from the first line, such as flowchart or sequenceDiagram; null when none was found.
288
+ mermaidType: Optional[str]
289
+ #: The Plotwork source, or an empty string when nothing could be converted.
290
+ source: str
291
+ #: Everything dropped, changed, or wrong, with a hint that says what to do. Codes start with M. Lines and columns point into the Mermaid you sent. M1xx codes are errors that stop the conversion; M2xx codes are warnings and the conversion went on.
292
+ diagnostics: List[Diagnostic]
293
+ stats: ConvertMermaidResponseStats
294
+ #: The Plotwork validator run on `source`; null when nothing was converted.
295
+ validation: Optional[ConvertMermaidResponseValidationObject]
296
+ #: How clean the converted diagram looks and up to three changes that would help (see draw_diagram); absent when it is not valid.
297
+ quality: NotRequired[ConvertMermaidResponseQuality]
298
+ #: The converted diagram as plain text, to check it says what the Mermaid said; empty when nothing was converted.
299
+ outline: List[str]
300
+ #: True when the summary level cut the outline short. Call again with detail "full" to read all of it.
301
+ outlineTruncated: bool
302
+ #: One picture per requested color scheme, light first; empty unless `render` was true and the conversion is valid, when svg is never, and when every picture was left out (see picturesOmitted).
303
+ renders: List[ConvertMermaidResponseRendersItem]
304
+ #: Present only when pictures were left out because the answer would have been too big for an AI client to read in one piece.
305
+ picturesOmitted: NotRequired[ConvertMermaidResponsePicturesOmitted]
306
+ #: A link that shows a valid diagram in a browser; give it to the person who wants to look. It holds the drawing itself: the source is in the part after #, never sent to a server, so nothing is saved on Plotwork and it appears in no Diagrams list; anyone with the link can read it. Absent when too long; next says so.
307
+ viewUrl: NotRequired[str]
308
+ #: The viewUrl with &download=png: opening it in a browser saves the diagram as a PNG for Slack, email, or a wiki. The PNG is drawn in the person's browser, not on a server, so it is a link to open, not an image address to embed. Absent when too long.
309
+ pngUrl: NotRequired[str]
310
+ #: The viewUrl with &download=svg: a person opens it to download the SVG. Not a file address for curl; use saveCommand. Absent when too long.
311
+ svgUrl: NotRequired[str]
312
+ #: Run in a shell to save the SVG into the repository: the CLI decodes the link locally, fetches nothing, and embeds the source. Set --out to the path; add --scheme dark for dark. Absent when too long.
313
+ saveCommand: NotRequired[str]
314
+ #: The next step in one sentence.
315
+ next: str
316
+
317
+
318
+ class DiagnosticFix(TypedDict):
319
+ """The one certain fix, to apply as it is. Present only when exactly one fix is certain."""
320
+
321
+ #: What the fix does, in a few words, for a button.
322
+ label: str
323
+ #: The edits, all against the source the diagnostic was found in.
324
+ edits: List[FixEdit]
325
+
326
+
327
+ class Diagnostic(TypedDict):
328
+ """A located, actionable problem found in diagram source."""
329
+
330
+ #: Stable code to branch on; E-codes are errors, W-codes are warnings.
331
+ code: Literal["E100", "E101", "E110", "E111", "E120", "E121", "E123", "E124", "E125", "E130", "E131", "E132", "E133", "E134", "E135", "E136", "E137", "E138", "E139", "E140", "W200", "W201", "W202", "W203", "W204", "W205", "W206", "W207", "W208", "W209", "W500", "W600", "W601", "W700", "W701", "W702", "W703", "W704", "W705", "W706", "W707", "W708", "W709", "W710", "M100", "M101", "M102", "M103", "M104", "M110", "M200", "M201", "M202", "M203", "M204", "M205", "M206", "M207", "M208", "M209", "M210", "M211", "M212", "M213", "M214", "M215", "M216", "M217", "M218", "E300", "E301", "E302", "E303", "E304", "W300", "W301", "W302", "W303", "M120", "M220", "M221", "M222", "E340", "E341", "E342", "E343", "E344", "E345", "W320", "W321", "W322", "W323", "M240", "M241", "M242", "E360", "E361", "E362", "E363", "E364", "E365", "E366", "E367", "W330", "W331", "W332", "W333", "W334", "M250", "M251", "E400", "E401", "E402", "E403", "W350", "W351", "W352", "W353", "M270", "M271", "E420", "E421", "E422", "E423", "E424", "W360", "W361", "W362", "W363", "W364", "M180", "M280", "M281", "M282", "E320", "E321", "E322", "E323", "E324", "E325", "E326", "E327", "E328", "E329", "E330", "W310", "W311", "W312", "W313", "W314", "M130", "M131", "M132", "M230", "M231", "M232", "M233", "M234", "M235", "M236", "M237", "M238", "E380", "E381", "E382", "E383", "W340", "W341", "W342", "W343", "M260", "I100", "I101", "I102", "I103", "I104", "I105", "I200", "I201", "I202", "I203", "I204", "I206", "I207", "R100", "R101", "R200", "R201", "R202", "R203", "R204", "R205", "R206", "R207", "S100", "S200", "S101", "S102", "S103", "S104", "S201", "S202", "S203", "S204", "S205"]
332
+ #: Errors stop rendering; warnings never do.
333
+ severity: Literal["error", "warning"]
334
+ #: What is wrong, in one sentence.
335
+ message: str
336
+ #: 1-based line in the submitted source.
337
+ line: int
338
+ #: 1-based column in that line.
339
+ column: int
340
+ #: Number of characters the problem covers.
341
+ length: int
342
+ #: A concrete suggestion for fixing it, or null.
343
+ hint: Optional[str]
344
+ #: The one certain fix, to apply as it is. Present only when exactly one fix is certain.
345
+ fix: NotRequired[DiagnosticFix]
346
+
347
+
348
+ class DiagramSeriesObject(TypedDict):
349
+ """Its place in a series (the parts of one split import), or null when it is in none."""
350
+
351
+ #: The series id the parts were published with.
352
+ id: str
353
+ #: Its place in the series, from 1; 0 is the whole import combined into one diagram.
354
+ index: int
355
+ #: How many parts the publisher said the series has, or null.
356
+ total: Optional[int]
357
+
358
+
359
+ class DiagramSourceInput(TypedDict):
360
+ """Request body carrying diagram source."""
361
+
362
+ #: Diagram source; the first line is the header, such as flow "Title" (draw_diagram lists every kind).
363
+ source: str
364
+ #: The repo's plotwork.config.json, if any. Schema: https://docs.plotwork.dev/schemas/plotwork.config.json
365
+ settings: NotRequired[Dict[str, Any]]
366
+
367
+
368
+ class DrawDiagramInput(TypedDict):
369
+ """Diagram source and what to return: the color schemes to draw and how much detail."""
370
+
371
+ #: Diagram source. The first line is the header: flow "Title", sequence "Title", schema "Title", git "Title", gantt "Title", class "Title", state "Title", timeline "Title", journey "Title", mindmap "Title", treemap "Title", pie "Title", quadrant "Title", layers "Title", c4 "Title", matrix "Title", sankey "Title", xychart "Title", tree "Title", swimlane "Title", requirement "Title", block "Title", packet "Title", kanban "Title", radar "Title", usecase "Title", venn "Title", fishbone "Title", or wardley "Title".
372
+ source: str
373
+ #: light, dark, or both (the default): the light picture and the dark one a dark page needs.
374
+ schemes: NotRequired[Literal["light", "dark", "both"]]
375
+ #: Colour theme for this drawing, over the header's theme=.
376
+ theme: NotRequired[Literal["plotwork", "slate", "ocean", "forest", "sunset", "mono", "contrast"]]
377
+ #: summary (the default), or full: the whole outline, and the source embedded in each SVG.
378
+ detail: NotRequired[Literal["summary", "full"]]
379
+ #: auto (the default): over MCP the SVG text stays out of the answer (picturesOmitted). always returns it. never draws nothing, cheapest. Checks run either way. The HTTP API treats auto as always.
380
+ svg: NotRequired[Literal["auto", "always", "never"]]
381
+ #: Write the source into each SVG so read_diagram can give it back. Set it when you save the SVG in a repository or publish it to edit later; anyone with the file or link can then read the source.
382
+ embedSource: NotRequired[bool]
383
+ #: The repo's plotwork.config.json, if any. Schema: https://docs.plotwork.dev/schemas/plotwork.config.json
384
+ settings: NotRequired[Dict[str, Any]]
385
+
386
+
387
+ class DrawDiagramResponseSizeObject(TypedDict):
388
+ """Natural size of the laid-out diagram; null when invalid."""
389
+
390
+ #: Width in px.
391
+ width: int
392
+ #: Height in px.
393
+ height: int
394
+
395
+
396
+ class DrawDiagramResponseQuality(TypedDict):
397
+ """How clean the picture looks (score, grade, measures) and up to three changes that would help; read it instead of looking. Absent when invalid."""
398
+
399
+ #: 0 to 100; 100 is a picture with nothing to fix. The same diagram always gets the same score.
400
+ score: int
401
+ #: clean is 85 or more, fair 60 or more, cluttered below.
402
+ grade: Literal["clean", "fair", "cluttered"]
403
+ #: What the score is made from: crossings, lineOverBox, labelOverlaps, smallestTextPx (in an 880px column), aspectRatio, emptySpace (0 to 1), longestLine (px), detour (1 is straight), the counts of boxes, lines, labels, series, and slices, and any measure the kind adds.
404
+ measures: Dict[str, float]
405
+ #: Up to three changes, the one worth most first, each naming the statement or option to edit.
406
+ hints: List[str]
407
+ #: The grade, the score, and the first hint in one line.
408
+ line: str
409
+
410
+
411
+ class DrawDiagramResponseRendersItem(TypedDict):
412
+ #: The color scheme this picture is drawn in.
413
+ scheme: Literal["light", "dark"]
414
+ #: Self-contained SVG markup with an accessible title and description.
415
+ svg: str
416
+ size: Size
417
+
418
+
419
+ class DrawDiagramResponsePicturesOmitted(TypedDict):
420
+ """Present only when pictures were left out because the answer would have been too big for an AI client to read in one piece."""
421
+
422
+ #: The color schemes whose pictures were left out.
423
+ schemes: List[Literal["light", "dark"]]
424
+ #: How many characters the pictures left out came to.
425
+ characters: int
426
+ #: The most characters one answer may hold before the pictures are left out.
427
+ limit: int
428
+ #: Why they were left out, and what to do.
429
+ why: str
430
+
431
+
432
+ class DrawDiagramResponse(TypedDict):
433
+ """The result of checking, describing, and drawing a diagram in one call."""
434
+
435
+ #: True when the source has no errors. When false, nothing was drawn: fix the errors and call again.
436
+ valid: bool
437
+ #: The diagram kind, or null when the header could not be read.
438
+ kind: Optional[str]
439
+ #: Every error found in one pass, each with line, column, and a hint. Empty when valid.
440
+ errors: List[Diagnostic]
441
+ #: Quality warnings for a valid diagram: too dense, too wide, text cut, unconnected nodes, and suggestions for an icon or a group type. Empty when invalid.
442
+ warnings: List[Diagnostic]
443
+ #: One-line description of the diagram, usable as alt text; null when invalid.
444
+ summary: Optional[str]
445
+ #: The diagram as plain text in reading order, to check it says what you meant; empty when invalid.
446
+ outline: List[str]
447
+ #: True when the summary level cut the outline short. Call again with detail "full" to read all of it.
448
+ outlineTruncated: bool
449
+ #: Natural size of the laid-out diagram; null when invalid.
450
+ size: Optional[DrawDiagramResponseSizeObject]
451
+ #: How clean the picture looks (score, grade, measures) and up to three changes that would help; read it instead of looking. Absent when invalid.
452
+ quality: NotRequired[DrawDiagramResponseQuality]
453
+ #: Information notes, such as an icon alias drawn as the real icon; absent when there is none.
454
+ notices: NotRequired[List[Note]]
455
+ #: One picture per requested color scheme, light first; empty when invalid, when svg is never, and when every picture was left out (see picturesOmitted).
456
+ renders: List[DrawDiagramResponseRendersItem]
457
+ #: Present only when pictures were left out because the answer would have been too big for an AI client to read in one piece.
458
+ picturesOmitted: NotRequired[DrawDiagramResponsePicturesOmitted]
459
+ #: A link that shows a valid diagram in a browser; give it to the person who wants to look. It holds the drawing itself: the source is in the part after #, never sent to a server, so nothing is saved on Plotwork and it appears in no Diagrams list; anyone with the link can read it. Absent when too long; next says so.
460
+ viewUrl: NotRequired[str]
461
+ #: The viewUrl with &download=png: opening it in a browser saves the diagram as a PNG for Slack, email, or a wiki. The PNG is drawn in the person's browser, not on a server, so it is a link to open, not an image address to embed. Absent when too long.
462
+ pngUrl: NotRequired[str]
463
+ #: The viewUrl with &download=svg: a person opens it to download the SVG. Not a file address for curl; use saveCommand. Absent when too long.
464
+ svgUrl: NotRequired[str]
465
+ #: Run in a shell to save the SVG into the repository: the CLI decodes the link locally, fetches nothing, and embeds the source. Set --out to the path; add --scheme dark for dark. Absent when too long.
466
+ saveCommand: NotRequired[str]
467
+ #: The next step in one sentence.
468
+ next: str
469
+
470
+
471
+ class DrawFromPatternInput(TypedDict):
472
+ """A pattern id, the flavour and slot values to use, and what to return."""
473
+
474
+ #: The pattern id, as find_pattern returns it, such as three-tier-network.
475
+ id: str
476
+ #: neutral (generic glyphs, no vendor names; the default), or aws, azure, or gcp for that provider's icons. Not every pattern comes in every flavour; the answer lists the ones it has.
477
+ provider: NotRequired[Literal["neutral", "aws", "azure", "gcp"]]
478
+ #: Slot values keyed by slot id, such as {"office": "Branch office"}: plain text of up to 60 characters, no quotes or line breaks. Omit a slot to keep its default. get_pattern lists the slots and what they mean.
479
+ slots: NotRequired[Dict[str, str]]
480
+ #: light, dark, or both (the default): the light picture and the dark one a dark page needs.
481
+ schemes: NotRequired[Literal["light", "dark", "both"]]
482
+ #: summary (the default), or full: the whole outline, and the source embedded in each SVG.
483
+ detail: NotRequired[Literal["summary", "full"]]
484
+ #: auto (the default): over MCP the SVG text stays out of the answer (picturesOmitted). always returns it. never draws nothing, cheapest. Checks run either way. The HTTP API treats auto as always.
485
+ svg: NotRequired[Literal["auto", "always", "never"]]
486
+ #: Write the source into each SVG so read_diagram can give it back. Set it when you save the SVG in a repository or publish it to edit later; anyone with the file or link can then read the source.
487
+ embedSource: NotRequired[bool]
488
+ #: The repo's plotwork.config.json, if any. Schema: https://docs.plotwork.dev/schemas/plotwork.config.json
489
+ settings: NotRequired[Dict[str, Any]]
490
+
491
+
492
+ class DrawFromPatternResponseSlotsItem(TypedDict):
493
+ #: The slot id; the key to use in slots.
494
+ id: str
495
+ #: The text the slot has in the source: the value sent, or the default.
496
+ value: str
497
+ #: The default text.
498
+ default: str
499
+ #: What belongs in this slot.
500
+ meaning: str
501
+ #: True when the slot kept its default.
502
+ isDefault: bool
503
+
504
+
505
+ class DrawFromPatternResponseNotesObject(TypedDict):
506
+ """How to adapt the pattern: what to keep, what to rename, and when to split."""
507
+
508
+ #: What to leave exactly as it is.
509
+ keep: str
510
+ #: What to rename or replace, and how.
511
+ rename: str
512
+ #: When the diagram has grown too big, and where to cut it.
513
+ split: str
514
+
515
+
516
+ class DrawFromPatternResponseProblemsItem(TypedDict):
517
+ code: Literal["unknown-pattern", "unknown-flavour", "unknown-slot", "bad-slot-value", "bad-source"]
518
+ message: str
519
+ #: How to fix it.
520
+ hint: str
521
+
522
+
523
+ class DrawFromPatternResponseSizeObject(TypedDict):
524
+ """Natural size of the laid-out diagram; null when invalid."""
525
+
526
+ #: Width in px.
527
+ width: int
528
+ #: Height in px.
529
+ height: int
530
+
531
+
532
+ class DrawFromPatternResponseQuality(TypedDict):
533
+ """How clean the picture looks (score, grade, measures) and up to three changes that would help; read it instead of looking. Absent when invalid."""
534
+
535
+ #: 0 to 100; 100 is a picture with nothing to fix. The same diagram always gets the same score.
536
+ score: int
537
+ #: clean is 85 or more, fair 60 or more, cluttered below.
538
+ grade: Literal["clean", "fair", "cluttered"]
539
+ #: What the score is made from: crossings, lineOverBox, labelOverlaps, smallestTextPx (in an 880px column), aspectRatio, emptySpace (0 to 1), longestLine (px), detour (1 is straight), the counts of boxes, lines, labels, series, and slices, and any measure the kind adds.
540
+ measures: Dict[str, float]
541
+ #: Up to three changes, the one worth most first, each naming the statement or option to edit.
542
+ hints: List[str]
543
+ #: The grade, the score, and the first hint in one line.
544
+ line: str
545
+
546
+
547
+ class DrawFromPatternResponseRendersItem(TypedDict):
548
+ #: The color scheme this picture is drawn in.
549
+ scheme: Literal["light", "dark"]
550
+ #: Self-contained SVG markup with an accessible title and description.
551
+ svg: str
552
+ size: Size
553
+
554
+
555
+ class DrawFromPatternResponsePicturesOmitted(TypedDict):
556
+ """Present only when pictures were left out because the answer would have been too big for an AI client to read in one piece."""
557
+
558
+ #: The color schemes whose pictures were left out.
559
+ schemes: List[Literal["light", "dark"]]
560
+ #: How many characters the pictures left out came to.
561
+ characters: int
562
+ #: The most characters one answer may hold before the pictures are left out.
563
+ limit: int
564
+ #: Why they were left out, and what to do.
565
+ why: str
566
+
567
+
568
+ class DrawFromPatternResponse(TypedDict):
569
+ """A pattern filled, checked, and drawn in one call."""
570
+
571
+ #: True when the pattern and flavour exist and the slot values are usable. When false, problems says why and nothing else is filled.
572
+ found: bool
573
+ #: The pattern id that was asked for.
574
+ id: str
575
+ title: Optional[str]
576
+ #: One sentence: what the pattern shows.
577
+ patternSummary: Optional[str]
578
+ whenToUse: Optional[str]
579
+ #: A diagram kind: flow, sequence, schema, git, gantt, class, state, timeline, journey, mindmap, treemap, pie, quadrant, layers, c4, matrix, sankey, xychart, tree, swimlane, requirement, block, packet, kanban, radar, usecase, venn, fishbone, or wardley today. Later versions add kinds, so expect others.
580
+ kind: Optional[str]
581
+ #: The flavour that was filled.
582
+ flavour: Literal["neutral", "aws", "azure", "gcp", None]
583
+ #: Every flavour this pattern comes in; empty when the pattern was not found.
584
+ flavours: List[Literal["neutral", "aws", "azure", "gcp"]]
585
+ #: Plotwork source, valid and ready to use; null when not found.
586
+ source: Optional[str]
587
+ #: Every slot the source uses, with the value it has.
588
+ slots: List[DrawFromPatternResponseSlotsItem]
589
+ #: How to adapt the pattern: what to keep, what to rename, and when to split.
590
+ notes: Optional[DrawFromPatternResponseNotesObject]
591
+ #: Mistakes in the id, the flavour, or the slot values, each with a fix. Empty when found.
592
+ problems: List[DrawFromPatternResponseProblemsItem]
593
+ #: True when the source has no errors. When false, nothing was drawn: fix the errors and call again.
594
+ valid: bool
595
+ #: Every error found in one pass, each with line, column, and a hint. Empty when valid.
596
+ errors: List[Diagnostic]
597
+ #: Quality warnings for a valid diagram: too dense, too wide, text cut, unconnected nodes, and suggestions for an icon or a group type. Empty when invalid.
598
+ warnings: List[Diagnostic]
599
+ #: One-line description of the diagram, usable as alt text; null when invalid.
600
+ summary: Optional[str]
601
+ #: The diagram as plain text in reading order, to check it says what you meant; empty when invalid.
602
+ outline: List[str]
603
+ #: True when the summary level cut the outline short. Call again with detail "full" to read all of it.
604
+ outlineTruncated: bool
605
+ #: Natural size of the laid-out diagram; null when invalid.
606
+ size: Optional[DrawFromPatternResponseSizeObject]
607
+ #: How clean the picture looks (score, grade, measures) and up to three changes that would help; read it instead of looking. Absent when invalid.
608
+ quality: NotRequired[DrawFromPatternResponseQuality]
609
+ #: Information notes, such as an icon alias drawn as the real icon; absent when there is none.
610
+ notices: NotRequired[List[Note]]
611
+ #: One picture per requested color scheme, light first; empty when invalid, when svg is never, and when every picture was left out (see picturesOmitted).
612
+ renders: List[DrawFromPatternResponseRendersItem]
613
+ #: Present only when pictures were left out because the answer would have been too big for an AI client to read in one piece.
614
+ picturesOmitted: NotRequired[DrawFromPatternResponsePicturesOmitted]
615
+ #: A link that shows a valid diagram in a browser; give it to the person who wants to look. It holds the drawing itself: the source is in the part after #, never sent to a server, so nothing is saved on Plotwork and it appears in no Diagrams list; anyone with the link can read it. Absent when too long; next says so.
616
+ viewUrl: NotRequired[str]
617
+ #: The viewUrl with &download=png: opening it in a browser saves the diagram as a PNG for Slack, email, or a wiki. The PNG is drawn in the person's browser, not on a server, so it is a link to open, not an image address to embed. Absent when too long.
618
+ pngUrl: NotRequired[str]
619
+ #: The viewUrl with &download=svg: a person opens it to download the SVG. Not a file address for curl; use saveCommand. Absent when too long.
620
+ svgUrl: NotRequired[str]
621
+ #: Run in a shell to save the SVG into the repository: the CLI decodes the link locally, fetches nothing, and embeds the source. Set --out to the path; add --scheme dark for dark. Absent when too long.
622
+ saveCommand: NotRequired[str]
623
+ #: The next step in one sentence.
624
+ next: str
625
+
626
+
627
+ EditDiagramInputOperationsItem = TypedDict(
628
+ "EditDiagramInputOperationsItem",
629
+ {
630
+ "op": "Literal[\"rename\", \"set\", \"add_node\", \"remove\", \"add_edge\", \"remove_edge\", \"move\", \"replace_text\"]",
631
+ # Id, label, table.column, or "header".
632
+ "target": "NotRequired[str]",
633
+ # rename: the new name. Edges: the end.
634
+ "to": "NotRequired[str]",
635
+ # Edges: the start.
636
+ "from": "NotRequired[str]",
637
+ "option": "NotRequired[str]",
638
+ # set: null removes the option.
639
+ "value": "NotRequired[Optional[str]]",
640
+ "id": "NotRequired[str]",
641
+ # add_edge on sankey: the amount.
642
+ "label": "NotRequired[str]",
643
+ # add_node: node type, or statement word (c4 person, tree dir).
644
+ "type": "NotRequired[str]",
645
+ "options": "NotRequired[Dict[str, str]]",
646
+ # add_node: the whole line, for a kind with no plain node statement.
647
+ "statement": "NotRequired[str]",
648
+ # A block; null is the top level.
649
+ "into": "NotRequired[Optional[str]]",
650
+ "after": "NotRequired[str]",
651
+ "arrow": "NotRequired[Literal[\"<-->\", \"-->\", \"<->\", \"..>\", \"->\", \"--\"]]",
652
+ "find": "NotRequired[str]",
653
+ "replace": "NotRequired[str]",
654
+ "all": "NotRequired[bool]",
655
+ },
656
+ )
657
+
658
+
659
+ class EditDiagramInput(TypedDict):
660
+ """Diagram source and the edits to make to it."""
661
+
662
+ #: Diagram source; the first line is the header, such as flow "Title" (draw_diagram lists every kind).
663
+ source: str
664
+ #: Applied in order.
665
+ operations: List[EditDiagramInputOperationsItem]
666
+ #: never (the default) draws nothing; auto or always draws like draw_diagram.
667
+ svg: NotRequired[Literal["auto", "always", "never"]]
668
+ #: light, dark, or both (the default): the light picture and the dark one a dark page needs.
669
+ schemes: NotRequired[Literal["light", "dark", "both"]]
670
+ #: The repo's plotwork.config.json, if any. Schema: https://docs.plotwork.dev/schemas/plotwork.config.json
671
+ settings: NotRequired[Dict[str, Any]]
672
+
673
+
674
+ class EditDiagramResponseResultsItem(TypedDict):
675
+ op: Literal["rename", "set", "add_node", "remove", "add_edge", "remove_edge", "move", "replace_text"]
676
+ applied: bool
677
+ #: Lines of the new source this operation wrote, or the lines it removed from.
678
+ lines: List[int]
679
+ message: str
680
+ hint: Optional[str]
681
+
682
+
683
+ class EditDiagramResponseRendersItem(TypedDict):
684
+ scheme: Literal["light", "dark"]
685
+ svg: str
686
+ size: Size
687
+
688
+
689
+ class EditDiagramResponsePicturesOmitted(TypedDict):
690
+ """Present only when pictures were left out because the answer would have been too big for an AI client to read in one piece."""
691
+
692
+ #: The color schemes whose pictures were left out.
693
+ schemes: List[Literal["light", "dark"]]
694
+ #: How many characters the pictures left out came to.
695
+ characters: int
696
+ #: The most characters one answer may hold before the pictures are left out.
697
+ limit: int
698
+ #: Why they were left out, and what to do.
699
+ why: str
700
+
701
+
702
+ class EditDiagramResponse(TypedDict):
703
+ """The edited source, a result for each operation, and the check of the result."""
704
+
705
+ #: The edited source. Lines no operation touched are byte for byte as they were, comments included.
706
+ source: str
707
+ changed: bool
708
+ #: One entry for each operation, in order.
709
+ results: List[EditDiagramResponseResultsItem]
710
+ valid: bool
711
+ #: A diagram kind: flow, sequence, schema, git, gantt, class, state, timeline, journey, mindmap, treemap, pie, quadrant, layers, c4, matrix, sankey, xychart, tree, swimlane, requirement, block, packet, kanban, radar, usecase, venn, fishbone, or wardley today. Later versions add kinds, so expect others.
712
+ kind: Optional[str]
713
+ errors: List[Diagnostic]
714
+ #: Quality warnings; only when the result is drawn.
715
+ warnings: List[Diagnostic]
716
+ summary: Optional[str]
717
+ outline: List[str]
718
+ outlineTruncated: bool
719
+ size: Optional[Size]
720
+ renders: List[EditDiagramResponseRendersItem]
721
+ #: Present only when pictures were left out because the answer would have been too big for an AI client to read in one piece.
722
+ picturesOmitted: NotRequired[EditDiagramResponsePicturesOmitted]
723
+ #: A link that shows a valid diagram in a browser; give it to the person who wants to look. It holds the drawing itself: the source is in the part after #, never sent to a server, so nothing is saved on Plotwork and it appears in no Diagrams list; anyone with the link can read it. Absent when too long; next says so.
724
+ viewUrl: NotRequired[str]
725
+ #: The viewUrl with &download=svg: a person opens it to download the SVG. Not a file address for curl; use saveCommand. Absent when too long.
726
+ svgUrl: NotRequired[str]
727
+ #: Run in a shell to save the SVG into the repository: the CLI decodes the link locally, fetches nothing, and embeds the source. Set --out to the path; add --scheme dark for dark. Absent when too long.
728
+ saveCommand: NotRequired[str]
729
+ next: str
730
+
731
+
732
+ class ErrorResponse(TypedDict):
733
+ """Standard error envelope used by every failing response."""
734
+
735
+ #: Always true, so clients can branch without reading the status.
736
+ error: Literal[True]
737
+ #: Stable snake_case key such as validation.failed or diagram.invalid.
738
+ errorCode: str
739
+ #: Safe, human-readable summary.
740
+ message: str
741
+ #: Validation issues or diagnostics, JSON-safe.
742
+ details: NotRequired[Any]
743
+ #: Trace id for correlating with logs.
744
+ requestId: NotRequired[str]
745
+
746
+
747
+ class FindPatternInput(TypedDict):
748
+ """Words that describe the architecture wanted, and optional filters."""
749
+
750
+ #: The architecture wanted, in plain words, such as "three tier network".
751
+ query: str
752
+ #: Only patterns that come in this flavour: neutral, aws, azure, or gcp.
753
+ provider: NotRequired[Literal["neutral", "aws", "azure", "gcp"]]
754
+ #: Tags every result must have, such as "load balancer". Up to 5.
755
+ tags: NotRequired[List[str]]
756
+ #: Only patterns of this diagram kind: flow, sequence, schema, git, gantt, class, state, timeline, journey, mindmap, treemap, pie, quadrant, layers, c4, matrix, sankey, xychart, tree, swimlane, requirement, block, packet, kanban, radar, usecase, venn, fishbone, or wardley.
757
+ kind: NotRequired[Literal["flow", "sequence", "schema", "git", "gantt", "class", "state", "timeline", "journey", "mindmap", "treemap", "pie", "quadrant", "layers", "c4", "matrix", "sankey", "xychart", "tree", "swimlane", "requirement", "block", "packet", "kanban", "radar", "usecase", "venn", "fishbone", "wardley"]]
758
+ #: Most results to return, up to 5.
759
+ limit: NotRequired[int]
760
+
761
+
762
+ class FindPatternResponseMatchesItem(TypedDict):
763
+ #: The pattern id, as find_pattern returns it, such as three-tier-network.
764
+ id: str
765
+ title: str
766
+ #: One sentence: what the diagram shows.
767
+ summary: str
768
+ #: A diagram kind: flow, sequence, schema, git, gantt, class, state, timeline, journey, mindmap, treemap, pie, quadrant, layers, c4, matrix, sankey, xychart, tree, swimlane, requirement, block, packet, kanban, radar, usecase, venn, fishbone, or wardley today. Later versions add kinds, so expect others.
769
+ kind: str
770
+ tags: List[str]
771
+ #: The flavours the pattern comes in.
772
+ providers: List[Literal["neutral", "aws", "azure", "gcp"]]
773
+ #: How well it matches; only the order of the results is meaningful.
774
+ score: float
775
+ #: Present on a pattern of your organisation's own, which it approved and which comes first. Absent on the built-in patterns.
776
+ origin: NotRequired[Literal["organisation"]]
777
+ #: Present, with origin, on a pattern of your organisation: the words to show beside it.
778
+ label: NotRequired[Literal["Your organisation's pattern"]]
779
+
780
+
781
+ class FindPatternResponse(TypedDict):
782
+ """Patterns that match a request, best first, with summaries and no source."""
783
+
784
+ #: The query that was searched.
785
+ query: str
786
+ #: Up to the limit, best match first. Empty when nothing fits.
787
+ matches: List[FindPatternResponseMatchesItem]
788
+ #: The next step in one sentence.
789
+ next: str
790
+
791
+
792
+ class FixEdit(TypedDict):
793
+ """Replace `length` characters from `line`:`column` with `text`."""
794
+
795
+ #: 1-based line the edit starts on.
796
+ line: int
797
+ #: 1-based column it starts at.
798
+ column: int
799
+ #: Characters to replace from there, a line break counting one.
800
+ length: int
801
+ #: What replaces them; empty deletes.
802
+ text: str
803
+
804
+
805
+ class GetPatternInput(TypedDict):
806
+ """A pattern id, the flavour to draw, and the slot values to use."""
807
+
808
+ #: The pattern id, as find_pattern returns it, such as three-tier-network.
809
+ id: str
810
+ #: neutral (generic glyphs, no vendor names; the default), or aws, azure, or gcp for that provider's icons. Not every pattern comes in every flavour; the answer lists the ones it has.
811
+ provider: NotRequired[Literal["neutral", "aws", "azure", "gcp"]]
812
+ #: Slot values keyed by slot id, such as {"office": "Branch office"}: plain text of up to 60 characters, no quotes or line breaks. Omit a slot to keep its default. get_pattern lists the slots and what they mean.
813
+ slots: NotRequired[Dict[str, str]]
814
+ #: true also returns the whole pattern as a pattern file, to edit, check_pattern and publish_pattern.
815
+ file: NotRequired[bool]
816
+
817
+
818
+ class GetPatternResponseSlotsItem(TypedDict):
819
+ #: The slot id; the key to use in slots.
820
+ id: str
821
+ #: The text the slot has in the source: the value sent, or the default.
822
+ value: str
823
+ #: The default text.
824
+ default: str
825
+ #: What belongs in this slot.
826
+ meaning: str
827
+ #: True when the slot kept its default.
828
+ isDefault: bool
829
+
830
+
831
+ class GetPatternResponseNotesObject(TypedDict):
832
+ """How to adapt the pattern: what to keep, what to rename, and when to split."""
833
+
834
+ #: What to leave exactly as it is.
835
+ keep: str
836
+ #: What to rename or replace, and how.
837
+ rename: str
838
+ #: When the diagram has grown too big, and where to cut it.
839
+ split: str
840
+
841
+
842
+ class GetPatternResponseProblemsItem(TypedDict):
843
+ code: Literal["unknown-pattern", "unknown-flavour", "unknown-slot", "bad-slot-value", "bad-source"]
844
+ message: str
845
+ #: How to fix it.
846
+ hint: str
847
+
848
+
849
+ class GetPatternResponseTreeItem(TypedDict):
850
+ #: How deep the item sits: 0 for the top level.
851
+ depth: int
852
+ kind: Literal["group", "overlay", "node", "actor", "table"]
853
+ #: The id written in the source.
854
+ id: str
855
+ label: str
856
+ #: The group type, node type, or actor type; null for a table or an untyped group.
857
+ type: Optional[str]
858
+
859
+
860
+ class GetPatternResponseFileObjectTemplates(TypedDict):
861
+ neutral: NotRequired[str]
862
+ aws: NotRequired[str]
863
+ azure: NotRequired[str]
864
+ gcp: NotRequired[str]
865
+
866
+
867
+ class GetPatternResponseFileObjectSlotsItem(TypedDict):
868
+ id: str
869
+ default: str
870
+ meaning: str
871
+
872
+
873
+ class GetPatternResponseFileObjectNotes(TypedDict):
874
+ keep: NotRequired[str]
875
+ rename: NotRequired[str]
876
+ split: NotRequired[str]
877
+
878
+
879
+ # The whole pattern as a pattern file, when file was true and the pattern was found.
880
+ GetPatternResponseFileObject = TypedDict(
881
+ "GetPatternResponseFileObject",
882
+ {
883
+ "$schema": "NotRequired[str]",
884
+ "name": "str",
885
+ "title": "str",
886
+ "summary": "str",
887
+ "whenToUse": "NotRequired[str]",
888
+ "tags": "NotRequired[List[str]]",
889
+ "templates": "GetPatternResponseFileObjectTemplates",
890
+ "slots": "NotRequired[List[GetPatternResponseFileObjectSlotsItem]]",
891
+ "notes": "NotRequired[GetPatternResponseFileObjectNotes]",
892
+ },
893
+ )
894
+
895
+
896
+ class GetPatternResponse(TypedDict):
897
+ """A pattern filled for one flavour, with its slots and advice."""
898
+
899
+ #: True when the pattern and flavour exist and the slot values are usable. When false, problems says why and nothing else is filled.
900
+ found: bool
901
+ #: The pattern id that was asked for.
902
+ id: str
903
+ title: Optional[str]
904
+ #: One sentence: what the pattern shows.
905
+ patternSummary: Optional[str]
906
+ whenToUse: Optional[str]
907
+ #: A diagram kind: flow, sequence, schema, git, gantt, class, state, timeline, journey, mindmap, treemap, pie, quadrant, layers, c4, matrix, sankey, xychart, tree, swimlane, requirement, block, packet, kanban, radar, usecase, venn, fishbone, or wardley today. Later versions add kinds, so expect others.
908
+ kind: Optional[str]
909
+ #: The flavour that was filled.
910
+ flavour: Literal["neutral", "aws", "azure", "gcp", None]
911
+ #: Every flavour this pattern comes in; empty when the pattern was not found.
912
+ flavours: List[Literal["neutral", "aws", "azure", "gcp"]]
913
+ #: Plotwork source, valid and ready to use; null when not found.
914
+ source: Optional[str]
915
+ #: Every slot the source uses, with the value it has.
916
+ slots: List[GetPatternResponseSlotsItem]
917
+ #: How to adapt the pattern: what to keep, what to rename, and when to split.
918
+ notes: Optional[GetPatternResponseNotesObject]
919
+ #: Mistakes in the id, the flavour, or the slot values, each with a fix. Empty when found.
920
+ problems: List[GetPatternResponseProblemsItem]
921
+ #: The groups, overlays, and nodes as drawn, depth first, so you can see what to rename.
922
+ tree: List[GetPatternResponseTreeItem]
923
+ #: The text description of the diagram.
924
+ outline: List[str]
925
+ #: The whole pattern as a pattern file, when file was true and the pattern was found.
926
+ file: NotRequired[Optional[GetPatternResponseFileObject]]
927
+ #: The next step in one sentence.
928
+ next: str
929
+
930
+
931
+ class HostedDiagram(TypedDict):
932
+ #: The handle for managing the diagram (delete). It is not in the link.
933
+ id: str
934
+ #: The public address of the SVG. Anyone with the link can see it; the token in it cannot be guessed.
935
+ url: str
936
+ #: The label given at publish, or null.
937
+ name: Optional[str]
938
+ #: The folder it is filed in, such as `Payments/Checkout`, or null for the top level.
939
+ folder: Optional[str]
940
+ #: The color scheme it was drawn in: light, dark, or auto.
941
+ scheme: Literal["light", "dark", "auto"]
942
+ #: Size of the stored SVG in bytes.
943
+ bytes: int
944
+ #: When it was first published, in milliseconds since the epoch.
945
+ createdAt: int
946
+ #: When it was last published, in milliseconds since the epoch. Publishing the same diagram again moves it.
947
+ publishedAt: int
948
+ #: When it will be deleted, in milliseconds since the epoch, or null when the plan keeps diagrams until you delete them.
949
+ expiresAt: Optional[int]
950
+ #: True while the diagram is locked: it cannot be deleted, renamed or moved until you unlock it. A lock does not stop it expiring on a plan that expires diagrams.
951
+ locked: bool
952
+ #: When it was locked, in milliseconds since the epoch, or null when it is not locked.
953
+ lockedAt: Optional[int]
954
+ series: DiagramSeries
955
+
956
+
957
+ class IconSearchResponse(TypedDict):
958
+ """Matching bundled icon names."""
959
+
960
+ #: The query that was searched.
961
+ query: str
962
+ #: Matching icon references as set:name, best match first.
963
+ items: List[str]
964
+
965
+
966
+ class ImportSourceInputFilesItem(TypedDict):
967
+ #: The file path, such as infra/network.tf; diagnostics name it.
968
+ path: str
969
+ #: The file content, as text.
970
+ text: str
971
+
972
+
973
+ class ImportSourceInputOptions(TypedDict):
974
+ #: The picture of a format drawn several ways.
975
+ view: NotRequired[Literal["endpoints", "map", "sequence", "git", "timeline", "context", "container", "component"]]
976
+ #: openapi sequence: the operation.
977
+ operationId: NotRequired[str]
978
+ #: csv, json: the chart; auto picks.
979
+ chart: NotRequired[Literal["auto", "xychart", "pie", "sankey", "treemap", "matrix"]]
980
+ #: Tables to draw, by name or prefix*.
981
+ tables: NotRequired[List[str]]
982
+ #: openapi: path prefixes to read.
983
+ paths: NotRequired[List[str]]
984
+ #: openapi: tags to read.
985
+ tags: NotRequired[List[str]]
986
+ #: Variables files to apply.
987
+ varFiles: NotRequired[List[str]]
988
+ #: How things are framed; module is the default.
989
+ groupBy: NotRequired[Literal["module", "network", "file", "owner"]]
990
+ #: The root, stack, template, or draw.io page of several to draw.
991
+ root: NotRequired[str]
992
+ #: off: no icons, as settings with icons off.
993
+ icons: NotRequired[Literal["auto", "off"]]
994
+
995
+
996
+ class ImportSourceInput(TypedDict):
997
+ """A file of another format to turn into Plotwork source."""
998
+
999
+ #: What the text is; get_diagram_syntax with topic import-formats describes each.
1000
+ format: Literal["sql", "prisma", "drizzle", "openapi", "graphql", "protobuf", "terraform", "terraform-plan", "bicep", "arm", "pulumi", "cloudformation", "cdk", "serverless", "compose", "dockerfile", "kubernetes", "helm", "kustomize", "nginx", "backstage", "structurizr", "asyncapi", "github-actions", "gitlab-ci", "azure-pipelines", "dbt", "workspaces", "drawio", "csv", "json", "tree", "git-log"]
1001
+ #: The file content, as text. Send text or files, not both.
1002
+ text: NotRequired[str]
1003
+ #: The files of a folder, for a format that spans files; the others read the first.
1004
+ files: NotRequired[List[ImportSourceInputFilesItem]]
1005
+ #: The diagram title; taken from the file when left out.
1006
+ title: NotRequired[str]
1007
+ #: Page of parts, 24 a page.
1008
+ partsPage: NotRequired[int]
1009
+ #: Too big for one picture: parts, whole, or both.
1010
+ large: NotRequired[Literal["parts", "whole", "both"]]
1011
+ options: NotRequired[ImportSourceInputOptions]
1012
+
1013
+
1014
+ class ImportSourceResponseStats(TypedDict):
1015
+ #: Boxes, tables, rows, slices, places, entries, or commits written.
1016
+ items: int
1017
+ #: Arrows, relations, messages, flows, or merges written.
1018
+ links: int
1019
+ #: Frames, sections, or folders written.
1020
+ groups: int
1021
+ #: Things in the file left out by a cap or because the picture has no place for them; each is in diagnostics.
1022
+ dropped: int
1023
+
1024
+
1025
+ class ImportSourceResponseCoverageObject(TypedDict):
1026
+ """How much of the file the picture shows; null when nothing was imported. When complete is false, the picture is not the whole file: say so."""
1027
+
1028
+ #: What was counted, such as resources, services, tables, or endpoints.
1029
+ noun: str
1030
+ #: Everything of that kind in the file.
1031
+ total: int
1032
+ #: Drawn as a box, frame, table, row, or entry of its own.
1033
+ drawn: int
1034
+ #: Not drawn on their own but counted on the box they belong to, such as "3 role assignments".
1035
+ summarised: int
1036
+ #: Not in the picture at all; the diagnostics say which and why.
1037
+ omitted: int
1038
+ #: True when nothing was omitted.
1039
+ complete: bool
1040
+ #: The coverage in one sentence, such as "Drawn 12 of 85 resources; 60 are counted on the boxes they belong to and 13 are left out."
1041
+ line: str
1042
+
1043
+
1044
+ class ImportSourceResponseValidationObjectSizeObject(TypedDict):
1045
+ """Natural size of the laid-out diagram."""
1046
+
1047
+ #: Width in px.
1048
+ width: int
1049
+ #: Height in px.
1050
+ height: int
1051
+
1052
+
1053
+ class ImportSourceResponseValidationObject(TypedDict):
1054
+ """The Plotwork validator run on `source`; null when nothing was imported."""
1055
+
1056
+ #: True when the source has no Plotwork errors. It always is when `ok` is true.
1057
+ valid: bool
1058
+ #: Plotwork errors. Lines and columns point into `source`.
1059
+ errors: List[Diagnostic]
1060
+ #: Plotwork quality warnings, with the exact fix in each hint. Lines and columns point into `source`.
1061
+ warnings: List[Diagnostic]
1062
+ #: One-line description of the diagram, usable as alt text.
1063
+ summary: Optional[str]
1064
+ #: Natural size of the laid-out diagram.
1065
+ size: Optional[ImportSourceResponseValidationObjectSizeObject]
1066
+
1067
+
1068
+ class ImportSourceResponsePartsItem(TypedDict):
1069
+ #: Its place among all the parts, from 1.
1070
+ index: int
1071
+ #: What this diagram shows, such as one resource group or one tag of an API.
1072
+ title: str
1073
+ #: The kind of diagram.
1074
+ kind: str
1075
+ #: The Plotwork source of this diagram; draw it with draw_diagram.
1076
+ source: str
1077
+ #: The boxes, rows, or entries it draws.
1078
+ items: int
1079
+ #: True when the source has no Plotwork errors.
1080
+ valid: bool
1081
+ #: Plotwork quality warnings of this diagram. Lines and columns point into its source.
1082
+ warnings: List[Diagnostic]
1083
+
1084
+
1085
+ class ImportSourceResponseSeriesObject(TypedDict):
1086
+ """For a split import, publish_diagram's series for every part, with the part's index. Null for one diagram."""
1087
+
1088
+ id: str
1089
+ total: int
1090
+
1091
+
1092
+ class ImportSourceResponseCombinedObject(TypedDict):
1093
+ """A split import as one diagram, every arrow kept; publish at series index 0."""
1094
+
1095
+ title: str
1096
+ source: str
1097
+
1098
+
1099
+ class ImportSourceResponse(TypedDict):
1100
+ """The result of turning a file of another format into Plotwork source."""
1101
+
1102
+ #: True when `source` is valid Plotwork source. False means nothing was imported and `source` is empty: read `diagnostics`.
1103
+ ok: bool
1104
+ #: The kind of diagram the file became, or null when nothing was imported.
1105
+ kind: Optional[str]
1106
+ #: The format the text was read as.
1107
+ format: str
1108
+ #: The Plotwork source, or an empty string when nothing could be imported.
1109
+ source: str
1110
+ #: Everything left out, changed, or wrong, with a hint. Codes start with I and point into the text you sent: I1xx errors stopped the import, I2xx warnings did not.
1111
+ diagnostics: List[Diagnostic]
1112
+ stats: ImportSourceResponseStats
1113
+ #: How much of the file the picture shows; null when nothing was imported. When complete is false, the picture is not the whole file: say so.
1114
+ coverage: Optional[ImportSourceResponseCoverageObject]
1115
+ #: The Plotwork validator run on `source`; null when nothing was imported.
1116
+ validation: Optional[ImportSourceResponseValidationObject]
1117
+ #: When the file is too big for one readable picture, the diagrams it was split into, in order, at most 24 a page; `source` is the first diagram of all. Show or draw each of them. Empty when the import is one diagram.
1118
+ parts: List[ImportSourceResponsePartsItem]
1119
+ #: How many diagrams the import was split into in all; 0 when it is one diagram.
1120
+ partsTotal: int
1121
+ #: The page of parts this answer holds, from 1.
1122
+ partsPage: int
1123
+ #: How many pages of parts there are; call again with partsPage for the next one.
1124
+ partsPages: int
1125
+ #: For a split import, publish_diagram's series for every part, with the part's index. Null for one diagram.
1126
+ series: Optional[ImportSourceResponseSeriesObject]
1127
+ #: A split import as one diagram, every arrow kept; publish at series index 0.
1128
+ combined: Optional[ImportSourceResponseCombinedObject]
1129
+ #: The diagram as plain text, to check it says what the file says; empty when nothing was imported.
1130
+ outline: List[str]
1131
+ #: True when the outline was cut short at its summary length.
1132
+ outlineTruncated: bool
1133
+ #: A link that shows a valid diagram in a browser; give it to the person who wants to look. It holds the drawing itself: the source is in the part after #, never sent to a server, so nothing is saved on Plotwork and it appears in no Diagrams list; anyone with the link can read it. Absent when too long; next says so.
1134
+ viewUrl: NotRequired[str]
1135
+ #: The viewUrl with &download=png: opening it in a browser saves the diagram as a PNG for Slack, email, or a wiki. The PNG is drawn in the person's browser, not on a server, so it is a link to open, not an image address to embed. Absent when too long.
1136
+ pngUrl: NotRequired[str]
1137
+ #: The viewUrl with &download=svg: a person opens it to download the SVG. Not a file address for curl; use saveCommand. Absent when too long.
1138
+ svgUrl: NotRequired[str]
1139
+ #: Run in a shell to save the SVG into the repository: the CLI decodes the link locally, fetches nothing, and embeds the source. Set --out to the path; add --scheme dark for dark. Absent when too long.
1140
+ saveCommand: NotRequired[str]
1141
+ #: The next step in one sentence.
1142
+ next: str
1143
+
1144
+
1145
+ class MapIconsInput(TypedDict):
1146
+ """Names to find icons for, and an optional provider to look in first."""
1147
+
1148
+ #: Services, products, or ideas to find icons for, written as the user wrote them ("S3", "Postgres", "load balancer"). Up to 40 names of up to 80 characters.
1149
+ names: List[str]
1150
+ #: The cloud the architecture runs on. A name is looked up there first, so "queue" finds aws:sqs for aws. Omit it when the names are not tied to one provider.
1151
+ provider: NotRequired[Literal["aws", "gcp", "azure", "alibaba", "oci", "ibm", "cloudflare", "digitalocean", "vercel"]]
1152
+
1153
+
1154
+ class MapIconsResponseResultsItem(TypedDict):
1155
+ #: The name exactly as it was sent.
1156
+ name: str
1157
+ #: True when icon holds the one icon to use. False when the name could mean more than one: choose from candidates, or ask the user.
1158
+ resolved: bool
1159
+ #: The icon to write as icon=, such as aws:lambda; null when resolved is false.
1160
+ icon: Optional[str]
1161
+ #: exact: the name is the icon or product name. strong: the name clearly points at this icon and no other provider competes. ambiguous: several icons fit, or the match is by idea only.
1162
+ confidence: Literal["exact", "strong", "ambiguous"]
1163
+ #: Up to 3 other icons that also fit a resolved name, best first. Empty when none.
1164
+ alternatives: List[str]
1165
+ #: When resolved is false, the icons that fit, best first (up to 4). Empty when resolved.
1166
+ candidates: List[str]
1167
+
1168
+
1169
+ class MapIconsResponseGapsItem(TypedDict):
1170
+ #: The name that matched no icon.
1171
+ name: str
1172
+ #: A neutral icon to use instead, or leave icon= out so the node type draws its own.
1173
+ fallback: str
1174
+ #: Why there is no match, and what to try.
1175
+ reason: str
1176
+
1177
+
1178
+ class MapIconsResponse(TypedDict):
1179
+ """An icon, or candidates, for each name sent, and the names that found no icon."""
1180
+
1181
+ #: The provider hint that was used, or null.
1182
+ provider: Literal["aws", "gcp", "azure", "alibaba", "oci", "ibm", "cloudflare", "digitalocean", "vercel", None]
1183
+ #: One entry per name that matched something, in the order sent.
1184
+ results: List[MapIconsResponseResultsItem]
1185
+ #: Names that matched nothing, in the order sent.
1186
+ gaps: List[MapIconsResponseGapsItem]
1187
+ #: How many names have one icon to use.
1188
+ resolvedCount: int
1189
+ #: How many names need a choice from candidates.
1190
+ ambiguousCount: int
1191
+ #: How many names matched nothing.
1192
+ gapCount: int
1193
+
1194
+
1195
+ class Note(TypedDict):
1196
+ """An information note with its place in the source."""
1197
+
1198
+ #: A stable code, such as I122 for an icon alias.
1199
+ code: str
1200
+ #: A note never stops a drawing and is not a warning.
1201
+ severity: Literal["info"]
1202
+ message: str
1203
+ line: int
1204
+ column: int
1205
+ length: int
1206
+ #: The text to write instead.
1207
+ hint: Optional[str]
1208
+
1209
+
1210
+ class OrganisationDiagramPublishedKeyObject(TypedDict):
1211
+ """The key behind a connection or an organisation key. Null for a person, and once the key no longer exists."""
1212
+
1213
+ #: The key's id, as Keys and CI lists it. Never the key itself.
1214
+ id: str
1215
+ #: The key's name, or null once the key is revoked.
1216
+ name: Optional[str]
1217
+
1218
+
1219
+ class OrganisationDiagram(TypedDict):
1220
+ #: The handle for the diagram in the routes below.
1221
+ id: str
1222
+ #: The label given at publish, or null.
1223
+ name: Optional[str]
1224
+ #: The folder it is filed in, such as `Payments/Checkout`, or null for the top level.
1225
+ folder: Optional[str]
1226
+ #: The color scheme it was drawn in: light, dark, or auto.
1227
+ scheme: Literal["light", "dark", "auto"]
1228
+ #: Size of the stored SVG in bytes.
1229
+ bytes: int
1230
+ #: The person it belongs to: the member who published it, or the person who connected the agent that did. Null when that account has left or an organisation key published it.
1231
+ createdBy: Optional[str]
1232
+ #: How it was published: `person` (signed in, or with a key the person made), `connection` (an agent connected to the organisation, whose person is `createdBy`), or `key` (an organisation key from Keys and CI). Null for a diagram published before this was recorded.
1233
+ publishedVia: Literal["person", "connection", "key", None]
1234
+ #: The key behind a connection or an organisation key. Null for a person, and once the key no longer exists.
1235
+ publishedKey: Optional[OrganisationDiagramPublishedKeyObject]
1236
+ #: The client name the agent gave when it connected, such as `Claude Code`, for a connection only.
1237
+ publishedClient: Optional[str]
1238
+ #: When it was first published, in milliseconds since the epoch.
1239
+ createdAt: int
1240
+ #: When it was last published, in milliseconds since the epoch. Publishing the same diagram again moves it.
1241
+ publishedAt: int
1242
+ #: When it will be deleted, in milliseconds since the epoch, or null when the owner's plan keeps diagrams until they are deleted.
1243
+ expiresAt: Optional[int]
1244
+ #: A page in the portal that shows the diagram to a signed-in member. It is not a link anyone can open: an organisation's diagrams have no public address.
1245
+ viewUrl: str
1246
+ #: True while the owner has the diagram locked: nobody can delete, rename or move it, its publisher and the owner included, until the owner unlocks it. A lock does not stop it expiring on a plan that expires diagrams.
1247
+ locked: bool
1248
+ #: When the owner locked it, in milliseconds since the epoch, or null when it is not locked.
1249
+ lockedAt: Optional[int]
1250
+ #: Present, and true, when the owner has restricted this diagram's folder and the caller is allowed in it, so the portal can show it as locked. Absent otherwise. A diagram in a folder the caller may not use is not listed at all.
1251
+ restricted: NotRequired[Literal[True]]
1252
+ #: Present, and true, when the folder rule over this diagram keeps its diagrams inside: the svg route refuses `?download=1` and the copy route refuses a copy (403 `orgs.folder_restricted`). Absent otherwise.
1253
+ keepInside: NotRequired[Literal[True]]
1254
+ share: OrganisationDiagramShare
1255
+ #: "Keep": true when an owner or admin keeps it from the library retention. The plan's own retention still applies.
1256
+ kept: bool
1257
+ #: When the retention deletes it, in milliseconds since the epoch: the nearer of the plan's expiry and "Delete library diagrams not updated for". Null when nothing will, and always null under a legal hold.
1258
+ deletesAt: Optional[int]
1259
+ classification: Classification
1260
+ #: True while it is held for approval ("Publishing needs approval"): only its publisher and the approvers see it.
1261
+ pending: bool
1262
+ #: True while a new version of it waits for approval. The library shows this version until then.
1263
+ changePending: bool
1264
+ series: DiagramSeries
1265
+
1266
+
1267
+ class OrganisationDiagramShareObject(TypedDict):
1268
+ """Its public link while the organisation shares it, or null. Only a diagram someone chose to share has one."""
1269
+
1270
+ #: The public address, `{CDN_URL}/l/<token>.svg`. Anyone with it can see the picture, without its source. It keeps showing the latest version when the diagram is edited, and never changes.
1271
+ url: str
1272
+ #: When the diagram was first shared, in milliseconds since the epoch.
1273
+ sharedAt: int
1274
+
1275
+
1276
+ class OutlineResponse(TypedDict):
1277
+ """A plain-text description of a diagram, usable as alt text."""
1278
+
1279
+ #: A diagram kind: flow, sequence, schema, git, gantt, class, state, timeline, journey, mindmap, treemap, pie, quadrant, layers, c4, matrix, sankey, xychart, tree, swimlane, requirement, block, packet, kanban, radar, usecase, venn, fishbone, or wardley today. Later versions add kinds, so expect others.
1280
+ kind: str
1281
+ #: One-line description.
1282
+ summary: str
1283
+ #: Lines in reading order: participants, steps, tables, and connections.
1284
+ outline: List[str]
1285
+
1286
+
1287
+ class PlanDocumentInput(TypedDict):
1288
+ """A document to read for the sections a picture would help."""
1289
+
1290
+ #: The whole document: Markdown, plain text pasted from Confluence, Notion, or Google Docs, or HTML. Up to 10000000 characters.
1291
+ document: str
1292
+ #: Most sections to suggest a picture for, up to 12. The strongest are kept, in document order. The default is 8.
1293
+ maxSuggestions: NotRequired[int]
1294
+
1295
+
1296
+ class PlanDocumentResponseSuggestionsItem(TypedDict):
1297
+ #: The heading of the section, as written.
1298
+ heading: str
1299
+ #: The 1-based line of the heading in the document that was sent.
1300
+ line: int
1301
+ #: A diagram kind: flow, sequence, schema, git, gantt, class, state, timeline, journey, mindmap, treemap, pie, quadrant, layers, c4, matrix, sankey, xychart, tree, swimlane, requirement, block, packet, kanban, radar, usecase, venn, fishbone, or wardley today. Later versions add kinds, so expect others.
1302
+ kind: str
1303
+ #: The style the starter uses: compare, score, raci, or risk for a matrix, files or org for a tree; null for the kind's only style.
1304
+ style: Optional[str]
1305
+ #: One sentence: what in the section points to this kind.
1306
+ why: str
1307
+ #: high: the text names this kind of picture or its shape fits it exactly. medium: it leans toward it. low: a fallback worth considering.
1308
+ confidence: Literal["high", "medium", "low"]
1309
+ #: A short Plotwork source of this kind that parses without errors: built from the names and numbers in the text where it could find them, otherwise a small example to edit. Replace every placeholder before you draw it.
1310
+ starter: str
1311
+ #: True when the starter uses names or numbers from the text; false when it is the kind's small example.
1312
+ tailored: bool
1313
+
1314
+
1315
+ class PlanDocumentResponseCaps(TypedDict):
1316
+ #: True when a cap left something out; messages says what.
1317
+ hit: bool
1318
+ messages: List[str]
1319
+ maxSections: int
1320
+ maxSuggestions: int
1321
+
1322
+
1323
+ class PlanDocumentResponse(TypedDict):
1324
+ """The sections of a document a picture would help, each with a kind, a reason, and a starter."""
1325
+
1326
+ #: One sentence: how many sections were read and how many would gain a picture.
1327
+ summary: str
1328
+ #: How the document was read: Markdown headings, HTML h1 to h6, or plain text with heading-like lines.
1329
+ format: Literal["markdown", "html", "text"]
1330
+ #: Sections read, up to the cap.
1331
+ sectionsRead: int
1332
+ #: In document order. Sections that read well as text, or already have a diagram, are not listed.
1333
+ suggestions: List[PlanDocumentResponseSuggestionsItem]
1334
+ caps: PlanDocumentResponseCaps
1335
+ #: The next step in one sentence.
1336
+ next: str
1337
+
1338
+
1339
+ class PublishDiagramBody(TypedDict):
1340
+ #: Diagram source; the first line is the header, such as flow "Title" (draw_diagram lists every kind).
1341
+ source: str
1342
+ #: The repo's plotwork.config.json, if any. Schema: https://docs.plotwork.dev/schemas/plotwork.config.json
1343
+ settings: NotRequired[Dict[str, Any]]
1344
+ #: The color scheme to draw it in: light, dark, or auto (one picture that follows the viewer's light or dark setting). Light when left out.
1345
+ scheme: NotRequired[Literal["light", "dark", "auto"]]
1346
+ #: The old name of scheme, still taken from callers that send it: light, dark, or auto. Send scheme instead; refused when both are sent and differ.
1347
+ theme: NotRequired[Literal["light", "dark", "auto"]]
1348
+ #: Whether the stored SVG carries the diagram source in its metadata, so the picture can be edited later: read_diagram gives the source back from the link. The source is part of the picture, which anyone who has the link can read (for a diagram in an organisation, every member who can open it). Left out, a personal diagram carries the source, and a diagram that lands in an organisation follows its keepEditable setting (on unless the owner turned it off). Send false to leave the source out, such as for a public link whose labels name internal systems. The same diagram published with and without it is two pictures with two links.
1349
+ embedSource: NotRequired[bool]
1350
+ #: A label for the diagram in your list and in the Markdown snippet. Optional.
1351
+ name: NotRequired[str]
1352
+ #: The folder to file the diagram in. Left out, a new diagram goes to the top level and a diagram that is already hosted stays where it is. A path files a new diagram there, or moves the one that is already hosted and keeps its link. null puts it at the top level.
1353
+ folder: NotRequired[Optional[str]]
1354
+ #: Point a stable link with this name at the diagram, so one address always shows the latest version. The first publish with a name makes the stable link (the answer's stableLink.url) and every later publish with the same name moves it to the new diagram; the address never changes. How many stable links an account keeps depends on its plan. An alias asks for a personal link, so an organisation that requires its library refuses it (orgs.publish_required). Optional.
1355
+ alias: NotRequired[str]
1356
+ #: An organisation's slug or id: the diagram goes to that organisation's private library, and the answer has private true and a viewUrl in place of a public link. The account must be a member who may publish there. Left out, the diagram goes to your own library, unless an organisation you belong to publishes its members' diagrams to its library.
1357
+ organization: NotRequired[str]
1358
+ #: True asks for a public link in your own library even though an organisation you belong to publishes its members' diagrams to its library by default. An organisation that requires its library refuses it (403 orgs.publish_required). Not with organization.
1359
+ personal: NotRequired[bool]
1360
+ #: The classification label of a diagram that lands in an organisation's library: public, internal or confidential. Left out, a new diagram takes its folder's default or the organisation's (internal unless an owner or admin chose another). Below that default, and lowering an existing diagram's label, is for an owner or admin. Ignored for a personal diagram.
1361
+ classification: NotRequired[Classification]
1362
+ series: NotRequired[SeriesInput]
1363
+
1364
+
1365
+ class PublishOrganization(TypedDict):
1366
+ """The organisation whose private library holds the diagram."""
1367
+
1368
+ id: str
1369
+ slug: str
1370
+ name: str
1371
+
1372
+
1373
+ class PublishedDiagram(HostedDiagram):
1374
+ #: True when this call stored a new diagram; false when the same diagram was already hosted and its link was kept.
1375
+ created: bool
1376
+ stableLink: NotRequired[StableLink]
1377
+
1378
+
1379
+ class PublishedOrganisationDiagram(OrganisationDiagram):
1380
+ #: True when this call stored a new diagram; false when the same diagram was already in the library and was kept.
1381
+ created: bool
1382
+ #: True when the stored picture carries the diagram source: the call sent embedSource true, or left it out while the organisation's keepEditable is on.
1383
+ sourceEmbedded: bool
1384
+ approval: NotRequired[ApprovalHold]
1385
+
1386
+
1387
+ class ReadDiagramInput(TypedDict):
1388
+ """The text of a Plotwork SVG, or the link of a hosted one."""
1389
+
1390
+ #: The text of a Plotwork SVG: the content of an .svg file in the repository. Send this or url, not both.
1391
+ svg: NotRequired[str]
1392
+ #: The link of a hosted Plotwork picture, https://cdn.plotwork.dev/d/<22 characters>.svg. Only Plotwork's own picture hosts are fetched. Send this or svg, not both.
1393
+ url: NotRequired[str]
1394
+
1395
+
1396
+ class ReadDiagramResponseValidationObject(TypedDict):
1397
+ """The check of the source, or null when there is none. It parses the source; draw_diagram also lays it out and returns warnings."""
1398
+
1399
+ #: True when the source has no errors.
1400
+ valid: bool
1401
+ #: Every error, each with line, column, and a hint; empty when valid.
1402
+ errors: List[Diagnostic]
1403
+ #: One-line description of the diagram, or null when invalid.
1404
+ summary: Optional[str]
1405
+
1406
+
1407
+ class ReadDiagramResponsePictureObjectSizeObject(TypedDict):
1408
+ """Its size in px, or null."""
1409
+
1410
+ #: Width in px.
1411
+ width: int
1412
+ #: Height in px.
1413
+ height: int
1414
+
1415
+
1416
+ class ReadDiagramResponsePictureObject(TypedDict):
1417
+ """What the picture says about itself, or null when the text is not an SVG."""
1418
+
1419
+ #: The diagram title, or null.
1420
+ title: Optional[str]
1421
+ #: The one-line summary the picture carries, or null.
1422
+ summary: Optional[str]
1423
+ #: The color scheme it was drawn in, or null.
1424
+ scheme: Optional[str]
1425
+ #: Its size in px, or null.
1426
+ size: Optional[ReadDiagramResponsePictureObjectSizeObject]
1427
+ #: The plain-language outline the picture carries, one entry for each line. Empty when the source was read: the source says more.
1428
+ outline: List[str]
1429
+ #: The text painted on the picture, each distinct label once, in painted order. Empty when the source was read.
1430
+ labels: List[str]
1431
+
1432
+
1433
+ # The source of a Plotwork SVG, or why there is none and what to do.
1434
+ ReadDiagramResponse = TypedDict(
1435
+ "ReadDiagramResponse",
1436
+ {
1437
+ # read: the source was found. no-source: the picture carries none. damaged: it carries one that cannot be read back. not-a-picture: the text is not an SVG. refused: the link is not one this tool fetches. unreachable: the link could not be fetched.
1438
+ "status": "Literal[\"read\", \"no-source\", \"damaged\", \"not-a-picture\", \"refused\", \"unreachable\"]",
1439
+ # True when source is set.
1440
+ "hasSource": "bool",
1441
+ # The exact source the picture was drawn from, ready to edit and send to draw_diagram; null when there is none.
1442
+ "source": "Optional[str]",
1443
+ # The diagram kind of the source, or null.
1444
+ "kind": "Optional[str]",
1445
+ # The id of the stored diagram when the picture was published (data-plotwork-id), or null.
1446
+ "id": "Optional[str]",
1447
+ # Where the picture came from: the text that was sent, or the link that was fetched.
1448
+ "from": "Literal[\"text\", \"url\"]",
1449
+ # The check of the source, or null when there is none. It parses the source; draw_diagram also lays it out and returns warnings.
1450
+ "validation": "Optional[ReadDiagramResponseValidationObject]",
1451
+ # What the picture says about itself, or null when the text is not an SVG.
1452
+ "picture": "Optional[ReadDiagramResponsePictureObject]",
1453
+ # What happened, in one sentence.
1454
+ "message": "str",
1455
+ # The next step in one sentence.
1456
+ "next": "str",
1457
+ },
1458
+ )
1459
+
1460
+
1461
+ class RenderInput(TypedDict):
1462
+ """Diagram source and rendering options."""
1463
+
1464
+ #: Diagram source; the first line is the header, such as flow "Title" (draw_diagram lists every kind).
1465
+ source: str
1466
+ #: Color scheme to paint with: light, dark, or auto for one picture that follows the reader's light or dark setting.
1467
+ scheme: NotRequired[Literal["light", "dark", "auto"]]
1468
+ #: Colour theme for this drawing, over the header's theme=.
1469
+ theme: NotRequired[Literal["plotwork", "slate", "ocean", "forest", "sunset", "mono", "contrast"]]
1470
+ #: Prefix for element ids; set it when inlining several diagrams into one page.
1471
+ idPrefix: NotRequired[str]
1472
+ #: Write the source into the SVG metadata so read_diagram can give it back. Set it true when you save the SVG into a repository; anyone with the file can then read the source. Default false.
1473
+ embedSource: NotRequired[bool]
1474
+ #: The repo's plotwork.config.json, if any. Schema: https://docs.plotwork.dev/schemas/plotwork.config.json
1475
+ settings: NotRequired[Dict[str, Any]]
1476
+
1477
+
1478
+ class RenderResponse(TypedDict):
1479
+ """A rendered diagram."""
1480
+
1481
+ #: Self-contained SVG markup with an accessible title and description.
1482
+ svg: str
1483
+ #: The color scheme used.
1484
+ scheme: Literal["light", "dark", "auto"]
1485
+ size: Size
1486
+ warnings: List[Diagnostic]
1487
+
1488
+
1489
+ class RoutedPublish(PublishedOrganisationDiagram):
1490
+ #: The diagram is in an organisation's private library and has no public link.
1491
+ private: Literal[True]
1492
+ organization: PublishOrganization
1493
+ #: Present when the organisation's Publishing setting chose its library for a publish that named no organisation: organisation-default (its members publish there unless they ask for a personal link) or organisation-required (they always do).
1494
+ routedBy: NotRequired[Literal["organisation-default", "organisation-required"]]
1495
+
1496
+
1497
+ class SeriesInput(TypedDict):
1498
+ """Publish the diagram as one part of a series: the parts of one big import, such as an overview and one diagram per group, each published with the same id and its place, the overview first. The portal shows a series as tabs of one diagram and can open it on one board. A part published at a place another diagram of the series holds takes the place. Left out, a diagram's series is left as it is. Optional."""
1499
+
1500
+ #: The series id, the same for every part: letters, digits, - and _, up to 64 characters. It names nothing outside your library or the organisation's.
1501
+ id: str
1502
+ #: The part's place in the series, from 1 (the overview); 0 is the whole import combined into one diagram, at most one a series.
1503
+ index: int
1504
+ #: How many parts the series has. Optional.
1505
+ total: NotRequired[int]
1506
+
1507
+
1508
+ class Size(TypedDict):
1509
+ """Natural size of a rendered diagram in px."""
1510
+
1511
+ #: Width in px.
1512
+ width: int
1513
+ #: Height in px.
1514
+ height: int
1515
+
1516
+
1517
+ class StableLink(TypedDict):
1518
+ """Present only when the publish named an alias: the stable link, now pointing at this diagram."""
1519
+
1520
+ #: The handle for managing the stable link (delete). It is not in its address.
1521
+ id: str
1522
+ #: The name you gave it. Only you see it.
1523
+ alias: str
1524
+ #: The public address, on the CDN host. It shows the diagram the stable link points at now (cached for up to 60 seconds) and never changes. Anyone with it can see the picture.
1525
+ url: str
1526
+ #: The diagram it shows now, or null when that diagram was deleted or expired; the address then answers 404 until you point the link at a diagram again.
1527
+ diagramId: Optional[str]
1528
+ #: When it was made, in milliseconds since the epoch.
1529
+ createdAt: int
1530
+ #: When it was last pointed at a diagram, in milliseconds since the epoch.
1531
+ updatedAt: int
1532
+
1533
+
1534
+ class SuggestDiagramInput(TypedDict):
1535
+ """A request in plain words and optional data to draw from."""
1536
+
1537
+ #: What the picture is for, in plain words, such as "permission matrix for these endpoints and roles" or "how a refund moves between support and billing".
1538
+ request: str
1539
+ #: Optional text to draw from: a pasted table, a list, numbers by period, or notes. Names and numbers in it are used in the starters.
1540
+ data: NotRequired[str]
1541
+
1542
+
1543
+ class SuggestDiagramResponseSuggestionsItem(TypedDict):
1544
+ #: A diagram kind: flow, sequence, schema, git, gantt, class, state, timeline, journey, mindmap, treemap, pie, quadrant, layers, c4, matrix, sankey, xychart, tree, swimlane, requirement, block, packet, kanban, radar, usecase, venn, fishbone, or wardley today. Later versions add kinds, so expect others.
1545
+ kind: str
1546
+ #: The style the starter uses: compare, score, raci, or risk for a matrix, files or org for a tree; null for the kind's only style.
1547
+ style: Optional[str]
1548
+ #: One sentence: why this kind fits.
1549
+ why: str
1550
+ #: high: the text names this kind of picture or its shape fits it exactly. medium: it leans toward it. low: a fallback worth considering.
1551
+ confidence: Literal["high", "medium", "low"]
1552
+ #: A short Plotwork source of this kind that parses without errors: built from the names and numbers in the text where it could find them, otherwise a small example to edit. Replace every placeholder before you draw it.
1553
+ starter: str
1554
+ #: True when the starter uses names or numbers from the text; false when it is the kind's small example.
1555
+ tailored: bool
1556
+ #: The few statements of this kind to write, as syntax. get_diagram_syntax with this kind has them all.
1557
+ statements: List[str]
1558
+
1559
+
1560
+ class SuggestDiagramResponse(TypedDict):
1561
+ """The diagram kinds that fit a request, best first, each with a starter source."""
1562
+
1563
+ #: The request that was read.
1564
+ request: str
1565
+ #: Up to 3, best first, one for each kind and style.
1566
+ suggestions: List[SuggestDiagramResponseSuggestionsItem]
1567
+ #: Present when the data is, or the request names, a file import_source reads (sql, openapi, compose, terraform, and so on): call import_source with this format and the file's text instead of editing a starter.
1568
+ importFormat: NotRequired[str]
1569
+ #: The next step in one sentence.
1570
+ next: str
1571
+
1572
+
1573
+ class SyncMarkdownInput(TypedDict):
1574
+ """A Markdown document and how to turn its diagram fences into pictures."""
1575
+
1576
+ #: The whole Markdown document, exactly as it is on disk, with its line endings. Up to 10000000 characters.
1577
+ markdown: str
1578
+ #: Where the document lives, relative to the repository root, with forward slashes, for example docs/guide.md. Picture links and file paths are worked out from it.
1579
+ documentPath: str
1580
+ #: The directory for the SVG files, relative to the repository root. The default is assets/diagrams next to the document.
1581
+ assetsDir: NotRequired[str]
1582
+ #: Text put in front of every picture file name, for documents that share one assets directory. By default a titled diagram is named from its title and an untitled one from the document name.
1583
+ prefix: NotRequired[str]
1584
+ #: When true, every ```mermaid fence that can be converted is replaced by a ```diagram fence first, then drawn. Fences that cannot be converted are left exactly as they were and reported.
1585
+ convertMermaid: NotRequired[bool]
1586
+ #: sync (the default) returns the rewritten document and the files to write. check changes nothing: it only reports whether a picture is stale or a fence would convert.
1587
+ mode: NotRequired[Literal["sync", "check"]]
1588
+ #: inline (the default) returns each SVG file with its content. none returns each with path, bytes, sha256, and viewUrl instead, so the answer stays small.
1589
+ files: NotRequired[Literal["inline", "none"]]
1590
+ #: Which page of files to return, from 1; pictures are paged in document order, a light and a dark file together.
1591
+ page: NotRequired[int]
1592
+ #: Pictures per page, at most 30. Setting page or pageSize turns paging on.
1593
+ pageSize: NotRequired[int]
1594
+ #: The repo's plotwork.config.json, if any. Schema: https://docs.plotwork.dev/schemas/plotwork.config.json
1595
+ settings: NotRequired[Dict[str, Any]]
1596
+
1597
+
1598
+ class SyncMarkdownResponseFilesItem(TypedDict):
1599
+ #: Where to write the file, relative to the repository root.
1600
+ path: str
1601
+ #: The file contents; absent when files is none.
1602
+ content: NotRequired[str]
1603
+ #: How content is encoded. Always utf8: the files are SVG text.
1604
+ encoding: Literal["utf8"]
1605
+ #: Only when files is none: the size of the file in bytes.
1606
+ bytes: NotRequired[int]
1607
+ #: Only when files is none: the SHA-256 of the content, in hex, to check a file fetched later.
1608
+ sha256: NotRequired[str]
1609
+ #: Only when files is none: a link that shows this diagram in a browser.
1610
+ viewUrl: NotRequired[str]
1611
+
1612
+
1613
+ class SyncMarkdownResponseReportItem(TypedDict):
1614
+ #: The picture id, which names the SVG files; null for a fence that has none (a mermaid fence that was not converted).
1615
+ id: Optional[str]
1616
+ #: diagram for a fence that was already Plotwork, mermaid for one that came from Mermaid.
1617
+ source: Literal["diagram", "mermaid"]
1618
+ #: The diagram kind, or null when it could not be read.
1619
+ kind: Optional[str]
1620
+ #: The 1-based line of the opening fence in the document that was sent.
1621
+ line: int
1622
+ #: synced: the picture was written or refreshed. converted: a mermaid fence became a diagram fence and was drawn. unchanged: the picture was already current. skipped: a cap stopped it, see message. failed: it has errors, the fence is left as it was.
1623
+ status: Literal["synced", "converted", "unchanged", "skipped", "failed"]
1624
+ #: Errors and warnings, with line numbers counted in the document that was sent. For a converted fence they point at the Mermaid lines.
1625
+ diagnostics: List[Diagnostic]
1626
+ #: A plain sentence when something needs saying, such as why a fence was skipped; otherwise null.
1627
+ message: Optional[str]
1628
+
1629
+
1630
+ class SyncMarkdownResponseSummary(TypedDict):
1631
+ #: Fences handled: synced, converted, unchanged, skipped, and failed together.
1632
+ diagrams: int
1633
+ synced: int
1634
+ converted: int
1635
+ unchanged: int
1636
+ skipped: int
1637
+ failed: int
1638
+ #: Mermaid fences left alone because convertMermaid was false.
1639
+ mermaidIgnored: int
1640
+ #: Files to write.
1641
+ files: int
1642
+ #: Bytes in the returned document and files together.
1643
+ outputBytes: int
1644
+
1645
+
1646
+ class SyncMarkdownResponseCaps(TypedDict):
1647
+ #: True when a cap stopped some of the work. Nothing is cut silently: see messages.
1648
+ hit: bool
1649
+ #: One plain sentence per cap that was hit, saying what was skipped and what to do.
1650
+ messages: List[str]
1651
+ #: Most fences handled in one call.
1652
+ maxDiagrams: int
1653
+ #: Most bytes in the returned document and files together.
1654
+ maxOutputBytes: int
1655
+
1656
+
1657
+ class SyncMarkdownResponsePages(TypedDict):
1658
+ """Present when page or pageSize was sent: which pictures files holds, and the next page."""
1659
+
1660
+ page: int
1661
+ pageSize: int
1662
+ #: Pages in all.
1663
+ pages: int
1664
+ #: Pictures in all, each one file or a light and a dark one.
1665
+ pictures: int
1666
+ #: The page to ask for next, or null on the last one.
1667
+ nextPage: Optional[int]
1668
+
1669
+
1670
+ class SyncMarkdownResponse(TypedDict):
1671
+ """The result of turning a document's diagram fences into pictures."""
1672
+
1673
+ #: The mode that ran.
1674
+ mode: Literal["sync", "check"]
1675
+ #: The document to write back: every diagram fence wrapped in its collapsed source section, with the picture block and text description under it, and everything else unchanged. In check mode this is the document that was sent.
1676
+ markdown: str
1677
+ #: True when the document or a file differs from what was sent. In check mode this says the pictures are stale or a fence would convert.
1678
+ changed: bool
1679
+ #: The SVG files to write for each picture that was refreshed (one, or light and dark with schemes light-and-dark), with paths relative to the repository root. Empty in check mode. A picture that was already current has no files.
1680
+ files: List[SyncMarkdownResponseFilesItem]
1681
+ #: One entry per fence handled, in document order.
1682
+ report: List[SyncMarkdownResponseReportItem]
1683
+ summary: SyncMarkdownResponseSummary
1684
+ caps: SyncMarkdownResponseCaps
1685
+ #: Present when page or pageSize was sent: which pictures files holds, and the next page.
1686
+ pages: NotRequired[SyncMarkdownResponsePages]
1687
+ #: The next step in one sentence.
1688
+ next: str
1689
+
1690
+
1691
+ class SyntaxResponseKindDetailsItemStatementsItem(TypedDict):
1692
+ #: The statement with its parts named, such as: task <id> "Name" days=<n>.
1693
+ syntax: str
1694
+ #: What the statement does, and what it needs.
1695
+ meaning: str
1696
+ #: One line that parses.
1697
+ example: str
1698
+
1699
+
1700
+ class SyntaxResponseKindDetailsItemLimitsItem(TypedDict):
1701
+ #: What is counted, such as tasks.
1702
+ name: str
1703
+ #: More than this in one diagram draws a quality warning.
1704
+ value: int
1705
+ #: Why the limit exists and what to do past it.
1706
+ meaning: str
1707
+
1708
+
1709
+ class SyntaxResponseKindDetailsItem(TypedDict):
1710
+ #: A diagram kind: flow, sequence, schema, git, gantt, class, state, timeline, journey, mindmap, treemap, pie, quadrant, layers, c4, matrix, sankey, xychart, tree, swimlane, requirement, block, packet, kanban, radar, usecase, venn, fishbone, or wardley today. Later versions add kinds, so expect others.
1711
+ kind: str
1712
+ #: The header line, such as flow "Title".
1713
+ header: str
1714
+ #: What the kind's diagrams are called in a sentence, such as flow or database schema.
1715
+ noun: str
1716
+ #: One sentence: what the kind draws.
1717
+ summary: str
1718
+ #: The statements the kind adds to the header. Empty for a kind whose language the shared tables of this reference already describe.
1719
+ statements: NotRequired[List[SyntaxResponseKindDetailsItemStatementsItem]]
1720
+ #: The quality thresholds the kind adds. Empty for a kind whose limits are in the limits table of this reference.
1721
+ limits: NotRequired[List[SyntaxResponseKindDetailsItemLimitsItem]]
1722
+ #: Only in the overview, where statements and limits are left out: what a call with this kind returns that the overview does not, and how to ask for it.
1723
+ more: NotRequired[str]
1724
+
1725
+
1726
+ class SyntaxResponseNodeTypesItem(TypedDict):
1727
+ type: Literal["person", "agent", "client", "service", "gateway", "function", "database", "cache", "queue", "storage", "identity", "secret", "external", "step", "decision", "terminal"]
1728
+ #: How the node is drawn.
1729
+ shape: Literal["card", "pill"]
1730
+ #: True when the card is filled and outlined in its tone, as for decisions.
1731
+ isTinted: bool
1732
+ #: Color family used when tone= is not set.
1733
+ defaultTone: Literal["neutral", "blue", "violet", "aqua", "orange", "green", "amber", "red"]
1734
+ #: Icon used when icon= is not set, or null for none.
1735
+ defaultIcon: Optional[str]
1736
+ #: True when the outline is dashed, as for external systems.
1737
+ isDashed: bool
1738
+ #: True when a sequence diagram actor may use this type.
1739
+ usableAsActor: bool
1740
+
1741
+
1742
+ class SyntaxResponseArrowsItem(TypedDict):
1743
+ #: The arrow as written in source.
1744
+ token: str
1745
+ #: How the line is drawn.
1746
+ line: Literal["solid", "dashed", "dotted"]
1747
+ #: Which ends carry an arrowhead.
1748
+ heads: Literal["end", "both", "none"]
1749
+ #: What the arrow says, so the right one is chosen.
1750
+ meaning: str
1751
+
1752
+
1753
+ class SyntaxResponseIconProvidersItem(TypedDict):
1754
+ #: Icon set prefix, as in aws:lambda.
1755
+ set: Literal["aws", "gcp", "azure", "alibaba", "oci", "ibm", "cloudflare", "digitalocean", "vercel"]
1756
+ #: The provider the set stands for.
1757
+ title: str
1758
+ #: Icons in the set: the provider itself (set:cloud) and its products.
1759
+ iconCount: int
1760
+ #: One icon of the set that is bundled, for example aws:lambda.
1761
+ example: str
1762
+
1763
+
1764
+ class SyntaxResponseOverlay(TypedDict):
1765
+ """A dashed frame around members that may sit in different groups; it owns none of them."""
1766
+
1767
+ #: Options an overlay statement takes after its name, as in: overlay id "Name" members=a,b type=scale-group
1768
+ options: List[str]
1769
+ #: How an overlay is always drawn.
1770
+ frame: Literal["solid", "dashed", "dotted"]
1771
+ #: What an overlay is for, so it is used where a group would be wrong.
1772
+ meaning: str
1773
+
1774
+
1775
+ class SyntaxResponseGroupExample(TypedDict):
1776
+ """A complete architecture diagram: typed groups nested by provider, a provider icon on every node, stack marks, and a dotted edge. Copy and edit it."""
1777
+
1778
+ #: A diagram kind: flow, sequence, schema, git, gantt, class, state, timeline, journey, mindmap, treemap, pie, quadrant, layers, c4, matrix, sankey, xychart, tree, swimlane, requirement, block, packet, kanban, radar, usecase, venn, fishbone, or wardley today. Later versions add kinds, so expect others.
1779
+ kind: str
1780
+ title: str
1781
+ #: A complete diagram that is checked by the build; copy and edit it.
1782
+ source: str
1783
+
1784
+
1785
+ class SyntaxResponseGroupTypesItem(TypedDict):
1786
+ #: Value for type= on a group.
1787
+ type: Literal["cloud", "account", "region", "zone", "network", "subnet", "public-subnet", "private-subnet", "management-subnet", "isolated-subnet", "resource-group", "cluster", "scale-group", "service-plan", "web-tier", "app-tier", "data-tier", "storage-account", "messaging", "edge", "security", "identity-boundary", "trust-boundary", "observability", "ci-cd", "environment", "cloud-boundary", "on-premises", "client-side", "external-systems"]
1788
+ #: What the frame is called in the text description.
1789
+ title: str
1790
+ #: What the author means by this type, so the right one is chosen.
1791
+ meaning: str
1792
+ #: Color family the frame and tab get when tone= is not set.
1793
+ tone: Literal["neutral", "blue", "violet", "aqua", "orange", "green", "amber", "red"]
1794
+ #: How the outline is drawn.
1795
+ frame: Literal["solid", "dashed", "dotted"]
1796
+ #: Icon in the corner tab when the group has no provider.
1797
+ icon: str
1798
+ #: Icon in the corner tab for each provider whose icon differs from the generic one, keyed by provider set.
1799
+ providerIcons: Dict[str, str]
1800
+
1801
+
1802
+ class SyntaxResponseGroup(TypedDict):
1803
+ """How a flow group looks and what it accepts; its corner tab shows its icon and name."""
1804
+
1805
+ #: Options a group statement takes after its name, as in: group id "Name" type=region provider=aws {
1806
+ options: List[str]
1807
+ #: Color family of a group with no type when tone= is not set.
1808
+ defaultTone: Literal["neutral", "blue", "violet", "aqua", "orange", "green", "amber", "red"]
1809
+ #: A complete architecture diagram: typed groups nested by provider, a provider icon on every node, stack marks, and a dotted edge. Copy and edit it.
1810
+ example: SyntaxResponseGroupExample
1811
+ #: Every group type. A type gives the group a default icon, tone, frame style, and a shade that deepens with nesting; icon= and tone= override them.
1812
+ types: List[SyntaxResponseGroupTypesItem]
1813
+
1814
+
1815
+ class SyntaxResponseFlowLookItem(TypedDict):
1816
+ #: The option or statement as written, such as spacing or align.
1817
+ key: str
1818
+ #: header: on the flow header line. line: on an edge. statement: a line of its own.
1819
+ scope: Literal["header", "line", "statement"]
1820
+ #: What it takes.
1821
+ values: str
1822
+ #: What it does.
1823
+ meaning: str
1824
+ #: One line that parses.
1825
+ example: str
1826
+
1827
+
1828
+ class SyntaxResponseLineOptionsItem(TypedDict):
1829
+ #: The option as written, such as animate or step.
1830
+ key: str
1831
+ #: header: on the flow or sequence header line. line: on an edge or a message.
1832
+ scope: Literal["header", "line"]
1833
+ #: What the option takes.
1834
+ values: str
1835
+ #: What it does, and the cases where it is refused.
1836
+ meaning: str
1837
+ #: One line that parses.
1838
+ example: str
1839
+
1840
+
1841
+ class SyntaxResponseLabelIconsItem(TypedDict):
1842
+ #: An edge label that gets an icon automatically, matched whole and ignoring case.
1843
+ label: str
1844
+ #: The icon the label gets.
1845
+ icon: str
1846
+
1847
+
1848
+ class SyntaxResponseVerbIconsItem(TypedDict):
1849
+ #: The icon drawn in the label.
1850
+ icon: str
1851
+ #: Phrases that draw it: the whole label, or its first words followed by what is acted on ("reads orders").
1852
+ words: List[str]
1853
+
1854
+
1855
+ class SyntaxResponseAutoIcons(TypedDict):
1856
+ """Items with no icon= get the icon their label names for certain (a brand, a cloud product, a common role). icon=none keeps one item plain; icons=off on the header keeps them all plain."""
1857
+
1858
+ #: The header option: icons.
1859
+ key: str
1860
+ #: What it takes.
1861
+ values: str
1862
+ #: What it does, and how one item opts out.
1863
+ meaning: str
1864
+ #: One header line that parses.
1865
+ example: str
1866
+
1867
+
1868
+ class SyntaxResponseRoleIconsItem(TypedDict):
1869
+ #: The icon drawn.
1870
+ icon: str
1871
+ #: Whole words of a label of three words or fewer that draw it.
1872
+ words: List[str]
1873
+
1874
+
1875
+ class SyntaxResponseStatusIconsItem(TypedDict):
1876
+ #: Value for icon=, such as status:success.
1877
+ ref: str
1878
+ #: Color the icon is always drawn in, whatever tone its owner has.
1879
+ tone: Literal["neutral", "blue", "violet", "aqua", "orange", "green", "amber", "red"]
1880
+ #: What the icon says, so the right one is chosen.
1881
+ meaning: str
1882
+
1883
+
1884
+ class SyntaxResponseLimits(TypedDict):
1885
+ """Bounds and quality thresholds."""
1886
+
1887
+ maxSourceLength: int
1888
+ #: Quality lint: more nodes than this warns, for a diagram with no groups.
1889
+ maxFlowNodes: int
1890
+ #: Each group of a flow diagram raises the node limit by this many.
1891
+ nodesPerGroup: int
1892
+ #: The node limit never rises above this, whatever the groups.
1893
+ maxFlowNodesCeiling: int
1894
+ maxSchemaTables: int
1895
+ maxSequenceActors: int
1896
+ #: More numbered steps than this in one diagram warns (W200).
1897
+ maxNumberedSteps: int
1898
+ #: Most technology marks a node carries in stack=.
1899
+ maxStackMarks: int
1900
+ #: Column width in px that diagrams are checked against.
1901
+ targetWidth: int
1902
+
1903
+
1904
+ class SyntaxResponseEditing(TypedDict):
1905
+ """How to edit an existing Plotwork SVG: read it back with read_diagram, change the source, draw it, and save or publish it again."""
1906
+
1907
+ #: In order: how to change a diagram that already exists as a Plotwork SVG, a hosted link or a file in the repository.
1908
+ steps: List[str]
1909
+ #: When to set embedSource true on draw_diagram or render_diagram, that publish_diagram embeds the source unless it is false, and what it means for who can read the source.
1910
+ embedSource: str
1911
+
1912
+
1913
+ class SyntaxResponseDiagnosticCodesItem(TypedDict):
1914
+ #: Identifier of the code.
1915
+ name: str
1916
+ #: The code to branch on, such as E120.
1917
+ code: str
1918
+ severity: Literal["error", "warning"]
1919
+
1920
+
1921
+ class SyntaxResponseExamplesItem(TypedDict):
1922
+ #: A diagram kind: flow, sequence, schema, git, gantt, class, state, timeline, journey, mindmap, treemap, pie, quadrant, layers, c4, matrix, sankey, xychart, tree, swimlane, requirement, block, packet, kanban, radar, usecase, venn, fishbone, or wardley today. Later versions add kinds, so expect others.
1923
+ kind: str
1924
+ title: str
1925
+ #: A complete diagram that is checked by the build; copy and edit it.
1926
+ source: str
1927
+
1928
+
1929
+ class SyntaxResponseImportFormatsItem(TypedDict):
1930
+ #: The format, as import_source takes it.
1931
+ format: str
1932
+ #: What it reads.
1933
+ reads: str
1934
+ #: The diagram it draws.
1935
+ draws: str
1936
+ #: The options it takes.
1937
+ options: str
1938
+
1939
+
1940
+ class SyntaxResponse(TypedDict):
1941
+ """The diagram language for one scope: the overview, or one kind in full."""
1942
+
1943
+ #: What this answer is: overview, a topic (import-formats, icon-words), or the kind it describes in full (flow, sequence, schema, git, gantt, class, state, timeline, journey, mindmap, treemap, pie, quadrant, layers, c4, matrix, sankey, xychart, tree, swimlane, requirement, block, packet, kanban, radar, usecase, venn, fishbone, or wardley today; later versions add kinds, so expect others).
1944
+ answer: str
1945
+ #: In plain words: what this answer holds and how to get the rest.
1946
+ howToGetAKind: str
1947
+ #: Header keywords: the first line names the kind.
1948
+ kinds: List[str]
1949
+ #: The overview lists every kind in the order of kinds, with its header, noun, and summary, and a pointer in more. A kind answer holds that kind alone, in full.
1950
+ kindDetails: List[SyntaxResponseKindDetailsItem]
1951
+ nodeTypes: NotRequired[List[SyntaxResponseNodeTypesItem]]
1952
+ tones: NotRequired[List[Literal["neutral", "blue", "violet", "aqua", "orange", "green", "amber", "red"]]]
1953
+ #: Values for direction= on a flow header.
1954
+ directions: NotRequired[List[Literal["auto", "right", "down", "left", "up"]]]
1955
+ arrows: NotRequired[List[SyntaxResponseArrowsItem]]
1956
+ #: Frames a sequence diagram can wrap around messages.
1957
+ blockTypes: NotRequired[List[Literal["alt", "opt", "loop", "par"]]]
1958
+ #: Flags a schema column row may carry.
1959
+ columnFlags: NotRequired[List[Literal["pk", "fk", "unique", "nullable"]]]
1960
+ #: The color schemes a picture is drawn in, chosen where it is drawn (a tool's scheme argument), not in the source.
1961
+ schemes: NotRequired[List[Literal["light", "dark"]]]
1962
+ #: Colour themes: theme=<name> on the header of any kind, such as flow "Title" theme=ocean. plotwork is the default; contrast reaches WCAG AAA. Each holds light and dark, and tones keep their meaning. An organisation's brand, on the hosted service, wins over it.
1963
+ themes: NotRequired[List[Literal["plotwork", "slate", "ocean", "forest", "sunset", "mono", "contrast"]]]
1964
+ iconSets: NotRequired[List[Literal["lucide", "simple", "status", "aws", "gcp", "azure", "alibaba", "oci", "ibm", "cloudflare", "digitalocean", "vercel", "k8s"]]]
1965
+ #: Number of bundled icons; use search_icons to find names.
1966
+ iconCount: NotRequired[int]
1967
+ #: Cloud and platform providers, each an icon set holding the provider (set:cloud) and its products.
1968
+ iconProviders: NotRequired[List[SyntaxResponseIconProvidersItem]]
1969
+ #: A dashed frame around members that may sit in different groups; it owns none of them.
1970
+ overlay: NotRequired[SyntaxResponseOverlay]
1971
+ #: How a flow group looks and what it accepts; its corner tab shows its icon and name.
1972
+ group: NotRequired[SyntaxResponseGroup]
1973
+ #: Options that shape a flow diagram: spacing=, edges= and fit= on the header, main=on on an edge, and the align statement.
1974
+ flowLook: NotRequired[List[SyntaxResponseFlowLookItem]]
1975
+ #: Options that animate a line (animate=on makes dashes travel toward the arrowhead) or number the steps of a flow or sequence (numbered=on, start=, and step= on a line). All are off by default.
1976
+ lineOptions: NotRequired[List[SyntaxResponseLineOptionsItem]]
1977
+ #: Edge labels that name an outcome and get its status icon automatically (a tick for yes, a cross for no, a clock for expired); one per icon in a kind answer, every one in topic icon-words. icon=none on the edge removes it.
1978
+ labelIcons: NotRequired[List[SyntaxResponseLabelIconsItem]]
1979
+ #: The icons a flow edge label draws when it names a relationship with a verb. icon= on the edge wins, icon=none removes it, and icons=off on the header turns them all off.
1980
+ verbIcons: NotRequired[List[SyntaxResponseVerbIconsItem]]
1981
+ #: How to make a flow diagram look finished: verbs on arrows, role= on lines that mean something, typed groups, product names.
1982
+ style: NotRequired[List[str]]
1983
+ #: Items with no icon= get the icon their label names for certain (a brand, a cloud product, a common role). icon=none keeps one item plain; icons=off on the header keeps them all plain.
1984
+ autoIcons: NotRequired[SyntaxResponseAutoIcons]
1985
+ #: The plain icons for common roles, drawn on flow and sequence service and external items, C4 elements, layers blocks, mind map topics, and swimlane lanes. The last role word of the label wins.
1986
+ roleIcons: NotRequired[List[SyntaxResponseRoleIconsItem]]
1987
+ #: Colored status and outcome icons: a green check, a red X, and so on.
1988
+ statusIcons: NotRequired[List[SyntaxResponseStatusIconsItem]]
1989
+ #: Bounds and quality thresholds.
1990
+ limits: NotRequired[SyntaxResponseLimits]
1991
+ #: How to edit an existing Plotwork SVG: read it back with read_diagram, change the source, draw it, and save or publish it again.
1992
+ editing: NotRequired[SyntaxResponseEditing]
1993
+ diagnosticCodes: NotRequired[List[SyntaxResponseDiagnosticCodesItem]]
1994
+ #: Tested examples: the overview holds the ones for the kinds the shared tables describe in full, a kind answer holds its own.
1995
+ examples: List[SyntaxResponseExamplesItem]
1996
+ #: Only for topic import-formats: every format import_source reads, a line each.
1997
+ importFormats: NotRequired[List[SyntaxResponseImportFormatsItem]]
1998
+
1999
+
2000
+ class ValidateResponseSizeObject(TypedDict):
2001
+ """Natural rendered size, or null when invalid."""
2002
+
2003
+ #: Width in px.
2004
+ width: int
2005
+ #: Height in px.
2006
+ height: int
2007
+
2008
+
2009
+ class ValidateResponseQuality(TypedDict):
2010
+ """How clean the laid-out diagram looks, with up to three changes; absent when invalid."""
2011
+
2012
+ #: 0 to 100; 100 is a picture with nothing to fix. The same diagram always gets the same score.
2013
+ score: int
2014
+ #: clean is 85 or more, fair 60 or more, cluttered below.
2015
+ grade: Literal["clean", "fair", "cluttered"]
2016
+ #: What the score is made from: crossings, lineOverBox, labelOverlaps, smallestTextPx (in an 880px column), aspectRatio, emptySpace (0 to 1), longestLine (px), detour (1 is straight), the counts of boxes, lines, labels, series, and slices, and any measure the kind adds.
2017
+ measures: Dict[str, float]
2018
+ #: Up to three changes, the one worth most first, each naming the statement or option to edit.
2019
+ hints: List[str]
2020
+ #: The grade, the score, and the first hint in one line.
2021
+ line: str
2022
+
2023
+
2024
+ class ValidateResponse(TypedDict):
2025
+ """Result of checking diagram source."""
2026
+
2027
+ #: True when there are no errors; warnings do not make a diagram invalid.
2028
+ valid: bool
2029
+ #: The diagram kind, or null when the header could not be read.
2030
+ kind: Optional[str]
2031
+ #: Every error found in one pass, so they can be fixed together.
2032
+ errors: List[Diagnostic]
2033
+ #: Quality warnings for a valid diagram, such as too dense or too wide.
2034
+ warnings: List[Diagnostic]
2035
+ #: One-line description of the diagram, or null when invalid.
2036
+ summary: Optional[str]
2037
+ #: Natural rendered size, or null when invalid.
2038
+ size: Optional[ValidateResponseSizeObject]
2039
+ #: How clean the laid-out diagram looks, with up to three changes; absent when invalid.
2040
+ quality: NotRequired[ValidateResponseQuality]
2041
+ #: Information notes, such as an icon alias resolved to a real icon; absent when there is none.
2042
+ notices: NotRequired[List[Note]]
2043
+
2044
+
2045
+ # A diagram's classification label: `public`, `internal` (the default, and what a diagram published before labels reads as) or `confidential`. Confidential is never shared publicly; under "Share only diagrams labelled Public" only public is.
2046
+ Classification = Literal["public", "internal", "confidential"]
2047
+
2048
+
2049
+ # Its place in a series (the parts of one split import), or null when it is in none.
2050
+ DiagramSeries = Optional[DiagramSeriesObject]
2051
+
2052
+
2053
+ # Its public link while the organisation shares it, or null. Only a diagram someone chose to share has one.
2054
+ OrganisationDiagramShare = Optional[OrganisationDiagramShareObject]
2055
+
2056
+
2057
+ PublishAnswer = Union[PublishedDiagram, RoutedPublish]
2058
+
2059
+
2060
+ class DiagramsOperations:
2061
+ """The ``diagrams`` operations."""
2062
+
2063
+ def __init__(self, transport: Transport) -> None:
2064
+ self._transport = transport
2065
+
2066
+ def compare(self, **body: Unpack[CompareDiagramsInput]) -> CompareDiagramsResponse:
2067
+ """Say what changed between two versions of a diagram. ``POST /v1/diagrams/compare``"""
2068
+ return cast("CompareDiagramsResponse", self._transport.request("POST", "/v1/diagrams/compare", idempotent=True, body=body))
2069
+
2070
+ def convert_mermaid(self, **body: Unpack[ConvertMermaidInput]) -> ConvertMermaidResponse:
2071
+ """Convert one Mermaid diagram. ``POST /v1/diagrams/convert-mermaid``"""
2072
+ return cast("ConvertMermaidResponse", self._transport.request("POST", "/v1/diagrams/convert-mermaid", idempotent=True, body=body))
2073
+
2074
+ def draw(self, **body: Unpack[DrawDiagramInput]) -> DrawDiagramResponse:
2075
+ """Check, describe, and draw a diagram. ``POST /v1/diagrams/draw``"""
2076
+ return cast("DrawDiagramResponse", self._transport.request("POST", "/v1/diagrams/draw", idempotent=True, body=body))
2077
+
2078
+ def edit(self, **body: Unpack[EditDiagramInput]) -> EditDiagramResponse:
2079
+ """Change diagram source with small typed operations. ``POST /v1/diagrams/edit``"""
2080
+ return cast("EditDiagramResponse", self._transport.request("POST", "/v1/diagrams/edit", idempotent=True, body=body))
2081
+
2082
+ def outline(self, **body: Unpack[DiagramSourceInput]) -> OutlineResponse:
2083
+ """Describe diagram source as text. ``POST /v1/diagrams/outline``"""
2084
+ return cast("OutlineResponse", self._transport.request("POST", "/v1/diagrams/outline", idempotent=True, body=body))
2085
+
2086
+ def publish(self, **body: Unpack[PublishDiagramBody]) -> PublishAnswer:
2087
+ """Publish a diagram and get a link. ``POST /v1/diagrams/publish``"""
2088
+ return cast("PublishAnswer", self._transport.request("POST", "/v1/diagrams/publish", idempotent=False, body=body))
2089
+
2090
+ def read(self, **body: Unpack[ReadDiagramInput]) -> ReadDiagramResponse:
2091
+ """Read the source back out of a Plotwork SVG. ``POST /v1/diagrams/read``"""
2092
+ return cast("ReadDiagramResponse", self._transport.request("POST", "/v1/diagrams/read", idempotent=True, body=body))
2093
+
2094
+ def render(self, **body: Unpack[RenderInput]) -> RenderResponse:
2095
+ """Render diagram source to SVG. ``POST /v1/diagrams/render``"""
2096
+ return cast("RenderResponse", self._transport.request("POST", "/v1/diagrams/render", idempotent=True, body=body))
2097
+
2098
+ def suggest(self, **body: Unpack[SuggestDiagramInput]) -> SuggestDiagramResponse:
2099
+ """Choose the kind of diagram for a request. ``POST /v1/diagrams/suggest``"""
2100
+ return cast("SuggestDiagramResponse", self._transport.request("POST", "/v1/diagrams/suggest", idempotent=True, body=body))
2101
+
2102
+ def validate(self, **body: Unpack[DiagramSourceInput]) -> ValidateResponse:
2103
+ """Check diagram source. ``POST /v1/diagrams/validate``"""
2104
+ return cast("ValidateResponse", self._transport.request("POST", "/v1/diagrams/validate", idempotent=True, body=body))
2105
+
2106
+
2107
+ class IconsOperations:
2108
+ """The ``icons`` operations."""
2109
+
2110
+ def __init__(self, transport: Transport) -> None:
2111
+ self._transport = transport
2112
+
2113
+ def search(self, *, q: str, limit: Optional[int] = None) -> IconSearchResponse:
2114
+ """Find bundled icon names. ``GET /v1/icons``"""
2115
+ return cast("IconSearchResponse", self._transport.request("GET", "/v1/icons", idempotent=True, query={"q": q, "limit": limit}))
2116
+
2117
+ def map(self, **body: Unpack[MapIconsInput]) -> MapIconsResponse:
2118
+ """Choose icons for many names at once. ``POST /v1/icons/map``"""
2119
+ return cast("MapIconsResponse", self._transport.request("POST", "/v1/icons/map", idempotent=True, body=body))
2120
+
2121
+
2122
+ class MarkdownOperations:
2123
+ """The ``markdown`` operations."""
2124
+
2125
+ def __init__(self, transport: Transport) -> None:
2126
+ self._transport = transport
2127
+
2128
+ def plan(self, **body: Unpack[PlanDocumentInput]) -> PlanDocumentResponse:
2129
+ """Find the sections of a document a picture would help. ``POST /v1/markdown/plan``"""
2130
+ return cast("PlanDocumentResponse", self._transport.request("POST", "/v1/markdown/plan", idempotent=True, body=body))
2131
+
2132
+ def sync(self, **body: Unpack[SyncMarkdownInput]) -> SyncMarkdownResponse:
2133
+ """Turn a document's diagram fences into pictures. ``POST /v1/markdown/sync``"""
2134
+ return cast("SyncMarkdownResponse", self._transport.request("POST", "/v1/markdown/sync", idempotent=True, body=body))
2135
+
2136
+
2137
+ class PatternsOperations:
2138
+ """The ``patterns`` operations."""
2139
+
2140
+ def __init__(self, transport: Transport) -> None:
2141
+ self._transport = transport
2142
+
2143
+ def check(self, **body: Unpack[CheckPatternInput]) -> CheckPatternResponse:
2144
+ """Check a pattern file. ``POST /v1/patterns/check``"""
2145
+ return cast("CheckPatternResponse", self._transport.request("POST", "/v1/patterns/check", idempotent=True, body=body))
2146
+
2147
+ def draw(self, **body: Unpack[DrawFromPatternInput]) -> DrawFromPatternResponse:
2148
+ """Fill a pattern and draw it. ``POST /v1/patterns/draw``"""
2149
+ return cast("DrawFromPatternResponse", self._transport.request("POST", "/v1/patterns/draw", idempotent=True, body=body))
2150
+
2151
+ def find(self, **body: Unpack[FindPatternInput]) -> FindPatternResponse:
2152
+ """Find a ready-made architecture diagram. ``POST /v1/patterns/find``"""
2153
+ return cast("FindPatternResponse", self._transport.request("POST", "/v1/patterns/find", idempotent=True, body=body))
2154
+
2155
+ def get(self, **body: Unpack[GetPatternInput]) -> GetPatternResponse:
2156
+ """Read a pattern filled for a flavour. ``POST /v1/patterns/get``"""
2157
+ return cast("GetPatternResponse", self._transport.request("POST", "/v1/patterns/get", idempotent=True, body=body))
2158
+
2159
+
2160
+ class Operations:
2161
+ """Every ``/v1`` operation, as groups of methods that each send one request through the transport."""
2162
+
2163
+ def __init__(self, transport: Transport) -> None:
2164
+ self._transport = transport
2165
+ self.diagrams = DiagramsOperations(transport)
2166
+ self.icons = IconsOperations(transport)
2167
+ self.markdown = MarkdownOperations(transport)
2168
+ self.patterns = PatternsOperations(transport)
2169
+
2170
+ def import_source(self, **body: Unpack[ImportSourceInput]) -> ImportSourceResponse:
2171
+ """Turn a file of another format into a diagram. ``POST /v1/import``"""
2172
+ return cast("ImportSourceResponse", self._transport.request("POST", "/v1/import", idempotent=True, body=body))
2173
+
2174
+ def vocabulary(self, *, kind: Optional[Literal["flow", "sequence", "schema", "git", "gantt", "class", "state", "timeline", "journey", "mindmap", "treemap", "pie", "quadrant", "layers", "c4", "matrix", "sankey", "xychart", "tree", "swimlane", "requirement", "block", "packet", "kanban", "radar", "usecase", "venn", "fishbone", "wardley"]] = None, topic: Optional[Literal["import-formats", "icon-words"]] = None) -> SyntaxResponse:
2175
+ """Get the diagram language reference. ``GET /v1/vocabulary``"""
2176
+ return cast("SyntaxResponse", self._transport.request("GET", "/v1/vocabulary", idempotent=True, query={"kind": kind, "topic": topic}))
2177
+
2178
+
2179
+ #: The operations' addresses, for a test or a tool that lists them.
2180
+ OPERATION_PATHS = (
2181
+ "POST /v1/diagrams/compare",
2182
+ "POST /v1/diagrams/convert-mermaid",
2183
+ "POST /v1/diagrams/draw",
2184
+ "POST /v1/diagrams/edit",
2185
+ "POST /v1/diagrams/outline",
2186
+ "POST /v1/diagrams/publish",
2187
+ "POST /v1/diagrams/read",
2188
+ "POST /v1/diagrams/render",
2189
+ "POST /v1/diagrams/suggest",
2190
+ "POST /v1/diagrams/validate",
2191
+ "GET /v1/icons",
2192
+ "POST /v1/icons/map",
2193
+ "POST /v1/import",
2194
+ "POST /v1/markdown/plan",
2195
+ "POST /v1/markdown/sync",
2196
+ "POST /v1/patterns/check",
2197
+ "POST /v1/patterns/draw",
2198
+ "POST /v1/patterns/find",
2199
+ "POST /v1/patterns/get",
2200
+ "GET /v1/vocabulary",
2201
+ )