@gyeonghokim/bruno-to-openapi 0.0.0 → 1.0.1

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.
@@ -11,6 +11,7 @@ jobs:
11
11
  release:
12
12
  name: Release
13
13
  runs-on: ubuntu-latest
14
+ environment: release
14
15
  permissions:
15
16
  contents: write # to be able to publish a GitHub release
16
17
  issues: write # to be able to comment on released issues
@@ -22,14 +23,16 @@ jobs:
22
23
  with:
23
24
  fetch-depth: 0
24
25
  - name: Setup Node.js
25
- uses: actions/setup-node@v4
26
+ uses: actions/setup-node@v6
26
27
  with:
27
28
  node-version: "lts/*"
28
29
  - name: Install dependencies
29
30
  run: npm clean-install
30
31
  - name: Verify the integrity of provenance attestations and registry signatures for installed dependencies
31
32
  run: npm audit signatures
33
+ - name: Build package
34
+ run: npm run build
32
35
  - name: Release
33
36
  env:
34
37
  GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
35
- run: npx semantic-release
38
+ run: NODE_AUTH_TOKEN="" npx semantic-release
@@ -0,0 +1,37 @@
1
+ name: Test
2
+ on:
3
+ pull_request:
4
+ branches:
5
+ - main
6
+ push:
7
+ branches:
8
+ - main
9
+
10
+ permissions:
11
+ contents: read
12
+
13
+ jobs:
14
+ test:
15
+ name: Format, Lint and Test
16
+ runs-on: ubuntu-latest
17
+ steps:
18
+ - name: Checkout
19
+ uses: actions/checkout@v4
20
+ - name: Setup Node.js
21
+ uses: actions/setup-node@v6
22
+ with:
23
+ node-version: "lts/*"
24
+ - name: Install dependencies
25
+ run: npm clean-install
26
+ - name: Verify the integrity of provenance attestations and registry signatures for installed dependencies
27
+ run: npm audit signatures
28
+ - name: Check format
29
+ run: npm run format
30
+ - name: Lint
31
+ run: npm run lint
32
+ - name: Type Check
33
+ run: npm run typecheck
34
+ - name: Run tests
35
+ run: npm run test
36
+ - name: Build Check
37
+ run: npm run build
@@ -0,0 +1,3 @@
1
+ {
2
+ "plugins": ["@semantic-release/commit-analyzer", "@semantic-release/release-notes-generator", "@semantic-release/npm"]
3
+ }
@@ -0,0 +1,24 @@
1
+ import type { ConvertResult } from './types/result';
2
+ /**
3
+ * Converts a Bruno collection to an OpenAPI 3.0 specification
4
+ * @param collectionPath - Path to the Bruno collection directory
5
+ * @returns Promise resolving to the conversion result containing the OpenAPI specification
6
+ * @throws Error if the collection path is invalid or the collection is malformed
7
+ */
8
+ export declare function convertBrunoCollectionToOpenAPI(collectionPath: string): Promise<ConvertResult>;
9
+ /**
10
+ * Synchronously converts a Bruno collection to an OpenAPI 3.0 specification
11
+ * @param collectionPath - Path to the Bruno collection directory
12
+ * @returns The conversion result containing the OpenAPI specification
13
+ * @throws Error if the collection path is invalid or the collection is malformed
14
+ */
15
+ export declare function convertBrunoCollectionToOpenAPISync(collectionPath: string): ConvertResult;
16
+ /**
17
+ * Validates if a given path contains a valid Bruno collection
18
+ * @param collectionPath - Path to check
19
+ * @returns Promise resolving to true if valid Bruno collection, false otherwise
20
+ */
21
+ export declare function isValidBrunoCollection(collectionPath: string): Promise<boolean>;
22
+ export type { InfoObject, MediaTypeObject, OpenAPIObject, OperationObject, ParameterObject, PathItemObject, RequestBodyObject, ResponseObject, ResponsesObject, SchemaObject, } from './types/openapi';
23
+ export type { ConvertResult, ConvertWarning } from './types/result';
24
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAA;AAInD;;;;;GAKG;AACH,wBAAsB,+BAA+B,CACnD,cAAc,EAAE,MAAM,GACrB,OAAO,CAAC,aAAa,CAAC,CAYxB;AAED;;;;;GAKG;AACH,wBAAgB,mCAAmC,CAAC,cAAc,EAAE,MAAM,GAAG,aAAa,CAqCzF;AAED;;;;GAIG;AACH,wBAAsB,sBAAsB,CAAC,cAAc,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAOrF;AAED,YAAY,EACV,UAAU,EACV,eAAe,EACf,aAAa,EACb,eAAe,EACf,eAAe,EACf,cAAc,EACd,iBAAiB,EACjB,cAAc,EACd,eAAe,EACf,YAAY,GACb,MAAM,iBAAiB,CAAA;AAExB,YAAY,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAA"}
package/dist/index.js ADDED
@@ -0,0 +1,72 @@
1
+ import { BrunoParser } from './utils/bruno-parser';
2
+ import { OpenApiGenerator } from './utils/openapi-generator';
3
+ /**
4
+ * Converts a Bruno collection to an OpenAPI 3.0 specification
5
+ * @param collectionPath - Path to the Bruno collection directory
6
+ * @returns Promise resolving to the conversion result containing the OpenAPI specification
7
+ * @throws Error if the collection path is invalid or the collection is malformed
8
+ */
9
+ export async function convertBrunoCollectionToOpenAPI(collectionPath) {
10
+ try {
11
+ // Parse the Bruno collection
12
+ const collection = await BrunoParser.parseCollection(collectionPath);
13
+ // Generate the OpenAPI specification
14
+ const result = OpenApiGenerator.generateOpenApiSpec(collection);
15
+ return result;
16
+ }
17
+ catch (error) {
18
+ throw new Error(`Failed to convert Bruno collection to OpenAPI: ${error.message}`);
19
+ }
20
+ }
21
+ /**
22
+ * Synchronously converts a Bruno collection to an OpenAPI 3.0 specification
23
+ * @param collectionPath - Path to the Bruno collection directory
24
+ * @returns The conversion result containing the OpenAPI specification
25
+ * @throws Error if the collection path is invalid or the collection is malformed
26
+ */
27
+ export function convertBrunoCollectionToOpenAPISync(collectionPath) {
28
+ try {
29
+ // For a true synchronous implementation, we would need to implement sync versions
30
+ // of our file operations. For now, we'll use require instead of import to avoid
31
+ // top-level await issues, but note that this is still using async operations
32
+ // which cannot truly be made synchronous without blocking the event loop.
33
+ // A proper sync implementation would require refactoring our file readers to
34
+ // have both sync and async versions.
35
+ // For now, we'll implement a simplified sync version by reading files directly
36
+ const fs = require('node:fs');
37
+ const pathModule = require('node:path');
38
+ // Check if it's a valid collection first
39
+ if (!(fs.existsSync(collectionPath) && fs.statSync(collectionPath).isDirectory())) {
40
+ throw new Error(`Collection path does not exist or is not a directory: ${collectionPath}`);
41
+ }
42
+ // Look for bruno.json
43
+ const brunoJsonPath = pathModule.join(collectionPath, 'bruno.json');
44
+ let brunoConfig = null;
45
+ if (fs.existsSync(brunoJsonPath)) {
46
+ const brunoJsonContent = fs.readFileSync(brunoJsonPath, 'utf-8');
47
+ brunoConfig = JSON.parse(brunoJsonContent);
48
+ }
49
+ // Since the full synchronous implementation requires significant changes
50
+ // to support sync file operations throughout the pipeline, we'll throw
51
+ // an error indicating that for full sync functionality, async should be used
52
+ throw new Error('Full synchronous conversion requires significant architectural changes to support sync file operations throughout the pipeline. Please use the async version: convertBrunoCollectionToOpenAPI()');
53
+ }
54
+ catch (error) {
55
+ throw new Error(`Failed to convert Bruno collection to OpenAPI synchronously: ${error.message}`);
56
+ }
57
+ }
58
+ /**
59
+ * Validates if a given path contains a valid Bruno collection
60
+ * @param collectionPath - Path to check
61
+ * @returns Promise resolving to true if valid Bruno collection, false otherwise
62
+ */
63
+ export async function isValidBrunoCollection(collectionPath) {
64
+ try {
65
+ return await BrunoParser.isValidCollection(collectionPath);
66
+ }
67
+ catch (error) {
68
+ console.error(`Error validating Bruno collection: ${error.message}`);
69
+ return false;
70
+ }
71
+ }
72
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,35 @@
1
+ import type { BrunoCollection, BrunoEnvironments, BrunoItem, FolderRoot, RunnerResult } from '../types';
2
+ /**
3
+ * Data model representing a Bruno collection
4
+ */
5
+ export declare class BrunoCollectionModel implements BrunoCollection {
6
+ version: '1';
7
+ uid: string;
8
+ name: string;
9
+ items: BrunoItem[];
10
+ activeEnvironmentUid?: string | null;
11
+ environments?: BrunoEnvironments | null;
12
+ pathname?: string | null;
13
+ runnerResult?: RunnerResult | null;
14
+ runtimeVariables?: Record<string, unknown> | null;
15
+ brunoConfig?: Record<string, unknown> | null;
16
+ root?: FolderRoot | null;
17
+ constructor(data?: Partial<BrunoCollection>);
18
+ /**
19
+ * Adds an item to the collection
20
+ */
21
+ addItem(item: BrunoItem): void;
22
+ /**
23
+ * Finds an item by name
24
+ */
25
+ findItemByName(name: string): BrunoItem | undefined;
26
+ /**
27
+ * Finds items by type
28
+ */
29
+ findItemsByType(type: string): BrunoItem[];
30
+ /**
31
+ * Generates a unique identifier
32
+ */
33
+ private generateUid;
34
+ }
35
+ //# sourceMappingURL=bruno-collection.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bruno-collection.d.ts","sourceRoot":"","sources":["../../src/models/bruno-collection.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,eAAe,EACf,iBAAiB,EACjB,SAAS,EACT,UAAU,EACV,YAAY,EACb,MAAM,UAAU,CAAA;AAEjB;;GAEG;AACH,qBAAa,oBAAqB,YAAW,eAAe;IAC1D,OAAO,EAAE,GAAG,CAAA;IACZ,GAAG,EAAE,MAAM,CAAA;IACX,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,EAAE,SAAS,EAAE,CAAA;IAClB,oBAAoB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACpC,YAAY,CAAC,EAAE,iBAAiB,GAAG,IAAI,CAAA;IACvC,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACxB,YAAY,CAAC,EAAE,YAAY,GAAG,IAAI,CAAA;IAClC,gBAAgB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAA;IACjD,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAA;IAC5C,IAAI,CAAC,EAAE,UAAU,GAAG,IAAI,CAAA;gBAEZ,IAAI,GAAE,OAAO,CAAC,eAAe,CAAM;IAc/C;;OAEG;IACH,OAAO,CAAC,IAAI,EAAE,SAAS,GAAG,IAAI;IAI9B;;OAEG;IACH,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,GAAG,SAAS;IAInD;;OAEG;IACH,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,EAAE;IAI1C;;OAEG;IACH,OAAO,CAAC,WAAW;CAKpB"}
@@ -0,0 +1,56 @@
1
+ /**
2
+ * Data model representing a Bruno collection
3
+ */
4
+ export class BrunoCollectionModel {
5
+ version;
6
+ uid;
7
+ name;
8
+ items;
9
+ activeEnvironmentUid;
10
+ environments;
11
+ pathname;
12
+ runnerResult;
13
+ runtimeVariables;
14
+ brunoConfig;
15
+ root;
16
+ constructor(data = {}) {
17
+ this.version = data.version || '1';
18
+ this.uid = data.uid || this.generateUid();
19
+ this.name = data.name || 'Untitled Collection';
20
+ this.items = data.items || [];
21
+ this.activeEnvironmentUid = data.activeEnvironmentUid;
22
+ this.environments = data.environments;
23
+ this.pathname = data.pathname || null;
24
+ this.runnerResult = data.runnerResult || null;
25
+ this.runtimeVariables = data.runtimeVariables || null;
26
+ this.brunoConfig = data.brunoConfig || null;
27
+ this.root = data.root || null;
28
+ }
29
+ /**
30
+ * Adds an item to the collection
31
+ */
32
+ addItem(item) {
33
+ this.items.push(item);
34
+ }
35
+ /**
36
+ * Finds an item by name
37
+ */
38
+ findItemByName(name) {
39
+ return this.items.find(item => item.name === name);
40
+ }
41
+ /**
42
+ * Finds items by type
43
+ */
44
+ findItemsByType(type) {
45
+ return this.items.filter(item => item.type === type);
46
+ }
47
+ /**
48
+ * Generates a unique identifier
49
+ */
50
+ generateUid() {
51
+ // In a real implementation, you might want to use nanoid or similar
52
+ // For now, we'll create a simple UID based on timestamp and random number
53
+ return Date.now().toString(36) + Math.random().toString(36).substr(2, 5);
54
+ }
55
+ }
56
+ //# sourceMappingURL=bruno-collection.js.map
@@ -0,0 +1,17 @@
1
+ import type { BrunoCollection } from '../types/bruno';
2
+ import type { ConvertResult } from '../types/result';
3
+ /**
4
+ * Interface for the conversion service
5
+ */
6
+ export interface IConversionService {
7
+ convertCollection(collection: BrunoCollection): ConvertResult;
8
+ convertCollectionAsync(collection: BrunoCollection): Promise<ConvertResult>;
9
+ }
10
+ /**
11
+ * Implementation of the conversion service
12
+ */
13
+ export declare class ConversionService implements IConversionService {
14
+ convertCollection(collection: BrunoCollection): ConvertResult;
15
+ convertCollectionAsync(collection: BrunoCollection): Promise<ConvertResult>;
16
+ }
17
+ //# sourceMappingURL=conversion-service.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"conversion-service.d.ts","sourceRoot":"","sources":["../../src/services/conversion-service.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAA;AACrD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAGpD;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC,iBAAiB,CAAC,UAAU,EAAE,eAAe,GAAG,aAAa,CAAA;IAC7D,sBAAsB,CAAC,UAAU,EAAE,eAAe,GAAG,OAAO,CAAC,aAAa,CAAC,CAAA;CAC5E;AAED;;GAEG;AACH,qBAAa,iBAAkB,YAAW,kBAAkB;IAC1D,iBAAiB,CAAC,UAAU,EAAE,eAAe,GAAG,aAAa;IAKvD,sBAAsB,CAAC,UAAU,EAAE,eAAe,GAAG,OAAO,CAAC,aAAa,CAAC;CAOlF"}
@@ -0,0 +1,18 @@
1
+ import { OpenApiGenerator } from '../utils/openapi-generator';
2
+ /**
3
+ * Implementation of the conversion service
4
+ */
5
+ export class ConversionService {
6
+ convertCollection(collection) {
7
+ // Use the OpenApiGenerator to convert the Bruno collection to OpenAPI spec
8
+ return OpenApiGenerator.generateOpenApiSpec(collection);
9
+ }
10
+ async convertCollectionAsync(collection) {
11
+ // For this implementation, the async version does the same as the sync version
12
+ // since we don't have any async operations in the conversion itself
13
+ // (the actual file reading happens before this point)
14
+ // We still keep it as async to maintain API consistency
15
+ return Promise.resolve(this.convertCollection(collection));
16
+ }
17
+ }
18
+ //# sourceMappingURL=conversion-service.js.map
@@ -0,0 +1,267 @@
1
+ export interface BrunoCollection {
2
+ version: '1';
3
+ uid: string;
4
+ name: string;
5
+ items: BrunoItem[];
6
+ activeEnvironmentUid?: string | null;
7
+ environments?: BrunoEnvironments | null;
8
+ pathname?: string | null;
9
+ runnerResult?: RunnerResult | null;
10
+ runtimeVariables?: Record<string, unknown> | null;
11
+ brunoConfig?: Record<string, unknown> | null;
12
+ root?: FolderRoot | null;
13
+ }
14
+ export interface BrunoEnvironments {
15
+ [key: string]: BrunoEnvironment;
16
+ }
17
+ export interface BrunoEnvironment {
18
+ uid: string;
19
+ name: string;
20
+ variables: BrunoVariable[];
21
+ }
22
+ export interface BrunoVariable {
23
+ uid: string;
24
+ name: string;
25
+ value: string | number | boolean | object | null;
26
+ type: 'text';
27
+ enabled: boolean;
28
+ secret?: boolean;
29
+ }
30
+ export interface RunnerResult {
31
+ items?: unknown[] | null;
32
+ }
33
+ export interface FolderRoot {
34
+ type?: string;
35
+ name?: string;
36
+ request?: FolderRequest | null;
37
+ docs?: string | null;
38
+ meta?: {
39
+ name?: string;
40
+ seq?: number;
41
+ } | null;
42
+ }
43
+ export interface FolderRequest {
44
+ headers?: BrunoHeader[] | null;
45
+ auth?: BrunoAuth | null;
46
+ script?: Script | null;
47
+ vars?: {
48
+ req: Variable[];
49
+ res: Variable[];
50
+ } | null;
51
+ tests?: string | null;
52
+ }
53
+ export interface Variable {
54
+ uid: string;
55
+ name: string;
56
+ value: string;
57
+ type: 'text';
58
+ enabled: boolean;
59
+ secret?: boolean;
60
+ }
61
+ export interface Script {
62
+ req?: string;
63
+ res?: string;
64
+ }
65
+ export interface BrunoRoot {
66
+ name?: string;
67
+ seq?: number;
68
+ type?: string;
69
+ request?: BrunoRequest;
70
+ meta?: {
71
+ [key: string]: string | number | boolean | object | null;
72
+ };
73
+ }
74
+ export interface BrunoItem {
75
+ uid: string;
76
+ type: 'folder' | 'http-request' | 'graphql-request' | 'js' | 'grpc-request' | 'ws-request';
77
+ seq?: number | null;
78
+ name: string;
79
+ tags?: string[] | null;
80
+ request?: BrunoRequest | null;
81
+ settings?: ItemSettings | null;
82
+ fileContent?: string | null;
83
+ root?: FolderRoot | null;
84
+ items?: BrunoItem[] | null;
85
+ examples?: BrunoExample[] | null;
86
+ filename?: string | null;
87
+ pathname?: string | null;
88
+ depth?: number;
89
+ }
90
+ export type ItemSettings = HttpItemSettings | WebSocketItemSettings | null;
91
+ export interface HttpItemSettings {
92
+ encodeUrl?: boolean | null;
93
+ followRedirects?: boolean | null;
94
+ maxRedirects?: number | null;
95
+ timeout?: number | 'inherit' | null;
96
+ }
97
+ export interface WebSocketItemSettings {
98
+ settings?: {
99
+ timeout?: number | null;
100
+ keepAliveInterval?: number | null;
101
+ } | null;
102
+ }
103
+ export interface BrunoRequest {
104
+ url: string;
105
+ method: string;
106
+ headers: BrunoHeader[];
107
+ params: BrunoParam[];
108
+ auth?: BrunoAuth | null;
109
+ body?: BrunoBody;
110
+ script?: Script;
111
+ vars?: Vars | null;
112
+ assertions?: BrunoKeyValue[] | null;
113
+ tests?: string | null;
114
+ docs?: string | null;
115
+ tags?: string[] | null;
116
+ }
117
+ export interface BrunoHeader {
118
+ uid: string;
119
+ name?: string;
120
+ value?: string;
121
+ description?: string;
122
+ enabled: boolean;
123
+ }
124
+ export interface BrunoParam {
125
+ uid: string;
126
+ name?: string;
127
+ value?: string;
128
+ description?: string;
129
+ type: 'query' | 'path';
130
+ enabled: boolean;
131
+ }
132
+ export interface BrunoBody {
133
+ mode: 'none' | 'json' | 'text' | 'xml' | 'formUrlEncoded' | 'multipartForm' | 'graphql' | 'sparql' | 'file';
134
+ json?: string;
135
+ text?: string;
136
+ xml?: string;
137
+ sparql?: string;
138
+ formUrlEncoded?: BrunoKeyValue[];
139
+ multipartForm?: MultipartFormEntry[];
140
+ graphql?: BrunoGraphqlBody;
141
+ file?: BrunoFileEntry[];
142
+ }
143
+ export interface BrunoKeyValue {
144
+ uid: string;
145
+ name?: string;
146
+ value?: string;
147
+ description?: string;
148
+ enabled: boolean;
149
+ }
150
+ export interface MultipartFormEntry {
151
+ uid: string;
152
+ type: 'file' | 'text';
153
+ name?: string;
154
+ value: string | string[] | null;
155
+ description?: string;
156
+ contentType?: string;
157
+ enabled: boolean;
158
+ }
159
+ export interface BrunoGraphqlBody {
160
+ query?: string;
161
+ variables?: string;
162
+ }
163
+ export interface BrunoFileEntry {
164
+ uid: string;
165
+ filePath?: string;
166
+ contentType?: string;
167
+ selected: boolean;
168
+ }
169
+ export interface Vars {
170
+ req?: BrunoKeyValue[];
171
+ res?: BrunoKeyValue[];
172
+ }
173
+ export interface BrunoAuth {
174
+ mode: 'inherit' | 'none' | 'awsv4' | 'basic' | 'bearer' | 'digest' | 'ntlm' | 'oauth2' | 'wsse' | 'apikey';
175
+ awsv4?: BrunoAuthAwsV4;
176
+ basic?: BrunoAuthBasic;
177
+ bearer?: BrunoAuthBearer;
178
+ ntlm?: BrunoAuthNTLM;
179
+ digest?: BrunoAuthDigest;
180
+ oauth2?: BrunoOAuth2;
181
+ wsse?: BrunoAuthWsse;
182
+ apikey?: BrunoAuthApiKey;
183
+ }
184
+ export interface BrunoAuthAwsV4 {
185
+ accessKeyId?: string;
186
+ secretAccessKey?: string;
187
+ sessionToken?: string;
188
+ service?: string;
189
+ region?: string;
190
+ profileName?: string;
191
+ }
192
+ export interface BrunoAuthBasic {
193
+ username?: string;
194
+ password?: string;
195
+ }
196
+ export interface BrunoAuthBearer {
197
+ token?: string;
198
+ }
199
+ export interface BrunoAuthNTLM {
200
+ username?: string;
201
+ password?: string;
202
+ domain?: string;
203
+ }
204
+ export interface BrunoAuthDigest {
205
+ username?: string;
206
+ password?: string;
207
+ }
208
+ export interface BrunoOAuth2 {
209
+ grantType: 'client_credentials' | 'password' | 'authorization_code' | 'implicit';
210
+ username?: string;
211
+ password?: string;
212
+ callbackUrl?: string;
213
+ authorizationUrl?: string;
214
+ accessTokenUrl?: string;
215
+ clientId?: string;
216
+ clientSecret?: string;
217
+ scope?: string;
218
+ state?: string;
219
+ pkce?: boolean;
220
+ credentialsPlacement?: string;
221
+ credentialsId?: string;
222
+ tokenPlacement?: string;
223
+ tokenHeaderPrefix?: string;
224
+ tokenQueryKey?: string;
225
+ refreshTokenUrl?: string;
226
+ autoRefreshToken?: boolean;
227
+ autoFetchToken?: boolean;
228
+ additionalParameters?: {
229
+ authorization?: OAuthAdditionalParameter[];
230
+ token?: OAuthAdditionalParameter[];
231
+ refresh?: OAuthAdditionalParameter[];
232
+ };
233
+ }
234
+ export interface OAuthAdditionalParameter {
235
+ name?: string;
236
+ value?: string;
237
+ sendIn: 'headers' | 'queryparams' | 'body';
238
+ enabled: boolean;
239
+ }
240
+ export interface BrunoAuthWsse {
241
+ username?: string;
242
+ password?: string;
243
+ }
244
+ export interface BrunoAuthApiKey {
245
+ key?: string;
246
+ value?: string;
247
+ placement?: 'header' | 'queryparams';
248
+ }
249
+ export interface BrunoExample {
250
+ uid: string;
251
+ itemUid: string;
252
+ name: string;
253
+ description?: string;
254
+ type: 'http-request' | 'graphql-request' | 'grpc-request';
255
+ request?: BrunoRequest;
256
+ response?: BrunoResponse;
257
+ }
258
+ export interface BrunoResponse {
259
+ status?: string;
260
+ statusText?: string;
261
+ headers?: BrunoKeyValue[];
262
+ body?: {
263
+ type?: 'json' | 'text' | 'xml' | 'html' | 'binary';
264
+ content?: string | object | unknown;
265
+ };
266
+ }
267
+ //# sourceMappingURL=bruno.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bruno.d.ts","sourceRoot":"","sources":["../../src/types/bruno.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,eAAe;IAC9B,OAAO,EAAE,GAAG,CAAA;IACZ,GAAG,EAAE,MAAM,CAAA;IACX,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,EAAE,SAAS,EAAE,CAAA;IAClB,oBAAoB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACpC,YAAY,CAAC,EAAE,iBAAiB,GAAG,IAAI,CAAA;IACvC,QAAQ,CAAC,EAAE,MAAM,GAAG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AAM,GAAG,QAAQ,CAAA;QAClD,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAAA;KACpC,CAAA;CACF"}
@@ -0,0 +1,4 @@
1
+ // Type definitions specifically for Bruno collection schema
2
+ // Based on the actual Bruno repository types
3
+ export {};
4
+ //# sourceMappingURL=bruno.js.map
@@ -0,0 +1,10 @@
1
+ export * from './bruno';
2
+ export interface Variable {
3
+ uid: string;
4
+ name: string;
5
+ value: string;
6
+ type: 'text';
7
+ enabled: boolean;
8
+ secret?: boolean;
9
+ }
10
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAGA,cAAc,SAAS,CAAA;AAEvB,MAAM,WAAW,QAAQ;IACvB,GAAG,EAAE,MAAM,CAAA;IACX,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,EAAE,OAAO,CAAA;IAChB,MAAM,CAAC,EAAE,OAAO,CAAA;CACjB"}
@@ -0,0 +1,4 @@
1
+ // Type definitions for Bruno collection entities
2
+ // Based on the data model from the specification
3
+ export * from './bruno';
4
+ //# sourceMappingURL=index.js.map