@uptrademedia/site-kit 1.0.3 → 1.0.5

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 (100) hide show
  1. package/README.md +96 -25
  2. package/dist/SetupWizard-Cki06kB0.d.mts +12 -0
  3. package/dist/SetupWizard-Cki06kB0.d.ts +12 -0
  4. package/dist/analytics/index.d.mts +87 -0
  5. package/dist/analytics/index.d.ts +87 -0
  6. package/dist/blog/index.d.mts +179 -0
  7. package/dist/blog/index.d.ts +179 -0
  8. package/dist/blog/index.js +1131 -17
  9. package/dist/blog/index.js.map +1 -1
  10. package/dist/blog/index.mjs +1121 -17
  11. package/dist/blog/index.mjs.map +1 -1
  12. package/dist/blog/server.d.mts +228 -0
  13. package/dist/blog/server.d.ts +228 -0
  14. package/dist/blog/server.js +685 -0
  15. package/dist/blog/server.js.map +1 -0
  16. package/dist/blog/server.mjs +659 -0
  17. package/dist/blog/server.mjs.map +1 -0
  18. package/dist/{chunk-6EXHT7PS.mjs → chunk-2IHTEKHU.mjs} +5 -3
  19. package/dist/chunk-2IHTEKHU.mjs.map +1 -0
  20. package/dist/{chunk-63JNO4QN.mjs → chunk-DOHML47I.mjs} +2 -2
  21. package/dist/chunk-DOHML47I.mjs.map +1 -0
  22. package/dist/{chunk-YKMCG3DS.js → chunk-GAJLEDRD.js} +5 -3
  23. package/dist/chunk-GAJLEDRD.js.map +1 -0
  24. package/dist/{chunk-PYYEPAHL.js → chunk-K2HWVOEO.js} +2 -2
  25. package/dist/chunk-K2HWVOEO.js.map +1 -0
  26. package/dist/{chunk-JG2K4S2I.js → chunk-O2OHHBUD.js} +9 -9
  27. package/dist/chunk-O2OHHBUD.js.map +1 -0
  28. package/dist/chunk-QD66FTXZ.mjs +278 -0
  29. package/dist/chunk-QD66FTXZ.mjs.map +1 -0
  30. package/dist/chunk-UJQ73OS6.js +282 -0
  31. package/dist/chunk-UJQ73OS6.js.map +1 -0
  32. package/dist/{chunk-P7LGOKGI.mjs → chunk-XQJX252G.mjs} +9 -9
  33. package/dist/chunk-XQJX252G.mjs.map +1 -0
  34. package/dist/commerce/index.d.mts +168 -0
  35. package/dist/commerce/index.d.ts +168 -0
  36. package/dist/commerce/index.js +38 -38
  37. package/dist/commerce/index.mjs +1 -1
  38. package/dist/commerce/server.d.mts +98 -0
  39. package/dist/commerce/server.d.ts +98 -0
  40. package/dist/engage/index.d.mts +27 -0
  41. package/dist/engage/index.d.ts +27 -0
  42. package/dist/forms/index.d.mts +437 -0
  43. package/dist/forms/index.d.ts +437 -0
  44. package/dist/images/index.d.mts +133 -0
  45. package/dist/images/index.d.ts +133 -0
  46. package/dist/images/index.js +8 -8
  47. package/dist/images/index.mjs +1 -1
  48. package/dist/index.d.mts +650 -0
  49. package/dist/index.d.ts +650 -0
  50. package/dist/index.js +108 -95
  51. package/dist/index.js.map +1 -1
  52. package/dist/index.mjs +4 -3
  53. package/dist/index.mjs.map +1 -1
  54. package/dist/redirects/index.d.mts +72 -0
  55. package/dist/redirects/index.d.ts +72 -0
  56. package/dist/reputation/index.d.mts +57 -0
  57. package/dist/reputation/index.d.ts +57 -0
  58. package/dist/reputation/index.js +21 -0
  59. package/dist/reputation/index.js.map +1 -0
  60. package/dist/reputation/index.mjs +4 -0
  61. package/dist/reputation/index.mjs.map +1 -0
  62. package/dist/routing-BWjUF7lp.d.ts +105 -0
  63. package/dist/routing-CgmRi9tD.d.mts +105 -0
  64. package/dist/seo/index.d.mts +273 -0
  65. package/dist/seo/index.d.ts +273 -0
  66. package/dist/seo/server.d.mts +89 -0
  67. package/dist/seo/server.d.ts +89 -0
  68. package/dist/setup/client.d.mts +60 -0
  69. package/dist/setup/client.d.ts +60 -0
  70. package/dist/setup/index.d.mts +5 -0
  71. package/dist/setup/index.d.ts +5 -0
  72. package/dist/setup/index.js +2 -2
  73. package/dist/setup/index.mjs +1 -1
  74. package/dist/setup/server.d.mts +14 -0
  75. package/dist/setup/server.d.ts +14 -0
  76. package/dist/setup/server.js +2 -2
  77. package/dist/setup/server.mjs +1 -1
  78. package/dist/sitemap/index.d.mts +78 -0
  79. package/dist/sitemap/index.d.ts +78 -0
  80. package/dist/types-BN4OwtCO.d.mts +177 -0
  81. package/dist/types-BN4OwtCO.d.ts +177 -0
  82. package/dist/types-BmzutFwy.d.mts +227 -0
  83. package/dist/types-BmzutFwy.d.ts +227 -0
  84. package/dist/types-C0pJGfbH.d.mts +155 -0
  85. package/dist/types-C0pJGfbH.d.ts +155 -0
  86. package/dist/types-DA_Kocle.d.mts +127 -0
  87. package/dist/types-DA_Kocle.d.ts +127 -0
  88. package/dist/types-lFLKKn0G.d.mts +163 -0
  89. package/dist/types-lFLKKn0G.d.ts +163 -0
  90. package/dist/types-nB206tPK.d.mts +309 -0
  91. package/dist/types-nB206tPK.d.ts +309 -0
  92. package/dist/useEventModal-6U1pF3_g.d.mts +209 -0
  93. package/dist/useEventModal-BA8g-1-P.d.ts +209 -0
  94. package/package.json +14 -9
  95. package/dist/chunk-63JNO4QN.mjs.map +0 -1
  96. package/dist/chunk-6EXHT7PS.mjs.map +0 -1
  97. package/dist/chunk-JG2K4S2I.js.map +0 -1
  98. package/dist/chunk-P7LGOKGI.mjs.map +0 -1
  99. package/dist/chunk-PYYEPAHL.js.map +0 -1
  100. package/dist/chunk-YKMCG3DS.js.map +0 -1
@@ -0,0 +1,273 @@
1
+ import { G as GetManagedMetadataOptions, M as ManagedMetadataResult, j as GetABVariantOptions, i as ABTestResult, b as ManagedSchemaProps, d as ManagedFAQProps, f as ManagedInternalLinksProps, h as ManagedContentProps, g as ManagedContentBlock, n as ManagedScriptsProps } from '../types-BmzutFwy.js';
2
+ export { A as ABTest, F as FAQItem, l as GetRedirectOptions, p as GetRobotsOptions, r as GetSitemapEntriesOptions, c as ManagedFAQData, e as ManagedLink, k as ManagedRedirect, m as ManagedScript, R as RedirectResult, o as RobotsDirective, S as SEOPageData, a as SchemaMarkup, q as SitemapEntry, U as UptradeSEOConfig } from '../types-BmzutFwy.js';
3
+ export { g as generateSitemap, a as getRedirect, b as getRobotsDirective, i as isIndexable } from '../routing-BWjUF7lp.js';
4
+ import * as React from 'react';
5
+ import 'next';
6
+
7
+ /**
8
+ * Get managed metadata for a page
9
+ *
10
+ * Use in generateMetadata() to fetch Portal-managed SEO data
11
+ *
12
+ * @example
13
+ * ```tsx
14
+ * export async function generateMetadata({ params }) {
15
+ * return getManagedMetadata({
16
+ * projectId: process.env.UPTRADE_PROJECT_ID!,
17
+ * path: `/services/${params.slug}`,
18
+ * fallback: {
19
+ * title: 'Our Services',
20
+ * description: 'Learn about our services'
21
+ * }
22
+ * })
23
+ * }
24
+ * ```
25
+ */
26
+ declare function getManagedMetadata(options: GetManagedMetadataOptions): Promise<ManagedMetadataResult>;
27
+ /**
28
+ * Get A/B test variant for a field
29
+ *
30
+ * @example
31
+ * ```tsx
32
+ * const variant = await getABVariant({
33
+ * projectId: process.env.UPTRADE_PROJECT_ID!,
34
+ * path: '/pricing',
35
+ * field: 'title',
36
+ * sessionId: cookies().get('session_id')?.value
37
+ * })
38
+ *
39
+ * if (variant) {
40
+ * // Use variant.value instead of default
41
+ * }
42
+ * ```
43
+ */
44
+ declare function getABVariant(options: GetABVariantOptions): Promise<ABTestResult | null>;
45
+ /**
46
+ * Get managed metadata with A/B test support
47
+ *
48
+ * Automatically applies running A/B test variants to metadata
49
+ */
50
+ declare function getManagedMetadataWithAB(options: GetManagedMetadataOptions & {
51
+ sessionId?: string;
52
+ }): Promise<ManagedMetadataResult>;
53
+
54
+ /**
55
+ * ManagedSchema - Server Component that injects JSON-LD schema
56
+ *
57
+ * Fetches schema markup from Portal and renders as script tags
58
+ *
59
+ * @example
60
+ * ```tsx
61
+ * // app/services/[slug]/page.tsx
62
+ * import { ManagedSchema } from '@uptrade/seo'
63
+ *
64
+ * export default async function ServicePage({ params }) {
65
+ * return (
66
+ * <>
67
+ * <ManagedSchema
68
+ * projectId={process.env.UPTRADE_PROJECT_ID!}
69
+ * path={`/services/${params.slug}`}
70
+ * />
71
+ * <main>...</main>
72
+ * </>
73
+ * )
74
+ * }
75
+ * ```
76
+ */
77
+ declare function ManagedSchema({ projectId, path, additionalSchemas, includeTypes, excludeTypes, }: ManagedSchemaProps): Promise<React.ReactElement | null>;
78
+ /**
79
+ * Generate schema for a specific type with managed data
80
+ *
81
+ * Helper to create common schema types
82
+ */
83
+ declare function createSchema(type: string, data: Record<string, unknown>): Record<string, unknown>;
84
+ /**
85
+ * Create BreadcrumbList schema from path
86
+ */
87
+ declare function createBreadcrumbSchema(baseUrl: string, path: string, labels?: Record<string, string>): Record<string, unknown>;
88
+
89
+ /**
90
+ * ManagedFAQ - Server Component that renders FAQ section with schema
91
+ *
92
+ * Fetches FAQ content from Portal and renders with optional schema injection
93
+ *
94
+ * @example
95
+ * ```tsx
96
+ * // app/services/plumbing/page.tsx
97
+ * import { ManagedFAQ } from '@uptrade/seo'
98
+ *
99
+ * export default async function PlumbingPage() {
100
+ * return (
101
+ * <main>
102
+ * <h1>Plumbing Services</h1>
103
+ * <section>
104
+ * <ManagedFAQ
105
+ * projectId={process.env.UPTRADE_PROJECT_ID!}
106
+ * path="/services/plumbing"
107
+ * showTitle
108
+ * includeSchema
109
+ * />
110
+ * </section>
111
+ * </main>
112
+ * )
113
+ * }
114
+ * ```
115
+ */
116
+ declare function ManagedFAQ({ projectId, path, className, renderItem, includeSchema, showTitle, }: ManagedFAQProps): Promise<React.ReactElement | null>;
117
+
118
+ /**
119
+ * ManagedInternalLinks - Server Component for AI-suggested internal links
120
+ *
121
+ * Fetches internal link suggestions from Portal and renders them
122
+ *
123
+ * @example
124
+ * ```tsx
125
+ * // In your article component
126
+ * import { ManagedInternalLinks } from '@uptrade/seo'
127
+ *
128
+ * export default async function BlogPost({ params }) {
129
+ * return (
130
+ * <article>
131
+ * <p>Your content here...</p>
132
+ *
133
+ * <ManagedInternalLinks
134
+ * projectId={process.env.UPTRADE_PROJECT_ID!}
135
+ * path={`/blog/${params.slug}`}
136
+ * position="bottom"
137
+ * limit={5}
138
+ * />
139
+ * </article>
140
+ * )
141
+ * }
142
+ * ```
143
+ */
144
+ declare function ManagedInternalLinks({ projectId, path, position, limit, className, renderLink, }: ManagedInternalLinksProps): Promise<React.ReactElement | null>;
145
+
146
+ /**
147
+ * ManagedContent - Server Component for CMS-controlled content blocks
148
+ *
149
+ * Fetches content sections from Portal and renders them
150
+ * Supports HTML, Markdown, JSON, and React component references
151
+ *
152
+ * @example
153
+ * ```tsx
154
+ * // Hero section managed by Portal
155
+ * import { ManagedContent } from '@uptrade/seo'
156
+ *
157
+ * export default async function ServicePage({ params }) {
158
+ * return (
159
+ * <main>
160
+ * <ManagedContent
161
+ * projectId={process.env.UPTRADE_PROJECT_ID!}
162
+ * path={`/services/${params.slug}`}
163
+ * section="hero"
164
+ * fallback={<DefaultHero />}
165
+ * />
166
+ *
167
+ * <ManagedContent
168
+ * projectId={process.env.UPTRADE_PROJECT_ID!}
169
+ * path={`/services/${params.slug}`}
170
+ * section="features"
171
+ * />
172
+ *
173
+ * <ManagedContent
174
+ * projectId={process.env.UPTRADE_PROJECT_ID!}
175
+ * path={`/services/${params.slug}`}
176
+ * section="cta"
177
+ * />
178
+ * </main>
179
+ * )
180
+ * }
181
+ * ```
182
+ */
183
+ declare function ManagedContent({ projectId, path, section, fallback, className, components, }: ManagedContentProps): Promise<React.ReactElement | null>;
184
+ /**
185
+ * Get content block data without rendering
186
+ *
187
+ * Useful when you need to access the raw data
188
+ */
189
+ declare function getManagedContentData(projectId: string, path: string, section: string): Promise<ManagedContentBlock | null>;
190
+
191
+ /**
192
+ * ManagedScripts - Server Component for injecting tracking/analytics scripts
193
+ *
194
+ * Fetches scripts from Portal and renders them in the appropriate position
195
+ *
196
+ * @example
197
+ * ```tsx
198
+ * // app/layout.tsx
199
+ * import { ManagedScripts } from '@uptrade/seo'
200
+ *
201
+ * export default function RootLayout({ children }) {
202
+ * return (
203
+ * <html>
204
+ * <head>
205
+ * <ManagedScripts
206
+ * projectId={process.env.UPTRADE_PROJECT_ID!}
207
+ * position="head"
208
+ * />
209
+ * </head>
210
+ * <body>
211
+ * <ManagedScripts
212
+ * projectId={process.env.UPTRADE_PROJECT_ID!}
213
+ * position="body-start"
214
+ * />
215
+ * {children}
216
+ * <ManagedScripts
217
+ * projectId={process.env.UPTRADE_PROJECT_ID!}
218
+ * position="body-end"
219
+ * />
220
+ * </body>
221
+ * </html>
222
+ * )
223
+ * }
224
+ * ```
225
+ */
226
+ declare function ManagedScripts({ projectId, position, path, }: ManagedScriptsProps): Promise<React.ReactElement | null>;
227
+ /**
228
+ * NoScript fallback component
229
+ *
230
+ * Use for adding noscript content (like Google Tag Manager noscript)
231
+ */
232
+ declare function ManagedNoScripts({ projectId, path, }: {
233
+ projectId: string;
234
+ path?: string;
235
+ }): Promise<React.ReactElement | null>;
236
+
237
+ /**
238
+ * SitemapSync - Automatically sync sitemap.xml to Portal API
239
+ *
240
+ * This component should be included in your root layout to ensure
241
+ * seo_pages stays in sync with your actual sitemap.
242
+ *
243
+ * The sitemap.xml is the canonical source of truth for what pages exist.
244
+ * Analytics will only track page views for pages that exist in seo_pages.
245
+ *
246
+ * @example
247
+ * ```tsx
248
+ * // app/layout.tsx
249
+ * import { SitemapSync } from '@uptrade/seo'
250
+ *
251
+ * export default function RootLayout({ children }) {
252
+ * return (
253
+ * <html>
254
+ * <body>
255
+ * <SitemapSync />
256
+ * {children}
257
+ * </body>
258
+ * </html>
259
+ * )
260
+ * }
261
+ * ```
262
+ */
263
+ interface SitemapSyncProps {
264
+ /** Custom sitemap URL (defaults to /sitemap.xml) */
265
+ sitemapUrl?: string;
266
+ /** How often to re-sync in minutes (0 = only on mount, default: 60) */
267
+ syncInterval?: number;
268
+ /** Enable debug logging */
269
+ debug?: boolean;
270
+ }
271
+ declare function SitemapSync({ sitemapUrl, syncInterval, debug, }: SitemapSyncProps): null;
272
+
273
+ export { ABTestResult, GetABVariantOptions, GetManagedMetadataOptions, ManagedContent, ManagedContentBlock, ManagedContentProps, ManagedFAQ, ManagedFAQProps, ManagedInternalLinks, ManagedInternalLinksProps, ManagedMetadataResult, ManagedNoScripts, ManagedSchema, ManagedSchemaProps, ManagedScripts, ManagedScriptsProps, SitemapSync, createBreadcrumbSchema, createSchema, ManagedSchema as default, getABVariant, getManagedContentData, getManagedMetadata, getManagedMetadataWithAB };
@@ -0,0 +1,89 @@
1
+ export { g as generateSitemap, r as registerLocalSitemap } from '../routing-CgmRi9tD.mjs';
2
+ export { A as ABTest, i as ABTestResult, F as FAQItem, j as GetABVariantOptions, G as GetManagedMetadataOptions, l as GetRedirectOptions, p as GetRobotsOptions, r as GetSitemapEntriesOptions, g as ManagedContentBlock, h as ManagedContentProps, c as ManagedFAQData, d as ManagedFAQProps, f as ManagedInternalLinksProps, e as ManagedLink, M as ManagedMetadataResult, k as ManagedRedirect, b as ManagedSchemaProps, m as ManagedScript, n as ManagedScriptsProps, R as RedirectResult, o as RobotsDirective, S as SEOPageData, a as SchemaMarkup, q as SitemapEntry, U as UptradeSEOConfig } from '../types-BmzutFwy.mjs';
3
+ import 'next';
4
+
5
+ /**
6
+ * @uptrade/site-kit/seo - API Functions
7
+ *
8
+ * All SEO data fetching goes through Portal API with API key auth.
9
+ * These functions are designed for server-side use (RSC/SSR).
10
+ */
11
+ /**
12
+ * Fetch SEO page data - cached per request
13
+ */
14
+ declare const getSEOPageData: (projectId: string, path: string) => Promise<any>;
15
+ /**
16
+ * Fetch schema markups for a page - cached per request
17
+ */
18
+ declare const getSchemaMarkups: (projectId: string, path: string, options?: {
19
+ includeTypes?: string[];
20
+ excludeTypes?: string[];
21
+ }) => Promise<any[]>;
22
+ /**
23
+ * Fetch FAQ data for a page - cached per request
24
+ */
25
+ declare const getFAQData: (projectId: string, path: string) => Promise<any>;
26
+ /**
27
+ * Fetch internal links for a page - cached per request
28
+ */
29
+ declare const getInternalLinks: (projectId: string, sourcePath: string, options?: {
30
+ position?: string;
31
+ limit?: number;
32
+ }) => Promise<any[]>;
33
+ /**
34
+ * Fetch content block - cached per request
35
+ */
36
+ declare const getContentBlock: (projectId: string, path: string, section: string) => Promise<any>;
37
+ /**
38
+ * Fetch A/B test and determine variant - cached per request
39
+ */
40
+ declare const getABTest: (projectId: string, path: string, field: string) => Promise<any>;
41
+ /**
42
+ * Record A/B test impression
43
+ */
44
+ declare function recordABImpression(testId: string, variant: 'a' | 'b', sessionId?: string): Promise<void>;
45
+ /**
46
+ * Fetch redirect for a path - cached per request
47
+ */
48
+ declare const getRedirectData: (projectId: string, path: string) => Promise<any>;
49
+ /**
50
+ * Fetch managed scripts - cached per request
51
+ */
52
+ declare const getManagedScripts: (projectId: string, position: string, currentPath?: string) => Promise<any[]>;
53
+ /**
54
+ * Fetch robots directive for a page - cached per request
55
+ */
56
+ declare const getRobotsData: (projectId: string, path: string) => Promise<any>;
57
+ /**
58
+ * Fetch sitemap entries - cached per request
59
+ */
60
+ declare const getSitemapEntries: (projectId: string, options?: {
61
+ publishedOnly?: boolean;
62
+ }) => Promise<any[]>;
63
+ /**
64
+ * Register/sync sitemap entries from the client site
65
+ * Call this at build time to populate seo_pages from your sitemap.xml
66
+ *
67
+ * @example
68
+ * ```ts
69
+ * // scripts/register-sitemap.ts (run at build time)
70
+ * import { registerSitemap } from '@uptrade/seo/server'
71
+ *
72
+ * await registerSitemap([
73
+ * { path: '/', priority: 1.0, changefreq: 'daily' },
74
+ * { path: '/about', priority: 0.8, changefreq: 'weekly' },
75
+ * ])
76
+ * ```
77
+ */
78
+ declare function registerSitemap(entries: Array<{
79
+ path: string;
80
+ title?: string;
81
+ priority?: number;
82
+ changefreq?: 'always' | 'hourly' | 'daily' | 'weekly' | 'monthly' | 'yearly' | 'never';
83
+ }>): Promise<{
84
+ success: boolean;
85
+ created: number;
86
+ updated: number;
87
+ }>;
88
+
89
+ export { getABTest, getContentBlock, getFAQData, getInternalLinks, getManagedScripts, getRedirectData, getRobotsData, getSEOPageData, getSchemaMarkups, getSitemapEntries, recordABImpression, registerSitemap };
@@ -0,0 +1,89 @@
1
+ export { g as generateSitemap, r as registerLocalSitemap } from '../routing-BWjUF7lp.js';
2
+ export { A as ABTest, i as ABTestResult, F as FAQItem, j as GetABVariantOptions, G as GetManagedMetadataOptions, l as GetRedirectOptions, p as GetRobotsOptions, r as GetSitemapEntriesOptions, g as ManagedContentBlock, h as ManagedContentProps, c as ManagedFAQData, d as ManagedFAQProps, f as ManagedInternalLinksProps, e as ManagedLink, M as ManagedMetadataResult, k as ManagedRedirect, b as ManagedSchemaProps, m as ManagedScript, n as ManagedScriptsProps, R as RedirectResult, o as RobotsDirective, S as SEOPageData, a as SchemaMarkup, q as SitemapEntry, U as UptradeSEOConfig } from '../types-BmzutFwy.js';
3
+ import 'next';
4
+
5
+ /**
6
+ * @uptrade/site-kit/seo - API Functions
7
+ *
8
+ * All SEO data fetching goes through Portal API with API key auth.
9
+ * These functions are designed for server-side use (RSC/SSR).
10
+ */
11
+ /**
12
+ * Fetch SEO page data - cached per request
13
+ */
14
+ declare const getSEOPageData: (projectId: string, path: string) => Promise<any>;
15
+ /**
16
+ * Fetch schema markups for a page - cached per request
17
+ */
18
+ declare const getSchemaMarkups: (projectId: string, path: string, options?: {
19
+ includeTypes?: string[];
20
+ excludeTypes?: string[];
21
+ }) => Promise<any[]>;
22
+ /**
23
+ * Fetch FAQ data for a page - cached per request
24
+ */
25
+ declare const getFAQData: (projectId: string, path: string) => Promise<any>;
26
+ /**
27
+ * Fetch internal links for a page - cached per request
28
+ */
29
+ declare const getInternalLinks: (projectId: string, sourcePath: string, options?: {
30
+ position?: string;
31
+ limit?: number;
32
+ }) => Promise<any[]>;
33
+ /**
34
+ * Fetch content block - cached per request
35
+ */
36
+ declare const getContentBlock: (projectId: string, path: string, section: string) => Promise<any>;
37
+ /**
38
+ * Fetch A/B test and determine variant - cached per request
39
+ */
40
+ declare const getABTest: (projectId: string, path: string, field: string) => Promise<any>;
41
+ /**
42
+ * Record A/B test impression
43
+ */
44
+ declare function recordABImpression(testId: string, variant: 'a' | 'b', sessionId?: string): Promise<void>;
45
+ /**
46
+ * Fetch redirect for a path - cached per request
47
+ */
48
+ declare const getRedirectData: (projectId: string, path: string) => Promise<any>;
49
+ /**
50
+ * Fetch managed scripts - cached per request
51
+ */
52
+ declare const getManagedScripts: (projectId: string, position: string, currentPath?: string) => Promise<any[]>;
53
+ /**
54
+ * Fetch robots directive for a page - cached per request
55
+ */
56
+ declare const getRobotsData: (projectId: string, path: string) => Promise<any>;
57
+ /**
58
+ * Fetch sitemap entries - cached per request
59
+ */
60
+ declare const getSitemapEntries: (projectId: string, options?: {
61
+ publishedOnly?: boolean;
62
+ }) => Promise<any[]>;
63
+ /**
64
+ * Register/sync sitemap entries from the client site
65
+ * Call this at build time to populate seo_pages from your sitemap.xml
66
+ *
67
+ * @example
68
+ * ```ts
69
+ * // scripts/register-sitemap.ts (run at build time)
70
+ * import { registerSitemap } from '@uptrade/seo/server'
71
+ *
72
+ * await registerSitemap([
73
+ * { path: '/', priority: 1.0, changefreq: 'daily' },
74
+ * { path: '/about', priority: 0.8, changefreq: 'weekly' },
75
+ * ])
76
+ * ```
77
+ */
78
+ declare function registerSitemap(entries: Array<{
79
+ path: string;
80
+ title?: string;
81
+ priority?: number;
82
+ changefreq?: 'always' | 'hourly' | 'daily' | 'weekly' | 'monthly' | 'yearly' | 'never';
83
+ }>): Promise<{
84
+ success: boolean;
85
+ created: number;
86
+ updated: number;
87
+ }>;
88
+
89
+ export { getABTest, getContentBlock, getFAQData, getInternalLinks, getManagedScripts, getRedirectData, getRobotsData, getSEOPageData, getSchemaMarkups, getSitemapEntries, recordABImpression, registerSitemap };
@@ -0,0 +1,60 @@
1
+ export { S as SetupWizard, S as UptradeSetup } from '../SetupWizard-Cki06kB0.mjs';
2
+ import * as react_jsx_runtime from 'react/jsx-runtime';
3
+
4
+ /**
5
+ * Integration Code Generator
6
+ *
7
+ * Generates site-kit integration code snippets based on enabled modules.
8
+ * Used by SetupWizard and can be called standalone.
9
+ */
10
+ interface IntegrationSnippet {
11
+ module: string;
12
+ snippetType: 'install' | 'layout' | 'component' | 'page' | 'api-route' | 'env';
13
+ title: string;
14
+ description?: string;
15
+ filePath?: string;
16
+ code: string;
17
+ language: 'typescript' | 'tsx' | 'bash' | 'env';
18
+ order: number;
19
+ required: boolean;
20
+ }
21
+ interface GeneratorContext {
22
+ projectId: string;
23
+ projectName?: string;
24
+ apiUrl?: string;
25
+ enabledModules: string[];
26
+ brand?: {
27
+ primaryColor?: string;
28
+ secondaryColor?: string;
29
+ businessName?: string;
30
+ };
31
+ }
32
+ /**
33
+ * Generate all integration code snippets for enabled modules
34
+ */
35
+ declare function generateIntegrationCode(context: GeneratorContext): IntegrationSnippet[];
36
+ /**
37
+ * Get snippets grouped by module
38
+ */
39
+ declare function getSnippetsByModule(snippets: IntegrationSnippet[]): Record<string, IntegrationSnippet[]>;
40
+
41
+ /**
42
+ * IntegrationCodeView - Display generated site-kit integration code
43
+ *
44
+ * Shows code snippets grouped by module with copy functionality.
45
+ * Can be used in setup wizards or admin dashboards.
46
+ */
47
+ interface IntegrationCodeViewProps {
48
+ projectId: string;
49
+ enabledModules: string[];
50
+ apiUrl?: string;
51
+ brand?: {
52
+ primaryColor?: string;
53
+ businessName?: string;
54
+ };
55
+ className?: string;
56
+ onCopy?: (code: string, title: string) => void;
57
+ }
58
+ declare function IntegrationCodeView({ projectId, enabledModules, apiUrl, brand, className, onCopy, }: IntegrationCodeViewProps): react_jsx_runtime.JSX.Element;
59
+
60
+ export { type GeneratorContext, IntegrationCodeView, type IntegrationCodeViewProps, type IntegrationSnippet, generateIntegrationCode, getSnippetsByModule };
@@ -0,0 +1,60 @@
1
+ export { S as SetupWizard, S as UptradeSetup } from '../SetupWizard-Cki06kB0.js';
2
+ import * as react_jsx_runtime from 'react/jsx-runtime';
3
+
4
+ /**
5
+ * Integration Code Generator
6
+ *
7
+ * Generates site-kit integration code snippets based on enabled modules.
8
+ * Used by SetupWizard and can be called standalone.
9
+ */
10
+ interface IntegrationSnippet {
11
+ module: string;
12
+ snippetType: 'install' | 'layout' | 'component' | 'page' | 'api-route' | 'env';
13
+ title: string;
14
+ description?: string;
15
+ filePath?: string;
16
+ code: string;
17
+ language: 'typescript' | 'tsx' | 'bash' | 'env';
18
+ order: number;
19
+ required: boolean;
20
+ }
21
+ interface GeneratorContext {
22
+ projectId: string;
23
+ projectName?: string;
24
+ apiUrl?: string;
25
+ enabledModules: string[];
26
+ brand?: {
27
+ primaryColor?: string;
28
+ secondaryColor?: string;
29
+ businessName?: string;
30
+ };
31
+ }
32
+ /**
33
+ * Generate all integration code snippets for enabled modules
34
+ */
35
+ declare function generateIntegrationCode(context: GeneratorContext): IntegrationSnippet[];
36
+ /**
37
+ * Get snippets grouped by module
38
+ */
39
+ declare function getSnippetsByModule(snippets: IntegrationSnippet[]): Record<string, IntegrationSnippet[]>;
40
+
41
+ /**
42
+ * IntegrationCodeView - Display generated site-kit integration code
43
+ *
44
+ * Shows code snippets grouped by module with copy functionality.
45
+ * Can be used in setup wizards or admin dashboards.
46
+ */
47
+ interface IntegrationCodeViewProps {
48
+ projectId: string;
49
+ enabledModules: string[];
50
+ apiUrl?: string;
51
+ brand?: {
52
+ primaryColor?: string;
53
+ businessName?: string;
54
+ };
55
+ className?: string;
56
+ onCopy?: (code: string, title: string) => void;
57
+ }
58
+ declare function IntegrationCodeView({ projectId, enabledModules, apiUrl, brand, className, onCopy, }: IntegrationCodeViewProps): react_jsx_runtime.JSX.Element;
59
+
60
+ export { type GeneratorContext, IntegrationCodeView, type IntegrationCodeViewProps, type IntegrationSnippet, generateIntegrationCode, getSnippetsByModule };
@@ -0,0 +1,5 @@
1
+ export { S as SetupWizard, S as UptradeSetup } from '../SetupWizard-Cki06kB0.mjs';
2
+ export { handleRequest } from './server.mjs';
3
+ export { GeneratorContext, IntegrationCodeView, IntegrationCodeViewProps, IntegrationSnippet, generateIntegrationCode, getSnippetsByModule } from './client.mjs';
4
+ import 'react/jsx-runtime';
5
+ import 'next/server';
@@ -0,0 +1,5 @@
1
+ export { S as SetupWizard, S as UptradeSetup } from '../SetupWizard-Cki06kB0.js';
2
+ export { handleRequest } from './server.js';
3
+ export { GeneratorContext, IntegrationCodeView, IntegrationCodeViewProps, IntegrationSnippet, generateIntegrationCode, getSnippetsByModule } from './client.js';
4
+ import 'react/jsx-runtime';
5
+ import 'next/server';
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  var chunkDRFTRTKV_js = require('../chunk-DRFTRTKV.js');
4
- var chunkYKMCG3DS_js = require('../chunk-YKMCG3DS.js');
4
+ var chunkGAJLEDRD_js = require('../chunk-GAJLEDRD.js');
5
5
  var chunk5R4R3WDP_js = require('../chunk-5R4R3WDP.js');
6
6
  require('../chunk-EQCVQC35.js');
7
7
 
@@ -21,7 +21,7 @@ Object.defineProperty(exports, "getSnippetsByModule", {
21
21
  });
22
22
  Object.defineProperty(exports, "handleRequest", {
23
23
  enumerable: true,
24
- get: function () { return chunkYKMCG3DS_js.handleRequest; }
24
+ get: function () { return chunkGAJLEDRD_js.handleRequest; }
25
25
  });
26
26
  Object.defineProperty(exports, "SetupWizard", {
27
27
  enumerable: true,
@@ -1,5 +1,5 @@
1
1
  export { IntegrationCodeView, generateIntegrationCode, getSnippetsByModule } from '../chunk-EL5QTAA3.mjs';
2
- export { handleRequest } from '../chunk-6EXHT7PS.mjs';
2
+ export { handleRequest } from '../chunk-2IHTEKHU.mjs';
3
3
  export { SetupWizard, SetupWizard as UptradeSetup } from '../chunk-XFRPT5ZX.mjs';
4
4
  import '../chunk-NYKRE2FL.mjs';
5
5
  //# sourceMappingURL=index.mjs.map
@@ -0,0 +1,14 @@
1
+ import { NextRequest, NextResponse } from 'next/server';
2
+
3
+ /**
4
+ * Setup Wizard API Handlers
5
+ *
6
+ * These are Next.js API route handlers that the SetupWizard component calls.
7
+ * They run on the server and have access to fs for code generation.
8
+ *
9
+ * Usage: Copy these to your app/_uptrade/api/ folder
10
+ */
11
+
12
+ declare function handleRequest(req: NextRequest, route: string): Promise<NextResponse>;
13
+
14
+ export { handleRequest };
@@ -0,0 +1,14 @@
1
+ import { NextRequest, NextResponse } from 'next/server';
2
+
3
+ /**
4
+ * Setup Wizard API Handlers
5
+ *
6
+ * These are Next.js API route handlers that the SetupWizard component calls.
7
+ * They run on the server and have access to fs for code generation.
8
+ *
9
+ * Usage: Copy these to your app/_uptrade/api/ folder
10
+ */
11
+
12
+ declare function handleRequest(req: NextRequest, route: string): Promise<NextResponse>;
13
+
14
+ export { handleRequest };
@@ -1,13 +1,13 @@
1
1
  'use strict';
2
2
 
3
- var chunkYKMCG3DS_js = require('../chunk-YKMCG3DS.js');
3
+ var chunkGAJLEDRD_js = require('../chunk-GAJLEDRD.js');
4
4
  require('../chunk-EQCVQC35.js');
5
5
 
6
6
 
7
7
 
8
8
  Object.defineProperty(exports, "handleRequest", {
9
9
  enumerable: true,
10
- get: function () { return chunkYKMCG3DS_js.handleRequest; }
10
+ get: function () { return chunkGAJLEDRD_js.handleRequest; }
11
11
  });
12
12
  //# sourceMappingURL=server.js.map
13
13
  //# sourceMappingURL=server.js.map
@@ -1,4 +1,4 @@
1
- export { handleRequest } from '../chunk-6EXHT7PS.mjs';
1
+ export { handleRequest } from '../chunk-2IHTEKHU.mjs';
2
2
  import '../chunk-NYKRE2FL.mjs';
3
3
  //# sourceMappingURL=server.mjs.map
4
4
  //# sourceMappingURL=server.mjs.map