callman-mcp 0.1.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 (244) hide show
  1. package/CHANGELOG.md +28 -0
  2. package/LICENSE +21 -0
  3. package/README.md +203 -0
  4. package/dist/client/api.d.ts +109 -0
  5. package/dist/client/api.d.ts.map +1 -0
  6. package/dist/client/api.js +180 -0
  7. package/dist/client/api.js.map +1 -0
  8. package/dist/client/errors.d.ts +27 -0
  9. package/dist/client/errors.d.ts.map +1 -0
  10. package/dist/client/errors.js +98 -0
  11. package/dist/client/errors.js.map +1 -0
  12. package/dist/client/http.d.ts +34 -0
  13. package/dist/client/http.d.ts.map +1 -0
  14. package/dist/client/http.js +121 -0
  15. package/dist/client/http.js.map +1 -0
  16. package/dist/client/types.d.ts +327 -0
  17. package/dist/client/types.d.ts.map +1 -0
  18. package/dist/client/types.js +5 -0
  19. package/dist/client/types.js.map +1 -0
  20. package/dist/config.d.ts +20 -0
  21. package/dist/config.d.ts.map +1 -0
  22. package/dist/config.js +69 -0
  23. package/dist/config.js.map +1 -0
  24. package/dist/context.d.ts +35 -0
  25. package/dist/context.d.ts.map +1 -0
  26. package/dist/context.js +91 -0
  27. package/dist/context.js.map +1 -0
  28. package/dist/domain/diagram/build.d.ts +260 -0
  29. package/dist/domain/diagram/build.d.ts.map +1 -0
  30. package/dist/domain/diagram/build.js +160 -0
  31. package/dist/domain/diagram/build.js.map +1 -0
  32. package/dist/domain/diagram/layout.d.ts +17 -0
  33. package/dist/domain/diagram/layout.d.ts.map +1 -0
  34. package/dist/domain/diagram/layout.js +61 -0
  35. package/dist/domain/diagram/layout.js.map +1 -0
  36. package/dist/domain/diagram/patch.d.ts +330 -0
  37. package/dist/domain/diagram/patch.d.ts.map +1 -0
  38. package/dist/domain/diagram/patch.js +176 -0
  39. package/dist/domain/diagram/patch.js.map +1 -0
  40. package/dist/domain/diagram/summarize.d.ts +41 -0
  41. package/dist/domain/diagram/summarize.d.ts.map +1 -0
  42. package/dist/domain/diagram/summarize.js +47 -0
  43. package/dist/domain/diagram/summarize.js.map +1 -0
  44. package/dist/domain/importDetect.d.ts +6 -0
  45. package/dist/domain/importDetect.d.ts.map +1 -0
  46. package/dist/domain/importDetect.js +32 -0
  47. package/dist/domain/importDetect.js.map +1 -0
  48. package/dist/domain/requestShape.d.ts +796 -0
  49. package/dist/domain/requestShape.d.ts.map +1 -0
  50. package/dist/domain/requestShape.js +250 -0
  51. package/dist/domain/requestShape.js.map +1 -0
  52. package/dist/domain/resolve.d.ts +30 -0
  53. package/dist/domain/resolve.d.ts.map +1 -0
  54. package/dist/domain/resolve.js +56 -0
  55. package/dist/domain/resolve.js.map +1 -0
  56. package/dist/domain/scenario/build.d.ts +270 -0
  57. package/dist/domain/scenario/build.d.ts.map +1 -0
  58. package/dist/domain/scenario/build.js +135 -0
  59. package/dist/domain/scenario/build.js.map +1 -0
  60. package/dist/domain/scenario/summarize.d.ts +206 -0
  61. package/dist/domain/scenario/summarize.d.ts.map +1 -0
  62. package/dist/domain/scenario/summarize.js +138 -0
  63. package/dist/domain/scenario/summarize.js.map +1 -0
  64. package/dist/index.d.ts +3 -0
  65. package/dist/index.d.ts.map +1 -0
  66. package/dist/index.js +142 -0
  67. package/dist/index.js.map +1 -0
  68. package/dist/lib/cache.d.ts +12 -0
  69. package/dist/lib/cache.d.ts.map +1 -0
  70. package/dist/lib/cache.js +40 -0
  71. package/dist/lib/cache.js.map +1 -0
  72. package/dist/lib/ids.d.ts +5 -0
  73. package/dist/lib/ids.d.ts.map +1 -0
  74. package/dist/lib/ids.js +19 -0
  75. package/dist/lib/ids.js.map +1 -0
  76. package/dist/lib/log.d.ts +10 -0
  77. package/dist/lib/log.d.ts.map +1 -0
  78. package/dist/lib/log.js +25 -0
  79. package/dist/lib/log.js.map +1 -0
  80. package/dist/lib/mask.d.ts +24 -0
  81. package/dist/lib/mask.d.ts.map +1 -0
  82. package/dist/lib/mask.js +63 -0
  83. package/dist/lib/mask.js.map +1 -0
  84. package/dist/lib/pagination.d.ts +21 -0
  85. package/dist/lib/pagination.d.ts.map +1 -0
  86. package/dist/lib/pagination.js +40 -0
  87. package/dist/lib/pagination.js.map +1 -0
  88. package/dist/lib/truncate.d.ts +25 -0
  89. package/dist/lib/truncate.d.ts.map +1 -0
  90. package/dist/lib/truncate.js +45 -0
  91. package/dist/lib/truncate.js.map +1 -0
  92. package/dist/main.d.ts +9 -0
  93. package/dist/main.d.ts.map +1 -0
  94. package/dist/main.js +12 -0
  95. package/dist/main.js.map +1 -0
  96. package/dist/prompts/index.d.ts +4 -0
  97. package/dist/prompts/index.d.ts.map +1 -0
  98. package/dist/prompts/index.js +72 -0
  99. package/dist/prompts/index.js.map +1 -0
  100. package/dist/resources/docs/diagramSchema.d.ts +2 -0
  101. package/dist/resources/docs/diagramSchema.d.ts.map +1 -0
  102. package/dist/resources/docs/diagramSchema.js +65 -0
  103. package/dist/resources/docs/diagramSchema.js.map +1 -0
  104. package/dist/resources/docs/overview.d.ts +2 -0
  105. package/dist/resources/docs/overview.d.ts.map +1 -0
  106. package/dist/resources/docs/overview.js +46 -0
  107. package/dist/resources/docs/overview.js.map +1 -0
  108. package/dist/resources/docs/requestSchema.d.ts +2 -0
  109. package/dist/resources/docs/requestSchema.d.ts.map +1 -0
  110. package/dist/resources/docs/requestSchema.js +70 -0
  111. package/dist/resources/docs/requestSchema.js.map +1 -0
  112. package/dist/resources/generated/aiPacks.d.ts +3 -0
  113. package/dist/resources/generated/aiPacks.d.ts.map +1 -0
  114. package/dist/resources/generated/aiPacks.js +11 -0
  115. package/dist/resources/generated/aiPacks.js.map +1 -0
  116. package/dist/resources/index.d.ts +4 -0
  117. package/dist/resources/index.d.ts.map +1 -0
  118. package/dist/resources/index.js +114 -0
  119. package/dist/resources/index.js.map +1 -0
  120. package/dist/run/executeCollection.d.ts +19 -0
  121. package/dist/run/executeCollection.d.ts.map +1 -0
  122. package/dist/run/executeCollection.js +89 -0
  123. package/dist/run/executeCollection.js.map +1 -0
  124. package/dist/run/loadBundle.d.ts +9 -0
  125. package/dist/run/loadBundle.d.ts.map +1 -0
  126. package/dist/run/loadBundle.js +242 -0
  127. package/dist/run/loadBundle.js.map +1 -0
  128. package/dist/run/resolveTemplate.d.ts +2 -0
  129. package/dist/run/resolveTemplate.d.ts.map +1 -0
  130. package/dist/run/resolveTemplate.js +12 -0
  131. package/dist/run/resolveTemplate.js.map +1 -0
  132. package/dist/run/summarize.d.ts +73 -0
  133. package/dist/run/summarize.d.ts.map +1 -0
  134. package/dist/run/summarize.js +69 -0
  135. package/dist/run/summarize.js.map +1 -0
  136. package/dist/run/types.d.ts +46 -0
  137. package/dist/run/types.d.ts.map +1 -0
  138. package/dist/run/types.js +2 -0
  139. package/dist/run/types.js.map +1 -0
  140. package/dist/server.d.ts +23 -0
  141. package/dist/server.d.ts.map +1 -0
  142. package/dist/server.js +25 -0
  143. package/dist/server.js.map +1 -0
  144. package/dist/tools/catalog.d.ts +18 -0
  145. package/dist/tools/catalog.d.ts.map +1 -0
  146. package/dist/tools/catalog.js +66 -0
  147. package/dist/tools/catalog.js.map +1 -0
  148. package/dist/tools/collections.d.ts +4 -0
  149. package/dist/tools/collections.d.ts.map +1 -0
  150. package/dist/tools/collections.js +201 -0
  151. package/dist/tools/collections.js.map +1 -0
  152. package/dist/tools/diagrams.d.ts +4 -0
  153. package/dist/tools/diagrams.d.ts.map +1 -0
  154. package/dist/tools/diagrams.js +226 -0
  155. package/dist/tools/diagrams.js.map +1 -0
  156. package/dist/tools/environments.d.ts +4 -0
  157. package/dist/tools/environments.d.ts.map +1 -0
  158. package/dist/tools/environments.js +150 -0
  159. package/dist/tools/environments.js.map +1 -0
  160. package/dist/tools/import.d.ts +6 -0
  161. package/dist/tools/import.d.ts.map +1 -0
  162. package/dist/tools/import.js +144 -0
  163. package/dist/tools/import.js.map +1 -0
  164. package/dist/tools/index.d.ts +5 -0
  165. package/dist/tools/index.d.ts.map +1 -0
  166. package/dist/tools/index.js +26 -0
  167. package/dist/tools/index.js.map +1 -0
  168. package/dist/tools/lookups.d.ts +33 -0
  169. package/dist/tools/lookups.d.ts.map +1 -0
  170. package/dist/tools/lookups.js +132 -0
  171. package/dist/tools/lookups.js.map +1 -0
  172. package/dist/tools/meta.d.ts +4 -0
  173. package/dist/tools/meta.d.ts.map +1 -0
  174. package/dist/tools/meta.js +78 -0
  175. package/dist/tools/meta.js.map +1 -0
  176. package/dist/tools/requests.d.ts +4 -0
  177. package/dist/tools/requests.d.ts.map +1 -0
  178. package/dist/tools/requests.js +247 -0
  179. package/dist/tools/requests.js.map +1 -0
  180. package/dist/tools/run.d.ts +4 -0
  181. package/dist/tools/run.d.ts.map +1 -0
  182. package/dist/tools/run.js +167 -0
  183. package/dist/tools/run.js.map +1 -0
  184. package/dist/tools/scenarios.d.ts +4 -0
  185. package/dist/tools/scenarios.d.ts.map +1 -0
  186. package/dist/tools/scenarios.js +242 -0
  187. package/dist/tools/scenarios.js.map +1 -0
  188. package/dist/tools/shared.d.ts +20 -0
  189. package/dist/tools/shared.d.ts.map +1 -0
  190. package/dist/tools/shared.js +74 -0
  191. package/dist/tools/shared.js.map +1 -0
  192. package/dist/tools/workspaces.d.ts +4 -0
  193. package/dist/tools/workspaces.d.ts.map +1 -0
  194. package/dist/tools/workspaces.js +80 -0
  195. package/dist/tools/workspaces.js.map +1 -0
  196. package/dist-cjs/client/api.js +183 -0
  197. package/dist-cjs/client/errors.js +104 -0
  198. package/dist-cjs/client/http.js +124 -0
  199. package/dist-cjs/client/types.js +5 -0
  200. package/dist-cjs/config.js +73 -0
  201. package/dist-cjs/context.js +94 -0
  202. package/dist-cjs/domain/diagram/build.js +164 -0
  203. package/dist-cjs/domain/diagram/layout.js +98 -0
  204. package/dist-cjs/domain/diagram/patch.js +179 -0
  205. package/dist-cjs/domain/diagram/summarize.js +52 -0
  206. package/dist-cjs/domain/importDetect.js +40 -0
  207. package/dist-cjs/domain/requestShape.js +260 -0
  208. package/dist-cjs/domain/resolve.js +63 -0
  209. package/dist-cjs/domain/scenario/build.js +140 -0
  210. package/dist-cjs/domain/scenario/summarize.js +144 -0
  211. package/dist-cjs/lib/cache.js +43 -0
  212. package/dist-cjs/lib/ids.js +24 -0
  213. package/dist-cjs/lib/log.js +28 -0
  214. package/dist-cjs/lib/mask.js +72 -0
  215. package/dist-cjs/lib/pagination.js +48 -0
  216. package/dist-cjs/lib/truncate.js +52 -0
  217. package/dist-cjs/main.js +31 -0
  218. package/dist-cjs/package.json +3 -0
  219. package/dist-cjs/prompts/index.js +75 -0
  220. package/dist-cjs/resources/docs/diagramSchema.js +67 -0
  221. package/dist-cjs/resources/docs/overview.js +48 -0
  222. package/dist-cjs/resources/docs/requestSchema.js +72 -0
  223. package/dist-cjs/resources/generated/aiPacks.js +13 -0
  224. package/dist-cjs/resources/index.js +117 -0
  225. package/dist-cjs/run/executeCollection.js +93 -0
  226. package/dist-cjs/run/loadBundle.js +246 -0
  227. package/dist-cjs/run/resolveTemplate.js +15 -0
  228. package/dist-cjs/run/summarize.js +73 -0
  229. package/dist-cjs/run/types.js +2 -0
  230. package/dist-cjs/server.js +28 -0
  231. package/dist-cjs/tools/catalog.js +69 -0
  232. package/dist-cjs/tools/collections.js +204 -0
  233. package/dist-cjs/tools/diagrams.js +229 -0
  234. package/dist-cjs/tools/environments.js +153 -0
  235. package/dist-cjs/tools/import.js +147 -0
  236. package/dist-cjs/tools/index.js +31 -0
  237. package/dist-cjs/tools/lookups.js +149 -0
  238. package/dist-cjs/tools/meta.js +81 -0
  239. package/dist-cjs/tools/requests.js +250 -0
  240. package/dist-cjs/tools/run.js +203 -0
  241. package/dist-cjs/tools/scenarios.js +245 -0
  242. package/dist-cjs/tools/shared.js +81 -0
  243. package/dist-cjs/tools/workspaces.js +83 -0
  244. package/package.json +80 -0
@@ -0,0 +1,796 @@
1
+ import { type KeyValueRow, type PersistedRequestBody } from "callman-core";
2
+ import { z } from "zod";
3
+ import type { ApiRequest, RequestAuth } from "../client/types.js";
4
+ export declare const HTTP_METHODS: readonly ["GET", "POST", "PUT", "PATCH", "DELETE", "HEAD", "OPTIONS", "TRACE"];
5
+ export declare const kvSchema: z.ZodObject<{
6
+ key: z.ZodString;
7
+ value: z.ZodDefault<z.ZodString>;
8
+ enabled: z.ZodOptional<z.ZodBoolean>;
9
+ description: z.ZodOptional<z.ZodString>;
10
+ }, "strip", z.ZodTypeAny, {
11
+ key: string;
12
+ value: string;
13
+ description?: string | undefined;
14
+ enabled?: boolean | undefined;
15
+ }, {
16
+ key: string;
17
+ value?: string | undefined;
18
+ description?: string | undefined;
19
+ enabled?: boolean | undefined;
20
+ }>;
21
+ export declare const bodyInputSchema: z.ZodUnion<[z.ZodObject<{
22
+ mode: z.ZodLiteral<"raw">;
23
+ raw: z.ZodString;
24
+ language: z.ZodOptional<z.ZodEnum<["json", "xml", "text", "html"]>>;
25
+ }, "strip", z.ZodTypeAny, {
26
+ mode: "raw";
27
+ raw: string;
28
+ language?: "text" | "json" | "xml" | "html" | undefined;
29
+ }, {
30
+ mode: "raw";
31
+ raw: string;
32
+ language?: "text" | "json" | "xml" | "html" | undefined;
33
+ }>, z.ZodObject<{
34
+ mode: z.ZodEnum<["formdata", "urlencoded"]>;
35
+ entries: z.ZodArray<z.ZodObject<{
36
+ key: z.ZodString;
37
+ value: z.ZodDefault<z.ZodString>;
38
+ enabled: z.ZodOptional<z.ZodBoolean>;
39
+ description: z.ZodOptional<z.ZodString>;
40
+ }, "strip", z.ZodTypeAny, {
41
+ key: string;
42
+ value: string;
43
+ description?: string | undefined;
44
+ enabled?: boolean | undefined;
45
+ }, {
46
+ key: string;
47
+ value?: string | undefined;
48
+ description?: string | undefined;
49
+ enabled?: boolean | undefined;
50
+ }>, "many">;
51
+ }, "strip", z.ZodTypeAny, {
52
+ entries: {
53
+ key: string;
54
+ value: string;
55
+ description?: string | undefined;
56
+ enabled?: boolean | undefined;
57
+ }[];
58
+ mode: "formdata" | "urlencoded";
59
+ }, {
60
+ entries: {
61
+ key: string;
62
+ value?: string | undefined;
63
+ description?: string | undefined;
64
+ enabled?: boolean | undefined;
65
+ }[];
66
+ mode: "formdata" | "urlencoded";
67
+ }>, z.ZodObject<{
68
+ mode: z.ZodLiteral<"none">;
69
+ }, "strip", z.ZodTypeAny, {
70
+ mode: "none";
71
+ }, {
72
+ mode: "none";
73
+ }>, z.ZodUnknown]>;
74
+ export declare const authInputSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
75
+ type: z.ZodLiteral<"none">;
76
+ }, "strip", z.ZodTypeAny, {
77
+ type: "none";
78
+ }, {
79
+ type: "none";
80
+ }>, z.ZodObject<{
81
+ type: z.ZodLiteral<"bearer">;
82
+ token: z.ZodString;
83
+ }, "strip", z.ZodTypeAny, {
84
+ token: string;
85
+ type: "bearer";
86
+ }, {
87
+ token: string;
88
+ type: "bearer";
89
+ }>, z.ZodObject<{
90
+ type: z.ZodLiteral<"basic">;
91
+ username: z.ZodString;
92
+ password: z.ZodDefault<z.ZodString>;
93
+ }, "strip", z.ZodTypeAny, {
94
+ type: "basic";
95
+ username: string;
96
+ password: string;
97
+ }, {
98
+ type: "basic";
99
+ username: string;
100
+ password?: string | undefined;
101
+ }>, z.ZodObject<{
102
+ type: z.ZodLiteral<"apiKey">;
103
+ key: z.ZodString;
104
+ value: z.ZodString;
105
+ location: z.ZodDefault<z.ZodEnum<["header", "query"]>>;
106
+ }, "strip", z.ZodTypeAny, {
107
+ key: string;
108
+ value: string;
109
+ type: "apiKey";
110
+ location: "query" | "header";
111
+ }, {
112
+ key: string;
113
+ value: string;
114
+ type: "apiKey";
115
+ location?: "query" | "header" | undefined;
116
+ }>, z.ZodObject<{
117
+ type: z.ZodLiteral<"oauth2">;
118
+ grantType: z.ZodDefault<z.ZodEnum<["client_credentials", "password", "refresh_token"]>>;
119
+ tokenUrl: z.ZodString;
120
+ clientId: z.ZodDefault<z.ZodString>;
121
+ clientSecret: z.ZodDefault<z.ZodString>;
122
+ scope: z.ZodDefault<z.ZodString>;
123
+ username: z.ZodDefault<z.ZodString>;
124
+ password: z.ZodDefault<z.ZodString>;
125
+ refreshToken: z.ZodDefault<z.ZodString>;
126
+ clientAuth: z.ZodDefault<z.ZodEnum<["basic", "body"]>>;
127
+ audience: z.ZodDefault<z.ZodString>;
128
+ }, "strip", z.ZodTypeAny, {
129
+ type: "oauth2";
130
+ audience: string;
131
+ scope: string;
132
+ username: string;
133
+ password: string;
134
+ grantType: "password" | "client_credentials" | "refresh_token";
135
+ tokenUrl: string;
136
+ clientId: string;
137
+ clientSecret: string;
138
+ refreshToken: string;
139
+ clientAuth: "basic" | "body";
140
+ }, {
141
+ type: "oauth2";
142
+ tokenUrl: string;
143
+ audience?: string | undefined;
144
+ scope?: string | undefined;
145
+ username?: string | undefined;
146
+ password?: string | undefined;
147
+ grantType?: "password" | "client_credentials" | "refresh_token" | undefined;
148
+ clientId?: string | undefined;
149
+ clientSecret?: string | undefined;
150
+ refreshToken?: string | undefined;
151
+ clientAuth?: "basic" | "body" | undefined;
152
+ }>]>;
153
+ export declare const requestInputSchema: z.ZodObject<{
154
+ name: z.ZodString;
155
+ method: z.ZodEnum<["GET", "POST", "PUT", "PATCH", "DELETE", "HEAD", "OPTIONS", "TRACE"]>;
156
+ url: z.ZodString;
157
+ headers: z.ZodOptional<z.ZodArray<z.ZodObject<{
158
+ key: z.ZodString;
159
+ value: z.ZodDefault<z.ZodString>;
160
+ enabled: z.ZodOptional<z.ZodBoolean>;
161
+ description: z.ZodOptional<z.ZodString>;
162
+ }, "strip", z.ZodTypeAny, {
163
+ key: string;
164
+ value: string;
165
+ description?: string | undefined;
166
+ enabled?: boolean | undefined;
167
+ }, {
168
+ key: string;
169
+ value?: string | undefined;
170
+ description?: string | undefined;
171
+ enabled?: boolean | undefined;
172
+ }>, "many">>;
173
+ query: z.ZodOptional<z.ZodArray<z.ZodObject<{
174
+ key: z.ZodString;
175
+ value: z.ZodDefault<z.ZodString>;
176
+ enabled: z.ZodOptional<z.ZodBoolean>;
177
+ description: z.ZodOptional<z.ZodString>;
178
+ }, "strip", z.ZodTypeAny, {
179
+ key: string;
180
+ value: string;
181
+ description?: string | undefined;
182
+ enabled?: boolean | undefined;
183
+ }, {
184
+ key: string;
185
+ value?: string | undefined;
186
+ description?: string | undefined;
187
+ enabled?: boolean | undefined;
188
+ }>, "many">>;
189
+ pathVariables: z.ZodOptional<z.ZodArray<z.ZodObject<{
190
+ key: z.ZodString;
191
+ value: z.ZodDefault<z.ZodString>;
192
+ enabled: z.ZodOptional<z.ZodBoolean>;
193
+ description: z.ZodOptional<z.ZodString>;
194
+ }, "strip", z.ZodTypeAny, {
195
+ key: string;
196
+ value: string;
197
+ description?: string | undefined;
198
+ enabled?: boolean | undefined;
199
+ }, {
200
+ key: string;
201
+ value?: string | undefined;
202
+ description?: string | undefined;
203
+ enabled?: boolean | undefined;
204
+ }>, "many">>;
205
+ body: z.ZodOptional<z.ZodUnion<[z.ZodObject<{
206
+ mode: z.ZodLiteral<"raw">;
207
+ raw: z.ZodString;
208
+ language: z.ZodOptional<z.ZodEnum<["json", "xml", "text", "html"]>>;
209
+ }, "strip", z.ZodTypeAny, {
210
+ mode: "raw";
211
+ raw: string;
212
+ language?: "text" | "json" | "xml" | "html" | undefined;
213
+ }, {
214
+ mode: "raw";
215
+ raw: string;
216
+ language?: "text" | "json" | "xml" | "html" | undefined;
217
+ }>, z.ZodObject<{
218
+ mode: z.ZodEnum<["formdata", "urlencoded"]>;
219
+ entries: z.ZodArray<z.ZodObject<{
220
+ key: z.ZodString;
221
+ value: z.ZodDefault<z.ZodString>;
222
+ enabled: z.ZodOptional<z.ZodBoolean>;
223
+ description: z.ZodOptional<z.ZodString>;
224
+ }, "strip", z.ZodTypeAny, {
225
+ key: string;
226
+ value: string;
227
+ description?: string | undefined;
228
+ enabled?: boolean | undefined;
229
+ }, {
230
+ key: string;
231
+ value?: string | undefined;
232
+ description?: string | undefined;
233
+ enabled?: boolean | undefined;
234
+ }>, "many">;
235
+ }, "strip", z.ZodTypeAny, {
236
+ entries: {
237
+ key: string;
238
+ value: string;
239
+ description?: string | undefined;
240
+ enabled?: boolean | undefined;
241
+ }[];
242
+ mode: "formdata" | "urlencoded";
243
+ }, {
244
+ entries: {
245
+ key: string;
246
+ value?: string | undefined;
247
+ description?: string | undefined;
248
+ enabled?: boolean | undefined;
249
+ }[];
250
+ mode: "formdata" | "urlencoded";
251
+ }>, z.ZodObject<{
252
+ mode: z.ZodLiteral<"none">;
253
+ }, "strip", z.ZodTypeAny, {
254
+ mode: "none";
255
+ }, {
256
+ mode: "none";
257
+ }>, z.ZodUnknown]>>;
258
+ auth: z.ZodOptional<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
259
+ type: z.ZodLiteral<"none">;
260
+ }, "strip", z.ZodTypeAny, {
261
+ type: "none";
262
+ }, {
263
+ type: "none";
264
+ }>, z.ZodObject<{
265
+ type: z.ZodLiteral<"bearer">;
266
+ token: z.ZodString;
267
+ }, "strip", z.ZodTypeAny, {
268
+ token: string;
269
+ type: "bearer";
270
+ }, {
271
+ token: string;
272
+ type: "bearer";
273
+ }>, z.ZodObject<{
274
+ type: z.ZodLiteral<"basic">;
275
+ username: z.ZodString;
276
+ password: z.ZodDefault<z.ZodString>;
277
+ }, "strip", z.ZodTypeAny, {
278
+ type: "basic";
279
+ username: string;
280
+ password: string;
281
+ }, {
282
+ type: "basic";
283
+ username: string;
284
+ password?: string | undefined;
285
+ }>, z.ZodObject<{
286
+ type: z.ZodLiteral<"apiKey">;
287
+ key: z.ZodString;
288
+ value: z.ZodString;
289
+ location: z.ZodDefault<z.ZodEnum<["header", "query"]>>;
290
+ }, "strip", z.ZodTypeAny, {
291
+ key: string;
292
+ value: string;
293
+ type: "apiKey";
294
+ location: "query" | "header";
295
+ }, {
296
+ key: string;
297
+ value: string;
298
+ type: "apiKey";
299
+ location?: "query" | "header" | undefined;
300
+ }>, z.ZodObject<{
301
+ type: z.ZodLiteral<"oauth2">;
302
+ grantType: z.ZodDefault<z.ZodEnum<["client_credentials", "password", "refresh_token"]>>;
303
+ tokenUrl: z.ZodString;
304
+ clientId: z.ZodDefault<z.ZodString>;
305
+ clientSecret: z.ZodDefault<z.ZodString>;
306
+ scope: z.ZodDefault<z.ZodString>;
307
+ username: z.ZodDefault<z.ZodString>;
308
+ password: z.ZodDefault<z.ZodString>;
309
+ refreshToken: z.ZodDefault<z.ZodString>;
310
+ clientAuth: z.ZodDefault<z.ZodEnum<["basic", "body"]>>;
311
+ audience: z.ZodDefault<z.ZodString>;
312
+ }, "strip", z.ZodTypeAny, {
313
+ type: "oauth2";
314
+ audience: string;
315
+ scope: string;
316
+ username: string;
317
+ password: string;
318
+ grantType: "password" | "client_credentials" | "refresh_token";
319
+ tokenUrl: string;
320
+ clientId: string;
321
+ clientSecret: string;
322
+ refreshToken: string;
323
+ clientAuth: "basic" | "body";
324
+ }, {
325
+ type: "oauth2";
326
+ tokenUrl: string;
327
+ audience?: string | undefined;
328
+ scope?: string | undefined;
329
+ username?: string | undefined;
330
+ password?: string | undefined;
331
+ grantType?: "password" | "client_credentials" | "refresh_token" | undefined;
332
+ clientId?: string | undefined;
333
+ clientSecret?: string | undefined;
334
+ refreshToken?: string | undefined;
335
+ clientAuth?: "basic" | "body" | undefined;
336
+ }>]>>;
337
+ preRequestScript: z.ZodOptional<z.ZodString>;
338
+ postResponseScript: z.ZodOptional<z.ZodString>;
339
+ testsScript: z.ZodOptional<z.ZodString>;
340
+ folder: z.ZodOptional<z.ZodString>;
341
+ folderKey: z.ZodOptional<z.ZodString>;
342
+ isEnabledInRunner: z.ZodOptional<z.ZodBoolean>;
343
+ }, "strip", z.ZodTypeAny, {
344
+ method: "GET" | "POST" | "DELETE" | "PATCH" | "PUT" | "HEAD" | "OPTIONS" | "TRACE";
345
+ name: string;
346
+ url: string;
347
+ query?: {
348
+ key: string;
349
+ value: string;
350
+ description?: string | undefined;
351
+ enabled?: boolean | undefined;
352
+ }[] | undefined;
353
+ headers?: {
354
+ key: string;
355
+ value: string;
356
+ description?: string | undefined;
357
+ enabled?: boolean | undefined;
358
+ }[] | undefined;
359
+ body?: unknown;
360
+ pathVariables?: {
361
+ key: string;
362
+ value: string;
363
+ description?: string | undefined;
364
+ enabled?: boolean | undefined;
365
+ }[] | undefined;
366
+ auth?: {
367
+ type: "none";
368
+ } | {
369
+ token: string;
370
+ type: "bearer";
371
+ } | {
372
+ type: "basic";
373
+ username: string;
374
+ password: string;
375
+ } | {
376
+ key: string;
377
+ value: string;
378
+ type: "apiKey";
379
+ location: "query" | "header";
380
+ } | {
381
+ type: "oauth2";
382
+ audience: string;
383
+ scope: string;
384
+ username: string;
385
+ password: string;
386
+ grantType: "password" | "client_credentials" | "refresh_token";
387
+ tokenUrl: string;
388
+ clientId: string;
389
+ clientSecret: string;
390
+ refreshToken: string;
391
+ clientAuth: "basic" | "body";
392
+ } | undefined;
393
+ preRequestScript?: string | undefined;
394
+ postResponseScript?: string | undefined;
395
+ testsScript?: string | undefined;
396
+ folder?: string | undefined;
397
+ folderKey?: string | undefined;
398
+ isEnabledInRunner?: boolean | undefined;
399
+ }, {
400
+ method: "GET" | "POST" | "DELETE" | "PATCH" | "PUT" | "HEAD" | "OPTIONS" | "TRACE";
401
+ name: string;
402
+ url: string;
403
+ query?: {
404
+ key: string;
405
+ value?: string | undefined;
406
+ description?: string | undefined;
407
+ enabled?: boolean | undefined;
408
+ }[] | undefined;
409
+ headers?: {
410
+ key: string;
411
+ value?: string | undefined;
412
+ description?: string | undefined;
413
+ enabled?: boolean | undefined;
414
+ }[] | undefined;
415
+ body?: unknown;
416
+ pathVariables?: {
417
+ key: string;
418
+ value?: string | undefined;
419
+ description?: string | undefined;
420
+ enabled?: boolean | undefined;
421
+ }[] | undefined;
422
+ auth?: {
423
+ type: "none";
424
+ } | {
425
+ token: string;
426
+ type: "bearer";
427
+ } | {
428
+ type: "basic";
429
+ username: string;
430
+ password?: string | undefined;
431
+ } | {
432
+ key: string;
433
+ value: string;
434
+ type: "apiKey";
435
+ location?: "query" | "header" | undefined;
436
+ } | {
437
+ type: "oauth2";
438
+ tokenUrl: string;
439
+ audience?: string | undefined;
440
+ scope?: string | undefined;
441
+ username?: string | undefined;
442
+ password?: string | undefined;
443
+ grantType?: "password" | "client_credentials" | "refresh_token" | undefined;
444
+ clientId?: string | undefined;
445
+ clientSecret?: string | undefined;
446
+ refreshToken?: string | undefined;
447
+ clientAuth?: "basic" | "body" | undefined;
448
+ } | undefined;
449
+ preRequestScript?: string | undefined;
450
+ postResponseScript?: string | undefined;
451
+ testsScript?: string | undefined;
452
+ folder?: string | undefined;
453
+ folderKey?: string | undefined;
454
+ isEnabledInRunner?: boolean | undefined;
455
+ }>;
456
+ export type RequestInput = z.infer<typeof requestInputSchema>;
457
+ export type KvInput = z.infer<typeof kvSchema>;
458
+ export type AuthInput = z.infer<typeof authInputSchema>;
459
+ export declare const toRows: (entries: KvInput[] | undefined) => KeyValueRow[];
460
+ export declare const toAuthPayload: (auth: AuthInput | undefined) => RequestAuth;
461
+ export declare const toBodyPayload: (body: unknown, headers: KeyValueRow[]) => PersistedRequestBody | null;
462
+ export declare const toCreateRequestPayload: (item: RequestInput, target: {
463
+ collectionId: string;
464
+ folderId: string | null;
465
+ }) => Record<string, unknown>;
466
+ export declare const toFlatImportRequest: (item: RequestInput) => Record<string, unknown>;
467
+ export declare const updateRequestInputSchema: z.ZodObject<Omit<{
468
+ name: z.ZodOptional<z.ZodString>;
469
+ method: z.ZodOptional<z.ZodEnum<["GET", "POST", "PUT", "PATCH", "DELETE", "HEAD", "OPTIONS", "TRACE"]>>;
470
+ url: z.ZodOptional<z.ZodString>;
471
+ headers: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodObject<{
472
+ key: z.ZodString;
473
+ value: z.ZodDefault<z.ZodString>;
474
+ enabled: z.ZodOptional<z.ZodBoolean>;
475
+ description: z.ZodOptional<z.ZodString>;
476
+ }, "strip", z.ZodTypeAny, {
477
+ key: string;
478
+ value: string;
479
+ description?: string | undefined;
480
+ enabled?: boolean | undefined;
481
+ }, {
482
+ key: string;
483
+ value?: string | undefined;
484
+ description?: string | undefined;
485
+ enabled?: boolean | undefined;
486
+ }>, "many">>>;
487
+ query: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodObject<{
488
+ key: z.ZodString;
489
+ value: z.ZodDefault<z.ZodString>;
490
+ enabled: z.ZodOptional<z.ZodBoolean>;
491
+ description: z.ZodOptional<z.ZodString>;
492
+ }, "strip", z.ZodTypeAny, {
493
+ key: string;
494
+ value: string;
495
+ description?: string | undefined;
496
+ enabled?: boolean | undefined;
497
+ }, {
498
+ key: string;
499
+ value?: string | undefined;
500
+ description?: string | undefined;
501
+ enabled?: boolean | undefined;
502
+ }>, "many">>>;
503
+ pathVariables: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodObject<{
504
+ key: z.ZodString;
505
+ value: z.ZodDefault<z.ZodString>;
506
+ enabled: z.ZodOptional<z.ZodBoolean>;
507
+ description: z.ZodOptional<z.ZodString>;
508
+ }, "strip", z.ZodTypeAny, {
509
+ key: string;
510
+ value: string;
511
+ description?: string | undefined;
512
+ enabled?: boolean | undefined;
513
+ }, {
514
+ key: string;
515
+ value?: string | undefined;
516
+ description?: string | undefined;
517
+ enabled?: boolean | undefined;
518
+ }>, "many">>>;
519
+ body: z.ZodOptional<z.ZodOptional<z.ZodUnion<[z.ZodObject<{
520
+ mode: z.ZodLiteral<"raw">;
521
+ raw: z.ZodString;
522
+ language: z.ZodOptional<z.ZodEnum<["json", "xml", "text", "html"]>>;
523
+ }, "strip", z.ZodTypeAny, {
524
+ mode: "raw";
525
+ raw: string;
526
+ language?: "text" | "json" | "xml" | "html" | undefined;
527
+ }, {
528
+ mode: "raw";
529
+ raw: string;
530
+ language?: "text" | "json" | "xml" | "html" | undefined;
531
+ }>, z.ZodObject<{
532
+ mode: z.ZodEnum<["formdata", "urlencoded"]>;
533
+ entries: z.ZodArray<z.ZodObject<{
534
+ key: z.ZodString;
535
+ value: z.ZodDefault<z.ZodString>;
536
+ enabled: z.ZodOptional<z.ZodBoolean>;
537
+ description: z.ZodOptional<z.ZodString>;
538
+ }, "strip", z.ZodTypeAny, {
539
+ key: string;
540
+ value: string;
541
+ description?: string | undefined;
542
+ enabled?: boolean | undefined;
543
+ }, {
544
+ key: string;
545
+ value?: string | undefined;
546
+ description?: string | undefined;
547
+ enabled?: boolean | undefined;
548
+ }>, "many">;
549
+ }, "strip", z.ZodTypeAny, {
550
+ entries: {
551
+ key: string;
552
+ value: string;
553
+ description?: string | undefined;
554
+ enabled?: boolean | undefined;
555
+ }[];
556
+ mode: "formdata" | "urlencoded";
557
+ }, {
558
+ entries: {
559
+ key: string;
560
+ value?: string | undefined;
561
+ description?: string | undefined;
562
+ enabled?: boolean | undefined;
563
+ }[];
564
+ mode: "formdata" | "urlencoded";
565
+ }>, z.ZodObject<{
566
+ mode: z.ZodLiteral<"none">;
567
+ }, "strip", z.ZodTypeAny, {
568
+ mode: "none";
569
+ }, {
570
+ mode: "none";
571
+ }>, z.ZodUnknown]>>>;
572
+ auth: z.ZodOptional<z.ZodOptional<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
573
+ type: z.ZodLiteral<"none">;
574
+ }, "strip", z.ZodTypeAny, {
575
+ type: "none";
576
+ }, {
577
+ type: "none";
578
+ }>, z.ZodObject<{
579
+ type: z.ZodLiteral<"bearer">;
580
+ token: z.ZodString;
581
+ }, "strip", z.ZodTypeAny, {
582
+ token: string;
583
+ type: "bearer";
584
+ }, {
585
+ token: string;
586
+ type: "bearer";
587
+ }>, z.ZodObject<{
588
+ type: z.ZodLiteral<"basic">;
589
+ username: z.ZodString;
590
+ password: z.ZodDefault<z.ZodString>;
591
+ }, "strip", z.ZodTypeAny, {
592
+ type: "basic";
593
+ username: string;
594
+ password: string;
595
+ }, {
596
+ type: "basic";
597
+ username: string;
598
+ password?: string | undefined;
599
+ }>, z.ZodObject<{
600
+ type: z.ZodLiteral<"apiKey">;
601
+ key: z.ZodString;
602
+ value: z.ZodString;
603
+ location: z.ZodDefault<z.ZodEnum<["header", "query"]>>;
604
+ }, "strip", z.ZodTypeAny, {
605
+ key: string;
606
+ value: string;
607
+ type: "apiKey";
608
+ location: "query" | "header";
609
+ }, {
610
+ key: string;
611
+ value: string;
612
+ type: "apiKey";
613
+ location?: "query" | "header" | undefined;
614
+ }>, z.ZodObject<{
615
+ type: z.ZodLiteral<"oauth2">;
616
+ grantType: z.ZodDefault<z.ZodEnum<["client_credentials", "password", "refresh_token"]>>;
617
+ tokenUrl: z.ZodString;
618
+ clientId: z.ZodDefault<z.ZodString>;
619
+ clientSecret: z.ZodDefault<z.ZodString>;
620
+ scope: z.ZodDefault<z.ZodString>;
621
+ username: z.ZodDefault<z.ZodString>;
622
+ password: z.ZodDefault<z.ZodString>;
623
+ refreshToken: z.ZodDefault<z.ZodString>;
624
+ clientAuth: z.ZodDefault<z.ZodEnum<["basic", "body"]>>;
625
+ audience: z.ZodDefault<z.ZodString>;
626
+ }, "strip", z.ZodTypeAny, {
627
+ type: "oauth2";
628
+ audience: string;
629
+ scope: string;
630
+ username: string;
631
+ password: string;
632
+ grantType: "password" | "client_credentials" | "refresh_token";
633
+ tokenUrl: string;
634
+ clientId: string;
635
+ clientSecret: string;
636
+ refreshToken: string;
637
+ clientAuth: "basic" | "body";
638
+ }, {
639
+ type: "oauth2";
640
+ tokenUrl: string;
641
+ audience?: string | undefined;
642
+ scope?: string | undefined;
643
+ username?: string | undefined;
644
+ password?: string | undefined;
645
+ grantType?: "password" | "client_credentials" | "refresh_token" | undefined;
646
+ clientId?: string | undefined;
647
+ clientSecret?: string | undefined;
648
+ refreshToken?: string | undefined;
649
+ clientAuth?: "basic" | "body" | undefined;
650
+ }>]>>>;
651
+ preRequestScript: z.ZodOptional<z.ZodOptional<z.ZodString>>;
652
+ postResponseScript: z.ZodOptional<z.ZodOptional<z.ZodString>>;
653
+ testsScript: z.ZodOptional<z.ZodOptional<z.ZodString>>;
654
+ folder: z.ZodOptional<z.ZodOptional<z.ZodString>>;
655
+ folderKey: z.ZodOptional<z.ZodOptional<z.ZodString>>;
656
+ isEnabledInRunner: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
657
+ }, "folderKey"> & {
658
+ collection: z.ZodOptional<z.ZodString>;
659
+ }, "strip", z.ZodTypeAny, {
660
+ query?: {
661
+ key: string;
662
+ value: string;
663
+ description?: string | undefined;
664
+ enabled?: boolean | undefined;
665
+ }[] | undefined;
666
+ method?: "GET" | "POST" | "DELETE" | "PATCH" | "PUT" | "HEAD" | "OPTIONS" | "TRACE" | undefined;
667
+ headers?: {
668
+ key: string;
669
+ value: string;
670
+ description?: string | undefined;
671
+ enabled?: boolean | undefined;
672
+ }[] | undefined;
673
+ body?: unknown;
674
+ name?: string | undefined;
675
+ url?: string | undefined;
676
+ collection?: string | undefined;
677
+ pathVariables?: {
678
+ key: string;
679
+ value: string;
680
+ description?: string | undefined;
681
+ enabled?: boolean | undefined;
682
+ }[] | undefined;
683
+ auth?: {
684
+ type: "none";
685
+ } | {
686
+ token: string;
687
+ type: "bearer";
688
+ } | {
689
+ type: "basic";
690
+ username: string;
691
+ password: string;
692
+ } | {
693
+ key: string;
694
+ value: string;
695
+ type: "apiKey";
696
+ location: "query" | "header";
697
+ } | {
698
+ type: "oauth2";
699
+ audience: string;
700
+ scope: string;
701
+ username: string;
702
+ password: string;
703
+ grantType: "password" | "client_credentials" | "refresh_token";
704
+ tokenUrl: string;
705
+ clientId: string;
706
+ clientSecret: string;
707
+ refreshToken: string;
708
+ clientAuth: "basic" | "body";
709
+ } | undefined;
710
+ preRequestScript?: string | undefined;
711
+ postResponseScript?: string | undefined;
712
+ testsScript?: string | undefined;
713
+ folder?: string | undefined;
714
+ isEnabledInRunner?: boolean | undefined;
715
+ }, {
716
+ query?: {
717
+ key: string;
718
+ value?: string | undefined;
719
+ description?: string | undefined;
720
+ enabled?: boolean | undefined;
721
+ }[] | undefined;
722
+ method?: "GET" | "POST" | "DELETE" | "PATCH" | "PUT" | "HEAD" | "OPTIONS" | "TRACE" | undefined;
723
+ headers?: {
724
+ key: string;
725
+ value?: string | undefined;
726
+ description?: string | undefined;
727
+ enabled?: boolean | undefined;
728
+ }[] | undefined;
729
+ body?: unknown;
730
+ name?: string | undefined;
731
+ url?: string | undefined;
732
+ collection?: string | undefined;
733
+ pathVariables?: {
734
+ key: string;
735
+ value?: string | undefined;
736
+ description?: string | undefined;
737
+ enabled?: boolean | undefined;
738
+ }[] | undefined;
739
+ auth?: {
740
+ type: "none";
741
+ } | {
742
+ token: string;
743
+ type: "bearer";
744
+ } | {
745
+ type: "basic";
746
+ username: string;
747
+ password?: string | undefined;
748
+ } | {
749
+ key: string;
750
+ value: string;
751
+ type: "apiKey";
752
+ location?: "query" | "header" | undefined;
753
+ } | {
754
+ type: "oauth2";
755
+ tokenUrl: string;
756
+ audience?: string | undefined;
757
+ scope?: string | undefined;
758
+ username?: string | undefined;
759
+ password?: string | undefined;
760
+ grantType?: "password" | "client_credentials" | "refresh_token" | undefined;
761
+ clientId?: string | undefined;
762
+ clientSecret?: string | undefined;
763
+ refreshToken?: string | undefined;
764
+ clientAuth?: "basic" | "body" | undefined;
765
+ } | undefined;
766
+ preRequestScript?: string | undefined;
767
+ postResponseScript?: string | undefined;
768
+ testsScript?: string | undefined;
769
+ folder?: string | undefined;
770
+ isEnabledInRunner?: boolean | undefined;
771
+ }>;
772
+ export type UpdateRequestInput = z.infer<typeof updateRequestInputSchema>;
773
+ export declare const toUpdateRequestPayload: (item: UpdateRequestInput, target: {
774
+ collectionId?: string;
775
+ folderId?: string | null;
776
+ }) => Record<string, unknown>;
777
+ export declare const compactRequestView: (request: ApiRequest, options?: {
778
+ full?: boolean;
779
+ reveal?: boolean;
780
+ }) => Record<string, unknown>;
781
+ export declare const requestSummaryView: (request: {
782
+ id: string;
783
+ name: string;
784
+ method: string;
785
+ url: string;
786
+ folderId: string | null;
787
+ collectionId?: string;
788
+ }) => {
789
+ collectionId?: string | undefined;
790
+ id: string;
791
+ name: string;
792
+ method: string;
793
+ url: string;
794
+ folderId: string | null;
795
+ };
796
+ //# sourceMappingURL=requestShape.d.ts.map