callman-mcp 0.5.0 → 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (88) hide show
  1. package/CHANGELOG.md +60 -0
  2. package/README.md +20 -10
  3. package/dist/client/api.d.ts +36 -1
  4. package/dist/client/api.d.ts.map +1 -1
  5. package/dist/client/api.js +53 -1
  6. package/dist/client/api.js.map +1 -1
  7. package/dist/client/types.d.ts +40 -0
  8. package/dist/client/types.d.ts.map +1 -1
  9. package/dist/domain/diagram/build.d.ts +17 -17
  10. package/dist/domain/diagram/build.d.ts.map +1 -1
  11. package/dist/domain/diagram/build.js +3 -3
  12. package/dist/domain/diagram/build.js.map +1 -1
  13. package/dist/domain/diagram/layout.d.ts +3 -1
  14. package/dist/domain/diagram/layout.d.ts.map +1 -1
  15. package/dist/domain/diagram/layout.js +9 -3
  16. package/dist/domain/diagram/layout.js.map +1 -1
  17. package/dist/domain/diagram/patch.d.ts +721 -20
  18. package/dist/domain/diagram/patch.d.ts.map +1 -1
  19. package/dist/domain/diagram/patch.js +53 -0
  20. package/dist/domain/diagram/patch.js.map +1 -1
  21. package/dist/domain/diagram/summarize.d.ts +1 -0
  22. package/dist/domain/diagram/summarize.d.ts.map +1 -1
  23. package/dist/domain/diagram/summarize.js +1 -0
  24. package/dist/domain/diagram/summarize.js.map +1 -1
  25. package/dist/domain/scenario/build.d.ts.map +1 -1
  26. package/dist/domain/scenario/build.js +68 -17
  27. package/dist/domain/scenario/build.js.map +1 -1
  28. package/dist/domain/scenario/summarize.d.ts +1 -0
  29. package/dist/domain/scenario/summarize.d.ts.map +1 -1
  30. package/dist/domain/scenario/summarize.js +1 -0
  31. package/dist/domain/scenario/summarize.js.map +1 -1
  32. package/dist/resources/docs/diagramSchema.d.ts +2 -1
  33. package/dist/resources/docs/diagramSchema.d.ts.map +1 -1
  34. package/dist/resources/docs/diagramSchema.js +63 -4
  35. package/dist/resources/docs/diagramSchema.js.map +1 -1
  36. package/dist/resources/docs/overview.d.ts +1 -1
  37. package/dist/resources/docs/overview.d.ts.map +1 -1
  38. package/dist/resources/docs/overview.js +32 -5
  39. package/dist/resources/docs/overview.js.map +1 -1
  40. package/dist/resources/generated/aiPacks.d.ts +1 -1
  41. package/dist/resources/generated/aiPacks.js +4 -4
  42. package/dist/resources/generated/aiPacks.js.map +1 -1
  43. package/dist/resources/index.js +2 -2
  44. package/dist/resources/index.js.map +1 -1
  45. package/dist/server.d.ts +1 -1
  46. package/dist/server.d.ts.map +1 -1
  47. package/dist/server.js +2 -2
  48. package/dist/server.js.map +1 -1
  49. package/dist/tools/catalog.d.ts.map +1 -1
  50. package/dist/tools/catalog.js +11 -0
  51. package/dist/tools/catalog.js.map +1 -1
  52. package/dist/tools/diagrams.d.ts.map +1 -1
  53. package/dist/tools/diagrams.js +331 -42
  54. package/dist/tools/diagrams.js.map +1 -1
  55. package/dist/tools/index.d.ts.map +1 -1
  56. package/dist/tools/index.js +2 -0
  57. package/dist/tools/index.js.map +1 -1
  58. package/dist/tools/lookups.d.ts +5 -1
  59. package/dist/tools/lookups.d.ts.map +1 -1
  60. package/dist/tools/lookups.js +41 -0
  61. package/dist/tools/lookups.js.map +1 -1
  62. package/dist/tools/scenarioAdmin.d.ts +4 -0
  63. package/dist/tools/scenarioAdmin.d.ts.map +1 -0
  64. package/dist/tools/scenarioAdmin.js +142 -0
  65. package/dist/tools/scenarioAdmin.js.map +1 -0
  66. package/dist/tools/scenarios.d.ts +4 -0
  67. package/dist/tools/scenarios.d.ts.map +1 -1
  68. package/dist/tools/scenarios.js +111 -16
  69. package/dist/tools/scenarios.js.map +1 -1
  70. package/dist-cjs/client/api.js +53 -1
  71. package/dist-cjs/domain/diagram/build.js +3 -3
  72. package/dist-cjs/domain/diagram/layout.js +10 -3
  73. package/dist-cjs/domain/diagram/patch.js +54 -1
  74. package/dist-cjs/domain/diagram/summarize.js +1 -0
  75. package/dist-cjs/domain/scenario/build.js +68 -17
  76. package/dist-cjs/domain/scenario/summarize.js +1 -0
  77. package/dist-cjs/resources/docs/diagramSchema.js +65 -5
  78. package/dist-cjs/resources/docs/overview.js +32 -5
  79. package/dist-cjs/resources/generated/aiPacks.js +4 -4
  80. package/dist-cjs/resources/index.js +1 -1
  81. package/dist-cjs/server.js +2 -2
  82. package/dist-cjs/tools/catalog.js +11 -0
  83. package/dist-cjs/tools/diagrams.js +326 -37
  84. package/dist-cjs/tools/index.js +2 -0
  85. package/dist-cjs/tools/lookups.js +46 -1
  86. package/dist-cjs/tools/scenarioAdmin.js +145 -0
  87. package/dist-cjs/tools/scenarios.js +113 -17
  88. package/package.json +3 -3
@@ -1,5 +1,187 @@
1
1
  import { type DiagramDocument, type LayoutDirection } from "callman-core";
2
2
  import { z } from "zod";
3
+ export declare const dbColumnInputSchema: z.ZodObject<{
4
+ id: z.ZodOptional<z.ZodString>;
5
+ name: z.ZodString;
6
+ dataType: z.ZodOptional<z.ZodString>;
7
+ nullable: z.ZodOptional<z.ZodBoolean>;
8
+ primaryKey: z.ZodOptional<z.ZodBoolean>;
9
+ unique: z.ZodOptional<z.ZodBoolean>;
10
+ defaultValue: z.ZodOptional<z.ZodNullable<z.ZodString>>;
11
+ autoIncrement: z.ZodOptional<z.ZodBoolean>;
12
+ comment: z.ZodOptional<z.ZodNullable<z.ZodString>>;
13
+ }, "strict", z.ZodTypeAny, {
14
+ name: string;
15
+ id?: string | undefined;
16
+ unique?: boolean | undefined;
17
+ nullable?: boolean | undefined;
18
+ dataType?: string | undefined;
19
+ primaryKey?: boolean | undefined;
20
+ defaultValue?: string | null | undefined;
21
+ autoIncrement?: boolean | undefined;
22
+ comment?: string | null | undefined;
23
+ }, {
24
+ name: string;
25
+ id?: string | undefined;
26
+ unique?: boolean | undefined;
27
+ nullable?: boolean | undefined;
28
+ dataType?: string | undefined;
29
+ primaryKey?: boolean | undefined;
30
+ defaultValue?: string | null | undefined;
31
+ autoIncrement?: boolean | undefined;
32
+ comment?: string | null | undefined;
33
+ }>;
34
+ export declare const dbTableInputSchema: z.ZodObject<{
35
+ id: z.ZodOptional<z.ZodString>;
36
+ name: z.ZodString;
37
+ schema: z.ZodOptional<z.ZodString>;
38
+ kind: z.ZodOptional<z.ZodEnum<["table", "view", "collection"]>>;
39
+ columns: z.ZodOptional<z.ZodArray<z.ZodObject<{
40
+ id: z.ZodOptional<z.ZodString>;
41
+ name: z.ZodString;
42
+ dataType: z.ZodOptional<z.ZodString>;
43
+ nullable: z.ZodOptional<z.ZodBoolean>;
44
+ primaryKey: z.ZodOptional<z.ZodBoolean>;
45
+ unique: z.ZodOptional<z.ZodBoolean>;
46
+ defaultValue: z.ZodOptional<z.ZodNullable<z.ZodString>>;
47
+ autoIncrement: z.ZodOptional<z.ZodBoolean>;
48
+ comment: z.ZodOptional<z.ZodNullable<z.ZodString>>;
49
+ }, "strict", z.ZodTypeAny, {
50
+ name: string;
51
+ id?: string | undefined;
52
+ unique?: boolean | undefined;
53
+ nullable?: boolean | undefined;
54
+ dataType?: string | undefined;
55
+ primaryKey?: boolean | undefined;
56
+ defaultValue?: string | null | undefined;
57
+ autoIncrement?: boolean | undefined;
58
+ comment?: string | null | undefined;
59
+ }, {
60
+ name: string;
61
+ id?: string | undefined;
62
+ unique?: boolean | undefined;
63
+ nullable?: boolean | undefined;
64
+ dataType?: string | undefined;
65
+ primaryKey?: boolean | undefined;
66
+ defaultValue?: string | null | undefined;
67
+ autoIncrement?: boolean | undefined;
68
+ comment?: string | null | undefined;
69
+ }>, "many">>;
70
+ comment: z.ZodOptional<z.ZodString>;
71
+ }, "strict", z.ZodTypeAny, {
72
+ name: string;
73
+ id?: string | undefined;
74
+ schema?: string | undefined;
75
+ kind?: "collection" | "table" | "view" | undefined;
76
+ columns?: {
77
+ name: string;
78
+ id?: string | undefined;
79
+ unique?: boolean | undefined;
80
+ nullable?: boolean | undefined;
81
+ dataType?: string | undefined;
82
+ primaryKey?: boolean | undefined;
83
+ defaultValue?: string | null | undefined;
84
+ autoIncrement?: boolean | undefined;
85
+ comment?: string | null | undefined;
86
+ }[] | undefined;
87
+ comment?: string | undefined;
88
+ }, {
89
+ name: string;
90
+ id?: string | undefined;
91
+ schema?: string | undefined;
92
+ kind?: "collection" | "table" | "view" | undefined;
93
+ columns?: {
94
+ name: string;
95
+ id?: string | undefined;
96
+ unique?: boolean | undefined;
97
+ nullable?: boolean | undefined;
98
+ dataType?: string | undefined;
99
+ primaryKey?: boolean | undefined;
100
+ defaultValue?: string | null | undefined;
101
+ autoIncrement?: boolean | undefined;
102
+ comment?: string | null | undefined;
103
+ }[] | undefined;
104
+ comment?: string | undefined;
105
+ }>;
106
+ export declare const dbEndSchema: z.ZodUnion<[z.ZodString, z.ZodObject<{
107
+ table: z.ZodString;
108
+ columns: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
109
+ column: z.ZodOptional<z.ZodString>;
110
+ }, "strict", z.ZodTypeAny, {
111
+ table: string;
112
+ column?: string | undefined;
113
+ columns?: string[] | undefined;
114
+ }, {
115
+ table: string;
116
+ column?: string | undefined;
117
+ columns?: string[] | undefined;
118
+ }>]>;
119
+ export declare const dbCardinalitySchema: z.ZodEnum<["1:1", "1:N", "N:1", "N:M"]>;
120
+ export declare const dbRelationshipInputSchema: z.ZodObject<{
121
+ id: z.ZodOptional<z.ZodString>;
122
+ source: z.ZodUnion<[z.ZodString, z.ZodObject<{
123
+ table: z.ZodString;
124
+ columns: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
125
+ column: z.ZodOptional<z.ZodString>;
126
+ }, "strict", z.ZodTypeAny, {
127
+ table: string;
128
+ column?: string | undefined;
129
+ columns?: string[] | undefined;
130
+ }, {
131
+ table: string;
132
+ column?: string | undefined;
133
+ columns?: string[] | undefined;
134
+ }>]>;
135
+ target: z.ZodUnion<[z.ZodString, z.ZodObject<{
136
+ table: z.ZodString;
137
+ columns: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
138
+ column: z.ZodOptional<z.ZodString>;
139
+ }, "strict", z.ZodTypeAny, {
140
+ table: string;
141
+ column?: string | undefined;
142
+ columns?: string[] | undefined;
143
+ }, {
144
+ table: string;
145
+ column?: string | undefined;
146
+ columns?: string[] | undefined;
147
+ }>]>;
148
+ cardinality: z.ZodOptional<z.ZodEnum<["1:1", "1:N", "N:1", "N:M"]>>;
149
+ kind: z.ZodOptional<z.ZodEnum<["foreignKey", "manual"]>>;
150
+ name: z.ZodOptional<z.ZodString>;
151
+ label: z.ZodOptional<z.ZodString>;
152
+ }, "strict", z.ZodTypeAny, {
153
+ source: string | {
154
+ table: string;
155
+ column?: string | undefined;
156
+ columns?: string[] | undefined;
157
+ };
158
+ target: string | {
159
+ table: string;
160
+ column?: string | undefined;
161
+ columns?: string[] | undefined;
162
+ };
163
+ id?: string | undefined;
164
+ name?: string | undefined;
165
+ kind?: "foreignKey" | "manual" | undefined;
166
+ label?: string | undefined;
167
+ cardinality?: "1:1" | "1:N" | "N:1" | "N:M" | undefined;
168
+ }, {
169
+ source: string | {
170
+ table: string;
171
+ column?: string | undefined;
172
+ columns?: string[] | undefined;
173
+ };
174
+ target: string | {
175
+ table: string;
176
+ column?: string | undefined;
177
+ columns?: string[] | undefined;
178
+ };
179
+ id?: string | undefined;
180
+ name?: string | undefined;
181
+ kind?: "foreignKey" | "manual" | undefined;
182
+ label?: string | undefined;
183
+ cardinality?: "1:1" | "1:N" | "N:1" | "N:M" | undefined;
184
+ }>;
3
185
  export declare const diagramPatchOpSchema: z.ZodDiscriminatedUnion<"op", [z.ZodObject<{
4
186
  op: z.ZodLiteral<"addNode">;
5
187
  node: z.ZodObject<{
@@ -729,8 +911,8 @@ export declare const diagramPatchOpSchema: z.ZodDiscriminatedUnion<"op", [z.ZodO
729
911
  token: string;
730
912
  }>]>>;
731
913
  routing: z.ZodOptional<z.ZodEnum<["orthogonal", "straight", "curved", "smart"]>>;
732
- markerEnd: z.ZodOptional<z.ZodEnum<["none", "classic", "classicThin", "open", "block", "diamond", "oval"]>>;
733
- markerStart: z.ZodOptional<z.ZodEnum<["none", "classic", "classicThin", "open", "block", "diamond", "oval"]>>;
914
+ markerEnd: z.ZodOptional<z.ZodEnum<["none", "classic", "classicThin", "open", "block", "diamond", "oval", "one", "many", "zeroOne", "zeroMany"]>>;
915
+ markerStart: z.ZodOptional<z.ZodEnum<["none", "classic", "classicThin", "open", "block", "diamond", "oval", "one", "many", "zeroOne", "zeroMany"]>>;
734
916
  sourceSide: z.ZodOptional<z.ZodEnum<["top", "right", "bottom", "left"]>>;
735
917
  targetSide: z.ZodOptional<z.ZodEnum<["top", "right", "bottom", "left"]>>;
736
918
  data: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
@@ -747,8 +929,8 @@ export declare const diagramPatchOpSchema: z.ZodDiscriminatedUnion<"op", [z.ZodO
747
929
  token: string;
748
930
  } | undefined;
749
931
  routing?: "orthogonal" | "straight" | "curved" | "smart" | undefined;
750
- markerEnd?: "none" | "classic" | "classicThin" | "open" | "block" | "diamond" | "oval" | undefined;
751
- markerStart?: "none" | "classic" | "classicThin" | "open" | "block" | "diamond" | "oval" | undefined;
932
+ markerEnd?: "none" | "many" | "classic" | "classicThin" | "open" | "block" | "diamond" | "oval" | "one" | "zeroOne" | "zeroMany" | undefined;
933
+ markerStart?: "none" | "many" | "classic" | "classicThin" | "open" | "block" | "diamond" | "oval" | "one" | "zeroOne" | "zeroMany" | undefined;
752
934
  sourceSide?: "left" | "right" | "top" | "bottom" | undefined;
753
935
  targetSide?: "left" | "right" | "top" | "bottom" | undefined;
754
936
  }, {
@@ -764,8 +946,8 @@ export declare const diagramPatchOpSchema: z.ZodDiscriminatedUnion<"op", [z.ZodO
764
946
  token: string;
765
947
  } | undefined;
766
948
  routing?: "orthogonal" | "straight" | "curved" | "smart" | undefined;
767
- markerEnd?: "none" | "classic" | "classicThin" | "open" | "block" | "diamond" | "oval" | undefined;
768
- markerStart?: "none" | "classic" | "classicThin" | "open" | "block" | "diamond" | "oval" | undefined;
949
+ markerEnd?: "none" | "many" | "classic" | "classicThin" | "open" | "block" | "diamond" | "oval" | "one" | "zeroOne" | "zeroMany" | undefined;
950
+ markerStart?: "none" | "many" | "classic" | "classicThin" | "open" | "block" | "diamond" | "oval" | "one" | "zeroOne" | "zeroMany" | undefined;
769
951
  sourceSide?: "left" | "right" | "top" | "bottom" | undefined;
770
952
  targetSide?: "left" | "right" | "top" | "bottom" | undefined;
771
953
  }>;
@@ -784,8 +966,8 @@ export declare const diagramPatchOpSchema: z.ZodDiscriminatedUnion<"op", [z.ZodO
784
966
  token: string;
785
967
  } | undefined;
786
968
  routing?: "orthogonal" | "straight" | "curved" | "smart" | undefined;
787
- markerEnd?: "none" | "classic" | "classicThin" | "open" | "block" | "diamond" | "oval" | undefined;
788
- markerStart?: "none" | "classic" | "classicThin" | "open" | "block" | "diamond" | "oval" | undefined;
969
+ markerEnd?: "none" | "many" | "classic" | "classicThin" | "open" | "block" | "diamond" | "oval" | "one" | "zeroOne" | "zeroMany" | undefined;
970
+ markerStart?: "none" | "many" | "classic" | "classicThin" | "open" | "block" | "diamond" | "oval" | "one" | "zeroOne" | "zeroMany" | undefined;
789
971
  sourceSide?: "left" | "right" | "top" | "bottom" | undefined;
790
972
  targetSide?: "left" | "right" | "top" | "bottom" | undefined;
791
973
  };
@@ -804,8 +986,8 @@ export declare const diagramPatchOpSchema: z.ZodDiscriminatedUnion<"op", [z.ZodO
804
986
  token: string;
805
987
  } | undefined;
806
988
  routing?: "orthogonal" | "straight" | "curved" | "smart" | undefined;
807
- markerEnd?: "none" | "classic" | "classicThin" | "open" | "block" | "diamond" | "oval" | undefined;
808
- markerStart?: "none" | "classic" | "classicThin" | "open" | "block" | "diamond" | "oval" | undefined;
989
+ markerEnd?: "none" | "many" | "classic" | "classicThin" | "open" | "block" | "diamond" | "oval" | "one" | "zeroOne" | "zeroMany" | undefined;
990
+ markerStart?: "none" | "many" | "classic" | "classicThin" | "open" | "block" | "diamond" | "oval" | "one" | "zeroOne" | "zeroMany" | undefined;
809
991
  sourceSide?: "left" | "right" | "top" | "bottom" | undefined;
810
992
  targetSide?: "left" | "right" | "top" | "bottom" | undefined;
811
993
  };
@@ -831,8 +1013,8 @@ export declare const diagramPatchOpSchema: z.ZodDiscriminatedUnion<"op", [z.ZodO
831
1013
  token: string;
832
1014
  }>]>>>;
833
1015
  routing: z.ZodOptional<z.ZodEnum<["orthogonal", "straight", "curved", "smart"]>>;
834
- markerEnd: z.ZodOptional<z.ZodEnum<["none", "classic", "classicThin", "open", "block", "diamond", "oval"]>>;
835
- markerStart: z.ZodOptional<z.ZodEnum<["none", "classic", "classicThin", "open", "block", "diamond", "oval"]>>;
1016
+ markerEnd: z.ZodOptional<z.ZodEnum<["none", "classic", "classicThin", "open", "block", "diamond", "oval", "one", "many", "zeroOne", "zeroMany"]>>;
1017
+ markerStart: z.ZodOptional<z.ZodEnum<["none", "classic", "classicThin", "open", "block", "diamond", "oval", "one", "many", "zeroOne", "zeroMany"]>>;
836
1018
  sourceSide: z.ZodOptional<z.ZodNullable<z.ZodEnum<["top", "right", "bottom", "left"]>>>;
837
1019
  targetSide: z.ZodOptional<z.ZodNullable<z.ZodEnum<["top", "right", "bottom", "left"]>>>;
838
1020
  data: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
@@ -848,8 +1030,8 @@ export declare const diagramPatchOpSchema: z.ZodDiscriminatedUnion<"op", [z.ZodO
848
1030
  token: string;
849
1031
  } | null | undefined;
850
1032
  routing?: "orthogonal" | "straight" | "curved" | "smart" | undefined;
851
- markerEnd?: "none" | "classic" | "classicThin" | "open" | "block" | "diamond" | "oval" | undefined;
852
- markerStart?: "none" | "classic" | "classicThin" | "open" | "block" | "diamond" | "oval" | undefined;
1033
+ markerEnd?: "none" | "many" | "classic" | "classicThin" | "open" | "block" | "diamond" | "oval" | "one" | "zeroOne" | "zeroMany" | undefined;
1034
+ markerStart?: "none" | "many" | "classic" | "classicThin" | "open" | "block" | "diamond" | "oval" | "one" | "zeroOne" | "zeroMany" | undefined;
853
1035
  sourceSide?: "left" | "right" | "top" | "bottom" | null | undefined;
854
1036
  targetSide?: "left" | "right" | "top" | "bottom" | null | undefined;
855
1037
  }, {
@@ -864,8 +1046,8 @@ export declare const diagramPatchOpSchema: z.ZodDiscriminatedUnion<"op", [z.ZodO
864
1046
  token: string;
865
1047
  } | null | undefined;
866
1048
  routing?: "orthogonal" | "straight" | "curved" | "smart" | undefined;
867
- markerEnd?: "none" | "classic" | "classicThin" | "open" | "block" | "diamond" | "oval" | undefined;
868
- markerStart?: "none" | "classic" | "classicThin" | "open" | "block" | "diamond" | "oval" | undefined;
1049
+ markerEnd?: "none" | "many" | "classic" | "classicThin" | "open" | "block" | "diamond" | "oval" | "one" | "zeroOne" | "zeroMany" | undefined;
1050
+ markerStart?: "none" | "many" | "classic" | "classicThin" | "open" | "block" | "diamond" | "oval" | "one" | "zeroOne" | "zeroMany" | undefined;
869
1051
  sourceSide?: "left" | "right" | "top" | "bottom" | null | undefined;
870
1052
  targetSide?: "left" | "right" | "top" | "bottom" | null | undefined;
871
1053
  }>;
@@ -884,8 +1066,8 @@ export declare const diagramPatchOpSchema: z.ZodDiscriminatedUnion<"op", [z.ZodO
884
1066
  token: string;
885
1067
  } | null | undefined;
886
1068
  routing?: "orthogonal" | "straight" | "curved" | "smart" | undefined;
887
- markerEnd?: "none" | "classic" | "classicThin" | "open" | "block" | "diamond" | "oval" | undefined;
888
- markerStart?: "none" | "classic" | "classicThin" | "open" | "block" | "diamond" | "oval" | undefined;
1069
+ markerEnd?: "none" | "many" | "classic" | "classicThin" | "open" | "block" | "diamond" | "oval" | "one" | "zeroOne" | "zeroMany" | undefined;
1070
+ markerStart?: "none" | "many" | "classic" | "classicThin" | "open" | "block" | "diamond" | "oval" | "one" | "zeroOne" | "zeroMany" | undefined;
889
1071
  sourceSide?: "left" | "right" | "top" | "bottom" | null | undefined;
890
1072
  targetSide?: "left" | "right" | "top" | "bottom" | null | undefined;
891
1073
  };
@@ -904,8 +1086,8 @@ export declare const diagramPatchOpSchema: z.ZodDiscriminatedUnion<"op", [z.ZodO
904
1086
  token: string;
905
1087
  } | null | undefined;
906
1088
  routing?: "orthogonal" | "straight" | "curved" | "smart" | undefined;
907
- markerEnd?: "none" | "classic" | "classicThin" | "open" | "block" | "diamond" | "oval" | undefined;
908
- markerStart?: "none" | "classic" | "classicThin" | "open" | "block" | "diamond" | "oval" | undefined;
1089
+ markerEnd?: "none" | "many" | "classic" | "classicThin" | "open" | "block" | "diamond" | "oval" | "one" | "zeroOne" | "zeroMany" | undefined;
1090
+ markerStart?: "none" | "many" | "classic" | "classicThin" | "open" | "block" | "diamond" | "oval" | "one" | "zeroOne" | "zeroMany" | undefined;
909
1091
  sourceSide?: "left" | "right" | "top" | "bottom" | null | undefined;
910
1092
  targetSide?: "left" | "right" | "top" | "bottom" | null | undefined;
911
1093
  };
@@ -1100,6 +1282,525 @@ export declare const diagramPatchOpSchema: z.ZodDiscriminatedUnion<"op", [z.ZodO
1100
1282
  scope: "all" | "new";
1101
1283
  op: "relayout";
1102
1284
  direction?: "DOWN" | "RIGHT" | "UP" | "LEFT" | undefined;
1285
+ }>, z.ZodObject<{
1286
+ op: z.ZodLiteral<"addTable">;
1287
+ table: z.ZodObject<{
1288
+ id: z.ZodOptional<z.ZodString>;
1289
+ name: z.ZodString;
1290
+ schema: z.ZodOptional<z.ZodString>;
1291
+ kind: z.ZodOptional<z.ZodEnum<["table", "view", "collection"]>>;
1292
+ columns: z.ZodOptional<z.ZodArray<z.ZodObject<{
1293
+ id: z.ZodOptional<z.ZodString>;
1294
+ name: z.ZodString;
1295
+ dataType: z.ZodOptional<z.ZodString>;
1296
+ nullable: z.ZodOptional<z.ZodBoolean>;
1297
+ primaryKey: z.ZodOptional<z.ZodBoolean>;
1298
+ unique: z.ZodOptional<z.ZodBoolean>;
1299
+ defaultValue: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1300
+ autoIncrement: z.ZodOptional<z.ZodBoolean>;
1301
+ comment: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1302
+ }, "strict", z.ZodTypeAny, {
1303
+ name: string;
1304
+ id?: string | undefined;
1305
+ unique?: boolean | undefined;
1306
+ nullable?: boolean | undefined;
1307
+ dataType?: string | undefined;
1308
+ primaryKey?: boolean | undefined;
1309
+ defaultValue?: string | null | undefined;
1310
+ autoIncrement?: boolean | undefined;
1311
+ comment?: string | null | undefined;
1312
+ }, {
1313
+ name: string;
1314
+ id?: string | undefined;
1315
+ unique?: boolean | undefined;
1316
+ nullable?: boolean | undefined;
1317
+ dataType?: string | undefined;
1318
+ primaryKey?: boolean | undefined;
1319
+ defaultValue?: string | null | undefined;
1320
+ autoIncrement?: boolean | undefined;
1321
+ comment?: string | null | undefined;
1322
+ }>, "many">>;
1323
+ comment: z.ZodOptional<z.ZodString>;
1324
+ }, "strict", z.ZodTypeAny, {
1325
+ name: string;
1326
+ id?: string | undefined;
1327
+ schema?: string | undefined;
1328
+ kind?: "collection" | "table" | "view" | undefined;
1329
+ columns?: {
1330
+ name: string;
1331
+ id?: string | undefined;
1332
+ unique?: boolean | undefined;
1333
+ nullable?: boolean | undefined;
1334
+ dataType?: string | undefined;
1335
+ primaryKey?: boolean | undefined;
1336
+ defaultValue?: string | null | undefined;
1337
+ autoIncrement?: boolean | undefined;
1338
+ comment?: string | null | undefined;
1339
+ }[] | undefined;
1340
+ comment?: string | undefined;
1341
+ }, {
1342
+ name: string;
1343
+ id?: string | undefined;
1344
+ schema?: string | undefined;
1345
+ kind?: "collection" | "table" | "view" | undefined;
1346
+ columns?: {
1347
+ name: string;
1348
+ id?: string | undefined;
1349
+ unique?: boolean | undefined;
1350
+ nullable?: boolean | undefined;
1351
+ dataType?: string | undefined;
1352
+ primaryKey?: boolean | undefined;
1353
+ defaultValue?: string | null | undefined;
1354
+ autoIncrement?: boolean | undefined;
1355
+ comment?: string | null | undefined;
1356
+ }[] | undefined;
1357
+ comment?: string | undefined;
1358
+ }>;
1359
+ position: z.ZodOptional<z.ZodObject<{
1360
+ x: z.ZodNumber;
1361
+ y: z.ZodNumber;
1362
+ }, "strict", z.ZodTypeAny, {
1363
+ x: number;
1364
+ y: number;
1365
+ }, {
1366
+ x: number;
1367
+ y: number;
1368
+ }>>;
1369
+ }, "strict", z.ZodTypeAny, {
1370
+ table: {
1371
+ name: string;
1372
+ id?: string | undefined;
1373
+ schema?: string | undefined;
1374
+ kind?: "collection" | "table" | "view" | undefined;
1375
+ columns?: {
1376
+ name: string;
1377
+ id?: string | undefined;
1378
+ unique?: boolean | undefined;
1379
+ nullable?: boolean | undefined;
1380
+ dataType?: string | undefined;
1381
+ primaryKey?: boolean | undefined;
1382
+ defaultValue?: string | null | undefined;
1383
+ autoIncrement?: boolean | undefined;
1384
+ comment?: string | null | undefined;
1385
+ }[] | undefined;
1386
+ comment?: string | undefined;
1387
+ };
1388
+ op: "addTable";
1389
+ position?: {
1390
+ x: number;
1391
+ y: number;
1392
+ } | undefined;
1393
+ }, {
1394
+ table: {
1395
+ name: string;
1396
+ id?: string | undefined;
1397
+ schema?: string | undefined;
1398
+ kind?: "collection" | "table" | "view" | undefined;
1399
+ columns?: {
1400
+ name: string;
1401
+ id?: string | undefined;
1402
+ unique?: boolean | undefined;
1403
+ nullable?: boolean | undefined;
1404
+ dataType?: string | undefined;
1405
+ primaryKey?: boolean | undefined;
1406
+ defaultValue?: string | null | undefined;
1407
+ autoIncrement?: boolean | undefined;
1408
+ comment?: string | null | undefined;
1409
+ }[] | undefined;
1410
+ comment?: string | undefined;
1411
+ };
1412
+ op: "addTable";
1413
+ position?: {
1414
+ x: number;
1415
+ y: number;
1416
+ } | undefined;
1417
+ }>, z.ZodObject<{
1418
+ op: z.ZodLiteral<"renameTable">;
1419
+ table: z.ZodString;
1420
+ name: z.ZodString;
1421
+ schema: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1422
+ }, "strict", z.ZodTypeAny, {
1423
+ name: string;
1424
+ table: string;
1425
+ op: "renameTable";
1426
+ schema?: string | null | undefined;
1427
+ }, {
1428
+ name: string;
1429
+ table: string;
1430
+ op: "renameTable";
1431
+ schema?: string | null | undefined;
1432
+ }>, z.ZodObject<{
1433
+ op: z.ZodLiteral<"removeTable">;
1434
+ table: z.ZodString;
1435
+ }, "strict", z.ZodTypeAny, {
1436
+ table: string;
1437
+ op: "removeTable";
1438
+ }, {
1439
+ table: string;
1440
+ op: "removeTable";
1441
+ }>, z.ZodObject<{
1442
+ op: z.ZodLiteral<"setTableComment">;
1443
+ table: z.ZodString;
1444
+ comment: z.ZodNullable<z.ZodString>;
1445
+ }, "strict", z.ZodTypeAny, {
1446
+ comment: string | null;
1447
+ table: string;
1448
+ op: "setTableComment";
1449
+ }, {
1450
+ comment: string | null;
1451
+ table: string;
1452
+ op: "setTableComment";
1453
+ }>, z.ZodObject<{
1454
+ op: z.ZodLiteral<"addColumn">;
1455
+ table: z.ZodString;
1456
+ column: z.ZodObject<{
1457
+ id: z.ZodOptional<z.ZodString>;
1458
+ name: z.ZodString;
1459
+ dataType: z.ZodOptional<z.ZodString>;
1460
+ nullable: z.ZodOptional<z.ZodBoolean>;
1461
+ primaryKey: z.ZodOptional<z.ZodBoolean>;
1462
+ unique: z.ZodOptional<z.ZodBoolean>;
1463
+ defaultValue: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1464
+ autoIncrement: z.ZodOptional<z.ZodBoolean>;
1465
+ comment: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1466
+ }, "strict", z.ZodTypeAny, {
1467
+ name: string;
1468
+ id?: string | undefined;
1469
+ unique?: boolean | undefined;
1470
+ nullable?: boolean | undefined;
1471
+ dataType?: string | undefined;
1472
+ primaryKey?: boolean | undefined;
1473
+ defaultValue?: string | null | undefined;
1474
+ autoIncrement?: boolean | undefined;
1475
+ comment?: string | null | undefined;
1476
+ }, {
1477
+ name: string;
1478
+ id?: string | undefined;
1479
+ unique?: boolean | undefined;
1480
+ nullable?: boolean | undefined;
1481
+ dataType?: string | undefined;
1482
+ primaryKey?: boolean | undefined;
1483
+ defaultValue?: string | null | undefined;
1484
+ autoIncrement?: boolean | undefined;
1485
+ comment?: string | null | undefined;
1486
+ }>;
1487
+ after: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1488
+ }, "strict", z.ZodTypeAny, {
1489
+ column: {
1490
+ name: string;
1491
+ id?: string | undefined;
1492
+ unique?: boolean | undefined;
1493
+ nullable?: boolean | undefined;
1494
+ dataType?: string | undefined;
1495
+ primaryKey?: boolean | undefined;
1496
+ defaultValue?: string | null | undefined;
1497
+ autoIncrement?: boolean | undefined;
1498
+ comment?: string | null | undefined;
1499
+ };
1500
+ table: string;
1501
+ op: "addColumn";
1502
+ after?: string | null | undefined;
1503
+ }, {
1504
+ column: {
1505
+ name: string;
1506
+ id?: string | undefined;
1507
+ unique?: boolean | undefined;
1508
+ nullable?: boolean | undefined;
1509
+ dataType?: string | undefined;
1510
+ primaryKey?: boolean | undefined;
1511
+ defaultValue?: string | null | undefined;
1512
+ autoIncrement?: boolean | undefined;
1513
+ comment?: string | null | undefined;
1514
+ };
1515
+ table: string;
1516
+ op: "addColumn";
1517
+ after?: string | null | undefined;
1518
+ }>, z.ZodObject<{
1519
+ op: z.ZodLiteral<"alterColumn">;
1520
+ table: z.ZodString;
1521
+ column: z.ZodString;
1522
+ changes: z.ZodObject<{
1523
+ id: z.ZodOptional<z.ZodOptional<z.ZodString>>;
1524
+ name: z.ZodOptional<z.ZodString>;
1525
+ dataType: z.ZodOptional<z.ZodOptional<z.ZodString>>;
1526
+ nullable: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
1527
+ primaryKey: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
1528
+ unique: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
1529
+ defaultValue: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
1530
+ autoIncrement: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
1531
+ comment: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
1532
+ }, "strict", z.ZodTypeAny, {
1533
+ id?: string | undefined;
1534
+ name?: string | undefined;
1535
+ unique?: boolean | undefined;
1536
+ nullable?: boolean | undefined;
1537
+ dataType?: string | undefined;
1538
+ primaryKey?: boolean | undefined;
1539
+ defaultValue?: string | null | undefined;
1540
+ autoIncrement?: boolean | undefined;
1541
+ comment?: string | null | undefined;
1542
+ }, {
1543
+ id?: string | undefined;
1544
+ name?: string | undefined;
1545
+ unique?: boolean | undefined;
1546
+ nullable?: boolean | undefined;
1547
+ dataType?: string | undefined;
1548
+ primaryKey?: boolean | undefined;
1549
+ defaultValue?: string | null | undefined;
1550
+ autoIncrement?: boolean | undefined;
1551
+ comment?: string | null | undefined;
1552
+ }>;
1553
+ }, "strict", z.ZodTypeAny, {
1554
+ column: string;
1555
+ table: string;
1556
+ op: "alterColumn";
1557
+ changes: {
1558
+ id?: string | undefined;
1559
+ name?: string | undefined;
1560
+ unique?: boolean | undefined;
1561
+ nullable?: boolean | undefined;
1562
+ dataType?: string | undefined;
1563
+ primaryKey?: boolean | undefined;
1564
+ defaultValue?: string | null | undefined;
1565
+ autoIncrement?: boolean | undefined;
1566
+ comment?: string | null | undefined;
1567
+ };
1568
+ }, {
1569
+ column: string;
1570
+ table: string;
1571
+ op: "alterColumn";
1572
+ changes: {
1573
+ id?: string | undefined;
1574
+ name?: string | undefined;
1575
+ unique?: boolean | undefined;
1576
+ nullable?: boolean | undefined;
1577
+ dataType?: string | undefined;
1578
+ primaryKey?: boolean | undefined;
1579
+ defaultValue?: string | null | undefined;
1580
+ autoIncrement?: boolean | undefined;
1581
+ comment?: string | null | undefined;
1582
+ };
1583
+ }>, z.ZodObject<{
1584
+ op: z.ZodLiteral<"removeColumn">;
1585
+ table: z.ZodString;
1586
+ column: z.ZodString;
1587
+ }, "strict", z.ZodTypeAny, {
1588
+ column: string;
1589
+ table: string;
1590
+ op: "removeColumn";
1591
+ }, {
1592
+ column: string;
1593
+ table: string;
1594
+ op: "removeColumn";
1595
+ }>, z.ZodObject<{
1596
+ op: z.ZodLiteral<"setPrimaryKey">;
1597
+ table: z.ZodString;
1598
+ columns: z.ZodArray<z.ZodString, "many">;
1599
+ }, "strict", z.ZodTypeAny, {
1600
+ columns: string[];
1601
+ table: string;
1602
+ op: "setPrimaryKey";
1603
+ }, {
1604
+ columns: string[];
1605
+ table: string;
1606
+ op: "setPrimaryKey";
1607
+ }>, z.ZodObject<{
1608
+ op: z.ZodLiteral<"addRelationship">;
1609
+ id: z.ZodOptional<z.ZodString>;
1610
+ source: z.ZodUnion<[z.ZodString, z.ZodObject<{
1611
+ table: z.ZodString;
1612
+ columns: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1613
+ column: z.ZodOptional<z.ZodString>;
1614
+ }, "strict", z.ZodTypeAny, {
1615
+ table: string;
1616
+ column?: string | undefined;
1617
+ columns?: string[] | undefined;
1618
+ }, {
1619
+ table: string;
1620
+ column?: string | undefined;
1621
+ columns?: string[] | undefined;
1622
+ }>]>;
1623
+ target: z.ZodUnion<[z.ZodString, z.ZodObject<{
1624
+ table: z.ZodString;
1625
+ columns: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1626
+ column: z.ZodOptional<z.ZodString>;
1627
+ }, "strict", z.ZodTypeAny, {
1628
+ table: string;
1629
+ column?: string | undefined;
1630
+ columns?: string[] | undefined;
1631
+ }, {
1632
+ table: string;
1633
+ column?: string | undefined;
1634
+ columns?: string[] | undefined;
1635
+ }>]>;
1636
+ cardinality: z.ZodOptional<z.ZodEnum<["1:1", "1:N", "N:1", "N:M"]>>;
1637
+ kind: z.ZodOptional<z.ZodEnum<["foreignKey", "manual"]>>;
1638
+ name: z.ZodOptional<z.ZodString>;
1639
+ label: z.ZodOptional<z.ZodString>;
1640
+ }, "strict", z.ZodTypeAny, {
1641
+ source: string | {
1642
+ table: string;
1643
+ column?: string | undefined;
1644
+ columns?: string[] | undefined;
1645
+ };
1646
+ target: string | {
1647
+ table: string;
1648
+ column?: string | undefined;
1649
+ columns?: string[] | undefined;
1650
+ };
1651
+ op: "addRelationship";
1652
+ id?: string | undefined;
1653
+ name?: string | undefined;
1654
+ kind?: "foreignKey" | "manual" | undefined;
1655
+ label?: string | undefined;
1656
+ cardinality?: "1:1" | "1:N" | "N:1" | "N:M" | undefined;
1657
+ }, {
1658
+ source: string | {
1659
+ table: string;
1660
+ column?: string | undefined;
1661
+ columns?: string[] | undefined;
1662
+ };
1663
+ target: string | {
1664
+ table: string;
1665
+ column?: string | undefined;
1666
+ columns?: string[] | undefined;
1667
+ };
1668
+ op: "addRelationship";
1669
+ id?: string | undefined;
1670
+ name?: string | undefined;
1671
+ kind?: "foreignKey" | "manual" | undefined;
1672
+ label?: string | undefined;
1673
+ cardinality?: "1:1" | "1:N" | "N:1" | "N:M" | undefined;
1674
+ }>, z.ZodObject<{
1675
+ op: z.ZodLiteral<"updateRelationship">;
1676
+ relationship: z.ZodString;
1677
+ changes: z.ZodObject<{
1678
+ source: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodObject<{
1679
+ table: z.ZodString;
1680
+ columns: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1681
+ column: z.ZodOptional<z.ZodString>;
1682
+ }, "strict", z.ZodTypeAny, {
1683
+ table: string;
1684
+ column?: string | undefined;
1685
+ columns?: string[] | undefined;
1686
+ }, {
1687
+ table: string;
1688
+ column?: string | undefined;
1689
+ columns?: string[] | undefined;
1690
+ }>]>>;
1691
+ target: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodObject<{
1692
+ table: z.ZodString;
1693
+ columns: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1694
+ column: z.ZodOptional<z.ZodString>;
1695
+ }, "strict", z.ZodTypeAny, {
1696
+ table: string;
1697
+ column?: string | undefined;
1698
+ columns?: string[] | undefined;
1699
+ }, {
1700
+ table: string;
1701
+ column?: string | undefined;
1702
+ columns?: string[] | undefined;
1703
+ }>]>>;
1704
+ cardinality: z.ZodOptional<z.ZodEnum<["1:1", "1:N", "N:1", "N:M"]>>;
1705
+ name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1706
+ label: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1707
+ kind: z.ZodOptional<z.ZodEnum<["foreignKey", "manual"]>>;
1708
+ }, "strict", z.ZodTypeAny, {
1709
+ name?: string | null | undefined;
1710
+ source?: string | {
1711
+ table: string;
1712
+ column?: string | undefined;
1713
+ columns?: string[] | undefined;
1714
+ } | undefined;
1715
+ kind?: "foreignKey" | "manual" | undefined;
1716
+ label?: string | null | undefined;
1717
+ target?: string | {
1718
+ table: string;
1719
+ column?: string | undefined;
1720
+ columns?: string[] | undefined;
1721
+ } | undefined;
1722
+ cardinality?: "1:1" | "1:N" | "N:1" | "N:M" | undefined;
1723
+ }, {
1724
+ name?: string | null | undefined;
1725
+ source?: string | {
1726
+ table: string;
1727
+ column?: string | undefined;
1728
+ columns?: string[] | undefined;
1729
+ } | undefined;
1730
+ kind?: "foreignKey" | "manual" | undefined;
1731
+ label?: string | null | undefined;
1732
+ target?: string | {
1733
+ table: string;
1734
+ column?: string | undefined;
1735
+ columns?: string[] | undefined;
1736
+ } | undefined;
1737
+ cardinality?: "1:1" | "1:N" | "N:1" | "N:M" | undefined;
1738
+ }>;
1739
+ }, "strict", z.ZodTypeAny, {
1740
+ relationship: string;
1741
+ op: "updateRelationship";
1742
+ changes: {
1743
+ name?: string | null | undefined;
1744
+ source?: string | {
1745
+ table: string;
1746
+ column?: string | undefined;
1747
+ columns?: string[] | undefined;
1748
+ } | undefined;
1749
+ kind?: "foreignKey" | "manual" | undefined;
1750
+ label?: string | null | undefined;
1751
+ target?: string | {
1752
+ table: string;
1753
+ column?: string | undefined;
1754
+ columns?: string[] | undefined;
1755
+ } | undefined;
1756
+ cardinality?: "1:1" | "1:N" | "N:1" | "N:M" | undefined;
1757
+ };
1758
+ }, {
1759
+ relationship: string;
1760
+ op: "updateRelationship";
1761
+ changes: {
1762
+ name?: string | null | undefined;
1763
+ source?: string | {
1764
+ table: string;
1765
+ column?: string | undefined;
1766
+ columns?: string[] | undefined;
1767
+ } | undefined;
1768
+ kind?: "foreignKey" | "manual" | undefined;
1769
+ label?: string | null | undefined;
1770
+ target?: string | {
1771
+ table: string;
1772
+ column?: string | undefined;
1773
+ columns?: string[] | undefined;
1774
+ } | undefined;
1775
+ cardinality?: "1:1" | "1:N" | "N:1" | "N:M" | undefined;
1776
+ };
1777
+ }>, z.ZodObject<{
1778
+ op: z.ZodLiteral<"removeRelationship">;
1779
+ relationship: z.ZodString;
1780
+ }, "strict", z.ZodTypeAny, {
1781
+ relationship: string;
1782
+ op: "removeRelationship";
1783
+ }, {
1784
+ relationship: string;
1785
+ op: "removeRelationship";
1786
+ }>, z.ZodObject<{
1787
+ op: z.ZodLiteral<"hideTable">;
1788
+ table: z.ZodString;
1789
+ }, "strict", z.ZodTypeAny, {
1790
+ table: string;
1791
+ op: "hideTable";
1792
+ }, {
1793
+ table: string;
1794
+ op: "hideTable";
1795
+ }>, z.ZodObject<{
1796
+ op: z.ZodLiteral<"showTable">;
1797
+ table: z.ZodString;
1798
+ }, "strict", z.ZodTypeAny, {
1799
+ table: string;
1800
+ op: "showTable";
1801
+ }, {
1802
+ table: string;
1803
+ op: "showTable";
1103
1804
  }>]>;
1104
1805
  export type DiagramPatchOp = z.infer<typeof diagramPatchOpSchema>;
1105
1806
  export interface PatchResult {