@lukoweb/apitogo 0.1.129 → 0.1.131
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.
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export declare const HEADER_DOCS_LABEL = "Docs";
|
|
2
|
+
export declare const HEADER_API_REFERENCE_LABEL = "API Reference";
|
|
3
|
+
export declare const TEMPLATE_DOCS_PATH = "/introduction";
|
|
4
|
+
export declare function ensureHeaderDocsNavigation(config: Record<string, unknown>, docRoutes: string[]): Record<string, unknown>;
|
|
5
|
+
export declare function ensureHeaderApiReferenceNavigation(config: Record<string, unknown>, to: string, label?: string): Record<string, unknown>;
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
export declare const APITOGO_JSON_FILENAME = "apitogo.config.json";
|
|
2
|
+
export declare const DOCUMENTATION_NAV_LABEL = "Documentation";
|
|
3
|
+
export declare const API_REFERENCE_PATH = "/api";
|
|
4
|
+
export declare const API_REFERENCE_LABEL = "API Reference";
|
|
5
|
+
export type JsonRecord = Record<string, unknown>;
|
|
6
|
+
export type NavItem = string | JsonRecord;
|
|
7
|
+
export declare function isPlainObject(value: unknown): value is JsonRecord;
|
|
8
|
+
export declare function deepMerge(target: JsonRecord, source: JsonRecord): JsonRecord;
|
|
9
|
+
export declare function parseJsonObjectFlag(raw: string | undefined, flagName: string): JsonRecord | undefined;
|
|
10
|
+
export declare function titleFromDirectoryName(dirName: string): string;
|
|
11
|
+
export declare function createDefaultApitogoJsonConfig(options: {
|
|
12
|
+
title: string;
|
|
13
|
+
pagesDir: string;
|
|
14
|
+
}): JsonRecord;
|
|
15
|
+
export declare function applyConfigPatches(config: JsonRecord, patches: {
|
|
16
|
+
site?: JsonRecord;
|
|
17
|
+
theme?: JsonRecord;
|
|
18
|
+
authentication?: JsonRecord;
|
|
19
|
+
title?: string;
|
|
20
|
+
}): JsonRecord;
|
|
21
|
+
export declare const sortDocPaths: (docPaths: string[]) => string[];
|
|
22
|
+
export declare function buildDocumentationItems(routePaths: string[]): NavItem[];
|
|
23
|
+
export declare function mergeDocumentationNavigation(navigation: unknown, docRoutePaths: string[], options: {
|
|
24
|
+
force: boolean;
|
|
25
|
+
}): NavItem[];
|
|
26
|
+
export declare function applyOpenApiToJsonConfig(config: JsonRecord, input: string): JsonRecord;
|
|
27
|
+
export declare function openapiInputForConfig(specRelativePosix: string): string;
|
|
28
|
+
export declare function toRelativeOpenApiInput(projectDir: string, inputPath: string): string;
|
|
29
|
+
export declare function normalizePageSlug(pathOrSlug: string): string;
|
|
30
|
+
export declare function slugifyPlanSku(displayName: string): string;
|
|
31
|
+
export declare function buildLimits(rateLimitCalls: number, monthlyQuota: number): JsonRecord;
|
|
32
|
+
export declare function buildPlanItemFromWizard(input: {
|
|
33
|
+
displayName: string;
|
|
34
|
+
priceAmount: number;
|
|
35
|
+
pricingModel?: "fixed" | "custom";
|
|
36
|
+
rateLimitCalls: number;
|
|
37
|
+
monthlyQuota: number;
|
|
38
|
+
sku?: string;
|
|
39
|
+
}): JsonRecord;
|
|
40
|
+
export declare function applyPlansToJsonConfig(config: JsonRecord, planItems: JsonRecord[]): JsonRecord;
|
|
41
|
+
export declare const BACKEND_RUNTIMES: readonly ["dotnet", "nodejs", "python"];
|
|
42
|
+
export type BackendRuntime = (typeof BACKEND_RUNTIMES)[number];
|
|
43
|
+
export declare const RUNTIME_VERSIONS_BY_RUNTIME: Record<BackendRuntime, readonly string[]>;
|
|
44
|
+
export declare function parseBackendRuntime(raw: string): BackendRuntime | null;
|
|
45
|
+
export declare function parseRuntimeVersion(runtime: BackendRuntime, raw: string): string | null;
|
|
46
|
+
export declare function applyBackendToJsonConfig(config: JsonRecord, backend: {
|
|
47
|
+
sourceDirectory: string;
|
|
48
|
+
runtime: BackendRuntime;
|
|
49
|
+
runtimeVersion: string;
|
|
50
|
+
}): JsonRecord;
|
|
51
|
+
export declare function toRoutePath(relativeFile: string, pagesDir: string): string;
|
|
52
|
+
export declare function pageComponentName(slug: string): string;
|
|
53
|
+
export declare const THIN_WRAPPER_SOURCE = "import { devPortalBillingPlugin } from \"@lukoweb/apitogo-plugin-dev-portal-billing\";\nimport { buildApitogoConfig } from \"@lukoweb/apitogo/build-config\";\nimport siteConfig from \"./apitogo.config.json\";\n\nexport default buildApitogoConfig({\n ...siteConfig,\n plugins: [devPortalBillingPlugin()],\n});\n";
|
|
54
|
+
export declare function isThinConfigWrapper(source: string): boolean;
|
|
55
|
+
export declare function isManagedConfigWrapper(source: string): boolean;
|
|
56
|
+
export declare function labelFromRoutePath(routePath: string): string;
|
|
57
|
+
export declare function buildThinWrapperWithCustomPages(tsxRoutePaths: string[]): string;
|