Skip to content

Commit d26c8cc

Browse files
committed
multiline curl
1 parent d81055d commit d26c8cc

File tree

5 files changed

+111
-30
lines changed

5 files changed

+111
-30
lines changed

apps/docs/app/[lang]/[[...slug]]/page.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ const APIPage = createAPIPage(openapi, {
2828
<div className='min-w-0 flex-1'>
2929
{slots.header}
3030
{slots.apiPlayground}
31-
{slots.description}
3231
{slots.authSchemes && <div className='api-section-divider'>{slots.authSchemes}</div>}
3332
{slots.paremeters}
3433
{slots.body && <div className='api-section-divider'>{slots.body}</div>}
@@ -85,7 +84,7 @@ export default async function Page(props: { params: Promise<{ slug?: string[]; l
8584
let currentPath = ''
8685

8786
urlParts.forEach((part, index) => {
88-
if (index === 0 && ['en', 'es', 'fr', 'de', 'ja', 'zh'].includes(part)) {
87+
if (index === 0 && SUPPORTED_LANGUAGES.has(part)) {
8988
currentPath = `/${part}`
9089
return
9190
}

apps/docs/app/global.css

Lines changed: 17 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,6 @@ html {
9292
[data-sidebar-container],
9393
#nd-sidebar {
9494
background: transparent !important;
95-
background-color: transparent !important;
9695
border: none !important;
9796
--color-fd-muted: transparent !important;
9897
--color-fd-card: transparent !important;
@@ -102,9 +101,7 @@ html {
102101
aside[data-sidebar],
103102
aside#nd-sidebar {
104103
background: transparent !important;
105-
background-color: transparent !important;
106104
border: none !important;
107-
border-right: none !important;
108105
}
109106

110107
/* Fumadocs v16: Add sidebar placeholder styling for grid area */
@@ -440,10 +437,6 @@ aside[data-sidebar],
440437
#nd-sidebar,
441438
#nd-sidebar * {
442439
border: none !important;
443-
border-right: none !important;
444-
border-left: none !important;
445-
border-top: none !important;
446-
border-bottom: none !important;
447440
}
448441

449442
/* Override fumadocs background colors for sidebar */
@@ -453,7 +446,6 @@ aside[data-sidebar],
453446
--color-fd-muted: transparent !important;
454447
--color-fd-secondary: transparent !important;
455448
background: transparent !important;
456-
background-color: transparent !important;
457449
}
458450

459451
/* Force normal text flow in sidebar */
@@ -582,9 +574,7 @@ video {
582574
border-style: solid !important;
583575
}
584576

585-
/* ============================================================
586-
API Reference Pages — Mintlify-style overrides
587-
============================================================ */
577+
/* API Reference Pages — Mintlify-style overrides */
588578

589579
/* OpenAPI pages: span main + TOC grid columns for wide two-column layout.
590580
The grid has columns: spacer | sidebar | main | toc | spacer.
@@ -677,6 +667,8 @@ html.dark #nd-page span.font-mono.font-medium[class*="text-red"] {
677667
#nd-sidebar a span.font-mono.font-medium {
678668
display: inline-flex;
679669
align-items: center;
670+
justify-content: center;
671+
min-width: 2.25rem;
680672
font-size: 10px !important;
681673
line-height: 1 !important;
682674
padding: 2.5px 4px;
@@ -1004,8 +996,8 @@ html.dark .response-section-dropdown-item:hover {
1004996
.flex.flex-wrap.items-center.gap-3.not-prose
1005997
> span.text-sm.font-mono.text-fd-muted-foreground {
1006998
order: 2;
1007-
background-color: rgb(235 235 238);
1008-
color: rgb(90 90 99);
999+
background-color: rgb(240 240 243);
1000+
color: rgb(100 100 110);
10091001
padding: 0.125rem 0.5rem;
10101002
border-radius: 0.375rem;
10111003
font-size: 0.6875rem;
@@ -1026,14 +1018,14 @@ html.dark
10261018
display: none;
10271019
}
10281020

1029-
/* Required badge — order 3, added as ::after on the flex row when it contains a required field */
1021+
/* Required badge — order 3, light red pill */
10301022
#nd-page:has(.api-page-header)
10311023
.flex.flex-wrap.items-center.gap-3.not-prose:has(span.text-red-400)::after {
10321024
content: "required";
10331025
order: 3;
10341026
display: inline-flex;
10351027
align-items: center;
1036-
background-color: rgb(254 226 226);
1028+
background-color: rgb(254 235 235);
10371029
color: rgb(220 38 38);
10381030
padding: 0.125rem 0.5rem;
10391031
border-radius: 0.375rem;
@@ -1045,7 +1037,7 @@ html.dark
10451037
html.dark
10461038
#nd-page:has(.api-page-header)
10471039
.flex.flex-wrap.items-center.gap-3.not-prose:has(span.text-red-400)::after {
1048-
background-color: rgb(127 29 29 / 0.3);
1040+
background-color: rgb(127 29 29 / 0.2);
10491041
color: rgb(252 165 165);
10501042
}
10511043

@@ -1090,8 +1082,8 @@ html.dark
10901082
line-height: 1.25rem;
10911083
font-weight: 500;
10921084
font-family: var(--font-geist-sans), ui-sans-serif, system-ui, sans-serif;
1093-
background-color: rgb(235 235 238);
1094-
color: rgb(90 90 99);
1085+
background-color: rgb(240 240 243);
1086+
color: rgb(100 100 110);
10951087
padding: 0.125rem 0.5rem;
10961088
border-radius: 0.375rem;
10971089
display: inline-flex;
@@ -1112,8 +1104,8 @@ html.dark
11121104
order: 3;
11131105
display: inline-flex;
11141106
align-items: center;
1115-
background-color: rgb(235 235 238);
1116-
color: rgb(90 90 99);
1107+
background-color: rgb(240 240 243);
1108+
color: rgb(100 100 110);
11171109
padding: 0.125rem 0.5rem;
11181110
border-radius: 0.375rem;
11191111
font-size: 0.6875rem;
@@ -1129,13 +1121,13 @@ html.dark
11291121
color: rgb(212 212 216);
11301122
}
11311123

1132-
/* "required" badge via ::after on the auth flex row */
1124+
/* "required" badge via ::after on the auth flex row — light red pill */
11331125
#nd-page:has(.api-page-header) div.my-4 > .flex.flex-wrap.items-center.gap-3.not-prose::after {
11341126
content: "required";
11351127
order: 4;
11361128
display: inline-flex;
11371129
align-items: center;
1138-
background-color: rgb(254 226 226);
1130+
background-color: rgb(254 235 235);
11391131
color: rgb(220 38 38);
11401132
padding: 0.125rem 0.5rem;
11411133
border-radius: 0.375rem;
@@ -1148,7 +1140,7 @@ html.dark
11481140
#nd-page:has(.api-page-header)
11491141
div.my-4
11501142
> .flex.flex-wrap.items-center.gap-3.not-prose::after {
1151-
background-color: rgb(127 29 29 / 0.3);
1143+
background-color: rgb(127 29 29 / 0.2);
11521144
color: rgb(252 165 165);
11531145
}
11541146

@@ -1201,8 +1193,8 @@ html.dark #nd-page:has(.api-page-header) .text-sm.border-t {
12011193
#nd-page:has(.api-page-header) .flex.flex-wrap.items-center.gap-3.not-prose > button,
12021194
#nd-page:has(.api-page-header) .flex.flex-wrap.items-center.gap-3.not-prose > span:has(> button) {
12031195
order: 2;
1204-
background-color: rgb(235 235 238);
1205-
color: rgb(90 90 99);
1196+
background-color: rgb(240 240 243);
1197+
color: rgb(100 100 110);
12061198
padding: 0.125rem 0.5rem;
12071199
border-radius: 0.375rem;
12081200
font-size: 0.6875rem;

apps/docs/components/navbar/navbar.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,14 +53,14 @@ export function Navbar() {
5353
Documentation
5454
</Link>
5555
<Link
56-
href='/api-reference/authentication'
56+
href='/api-reference/getting-started'
5757
className={cn(
5858
'rounded-xl px-3 py-2 font-normal text-[0.9375rem] leading-[1.4] transition-colors hover:bg-foreground/8 hover:text-foreground',
5959
isApiReference ? 'text-foreground' : 'text-foreground/60'
6060
)}
6161
style={navLinkStyle}
6262
>
63-
API Reference
63+
API
6464
</Link>
6565
<Link
6666
href='https://sim.ai'
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"pages": ["executeWorkflow", "cancelExecution", "listWorkflows", "getWorkflow", "getJobStatus"]
3+
}

apps/docs/openapi.json

Lines changed: 88 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,14 @@
2929
"summary": "Execute Workflow",
3030
"description": "Execute a deployed workflow. Supports synchronous, asynchronous, and streaming modes. For async execution, the response includes a statusUrl you can poll for results.",
3131
"tags": ["Workflows"],
32+
"x-codeSamples": [
33+
{
34+
"id": "curl",
35+
"label": "cURL",
36+
"lang": "bash",
37+
"source": "curl -X POST \\\n \"https://www.sim.ai/api/workflows/{id}/execute\" \\\n -H \"X-API-Key: YOUR_API_KEY\" \\\n -H \"Content-Type: application/json\" \\\n -d '{\n \"input\": {\n \"key\": \"value\"\n }\n }'"
38+
}
39+
],
3240
"parameters": [
3341
{
3442
"name": "id",
@@ -112,6 +120,14 @@
112120
"summary": "Cancel Execution",
113121
"description": "Cancel a running workflow execution. Only effective for executions that are still in progress.",
114122
"tags": ["Workflows"],
123+
"x-codeSamples": [
124+
{
125+
"id": "curl",
126+
"label": "cURL",
127+
"lang": "bash",
128+
"source": "curl -X POST \\\n \"https://www.sim.ai/api/workflows/{id}/executions/{executionId}/cancel\" \\\n -H \"X-API-Key: YOUR_API_KEY\""
129+
}
130+
],
115131
"parameters": [
116132
{
117133
"name": "id",
@@ -170,6 +186,14 @@
170186
"summary": "List Workflows",
171187
"description": "Retrieve all workflows in a workspace with cursor-based pagination.",
172188
"tags": ["Workflows"],
189+
"x-codeSamples": [
190+
{
191+
"id": "curl",
192+
"label": "cURL",
193+
"lang": "bash",
194+
"source": "curl -X GET \\\n \"https://www.sim.ai/api/v1/workflows?workspaceId=YOUR_WORKSPACE_ID\" \\\n -H \"X-API-Key: YOUR_API_KEY\""
195+
}
196+
],
173197
"parameters": [
174198
{
175199
"name": "workspaceId",
@@ -261,6 +285,14 @@
261285
"summary": "Get Workflow",
262286
"description": "Retrieve details for a single workflow, including its input fields and deployment status.",
263287
"tags": ["Workflows"],
288+
"x-codeSamples": [
289+
{
290+
"id": "curl",
291+
"label": "cURL",
292+
"lang": "bash",
293+
"source": "curl -X GET \\\n \"https://www.sim.ai/api/v1/workflows/{id}\" \\\n -H \"X-API-Key: YOUR_API_KEY\""
294+
}
295+
],
264296
"parameters": [
265297
{
266298
"name": "id",
@@ -311,6 +343,14 @@
311343
"summary": "Get Job Status",
312344
"description": "Poll the status of an asynchronous workflow execution. Use the jobId returned from the Execute Workflow endpoint when the execution is queued asynchronously.",
313345
"tags": ["Workflows"],
346+
"x-codeSamples": [
347+
{
348+
"id": "curl",
349+
"label": "cURL",
350+
"lang": "bash",
351+
"source": "curl -X GET \\\n \"https://www.sim.ai/api/jobs/{jobId}\" \\\n -H \"X-API-Key: YOUR_API_KEY\""
352+
}
353+
],
314354
"parameters": [
315355
{
316356
"name": "jobId",
@@ -352,6 +392,14 @@
352392
"summary": "Query Logs",
353393
"description": "List workflow execution logs with advanced filtering and cursor-based pagination. Supports filtering by workflow, trigger type, date range, duration, cost, and more.",
354394
"tags": ["Logs"],
395+
"x-codeSamples": [
396+
{
397+
"id": "curl",
398+
"label": "cURL",
399+
"lang": "bash",
400+
"source": "curl -X GET \\\n \"https://www.sim.ai/api/v1/logs?workspaceId=YOUR_WORKSPACE_ID\" \\\n -H \"X-API-Key: YOUR_API_KEY\""
401+
}
402+
],
355403
"parameters": [
356404
{
357405
"name": "workspaceId",
@@ -555,6 +603,14 @@
555603
"summary": "Get Log Details",
556604
"description": "Retrieve detailed information about a specific log entry, including workflow metadata, execution data, and cost breakdown.",
557605
"tags": ["Logs"],
606+
"x-codeSamples": [
607+
{
608+
"id": "curl",
609+
"label": "cURL",
610+
"lang": "bash",
611+
"source": "curl -X GET \\\n \"https://www.sim.ai/api/v1/logs/{id}\" \\\n -H \"X-API-Key: YOUR_API_KEY\""
612+
}
613+
],
558614
"parameters": [
559615
{
560616
"name": "id",
@@ -605,6 +661,14 @@
605661
"summary": "Get Execution Details",
606662
"description": "Retrieve the full execution state snapshot, including the workflow state at time of execution and detailed metadata.",
607663
"tags": ["Logs"],
664+
"x-codeSamples": [
665+
{
666+
"id": "curl",
667+
"label": "cURL",
668+
"lang": "bash",
669+
"source": "curl -X GET \\\n \"https://www.sim.ai/api/v1/logs/executions/{executionId}\" \\\n -H \"X-API-Key: YOUR_API_KEY\""
670+
}
671+
],
608672
"parameters": [
609673
{
610674
"name": "executionId",
@@ -712,6 +776,14 @@
712776
"summary": "List Audit Logs",
713777
"description": "Retrieve audit logs for your organization with cursor-based pagination. Requires an Enterprise subscription and organization admin or owner role.",
714778
"tags": ["Audit Logs"],
779+
"x-codeSamples": [
780+
{
781+
"id": "curl",
782+
"label": "cURL",
783+
"lang": "bash",
784+
"source": "curl -X GET \\\n \"https://www.sim.ai/api/v1/audit-logs?workspaceId=YOUR_WORKSPACE_ID\" \\\n -H \"X-API-Key: YOUR_API_KEY\""
785+
}
786+
],
715787
"parameters": [
716788
{
717789
"name": "action",
@@ -847,6 +919,14 @@
847919
"summary": "Get Audit Log Details",
848920
"description": "Retrieve a single audit log entry by ID. Requires an Enterprise subscription and organization admin or owner role.",
849921
"tags": ["Audit Logs"],
922+
"x-codeSamples": [
923+
{
924+
"id": "curl",
925+
"label": "cURL",
926+
"lang": "bash",
927+
"source": "curl -X GET \\\n \"https://www.sim.ai/api/v1/audit-logs/{id}\" \\\n -H \"X-API-Key: YOUR_API_KEY\""
928+
}
929+
],
850930
"parameters": [
851931
{
852932
"name": "id",
@@ -900,7 +980,14 @@
900980
"summary": "Get Usage Limits",
901981
"description": "Retrieve your current rate limits, usage spending, and storage consumption for the billing period.",
902982
"tags": ["Usage"],
903-
"parameters": [],
983+
"x-codeSamples": [
984+
{
985+
"id": "curl",
986+
"label": "cURL",
987+
"lang": "bash",
988+
"source": "curl -X GET \\\n \"https://www.sim.ai/api/users/me/usage-limits\" \\\n -H \"X-API-Key: YOUR_API_KEY\""
989+
}
990+
],
904991
"responses": {
905992
"200": {
906993
"description": "Current rate limits, usage, and storage information.",

0 commit comments

Comments
 (0)