feat: updated integration page with missing API routes
This commit is contained in:
1 parent
25d9c30b8a
commit
7c0ee21906
25 files changed
+2402
-350
No files matched your search
@@ -1,4 +1,4 @@
|
||||
import type { HttpMethod } from '@/data/apiCatalogue'
|
||||
import { IMAGES_AFTER_GROUP, type ApiGroup, type HttpMethod } from '@/data/apiCatalogue'
|
||||
|
||||
export const SECTION_TITLE = 'text-[1.125rem]/6.5 font-semibold text-highlighted'
|
||||
|
||||
@@ -16,10 +16,13 @@ const METHOD_BASE =
|
||||
|
||||
export const SESSION_METHOD_CLASS = `${METHOD_BASE} border-dashed border-accented bg-transparent text-muted`
|
||||
|
||||
const PATCH_CLASS = `${METHOD_BASE} border-warning bg-(--rc-warning-soft) text-warning`
|
||||
|
||||
export const METHOD_CLASS: Record<HttpMethod, string> = {
|
||||
GET: `${METHOD_BASE} border-inverted bg-inverted text-inverted`,
|
||||
POST: `${METHOD_BASE} border-success bg-(--rc-success-soft) text-success`,
|
||||
PATCH: `${METHOD_BASE} border-warning bg-(--rc-warning-soft) text-warning`,
|
||||
PATCH: PATCH_CLASS,
|
||||
PUT: PATCH_CLASS,
|
||||
DELETE: `${METHOD_BASE} border-error bg-(--rc-error-soft) text-error`,
|
||||
}
|
||||
|
||||
@@ -30,3 +33,8 @@ export function splitInlineCode(text: string) {
|
||||
export function endpointAnchor(id: string) {
|
||||
return `ep-${id}`
|
||||
}
|
||||
|
||||
export function groupsAroundImages(groups: ApiGroup[]) {
|
||||
const split = groups.findIndex((group) => group.key === IMAGES_AFTER_GROUP) + 1
|
||||
return { before: groups.slice(0, split), after: groups.slice(split) }
|
||||
}
|
||||
Reference in new issue
Block a user