zudoku 0.1.1-dev.2 → 0.1.1-dev.3

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 (110) hide show
  1. package/dist/app/{app.js → App.js} +2 -21
  2. package/dist/app/App.js.map +1 -0
  3. package/dist/app/DevPortal.d.ts +0 -1
  4. package/dist/app/authentication/openid.js +2 -2
  5. package/dist/app/authentication/openid.js.map +1 -1
  6. package/dist/app/components/Dialog.d.ts +19 -0
  7. package/dist/app/components/Dialog.js +23 -0
  8. package/dist/app/components/Dialog.js.map +1 -0
  9. package/dist/app/components/Header.d.ts +0 -1
  10. package/dist/app/components/Input.d.ts +5 -0
  11. package/dist/app/components/Input.js +9 -0
  12. package/dist/app/components/Input.js.map +1 -0
  13. package/dist/app/components/SyntaxHighlight.js +2 -0
  14. package/dist/app/components/SyntaxHighlight.js.map +1 -1
  15. package/dist/app/components/context/DevPortalProvider.d.ts +0 -1
  16. package/dist/app/components/navigation/SideNavigationWrapper.d.ts +1 -2
  17. package/dist/app/components/navigation/useNavigationCollapsibleState.d.ts +0 -1
  18. package/dist/app/main.js +1 -1
  19. package/dist/app/plugins/markdown/index.d.ts +0 -1
  20. package/dist/app/plugins/openapi/ColorizedParam.d.ts +5 -1
  21. package/dist/app/plugins/openapi/ColorizedParam.js +10 -5
  22. package/dist/app/plugins/openapi/ColorizedParam.js.map +1 -1
  23. package/dist/app/plugins/openapi/MakeRequest.js +18 -6
  24. package/dist/app/plugins/openapi/MakeRequest.js.map +1 -1
  25. package/dist/app/plugins/openapi/OperationList.d.ts +2 -45
  26. package/dist/app/plugins/openapi/OperationList.js +18 -17
  27. package/dist/app/plugins/openapi/OperationList.js.map +1 -1
  28. package/dist/app/plugins/openapi/OperationListItem.d.ts +2 -2
  29. package/dist/app/plugins/openapi/OperationListItem.js +2 -2
  30. package/dist/app/plugins/openapi/OperationListItem.js.map +1 -1
  31. package/dist/app/plugins/openapi/RequestBodySidecarBox.js +8 -8
  32. package/dist/app/plugins/openapi/RequestBodySidecarBox.js.map +1 -1
  33. package/dist/app/plugins/openapi/ResponsesSidecarBox.js +1 -1
  34. package/dist/app/plugins/openapi/ResponsesSidecarBox.js.map +1 -1
  35. package/dist/app/plugins/openapi/Sidecar.js +73 -18
  36. package/dist/app/plugins/openapi/Sidecar.js.map +1 -1
  37. package/dist/app/plugins/openapi/SidecarBox.d.ts +3 -5
  38. package/dist/app/plugins/openapi/SidecarBox.js +3 -5
  39. package/dist/app/plugins/openapi/SidecarBox.js.map +1 -1
  40. package/dist/app/plugins/openapi/graphql/fragment-masking.d.ts +19 -0
  41. package/dist/app/plugins/openapi/graphql/fragment-masking.js +16 -0
  42. package/dist/app/plugins/openapi/graphql/fragment-masking.js.map +1 -0
  43. package/dist/app/plugins/openapi/graphql/gql.d.ts +58 -0
  44. package/dist/app/plugins/openapi/graphql/gql.js +22 -0
  45. package/dist/app/plugins/openapi/graphql/gql.js.map +1 -0
  46. package/dist/app/plugins/openapi/graphql/graphql.d.ts +291 -0
  47. package/dist/app/plugins/openapi/graphql/graphql.js +539 -0
  48. package/dist/app/plugins/openapi/graphql/graphql.js.map +1 -0
  49. package/dist/app/plugins/openapi/graphql/index.d.ts +2 -836
  50. package/dist/app/plugins/openapi/graphql/index.js +2 -3
  51. package/dist/app/plugins/openapi/graphql/index.js.map +1 -1
  52. package/dist/app/plugins/openapi/index.d.ts +0 -1
  53. package/dist/app/plugins/openapi/index.js +2 -1
  54. package/dist/app/plugins/openapi/index.js.map +1 -1
  55. package/dist/app/plugins/openapi/playground/Playground.d.ts +8 -0
  56. package/dist/app/plugins/openapi/playground/Playground.js +98 -0
  57. package/dist/app/plugins/openapi/playground/Playground.js.map +1 -0
  58. package/dist/app/plugins/openapi/util/urql.d.ts +0 -1
  59. package/dist/app/ui/Button.d.ts +11 -0
  60. package/dist/app/ui/Button.js +34 -0
  61. package/dist/app/ui/Button.js.map +1 -0
  62. package/dist/app/ui/Card.js +1 -1
  63. package/dist/app/ui/Card.js.map +1 -1
  64. package/dist/app/ui/Tabs.d.ts +7 -0
  65. package/dist/app/ui/Tabs.js +13 -0
  66. package/dist/app/ui/Tabs.js.map +1 -0
  67. package/dist/app/util/MdxComponents.d.ts +2 -2
  68. package/dist/app/util/createVariantComponent.d.ts +15 -0
  69. package/dist/app/util/createVariantComponent.js +12 -0
  70. package/dist/app/util/createVariantComponent.js.map +1 -0
  71. package/dist/app/util/createWaitForNotify.d.ts +1 -1
  72. package/dist/app/util/slugify.d.ts +0 -1
  73. package/dist/vite/config.d.ts +1 -0
  74. package/dist/vite/config.js +45 -10
  75. package/dist/vite/config.js.map +1 -1
  76. package/dist/vite/config.test.d.ts +1 -0
  77. package/dist/vite/config.test.js +9 -0
  78. package/dist/vite/config.test.js.map +1 -0
  79. package/package.json +15 -5
  80. package/src/app/{app.tsx → App.tsx} +1 -23
  81. package/src/app/components/Dialog.tsx +119 -0
  82. package/src/app/components/Input.tsx +24 -0
  83. package/src/app/components/SyntaxHighlight.tsx +2 -0
  84. package/src/app/main.tsx +1 -1
  85. package/src/app/plugins/openapi/ColorizedParam.tsx +18 -9
  86. package/src/app/plugins/openapi/MakeRequest.tsx +19 -0
  87. package/src/app/plugins/openapi/OperationList.tsx +22 -23
  88. package/src/app/plugins/openapi/OperationListItem.tsx +3 -3
  89. package/src/app/plugins/openapi/RequestBodySidecarBox.tsx +31 -28
  90. package/src/app/plugins/openapi/ResponsesSidecarBox.tsx +1 -1
  91. package/src/app/plugins/openapi/Sidecar.tsx +81 -20
  92. package/src/app/plugins/openapi/SidecarBox.tsx +30 -29
  93. package/src/app/plugins/openapi/graphql/fragment-masking.ts +111 -0
  94. package/src/app/plugins/openapi/graphql/gql.ts +70 -0
  95. package/src/app/plugins/openapi/graphql/graphql.ts +804 -0
  96. package/src/app/plugins/openapi/graphql/index.ts +2 -13
  97. package/src/app/plugins/openapi/index.tsx +2 -1
  98. package/src/app/plugins/openapi/playground/Playground.tsx +309 -0
  99. package/src/app/plugins/openapi/queries.graphql +6 -0
  100. package/src/app/ui/Button.tsx +56 -0
  101. package/src/app/ui/Card.tsx +1 -1
  102. package/src/app/ui/Tabs.tsx +52 -0
  103. package/src/app/util/createVariantComponent.tsx +30 -0
  104. package/dist/app/app.js.map +0 -1
  105. package/dist/app/plugins/openapi/util/getCode.d.ts +0 -2
  106. package/dist/app/plugins/openapi/util/getCode.js +0 -54
  107. package/dist/app/plugins/openapi/util/getCode.js.map +0 -1
  108. package/src/app/plugins/openapi/graphql/env.d.ts +0 -48
  109. package/src/app/plugins/openapi/util/getCode.tsx +0 -69
  110. /package/dist/app/{app.d.ts → App.d.ts} +0 -0
@@ -1,5 +1,5 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { Fragment, useState } from "react";
2
+ import { Fragment, useMemo, useState } from "react";
3
3
  import { SyntaxHighlight } from "../../components/SyntaxHighlight.js";
4
4
  import { cn } from "../../util/cn.js";
5
5
  import { ColorizedParam } from "./ColorizedParam.js";
@@ -8,8 +8,51 @@ import { MethodTextColorMap } from "./MethodBadge.js";
8
8
  import { RequestBodySidecarBox } from "./RequestBodySidecarBox.js";
9
9
  import { ResponsesSidecarBox } from "./ResponsesSidecarBox.js";
10
10
  import { Select } from "./Select.js";
11
- import { SidecarBox } from "./SidecarBox.js";
12
- import { getCode } from "./util/getCode.js";
11
+ import * as SidecarBox from "./SidecarBox.js";
12
+ import { HTTPSnippet } from "@zudoku/httpsnippet";
13
+ import { generateSchemaExample } from "./util/generateSchemaExample.js";
14
+ const getConverted = (snippet, option) => {
15
+ let converted;
16
+ switch (option) {
17
+ case "shell":
18
+ converted = snippet.convert("shell", "curl");
19
+ break;
20
+ case "js":
21
+ converted = snippet.convert("javascript", "fetch");
22
+ break;
23
+ case "python":
24
+ converted = snippet.convert("python", "requests");
25
+ break;
26
+ case "java":
27
+ converted = snippet.convert("java", "okhttp");
28
+ break;
29
+ case "go":
30
+ converted = snippet.convert("go", "native");
31
+ break;
32
+ case "csharp":
33
+ converted = snippet.convert("csharp", "httpclient");
34
+ break;
35
+ case "kotlin":
36
+ converted = snippet.convert("kotlin", "okhttp");
37
+ break;
38
+ case "objc":
39
+ converted = snippet.convert("objc", "nsurlsession");
40
+ break;
41
+ case "php":
42
+ converted = snippet.convert("php", "http2");
43
+ break;
44
+ case "ruby":
45
+ converted = snippet.convert("ruby");
46
+ break;
47
+ case "swift":
48
+ converted = snippet.convert("swift");
49
+ break;
50
+ default:
51
+ converted = snippet.convert("shell");
52
+ break;
53
+ }
54
+ return converted ? converted[0] : "";
55
+ };
13
56
  export const Sidecar = ({ operation, }) => {
14
57
  const methodTextColor = MethodTextColorMap[operation.method];
15
58
  const [option, setOption] = useState("curl");
@@ -17,23 +60,35 @@ export const Sidecar = ({ operation, }) => {
17
60
  const path = operation.path.split("/").map((part) => (_jsxs(Fragment, { children: [part.startsWith("{") && part.endsWith("}") ? (_jsx(ColorizedParam, { name: part.slice(1, -1), backgroundOpacity: "0",
18
61
  // same as in `ParameterListItem`
19
62
  slug: operation.slug + "-" + part.slice(1, -1).toLocaleLowerCase(), children: part })) : (part), "/", _jsx("wbr", {})] }, part)));
20
- const language = {
21
- js: "javascript",
22
- go: "go",
23
- rust: "rust",
24
- curl: "bash",
25
- wget: "bash",
26
- ruby: "ruby",
27
- php: "php",
28
- }[option] ?? "bash";
63
+ const code = useMemo(() => {
64
+ const example = requestBodyContent?.[0]?.schema
65
+ ? generateSchemaExample(requestBodyContent[0].schema)
66
+ : undefined;
67
+ const snippet = new HTTPSnippet({
68
+ method: operation.method.toLocaleUpperCase(),
69
+ url: operation.path.replaceAll("{", ":").replaceAll("}", ""),
70
+ headers: [{ name: "Authorization", value: "Bearer <token>" }],
71
+ postData: example
72
+ ? {
73
+ text: JSON.stringify(example, null, 2),
74
+ mimeType: "application/json",
75
+ }
76
+ : {},
77
+ });
78
+ return getConverted(snippet, option) ?? "";
79
+ }, [option, operation.method, operation.path, requestBodyContent]);
29
80
  return (_jsxs("aside", { className: "flex flex-col overflow-hidden sticky top-[--scroll-padding] gap-4", children: [_jsxs(SidecarBox.Root, { children: [_jsx(MakeRequest, { operation: operation }), _jsxs(SidecarBox.Head, { className: "flex justify-between items-center flex-nowrap p-2 gap-2 text-xs", children: [_jsxs("span", { className: "font-mono break-words", children: [_jsx("span", { className: cn("font-semibold", methodTextColor), children: operation.method.toLocaleUpperCase() }), "\u00A0", path] }), _jsx(Select, { className: "self-start", onChange: (e) => setOption(e.target.value), options: [
30
- { value: "curl", label: "cURL" },
31
- { value: "wget", label: "wget" },
81
+ { value: "shell", label: "cURL" },
32
82
  { value: "js", label: "Javascript" },
33
- { value: "ruby", label: "Ruby" },
34
- { value: "php", label: "PHP" },
83
+ { value: "python", label: "Python" },
84
+ { value: "java", label: "Java" },
35
85
  { value: "go", label: "Go" },
36
- { value: "rust", label: "Rust" },
37
- ] })] }), _jsx(SidecarBox.Body, { children: _jsx(SyntaxHighlight, { language: language, copyable: false, noBackground: true, className: "text-xs", code: getCode(operation, option.toLowerCase()) }) })] }), requestBodyContent && (_jsx(RequestBodySidecarBox, { content: requestBodyContent })), operation.responses.length > 0 && (_jsx(ResponsesSidecarBox, { responses: operation.responses }))] }));
86
+ { value: "csharp", label: "C#" },
87
+ { value: "kotlin", label: "Kotlin" },
88
+ { value: "objc", label: "Objective C" },
89
+ { value: "php", label: "PHP" },
90
+ { value: "ruby", label: "Ruby" },
91
+ { value: "swift", label: "Swift" },
92
+ ] })] }), _jsx(SidecarBox.Body, { children: _jsx(SyntaxHighlight, { language: option, copyable: false, noBackground: true, className: "text-xs", code: code }) })] }), requestBodyContent && (_jsx(RequestBodySidecarBox, { content: requestBodyContent })), operation.responses.length > 0 && (_jsx(ResponsesSidecarBox, { responses: operation.responses }))] }));
38
93
  };
39
94
  //# sourceMappingURL=Sidecar.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Sidecar.js","sourceRoot":"","sources":["../../../../src/app/plugins/openapi/Sidecar.tsx"],"names":[],"mappings":";AAAA,OAA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,CAAC,CAAC"}
@@ -2,9 +2,7 @@ import type { PropsWithChildren } from "react";
2
2
  type BaseComponentProps<T = unknown> = PropsWithChildren<T & {
3
3
  className?: string;
4
4
  }>;
5
- export declare const SidecarBox: {
6
- Root: ({ children, className }: BaseComponentProps) => import("react/jsx-runtime").JSX.Element;
7
- Head: ({ children, className }: BaseComponentProps) => import("react/jsx-runtime").JSX.Element;
8
- Body: ({ children, className }: BaseComponentProps) => import("react/jsx-runtime").JSX.Element;
9
- };
5
+ export declare const Root: ({ children, className }: BaseComponentProps) => import("react/jsx-runtime").JSX.Element;
6
+ export declare const Head: ({ children, className }: BaseComponentProps) => import("react/jsx-runtime").JSX.Element;
7
+ export declare const Body: ({ children, className }: BaseComponentProps) => import("react/jsx-runtime").JSX.Element;
10
8
  export {};
@@ -1,8 +1,6 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { cn } from "../../util/cn.js";
3
- export const SidecarBox = {
4
- Root: ({ children, className }) => (_jsx("div", { className: cn("rounded-lg overflow-hidden border border-border dark:border-transparent", className), children: children })),
5
- Head: ({ children, className }) => (_jsx("div", { className: cn("border-b border-b-border dark:border-b-zinc-600 bg-zinc-100 dark:bg-zinc-700 p-2", className), children: children })),
6
- Body: ({ children, className }) => (_jsx("div", { className: cn("bg-zinc-50 dark:bg-zinc-800 overflow-auto p-2", className), children: children })),
7
- };
3
+ export const Root = ({ children, className }) => (_jsx("div", { className: cn("rounded-lg overflow-hidden border border-border dark:border-transparent", className), children: children }));
4
+ export const Head = ({ children, className }) => (_jsx("div", { className: cn("border-b border-b-border dark:border-b-zinc-600 bg-zinc-100 dark:bg-zinc-700 p-2", className), children: children }));
5
+ export const Body = ({ children, className }) => (_jsx("div", { className: cn("bg-zinc-50 dark:bg-zinc-800 overflow-auto p-2", className), children: children }));
8
6
  //# sourceMappingURL=SidecarBox.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"SidecarBox.js","sourceRoot":"","sources":["../../../../src/app/plugins/openapi/SidecarBox.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,EAAE,EAAE,MAAM,kBAAkB,CAAC;AAKtC,MAAM,CAAC,MAAM,UAAU,GAAG;IACxB,IAAI,EAAE,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAsB,EAAE,EAAE,CAAC,CACrD,cACE,SAAS,EAAE,EAAE,CACX,yEAAyE,EACzE,SAAS,CACV,YAEA,QAAQ,GACL,CACP;IACD,IAAI,EAAE,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAsB,EAAE,EAAE,CAAC,CACrD,cACE,SAAS,EAAE,EAAE,CACX,kFAAkF,EAClF,SAAS,CACV,YAEA,QAAQ,GACL,CACP;IACD,IAAI,EAAE,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAsB,EAAE,EAAE,CAAC,CACrD,cACE,SAAS,EAAE,EAAE,CAAC,+CAA+C,EAAE,SAAS,CAAC,YAExE,QAAQ,GACL,CACP;CACF,CAAC"}
1
+ {"version":3,"file":"SidecarBox.js","sourceRoot":"","sources":["../../../../src/app/plugins/openapi/SidecarBox.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,EAAE,EAAE,MAAM,kBAAkB,CAAC;AAMtC,MAAM,CAAC,MAAM,IAAI,GAAG,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAsB,EAAE,EAAE,CAAC,CACnE,cACE,SAAS,EAAE,EAAE,CACX,yEAAyE,EACzE,SAAS,CACV,YAEA,QAAQ,GACL,CACP,CAAC;AAEF,MAAM,CAAC,MAAM,IAAI,GAAG,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAsB,EAAE,EAAE,CAAC,CACnE,cACE,SAAS,EAAE,EAAE,CACX,kFAAkF,EAClF,SAAS,CACV,YAEA,QAAQ,GACL,CACP,CAAC;AAEF,MAAM,CAAC,MAAM,IAAI,GAAG,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAsB,EAAE,EAAE,CAAC,CACnE,cACE,SAAS,EAAE,EAAE,CAAC,+CAA+C,EAAE,SAAS,CAAC,YAExE,QAAQ,GACL,CACP,CAAC"}
@@ -0,0 +1,19 @@
1
+ import type { ResultOf, DocumentTypeDecoration, TypedDocumentNode } from "@graphql-typed-document-node/core";
2
+ import type { Incremental } from "./graphql.js";
3
+ export type FragmentType<TDocumentType extends DocumentTypeDecoration<any, any>> = TDocumentType extends DocumentTypeDecoration<infer TType, any> ? [TType] extends [{
4
+ " $fragmentName"?: infer TKey;
5
+ }] ? TKey extends string ? {
6
+ " $fragmentRefs"?: {
7
+ [key in TKey]: TType;
8
+ };
9
+ } : never : never : never;
10
+ export declare function useFragment<TType>(_documentNode: DocumentTypeDecoration<TType, any>, fragmentType: FragmentType<DocumentTypeDecoration<TType, any>>): TType;
11
+ export declare function useFragment<TType>(_documentNode: DocumentTypeDecoration<TType, any>, fragmentType: FragmentType<DocumentTypeDecoration<TType, any>> | undefined): TType | undefined;
12
+ export declare function useFragment<TType>(_documentNode: DocumentTypeDecoration<TType, any>, fragmentType: FragmentType<DocumentTypeDecoration<TType, any>> | null): TType | null;
13
+ export declare function useFragment<TType>(_documentNode: DocumentTypeDecoration<TType, any>, fragmentType: FragmentType<DocumentTypeDecoration<TType, any>> | null | undefined): TType | null | undefined;
14
+ export declare function useFragment<TType>(_documentNode: DocumentTypeDecoration<TType, any>, fragmentType: Array<FragmentType<DocumentTypeDecoration<TType, any>>>): Array<TType>;
15
+ export declare function useFragment<TType>(_documentNode: DocumentTypeDecoration<TType, any>, fragmentType: Array<FragmentType<DocumentTypeDecoration<TType, any>>> | null | undefined): Array<TType> | null | undefined;
16
+ export declare function useFragment<TType>(_documentNode: DocumentTypeDecoration<TType, any>, fragmentType: ReadonlyArray<FragmentType<DocumentTypeDecoration<TType, any>>>): ReadonlyArray<TType>;
17
+ export declare function useFragment<TType>(_documentNode: DocumentTypeDecoration<TType, any>, fragmentType: ReadonlyArray<FragmentType<DocumentTypeDecoration<TType, any>>> | null | undefined): ReadonlyArray<TType> | null | undefined;
18
+ export declare function makeFragmentData<F extends DocumentTypeDecoration<any, any>, FT extends ResultOf<F>>(data: FT, _fragment: F): FragmentType<F>;
19
+ export declare function isFragmentReady<TQuery, TFrag>(queryNode: DocumentTypeDecoration<TQuery, any>, fragmentNode: TypedDocumentNode<TFrag>, data: FragmentType<TypedDocumentNode<Incremental<TFrag>, any>> | null | undefined): data is FragmentType<typeof fragmentNode>;
@@ -0,0 +1,16 @@
1
+ export function useFragment(_documentNode, fragmentType) {
2
+ return fragmentType;
3
+ }
4
+ export function makeFragmentData(data, _fragment) {
5
+ return data;
6
+ }
7
+ export function isFragmentReady(queryNode, fragmentNode, data) {
8
+ const deferredFields = queryNode.__meta__?.deferredFields;
9
+ if (!deferredFields)
10
+ return true;
11
+ const fragDef = fragmentNode.definitions[0];
12
+ const fragName = fragDef?.name?.value;
13
+ const fields = (fragName && deferredFields[fragName]) || [];
14
+ return fields.length > 0 && fields.every((field) => data && field in data);
15
+ }
16
+ //# sourceMappingURL=fragment-masking.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fragment-masking.js","sourceRoot":"","sources":["../../../../../src/app/plugins/openapi/graphql/fragment-masking.ts"],"names":[],"mappings":"AAqEA,MAAM,UAAU,WAAW,CACzB,aAAiD,EACjD,YAKa;IAEb,OAAO,YAAmB,CAAC;AAC7B,CAAC;AAED,MAAM,UAAU,gBAAgB,CAG9B,IAAQ,EAAE,SAAY;IACtB,OAAO,IAAuB,CAAC;AACjC,CAAC;AACD,MAAM,UAAU,eAAe,CAC7B,SAA8C,EAC9C,YAAsC,EACtC,IAGa;IAEb,MAAM,cAAc,GAClB,SAGD,CAAC,QAAQ,EAAE,cAAc,CAAC;IAE3B,IAAI,CAAC,cAAc;QAAE,OAAO,IAAI,CAAC;IAEjC,MAAM,OAAO,GAAG,YAAY,CAAC,WAAW,CAAC,CAAC,CAE7B,CAAC;IACd,MAAM,QAAQ,GAAG,OAAO,EAAE,IAAI,EAAE,KAAK,CAAC;IAEtC,MAAM,MAAM,GAAG,CAAC,QAAQ,IAAI,cAAc,CAAC,QAAQ,CAAC,CAAC,IAAI,EAAE,CAAC;IAC5D,OAAO,MAAM,CAAC,MAAM,GAAG,CAAC,IAAI,MAAM,CAAC,KAAK,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,IAAI,IAAI,KAAK,IAAI,IAAI,CAAC,CAAC;AAC7E,CAAC"}
@@ -0,0 +1,58 @@
1
+ import * as types from "./graphql.js";
2
+ import type { TypedDocumentNode as DocumentNode } from "@graphql-typed-document-node/core";
3
+ /**
4
+ * Map of all GraphQL operations in the project.
5
+ *
6
+ * This map has several performance disadvantages:
7
+ * 1. It is not tree-shakeable, so it will include all operations in the project.
8
+ * 2. It is not minifiable, so the string of a GraphQL query will be multiple times inside the bundle.
9
+ * 3. It does not support dead code elimination, so it will add unused operations.
10
+ *
11
+ * Therefore it is highly recommended to use the babel or swc plugin for production.
12
+ */
13
+ declare const documents: {
14
+ "\n query getServerQuery($input: JSON!, $type: SchemaType!) {\n schema(input: $input, type: $type) {\n url\n }\n }\n": DocumentNode<types.GetServerQueryQuery, types.Exact<{
15
+ input: types.Scalars["JSON"]["input"];
16
+ type: types.SchemaType;
17
+ }>>;
18
+ "\n fragment OperationsFragment on OperationItem {\n slug\n summary\n method\n description\n operationId\n contentTypes\n path\n parameters {\n name\n in\n description\n required\n schema\n style\n }\n requestBody {\n content {\n mediaType\n encoding {\n name\n }\n schema\n }\n description\n required\n }\n responses {\n statusCode\n links\n description\n content {\n mediaType\n encoding {\n name\n }\n schema\n }\n }\n }\n": DocumentNode<types.OperationsFragmentFragment, unknown>;
19
+ "\n query AllOperations($input: JSON!, $type: SchemaType!) {\n schema(input: $input, type: $type) {\n description\n title\n url\n version\n tags {\n name\n description\n operations {\n slug\n ...OperationsFragment\n }\n }\n }\n }\n": DocumentNode<types.AllOperationsQuery, types.Exact<{
20
+ input: types.Scalars["JSON"]["input"];
21
+ type: types.SchemaType;
22
+ }>>;
23
+ "\n query GetCategories($input: JSON!, $type: SchemaType!) {\n schema(input: $input, type: $type) {\n tags {\n __typename\n name\n operations {\n __typename\n slug\n method\n summary\n operationId\n path\n }\n }\n }\n }\n": DocumentNode<types.GetCategoriesQuery, types.Exact<{
24
+ input: types.Scalars["JSON"]["input"];
25
+ type: types.SchemaType;
26
+ }>>;
27
+ };
28
+ /**
29
+ * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
30
+ *
31
+ *
32
+ * @example
33
+ * ```ts
34
+ * const query = graphql(`query GetUser($id: ID!) { user(id: $id) { name } }`);
35
+ * ```
36
+ *
37
+ * The query argument is unknown!
38
+ * Please regenerate the types.
39
+ */
40
+ export declare function graphql(source: string): unknown;
41
+ /**
42
+ * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
43
+ */
44
+ export declare function graphql(source: "\n query getServerQuery($input: JSON!, $type: SchemaType!) {\n schema(input: $input, type: $type) {\n url\n }\n }\n"): (typeof documents)["\n query getServerQuery($input: JSON!, $type: SchemaType!) {\n schema(input: $input, type: $type) {\n url\n }\n }\n"];
45
+ /**
46
+ * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
47
+ */
48
+ export declare function graphql(source: "\n fragment OperationsFragment on OperationItem {\n slug\n summary\n method\n description\n operationId\n contentTypes\n path\n parameters {\n name\n in\n description\n required\n schema\n style\n }\n requestBody {\n content {\n mediaType\n encoding {\n name\n }\n schema\n }\n description\n required\n }\n responses {\n statusCode\n links\n description\n content {\n mediaType\n encoding {\n name\n }\n schema\n }\n }\n }\n"): (typeof documents)["\n fragment OperationsFragment on OperationItem {\n slug\n summary\n method\n description\n operationId\n contentTypes\n path\n parameters {\n name\n in\n description\n required\n schema\n style\n }\n requestBody {\n content {\n mediaType\n encoding {\n name\n }\n schema\n }\n description\n required\n }\n responses {\n statusCode\n links\n description\n content {\n mediaType\n encoding {\n name\n }\n schema\n }\n }\n }\n"];
49
+ /**
50
+ * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
51
+ */
52
+ export declare function graphql(source: "\n query AllOperations($input: JSON!, $type: SchemaType!) {\n schema(input: $input, type: $type) {\n description\n title\n url\n version\n tags {\n name\n description\n operations {\n slug\n ...OperationsFragment\n }\n }\n }\n }\n"): (typeof documents)["\n query AllOperations($input: JSON!, $type: SchemaType!) {\n schema(input: $input, type: $type) {\n description\n title\n url\n version\n tags {\n name\n description\n operations {\n slug\n ...OperationsFragment\n }\n }\n }\n }\n"];
53
+ /**
54
+ * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
55
+ */
56
+ export declare function graphql(source: "\n query GetCategories($input: JSON!, $type: SchemaType!) {\n schema(input: $input, type: $type) {\n tags {\n __typename\n name\n operations {\n __typename\n slug\n method\n summary\n operationId\n path\n }\n }\n }\n }\n"): (typeof documents)["\n query GetCategories($input: JSON!, $type: SchemaType!) {\n schema(input: $input, type: $type) {\n tags {\n __typename\n name\n operations {\n __typename\n slug\n method\n summary\n operationId\n path\n }\n }\n }\n }\n"];
57
+ export type DocumentType<TDocumentNode extends DocumentNode<any, any>> = TDocumentNode extends DocumentNode<infer TType, any> ? TType : never;
58
+ export {};
@@ -0,0 +1,22 @@
1
+ /* eslint-disable */
2
+ import * as types from "./graphql.js";
3
+ /**
4
+ * Map of all GraphQL operations in the project.
5
+ *
6
+ * This map has several performance disadvantages:
7
+ * 1. It is not tree-shakeable, so it will include all operations in the project.
8
+ * 2. It is not minifiable, so the string of a GraphQL query will be multiple times inside the bundle.
9
+ * 3. It does not support dead code elimination, so it will add unused operations.
10
+ *
11
+ * Therefore it is highly recommended to use the babel or swc plugin for production.
12
+ */
13
+ const documents = {
14
+ "\n query getServerQuery($input: JSON!, $type: SchemaType!) {\n schema(input: $input, type: $type) {\n url\n }\n }\n": types.GetServerQueryDocument,
15
+ "\n fragment OperationsFragment on OperationItem {\n slug\n summary\n method\n description\n operationId\n contentTypes\n path\n parameters {\n name\n in\n description\n required\n schema\n style\n }\n requestBody {\n content {\n mediaType\n encoding {\n name\n }\n schema\n }\n description\n required\n }\n responses {\n statusCode\n links\n description\n content {\n mediaType\n encoding {\n name\n }\n schema\n }\n }\n }\n": types.OperationsFragmentFragmentDoc,
16
+ "\n query AllOperations($input: JSON!, $type: SchemaType!) {\n schema(input: $input, type: $type) {\n description\n title\n url\n version\n tags {\n name\n description\n operations {\n slug\n ...OperationsFragment\n }\n }\n }\n }\n": types.AllOperationsDocument,
17
+ "\n query GetCategories($input: JSON!, $type: SchemaType!) {\n schema(input: $input, type: $type) {\n tags {\n __typename\n name\n operations {\n __typename\n slug\n method\n summary\n operationId\n path\n }\n }\n }\n }\n": types.GetCategoriesDocument,
18
+ };
19
+ export function graphql(source) {
20
+ return documents[source] ?? {};
21
+ }
22
+ //# sourceMappingURL=gql.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"gql.js","sourceRoot":"","sources":["../../../../../src/app/plugins/openapi/graphql/gql.ts"],"names":[],"mappings":"AAAA,oBAAoB;AACpB,OAAO,KAAK,KAAK,MAAM,cAAc,CAAC;AAGtC;;;;;;;;;GASG;AACH,MAAM,SAAS,GAAG;IAChB,kIAAkI,EAChI,KAAK,CAAC,sBAAsB;IAC9B,wmBAAwmB,EACtmB,KAAK,CAAC,6BAA6B;IACrC,4TAA4T,EAC1T,KAAK,CAAC,qBAAqB;IAC7B,kUAAkU,EAChU,KAAK,CAAC,qBAAqB;CAC9B,CAAC;AAyCF,MAAM,UAAU,OAAO,CAAC,MAAc;IACpC,OAAQ,SAAiB,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC;AAC1C,CAAC"}
@@ -0,0 +1,291 @@
1
+ import type { TypedDocumentNode as DocumentNode } from "@graphql-typed-document-node/core";
2
+ export type Maybe<T> = T | null;
3
+ export type InputMaybe<T> = Maybe<T>;
4
+ export type Exact<T extends {
5
+ [key: string]: unknown;
6
+ }> = {
7
+ [K in keyof T]: T[K];
8
+ };
9
+ export type MakeOptional<T, K extends keyof T> = Omit<T, K> & {
10
+ [SubKey in K]?: Maybe<T[SubKey]>;
11
+ };
12
+ export type MakeMaybe<T, K extends keyof T> = Omit<T, K> & {
13
+ [SubKey in K]: Maybe<T[SubKey]>;
14
+ };
15
+ export type MakeEmpty<T extends {
16
+ [key: string]: unknown;
17
+ }, K extends keyof T> = {
18
+ [_ in K]?: never;
19
+ };
20
+ export type Incremental<T> = T | {
21
+ [P in keyof T]?: P extends " $fragmentName" | "__typename" ? T[P] : never;
22
+ };
23
+ /** All built-in and custom scalars, mapped to their actual values */
24
+ export type Scalars = {
25
+ ID: {
26
+ input: string;
27
+ output: string;
28
+ };
29
+ String: {
30
+ input: string;
31
+ output: string;
32
+ };
33
+ Boolean: {
34
+ input: boolean;
35
+ output: boolean;
36
+ };
37
+ Int: {
38
+ input: number;
39
+ output: number;
40
+ };
41
+ Float: {
42
+ input: number;
43
+ output: number;
44
+ };
45
+ /** The `JSON` scalar type represents JSON values as specified by [ECMA-404](http://www.ecma-international.org/publications/files/ECMA-ST/ECMA-404.pdf). */
46
+ JSON: {
47
+ input: any;
48
+ output: any;
49
+ };
50
+ /** The `JSONObject` scalar type represents JSON objects as specified by [ECMA-404](http://www.ecma-international.org/publications/files/ECMA-ST/ECMA-404.pdf). */
51
+ JSONObject: {
52
+ input: any;
53
+ output: any;
54
+ };
55
+ };
56
+ export type EncodingItem = {
57
+ __typename?: "EncodingItem";
58
+ allowReserved?: Maybe<Scalars["Boolean"]["output"]>;
59
+ contentType?: Maybe<Scalars["String"]["output"]>;
60
+ explode?: Maybe<Scalars["Boolean"]["output"]>;
61
+ headers?: Maybe<Scalars["JSONObject"]["output"]>;
62
+ name: Scalars["String"]["output"];
63
+ style?: Maybe<Scalars["String"]["output"]>;
64
+ };
65
+ export type ExampleItem = {
66
+ __typename?: "ExampleItem";
67
+ description?: Maybe<Scalars["String"]["output"]>;
68
+ externalValue?: Maybe<Scalars["String"]["output"]>;
69
+ name: Scalars["String"]["output"];
70
+ summary?: Maybe<Scalars["String"]["output"]>;
71
+ value?: Maybe<Scalars["String"]["output"]>;
72
+ };
73
+ export type MediaTypeObject = {
74
+ __typename?: "MediaTypeObject";
75
+ encoding?: Maybe<Array<EncodingItem>>;
76
+ examples?: Maybe<Array<ExampleItem>>;
77
+ mediaType: Scalars["String"]["output"];
78
+ schema: Scalars["JSON"]["output"];
79
+ };
80
+ export type OperationItem = {
81
+ __typename?: "OperationItem";
82
+ contentTypes: Array<Scalars["String"]["output"]>;
83
+ deprecated?: Maybe<Scalars["Boolean"]["output"]>;
84
+ description?: Maybe<Scalars["String"]["output"]>;
85
+ method: Scalars["String"]["output"];
86
+ operationId?: Maybe<Scalars["String"]["output"]>;
87
+ parameters?: Maybe<Array<ParameterItem>>;
88
+ path: Scalars["String"]["output"];
89
+ requestBody?: Maybe<RequestBodyObject>;
90
+ responses: Array<ResponseItem>;
91
+ slug: Scalars["String"]["output"];
92
+ summary?: Maybe<Scalars["String"]["output"]>;
93
+ tags?: Maybe<Array<TagItem>>;
94
+ };
95
+ export declare enum ParameterIn {
96
+ Cookie = "cookie",
97
+ Header = "header",
98
+ Path = "path",
99
+ Query = "query"
100
+ }
101
+ export type ParameterItem = {
102
+ __typename?: "ParameterItem";
103
+ allowEmptyValue?: Maybe<Scalars["Boolean"]["output"]>;
104
+ allowReserved?: Maybe<Scalars["Boolean"]["output"]>;
105
+ deprecated?: Maybe<Scalars["Boolean"]["output"]>;
106
+ description?: Maybe<Scalars["String"]["output"]>;
107
+ examples?: Maybe<Array<ExampleItem>>;
108
+ explode?: Maybe<Scalars["Boolean"]["output"]>;
109
+ in: ParameterIn;
110
+ name: Scalars["String"]["output"];
111
+ required?: Maybe<Scalars["Boolean"]["output"]>;
112
+ schema?: Maybe<Scalars["JSON"]["output"]>;
113
+ style?: Maybe<Scalars["String"]["output"]>;
114
+ };
115
+ export type PathItem = {
116
+ __typename?: "PathItem";
117
+ methods: Array<Scalars["String"]["output"]>;
118
+ path: Scalars["String"]["output"];
119
+ };
120
+ export type Query = {
121
+ __typename?: "Query";
122
+ schema: Schema;
123
+ };
124
+ export type QuerySchemaArgs = {
125
+ input: Scalars["JSON"]["input"];
126
+ type: SchemaType;
127
+ };
128
+ export type RequestBodyObject = {
129
+ __typename?: "RequestBodyObject";
130
+ content?: Maybe<Array<MediaTypeObject>>;
131
+ description?: Maybe<Scalars["String"]["output"]>;
132
+ required?: Maybe<Scalars["Boolean"]["output"]>;
133
+ };
134
+ export type ResponseItem = {
135
+ __typename?: "ResponseItem";
136
+ content?: Maybe<Array<MediaTypeObject>>;
137
+ description: Scalars["String"]["output"];
138
+ headers?: Maybe<Scalars["JSON"]["output"]>;
139
+ links?: Maybe<Scalars["JSON"]["output"]>;
140
+ statusCode: Scalars["String"]["output"];
141
+ };
142
+ export type Schema = {
143
+ __typename?: "Schema";
144
+ description?: Maybe<Scalars["String"]["output"]>;
145
+ openapi: Scalars["String"]["output"];
146
+ operations: Array<OperationItem>;
147
+ paths: Array<PathItem>;
148
+ tags: Array<SchemaTag>;
149
+ title: Scalars["String"]["output"];
150
+ url: Scalars["String"]["output"];
151
+ version: Scalars["String"]["output"];
152
+ };
153
+ export type SchemaOperationsArgs = {
154
+ method?: InputMaybe<Scalars["String"]["input"]>;
155
+ operationId?: InputMaybe<Scalars["String"]["input"]>;
156
+ path?: InputMaybe<Scalars["String"]["input"]>;
157
+ tag?: InputMaybe<Scalars["String"]["input"]>;
158
+ };
159
+ export type SchemaTagsArgs = {
160
+ name?: InputMaybe<Scalars["String"]["input"]>;
161
+ };
162
+ export type SchemaTag = {
163
+ __typename?: "SchemaTag";
164
+ description?: Maybe<Scalars["String"]["output"]>;
165
+ name?: Maybe<Scalars["String"]["output"]>;
166
+ operations: Array<OperationItem>;
167
+ };
168
+ export declare enum SchemaType {
169
+ Json = "json",
170
+ Url = "url",
171
+ Yaml = "yaml"
172
+ }
173
+ export type TagItem = {
174
+ __typename?: "TagItem";
175
+ description?: Maybe<Scalars["String"]["output"]>;
176
+ name: Scalars["String"]["output"];
177
+ };
178
+ export type GetServerQueryQueryVariables = Exact<{
179
+ input: Scalars["JSON"]["input"];
180
+ type: SchemaType;
181
+ }>;
182
+ export type GetServerQueryQuery = {
183
+ __typename?: "Query";
184
+ schema: {
185
+ __typename?: "Schema";
186
+ url: string;
187
+ };
188
+ };
189
+ export type OperationsFragmentFragment = {
190
+ __typename?: "OperationItem";
191
+ slug: string;
192
+ summary?: string | null;
193
+ method: string;
194
+ description?: string | null;
195
+ operationId?: string | null;
196
+ contentTypes: Array<string>;
197
+ path: string;
198
+ parameters?: Array<{
199
+ __typename?: "ParameterItem";
200
+ name: string;
201
+ in: ParameterIn;
202
+ description?: string | null;
203
+ required?: boolean | null;
204
+ schema?: any | null;
205
+ style?: string | null;
206
+ }> | null;
207
+ requestBody?: {
208
+ __typename?: "RequestBodyObject";
209
+ description?: string | null;
210
+ required?: boolean | null;
211
+ content?: Array<{
212
+ __typename?: "MediaTypeObject";
213
+ mediaType: string;
214
+ schema: any;
215
+ encoding?: Array<{
216
+ __typename?: "EncodingItem";
217
+ name: string;
218
+ }> | null;
219
+ }> | null;
220
+ } | null;
221
+ responses: Array<{
222
+ __typename?: "ResponseItem";
223
+ statusCode: string;
224
+ links?: any | null;
225
+ description: string;
226
+ content?: Array<{
227
+ __typename?: "MediaTypeObject";
228
+ mediaType: string;
229
+ schema: any;
230
+ encoding?: Array<{
231
+ __typename?: "EncodingItem";
232
+ name: string;
233
+ }> | null;
234
+ }> | null;
235
+ }>;
236
+ } & {
237
+ " $fragmentName"?: "OperationsFragmentFragment";
238
+ };
239
+ export type AllOperationsQueryVariables = Exact<{
240
+ input: Scalars["JSON"]["input"];
241
+ type: SchemaType;
242
+ }>;
243
+ export type AllOperationsQuery = {
244
+ __typename?: "Query";
245
+ schema: {
246
+ __typename?: "Schema";
247
+ description?: string | null;
248
+ title: string;
249
+ url: string;
250
+ version: string;
251
+ tags: Array<{
252
+ __typename?: "SchemaTag";
253
+ name?: string | null;
254
+ description?: string | null;
255
+ operations: Array<{
256
+ __typename?: "OperationItem";
257
+ slug: string;
258
+ } & {
259
+ " $fragmentRefs"?: {
260
+ OperationsFragmentFragment: OperationsFragmentFragment;
261
+ };
262
+ }>;
263
+ }>;
264
+ };
265
+ };
266
+ export type GetCategoriesQueryVariables = Exact<{
267
+ input: Scalars["JSON"]["input"];
268
+ type: SchemaType;
269
+ }>;
270
+ export type GetCategoriesQuery = {
271
+ __typename?: "Query";
272
+ schema: {
273
+ __typename?: "Schema";
274
+ tags: Array<{
275
+ __typename: "SchemaTag";
276
+ name?: string | null;
277
+ operations: Array<{
278
+ __typename: "OperationItem";
279
+ slug: string;
280
+ method: string;
281
+ summary?: string | null;
282
+ operationId?: string | null;
283
+ path: string;
284
+ }>;
285
+ }>;
286
+ };
287
+ };
288
+ export declare const OperationsFragmentFragmentDoc: DocumentNode<OperationsFragmentFragment, unknown>;
289
+ export declare const GetServerQueryDocument: DocumentNode<GetServerQueryQuery, GetServerQueryQueryVariables>;
290
+ export declare const AllOperationsDocument: DocumentNode<AllOperationsQuery, AllOperationsQueryVariables>;
291
+ export declare const GetCategoriesDocument: DocumentNode<GetCategoriesQuery, GetCategoriesQueryVariables>;