@scalar/types 0.1.5 → 0.1.6

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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @scalar/types
2
2
 
3
+ ## 0.1.6
4
+
5
+ ### Patch Changes
6
+
7
+ - 3783345: feat: add some callbacks to sidebar items
8
+
3
9
  ## 0.1.5
4
10
 
5
11
  ### Patch Changes
@@ -248,6 +248,508 @@ export declare const apiClientConfigurationSchema: z.ZodObject<{
248
248
  _integration?: "go" | "elysiajs" | "fastify" | "adonisjs" | "docusaurus" | "dotnet" | "express" | "fastapi" | "hono" | "html" | "laravel" | "litestar" | "nestjs" | "nextjs" | "nitro" | "nuxt" | "platformatic" | "react" | "rust" | "vue" | null | undefined;
249
249
  }>;
250
250
  export type ApiClientConfiguration = z.infer<typeof apiClientConfigurationSchema>;
251
+ /** Configuration for the Api Client without the transform since it cannot be merged */
252
+ declare const _apiReferenceConfigurationSchema: z.ZodObject<z.objectUtil.extendShape<{
253
+ /**
254
+ * URL to an OpenAPI/Swagger document
255
+ **/
256
+ url: z.ZodOptional<z.ZodString>;
257
+ /**
258
+ * Directly embed the OpenAPI document.
259
+ * Can be a string, object, function returning an object, or null.
260
+ *
261
+ * @remarks It’s recommended to pass a URL instead of content.
262
+ **/
263
+ content: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodAny>, z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodRecord<z.ZodString, z.ZodAny>>, z.ZodNull]>>;
264
+ /**
265
+ * The title of the OpenAPI document.
266
+ *
267
+ * @example 'Scalar Galaxy'
268
+ */
269
+ title: z.ZodOptional<z.ZodString>;
270
+ /**
271
+ * The slug of the OpenAPI document used in the URL.
272
+ *
273
+ * If none is passed, the title will be used.
274
+ *
275
+ * If no title is used, it’ll just use the index.
276
+ *
277
+ * @example 'scalar-galaxy'
278
+ */
279
+ slug: z.ZodOptional<z.ZodString>;
280
+ /**
281
+ * The OpenAPI/Swagger document to render
282
+ *
283
+ * @deprecated Use `url` and `content` on the top level instead.
284
+ **/
285
+ spec: z.ZodOptional<z.ZodObject<{
286
+ /**
287
+ * URL to an OpenAPI/Swagger document
288
+ *
289
+ * @deprecated Please move `url` to the top level and remove the `spec` prefix.
290
+ *
291
+ * @example
292
+ * ```ts
293
+ * const oldConfiguration = {
294
+ * spec: {
295
+ * url: 'https://example.com/openapi.json',
296
+ * },
297
+ * }
298
+ *
299
+ * const newConfiguration = {
300
+ * url: 'https://example.com/openapi.json',
301
+ * }
302
+ * ```
303
+ **/
304
+ url: z.ZodOptional<z.ZodString>;
305
+ /**
306
+ * Directly embed the OpenAPI document.
307
+ * Can be a string, object, function returning an object, or null.
308
+ *
309
+ * @remarks It's recommended to pass a URL instead of content.
310
+ *
311
+ * @deprecated Please move `content` to the top level and remove the `spec` prefix.
312
+ *
313
+ * @example
314
+ * ```ts
315
+ * const oldConfiguration = {
316
+ * spec: {
317
+ * content: '…',
318
+ * },
319
+ * }
320
+ *
321
+ * const newConfiguration = {
322
+ * content: '…',
323
+ * }
324
+ * ```
325
+ **/
326
+ content: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodAny>, z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodRecord<z.ZodString, z.ZodAny>>, z.ZodNull]>>;
327
+ /**
328
+ * The title of the OpenAPI document.
329
+ *
330
+ * @example 'Scalar Galaxy'
331
+ *
332
+ * @deprecated Please move `title` to the top level and remove the `spec` prefix.
333
+ */
334
+ title: z.ZodOptional<z.ZodString>;
335
+ /**
336
+ * The slug of the OpenAPI document used in the URL.
337
+ *
338
+ * If none is passed, the title will be used.
339
+ *
340
+ * If no title is used, it’ll just use the index.
341
+ *
342
+ * @example 'scalar-galaxy'
343
+ *
344
+ * @deprecated Please move `slug` to the top level and remove the `spec` prefix.
345
+ */
346
+ slug: z.ZodOptional<z.ZodString>;
347
+ }, "strip", z.ZodTypeAny, {
348
+ url?: string | undefined;
349
+ content?: string | Record<string, any> | ((...args: unknown[]) => Record<string, any>) | null | undefined;
350
+ title?: string | undefined;
351
+ slug?: string | undefined;
352
+ }, {
353
+ url?: string | undefined;
354
+ content?: string | Record<string, any> | ((...args: unknown[]) => Record<string, any>) | null | undefined;
355
+ title?: string | undefined;
356
+ slug?: string | undefined;
357
+ }>>;
358
+ /** Prefill authentication */
359
+ authentication: z.ZodOptional<z.ZodAny>;
360
+ /** Base URL for the API server */
361
+ baseServerURL: z.ZodOptional<z.ZodString>;
362
+ /**
363
+ * Whether to hide the client button
364
+ * @default false
365
+ */
366
+ hideClientButton: z.ZodCatch<z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
367
+ /** URL to a request proxy for the API client */
368
+ proxyUrl: z.ZodOptional<z.ZodString>;
369
+ /** Key used with CTRL/CMD to open the search modal (defaults to 'k' e.g. CMD+k) */
370
+ searchHotKey: z.ZodOptional<z.ZodEnum<["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"]>>;
371
+ /** List of OpenAPI server objects */
372
+ servers: z.ZodOptional<z.ZodArray<z.ZodAny, "many">>;
373
+ /**
374
+ * Whether to show the sidebar
375
+ * @default true
376
+ */
377
+ showSidebar: z.ZodCatch<z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
378
+ /** A string to use one of the color presets */
379
+ theme: z.ZodCatch<z.ZodDefault<z.ZodOptional<z.ZodEnum<["alternate", "default", "moon", "purple", "solarized", "bluePlanet", "deepSpace", "saturn", "kepler", "elysiajs", "fastify", "mars", "none"]>>>>;
380
+ /** Integration type identifier */
381
+ _integration: z.ZodOptional<z.ZodNullable<z.ZodEnum<["adonisjs", "docusaurus", "dotnet", "elysiajs", "express", "fastapi", "fastify", "go", "hono", "html", "laravel", "litestar", "nestjs", "nextjs", "nitro", "nuxt", "platformatic", "react", "rust", "vue"]>>>;
382
+ }, {
383
+ /**
384
+ * The layout to use for the references
385
+ * @default 'modern'
386
+ */
387
+ layout: z.ZodCatch<z.ZodDefault<z.ZodOptional<z.ZodEnum<["modern", "classic"]>>>>;
388
+ /**
389
+ * URL to a request proxy for the API client
390
+ * @deprecated Use proxyUrl instead
391
+ */
392
+ proxy: z.ZodOptional<z.ZodString>;
393
+ /**
394
+ * Whether the spec input should show
395
+ * @default false
396
+ */
397
+ isEditable: z.ZodCatch<z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
398
+ /**
399
+ * Controls whether the references show a loading state in the intro
400
+ * @default false
401
+ */
402
+ isLoading: z.ZodCatch<z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
403
+ /**
404
+ * Whether to show models in the sidebar, search, and content.
405
+ * @default false
406
+ */
407
+ hideModels: z.ZodCatch<z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
408
+ /**
409
+ * Whether to show the "Download OpenAPI Document" button
410
+ * @default false
411
+ */
412
+ hideDownloadButton: z.ZodCatch<z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
413
+ /**
414
+ * Whether to show the "Test Request" button
415
+ * @default false
416
+ */
417
+ hideTestRequestButton: z.ZodCatch<z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
418
+ /**
419
+ * Whether to show the sidebar search bar
420
+ * @default false
421
+ */
422
+ hideSearch: z.ZodCatch<z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
423
+ /** Whether dark mode is on or off initially (light mode) */
424
+ darkMode: z.ZodOptional<z.ZodBoolean>;
425
+ /** forceDarkModeState makes it always this state no matter what */
426
+ forceDarkModeState: z.ZodOptional<z.ZodEnum<["dark", "light"]>>;
427
+ /**
428
+ * Whether to show the dark mode toggle
429
+ * @default false
430
+ */
431
+ hideDarkModeToggle: z.ZodCatch<z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
432
+ /**
433
+ * If used, passed data will be added to the HTML header
434
+ * @see https://unhead.unjs.io/usage/composables/use-seo-meta
435
+ */
436
+ metaData: z.ZodOptional<z.ZodAny>;
437
+ /**
438
+ * Path to a favicon image
439
+ * @default undefined
440
+ * @example '/favicon.svg'
441
+ */
442
+ favicon: z.ZodOptional<z.ZodString>;
443
+ /**
444
+ * List of httpsnippet clients to hide from the clients menu
445
+ * By default hides Unirest, pass `[]` to show all clients
446
+ */
447
+ hiddenClients: z.ZodOptional<z.ZodUnion<[z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodBoolean, z.ZodArray<z.ZodString, "many">]>>, z.ZodArray<z.ZodString, "many">, z.ZodLiteral<true>]>>;
448
+ /** Determine the HTTP client that's selected by default */
449
+ defaultHttpClient: z.ZodOptional<z.ZodObject<{
450
+ targetKey: z.ZodType<"http" | "c" | "clojure" | "csharp" | "go" | "java" | "js" | "kotlin" | "node" | "objc" | "ocaml" | "php" | "powershell" | "python" | "r" | "ruby" | "shell" | "swift" | "dart", z.ZodTypeDef, "http" | "c" | "clojure" | "csharp" | "go" | "java" | "js" | "kotlin" | "node" | "objc" | "ocaml" | "php" | "powershell" | "python" | "r" | "ruby" | "shell" | "swift" | "dart">;
451
+ clientKey: z.ZodString;
452
+ }, "strip", z.ZodTypeAny, {
453
+ targetKey: "http" | "c" | "clojure" | "csharp" | "go" | "java" | "js" | "kotlin" | "node" | "objc" | "ocaml" | "php" | "powershell" | "python" | "r" | "ruby" | "shell" | "swift" | "dart";
454
+ clientKey: string;
455
+ }, {
456
+ targetKey: "http" | "c" | "clojure" | "csharp" | "go" | "java" | "js" | "kotlin" | "node" | "objc" | "ocaml" | "php" | "powershell" | "python" | "r" | "ruby" | "shell" | "swift" | "dart";
457
+ clientKey: string;
458
+ }>>;
459
+ /** Custom CSS to be added to the page */
460
+ customCss: z.ZodOptional<z.ZodString>;
461
+ /** onSpecUpdate is fired on spec/swagger content change */
462
+ onSpecUpdate: z.ZodOptional<z.ZodFunction<z.ZodTuple<[z.ZodString], z.ZodUnknown>, z.ZodVoid>>;
463
+ /** onServerChange is fired on selected server change */
464
+ onServerChange: z.ZodOptional<z.ZodFunction<z.ZodTuple<[z.ZodString], z.ZodUnknown>, z.ZodVoid>>;
465
+ /** onDocumentSelect is fired when the config is selected */
466
+ onDocumentSelect: z.ZodOptional<z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodUnion<[z.ZodVoid, z.ZodPromise<z.ZodVoid>]>>>;
467
+ /** Callback fired when the reference is fully loaded */
468
+ onLoaded: z.ZodOptional<z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodUnion<[z.ZodVoid, z.ZodPromise<z.ZodVoid>]>>>;
469
+ /**
470
+ * onShowMore is fired when the user clicks the "Show more" button on the references
471
+ * @param tagId - The ID of the tag that was clicked
472
+ */
473
+ onShowMore: z.ZodOptional<z.ZodFunction<z.ZodTuple<[z.ZodString], z.ZodUnknown>, z.ZodUnion<[z.ZodVoid, z.ZodPromise<z.ZodVoid>]>>>;
474
+ /**
475
+ * onSidebarClick is fired when the user clicks on a sidebar item
476
+ * @param href - The href of the sidebar item that was clicked
477
+ */
478
+ onSidebarClick: z.ZodOptional<z.ZodFunction<z.ZodTuple<[z.ZodString], z.ZodUnknown>, z.ZodUnion<[z.ZodVoid, z.ZodPromise<z.ZodVoid>]>>>;
479
+ /**
480
+ * Route using paths instead of hashes, your server MUST support this
481
+ * @example '/standalone-api-reference/:custom(.*)?'
482
+ * @experimental
483
+ * @default undefined
484
+ */
485
+ pathRouting: z.ZodOptional<z.ZodObject<{
486
+ /** Base path for the API reference */
487
+ basePath: z.ZodString;
488
+ }, "strip", z.ZodTypeAny, {
489
+ basePath: string;
490
+ }, {
491
+ basePath: string;
492
+ }>>;
493
+ /**
494
+ * Customize the heading portion of the hash
495
+ * @param heading - The heading object
496
+ * @returns A string ID used to generate the URL hash
497
+ * @default (heading) => `#description/${heading.slug}`
498
+ */
499
+ generateHeadingSlug: z.ZodOptional<z.ZodFunction<z.ZodTuple<[z.ZodObject<{
500
+ slug: z.ZodDefault<z.ZodString>;
501
+ }, "strip", z.ZodTypeAny, {
502
+ slug: string;
503
+ }, {
504
+ slug?: string | undefined;
505
+ }>], z.ZodUnknown>, z.ZodString>>;
506
+ /**
507
+ * Customize the model portion of the hash
508
+ * @param model - The model object with a name property
509
+ * @returns A string ID used to generate the URL hash
510
+ * @default (model) => slug(model.name)
511
+ */
512
+ generateModelSlug: z.ZodOptional<z.ZodFunction<z.ZodTuple<[z.ZodObject<{
513
+ name: z.ZodDefault<z.ZodString>;
514
+ }, "strip", z.ZodTypeAny, {
515
+ name: string;
516
+ }, {
517
+ name?: string | undefined;
518
+ }>], z.ZodUnknown>, z.ZodString>>;
519
+ /**
520
+ * Customize the tag portion of the hash
521
+ * @param tag - The tag object
522
+ * @returns A string ID used to generate the URL hash
523
+ * @default (tag) => slug(tag.name)
524
+ */
525
+ generateTagSlug: z.ZodOptional<z.ZodFunction<z.ZodTuple<[z.ZodObject<{
526
+ name: z.ZodDefault<z.ZodString>;
527
+ }, "strip", z.ZodTypeAny, {
528
+ name: string;
529
+ }, {
530
+ name?: string | undefined;
531
+ }>], z.ZodUnknown>, z.ZodString>>;
532
+ /**
533
+ * Customize the operation portion of the hash
534
+ * @param operation - The operation object
535
+ * @returns A string ID used to generate the URL hash
536
+ * @default (operation) => `${operation.method}${operation.path}`
537
+ */
538
+ generateOperationSlug: z.ZodOptional<z.ZodFunction<z.ZodTuple<[z.ZodObject<{
539
+ path: z.ZodString;
540
+ operationId: z.ZodOptional<z.ZodString>;
541
+ method: z.ZodString;
542
+ summary: z.ZodOptional<z.ZodString>;
543
+ }, "strip", z.ZodTypeAny, {
544
+ path: string;
545
+ method: string;
546
+ operationId?: string | undefined;
547
+ summary?: string | undefined;
548
+ }, {
549
+ path: string;
550
+ method: string;
551
+ operationId?: string | undefined;
552
+ summary?: string | undefined;
553
+ }>], z.ZodUnknown>, z.ZodString>>;
554
+ /**
555
+ * Customize the webhook portion of the hash
556
+ * @param webhook - The webhook object
557
+ * @returns A string ID used to generate the URL hash
558
+ * @default (webhook) => slug(webhook.name)
559
+ */
560
+ generateWebhookSlug: z.ZodOptional<z.ZodFunction<z.ZodTuple<[z.ZodObject<{
561
+ name: z.ZodString;
562
+ method: z.ZodOptional<z.ZodString>;
563
+ }, "strip", z.ZodTypeAny, {
564
+ name: string;
565
+ method?: string | undefined;
566
+ }, {
567
+ name: string;
568
+ method?: string | undefined;
569
+ }>], z.ZodUnknown>, z.ZodString>>;
570
+ /**
571
+ * To handle redirects, pass a function that will recieve:
572
+ * - The current path with hash if pathRouting is enabled
573
+ * - The current hash if hashRouting (default)
574
+ * And then passes that to history.replaceState
575
+ *
576
+ * @example hashRouting (default)
577
+ * ```ts
578
+ * redirect: (hash: string) => hash.replace('#v1/old-path', '#v2/new-path')
579
+ * ```
580
+ * @example pathRouting
581
+ * ```ts
582
+ * redirect: (pathWithHash: string) => {
583
+ * if (pathWithHash.includes('#')) {
584
+ * return pathWithHash.replace('/v1/tags/user#operation/get-user', '/v1/tags/user/operation/get-user')
585
+ * }
586
+ * return null
587
+ * }
588
+ * ```
589
+ */
590
+ redirect: z.ZodOptional<z.ZodFunction<z.ZodTuple<[z.ZodString], z.ZodUnknown>, z.ZodOptional<z.ZodNullable<z.ZodString>>>>;
591
+ /**
592
+ * Whether to include default fonts
593
+ * @default true
594
+ */
595
+ withDefaultFonts: z.ZodCatch<z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
596
+ /** Whether to expand all tags by default */
597
+ defaultOpenAllTags: z.ZodOptional<z.ZodBoolean>;
598
+ /**
599
+ * Function to sort tags
600
+ * @default 'alpha' for alphabetical sorting
601
+ */
602
+ tagsSorter: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"alpha">, z.ZodFunction<z.ZodTuple<[z.ZodAny, z.ZodAny], z.ZodUnknown>, z.ZodNumber>]>>;
603
+ /**
604
+ * Function to sort operations
605
+ * @default 'alpha' for alphabetical sorting
606
+ */
607
+ operationsSorter: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"alpha">, z.ZodLiteral<"method">, z.ZodFunction<z.ZodTuple<[z.ZodAny, z.ZodAny], z.ZodUnknown>, z.ZodNumber>]>>;
608
+ }>, "strip", z.ZodTypeAny, {
609
+ hideClientButton: boolean;
610
+ showSidebar: boolean;
611
+ theme: "alternate" | "default" | "moon" | "purple" | "solarized" | "bluePlanet" | "deepSpace" | "saturn" | "kepler" | "elysiajs" | "fastify" | "mars" | "none";
612
+ layout: "modern" | "classic";
613
+ isEditable: boolean;
614
+ isLoading: boolean;
615
+ hideModels: boolean;
616
+ hideDownloadButton: boolean;
617
+ hideTestRequestButton: boolean;
618
+ hideSearch: boolean;
619
+ hideDarkModeToggle: boolean;
620
+ withDefaultFonts: boolean;
621
+ url?: string | undefined;
622
+ content?: string | Record<string, any> | ((...args: unknown[]) => Record<string, any>) | null | undefined;
623
+ title?: string | undefined;
624
+ slug?: string | undefined;
625
+ spec?: {
626
+ url?: string | undefined;
627
+ content?: string | Record<string, any> | ((...args: unknown[]) => Record<string, any>) | null | undefined;
628
+ title?: string | undefined;
629
+ slug?: string | undefined;
630
+ } | undefined;
631
+ authentication?: any;
632
+ baseServerURL?: string | undefined;
633
+ proxyUrl?: string | undefined;
634
+ searchHotKey?: "o" | "n" | "c" | "r" | "a" | "b" | "d" | "e" | "f" | "g" | "h" | "i" | "j" | "k" | "l" | "m" | "p" | "q" | "s" | "t" | "u" | "v" | "w" | "x" | "y" | "z" | undefined;
635
+ servers?: any[] | undefined;
636
+ _integration?: "go" | "elysiajs" | "fastify" | "adonisjs" | "docusaurus" | "dotnet" | "express" | "fastapi" | "hono" | "html" | "laravel" | "litestar" | "nestjs" | "nextjs" | "nitro" | "nuxt" | "platformatic" | "react" | "rust" | "vue" | null | undefined;
637
+ proxy?: string | undefined;
638
+ darkMode?: boolean | undefined;
639
+ forceDarkModeState?: "dark" | "light" | undefined;
640
+ metaData?: any;
641
+ favicon?: string | undefined;
642
+ hiddenClients?: true | string[] | Record<string, boolean | string[]> | undefined;
643
+ defaultHttpClient?: {
644
+ targetKey: "http" | "c" | "clojure" | "csharp" | "go" | "java" | "js" | "kotlin" | "node" | "objc" | "ocaml" | "php" | "powershell" | "python" | "r" | "ruby" | "shell" | "swift" | "dart";
645
+ clientKey: string;
646
+ } | undefined;
647
+ customCss?: string | undefined;
648
+ onSpecUpdate?: ((args_0: string, ...args: unknown[]) => void) | undefined;
649
+ onServerChange?: ((args_0: string, ...args: unknown[]) => void) | undefined;
650
+ onDocumentSelect?: ((...args: unknown[]) => void | Promise<void>) | undefined;
651
+ onLoaded?: ((...args: unknown[]) => void | Promise<void>) | undefined;
652
+ onShowMore?: ((args_0: string, ...args: unknown[]) => void | Promise<void>) | undefined;
653
+ onSidebarClick?: ((args_0: string, ...args: unknown[]) => void | Promise<void>) | undefined;
654
+ pathRouting?: {
655
+ basePath: string;
656
+ } | undefined;
657
+ generateHeadingSlug?: ((args_0: {
658
+ slug?: string | undefined;
659
+ }, ...args: unknown[]) => string) | undefined;
660
+ generateModelSlug?: ((args_0: {
661
+ name?: string | undefined;
662
+ }, ...args: unknown[]) => string) | undefined;
663
+ generateTagSlug?: ((args_0: {
664
+ name?: string | undefined;
665
+ }, ...args: unknown[]) => string) | undefined;
666
+ generateOperationSlug?: ((args_0: {
667
+ path: string;
668
+ method: string;
669
+ operationId?: string | undefined;
670
+ summary?: string | undefined;
671
+ }, ...args: unknown[]) => string) | undefined;
672
+ generateWebhookSlug?: ((args_0: {
673
+ name: string;
674
+ method?: string | undefined;
675
+ }, ...args: unknown[]) => string) | undefined;
676
+ redirect?: ((args_0: string, ...args: unknown[]) => string | null | undefined) | undefined;
677
+ defaultOpenAllTags?: boolean | undefined;
678
+ tagsSorter?: "alpha" | ((args_0: any, args_1: any, ...args: unknown[]) => number) | undefined;
679
+ operationsSorter?: "method" | "alpha" | ((args_0: any, args_1: any, ...args: unknown[]) => number) | undefined;
680
+ }, {
681
+ url?: string | undefined;
682
+ content?: string | Record<string, any> | ((...args: unknown[]) => Record<string, any>) | null | undefined;
683
+ title?: string | undefined;
684
+ slug?: string | undefined;
685
+ spec?: {
686
+ url?: string | undefined;
687
+ content?: string | Record<string, any> | ((...args: unknown[]) => Record<string, any>) | null | undefined;
688
+ title?: string | undefined;
689
+ slug?: string | undefined;
690
+ } | undefined;
691
+ authentication?: any;
692
+ baseServerURL?: string | undefined;
693
+ hideClientButton?: unknown;
694
+ proxyUrl?: string | undefined;
695
+ searchHotKey?: "o" | "n" | "c" | "r" | "a" | "b" | "d" | "e" | "f" | "g" | "h" | "i" | "j" | "k" | "l" | "m" | "p" | "q" | "s" | "t" | "u" | "v" | "w" | "x" | "y" | "z" | undefined;
696
+ servers?: any[] | undefined;
697
+ showSidebar?: unknown;
698
+ theme?: unknown;
699
+ _integration?: "go" | "elysiajs" | "fastify" | "adonisjs" | "docusaurus" | "dotnet" | "express" | "fastapi" | "hono" | "html" | "laravel" | "litestar" | "nestjs" | "nextjs" | "nitro" | "nuxt" | "platformatic" | "react" | "rust" | "vue" | null | undefined;
700
+ layout?: unknown;
701
+ proxy?: string | undefined;
702
+ isEditable?: unknown;
703
+ isLoading?: unknown;
704
+ hideModels?: unknown;
705
+ hideDownloadButton?: unknown;
706
+ hideTestRequestButton?: unknown;
707
+ hideSearch?: unknown;
708
+ darkMode?: boolean | undefined;
709
+ forceDarkModeState?: "dark" | "light" | undefined;
710
+ hideDarkModeToggle?: unknown;
711
+ metaData?: any;
712
+ favicon?: string | undefined;
713
+ hiddenClients?: true | string[] | Record<string, boolean | string[]> | undefined;
714
+ defaultHttpClient?: {
715
+ targetKey: "http" | "c" | "clojure" | "csharp" | "go" | "java" | "js" | "kotlin" | "node" | "objc" | "ocaml" | "php" | "powershell" | "python" | "r" | "ruby" | "shell" | "swift" | "dart";
716
+ clientKey: string;
717
+ } | undefined;
718
+ customCss?: string | undefined;
719
+ onSpecUpdate?: ((args_0: string, ...args: unknown[]) => void) | undefined;
720
+ onServerChange?: ((args_0: string, ...args: unknown[]) => void) | undefined;
721
+ onDocumentSelect?: ((...args: unknown[]) => void | Promise<void>) | undefined;
722
+ onLoaded?: ((...args: unknown[]) => void | Promise<void>) | undefined;
723
+ onShowMore?: ((args_0: string, ...args: unknown[]) => void | Promise<void>) | undefined;
724
+ onSidebarClick?: ((args_0: string, ...args: unknown[]) => void | Promise<void>) | undefined;
725
+ pathRouting?: {
726
+ basePath: string;
727
+ } | undefined;
728
+ generateHeadingSlug?: ((args_0: {
729
+ slug: string;
730
+ }, ...args: unknown[]) => string) | undefined;
731
+ generateModelSlug?: ((args_0: {
732
+ name: string;
733
+ }, ...args: unknown[]) => string) | undefined;
734
+ generateTagSlug?: ((args_0: {
735
+ name: string;
736
+ }, ...args: unknown[]) => string) | undefined;
737
+ generateOperationSlug?: ((args_0: {
738
+ path: string;
739
+ method: string;
740
+ operationId?: string | undefined;
741
+ summary?: string | undefined;
742
+ }, ...args: unknown[]) => string) | undefined;
743
+ generateWebhookSlug?: ((args_0: {
744
+ name: string;
745
+ method?: string | undefined;
746
+ }, ...args: unknown[]) => string) | undefined;
747
+ redirect?: ((args_0: string, ...args: unknown[]) => string | null | undefined) | undefined;
748
+ withDefaultFonts?: unknown;
749
+ defaultOpenAllTags?: boolean | undefined;
750
+ tagsSorter?: "alpha" | ((args_0: any, args_1: any, ...args: unknown[]) => number) | undefined;
751
+ operationsSorter?: "method" | "alpha" | ((args_0: any, args_1: any, ...args: unknown[]) => number) | undefined;
752
+ }>;
251
753
  /** Configuration for the Api Reference */
252
754
  export declare const apiReferenceConfigurationSchema: z.ZodEffects<z.ZodObject<z.objectUtil.extendShape<{
253
755
  /**
@@ -464,6 +966,18 @@ export declare const apiReferenceConfigurationSchema: z.ZodEffects<z.ZodObject<z
464
966
  onServerChange: z.ZodOptional<z.ZodFunction<z.ZodTuple<[z.ZodString], z.ZodUnknown>, z.ZodVoid>>;
465
967
  /** onDocumentSelect is fired when the config is selected */
466
968
  onDocumentSelect: z.ZodOptional<z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodUnion<[z.ZodVoid, z.ZodPromise<z.ZodVoid>]>>>;
969
+ /** Callback fired when the reference is fully loaded */
970
+ onLoaded: z.ZodOptional<z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodUnion<[z.ZodVoid, z.ZodPromise<z.ZodVoid>]>>>;
971
+ /**
972
+ * onShowMore is fired when the user clicks the "Show more" button on the references
973
+ * @param tagId - The ID of the tag that was clicked
974
+ */
975
+ onShowMore: z.ZodOptional<z.ZodFunction<z.ZodTuple<[z.ZodString], z.ZodUnknown>, z.ZodUnion<[z.ZodVoid, z.ZodPromise<z.ZodVoid>]>>>;
976
+ /**
977
+ * onSidebarClick is fired when the user clicks on a sidebar item
978
+ * @param href - The href of the sidebar item that was clicked
979
+ */
980
+ onSidebarClick: z.ZodOptional<z.ZodFunction<z.ZodTuple<[z.ZodString], z.ZodUnknown>, z.ZodUnion<[z.ZodVoid, z.ZodPromise<z.ZodVoid>]>>>;
467
981
  /**
468
982
  * Route using paths instead of hashes, your server MUST support this
469
983
  * @example '/standalone-api-reference/:custom(.*)?'
@@ -555,8 +1069,6 @@ export declare const apiReferenceConfigurationSchema: z.ZodEffects<z.ZodObject<z
555
1069
  name: string;
556
1070
  method?: string | undefined;
557
1071
  }>], z.ZodUnknown>, z.ZodString>>;
558
- /** Callback fired when the reference is fully loaded */
559
- onLoaded: z.ZodOptional<z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodVoid>>;
560
1072
  /**
561
1073
  * To handle redirects, pass a function that will recieve:
562
1074
  * - The current path with hash if pathRouting is enabled
@@ -638,6 +1150,9 @@ export declare const apiReferenceConfigurationSchema: z.ZodEffects<z.ZodObject<z
638
1150
  onSpecUpdate?: ((args_0: string, ...args: unknown[]) => void) | undefined;
639
1151
  onServerChange?: ((args_0: string, ...args: unknown[]) => void) | undefined;
640
1152
  onDocumentSelect?: ((...args: unknown[]) => void | Promise<void>) | undefined;
1153
+ onLoaded?: ((...args: unknown[]) => void | Promise<void>) | undefined;
1154
+ onShowMore?: ((args_0: string, ...args: unknown[]) => void | Promise<void>) | undefined;
1155
+ onSidebarClick?: ((args_0: string, ...args: unknown[]) => void | Promise<void>) | undefined;
641
1156
  pathRouting?: {
642
1157
  basePath: string;
643
1158
  } | undefined;
@@ -660,7 +1175,6 @@ export declare const apiReferenceConfigurationSchema: z.ZodEffects<z.ZodObject<z
660
1175
  name: string;
661
1176
  method?: string | undefined;
662
1177
  }, ...args: unknown[]) => string) | undefined;
663
- onLoaded?: ((...args: unknown[]) => void) | undefined;
664
1178
  redirect?: ((args_0: string, ...args: unknown[]) => string | null | undefined) | undefined;
665
1179
  defaultOpenAllTags?: boolean | undefined;
666
1180
  tagsSorter?: "alpha" | ((args_0: any, args_1: any, ...args: unknown[]) => number) | undefined;
@@ -707,6 +1221,9 @@ export declare const apiReferenceConfigurationSchema: z.ZodEffects<z.ZodObject<z
707
1221
  onSpecUpdate?: ((args_0: string, ...args: unknown[]) => void) | undefined;
708
1222
  onServerChange?: ((args_0: string, ...args: unknown[]) => void) | undefined;
709
1223
  onDocumentSelect?: ((...args: unknown[]) => void | Promise<void>) | undefined;
1224
+ onLoaded?: ((...args: unknown[]) => void | Promise<void>) | undefined;
1225
+ onShowMore?: ((args_0: string, ...args: unknown[]) => void | Promise<void>) | undefined;
1226
+ onSidebarClick?: ((args_0: string, ...args: unknown[]) => void | Promise<void>) | undefined;
710
1227
  pathRouting?: {
711
1228
  basePath: string;
712
1229
  } | undefined;
@@ -729,7 +1246,6 @@ export declare const apiReferenceConfigurationSchema: z.ZodEffects<z.ZodObject<z
729
1246
  name: string;
730
1247
  method?: string | undefined;
731
1248
  }, ...args: unknown[]) => string) | undefined;
732
- onLoaded?: ((...args: unknown[]) => void) | undefined;
733
1249
  redirect?: ((args_0: string, ...args: unknown[]) => string | null | undefined) | undefined;
734
1250
  withDefaultFonts?: unknown;
735
1251
  defaultOpenAllTags?: boolean | undefined;
@@ -778,6 +1294,9 @@ export declare const apiReferenceConfigurationSchema: z.ZodEffects<z.ZodObject<z
778
1294
  onSpecUpdate?: ((args_0: string, ...args: unknown[]) => void) | undefined;
779
1295
  onServerChange?: ((args_0: string, ...args: unknown[]) => void) | undefined;
780
1296
  onDocumentSelect?: ((...args: unknown[]) => void | Promise<void>) | undefined;
1297
+ onLoaded?: ((...args: unknown[]) => void | Promise<void>) | undefined;
1298
+ onShowMore?: ((args_0: string, ...args: unknown[]) => void | Promise<void>) | undefined;
1299
+ onSidebarClick?: ((args_0: string, ...args: unknown[]) => void | Promise<void>) | undefined;
781
1300
  pathRouting?: {
782
1301
  basePath: string;
783
1302
  } | undefined;
@@ -800,7 +1319,6 @@ export declare const apiReferenceConfigurationSchema: z.ZodEffects<z.ZodObject<z
800
1319
  name: string;
801
1320
  method?: string | undefined;
802
1321
  }, ...args: unknown[]) => string) | undefined;
803
- onLoaded?: ((...args: unknown[]) => void) | undefined;
804
1322
  redirect?: ((args_0: string, ...args: unknown[]) => string | null | undefined) | undefined;
805
1323
  defaultOpenAllTags?: boolean | undefined;
806
1324
  tagsSorter?: "alpha" | ((args_0: any, args_1: any, ...args: unknown[]) => number) | undefined;
@@ -847,6 +1365,9 @@ export declare const apiReferenceConfigurationSchema: z.ZodEffects<z.ZodObject<z
847
1365
  onSpecUpdate?: ((args_0: string, ...args: unknown[]) => void) | undefined;
848
1366
  onServerChange?: ((args_0: string, ...args: unknown[]) => void) | undefined;
849
1367
  onDocumentSelect?: ((...args: unknown[]) => void | Promise<void>) | undefined;
1368
+ onLoaded?: ((...args: unknown[]) => void | Promise<void>) | undefined;
1369
+ onShowMore?: ((args_0: string, ...args: unknown[]) => void | Promise<void>) | undefined;
1370
+ onSidebarClick?: ((args_0: string, ...args: unknown[]) => void | Promise<void>) | undefined;
850
1371
  pathRouting?: {
851
1372
  basePath: string;
852
1373
  } | undefined;
@@ -869,7 +1390,6 @@ export declare const apiReferenceConfigurationSchema: z.ZodEffects<z.ZodObject<z
869
1390
  name: string;
870
1391
  method?: string | undefined;
871
1392
  }, ...args: unknown[]) => string) | undefined;
872
- onLoaded?: ((...args: unknown[]) => void) | undefined;
873
1393
  redirect?: ((args_0: string, ...args: unknown[]) => string | null | undefined) | undefined;
874
1394
  withDefaultFonts?: unknown;
875
1395
  defaultOpenAllTags?: boolean | undefined;
@@ -877,7 +1397,7 @@ export declare const apiReferenceConfigurationSchema: z.ZodEffects<z.ZodObject<z
877
1397
  operationsSorter?: "method" | "alpha" | ((args_0: any, args_1: any, ...args: unknown[]) => number) | undefined;
878
1398
  }>;
879
1399
  /** Configuration after parsing, this is the main type */
880
- export type ApiReferenceConfiguration = Omit<z.infer<typeof apiReferenceConfigurationSchema>, 'proxy' | 'spec'> & {
1400
+ export type ApiReferenceConfiguration = Omit<z.infer<typeof _apiReferenceConfigurationSchema>, 'proxy' | 'spec'> & {
881
1401
  authentication?: AuthenticationConfiguration;
882
1402
  };
883
1403
  /** Api Config which includes the default config */
@@ -1 +1 @@
1
- {"version":3,"file":"api-reference-configuration.d.ts","sourceRoot":"","sources":["../../src/api-reference/api-reference-configuration.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,iDAAiD,CAAA;AA6ElG,0DAA0D;AAC1D,eAAO,MAAM,uBAAuB;IAClC;;;;;;;;;;;;;;;;;QAiBI;;IAEJ;;;;;;;;;;;;;;;;;;;;QAoBI;;IAEJ;;;;;;OAMG;;IAEH;;;;;;;;;;OAUG;;;;;;;;;;;;EAEH,CAAA;AACF,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAA;AAQvE,uCAAuC;AACvC,eAAO,MAAM,4BAA4B;IACvC;;QAEI;;IAEJ;;;;;QAKI;;IAEJ;;;;OAIG;;IAEH;;;;;;;;OAQG;;IAEH;;;;QAII;;QAvGJ;;;;;;;;;;;;;;;;;YAiBI;;QAEJ;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA8DwG,CAAA;AAE/G,yDAAyD;AACzD,MAAM,MAAM,yBAAyB,GAAG,IAAI,CAC1C,CAAC,CAAC,KAAK,CAAC,OAAO,gCAAgC,CAAC,EAEhD,OAAO,GAAG,MAAM,CACjB,GAAG;IACF,cAAc,CAAC,EAAE,2BAA2B,CAAA;CAC7C,CAAA;AAED,mDAAmD;AACnD,KAAK,oCAAoC,GAAG,yBAAyB,GAAG;IACtE,oDAAoD;IACpD,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB,CAAA;AAED,qDAAqD;AACrD,MAAM,MAAM,oCAAoC,GAAG,IAAI,CAAC,oCAAoC,EAAE,SAAS,CAAC,GAAG;IACzG,OAAO,EAAE,CAAC,iBAAiB,GAAG;QAAE,OAAO,CAAC,EAAE,OAAO,CAAA;KAAE,CAAC,EAAE,CAAA;CACvD,CAAA;AAED,gDAAgD;AAChD,MAAM,MAAM,4BAA4B,GACpC,OAAO,CAAC,yBAAyB,CAAC,GAClC,OAAO,CAAC,oCAAoC,CAAC,GAC7C,OAAO,CAAC,oCAAoC,CAAC,EAAE,GAC/C,OAAO,CAAC,oCAAoC,CAAC,EAAE,CAAA;AAEnD,uEAAuE;AACvE,eAAO,MAAM,0BAA0B,WAC7B,4BAA4B,KACnC,MAAM,IAAI,OAAO,CAAC,oCAAoC,CAC0C,CAAA"}
@@ -286,6 +286,18 @@ const _apiReferenceConfigurationSchema = apiClientConfigurationSchema.merge(z.ob
286
286
  onServerChange: z.function().args(z.string()).returns(z.void()).optional(),
287
287
  /** onDocumentSelect is fired when the config is selected */
288
288
  onDocumentSelect: z.function().returns(z.void().or(z.void().promise())).optional(),
289
+ /** Callback fired when the reference is fully loaded */
290
+ onLoaded: z.function().returns(z.void().or(z.void().promise())).optional(),
291
+ /**
292
+ * onShowMore is fired when the user clicks the "Show more" button on the references
293
+ * @param tagId - The ID of the tag that was clicked
294
+ */
295
+ onShowMore: z.function().args(z.string()).returns(z.void().or(z.void().promise())).optional(),
296
+ /**
297
+ * onSidebarClick is fired when the user clicks on a sidebar item
298
+ * @param href - The href of the sidebar item that was clicked
299
+ */
300
+ onSidebarClick: z.function().args(z.string()).returns(z.void().or(z.void().promise())).optional(),
289
301
  /**
290
302
  * Route using paths instead of hashes, your server MUST support this
291
303
  * @example '/standalone-api-reference/:custom(.*)?'
@@ -356,8 +368,6 @@ const _apiReferenceConfigurationSchema = apiClientConfigurationSchema.merge(z.ob
356
368
  }))
357
369
  .returns(z.string())
358
370
  .optional(),
359
- /** Callback fired when the reference is fully loaded */
360
- onLoaded: z.function().returns(z.void()).optional(),
361
371
  /**
362
372
  * To handle redirects, pass a function that will recieve:
363
373
  * - The current path with hash if pathRouting is enabled
package/package.json CHANGED
@@ -16,7 +16,7 @@
16
16
  "scalar",
17
17
  "references"
18
18
  ],
19
- "version": "0.1.5",
19
+ "version": "0.1.6",
20
20
  "engines": {
21
21
  "node": ">=18"
22
22
  },