@scalar/types 0.9.6 → 0.12.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 (71) hide show
  1. package/CHANGELOG.md +25 -0
  2. package/dist/api-reference/api-reference-configuration.d.ts +15 -16
  3. package/dist/api-reference/api-reference-configuration.d.ts.map +1 -1
  4. package/dist/api-reference/api-reference-configuration.js +16 -2
  5. package/dist/api-reference/api-reference-plugin.d.ts +16 -16
  6. package/dist/api-reference/base-configuration.d.ts +4 -4
  7. package/dist/api-reference/html-api.d.ts +1 -1
  8. package/dist/api-reference/html-api.d.ts.map +1 -1
  9. package/dist/api-reference/html-rendering-configuration.d.ts +5 -10
  10. package/dist/api-reference/html-rendering-configuration.d.ts.map +1 -1
  11. package/dist/api-reference/html-rendering-configuration.js +1 -20
  12. package/dist/api-reference/index.d.ts +3 -8
  13. package/dist/api-reference/index.d.ts.map +1 -1
  14. package/dist/api-reference/index.js +1 -5
  15. package/dist/api-reference/types.d.ts +444 -0
  16. package/dist/api-reference/types.d.ts.map +1 -0
  17. package/dist/api-reference/types.js +2 -0
  18. package/dist/asyncapi/3.1/index.d.ts +2 -0
  19. package/dist/asyncapi/3.1/index.d.ts.map +1 -0
  20. package/dist/asyncapi/3.1/index.generated.d.ts +738 -0
  21. package/dist/asyncapi/3.1/index.generated.d.ts.map +1 -0
  22. package/dist/asyncapi/3.1/index.generated.js +6 -0
  23. package/dist/asyncapi/3.1/index.js +1 -0
  24. package/dist/entities/security-scheme.d.ts +5 -5
  25. package/dist/extensions/document/index.d.ts +222 -0
  26. package/dist/extensions/document/index.d.ts.map +1 -0
  27. package/dist/extensions/document/index.js +6 -0
  28. package/dist/extensions/example/index.d.ts +18 -0
  29. package/dist/extensions/example/index.d.ts.map +1 -0
  30. package/dist/extensions/example/index.js +6 -0
  31. package/dist/extensions/general/index.d.ts +90 -0
  32. package/dist/extensions/general/index.d.ts.map +1 -0
  33. package/dist/extensions/general/index.js +6 -0
  34. package/dist/extensions/index.d.ts +16 -0
  35. package/dist/extensions/index.d.ts.map +1 -0
  36. package/dist/extensions/index.js +6 -0
  37. package/dist/extensions/operation/index.d.ts +136 -0
  38. package/dist/extensions/operation/index.d.ts.map +1 -0
  39. package/dist/extensions/operation/index.js +6 -0
  40. package/dist/extensions/parameter/index.d.ts +18 -0
  41. package/dist/extensions/parameter/index.d.ts.map +1 -0
  42. package/dist/extensions/parameter/index.js +6 -0
  43. package/dist/extensions/schema/index.d.ts +75 -0
  44. package/dist/extensions/schema/index.d.ts.map +1 -0
  45. package/dist/extensions/schema/index.js +6 -0
  46. package/dist/extensions/security/index.d.ts +139 -0
  47. package/dist/extensions/security/index.d.ts.map +1 -0
  48. package/dist/extensions/security/index.js +6 -0
  49. package/dist/extensions/server/index.d.ts +18 -0
  50. package/dist/extensions/server/index.d.ts.map +1 -0
  51. package/dist/extensions/server/index.js +6 -0
  52. package/dist/extensions/tag/index.d.ts +55 -0
  53. package/dist/extensions/tag/index.d.ts.map +1 -0
  54. package/dist/extensions/tag/index.js +6 -0
  55. package/dist/extensions/workspace/index.d.ts +44 -0
  56. package/dist/extensions/workspace/index.d.ts.map +1 -0
  57. package/dist/extensions/workspace/index.js +6 -0
  58. package/dist/index.d.ts +2 -2
  59. package/dist/index.d.ts.map +1 -1
  60. package/dist/index.js +1 -1
  61. package/dist/openapi/3.1/index.d.ts +4 -0
  62. package/dist/openapi/3.1/index.d.ts.map +1 -0
  63. package/dist/openapi/3.1/index.generated.d.ts +1199 -0
  64. package/dist/openapi/3.1/index.generated.d.ts.map +1 -0
  65. package/dist/openapi/3.1/index.generated.js +6 -0
  66. package/dist/openapi/3.1/index.js +1 -0
  67. package/dist/snippetz/snippetz.d.ts +1 -1
  68. package/package.json +67 -2
  69. package/dist/api-reference/api-client-configuration.d.ts +0 -141
  70. package/dist/api-reference/api-client-configuration.d.ts.map +0 -1
  71. package/dist/api-reference/api-client-configuration.js +0 -3
@@ -0,0 +1,444 @@
1
+ import type { PartialDeep } from 'type-fest';
2
+ /** Some common properties used in all security schemes */
3
+ type SecuirtySchemeCommon = {
4
+ description: string | undefined;
5
+ };
6
+ type ExtendedSecurityScheme = {
7
+ uid: any;
8
+ /** The name key that links a security requirement to a security object */
9
+ nameKey: string;
10
+ };
11
+ type SecuritySchemeApiKeyIn = 'query' | 'header' | 'cookie';
12
+ type OasSecurityApiKey = {
13
+ type: 'apiKey';
14
+ /** REQUIRED. The name of the header, query or cookie parameter to be used. */
15
+ name: string;
16
+ /** REQUIRED. The location of the API key. Valid values are "query", "header" or "cookie". */
17
+ in: SecuritySchemeApiKeyIn;
18
+ /** REQUIRED. The API key to be sent in the Authorization header or as a cookie. */
19
+ value: string;
20
+ };
21
+ export type SecuritySchemeApiKey = SecuirtySchemeCommon & ExtendedSecurityScheme & OasSecurityApiKey;
22
+ type OasSecurityHttp = {
23
+ type: 'http';
24
+ /** REQUIRED. The name of the HTTP Authorization scheme to be used in the Authorization header as defined in
25
+ * [RFC7235]. The values used SHOULD be registered in the IANA Authentication Scheme registry. */
26
+ scheme: 'basic' | 'bearer';
27
+ /** A hint to the client to identify how the bearer token is formatted.
28
+ * Bearer tokens are usually generated by an authorization server, so
29
+ * this information is primarily for documentation purposes. */
30
+ bearerFormat: 'JWT' | string;
31
+ /** The username to be sent in the Authorization header. */
32
+ username: string;
33
+ /** The password to be sent in the Authorization header. */
34
+ password: string;
35
+ /** The token to be sent in the Authorization header. */
36
+ token: string;
37
+ };
38
+ export type SecuritySchemeHttp = SecuirtySchemeCommon & ExtendedSecurityScheme & OasSecurityHttp;
39
+ type OasSecurityOpenIdConnect = {
40
+ type: 'openIdConnect';
41
+ /** REQUIRED. OpenId Connect URL to discover OAuth2 configuration values. This MUST be in the
42
+ * form of a URL. The OpenID Connect standard requires the use of TLS. */
43
+ openIdConnectUrl: string;
44
+ };
45
+ export type SecuritySchemeOpenIdConnect = SecuirtySchemeCommon & ExtendedSecurityScheme & OasSecurityOpenIdConnect;
46
+ type FlowsCommon = {
47
+ /**
48
+ * The URL to be used for obtaining refresh tokens. This MUST be in the form of a
49
+ * URL. The OAuth2 standard requires the use of TLS.
50
+ */
51
+ 'refreshUrl'?: string;
52
+ /**
53
+ * REQUIRED. The available scopes for the OAuth2 security scheme. A map
54
+ * between the scope name and a short description for it. The map MAY be empty.
55
+ */
56
+ 'scopes'?: Record<string, string>;
57
+ 'selectedScopes'?: string[];
58
+ /** Extension to save the client Id associated with an oauth flow */
59
+ 'x-scalar-client-id'?: string;
60
+ /** The auth token */
61
+ 'token'?: string;
62
+ /** Additional query parameters for the OAuth authorization request. Example: { prompt: 'consent', audience: 'scalar' }. */
63
+ 'x-scalar-security-query'?: Record<string, string>;
64
+ /** Additional body parameters for the OAuth token request. Example: { audience: 'foo' }. */
65
+ 'x-scalar-security-body'?: Record<string, string>;
66
+ /** Extension to specify custom token name in the response (defaults to 'access_token') */
67
+ 'x-tokenName'?: string;
68
+ };
69
+ type PkceOptions = 'SHA-256' | 'plain' | 'no';
70
+ type CredentialsLocationExtension = 'header' | 'body';
71
+ type OasSecurityOauth2FlowImplicit = {
72
+ type: 'oauth2';
73
+ 'x-default-scopes'?: string[];
74
+ flows: {
75
+ implicit: FlowsCommon & {
76
+ type: 'implicit';
77
+ authorizationUrl: string;
78
+ 'x-scalar-redirect-uri'?: string;
79
+ };
80
+ password: FlowsCommon & {
81
+ type: 'password';
82
+ tokenUrl: string;
83
+ clientSecret: string;
84
+ username: string;
85
+ password: string;
86
+ 'x-scalar-credentials-location'?: CredentialsLocationExtension;
87
+ };
88
+ clientCredentials: FlowsCommon & {
89
+ type: 'clientCredentials';
90
+ tokenUrl: string;
91
+ clientSecret: string;
92
+ 'x-scalar-credentials-location'?: CredentialsLocationExtension;
93
+ };
94
+ authorizationCode: FlowsCommon & {
95
+ type: 'authorizationCode';
96
+ authorizationUrl: string;
97
+ tokenUrl: string;
98
+ clientSecret: string;
99
+ 'x-scalar-credentials-location'?: CredentialsLocationExtension;
100
+ 'x-usePkce'?: PkceOptions;
101
+ 'x-scalar-redirect-uri'?: string;
102
+ };
103
+ };
104
+ };
105
+ export type SecuritySchemeOauth2 = SecuirtySchemeCommon & ExtendedSecurityScheme & OasSecurityOauth2FlowImplicit;
106
+ export type SecurityScheme = SecuritySchemeApiKey | SecuritySchemeHttp | SecuritySchemeOpenIdConnect | SecuritySchemeOauth2;
107
+ /**
108
+ * Authentication configuration for the API reference.
109
+ * This config is not validated so does not need a zod schema
110
+ */
111
+ export type AuthenticationConfiguration = {
112
+ /**
113
+ * Specifies the preferred security scheme(s) to use for authentication.
114
+ * Can be one of:
115
+ * - A single security scheme name (string)
116
+ * - An array of security scheme names (OR relationship)
117
+ * - An array containing strings or arrays of strings (AND/OR relationship)
118
+ */
119
+ preferredSecurityScheme?: string | (string | string[])[] | null;
120
+ /**
121
+ * Setting security schemes this way will allow you to override any value in your openapi document
122
+ * You will also be able to set additional values such as api tokens etc.
123
+ *
124
+ * Set them via the nameKey in your components.securitySchemes.[nameKey]
125
+ *
126
+ * @example
127
+ * ```ts
128
+ * {
129
+ * authentication: {
130
+ * preferredSecurityScheme: 'apiKeyHeader',
131
+ * securitySchemes: {
132
+ * apiKeyHeader: {
133
+ * value: 'tokenValue'
134
+ * },
135
+ * httpBearer: {
136
+ * token: 'xyz token value'
137
+ * },
138
+ * httpBasic: {
139
+ * username: 'username',
140
+ * password: 'password'
141
+ * },
142
+ * oauth2: {
143
+ * flows: {
144
+ * authorizationCode: {
145
+ * token: 'auth code token'
146
+ * }
147
+ * }
148
+ * },
149
+ * },
150
+ * }
151
+ * }
152
+ * ```
153
+ *
154
+ */
155
+ securitySchemes?: Record<string, PartialDeep<SecurityScheme>>;
156
+ /**
157
+ * Allows adding authentication which is not in the document.
158
+ * When true, generic options (API Key, HTTP Basic, OAuth2, etc.) are shown in the auth dropdown.
159
+ * @default false
160
+ */
161
+ createAnySecurityScheme?: boolean;
162
+ };
163
+ export type SpecificationExtension = {
164
+ name: string;
165
+ component: unknown;
166
+ renderer?: unknown;
167
+ };
168
+ export type ViewComponent = {
169
+ component: unknown;
170
+ renderer?: unknown;
171
+ props?: Record<string, any>;
172
+ };
173
+ export type LifecycleHooks = {
174
+ onInit?: ({ config }: {
175
+ config: Partial<BaseConfiguration>;
176
+ }) => void;
177
+ onConfigChange?: ({ config }: {
178
+ config: Partial<BaseConfiguration>;
179
+ }) => void;
180
+ onDestroy?: () => void;
181
+ };
182
+ export type ApiReferencePlugin = () => {
183
+ name: string;
184
+ extensions: SpecificationExtension[];
185
+ views?: {
186
+ 'content.end'?: ViewComponent[];
187
+ };
188
+ hooks?: LifecycleHooks;
189
+ apiClientPlugins?: any[];
190
+ };
191
+ export type ExternalUrls = {
192
+ dashboardUrl: string;
193
+ registryUrl: string;
194
+ proxyUrl: string;
195
+ apiBaseUrl: string;
196
+ };
197
+ export type BaseConfiguration = {
198
+ /** The title of the OpenAPI document. */
199
+ title?: string;
200
+ /** The slug of the OpenAPI document used in the URL. If none is passed, the title will be used. If no title is used, it will just use the index. */
201
+ slug?: string;
202
+ /** Prefill authentication */
203
+ authentication?: any;
204
+ /** Base URL for the API server */
205
+ baseServerURL?: string;
206
+ /** Whether to hide the client button */
207
+ hideClientButton: boolean;
208
+ /** URL to a request proxy for the API client */
209
+ proxyUrl?: string;
210
+ /** Default OAuth 2.0 redirect URI used to prefill auth flows in the API client. */
211
+ oauth2RedirectUri?: string;
212
+ /** Key used with CTRL/CMD to open the search modal (defaults to 'k' e.g. CMD+k) */
213
+ searchHotKey?: 'a' | 'b' | 'c' | 'd' | 'e' | 'f' | 'g' | 'h' | 'i' | 'j' | 'k' | 'l' | 'm' | 'n' | 'o' | 'p' | 'q' | 'r' | 's' | 't' | 'u' | 'v' | 'w' | 'x' | 'y' | 'z';
214
+ /** List of OpenAPI server objects */
215
+ servers?: any[];
216
+ /** Whether to show the sidebar */
217
+ showSidebar: boolean;
218
+ /** Whether and when to show the developer tools. */
219
+ showDeveloperTools: 'localhost' | 'always' | 'never';
220
+ /** @deprecated Use showDeveloperTools instead */
221
+ showToolbar: 'localhost' | 'always' | 'never';
222
+ /** Whether to use the operation summary or the operation path for the sidebar and search */
223
+ operationTitleSource: 'summary' | 'path';
224
+ /** A string to use one of the color presets */
225
+ theme: 'default' | 'alternate' | 'moon' | 'purple' | 'solarized' | 'bluePlanet' | 'deepSpace' | 'saturn' | 'kepler' | 'elysiajs' | 'fastify' | 'mars' | 'laserwave' | 'none';
226
+ /** Integration type identifier */
227
+ _integration?: 'adonisjs' | 'astro' | 'docusaurus' | 'dotnet' | 'elysiajs' | 'express' | 'fastapi' | 'fastify' | 'go' | 'hono' | 'html' | 'laravel' | 'litestar' | 'nestjs' | 'nextjs' | 'nitro' | 'nuxt' | 'platformatic' | 'react' | 'rust' | 'svelte' | 'vue' | null;
228
+ /** onRequestSent is fired when a request is sent */
229
+ onRequestSent?: (input: string) => void;
230
+ /** Whether to persist auth to local storage */
231
+ persistAuth: boolean;
232
+ /** Enables / disables telemetry */
233
+ telemetry: boolean;
234
+ /** External service URLs used by Scalar packages */
235
+ externalUrls: ExternalUrls;
236
+ };
237
+ type ExtendedConfiguration = {
238
+ /** The layout to use for the references */
239
+ layout: 'modern' | 'classic';
240
+ /** @deprecated Use proxyUrl instead */
241
+ proxy?: string;
242
+ /**
243
+ * Custom fetch function for custom logic. Can be used to add custom headers, handle auth, etc.
244
+ *
245
+ * @deprecated Use `customFetch` instead.
246
+ */
247
+ fetch?: typeof fetch;
248
+ /**
249
+ * Custom fetch function used both when loading the OpenAPI document and when sending requests from the API client.
250
+ *
251
+ * Can be used to add custom headers, attach credentials (for example `credentials: 'include'`), handle auth, etc.
252
+ */
253
+ customFetch?: typeof fetch;
254
+ /** Plugins for the API reference */
255
+ plugins?: ApiReferencePlugin[];
256
+ /** Allows the user to inject an editor for the spec */
257
+ isEditable: boolean;
258
+ /** Controls whether the references show a loading state in the intro */
259
+ isLoading: boolean;
260
+ /** Whether to show models in the sidebar, search, and content. */
261
+ hideModels: boolean;
262
+ /** Sets the file type of the document to download, set to `none` to hide the download button */
263
+ documentDownloadType: 'both' | 'yaml' | 'json' | 'direct' | 'none';
264
+ /** @deprecated Use `documentDownloadType: 'none'` instead */
265
+ hideDownloadButton?: boolean;
266
+ /** Whether to show the "Test Request" button */
267
+ hideTestRequestButton: boolean;
268
+ /** Whether to show the sidebar search bar */
269
+ hideSearch: boolean;
270
+ /** Whether to show the operationId */
271
+ showOperationId: boolean;
272
+ /** Whether dark mode is on or off initially (light mode) */
273
+ darkMode?: boolean;
274
+ /** forceDarkModeState makes it always this state no matter what */
275
+ forceDarkModeState?: 'dark' | 'light';
276
+ /** Whether to show the dark mode toggle */
277
+ hideDarkModeToggle: boolean;
278
+ /** If used, passed data will be added to the HTML header. @see https://unhead.unjs.io/usage/composables/use-seo-meta */
279
+ metaData?: any;
280
+ /** Path to a favicon image */
281
+ favicon?: string;
282
+ /** List of httpsnippet clients to hide from the clients menu. By default hides Unirest, pass `[]` to show all clients */
283
+ hiddenClients?: Record<string, boolean | string[]> | string[] | true;
284
+ /** Determine the HTTP client that is selected by default */
285
+ defaultHttpClient?: {
286
+ targetKey: string;
287
+ clientKey: string;
288
+ };
289
+ /** Custom CSS to be added to the page */
290
+ customCss?: string;
291
+ /** onSpecUpdate is fired on spec/swagger content change */
292
+ onSpecUpdate?: (input: string) => void;
293
+ /** onServerChange is fired on selected server change */
294
+ onServerChange?: (input: string) => void;
295
+ /** onDocumentSelect is fired when the config is selected */
296
+ onDocumentSelect?: () => void | Promise<void>;
297
+ /** Callback fired when the reference is fully loaded */
298
+ onLoaded?: (slug: string) => void | Promise<void>;
299
+ /** Fired before the outbound request is built; callback receives a mutable request builder. Experimental API. */
300
+ onBeforeRequest?: ((input: {
301
+ request: Request;
302
+ requestBuilder: any;
303
+ envVariables: Record<string, string>;
304
+ }) => void | Promise<void>) | undefined;
305
+ /** onShowMore is fired when the user clicks the "Show more" button on the references */
306
+ onShowMore?: (tagId: string) => void | Promise<void>;
307
+ /** onSidebarClick is fired when the user clicks on a sidebar item */
308
+ onSidebarClick?: (href: string) => void | Promise<void>;
309
+ /** Route using paths instead of hashes, your server MUST support this. @experimental */
310
+ pathRouting?: {
311
+ basePath: string;
312
+ };
313
+ /** MCP (Model Context Protocol) configuration. When provided, enables MCP integration with the given name and url. */
314
+ mcp?: {
315
+ /** Display name for the MCP server */
316
+ name?: string;
317
+ /** URL of the MCP server */
318
+ url?: string;
319
+ /** When true, disables the MCP integration */
320
+ disabled?: boolean;
321
+ };
322
+ /** Customize the heading portion of the hash */
323
+ generateHeadingSlug?: (input: {
324
+ slug?: string;
325
+ }) => string;
326
+ /** Customize the model portion of the hash */
327
+ generateModelSlug?: (input: {
328
+ name?: string;
329
+ }) => string;
330
+ /** Customize the tag portion of the hash */
331
+ generateTagSlug?: (input: {
332
+ name?: string;
333
+ }) => string;
334
+ /** Customize the operation portion of the hash */
335
+ generateOperationSlug?: (input: {
336
+ path: string;
337
+ operationId?: string;
338
+ method: string;
339
+ summary?: string;
340
+ }) => string;
341
+ /** Customize the webhook portion of the hash */
342
+ generateWebhookSlug?: (input: {
343
+ name: string;
344
+ method?: string;
345
+ }) => string;
346
+ /** To handle redirects, pass a function that receives the current path/hash and passes that to history.replaceState */
347
+ redirect?: (input: string) => string | null | undefined;
348
+ /** Whether to include default fonts */
349
+ withDefaultFonts: boolean;
350
+ /** Whether to expand the first tag in the sidebar when no specific URL target is present */
351
+ defaultOpenFirstTag: boolean;
352
+ /** Whether to expand all tags by default. Warning: this can cause performance issues on big documents */
353
+ defaultOpenAllTags: boolean;
354
+ /** Whether to expand all models by default. Warning: this can cause performance issues on big documents */
355
+ expandAllModelSections: boolean;
356
+ /** Whether to expand all responses by default. Warning: this can cause performance issues on big documents */
357
+ expandAllResponses: boolean;
358
+ /** Function to sort tags */
359
+ tagsSorter?: 'alpha' | ((a: any, b: any) => number);
360
+ /** Function to sort operations */
361
+ operationsSorter?: 'alpha' | 'method' | ((a: any, b: any) => number);
362
+ /** Order the schema properties by */
363
+ orderSchemaPropertiesBy: 'alpha' | 'preserve';
364
+ /** Sort the schema properties by required ones first */
365
+ orderRequiredPropertiesFirst: boolean;
366
+ };
367
+ export type SourceConfiguration = {
368
+ default?: boolean;
369
+ /** URL to an OpenAPI/Swagger document */
370
+ url?: string;
371
+ /** Directly embed the OpenAPI document. Can be a string, object, function returning an object, or null. It is recommended to pass a URL instead of content. */
372
+ content?: string | null | Record<string, any> | (() => string | any);
373
+ /** The title of the OpenAPI document. @deprecated Please move `title` to the top level and remove the `spec` prefix. */
374
+ title?: string;
375
+ /** The slug of the OpenAPI document used in the URL. @deprecated Please move `slug` to the top level and remove the `spec` prefix. */
376
+ slug?: string;
377
+ /** @deprecated Use `url` and `content` on the top level instead. */
378
+ spec?: {
379
+ url?: string;
380
+ content?: string | null | Record<string, any> | (() => string | any);
381
+ };
382
+ /** Agent Scalar configuration */
383
+ agent?: {
384
+ key?: string;
385
+ disabled?: boolean;
386
+ /** When true, hide the control to add more APIs in the agent chat. Only preloaded/registry documents are shown; the public API list is not offered. */
387
+ hideAddApi?: boolean;
388
+ };
389
+ };
390
+ export type ApiReferenceConfigurationRaw = Omit<BaseConfiguration & ExtendedConfiguration, 'proxy' | 'spec' | 'authentication' | 'showToolbar'> & {
391
+ authentication?: AuthenticationConfiguration;
392
+ };
393
+ export type ApiReferenceConfiguration = ApiReferenceConfigurationRaw & {
394
+ /** @deprecated
395
+ * This type now refers to the base configuration that does not include the sources.
396
+ * Use the type `ApiReferenceConfigurationWithSource` instead.
397
+ */
398
+ url?: SourceConfiguration['url'];
399
+ /** @deprecated
400
+ * This type now refers to the base configuration that does not include the sources.
401
+ * Use the type `ApiReferenceConfigurationWithSource` instead.
402
+ */
403
+ content?: SourceConfiguration['content'];
404
+ /**
405
+ * Fired before the outbound request is built and sent. Mutate the **request builder** so the eventual fetch call
406
+ * reflects your changes (method, path, headers, body, and related fields).
407
+ *
408
+ * **Experimental:** The builder matches {@link https://github.com/scalar/scalar/blob/main/packages/workspace-store/src/request-example/builder/request-factory.ts RequestFactory}
409
+ * (`import type { RequestFactory } from '@scalar/workspace-store/request-example'`). That shape is still experimental and may change in minor releases.
410
+ *
411
+ * @param input - Hook argument from the integration layer.
412
+ * @param input.request - **Deprecated** when treated as a fetch API `Request`. Prefer thinking of this value as the
413
+ * mutable builder ({@link https://github.com/scalar/scalar/blob/main/packages/workspace-store/src/request-example/builder/request-factory.ts RequestFactory}).
414
+ * Some call sites only pass this property.
415
+ * @param input.requestBuilder - The same builder when exposed under this name; **prefer** mutating this when your integration provides it.
416
+ * @returns void or a promise that resolves when the hook finishes
417
+ * @example
418
+ * ```ts
419
+ * onBeforeRequest: ({ request: builder }) => {
420
+ * builder.headers.set('Authorization', 'Bearer <token>')
421
+ * }
422
+ * ```
423
+ */
424
+ onBeforeRequest?: (input: {
425
+ request: Request;
426
+ requestBuilder: any;
427
+ envVariables: Record<string, string>;
428
+ }) => void | Promise<void> | undefined;
429
+ };
430
+ export type ApiReferenceConfigurationWithSource = Omit<ApiReferenceConfiguration, 'url' | 'content'> & SourceConfiguration;
431
+ /**
432
+ * Configuration for a single config with multiple sources
433
+ * The configuration will be shared between the documents
434
+ */
435
+ export type ApiReferenceConfigurationWithMultipleSources = ApiReferenceConfigurationWithSource & {
436
+ sources: SourceConfiguration[];
437
+ };
438
+ /** Configuration for multiple Api References */
439
+ export type AnyApiReferenceConfiguration = Partial<ApiReferenceConfigurationWithSource> | Partial<ApiReferenceConfigurationWithMultipleSources> | Partial<ApiReferenceConfigurationWithSource>[] | Partial<ApiReferenceConfigurationWithMultipleSources>[];
440
+ /** Typeguard to check to narrow the configs to the one with sources */
441
+ export declare const isConfigurationWithSources: (config: AnyApiReferenceConfiguration) => config is Partial<ApiReferenceConfigurationWithMultipleSources>;
442
+ export type ApiClientConfiguration = BaseConfiguration & SourceConfiguration;
443
+ export {};
444
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/api-reference/types.ts"],"names":[],"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G;IACH,GAAG,CAAC,EAAE,mBAAmB,CAAC,KAAK,CAAC,CAAA;IAChC;;;OAGG;IACH,OAAO,CAAC,EAAE,mBAAmB,CAAC,SAAS,CAAC,CAAA;IACxC;;;;;;;;;;;;;;;;;;;OAmBG;IACH,eAAe,CAAC,EAAE,CAAC,KAAK,EAAE;QACxB,OAAO,EAAE,OAAO,CAAA;QAChB,cAAc,EAAE,GAAG,CAAA;QACnB,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;KACrC,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,GAAG,SAAS,CAAA;CACvC,CAAA;AAED,MAAM,MAAM,mCAAmC,GAAG,IAAI,CAAC,yBAAyB,EAAE,KAAK,GAAG,SAAS,CAAC,GAClG,mBAAmB,CAAA;AAErB;;;GAGG;AACH,MAAM,MAAM,4CAA4C,GAAG,mCAAmC,GAAG;IAC/F,OAAO,EAAE,mBAAmB,EAAE,CAAA;CAC/B,CAAA;AAED,gDAAgD;AAChD,MAAM,MAAM,4BAA4B,GACpC,OAAO,CAAC,mCAAmC,CAAC,GAC5C,OAAO,CAAC,4CAA4C,CAAC,GACrD,OAAO,CAAC,mCAAmC,CAAC,EAAE,GAC9C,OAAO,CAAC,4CAA4C,CAAC,EAAE,CAAA;AAE3D,uEAAuE;AACvE,eAAO,MAAM,0BAA0B,GACrC,QAAQ,4BAA4B,KACnC,MAAM,IAAI,OAAO,CAAC,4CAA4C,CACkC,CAAA;AAEnG,MAAM,MAAM,sBAAsB,GAAG,iBAAiB,GAAG,mBAAmB,CAAA"}
@@ -0,0 +1,2 @@
1
+ /** Typeguard to check to narrow the configs to the one with sources */
2
+ export const isConfigurationWithSources = (config) => Boolean(!Array.isArray(config) && config && 'sources' in config && Array.isArray(config.sources));
@@ -0,0 +1,2 @@
1
+ export type { AsyncApiDocument, AsyncApiInfoObject, AsyncApiLicenseObject } from './index.generated.js';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/asyncapi/3.1/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAA"}