openpost 1.0.4

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 (116) hide show
  1. package/README.md +359 -0
  2. package/dist/auth/authHandler.d.ts +11 -0
  3. package/dist/auth/authHandler.d.ts.map +1 -0
  4. package/dist/builtInVault.d.ts +25 -0
  5. package/dist/builtInVault.d.ts.map +1 -0
  6. package/dist/cli/commands/config.d.ts +3 -0
  7. package/dist/cli/commands/config.d.ts.map +1 -0
  8. package/dist/cli/commands/crud.d.ts +3 -0
  9. package/dist/cli/commands/crud.d.ts.map +1 -0
  10. package/dist/cli/commands/envVar.d.ts +3 -0
  11. package/dist/cli/commands/envVar.d.ts.map +1 -0
  12. package/dist/cli/commands/importExport.d.ts +3 -0
  13. package/dist/cli/commands/importExport.d.ts.map +1 -0
  14. package/dist/cli/commands/license.d.ts +3 -0
  15. package/dist/cli/commands/license.d.ts.map +1 -0
  16. package/dist/cli/commands/list.d.ts +4 -0
  17. package/dist/cli/commands/list.d.ts.map +1 -0
  18. package/dist/cli/commands/proxyCookie.d.ts +3 -0
  19. package/dist/cli/commands/proxyCookie.d.ts.map +1 -0
  20. package/dist/cli/commands/run.d.ts +3 -0
  21. package/dist/cli/commands/run.d.ts.map +1 -0
  22. package/dist/cli/commands/servers.d.ts +3 -0
  23. package/dist/cli/commands/servers.d.ts.map +1 -0
  24. package/dist/cli/commands/vault.d.ts +3 -0
  25. package/dist/cli/commands/vault.d.ts.map +1 -0
  26. package/dist/cli/config.d.ts +23 -0
  27. package/dist/cli/config.d.ts.map +1 -0
  28. package/dist/cli/mcp-collection-stdio.d.ts +13 -0
  29. package/dist/cli/mcp-collection-stdio.d.ts.map +1 -0
  30. package/dist/cli/mcp-stdio.d.ts +13 -0
  31. package/dist/cli/mcp-stdio.d.ts.map +1 -0
  32. package/dist/cli/openpost.d.ts +64 -0
  33. package/dist/cli/openpost.d.ts.map +1 -0
  34. package/dist/cli/output.d.ts +29 -0
  35. package/dist/cli/output.d.ts.map +1 -0
  36. package/dist/cli-bundle.js +263 -0
  37. package/dist/container/serviceContainer.d.ts +35 -0
  38. package/dist/container/serviceContainer.d.ts.map +1 -0
  39. package/dist/cookieJar.d.ts +18 -0
  40. package/dist/cookieJar.d.ts.map +1 -0
  41. package/dist/curlParser.d.ts +11 -0
  42. package/dist/curlParser.d.ts.map +1 -0
  43. package/dist/errors/appError.d.ts +35 -0
  44. package/dist/errors/appError.d.ts.map +1 -0
  45. package/dist/events/typedEventBus.d.ts +9 -0
  46. package/dist/events/typedEventBus.d.ts.map +1 -0
  47. package/dist/httpClient.d.ts +15 -0
  48. package/dist/httpClient.d.ts.map +1 -0
  49. package/dist/index.d.ts +50 -0
  50. package/dist/index.d.ts.map +1 -0
  51. package/dist/index.min.js +212 -0
  52. package/dist/inheritance.d.ts +9 -0
  53. package/dist/inheritance.d.ts.map +1 -0
  54. package/dist/interfaces/configProvider.d.ts +10 -0
  55. package/dist/interfaces/configProvider.d.ts.map +1 -0
  56. package/dist/interfaces/eventBus.d.ts +44 -0
  57. package/dist/interfaces/eventBus.d.ts.map +1 -0
  58. package/dist/interfaces/fileStore.d.ts +66 -0
  59. package/dist/interfaces/fileStore.d.ts.map +1 -0
  60. package/dist/interfaces/logger.d.ts +9 -0
  61. package/dist/interfaces/logger.d.ts.map +1 -0
  62. package/dist/interfaces/secretStorage.d.ts +7 -0
  63. package/dist/interfaces/secretStorage.d.ts.map +1 -0
  64. package/dist/interpolation.d.ts +10 -0
  65. package/dist/interpolation.d.ts.map +1 -0
  66. package/dist/licenseValidator.d.ts +18 -0
  67. package/dist/licenseValidator.d.ts.map +1 -0
  68. package/dist/managementMcpServer.d.ts +80 -0
  69. package/dist/managementMcpServer.d.ts.map +1 -0
  70. package/dist/mcpServer.d.ts +54 -0
  71. package/dist/mcpServer.d.ts.map +1 -0
  72. package/dist/mcpToolDefs.d.ts +13 -0
  73. package/dist/mcpToolDefs.d.ts.map +1 -0
  74. package/dist/mcpToolEngine.d.ts +22 -0
  75. package/dist/mcpToolEngine.d.ts.map +1 -0
  76. package/dist/mockServer.d.ts +117 -0
  77. package/dist/mockServer.d.ts.map +1 -0
  78. package/dist/mockServerManager.d.ts +219 -0
  79. package/dist/mockServerManager.d.ts.map +1 -0
  80. package/dist/openApiGenerator.d.ts +19 -0
  81. package/dist/openApiGenerator.d.ts.map +1 -0
  82. package/dist/openApiParser.d.ts +11 -0
  83. package/dist/openApiParser.d.ts.map +1 -0
  84. package/dist/openpost.d.ts +101 -0
  85. package/dist/openpost.d.ts.map +1 -0
  86. package/dist/routeMatcher.d.ts +59 -0
  87. package/dist/routeMatcher.d.ts.map +1 -0
  88. package/dist/scripting/sandbox.d.ts +14 -0
  89. package/dist/scripting/sandbox.d.ts.map +1 -0
  90. package/dist/serverRegistry.d.ts +22 -0
  91. package/dist/serverRegistry.d.ts.map +1 -0
  92. package/dist/services/collectionRunEngine.d.ts +24 -0
  93. package/dist/services/collectionRunEngine.d.ts.map +1 -0
  94. package/dist/services/collectionService.d.ts +22 -0
  95. package/dist/services/collectionService.d.ts.map +1 -0
  96. package/dist/services/environmentService.d.ts +16 -0
  97. package/dist/services/environmentService.d.ts.map +1 -0
  98. package/dist/services/historyService.d.ts +16 -0
  99. package/dist/services/historyService.d.ts.map +1 -0
  100. package/dist/services/requestEngine.d.ts +49 -0
  101. package/dist/services/requestEngine.d.ts.map +1 -0
  102. package/dist/services/settingsService.d.ts +21 -0
  103. package/dist/services/settingsService.d.ts.map +1 -0
  104. package/dist/services/snapshotEngine.d.ts +23 -0
  105. package/dist/services/snapshotEngine.d.ts.map +1 -0
  106. package/dist/storage/standaloneFileStore.d.ts +109 -0
  107. package/dist/storage/standaloneFileStore.d.ts.map +1 -0
  108. package/dist/stripComments.d.ts +3 -0
  109. package/dist/stripComments.d.ts.map +1 -0
  110. package/dist/testRunner.d.ts +4 -0
  111. package/dist/testRunner.d.ts.map +1 -0
  112. package/dist/types.d.ts +1011 -0
  113. package/dist/types.d.ts.map +1 -0
  114. package/dist/vaultManager.d.ts +50 -0
  115. package/dist/vaultManager.d.ts.map +1 -0
  116. package/package.json +56 -0
@@ -0,0 +1,1011 @@
1
+ export type HttpMethod = string;
2
+ export type BodyType = 'none' | 'json' | 'form-data' | 'x-www-form-urlencoded' | 'raw' | 'xml' | 'graphql' | 'binary';
3
+ export type AuthType = 'none' | 'basic' | 'bearer' | 'api-key' | 'oauth2' | 'aws-sigv4' | 'digest';
4
+ export interface ProxyConfig {
5
+ id: string;
6
+ name: string;
7
+ protocol: 'http' | 'https';
8
+ host: string;
9
+ port: number;
10
+ username?: string;
11
+ password?: string;
12
+ }
13
+ export interface KeyValue {
14
+ key: string;
15
+ value: string;
16
+ enabled: boolean;
17
+ }
18
+ export interface AuthConfig {
19
+ type: AuthType;
20
+ basic?: {
21
+ username: string;
22
+ password: string;
23
+ };
24
+ bearer?: {
25
+ token: string;
26
+ };
27
+ apiKey?: {
28
+ key: string;
29
+ value: string;
30
+ addTo: 'header' | 'query';
31
+ };
32
+ oauth2?: {
33
+ grantType: 'authorization_code' | 'client_credentials';
34
+ authUrl: string;
35
+ tokenUrl: string;
36
+ clientId: string;
37
+ clientSecret: string;
38
+ scope: string;
39
+ accessToken?: string;
40
+ };
41
+ awsSigV4?: {
42
+ accessKey: string;
43
+ secretKey: string;
44
+ region: string;
45
+ service: string;
46
+ };
47
+ digest?: {
48
+ username: string;
49
+ password: string;
50
+ };
51
+ }
52
+ export interface FormDataItem extends KeyValue {
53
+ fieldType: 'text' | 'file';
54
+ filePath?: string;
55
+ fileName?: string;
56
+ }
57
+ export interface RequestBody {
58
+ type: BodyType;
59
+ raw?: string;
60
+ formData?: KeyValue[];
61
+ formDataFiles?: FormDataItem[];
62
+ graphql?: {
63
+ query: string;
64
+ variables: string;
65
+ };
66
+ binaryPath?: string;
67
+ binaryName?: string;
68
+ }
69
+ export interface CertificateConfig {
70
+ clientCertId?: string;
71
+ privateKeyId?: string;
72
+ caBundleId?: string;
73
+ }
74
+ export interface ApiRequest {
75
+ id: string;
76
+ name: string;
77
+ method: HttpMethod;
78
+ url: string;
79
+ params: KeyValue[];
80
+ headers: KeyValue[];
81
+ body: RequestBody;
82
+ auth: AuthConfig;
83
+ inheritAuth?: boolean;
84
+ inheritScripts?: boolean;
85
+ inheritCertificate?: boolean;
86
+ preRequestScript?: string;
87
+ testScript?: string;
88
+ testRules?: TestRule[];
89
+ setVariables?: SetVariable[];
90
+ proxyId?: string;
91
+ certificateConfig?: CertificateConfig;
92
+ mcpDescription?: string;
93
+ mcpInputSchema?: object;
94
+ }
95
+ export type TestSource = 'status' | 'time' | 'size' | 'body' | 'jsonpath' | 'header' | 'content-type' | 'content-length' | 'body-contains' | 'body-is-json' | 'body-schema';
96
+ export type TestOperator = 'eq' | 'neq' | 'gt' | 'gte' | 'lt' | 'lte' | 'contains' | 'not-contains' | 'matches' | 'not-matches' | 'is-empty' | 'is-not-empty' | 'exists' | 'not-exists' | 'is-type';
97
+ export interface TestRule {
98
+ id: string;
99
+ source: TestSource;
100
+ property: string;
101
+ operator: TestOperator;
102
+ expected: string;
103
+ enabled: boolean;
104
+ }
105
+ export interface TestResult {
106
+ ruleId: string;
107
+ passed: boolean;
108
+ label: string;
109
+ actual: string;
110
+ expected: string;
111
+ }
112
+ export interface SetVariable {
113
+ id: string;
114
+ source: 'jsonpath' | 'header' | 'body' | 'regex';
115
+ property: string;
116
+ variableName: string;
117
+ enabled: boolean;
118
+ }
119
+ export interface ActualRequest {
120
+ method: string;
121
+ url: string;
122
+ headers: Record<string, string>;
123
+ body: string | null;
124
+ certificateNames?: string;
125
+ }
126
+ export interface ApiResponse {
127
+ status: number;
128
+ statusText: string;
129
+ headers: Record<string, string>;
130
+ body: string;
131
+ time: number;
132
+ size: number;
133
+ cookies?: CookieEntry[];
134
+ testResults?: TestResult[];
135
+ scriptLogs?: string[];
136
+ actualRequest?: ActualRequest;
137
+ }
138
+ export interface Environment {
139
+ id: string;
140
+ name: string;
141
+ variables: KeyValue[];
142
+ }
143
+ export interface CollectionFolder {
144
+ id: string;
145
+ name: string;
146
+ requests: ApiRequest[];
147
+ folders: CollectionFolder[];
148
+ auth?: AuthConfig;
149
+ inheritAuth?: boolean;
150
+ certificateConfig?: CertificateConfig;
151
+ inheritCertificate?: boolean;
152
+ preRequestScript?: string;
153
+ testScript?: string;
154
+ inheritScripts?: boolean;
155
+ }
156
+ export interface Collection {
157
+ id: string;
158
+ name: string;
159
+ description?: string;
160
+ folders: CollectionFolder[];
161
+ requests: ApiRequest[];
162
+ variables: KeyValue[];
163
+ auth?: AuthConfig;
164
+ certificateConfig?: CertificateConfig;
165
+ preRequestScript?: string;
166
+ testScript?: string;
167
+ }
168
+ export interface CookieEntry {
169
+ name: string;
170
+ value: string;
171
+ domain: string;
172
+ path: string;
173
+ expires: string | null;
174
+ httpOnly: boolean;
175
+ secure: boolean;
176
+ sameSite: 'Strict' | 'Lax' | 'None' | null;
177
+ createdAt: string;
178
+ }
179
+ export interface HistoryEntry {
180
+ id: string;
181
+ timestamp: number;
182
+ request: ApiRequest;
183
+ response: ApiResponse;
184
+ }
185
+ export interface SnapshotRecord {
186
+ id: string;
187
+ timestamp: number;
188
+ request: ApiRequest;
189
+ response: ApiResponse;
190
+ }
191
+ export interface ContractVariantEvent {
192
+ timestamp: number;
193
+ recordId: string;
194
+ }
195
+ export interface ContractVariant {
196
+ id: string;
197
+ signature: string;
198
+ summary: string;
199
+ sampleBody: string;
200
+ contentType: string;
201
+ firstSeen: number;
202
+ lastSeen: number;
203
+ occurrences: number;
204
+ history: ContractVariantEvent[];
205
+ }
206
+ export interface ContractStatusBucket {
207
+ status: number;
208
+ latestVariantId: string | null;
209
+ variants: ContractVariant[];
210
+ }
211
+ export interface ContractVariantPrompt {
212
+ promptId: string;
213
+ snapshotId: string;
214
+ status: number;
215
+ signature: string;
216
+ summary: string;
217
+ }
218
+ export interface Snapshot {
219
+ id: string;
220
+ name: string;
221
+ createdAt: number;
222
+ baseRequest: ApiRequest;
223
+ records: SnapshotRecord[];
224
+ responseContracts?: ContractStatusBucket[];
225
+ }
226
+ export interface DeleteHistoryPayload {
227
+ id: string;
228
+ }
229
+ export interface MockRouteResponse {
230
+ status: number;
231
+ headers: KeyValue[];
232
+ body: string;
233
+ }
234
+ export interface MockRoute {
235
+ id: string;
236
+ method: string;
237
+ path: string;
238
+ enabled: boolean;
239
+ responseSource: 'snapshot' | 'custom' | 'file';
240
+ responsePath?: string;
241
+ snapshotId?: string;
242
+ snapshotRecordId?: string;
243
+ response: MockRouteResponse;
244
+ collectionRequestId?: string;
245
+ collectionId?: string;
246
+ name: string;
247
+ mcpDescription?: string;
248
+ mcpInputSchema?: object;
249
+ }
250
+ export interface MockConfig {
251
+ port: number;
252
+ routes: MockRoute[];
253
+ autoStart: boolean;
254
+ maxLogEntries: number;
255
+ }
256
+ export interface MockServerConfig {
257
+ id: string;
258
+ name: string;
259
+ port: number;
260
+ routes: MockRoute[];
261
+ autoStart: boolean;
262
+ maxLogEntries: number;
263
+ swaggerEnabled: boolean;
264
+ mcpEnabled?: boolean;
265
+ }
266
+ export interface MockServerCollection {
267
+ openpost_mock_server: '1.0';
268
+ server: MockServerConfig;
269
+ }
270
+ export interface MockLogEntry {
271
+ id: string;
272
+ timestamp: number;
273
+ method: string;
274
+ path: string;
275
+ matched: boolean;
276
+ routeId?: string;
277
+ routeName?: string;
278
+ responseStatus: number;
279
+ }
280
+ export interface MockServerStatusData {
281
+ running: boolean;
282
+ port: number;
283
+ error?: string;
284
+ ownedByThisWindow?: boolean;
285
+ remotePid?: number;
286
+ remoteWorkspace?: string;
287
+ }
288
+ export interface CollectionRunResult {
289
+ requestId: string;
290
+ requestName: string;
291
+ method: string;
292
+ url: string;
293
+ status: number;
294
+ time: number;
295
+ passed: boolean;
296
+ error?: string;
297
+ responseBody?: string;
298
+ responseHeaders?: Record<string, string>;
299
+ testResults?: TestResult[];
300
+ extractedVars?: Record<string, string>;
301
+ scriptLogs?: string[];
302
+ }
303
+ export interface CollectionRunEntry {
304
+ id: string;
305
+ collectionId: string;
306
+ scope: 'local' | 'global';
307
+ timestamp: number;
308
+ mode: 'sequential' | 'parallel';
309
+ total: number;
310
+ passed: number;
311
+ failed: number;
312
+ time: number;
313
+ results: CollectionRunResult[];
314
+ }
315
+ export interface McpServerConfig {
316
+ id: string;
317
+ name: string;
318
+ collectionId: string;
319
+ scope: 'local' | 'global';
320
+ port: number;
321
+ autoStart: boolean;
322
+ swaggerEnabled: boolean;
323
+ maxLogEntries: number;
324
+ environmentId?: string;
325
+ environmentScope?: 'local' | 'global';
326
+ transport?: 'http' | 'stdio';
327
+ stdioEnabled?: boolean;
328
+ }
329
+ export type CertificateFormat = 'pem' | 'pfx' | 'der';
330
+ export type CertificateType = 'client-cert' | 'private-key' | 'ca-bundle';
331
+ export type VaultProviderType = 'azure-keyvault' | 'aws-secrets-manager' | 'hashicorp-vault' | 'built-in';
332
+ export interface BuiltInVaultConfig {
333
+ }
334
+ export interface VaultProvider {
335
+ id: string;
336
+ name: string;
337
+ type: VaultProviderType;
338
+ config: BuiltInVaultConfig;
339
+ }
340
+ export interface SecretEntry {
341
+ id: string;
342
+ key: string;
343
+ variableName: string;
344
+ enabled: boolean;
345
+ }
346
+ export interface SecretSet {
347
+ id: string;
348
+ name: string;
349
+ providerId: string;
350
+ staleFallback: boolean;
351
+ entries: SecretEntry[];
352
+ lastRefreshedAt?: number;
353
+ }
354
+ export interface CertificateEntry {
355
+ id: string;
356
+ name: string;
357
+ format: CertificateFormat;
358
+ certType: CertificateType;
359
+ data: string;
360
+ passphrase?: string;
361
+ }
362
+ export interface VaultStatus {
363
+ builtInVaultExists: boolean;
364
+ builtInVaultUnlocked: boolean;
365
+ keepUnlocked?: boolean;
366
+ }
367
+ export type MessageToWebview = {
368
+ type: 'response';
369
+ data: ApiResponse;
370
+ } | {
371
+ type: 'error';
372
+ message: string;
373
+ } | {
374
+ type: 'environments';
375
+ data: Environment[];
376
+ } | {
377
+ type: 'collections';
378
+ data: Collection[];
379
+ } | {
380
+ type: 'history';
381
+ data: HistoryEntry[];
382
+ } | {
383
+ type: 'activeEnvironment';
384
+ id: string | null;
385
+ } | {
386
+ type: 'filePicked';
387
+ purpose: string;
388
+ filePath: string;
389
+ fileName: string;
390
+ } | {
391
+ type: 'cookies';
392
+ data: CookieEntry[];
393
+ } | {
394
+ type: 'tabSettings';
395
+ data: {
396
+ tabViewCollapsed: boolean;
397
+ tabGrouping: boolean;
398
+ subtleContracts: boolean;
399
+ autoHideSidebar: boolean;
400
+ simpleMode: boolean;
401
+ uiZoom: number;
402
+ };
403
+ } | {
404
+ type: 'snapshots';
405
+ data: Snapshot[];
406
+ } | {
407
+ type: 'contractVariantPrompt';
408
+ data: ContractVariantPrompt;
409
+ } | {
410
+ type: 'globalCollections';
411
+ data: Collection[];
412
+ } | {
413
+ type: 'globalEnvironments';
414
+ data: Environment[];
415
+ } | {
416
+ type: 'globalHistory';
417
+ data: HistoryEntry[];
418
+ } | {
419
+ type: 'globalActiveEnvironment';
420
+ id: string | null;
421
+ } | {
422
+ type: 'session';
423
+ data: unknown;
424
+ } | {
425
+ type: 'vscodeSettings';
426
+ data: {
427
+ sslVerification: boolean;
428
+ cookiesEnabled: boolean;
429
+ tabViewCollapsed: boolean;
430
+ tabGrouping: boolean;
431
+ subtleContracts: boolean;
432
+ autoHideSidebar: boolean;
433
+ simpleMode: boolean;
434
+ requestTimeout: number;
435
+ maxResponseSize: number;
436
+ };
437
+ } | {
438
+ type: 'loadRequest';
439
+ data: ApiRequest;
440
+ collectionId: string | null;
441
+ response?: unknown;
442
+ } | {
443
+ type: 'proxies';
444
+ data: ProxyConfig[];
445
+ defaultProxyId: string | null;
446
+ } | {
447
+ type: 'mockConfig';
448
+ data: MockConfig;
449
+ } | {
450
+ type: 'mockServersConfig';
451
+ data: MockServerConfig[];
452
+ } | {
453
+ type: 'mockServerStatus';
454
+ serverId: string;
455
+ data: MockServerStatusData;
456
+ } | {
457
+ type: 'mockServerLog';
458
+ serverId: string;
459
+ data: MockLogEntry;
460
+ } | {
461
+ type: 'maxMockServers';
462
+ value: number;
463
+ } | {
464
+ type: 'mockResponseFilePicked';
465
+ filePath: string | null;
466
+ fileName: string | null;
467
+ } | {
468
+ type: 'snapshotState';
469
+ } | {
470
+ type: 'collectionRunProgress';
471
+ collectionId: string;
472
+ requestId: string;
473
+ requestName: string;
474
+ method: string;
475
+ url: string;
476
+ status: number;
477
+ time: number;
478
+ passed: boolean;
479
+ error?: string;
480
+ } | {
481
+ type: 'collectionRunComplete';
482
+ collectionId: string;
483
+ total: number;
484
+ passed: number;
485
+ failed: number;
486
+ time: number;
487
+ } | {
488
+ type: 'collectionRunHistory';
489
+ collectionId: string;
490
+ data: CollectionRunEntry[];
491
+ } | {
492
+ type: 'mcpServerStatus';
493
+ collectionId: string;
494
+ running: boolean;
495
+ port: number;
496
+ error?: string;
497
+ } | {
498
+ type: 'mcpServersConfig';
499
+ data: McpServerConfig[];
500
+ } | {
501
+ type: 'mcpServerLog';
502
+ serverId: string;
503
+ data: MockLogEntry;
504
+ } | {
505
+ type: 'managementMcpStatus';
506
+ data: {
507
+ running: boolean;
508
+ port: number;
509
+ enabled: boolean;
510
+ transport: 'stdio' | 'http';
511
+ stdioScriptPath?: string;
512
+ error?: string;
513
+ };
514
+ } | {
515
+ type: 'registryServers';
516
+ data: {
517
+ id: string;
518
+ type: string;
519
+ port: number;
520
+ pid: number;
521
+ workspace: string | null;
522
+ scope: string;
523
+ name: string;
524
+ startedAt: number;
525
+ }[];
526
+ } | {
527
+ type: 'mcpHealthCheckResult';
528
+ data: {
529
+ ok: boolean;
530
+ details: string;
531
+ };
532
+ } | {
533
+ type: 'hasWorkspace';
534
+ value: boolean;
535
+ } | {
536
+ type: 'vaultProviders';
537
+ data: VaultProvider[];
538
+ } | {
539
+ type: 'secretSets';
540
+ data: SecretSet[];
541
+ } | {
542
+ type: 'vaultStatus';
543
+ data: VaultStatus;
544
+ } | {
545
+ type: 'vaultCertificates';
546
+ data: CertificateEntry[];
547
+ } | {
548
+ type: 'builtInSecrets';
549
+ data: Record<string, string>;
550
+ } | {
551
+ type: 'certificateFileRead';
552
+ data: string;
553
+ fileName: string;
554
+ } | {
555
+ type: 'activeSecretSet';
556
+ id: string | null;
557
+ } | {
558
+ type: 'licenseStatus';
559
+ valid: boolean;
560
+ expired?: boolean;
561
+ expiry?: number | null;
562
+ machineId?: string;
563
+ error?: string;
564
+ };
565
+ export type MessageToExtension = {
566
+ type: 'sendRequest';
567
+ data: ApiRequest;
568
+ sslVerification?: boolean;
569
+ proxyId?: string;
570
+ sourceCollectionId?: string;
571
+ sourceFolderPath?: string[];
572
+ sourceScope?: 'local' | 'global';
573
+ followRedirects?: boolean;
574
+ } | {
575
+ type: 'saveRequest';
576
+ data: {
577
+ collectionId: string;
578
+ folderId?: string;
579
+ folderPath?: string[];
580
+ request: ApiRequest;
581
+ };
582
+ } | {
583
+ type: 'loadCollections';
584
+ } | {
585
+ type: 'loadEnvironments';
586
+ } | {
587
+ type: 'saveEnvironment';
588
+ data: Environment;
589
+ } | {
590
+ type: 'deleteEnvironment';
591
+ id: string;
592
+ } | {
593
+ type: 'setActiveEnvironment';
594
+ id: string | null;
595
+ } | {
596
+ type: 'loadHistory';
597
+ } | {
598
+ type: 'createCollection';
599
+ name: string;
600
+ } | {
601
+ type: 'deleteCollection';
602
+ id: string;
603
+ } | {
604
+ type: 'deleteRequest';
605
+ collectionId: string;
606
+ requestId: string;
607
+ folderPath?: string[];
608
+ } | {
609
+ type: 'createFolder';
610
+ collectionId: string;
611
+ name: string;
612
+ parentPath?: string[];
613
+ } | {
614
+ type: 'deleteFolder';
615
+ collectionId: string;
616
+ folderPath: string[];
617
+ } | {
618
+ type: 'runPreRequestScript';
619
+ script: string;
620
+ request: ApiRequest;
621
+ } | {
622
+ type: 'runTestScript';
623
+ script: string;
624
+ request: ApiRequest;
625
+ response: ApiResponse;
626
+ } | {
627
+ type: 'pickFile';
628
+ purpose: string;
629
+ } | {
630
+ type: 'clearHistory';
631
+ } | {
632
+ type: 'deleteHistory';
633
+ id: string;
634
+ } | {
635
+ type: 'loadCookies';
636
+ } | {
637
+ type: 'saveCookie';
638
+ data: CookieEntry;
639
+ } | {
640
+ type: 'deleteCookie';
641
+ domain: string;
642
+ name: string;
643
+ path: string;
644
+ } | {
645
+ type: 'clearCookies';
646
+ } | {
647
+ type: 'setCookiesEnabled';
648
+ enabled: boolean;
649
+ } | {
650
+ type: 'setSslVerification';
651
+ enabled: boolean;
652
+ } | {
653
+ type: 'setRequestTimeout';
654
+ value: number;
655
+ } | {
656
+ type: 'setMaxResponseSize';
657
+ value: number;
658
+ } | {
659
+ type: 'cancelRequest';
660
+ } | {
661
+ type: 'exportCollection';
662
+ collectionId: string;
663
+ scope: 'local' | 'global';
664
+ } | {
665
+ type: 'importCollection';
666
+ scope: 'local' | 'global';
667
+ } | {
668
+ type: 'loadTabSettings';
669
+ } | {
670
+ type: 'setTabSetting';
671
+ key: 'tabViewCollapsed' | 'tabGrouping' | 'subtleContracts' | 'autoHideSidebar' | 'simpleMode';
672
+ value: boolean;
673
+ } | {
674
+ type: 'setUiZoom';
675
+ value: number;
676
+ } | {
677
+ type: 'loadSnapshots';
678
+ } | {
679
+ type: 'saveSnapshot';
680
+ name?: string;
681
+ baseRequest: ApiRequest;
682
+ } | {
683
+ type: 'addSnapshotRecord';
684
+ snapshotId: string;
685
+ request: ApiRequest;
686
+ response: ApiResponse;
687
+ } | {
688
+ type: 'deleteSnapshot';
689
+ id: string;
690
+ } | {
691
+ type: 'deleteSnapshotRecord';
692
+ snapshotId: string;
693
+ recordId: string;
694
+ } | {
695
+ type: 'renameSnapshot';
696
+ id: string;
697
+ name: string;
698
+ } | {
699
+ type: 'resolveContractVariantPrompt';
700
+ promptId: string;
701
+ save: boolean;
702
+ } | {
703
+ type: 'loadGlobalCollections';
704
+ } | {
705
+ type: 'createGlobalCollection';
706
+ name: string;
707
+ } | {
708
+ type: 'deleteGlobalCollection';
709
+ id: string;
710
+ } | {
711
+ type: 'saveGlobalRequest';
712
+ data: {
713
+ collectionId: string;
714
+ folderPath?: string[];
715
+ request: ApiRequest;
716
+ };
717
+ } | {
718
+ type: 'deleteGlobalRequest';
719
+ collectionId: string;
720
+ requestId: string;
721
+ folderPath?: string[];
722
+ } | {
723
+ type: 'createGlobalFolder';
724
+ collectionId: string;
725
+ name: string;
726
+ parentPath?: string[];
727
+ } | {
728
+ type: 'deleteGlobalFolder';
729
+ collectionId: string;
730
+ folderPath: string[];
731
+ } | {
732
+ type: 'loadGlobalEnvironments';
733
+ } | {
734
+ type: 'saveGlobalEnvironment';
735
+ data: Environment;
736
+ } | {
737
+ type: 'deleteGlobalEnvironment';
738
+ id: string;
739
+ } | {
740
+ type: 'setGlobalActiveEnvironment';
741
+ id: string | null;
742
+ } | {
743
+ type: 'loadGlobalHistory';
744
+ } | {
745
+ type: 'clearGlobalHistory';
746
+ } | {
747
+ type: 'log';
748
+ level: 'info' | 'warn' | 'error';
749
+ message: string;
750
+ data?: string;
751
+ } | {
752
+ type: 'loadSession';
753
+ } | {
754
+ type: 'saveSession';
755
+ data: unknown;
756
+ } | {
757
+ type: 'loadProxies';
758
+ } | {
759
+ type: 'saveProxy';
760
+ data: ProxyConfig;
761
+ } | {
762
+ type: 'deleteProxy';
763
+ id: string;
764
+ } | {
765
+ type: 'setDefaultProxy';
766
+ id: string | null;
767
+ } | {
768
+ type: 'createMockServer';
769
+ } | {
770
+ type: 'deleteMockServer';
771
+ serverId: string;
772
+ } | {
773
+ type: 'renameMockServer';
774
+ serverId: string;
775
+ name: string;
776
+ } | {
777
+ type: 'exportMockServer';
778
+ serverId: string;
779
+ } | {
780
+ type: 'importMockServer';
781
+ } | {
782
+ type: 'loadMockServers';
783
+ } | {
784
+ type: 'startMockServer';
785
+ serverId: string;
786
+ } | {
787
+ type: 'stopMockServer';
788
+ serverId: string;
789
+ } | {
790
+ type: 'restartMockServer';
791
+ serverId: string;
792
+ } | {
793
+ type: 'saveMockRoute';
794
+ serverId: string;
795
+ data: MockRoute;
796
+ } | {
797
+ type: 'deleteMockRoute';
798
+ serverId: string;
799
+ id: string;
800
+ } | {
801
+ type: 'updateMockRoute';
802
+ serverId: string;
803
+ data: MockRoute;
804
+ } | {
805
+ type: 'clearMockLog';
806
+ serverId: string;
807
+ } | {
808
+ type: 'saveMockSetting';
809
+ serverId: string;
810
+ key: 'port' | 'autoStart' | 'maxLogEntries' | 'swaggerEnabled' | 'mcpEnabled';
811
+ value: number | boolean;
812
+ } | {
813
+ type: 'setMaxMockServers';
814
+ value: number;
815
+ } | {
816
+ type: 'pickMockResponseFile';
817
+ } | {
818
+ type: 'openUrl';
819
+ url: string;
820
+ } | {
821
+ type: 'reorderCollectionItem';
822
+ scope: 'local' | 'global';
823
+ itemType: 'collection' | 'folder' | 'request';
824
+ itemId: string;
825
+ sourceCollectionId: string;
826
+ sourcePath: string[];
827
+ targetCollectionId: string;
828
+ targetPath: string[];
829
+ targetIndex: number;
830
+ } | {
831
+ type: 'saveCollectionMeta';
832
+ scope: 'local' | 'global';
833
+ collectionId: string;
834
+ description?: string;
835
+ auth?: AuthConfig;
836
+ certificateConfig?: CertificateConfig;
837
+ preRequestScript?: string;
838
+ testScript?: string;
839
+ variables?: KeyValue[];
840
+ } | {
841
+ type: 'renameCollection';
842
+ scope: 'local' | 'global';
843
+ collectionId: string;
844
+ name: string;
845
+ } | {
846
+ type: 'renameFolder';
847
+ scope: 'local' | 'global';
848
+ collectionId: string;
849
+ folderPath: string[];
850
+ name: string;
851
+ } | {
852
+ type: 'saveFolderMeta';
853
+ scope: 'local' | 'global';
854
+ collectionId: string;
855
+ folderPath: string[];
856
+ auth?: AuthConfig;
857
+ inheritAuth?: boolean;
858
+ preRequestScript?: string;
859
+ testScript?: string;
860
+ inheritScripts?: boolean;
861
+ certificateConfig?: CertificateConfig;
862
+ inheritCertificate?: boolean;
863
+ } | {
864
+ type: 'runCollection';
865
+ scope: 'local' | 'global';
866
+ collectionId: string;
867
+ mode: 'sequential' | 'parallel';
868
+ maxConcurrency?: number;
869
+ } | {
870
+ type: 'loadCollectionRunHistory';
871
+ collectionId: string;
872
+ scope: 'local' | 'global';
873
+ } | {
874
+ type: 'deleteCollectionRunHistory';
875
+ collectionId: string;
876
+ scope: 'local' | 'global';
877
+ entryId: string;
878
+ } | {
879
+ type: 'startMcpServer';
880
+ collectionId: string;
881
+ scope: 'local' | 'global';
882
+ port: number;
883
+ environmentId?: string;
884
+ environmentScope?: 'local' | 'global';
885
+ } | {
886
+ type: 'stopMcpServer';
887
+ collectionId: string;
888
+ } | {
889
+ type: 'restartMcpServer';
890
+ collectionId: string;
891
+ scope: 'local' | 'global';
892
+ port: number;
893
+ environmentId?: string;
894
+ environmentScope?: 'local' | 'global';
895
+ } | {
896
+ type: 'saveMcpSetting';
897
+ serverId: string;
898
+ key: 'port' | 'autoStart' | 'swaggerEnabled' | 'maxLogEntries' | 'environmentId' | 'environmentScope';
899
+ value: number | boolean | string;
900
+ } | {
901
+ type: 'clearMcpLog';
902
+ serverId: string;
903
+ } | {
904
+ type: 'loadMcpServers';
905
+ } | {
906
+ type: 'startManagementMcp';
907
+ } | {
908
+ type: 'stopManagementMcp';
909
+ } | {
910
+ type: 'setManagementMcpPort';
911
+ port: number;
912
+ } | {
913
+ type: 'setManagementMcpEnabled';
914
+ enabled: boolean;
915
+ } | {
916
+ type: 'setManagementMcpTransport';
917
+ transport: 'stdio' | 'http';
918
+ } | {
919
+ type: 'runMcpHealthCheck';
920
+ } | {
921
+ type: 'forceStopServer';
922
+ id: string;
923
+ serverType: 'mock' | 'mcp' | 'management-mcp';
924
+ } | {
925
+ type: 'duplicateCollection';
926
+ collectionId: string;
927
+ scope: 'local' | 'global';
928
+ } | {
929
+ type: 'duplicateRequest';
930
+ collectionId: string;
931
+ requestId: string;
932
+ scope: 'local' | 'global';
933
+ folderPath?: string[];
934
+ } | {
935
+ type: 'renameRequest';
936
+ collectionId: string;
937
+ requestId: string;
938
+ scope: 'local' | 'global';
939
+ folderPath?: string[];
940
+ name: string;
941
+ } | {
942
+ type: 'exportReport';
943
+ html: string;
944
+ fileName: string;
945
+ } | {
946
+ type: 'loadVaultProviders';
947
+ } | {
948
+ type: 'saveVaultProvider';
949
+ data: VaultProvider;
950
+ } | {
951
+ type: 'deleteVaultProvider';
952
+ id: string;
953
+ } | {
954
+ type: 'loadSecretSets';
955
+ } | {
956
+ type: 'saveSecretSet';
957
+ data: SecretSet;
958
+ } | {
959
+ type: 'deleteSecretSet';
960
+ id: string;
961
+ } | {
962
+ type: 'createBuiltInVault';
963
+ password: string;
964
+ } | {
965
+ type: 'unlockBuiltInVault';
966
+ password: string;
967
+ } | {
968
+ type: 'lockBuiltInVault';
969
+ } | {
970
+ type: 'changeVaultPassword';
971
+ currentPassword: string;
972
+ newPassword: string;
973
+ } | {
974
+ type: 'saveBuiltInSecret';
975
+ key: string;
976
+ value: string;
977
+ } | {
978
+ type: 'deleteBuiltInSecret';
979
+ key: string;
980
+ } | {
981
+ type: 'loadBuiltInSecrets';
982
+ } | {
983
+ type: 'loadVaultCertificates';
984
+ } | {
985
+ type: 'saveVaultCertificate';
986
+ data: CertificateEntry;
987
+ } | {
988
+ type: 'deleteVaultCertificate';
989
+ id: string;
990
+ } | {
991
+ type: 'readCertificateFile';
992
+ filePath: string;
993
+ format: 'pem' | 'pfx' | 'der';
994
+ } | {
995
+ type: 'setKeepUnlocked';
996
+ enabled: boolean;
997
+ password?: string;
998
+ } | {
999
+ type: 'setActiveSecretSet';
1000
+ id: string | null;
1001
+ } | {
1002
+ type: 'loadActiveSecretSet';
1003
+ } | {
1004
+ type: 'activateLicense';
1005
+ key: string;
1006
+ } | {
1007
+ type: 'deactivateLicense';
1008
+ } | {
1009
+ type: 'loadLicenseStatus';
1010
+ };
1011
+ //# sourceMappingURL=types.d.ts.map