mcp-insomnia 0.2.1 → 0.3.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 (129) hide show
  1. package/README.md +44 -6
  2. package/dist/index.js +10 -10
  3. package/dist/index.js.map +1 -1
  4. package/dist/resources/collection.resource.d.ts +3 -0
  5. package/dist/resources/collection.resource.d.ts.map +1 -0
  6. package/dist/resources/collection.resource.js +113 -0
  7. package/dist/resources/collection.resource.js.map +1 -0
  8. package/dist/resources/environment.resource.d.ts +3 -0
  9. package/dist/resources/environment.resource.d.ts.map +1 -0
  10. package/dist/resources/environment.resource.js +48 -0
  11. package/dist/resources/environment.resource.js.map +1 -0
  12. package/dist/resources/index.d.ts +3 -0
  13. package/dist/resources/index.d.ts.map +1 -0
  14. package/dist/resources/index.js +8 -0
  15. package/dist/resources/index.js.map +1 -0
  16. package/dist/resources/request.resource.d.ts +3 -0
  17. package/dist/resources/request.resource.d.ts.map +1 -0
  18. package/dist/resources/request.resource.js +157 -0
  19. package/dist/resources/request.resource.js.map +1 -0
  20. package/dist/resources/search.resource.d.ts +3 -0
  21. package/dist/resources/search.resource.d.ts.map +1 -0
  22. package/dist/resources/search.resource.js +143 -0
  23. package/dist/resources/search.resource.js.map +1 -0
  24. package/dist/storage/index.d.ts +3 -0
  25. package/dist/storage/index.d.ts.map +1 -0
  26. package/dist/storage/index.js +3 -0
  27. package/dist/storage/index.js.map +1 -0
  28. package/dist/storage/insomnia-storage.d.ts +111 -0
  29. package/dist/storage/insomnia-storage.d.ts.map +1 -0
  30. package/dist/storage/insomnia-storage.js +322 -0
  31. package/dist/storage/insomnia-storage.js.map +1 -0
  32. package/dist/{storage.d.ts → storage/storage.d.ts} +1 -1
  33. package/dist/storage/storage.d.ts.map +1 -0
  34. package/dist/{storage.js → storage/storage.js} +3 -3
  35. package/dist/storage/storage.js.map +1 -0
  36. package/dist/tools/collection.tools.d.ts +3 -0
  37. package/dist/tools/collection.tools.d.ts.map +1 -0
  38. package/dist/tools/collection.tools.js +132 -0
  39. package/dist/tools/collection.tools.js.map +1 -0
  40. package/dist/tools/environment.tools.d.ts +3 -0
  41. package/dist/tools/environment.tools.d.ts.map +1 -0
  42. package/dist/tools/environment.tools.js +93 -0
  43. package/dist/tools/environment.tools.js.map +1 -0
  44. package/dist/tools/folder.tools.d.ts +3 -0
  45. package/dist/tools/folder.tools.d.ts.map +1 -0
  46. package/dist/tools/folder.tools.js +46 -0
  47. package/dist/tools/folder.tools.js.map +1 -0
  48. package/dist/tools/index.d.ts +3 -0
  49. package/dist/tools/index.d.ts.map +1 -0
  50. package/dist/tools/index.js +17 -0
  51. package/dist/tools/index.js.map +1 -0
  52. package/dist/tools/insomnia.tools.d.ts +3 -0
  53. package/dist/tools/insomnia.tools.d.ts.map +1 -0
  54. package/dist/tools/insomnia.tools.js +482 -0
  55. package/dist/tools/insomnia.tools.js.map +1 -0
  56. package/dist/tools/request.tools.d.ts +3 -0
  57. package/dist/tools/request.tools.d.ts.map +1 -0
  58. package/dist/tools/request.tools.js +368 -0
  59. package/dist/tools/request.tools.js.map +1 -0
  60. package/dist/tools/utility.tools.d.ts +3 -0
  61. package/dist/tools/utility.tools.d.ts.map +1 -0
  62. package/dist/tools/utility.tools.js +433 -0
  63. package/dist/tools/utility.tools.js.map +1 -0
  64. package/dist/types/auth.d.ts +25 -0
  65. package/dist/types/auth.d.ts.map +1 -0
  66. package/dist/types/auth.js +2 -0
  67. package/dist/types/auth.js.map +1 -0
  68. package/dist/types/collection.d.ts +48 -0
  69. package/dist/types/collection.d.ts.map +1 -0
  70. package/dist/types/collection.js +2 -0
  71. package/dist/types/collection.js.map +1 -0
  72. package/dist/types/common.d.ts +63 -0
  73. package/dist/types/common.d.ts.map +1 -0
  74. package/dist/types/common.js +2 -0
  75. package/dist/types/common.js.map +1 -0
  76. package/dist/types/environment.d.ts +17 -0
  77. package/dist/types/environment.d.ts.map +1 -0
  78. package/dist/types/environment.js +2 -0
  79. package/dist/types/environment.js.map +1 -0
  80. package/dist/types/har.d.ts +29 -0
  81. package/dist/types/har.d.ts.map +1 -0
  82. package/dist/types/har.js +2 -0
  83. package/dist/types/har.js.map +1 -0
  84. package/dist/types/index.d.ts +9 -0
  85. package/dist/types/index.d.ts.map +1 -0
  86. package/dist/types/index.js +9 -0
  87. package/dist/types/index.js.map +1 -0
  88. package/dist/{types.d.ts → types/request.d.ts} +29 -105
  89. package/dist/types/request.d.ts.map +1 -0
  90. package/dist/types/request.js +2 -0
  91. package/dist/types/request.js.map +1 -0
  92. package/dist/types/resource.d.ts +20 -0
  93. package/dist/types/resource.d.ts.map +1 -0
  94. package/dist/types/resource.js +2 -0
  95. package/dist/types/resource.js.map +1 -0
  96. package/dist/types/tool.d.ts +35 -0
  97. package/dist/types/tool.d.ts.map +1 -0
  98. package/dist/types/tool.js +2 -0
  99. package/dist/types/tool.js.map +1 -0
  100. package/dist/utils/curl-parser.d.ts +10 -0
  101. package/dist/utils/curl-parser.d.ts.map +1 -0
  102. package/dist/utils/curl-parser.js +84 -0
  103. package/dist/utils/curl-parser.js.map +1 -0
  104. package/dist/utils/http.d.ts +3 -0
  105. package/dist/utils/http.d.ts.map +1 -0
  106. package/dist/utils/http.js +12 -0
  107. package/dist/utils/http.js.map +1 -0
  108. package/dist/utils/postman-converter.d.ts +88 -0
  109. package/dist/utils/postman-converter.d.ts.map +1 -0
  110. package/dist/utils/postman-converter.js +171 -0
  111. package/dist/utils/postman-converter.js.map +1 -0
  112. package/package.json +16 -6
  113. package/dist/resources.d.ts +0 -11
  114. package/dist/resources.d.ts.map +0 -1
  115. package/dist/resources.js +0 -449
  116. package/dist/resources.js.map +0 -1
  117. package/dist/run-duplication-test.d.ts +0 -2
  118. package/dist/run-duplication-test.d.ts.map +0 -1
  119. package/dist/run-duplication-test.js +0 -58
  120. package/dist/run-duplication-test.js.map +0 -1
  121. package/dist/storage.d.ts.map +0 -1
  122. package/dist/storage.js.map +0 -1
  123. package/dist/tools.d.ts +0 -10
  124. package/dist/tools.d.ts.map +0 -1
  125. package/dist/tools.js +0 -773
  126. package/dist/tools.js.map +0 -1
  127. package/dist/types.d.ts.map +0 -1
  128. package/dist/types.js +0 -2
  129. package/dist/types.js.map +0 -1
@@ -0,0 +1,433 @@
1
+ import * as fs from 'fs';
2
+ import { v4 as uuidv4 } from 'uuid';
3
+ import { HTTPSnippet } from 'httpsnippet';
4
+ import { storage } from '../storage/index.js';
5
+ import { parseCurlCommand } from '../utils/curl-parser.js';
6
+ import { convertPostmanToInsomnia } from '../utils/postman-converter.js';
7
+ function convertInsomniaRequestToHar(request) {
8
+ return {
9
+ method: request.method,
10
+ url: request.url,
11
+ headers: request.headers.map((h) => ({ name: h.name, value: h.value })),
12
+ queryString: request.parameters.map((p) => ({ name: p.name, value: p.value })),
13
+ httpVersion: 'HTTP/1.1',
14
+ cookies: [],
15
+ headersSize: -1,
16
+ bodySize: -1,
17
+ postData: request.body?.text
18
+ ? {
19
+ mimeType: request.body.mimeType || 'application/json',
20
+ text: request.body.text,
21
+ }
22
+ : undefined,
23
+ };
24
+ }
25
+ export const utilityTools = [
26
+ {
27
+ name: 'import_from_insomnia_export',
28
+ description: 'Import collections from a standard Insomnia V4 export file',
29
+ inputSchema: {
30
+ type: 'object',
31
+ properties: {
32
+ filePath: { type: 'string', description: 'The absolute path to the Insomnia export file' },
33
+ },
34
+ required: ['filePath'],
35
+ },
36
+ handler: async (request) => {
37
+ const { filePath } = request.params.arguments;
38
+ if (!fs.existsSync(filePath)) {
39
+ throw new Error(`File not found at path: ${filePath}`);
40
+ }
41
+ const fileContent = fs.readFileSync(filePath, 'utf-8');
42
+ const data = JSON.parse(fileContent);
43
+ const exportData = data;
44
+ if (exportData._type !== 'export' || exportData.__export_format !== 4) {
45
+ throw new Error('Invalid Insomnia V4 export file format.');
46
+ }
47
+ const allResources = data.resources;
48
+ const workspaces = allResources.filter((r) => r._type === 'workspace');
49
+ if (workspaces.length === 0) {
50
+ throw new Error('No workspaces found in the export file.');
51
+ }
52
+ let importedCount = 0;
53
+ for (const workspace of workspaces) {
54
+ const structure = {
55
+ workspace,
56
+ folders: [],
57
+ requests: [],
58
+ environments: [],
59
+ };
60
+ const allChildrenIds = new Set([workspace._id]);
61
+ const resourcesInWorkspace = allResources.filter((r) => r.parentId === workspace._id);
62
+ const folderIds = new Set();
63
+ resourcesInWorkspace.forEach((r) => {
64
+ if (r._type === 'request_group') {
65
+ folderIds.add(r._id);
66
+ allChildrenIds.add(r._id);
67
+ }
68
+ });
69
+ allResources.forEach((r) => {
70
+ if (!r.parentId || !allChildrenIds.has(r.parentId))
71
+ return;
72
+ switch (r._type) {
73
+ case 'request_group':
74
+ structure.folders.push(r);
75
+ break;
76
+ case 'request':
77
+ structure.requests.push(r);
78
+ break;
79
+ case 'environment':
80
+ if (r.parentId === workspace._id) {
81
+ structure.environments.push(r);
82
+ }
83
+ break;
84
+ }
85
+ });
86
+ storage.saveCollection(workspace._id, structure);
87
+ importedCount++;
88
+ }
89
+ return {
90
+ content: [
91
+ {
92
+ type: 'text',
93
+ text: `Successfully imported ${String(importedCount)} collection(s) from ${filePath}`,
94
+ },
95
+ ],
96
+ };
97
+ },
98
+ },
99
+ {
100
+ name: 'generate_code_snippet',
101
+ description: 'Generate a code snippet for a request in various languages/frameworks',
102
+ inputSchema: {
103
+ type: 'object',
104
+ properties: {
105
+ requestId: { type: 'string', description: 'ID of the request to generate snippet for' },
106
+ target: {
107
+ type: 'string',
108
+ description: 'Target language for the snippet (e.g., "javascript", "python", "shell")',
109
+ enum: [
110
+ 'c',
111
+ 'clojure',
112
+ 'csharp',
113
+ 'go',
114
+ 'http',
115
+ 'java',
116
+ 'javascript',
117
+ 'kotlin',
118
+ 'node',
119
+ 'objc',
120
+ 'ocaml',
121
+ 'php',
122
+ 'powershell',
123
+ 'python',
124
+ 'ruby',
125
+ 'shell',
126
+ 'swift',
127
+ ],
128
+ },
129
+ client: {
130
+ type: 'string',
131
+ description: 'Optional: specify a client for the target language (e.g., "axios" for javascript, "curl" for shell)',
132
+ },
133
+ },
134
+ required: ['requestId', 'target'],
135
+ },
136
+ handler: async (request) => {
137
+ const { requestId, target, client } = request.params.arguments;
138
+ let targetRequest = null;
139
+ const collections = storage.getAllCollections();
140
+ for (const [, collection] of collections.entries()) {
141
+ const foundRequest = collection.requests.find((r) => r._id === requestId);
142
+ if (foundRequest) {
143
+ targetRequest = foundRequest;
144
+ break;
145
+ }
146
+ }
147
+ if (!targetRequest) {
148
+ throw new Error(`Request with ID ${requestId} not found`);
149
+ }
150
+ const harRequest = convertInsomniaRequestToHar(targetRequest);
151
+ const snippet = new HTTPSnippet(harRequest);
152
+ try {
153
+ const code = snippet.convert(target, client);
154
+ return {
155
+ content: [
156
+ {
157
+ type: 'text',
158
+ text: code,
159
+ },
160
+ ],
161
+ };
162
+ }
163
+ catch (err) {
164
+ const error = err;
165
+ throw new Error(`Failed to generate code snippet for target "${target}" with client "${client || 'default'}": ${error.message || 'Unknown error'}`);
166
+ }
167
+ },
168
+ },
169
+ {
170
+ name: 'import_from_curl',
171
+ description: 'Create a request from a cURL command',
172
+ inputSchema: {
173
+ type: 'object',
174
+ properties: {
175
+ curlCommand: { type: 'string', description: 'The cURL command to parse' },
176
+ collectionId: { type: 'string', description: 'ID of the collection to add the request to' },
177
+ requestName: { type: 'string', description: 'Name for the new request' },
178
+ folderId: { type: 'string', description: 'Optional folder ID to place the request in' },
179
+ },
180
+ required: ['curlCommand', 'collectionId'],
181
+ },
182
+ handler: async (request) => {
183
+ const { curlCommand, collectionId, requestName, folderId } = request.params.arguments;
184
+ const collection = storage.getCollection(collectionId);
185
+ if (!collection) {
186
+ throw new Error(`Collection with ID ${collectionId} not found`);
187
+ }
188
+ const parsed = parseCurlCommand(curlCommand);
189
+ const requestId = `req_${uuidv4().replace(/-/g, '')}`;
190
+ const newRequest = {
191
+ _id: requestId,
192
+ _type: 'request',
193
+ parentId: folderId || collectionId,
194
+ name: requestName || `Imported from cURL - ${parsed.method} ${new URL(parsed.url).pathname}`,
195
+ description: 'Imported from cURL command',
196
+ url: parsed.url,
197
+ method: parsed.method,
198
+ headers: parsed.headers,
199
+ parameters: parsed.parameters,
200
+ body: parsed.body,
201
+ created: Date.now(),
202
+ modified: Date.now(),
203
+ };
204
+ collection.requests.push(newRequest);
205
+ storage.saveCollection(collectionId, collection);
206
+ return {
207
+ content: [
208
+ {
209
+ type: 'text',
210
+ text: JSON.stringify({
211
+ success: true,
212
+ message: `Successfully created request from cURL`,
213
+ request: {
214
+ id: requestId,
215
+ name: newRequest.name,
216
+ method: newRequest.method,
217
+ url: newRequest.url,
218
+ headersCount: newRequest.headers.length,
219
+ hasBody: !!newRequest.body,
220
+ },
221
+ }, null, 2),
222
+ },
223
+ ],
224
+ };
225
+ },
226
+ },
227
+ {
228
+ name: 'import_from_postman',
229
+ description: 'Import collections from a Postman Collection v2.1 JSON file',
230
+ inputSchema: {
231
+ type: 'object',
232
+ properties: {
233
+ filePath: { type: 'string', description: 'Path to the Postman collection JSON file' },
234
+ },
235
+ required: ['filePath'],
236
+ },
237
+ handler: async (request) => {
238
+ const { filePath } = request.params.arguments;
239
+ if (!fs.existsSync(filePath)) {
240
+ throw new Error(`File not found at path: ${filePath}`);
241
+ }
242
+ const fileContent = fs.readFileSync(filePath, 'utf-8');
243
+ const postmanData = JSON.parse(fileContent);
244
+ if (!postmanData.info.schema) {
245
+ throw new Error('Invalid Postman collection format. Expected Postman Collection v2.1');
246
+ }
247
+ if (!postmanData.info.schema.includes('v2.1') && !postmanData.info.schema.includes('v2.0')) {
248
+ throw new Error(`Unsupported Postman schema version. Expected v2.0 or v2.1, got: ${postmanData.info.schema}`);
249
+ }
250
+ const workspaceId = `wrk_${uuidv4().replace(/-/g, '')}`;
251
+ const collection = convertPostmanToInsomnia(postmanData, workspaceId);
252
+ storage.saveCollection(workspaceId, collection);
253
+ return {
254
+ content: [
255
+ {
256
+ type: 'text',
257
+ text: JSON.stringify({
258
+ success: true,
259
+ message: `Successfully imported Postman collection "${postmanData.info.name}"`,
260
+ collection: {
261
+ id: workspaceId,
262
+ name: collection.workspace.name,
263
+ requestCount: collection.requests.length,
264
+ folderCount: collection.folders.length,
265
+ environmentCount: collection.environments.length,
266
+ },
267
+ }, null, 2),
268
+ },
269
+ ],
270
+ };
271
+ },
272
+ },
273
+ {
274
+ name: 'import_from_openapi',
275
+ description: 'Generate requests from OpenAPI/Swagger specification',
276
+ inputSchema: {
277
+ type: 'object',
278
+ properties: {
279
+ filePath: { type: 'string', description: 'Path to OpenAPI spec file (JSON or YAML)' },
280
+ collectionName: { type: 'string', description: 'Name for the new collection' },
281
+ baseUrl: { type: 'string', description: 'Base URL to use for requests (overrides spec servers)' },
282
+ },
283
+ required: ['filePath'],
284
+ },
285
+ handler: async (request) => {
286
+ const { filePath, collectionName, baseUrl } = request.params.arguments;
287
+ if (!fs.existsSync(filePath)) {
288
+ throw new Error(`File not found at path: ${filePath}`);
289
+ }
290
+ const fileContent = fs.readFileSync(filePath, 'utf-8');
291
+ let spec;
292
+ try {
293
+ spec = JSON.parse(fileContent);
294
+ }
295
+ catch {
296
+ throw new Error('Failed to parse OpenAPI spec. Only JSON format is supported. For YAML, please convert to JSON first.');
297
+ }
298
+ if (!spec.openapi && !spec.swagger) {
299
+ throw new Error('Invalid OpenAPI/Swagger specification');
300
+ }
301
+ const workspaceId = `wrk_${uuidv4().replace(/-/g, '')}`;
302
+ const collection = convertOpenAPIToInsomnia(spec, workspaceId, collectionName, baseUrl);
303
+ storage.saveCollection(workspaceId, collection);
304
+ return {
305
+ content: [
306
+ {
307
+ type: 'text',
308
+ text: JSON.stringify({
309
+ success: true,
310
+ message: `Successfully imported OpenAPI spec`,
311
+ collection: {
312
+ id: workspaceId,
313
+ name: collection.workspace.name,
314
+ requestCount: collection.requests.length,
315
+ folderCount: collection.folders.length,
316
+ },
317
+ }, null, 2),
318
+ },
319
+ ],
320
+ };
321
+ },
322
+ },
323
+ ];
324
+ function convertOpenAPIToInsomnia(spec, workspaceId, customName, customBaseUrl) {
325
+ const workspace = {
326
+ _id: workspaceId,
327
+ _type: 'workspace',
328
+ name: customName || spec.info.title,
329
+ description: spec.info.description || `OpenAPI ${String(spec.openapi || spec.swagger)}`,
330
+ scope: 'collection',
331
+ created: Date.now(),
332
+ modified: Date.now(),
333
+ };
334
+ const baseUrl = customBaseUrl || spec.servers?.[0]?.url || 'http://localhost';
335
+ const folders = [];
336
+ const requests = [];
337
+ const tagFolders = new Map();
338
+ let folderCounter = 0;
339
+ let requestCounter = 0;
340
+ const methods = ['get', 'post', 'put', 'delete', 'patch', 'options', 'head'];
341
+ for (const [path, pathItem] of Object.entries(spec.paths)) {
342
+ for (const method of methods) {
343
+ const operation = pathItem[method];
344
+ if (!operation)
345
+ continue;
346
+ let parentId = workspaceId;
347
+ if (operation.tags && operation.tags.length > 0) {
348
+ const tag = operation.tags[0];
349
+ if (!tagFolders.has(tag)) {
350
+ const folderId = `fld_${workspaceId}_${String(folderCounter++)}`;
351
+ tagFolders.set(tag, folderId);
352
+ folders.push({
353
+ _id: folderId,
354
+ _type: 'request_group',
355
+ parentId: workspaceId,
356
+ name: tag,
357
+ created: Date.now(),
358
+ modified: Date.now(),
359
+ });
360
+ }
361
+ parentId = tagFolders.get(tag) || workspaceId;
362
+ }
363
+ const requestId = `req_${workspaceId}_${String(requestCounter++)}`;
364
+ const url = `${baseUrl}${path}`;
365
+ const headers = [];
366
+ const parameters = [];
367
+ if (operation.parameters) {
368
+ for (const param of operation.parameters) {
369
+ const defaultValue = param.schema?.default;
370
+ let valueStr = '';
371
+ if (defaultValue !== undefined && defaultValue !== null) {
372
+ if (typeof defaultValue === 'string') {
373
+ valueStr = defaultValue;
374
+ }
375
+ else if (typeof defaultValue === 'number' || typeof defaultValue === 'boolean') {
376
+ valueStr = String(defaultValue);
377
+ }
378
+ else {
379
+ valueStr = JSON.stringify(defaultValue);
380
+ }
381
+ }
382
+ if (param.in === 'query') {
383
+ parameters.push({
384
+ name: param.name,
385
+ value: valueStr,
386
+ description: param.description,
387
+ });
388
+ }
389
+ else if (param.in === 'header') {
390
+ headers.push({
391
+ name: param.name,
392
+ value: valueStr,
393
+ description: param.description,
394
+ });
395
+ }
396
+ }
397
+ }
398
+ let body = undefined;
399
+ if (operation.requestBody?.content) {
400
+ const contentMap = operation.requestBody.content;
401
+ if (Object.prototype.hasOwnProperty.call(contentMap, 'application/json')) {
402
+ const jsonContent = contentMap['application/json'];
403
+ body = {
404
+ mimeType: 'application/json',
405
+ text: jsonContent.example ? JSON.stringify(jsonContent.example, null, 2) : '{}',
406
+ };
407
+ headers.push({ name: 'Content-Type', value: 'application/json' });
408
+ }
409
+ }
410
+ requests.push({
411
+ _id: requestId,
412
+ _type: 'request',
413
+ parentId,
414
+ name: operation.summary || operation.operationId || `${method.toUpperCase()} ${path}`,
415
+ description: operation.description,
416
+ url,
417
+ method: method.toUpperCase(),
418
+ headers,
419
+ parameters,
420
+ body,
421
+ created: Date.now(),
422
+ modified: Date.now(),
423
+ });
424
+ }
425
+ }
426
+ return {
427
+ workspace,
428
+ folders,
429
+ requests,
430
+ environments: [],
431
+ };
432
+ }
433
+ //# sourceMappingURL=utility.tools.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utility.tools.js","sourceRoot":"","sources":["../../src/tools/utility.tools.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AACzB,OAAO,EAAE,EAAE,IAAI,MAAM,EAAE,MAAM,MAAM,CAAC;AACpC,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAW9C,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,EAAE,wBAAwB,EAAqB,MAAM,+BAA+B,CAAC;AAE5F,SAAS,2BAA2B,CAAC,OAAwB;IACzD,OAAO;QACH,MAAM,EAAE,OAAO,CAAC,MAAM;QACtB,GAAG,EAAE,OAAO,CAAC,GAAG;QAChB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AAC,SAAS,CAAC,WAAW,CAAC,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI;qBAClF,CAAC;oBACF,OAAO,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,cAAc,EAAE,KAAK,EAAE,kBAAkB,EAAE,CAAC,CAAC;gBACtE,CAAC;YACL,CAAC;YAED,QAAQ,CAAC,IAAI,CAAC;gBACV,GAAG,EAAE,SAAS;gBACd,KAAK,EAAE,SAAS;gBAChB,QAAQ;gBACR,IAAI,EAAE,SAAS,CAAC,OAAO,IAAI,SAAS,CAAC,WAAW,IAAI,GAAG,MAAM,CAAC,WAAW,EAAE,IAAI,IAAI,EAAE;gBACrF,WAAW,EAAE,SAAS,CAAC,WAAW;gBAClC,GAAG;gBACH,MAAM,EAAE,MAAM,CAAC,WAAW,EAA+B;gBACzD,OAAO;gBACP,UAAU;gBACV,IAAI;gBACJ,OAAO,EAAE,IAAI,CAAC,GAAG,EAAE;gBACnB,QAAQ,EAAE,IAAI,CAAC,GAAG,EAAE;aACvB,CAAC,CAAC;QACP,CAAC;IACL,CAAC;IAED,OAAO;QACH,SAAS;QACT,OAAO;QACP,QAAQ;QACR,YAAY,EAAE,EAAE;KACnB,CAAC;AACN,CAAC"}
@@ -0,0 +1,25 @@
1
+ export interface InsomniaAuthentication {
2
+ type: 'basic' | 'bearer' | 'oauth1' | 'oauth2' | 'digest' | 'ntlm' | 'aws-iam-v4' | 'hawk';
3
+ username?: string;
4
+ password?: string;
5
+ token?: string;
6
+ prefix?: string;
7
+ disabled?: boolean;
8
+ consumerKey?: string;
9
+ consumerSecret?: string;
10
+ tokenKey?: string;
11
+ tokenSecret?: string;
12
+ signatureMethod?: string;
13
+ grantType?: string;
14
+ accessTokenUrl?: string;
15
+ authorizationUrl?: string;
16
+ clientId?: string;
17
+ clientSecret?: string;
18
+ scope?: string;
19
+ accessKeyId?: string;
20
+ secretAccessKey?: string;
21
+ sessionToken?: string;
22
+ region?: string;
23
+ service?: string;
24
+ }
25
+ //# sourceMappingURL=auth.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../../src/types/auth.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,sBAAsB;IACnC,IAAI,EAAE,OAAO,GAAG,QAAQ,GAAG,QAAQ,GAAG,QAAQ,GAAG,QAAQ,GAAG,MAAM,GAAG,YAAY,GAAG,MAAM,CAAC;IAC3F,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC;CACpB"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=auth.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"auth.js","sourceRoot":"","sources":["../../src/types/auth.ts"],"names":[],"mappings":""}
@@ -0,0 +1,48 @@
1
+ export interface InsomniaCollection {
2
+ _type: 'export';
3
+ __export_format: number;
4
+ __export_date: string;
5
+ __export_source: string;
6
+ resources: InsomniaResource[];
7
+ }
8
+ export interface InsomniaResource {
9
+ _id: string;
10
+ _type: string;
11
+ parentId?: string;
12
+ name: string;
13
+ description?: string;
14
+ modified: number;
15
+ created: number;
16
+ }
17
+ export interface InsomniaWorkspace extends InsomniaResource {
18
+ _type: 'workspace';
19
+ scope: 'collection' | 'design';
20
+ }
21
+ export interface InsomniaProject extends InsomniaResource {
22
+ _type: 'project';
23
+ remoteId: string | null;
24
+ }
25
+ export interface InsomniaRequestGroup extends InsomniaResource {
26
+ _type: 'request_group';
27
+ environment?: Record<string, string | number | boolean>;
28
+ }
29
+ export interface CollectionStructure {
30
+ workspace: InsomniaWorkspace;
31
+ folders: InsomniaRequestGroup[];
32
+ requests: InsomniaRequest[];
33
+ environments: InsomniaEnvironment[];
34
+ }
35
+ export interface CreateCollectionParams {
36
+ name: string;
37
+ description?: string;
38
+ scope?: 'collection' | 'design';
39
+ }
40
+ export interface CreateFolderParams {
41
+ collectionId: string;
42
+ parentId?: string;
43
+ name: string;
44
+ description?: string;
45
+ }
46
+ import type { InsomniaRequest } from './request.js';
47
+ import type { InsomniaEnvironment } from './environment.js';
48
+ //# sourceMappingURL=collection.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"collection.d.ts","sourceRoot":"","sources":["../../src/types/collection.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,kBAAkB;IAC/B,KAAK,EAAE,QAAQ,CAAC;IAChB,eAAe,EAAE,MAAM,CAAC;IACxB,aAAa,EAAE,MAAM,CAAC;IACtB,eAAe,EAAE,MAAM,CAAC;IACxB,SAAS,EAAE,gBAAgB,EAAE,CAAC;CACjC;AAED,MAAM,WAAW,gBAAgB;IAC7B,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,MAAM,CAAC;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/types/collection.ts"],"names":[],"mappings":""}
@@ -0,0 +1,63 @@
1
+ import type { InsomniaRequestGroup } from './collection.js';
2
+ import type { InsomniaRequest } from './request.js';
3
+ import type { InsomniaEnvironment } from './environment.js';
4
+ export interface CollectionItem {
5
+ _id: string;
6
+ _type: string;
7
+ name: string;
8
+ parentId?: string;
9
+ description?: string;
10
+ created: number;
11
+ modified: number;
12
+ }
13
+ export interface EnvironmentVariable {
14
+ key: string;
15
+ value: string | number | boolean;
16
+ type: string;
17
+ }
18
+ export interface SearchResult {
19
+ type: 'Collection' | 'Folder' | 'Request';
20
+ id: string;
21
+ name: string;
22
+ collection?: {
23
+ id: string;
24
+ name: string;
25
+ };
26
+ match: string;
27
+ }
28
+ export interface ActivityItem {
29
+ type: 'request' | 'collection';
30
+ id: string;
31
+ name: string;
32
+ collectionName?: string;
33
+ method?: string;
34
+ requestCount?: number;
35
+ modified: number;
36
+ }
37
+ export interface ExportCollectionArgs {
38
+ collectionId: string;
39
+ filePath?: string;
40
+ }
41
+ export interface ImportFileArgs {
42
+ filePath: string;
43
+ }
44
+ export interface DeleteRequestArgs {
45
+ requestId: string;
46
+ }
47
+ export interface ExecuteRequestArgs {
48
+ requestId: string;
49
+ environmentVariables?: Record<string, string | number | boolean>;
50
+ }
51
+ export interface GetEnvironmentArgs {
52
+ collectionId: string;
53
+ environmentId?: string;
54
+ }
55
+ export interface GenerateCodeArgs {
56
+ requestId: string;
57
+ target: string;
58
+ client?: string;
59
+ }
60
+ export type FolderList = InsomniaRequestGroup[];
61
+ export type RequestList = InsomniaRequest[];
62
+ export type EnvironmentList = InsomniaEnvironment[];
63
+ //# sourceMappingURL=common.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../src/types/common.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AAC5D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC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AW,kBAAkB;IAC/B,SAAS,EAAE,MAAM,CAAC;IAClB,oBAAoB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC,CAAC;CACpE;AAED,MAAM,WAAW,kBAAkB;IAC/B,YAAY,EAAE,MAAM,CAAC;IACrB,aAAa,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED,MAAM,WAAW,gBAAgB;IAC7B,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,MAAM,UAAU,GAAG,oBAAoB,EAAE,CAAC;AAChD,MAAM,MAAM,WAAW,GAAG,eAAe,EAAE,CAAC;AAC5C,MAAM,MAAM,eAAe,GAAG,mBAAmB,EAAE,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=common.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"common.js","sourceRoot":"","sources":["../../src/types/common.ts"],"names":[],"mappings":""}
@@ -0,0 +1,17 @@
1
+ import type { InsomniaResource } from './collection.js';
2
+ export type EnvironmentValue = string | number | boolean;
3
+ export interface InsomniaEnvironment extends InsomniaResource {
4
+ _type: 'environment';
5
+ data: Record<string, EnvironmentValue>;
6
+ dataPropertyOrder?: Record<string, number>;
7
+ color?: string;
8
+ isPrivate?: boolean;
9
+ }
10
+ export interface SetEnvironmentVariableParams {
11
+ collectionId: string;
12
+ environmentId?: string;
13
+ key: string;
14
+ value: EnvironmentValue;
15
+ description?: string;
16
+ }
17
+ //# sourceMappingURL=environment.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"environment.d.ts","sourceRoot":"","sources":["../../src/types/environment.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAExD,MAAM,MAAM,gBAAgB,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC;AAEzD,MAAM,WAAW,mBAAoB,SAAQ,gBAAgB;IACzD,KAAK,EAAE,aAAa,CAAC;IACrB,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAAC;IACvC,iBAAiB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC3C,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,OAAO,CAAC;CACvB;AAED,MAAM,WAAW,4BAA4B;IACzC,YAAY,EAAE,MAAM,CAAC;IACrB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,gBAAgB,CAAC;IACxB,WAAW,CAAC,EAAE,MAAM,CAAC;CACxB"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=environment.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"environment.js","sourceRoot":"","sources":["../../src/types/environment.ts"],"names":[],"mappings":""}