@@ -158,61 +149,61 @@ export function ApiEndpoint(props: { metadata: ApiEndpointMeta }) {
);
}
-function ParameterSection(props: {
- title: string;
- parameters: APIParameter[];
-}) {
- return (
-
-
- {props.title}
-
-
- {props.parameters
- .sort((a, b) => {
- if (a.required === b.required) {
- return 0;
- }
- return a.required ? -1 : 1;
- })
- .map((param) => (
-
- ))}
-
-
- );
-}
+// function ParameterSection(props: {
+// title: string;
+// parameters: APIParameter[];
+// }) {
+// return (
+//
+//
+// {props.title}
+//
+//
+// {props.parameters
+// .sort((a, b) => {
+// if (a.required === b.required) {
+// return 0;
+// }
+// return a.required ? -1 : 1;
+// })
+// .map((param) => (
+//
+// ))}
+//
+//
+// );
+// }
-function ParameterItem({ param }: { param: APIParameter }) {
- return (
-
-
-
{param.description}
- {param.type && (
-
-
Type
-
-
- )}
-
-
- );
-}
+// function ParameterItem({ param }: { param: APIParameter }) {
+// return (
+//
+//
+//
{param.description}
+// {param.type && (
+//
+//
Type
+//
+//
+// )}
+//
+//
+// );
+// }
function createCurlCommand(params: { metadata: ApiEndpointMeta }) {
const url = `${params.metadata.origin}${params.metadata.path}`;
diff --git a/apps/portal/src/components/Document/APIEndpointMeta/common.tsx b/apps/portal/src/components/Document/APIEndpointMeta/common.tsx
new file mode 100644
index 00000000000..799d67a0363
--- /dev/null
+++ b/apps/portal/src/components/Document/APIEndpointMeta/common.tsx
@@ -0,0 +1,9 @@
+import type { APIParameter } from "./ApiEndpoint";
+
+export const secretKeyHeaderParameter: APIParameter = {
+ description: "Your project secret key for authentication.",
+ example: "
",
+ name: "x-secret-key",
+ required: true,
+ type: "string",
+};