@lukoweb/apitogo 0.1.50 → 0.1.53

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 (36) hide show
  1. package/dist/cli/cli.js +1339 -922
  2. package/dist/declarations/config/apitogo-config-core.d.ts +25 -0
  3. package/dist/declarations/config/apitogo-config-loader.d.ts +2 -0
  4. package/dist/declarations/config/apitogo-config-loader.node.d.ts +4 -0
  5. package/dist/declarations/config/build-apitogo-config.d.ts +8 -0
  6. package/dist/declarations/config/loader.d.ts +4 -0
  7. package/dist/declarations/config/local-manifest.d.ts +16 -9
  8. package/dist/declarations/config/validators/HeaderNavigationSchema.d.ts +24 -24
  9. package/dist/declarations/config/validators/ModulesSchema.d.ts +38 -0
  10. package/dist/declarations/config/validators/ZudokuConfig.d.ts +18 -9
  11. package/dist/declarations/index.d.ts +2 -1
  12. package/dist/declarations/lib/authentication/auth-header-nav.d.ts +10 -0
  13. package/dist/declarations/lib/core/plugins.d.ts +1 -0
  14. package/dist/declarations/lib/ui/Button.d.ts +1 -1
  15. package/dist/declarations/lib/ui/Item.d.ts +1 -1
  16. package/dist/flat-config.d.ts +36 -23
  17. package/docs/configuration/authentication.md +11 -8
  18. package/docs/configuration/manifest.md +83 -93
  19. package/package.json +17 -1
  20. package/src/config/apitogo-config-core.ts +485 -0
  21. package/src/config/apitogo-config-loader.node.ts +68 -0
  22. package/src/config/apitogo-config-loader.ts +6 -0
  23. package/src/config/build-apitogo-config.ts +52 -0
  24. package/src/config/loader.ts +61 -1
  25. package/src/config/local-manifest.ts +72 -52
  26. package/src/config/resolve-modules.ts +16 -13
  27. package/src/config/validators/ModulesSchema.ts +17 -0
  28. package/src/index.ts +9 -1
  29. package/src/lib/authentication/auth-header-nav.ts +56 -0
  30. package/src/lib/authentication/providers/dev-portal-utils.ts +7 -2
  31. package/src/lib/components/Header.tsx +48 -60
  32. package/src/lib/components/MobileTopNavigation.tsx +29 -40
  33. package/src/lib/core/plugins.ts +1 -0
  34. package/src/vite/dev-portal-env.ts +12 -4
  35. package/src/vite/plugin-config.ts +20 -3
  36. package/src/vite/plugin-local-manifest.ts +15 -0
@@ -0,0 +1,25 @@
1
+ export declare const APITOGO_CONFIG_FILENAME = "apitogo.config.json";
2
+ export type ApitogoJsonConfig = Record<string, unknown>;
3
+ export type AuthenticationSecrets = {
4
+ oidc?: {
5
+ authority?: string;
6
+ clientId?: string;
7
+ clientSecret?: string;
8
+ };
9
+ stripe?: {
10
+ secretKey?: string;
11
+ webhookSecret?: string;
12
+ };
13
+ };
14
+ export declare function applyEnvOverrides(config: ApitogoJsonConfig, env?: NodeJS.ProcessEnv): ApitogoJsonConfig;
15
+ type PlanCatalogItem = Record<string, unknown> & {
16
+ sku?: string;
17
+ };
18
+ export declare function readPlanCatalogItems(config: ApitogoJsonConfig): PlanCatalogItem[];
19
+ export declare function normalizeApitogoConfig(config: ApitogoJsonConfig): ApitogoJsonConfig;
20
+ export declare function isBillingEnabled(config: ApitogoJsonConfig): boolean;
21
+ export declare function deriveManifestFields(config: ApitogoJsonConfig): ApitogoJsonConfig;
22
+ export declare function extractManifest(config: ApitogoJsonConfig | null | undefined): ApitogoJsonConfig | null;
23
+ export declare function extractSiteConfig(config: ApitogoJsonConfig | null | undefined): ApitogoJsonConfig;
24
+ export declare function resolveProjectDisplayName(config: ApitogoJsonConfig): string;
25
+ export {};
@@ -0,0 +1,2 @@
1
+ export * from "./apitogo-config-core.js";
2
+ export { apitogoConfigPath, loadApitogoConfig, readAuthenticationSecrets, } from "./apitogo-config-loader.node.js";
@@ -0,0 +1,4 @@
1
+ import { type ApitogoJsonConfig, type AuthenticationSecrets } from "./apitogo-config-core.js";
2
+ export declare function loadApitogoConfig(rootDir?: string): ApitogoJsonConfig;
3
+ export declare function readAuthenticationSecrets(env?: NodeJS.ProcessEnv): AuthenticationSecrets;
4
+ export declare function apitogoConfigPath(rootDir: string): string;
@@ -0,0 +1,8 @@
1
+ import type { ApitogoPlugin } from "../lib/core/plugins.js";
2
+ import { type ApitogoJsonConfig } from "./apitogo-config-core.js";
3
+ import type { ApitogoConfig } from "./config.js";
4
+ type BuildApitogoConfigOptions = Partial<ApitogoConfig> & ApitogoJsonConfig & {
5
+ plugins?: ApitogoPlugin[];
6
+ };
7
+ export declare function buildApitogoConfig({ plugins, plans: _legacyPlans, ...jsonOverrides }?: BuildApitogoConfigOptions): ApitogoConfig;
8
+ export {};
@@ -1,5 +1,6 @@
1
1
  import type { RollupOutput, RollupWatcher } from "rollup";
2
2
  import { type ConfigEnv } from "vite";
3
+ import { type DevPortalPreviewPlan } from "./local-manifest.js";
3
4
  import type { ResolvedModulesConfig } from "./validators/ModulesSchema.js";
4
5
  import type { ZudokuConfig } from "./validators/ZudokuConfig.js";
5
6
  export type ConfigWithMeta = ZudokuConfig & {
@@ -9,6 +10,9 @@ export type ConfigWithMeta = ZudokuConfig & {
9
10
  configPath: string;
10
11
  mode: typeof process.env.ZUDOKU_ENV;
11
12
  dependencies: string[];
13
+ pricingEnabled?: boolean;
14
+ authenticationEnabled?: boolean;
15
+ previewPlans?: DevPortalPreviewPlan[];
12
16
  };
13
17
  __resolvedModules: ResolvedModulesConfig;
14
18
  };
@@ -1,16 +1,16 @@
1
1
  import { z } from "zod";
2
- export declare const DEV_PORTAL_MANIFEST_FILENAME = "apitogo.local.json";
2
+ import { APITOGO_CONFIG_FILENAME } from "./apitogo-config-loader.js";
3
3
  export declare const APITOGO_MANIFEST_BASE_FILENAME = "apitogo.json";
4
4
  export declare const APITOGO_MANIFEST_ENV_FILES: {
5
5
  readonly development: "apitogo.local.json";
6
6
  readonly production: "apitogo.prod.json";
7
7
  };
8
+ export { APITOGO_CONFIG_FILENAME };
8
9
  export type ApitogoManifestEnv = keyof typeof APITOGO_MANIFEST_ENV_FILES;
9
10
  export declare const ManifestPlanInputSchema: z.ZodObject<{
10
11
  sku: z.ZodString;
11
12
  displayName: z.ZodString;
12
- isFree: z.ZodBoolean;
13
- priceAmount: z.ZodOptional<z.ZodNumber>;
13
+ priceAmount: z.ZodDefault<z.ZodNumber>;
14
14
  priceCurrency: z.ZodOptional<z.ZodString>;
15
15
  billingPeriod: z.ZodOptional<z.ZodEnum<{
16
16
  month: "month";
@@ -21,6 +21,9 @@ export declare const ManifestPlanInputSchema: z.ZodObject<{
21
21
  limitsJson: z.ZodOptional<z.ZodString>;
22
22
  includedActionKeys: z.ZodOptional<z.ZodArray<z.ZodString>>;
23
23
  }, z.core.$strip>;
24
+ export declare function isPlanFree(plan: {
25
+ priceAmount?: number;
26
+ }): boolean;
24
27
  export declare const DevPortalLocalManifestSchema: z.ZodObject<{
25
28
  siteName: z.ZodOptional<z.ZodString>;
26
29
  branding: z.ZodOptional<z.ZodObject<{
@@ -30,11 +33,15 @@ export declare const DevPortalLocalManifestSchema: z.ZodObject<{
30
33
  pricing: z.ZodOptional<z.ZodObject<{
31
34
  enabled: z.ZodOptional<z.ZodBoolean>;
32
35
  }, z.core.$strip>>;
36
+ authentication: z.ZodOptional<z.ZodObject<{
37
+ enabled: z.ZodOptional<z.ZodBoolean>;
38
+ type: z.ZodOptional<z.ZodString>;
39
+ apiBaseUrl: z.ZodOptional<z.ZodString>;
40
+ }, z.core.$strip>>;
33
41
  plans: z.ZodOptional<z.ZodArray<z.ZodObject<{
34
42
  sku: z.ZodString;
35
43
  displayName: z.ZodString;
36
- isFree: z.ZodBoolean;
37
- priceAmount: z.ZodOptional<z.ZodNumber>;
44
+ priceAmount: z.ZodDefault<z.ZodNumber>;
38
45
  priceCurrency: z.ZodOptional<z.ZodString>;
39
46
  billingPeriod: z.ZodOptional<z.ZodEnum<{
40
47
  month: "month";
@@ -65,14 +72,12 @@ export declare const DevPortalLocalManifestSchema: z.ZodObject<{
65
72
  publicHealthActionKey: z.ZodOptional<z.ZodString>;
66
73
  }, z.core.$strip>>;
67
74
  projectId: z.ZodOptional<z.ZodString>;
68
- projectName: z.ZodOptional<z.ZodString>;
69
75
  }, z.core.$strip>;
70
76
  export type ManifestPlanInput = z.infer<typeof ManifestPlanInputSchema>;
71
77
  export type DevPortalLocalManifest = z.infer<typeof DevPortalLocalManifestSchema>;
72
78
  export type DevPortalPreviewPlan = {
73
79
  sku: string;
74
80
  displayName: string;
75
- isFree: boolean;
76
81
  priceAmount: number;
77
82
  priceCurrency: string;
78
83
  billingPeriod: string;
@@ -81,9 +86,11 @@ export type DevPortalPreviewPlan = {
81
86
  };
82
87
  export type DevPortalPreviewPlanCatalog = {
83
88
  pricingEnabled: boolean;
89
+ authenticationEnabled: boolean;
84
90
  plans: DevPortalPreviewPlan[];
85
91
  };
86
92
  export declare function isPricingEnabled(manifest: DevPortalLocalManifest | null | undefined): boolean;
93
+ export declare function isAuthenticationEnabled(manifest: DevPortalLocalManifest | null | undefined): boolean;
87
94
  export declare function manifestToPreviewCatalog(manifest: DevPortalLocalManifest | null | undefined): DevPortalPreviewPlanCatalog;
88
95
  export declare function normalizeBillingPeriod(period?: string): string;
89
96
  export declare function plansToPreviewCatalog(plans: ManifestPlanInput[] | undefined): Pick<DevPortalPreviewPlanCatalog, "plans">;
@@ -91,12 +98,12 @@ export declare function resolveManifestEnv(viteMode: string): ApitogoManifestEnv
91
98
  export declare function mergePlansBySku(existing: ManifestPlanInput[] | undefined, patch: ManifestPlanInput[]): ManifestPlanInput[];
92
99
  export declare function mergeManifest(base: DevPortalLocalManifest, override: DevPortalLocalManifest): DevPortalLocalManifest;
93
100
  export declare function manifestFilePath(rootDir: string, filename?: string): string;
94
- export declare function manifestPathsForEnv(rootDir: string, env: ApitogoManifestEnv): {
101
+ export declare function manifestPathsForEnv(rootDir: string, _env: ApitogoManifestEnv): {
95
102
  basePath: string;
96
103
  overridePath: string;
97
104
  watchPaths: string[];
98
105
  };
99
106
  export declare function parseLocalManifestJson(raw: string): DevPortalLocalManifest | null;
100
107
  export declare function readManifestFile(rootDir: string, filename: string): Promise<DevPortalLocalManifest | null>;
101
- export declare function readEffectiveManifest(rootDir: string, env: ApitogoManifestEnv): Promise<DevPortalLocalManifest | null>;
108
+ export declare function readEffectiveManifest(rootDir: string, _env: ApitogoManifestEnv): Promise<DevPortalLocalManifest | null>;
102
109
  export declare function readLocalManifest(rootDir: string): Promise<DevPortalLocalManifest | null>;
@@ -12,9 +12,6 @@ declare const HeaderNavLinkItemSchema: z.ZodObject<{
12
12
  bold: "bold";
13
13
  link: "link";
14
14
  binary: "binary";
15
- file: "file";
16
- map: "map";
17
- type: "type";
18
15
  "a-arrow-down": "a-arrow-down";
19
16
  "a-arrow-up": "a-arrow-up";
20
17
  "a-large-small": "a-large-small";
@@ -683,6 +680,7 @@ declare const HeaderNavLinkItemSchema: z.ZodObject<{
683
680
  fence: "fence";
684
681
  "ferris-wheel": "ferris-wheel";
685
682
  figma: "figma";
683
+ file: "file";
686
684
  "file-archive": "file-archive";
687
685
  "file-audio": "file-audio";
688
686
  "file-audio-2": "file-audio-2";
@@ -1106,6 +1104,7 @@ declare const HeaderNavLinkItemSchema: z.ZodObject<{
1106
1104
  "mail-x": "mail-x";
1107
1105
  mailbox: "mailbox";
1108
1106
  mails: "mails";
1107
+ map: "map";
1109
1108
  "map-minus": "map-minus";
1110
1109
  "map-pin": "map-pin";
1111
1110
  "map-pin-check": "map-pin-check";
@@ -1812,6 +1811,7 @@ declare const HeaderNavLinkItemSchema: z.ZodObject<{
1812
1811
  "tv-minimal-play": "tv-minimal-play";
1813
1812
  twitch: "twitch";
1814
1813
  twitter: "twitter";
1814
+ type: "type";
1815
1815
  "type-outline": "type-outline";
1816
1816
  umbrella: "umbrella";
1817
1817
  "umbrella-off": "umbrella-off";
@@ -1988,9 +1988,6 @@ declare const HeaderNavGroupSchema: z.ZodObject<{
1988
1988
  bold: "bold";
1989
1989
  link: "link";
1990
1990
  binary: "binary";
1991
- file: "file";
1992
- map: "map";
1993
- type: "type";
1994
1991
  "a-arrow-down": "a-arrow-down";
1995
1992
  "a-arrow-up": "a-arrow-up";
1996
1993
  "a-large-small": "a-large-small";
@@ -2659,6 +2656,7 @@ declare const HeaderNavGroupSchema: z.ZodObject<{
2659
2656
  fence: "fence";
2660
2657
  "ferris-wheel": "ferris-wheel";
2661
2658
  figma: "figma";
2659
+ file: "file";
2662
2660
  "file-archive": "file-archive";
2663
2661
  "file-audio": "file-audio";
2664
2662
  "file-audio-2": "file-audio-2";
@@ -3082,6 +3080,7 @@ declare const HeaderNavGroupSchema: z.ZodObject<{
3082
3080
  "mail-x": "mail-x";
3083
3081
  mailbox: "mailbox";
3084
3082
  mails: "mails";
3083
+ map: "map";
3085
3084
  "map-minus": "map-minus";
3086
3085
  "map-pin": "map-pin";
3087
3086
  "map-pin-check": "map-pin-check";
@@ -3788,6 +3787,7 @@ declare const HeaderNavGroupSchema: z.ZodObject<{
3788
3787
  "tv-minimal-play": "tv-minimal-play";
3789
3788
  twitch: "twitch";
3790
3789
  twitter: "twitter";
3790
+ type: "type";
3791
3791
  "type-outline": "type-outline";
3792
3792
  umbrella: "umbrella";
3793
3793
  "umbrella-off": "umbrella-off";
@@ -3963,9 +3963,6 @@ declare const HeaderNavItemSchema: z.ZodUnion<readonly [z.ZodObject<{
3963
3963
  bold: "bold";
3964
3964
  link: "link";
3965
3965
  binary: "binary";
3966
- file: "file";
3967
- map: "map";
3968
- type: "type";
3969
3966
  "a-arrow-down": "a-arrow-down";
3970
3967
  "a-arrow-up": "a-arrow-up";
3971
3968
  "a-large-small": "a-large-small";
@@ -4634,6 +4631,7 @@ declare const HeaderNavItemSchema: z.ZodUnion<readonly [z.ZodObject<{
4634
4631
  fence: "fence";
4635
4632
  "ferris-wheel": "ferris-wheel";
4636
4633
  figma: "figma";
4634
+ file: "file";
4637
4635
  "file-archive": "file-archive";
4638
4636
  "file-audio": "file-audio";
4639
4637
  "file-audio-2": "file-audio-2";
@@ -5057,6 +5055,7 @@ declare const HeaderNavItemSchema: z.ZodUnion<readonly [z.ZodObject<{
5057
5055
  "mail-x": "mail-x";
5058
5056
  mailbox: "mailbox";
5059
5057
  mails: "mails";
5058
+ map: "map";
5060
5059
  "map-minus": "map-minus";
5061
5060
  "map-pin": "map-pin";
5062
5061
  "map-pin-check": "map-pin-check";
@@ -5763,6 +5762,7 @@ declare const HeaderNavItemSchema: z.ZodUnion<readonly [z.ZodObject<{
5763
5762
  "tv-minimal-play": "tv-minimal-play";
5764
5763
  twitch: "twitch";
5765
5764
  twitter: "twitter";
5765
+ type: "type";
5766
5766
  "type-outline": "type-outline";
5767
5767
  umbrella: "umbrella";
5768
5768
  "umbrella-off": "umbrella-off";
@@ -5937,9 +5937,6 @@ declare const HeaderNavItemSchema: z.ZodUnion<readonly [z.ZodObject<{
5937
5937
  bold: "bold";
5938
5938
  link: "link";
5939
5939
  binary: "binary";
5940
- file: "file";
5941
- map: "map";
5942
- type: "type";
5943
5940
  "a-arrow-down": "a-arrow-down";
5944
5941
  "a-arrow-up": "a-arrow-up";
5945
5942
  "a-large-small": "a-large-small";
@@ -6608,6 +6605,7 @@ declare const HeaderNavItemSchema: z.ZodUnion<readonly [z.ZodObject<{
6608
6605
  fence: "fence";
6609
6606
  "ferris-wheel": "ferris-wheel";
6610
6607
  figma: "figma";
6608
+ file: "file";
6611
6609
  "file-archive": "file-archive";
6612
6610
  "file-audio": "file-audio";
6613
6611
  "file-audio-2": "file-audio-2";
@@ -7031,6 +7029,7 @@ declare const HeaderNavItemSchema: z.ZodUnion<readonly [z.ZodObject<{
7031
7029
  "mail-x": "mail-x";
7032
7030
  mailbox: "mailbox";
7033
7031
  mails: "mails";
7032
+ map: "map";
7034
7033
  "map-minus": "map-minus";
7035
7034
  "map-pin": "map-pin";
7036
7035
  "map-pin-check": "map-pin-check";
@@ -7737,6 +7736,7 @@ declare const HeaderNavItemSchema: z.ZodUnion<readonly [z.ZodObject<{
7737
7736
  "tv-minimal-play": "tv-minimal-play";
7738
7737
  twitch: "twitch";
7739
7738
  twitter: "twitter";
7739
+ type: "type";
7740
7740
  "type-outline": "type-outline";
7741
7741
  umbrella: "umbrella";
7742
7742
  "umbrella-off": "umbrella-off";
@@ -7912,9 +7912,6 @@ declare const HeaderNavItemSchema: z.ZodUnion<readonly [z.ZodObject<{
7912
7912
  bold: "bold";
7913
7913
  link: "link";
7914
7914
  binary: "binary";
7915
- file: "file";
7916
- map: "map";
7917
- type: "type";
7918
7915
  "a-arrow-down": "a-arrow-down";
7919
7916
  "a-arrow-up": "a-arrow-up";
7920
7917
  "a-large-small": "a-large-small";
@@ -8583,6 +8580,7 @@ declare const HeaderNavItemSchema: z.ZodUnion<readonly [z.ZodObject<{
8583
8580
  fence: "fence";
8584
8581
  "ferris-wheel": "ferris-wheel";
8585
8582
  figma: "figma";
8583
+ file: "file";
8586
8584
  "file-archive": "file-archive";
8587
8585
  "file-audio": "file-audio";
8588
8586
  "file-audio-2": "file-audio-2";
@@ -9006,6 +9004,7 @@ declare const HeaderNavItemSchema: z.ZodUnion<readonly [z.ZodObject<{
9006
9004
  "mail-x": "mail-x";
9007
9005
  mailbox: "mailbox";
9008
9006
  mails: "mails";
9007
+ map: "map";
9009
9008
  "map-minus": "map-minus";
9010
9009
  "map-pin": "map-pin";
9011
9010
  "map-pin-check": "map-pin-check";
@@ -9712,6 +9711,7 @@ declare const HeaderNavItemSchema: z.ZodUnion<readonly [z.ZodObject<{
9712
9711
  "tv-minimal-play": "tv-minimal-play";
9713
9712
  twitch: "twitch";
9714
9713
  twitter: "twitter";
9714
+ type: "type";
9715
9715
  "type-outline": "type-outline";
9716
9716
  umbrella: "umbrella";
9717
9717
  "umbrella-off": "umbrella-off";
@@ -9888,9 +9888,6 @@ export declare const HeaderNavigationSchema: z.ZodArray<z.ZodUnion<readonly [z.Z
9888
9888
  bold: "bold";
9889
9889
  link: "link";
9890
9890
  binary: "binary";
9891
- file: "file";
9892
- map: "map";
9893
- type: "type";
9894
9891
  "a-arrow-down": "a-arrow-down";
9895
9892
  "a-arrow-up": "a-arrow-up";
9896
9893
  "a-large-small": "a-large-small";
@@ -10559,6 +10556,7 @@ export declare const HeaderNavigationSchema: z.ZodArray<z.ZodUnion<readonly [z.Z
10559
10556
  fence: "fence";
10560
10557
  "ferris-wheel": "ferris-wheel";
10561
10558
  figma: "figma";
10559
+ file: "file";
10562
10560
  "file-archive": "file-archive";
10563
10561
  "file-audio": "file-audio";
10564
10562
  "file-audio-2": "file-audio-2";
@@ -10982,6 +10980,7 @@ export declare const HeaderNavigationSchema: z.ZodArray<z.ZodUnion<readonly [z.Z
10982
10980
  "mail-x": "mail-x";
10983
10981
  mailbox: "mailbox";
10984
10982
  mails: "mails";
10983
+ map: "map";
10985
10984
  "map-minus": "map-minus";
10986
10985
  "map-pin": "map-pin";
10987
10986
  "map-pin-check": "map-pin-check";
@@ -11688,6 +11687,7 @@ export declare const HeaderNavigationSchema: z.ZodArray<z.ZodUnion<readonly [z.Z
11688
11687
  "tv-minimal-play": "tv-minimal-play";
11689
11688
  twitch: "twitch";
11690
11689
  twitter: "twitter";
11690
+ type: "type";
11691
11691
  "type-outline": "type-outline";
11692
11692
  umbrella: "umbrella";
11693
11693
  "umbrella-off": "umbrella-off";
@@ -11862,9 +11862,6 @@ export declare const HeaderNavigationSchema: z.ZodArray<z.ZodUnion<readonly [z.Z
11862
11862
  bold: "bold";
11863
11863
  link: "link";
11864
11864
  binary: "binary";
11865
- file: "file";
11866
- map: "map";
11867
- type: "type";
11868
11865
  "a-arrow-down": "a-arrow-down";
11869
11866
  "a-arrow-up": "a-arrow-up";
11870
11867
  "a-large-small": "a-large-small";
@@ -12533,6 +12530,7 @@ export declare const HeaderNavigationSchema: z.ZodArray<z.ZodUnion<readonly [z.Z
12533
12530
  fence: "fence";
12534
12531
  "ferris-wheel": "ferris-wheel";
12535
12532
  figma: "figma";
12533
+ file: "file";
12536
12534
  "file-archive": "file-archive";
12537
12535
  "file-audio": "file-audio";
12538
12536
  "file-audio-2": "file-audio-2";
@@ -12956,6 +12954,7 @@ export declare const HeaderNavigationSchema: z.ZodArray<z.ZodUnion<readonly [z.Z
12956
12954
  "mail-x": "mail-x";
12957
12955
  mailbox: "mailbox";
12958
12956
  mails: "mails";
12957
+ map: "map";
12959
12958
  "map-minus": "map-minus";
12960
12959
  "map-pin": "map-pin";
12961
12960
  "map-pin-check": "map-pin-check";
@@ -13662,6 +13661,7 @@ export declare const HeaderNavigationSchema: z.ZodArray<z.ZodUnion<readonly [z.Z
13662
13661
  "tv-minimal-play": "tv-minimal-play";
13663
13662
  twitch: "twitch";
13664
13663
  twitter: "twitter";
13664
+ type: "type";
13665
13665
  "type-outline": "type-outline";
13666
13666
  umbrella: "umbrella";
13667
13667
  "umbrella-off": "umbrella-off";
@@ -13837,9 +13837,6 @@ export declare const HeaderNavigationSchema: z.ZodArray<z.ZodUnion<readonly [z.Z
13837
13837
  bold: "bold";
13838
13838
  link: "link";
13839
13839
  binary: "binary";
13840
- file: "file";
13841
- map: "map";
13842
- type: "type";
13843
13840
  "a-arrow-down": "a-arrow-down";
13844
13841
  "a-arrow-up": "a-arrow-up";
13845
13842
  "a-large-small": "a-large-small";
@@ -14508,6 +14505,7 @@ export declare const HeaderNavigationSchema: z.ZodArray<z.ZodUnion<readonly [z.Z
14508
14505
  fence: "fence";
14509
14506
  "ferris-wheel": "ferris-wheel";
14510
14507
  figma: "figma";
14508
+ file: "file";
14511
14509
  "file-archive": "file-archive";
14512
14510
  "file-audio": "file-audio";
14513
14511
  "file-audio-2": "file-audio-2";
@@ -14931,6 +14929,7 @@ export declare const HeaderNavigationSchema: z.ZodArray<z.ZodUnion<readonly [z.Z
14931
14929
  "mail-x": "mail-x";
14932
14930
  mailbox: "mailbox";
14933
14931
  mails: "mails";
14932
+ map: "map";
14934
14933
  "map-minus": "map-minus";
14935
14934
  "map-pin": "map-pin";
14936
14935
  "map-pin-check": "map-pin-check";
@@ -15637,6 +15636,7 @@ export declare const HeaderNavigationSchema: z.ZodArray<z.ZodUnion<readonly [z.Z
15637
15636
  "tv-minimal-play": "tv-minimal-play";
15638
15637
  twitch: "twitch";
15639
15638
  twitter: "twitter";
15639
+ type: "type";
15640
15640
  "type-outline": "type-outline";
15641
15641
  umbrella: "umbrella";
15642
15642
  "umbrella-off": "umbrella-off";
@@ -134,6 +134,15 @@ export declare const ApiKeysModuleSchema: z.ZodObject<{
134
134
  enabled: z.ZodOptional<z.ZodBoolean>;
135
135
  path: z.ZodDefault<z.ZodString>;
136
136
  }, z.core.$strip>;
137
+ declare const PlanCatalogItemSchema: z.ZodObject<{
138
+ sku: z.ZodString;
139
+ displayName: z.ZodString;
140
+ priceAmount: z.ZodDefault<z.ZodNumber>;
141
+ priceCurrency: z.ZodOptional<z.ZodString>;
142
+ billingPeriod: z.ZodOptional<z.ZodString>;
143
+ limitsJson: z.ZodOptional<z.ZodString>;
144
+ includedActionKeys: z.ZodOptional<z.ZodArray<z.ZodString>>;
145
+ }, z.core.$strip>;
137
146
  export declare const PlansModuleSchema: z.ZodObject<{
138
147
  enabled: z.ZodOptional<z.ZodBoolean>;
139
148
  path: z.ZodDefault<z.ZodString>;
@@ -148,6 +157,15 @@ export declare const PlansModuleSchema: z.ZodObject<{
148
157
  description: z.ZodOptional<z.ZodString>;
149
158
  }, z.core.$strip>>>;
150
159
  }, z.core.$strip>>;
160
+ items: z.ZodOptional<z.ZodArray<z.ZodObject<{
161
+ sku: z.ZodString;
162
+ displayName: z.ZodString;
163
+ priceAmount: z.ZodDefault<z.ZodNumber>;
164
+ priceCurrency: z.ZodOptional<z.ZodString>;
165
+ billingPeriod: z.ZodOptional<z.ZodString>;
166
+ limitsJson: z.ZodOptional<z.ZodString>;
167
+ includedActionKeys: z.ZodOptional<z.ZodArray<z.ZodString>>;
168
+ }, z.core.$strip>>>;
151
169
  }, z.core.$strip>;
152
170
  export declare const DashboardModuleSchema: z.ZodObject<{
153
171
  enabled: z.ZodOptional<z.ZodBoolean>;
@@ -215,6 +233,15 @@ export declare const UserPanelModuleSchema: z.ZodObject<{
215
233
  description: z.ZodOptional<z.ZodString>;
216
234
  }, z.core.$strip>>>;
217
235
  }, z.core.$strip>>;
236
+ items: z.ZodOptional<z.ZodArray<z.ZodObject<{
237
+ sku: z.ZodString;
238
+ displayName: z.ZodString;
239
+ priceAmount: z.ZodDefault<z.ZodNumber>;
240
+ priceCurrency: z.ZodOptional<z.ZodString>;
241
+ billingPeriod: z.ZodOptional<z.ZodString>;
242
+ limitsJson: z.ZodOptional<z.ZodString>;
243
+ includedActionKeys: z.ZodOptional<z.ZodArray<z.ZodString>>;
244
+ }, z.core.$strip>>>;
218
245
  }, z.core.$strip>>;
219
246
  }, z.core.$strip>;
220
247
  export declare const ModulesSchema: z.ZodOptional<z.ZodObject<{
@@ -320,6 +347,15 @@ export declare const ModulesSchema: z.ZodOptional<z.ZodObject<{
320
347
  description: z.ZodOptional<z.ZodString>;
321
348
  }, z.core.$strip>>>;
322
349
  }, z.core.$strip>>;
350
+ items: z.ZodOptional<z.ZodArray<z.ZodObject<{
351
+ sku: z.ZodString;
352
+ displayName: z.ZodString;
353
+ priceAmount: z.ZodDefault<z.ZodNumber>;
354
+ priceCurrency: z.ZodOptional<z.ZodString>;
355
+ billingPeriod: z.ZodOptional<z.ZodString>;
356
+ limitsJson: z.ZodOptional<z.ZodString>;
357
+ includedActionKeys: z.ZodOptional<z.ZodArray<z.ZodString>>;
358
+ }, z.core.$strip>>>;
323
359
  }, z.core.$strip>>;
324
360
  }, z.core.$strip>>;
325
361
  }, z.core.$strip>>;
@@ -396,6 +432,7 @@ export type ResolvedPlansModule = {
396
432
  enabled: boolean;
397
433
  path: string;
398
434
  content: ResolvedPlansContent;
435
+ items?: z.infer<typeof PlanCatalogItemSchema>[];
399
436
  };
400
437
  export type ResolvedDashboardModule = {
401
438
  enabled: boolean;
@@ -415,3 +452,4 @@ export type ResolvedModulesConfig = {
415
452
  landing: ResolvedLandingModule;
416
453
  userPanel: ResolvedUserPanelModule;
417
454
  };
455
+ export {};
@@ -540,9 +540,6 @@ export declare const ZudokuConfig: z.ZodObject<{
540
540
  bold: "bold";
541
541
  link: "link";
542
542
  binary: "binary";
543
- file: "file";
544
- map: "map";
545
- type: "type";
546
543
  "a-arrow-down": "a-arrow-down";
547
544
  "a-arrow-up": "a-arrow-up";
548
545
  "a-large-small": "a-large-small";
@@ -1211,6 +1208,7 @@ export declare const ZudokuConfig: z.ZodObject<{
1211
1208
  fence: "fence";
1212
1209
  "ferris-wheel": "ferris-wheel";
1213
1210
  figma: "figma";
1211
+ file: "file";
1214
1212
  "file-archive": "file-archive";
1215
1213
  "file-audio": "file-audio";
1216
1214
  "file-audio-2": "file-audio-2";
@@ -1634,6 +1632,7 @@ export declare const ZudokuConfig: z.ZodObject<{
1634
1632
  "mail-x": "mail-x";
1635
1633
  mailbox: "mailbox";
1636
1634
  mails: "mails";
1635
+ map: "map";
1637
1636
  "map-minus": "map-minus";
1638
1637
  "map-pin": "map-pin";
1639
1638
  "map-pin-check": "map-pin-check";
@@ -2340,6 +2339,7 @@ export declare const ZudokuConfig: z.ZodObject<{
2340
2339
  "tv-minimal-play": "tv-minimal-play";
2341
2340
  twitch: "twitch";
2342
2341
  twitter: "twitter";
2342
+ type: "type";
2343
2343
  "type-outline": "type-outline";
2344
2344
  umbrella: "umbrella";
2345
2345
  "umbrella-off": "umbrella-off";
@@ -2514,9 +2514,6 @@ export declare const ZudokuConfig: z.ZodObject<{
2514
2514
  bold: "bold";
2515
2515
  link: "link";
2516
2516
  binary: "binary";
2517
- file: "file";
2518
- map: "map";
2519
- type: "type";
2520
2517
  "a-arrow-down": "a-arrow-down";
2521
2518
  "a-arrow-up": "a-arrow-up";
2522
2519
  "a-large-small": "a-large-small";
@@ -3185,6 +3182,7 @@ export declare const ZudokuConfig: z.ZodObject<{
3185
3182
  fence: "fence";
3186
3183
  "ferris-wheel": "ferris-wheel";
3187
3184
  figma: "figma";
3185
+ file: "file";
3188
3186
  "file-archive": "file-archive";
3189
3187
  "file-audio": "file-audio";
3190
3188
  "file-audio-2": "file-audio-2";
@@ -3608,6 +3606,7 @@ export declare const ZudokuConfig: z.ZodObject<{
3608
3606
  "mail-x": "mail-x";
3609
3607
  mailbox: "mailbox";
3610
3608
  mails: "mails";
3609
+ map: "map";
3611
3610
  "map-minus": "map-minus";
3612
3611
  "map-pin": "map-pin";
3613
3612
  "map-pin-check": "map-pin-check";
@@ -4314,6 +4313,7 @@ export declare const ZudokuConfig: z.ZodObject<{
4314
4313
  "tv-minimal-play": "tv-minimal-play";
4315
4314
  twitch: "twitch";
4316
4315
  twitter: "twitter";
4316
+ type: "type";
4317
4317
  "type-outline": "type-outline";
4318
4318
  umbrella: "umbrella";
4319
4319
  "umbrella-off": "umbrella-off";
@@ -4489,9 +4489,6 @@ export declare const ZudokuConfig: z.ZodObject<{
4489
4489
  bold: "bold";
4490
4490
  link: "link";
4491
4491
  binary: "binary";
4492
- file: "file";
4493
- map: "map";
4494
- type: "type";
4495
4492
  "a-arrow-down": "a-arrow-down";
4496
4493
  "a-arrow-up": "a-arrow-up";
4497
4494
  "a-large-small": "a-large-small";
@@ -5160,6 +5157,7 @@ export declare const ZudokuConfig: z.ZodObject<{
5160
5157
  fence: "fence";
5161
5158
  "ferris-wheel": "ferris-wheel";
5162
5159
  figma: "figma";
5160
+ file: "file";
5163
5161
  "file-archive": "file-archive";
5164
5162
  "file-audio": "file-audio";
5165
5163
  "file-audio-2": "file-audio-2";
@@ -5583,6 +5581,7 @@ export declare const ZudokuConfig: z.ZodObject<{
5583
5581
  "mail-x": "mail-x";
5584
5582
  mailbox: "mailbox";
5585
5583
  mails: "mails";
5584
+ map: "map";
5586
5585
  "map-minus": "map-minus";
5587
5586
  "map-pin": "map-pin";
5588
5587
  "map-pin-check": "map-pin-check";
@@ -6289,6 +6288,7 @@ export declare const ZudokuConfig: z.ZodObject<{
6289
6288
  "tv-minimal-play": "tv-minimal-play";
6290
6289
  twitch: "twitch";
6291
6290
  twitter: "twitter";
6291
+ type: "type";
6292
6292
  "type-outline": "type-outline";
6293
6293
  umbrella: "umbrella";
6294
6294
  "umbrella-off": "umbrella-off";
@@ -6926,6 +6926,15 @@ export declare const ZudokuConfig: z.ZodObject<{
6926
6926
  description: z.ZodOptional<z.ZodString>;
6927
6927
  }, z.core.$strip>>>;
6928
6928
  }, z.core.$strip>>;
6929
+ items: z.ZodOptional<z.ZodArray<z.ZodObject<{
6930
+ sku: z.ZodString;
6931
+ displayName: z.ZodString;
6932
+ priceAmount: z.ZodDefault<z.ZodNumber>;
6933
+ priceCurrency: z.ZodOptional<z.ZodString>;
6934
+ billingPeriod: z.ZodOptional<z.ZodString>;
6935
+ limitsJson: z.ZodOptional<z.ZodString>;
6936
+ includedActionKeys: z.ZodOptional<z.ZodArray<z.ZodString>>;
6937
+ }, z.core.$strip>>>;
6929
6938
  }, z.core.$strip>>;
6930
6939
  }, z.core.$strip>>;
6931
6940
  }, z.core.$strip>>>;
@@ -17,4 +17,5 @@ export { defaultLanguages } from "./lib/shiki.js";
17
17
  export { cn } from "./lib/ui/util.js";
18
18
  export { joinUrl } from "./lib/util/joinUrl.js";
19
19
  export { type ProblemJson, throwIfProblemJson, } from "./lib/util/problemJson.js";
20
- export type { MdxComponentsType } from "./lib/util/MdxComponents.js";
20
+ export { buildApitogoConfig } from "./config/build-apitogo-config.js";
21
+ export { APITOGO_CONFIG_FILENAME, applyEnvOverrides, extractManifest, extractSiteConfig, normalizeApitogoConfig, resolveProjectDisplayName, } from "./config/apitogo-config-core.js";
@@ -0,0 +1,10 @@
1
+ import type { HeaderNavigation } from "../../config/validators/HeaderNavigationSchema.js";
2
+ import type { ZudokuConfig } from "../../config/validators/ZudokuConfig.js";
3
+ export declare const LOGIN_NAV_PATH = "/signin";
4
+ export declare const LOGIN_HEADER_NAV_ITEM: {
5
+ label: string;
6
+ to: string;
7
+ display: "anon";
8
+ };
9
+ export declare function withoutLoginNavigation(navigation: HeaderNavigation): HeaderNavigation;
10
+ export declare function applyAuthenticationHeaderNav<T extends ZudokuConfig>(config: T): T;
@@ -7,6 +7,7 @@ import type { ZudokuConfig } from "../../config/validators/ZudokuConfig.js";
7
7
  import type { AuthenticationPlugin } from "../authentication/authentication.js";
8
8
  import type { MdxComponentsType } from "../util/MdxComponents.js";
9
9
  import type { ApiIdentity, ApitogoEvents, ZudokuContext } from "./ZudokuContext.js";
10
+ export { createPlugin } from "../../config/create-plugin.js";
10
11
  export { runPluginTransformConfig } from "./transform-config.js";
11
12
  export type ApitogoPlugin = CommonPlugin | ProfileMenuPlugin | NavigationPlugin | ApiIdentityPlugin | SearchProviderPlugin | EventConsumerPlugin | AuthenticationPlugin | TransformConfigPlugin;
12
13
  export type { AuthenticationPlugin, RouteObject };
@@ -1,7 +1,7 @@
1
1
  import { type VariantProps } from "class-variance-authority";
2
2
  import * as React from "react";
3
3
  export declare const buttonVariants: (props?: ({
4
- variant?: "link" | "default" | "ghost" | "outline" | "none" | "secondary" | "destructive" | null | undefined;
4
+ variant?: "link" | "ghost" | "default" | "outline" | "none" | "secondary" | "destructive" | null | undefined;
5
5
  size?: "default" | "icon" | "xs" | "sm" | "lg" | "xl" | "icon-xs" | "icon-sm" | "icon-lg" | null | undefined;
6
6
  } & import("class-variance-authority/types").ClassProp) | undefined) => string;
7
7
  export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
@@ -11,7 +11,7 @@ declare function Item({ className, variant, size, asChild, ...props }: React.Com
11
11
  asChild?: boolean;
12
12
  }): import("react/jsx-runtime").JSX.Element;
13
13
  declare const itemMediaVariants: (props?: ({
14
- variant?: "default" | "image" | "icon" | null | undefined;
14
+ variant?: "image" | "default" | "icon" | null | undefined;
15
15
  } & import("class-variance-authority/types").ClassProp) | undefined) => string;
16
16
  declare function ItemMedia({ className, variant, ...props }: React.ComponentPropsWithoutRef<"div"> & VariantProps<typeof itemMediaVariants>): import("react/jsx-runtime").JSX.Element;
17
17
  declare function ItemContent({ className, ...props }: React.ComponentPropsWithoutRef<"div">): import("react/jsx-runtime").JSX.Element;