@wix/auto_sdk_dynamic-page-router_pages 1.0.0

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 (52) hide show
  1. package/build/cjs/index.d.ts +57 -0
  2. package/build/cjs/index.js +517 -0
  3. package/build/cjs/index.js.map +1 -0
  4. package/build/cjs/index.typings.d.ts +487 -0
  5. package/build/cjs/index.typings.js +472 -0
  6. package/build/cjs/index.typings.js.map +1 -0
  7. package/build/cjs/meta.d.ts +345 -0
  8. package/build/cjs/meta.js +387 -0
  9. package/build/cjs/meta.js.map +1 -0
  10. package/build/cjs/schemas.d.ts +219 -0
  11. package/build/cjs/schemas.js +493 -0
  12. package/build/cjs/schemas.js.map +1 -0
  13. package/build/es/index.d.mts +57 -0
  14. package/build/es/index.mjs +489 -0
  15. package/build/es/index.mjs.map +1 -0
  16. package/build/es/index.typings.d.mts +487 -0
  17. package/build/es/index.typings.mjs +444 -0
  18. package/build/es/index.typings.mjs.map +1 -0
  19. package/build/es/meta.d.mts +345 -0
  20. package/build/es/meta.mjs +356 -0
  21. package/build/es/meta.mjs.map +1 -0
  22. package/build/es/package.json +3 -0
  23. package/build/es/schemas.d.mts +219 -0
  24. package/build/es/schemas.mjs +447 -0
  25. package/build/es/schemas.mjs.map +1 -0
  26. package/build/internal/cjs/index.d.ts +57 -0
  27. package/build/internal/cjs/index.js +517 -0
  28. package/build/internal/cjs/index.js.map +1 -0
  29. package/build/internal/cjs/index.typings.d.ts +487 -0
  30. package/build/internal/cjs/index.typings.js +472 -0
  31. package/build/internal/cjs/index.typings.js.map +1 -0
  32. package/build/internal/cjs/meta.d.ts +345 -0
  33. package/build/internal/cjs/meta.js +387 -0
  34. package/build/internal/cjs/meta.js.map +1 -0
  35. package/build/internal/cjs/schemas.d.ts +219 -0
  36. package/build/internal/cjs/schemas.js +493 -0
  37. package/build/internal/cjs/schemas.js.map +1 -0
  38. package/build/internal/es/index.d.mts +57 -0
  39. package/build/internal/es/index.mjs +489 -0
  40. package/build/internal/es/index.mjs.map +1 -0
  41. package/build/internal/es/index.typings.d.mts +487 -0
  42. package/build/internal/es/index.typings.mjs +444 -0
  43. package/build/internal/es/index.typings.mjs.map +1 -0
  44. package/build/internal/es/meta.d.mts +345 -0
  45. package/build/internal/es/meta.mjs +356 -0
  46. package/build/internal/es/meta.mjs.map +1 -0
  47. package/build/internal/es/schemas.d.mts +219 -0
  48. package/build/internal/es/schemas.mjs +447 -0
  49. package/build/internal/es/schemas.mjs.map +1 -0
  50. package/meta/package.json +3 -0
  51. package/package.json +61 -0
  52. package/schemas/package.json +3 -0
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../index.ts","../../src/dynamic-page-router-v1-page-pages.universal.ts","../../src/dynamic-page-router-v1-page-pages.http.ts","../../src/dynamic-page-router-v1-page-pages.public.ts","../../src/dynamic-page-router-v1-page-pages.context.ts"],"sourcesContent":["export * from './src/dynamic-page-router-v1-page-pages.context.js';\n","import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';\nimport {\n renameKeysFromSDKRequestToRESTRequest,\n renameKeysFromRESTResponseToSDKResponse,\n} from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport * as ambassadorWixDynamicPageRouterV1Page from './dynamic-page-router-v1-page-pages.http.js';\n\n/** Stub entity, not used at the moment. */\nexport interface Page {\n /**\n * Page ID.\n * @format GUID\n * @readonly\n */\n _id?: string | null;\n}\n\nexport interface GetRouterSitemapCountRequest {\n /**\n * Router prefix that identifies the page type or origin. For TPA (Third-Party Application) pages, this contains the TPA page ID.\n * @maxLength 2048\n */\n routerPrefix?: string;\n /** Config containing request patterns, e.g. '/{title}' */\n config?: Config;\n /** Map of page roles containing page ID and title of each role */\n pageRoles?: Record<string, PageRole>;\n /**\n * Optional page name to filter patterns by matching page role title\n * @maxLength 200\n */\n pageName?: string;\n /**\n * Query param mapped to body, editor/site\n * @maxLength 200\n */\n viewMode?: string;\n /**\n * Query param mapped to body, unique for Wix code app\n * @format GUID\n */\n gridAppId?: string | null;\n}\n\nexport interface Config {\n /** Map of URL patterns to their configurations. The key is the URL pattern (e.g., `/{title}`) and the value contains the pattern configuration. */\n patterns?: Record<string, Pattern>;\n /** Maps rule ID → PageRule (filter + variant page role). */\n rules?: Record<string, PageRule>;\n /** Maps original page role ID → ordered rule IDs. First matching rule wins. */\n roleVariations?: Record<string, any[]>;\n}\n\nexport interface Pattern {\n /**\n * Page role identifier that links this pattern to a specific page template.\n * @maxLength 200\n */\n pageRole?: string;\n /**\n * Title pattern with field interpolation (e.g., \"{title}, {author} - {category}\").\n * Increased to 50000 to support complex title templates with many interpolated fields and long text content.\n * @maxLength 50000\n */\n title?: string;\n /** Configuration specifying which collection to query and any filters to apply. */\n config?: PatternConfig;\n /** SEO meta tags to be included in the page head. Keys are meta tag names, values are the content. */\n seoMetaTags?: Record<string, string>;\n}\n\nexport interface PatternConfig {\n /**\n * Name of the Wix Data collection to query for dynamic content.\n * @maxLength 200\n */\n collection?: string;\n /** Filter criteria to apply when querying the collection. Uses MongoDB-style query syntax to limit which items generate routes. */\n filter?: Record<string, any> | null;\n /** Indicates if URLs in sitemap should be turned to lowercase. Defaults to true if not set. */\n lowercase?: boolean | null;\n /**\n * The field id that gets added to DataCollection and DataItems.\n * Indicates that page links is a slug based and items should be retrieved by slug fields present in the pattern.\n * @maxLength 1000\n */\n pageLinkId?: string | null;\n /**\n * Sort specification for query results. Each struct contains field name and direction (asc/desc).\n * @maxSize 32\n */\n sort?: Record<string, any>[] | null;\n /** Page size for pagination. */\n pageSize?: number | null;\n /** SEO v2 flag. */\n seoV2?: boolean | null;\n /** Cursor-based pagination flag. */\n cursor?: boolean | null;\n /**\n * Dataset includes array for passthrough config.\n * @maxSize 100\n * @maxLength 1000\n */\n includes?: string[];\n}\n\n/** A variant rule: if filter matches the fetched data item, use page_role instead of the original. */\nexport interface PageRule {\n /**\n * Variant page role ID to return when this rule matches.\n * @maxLength 200\n */\n pageRole?: string;\n /** Wix Data filter evaluated against the fetched item. */\n filter?: Record<string, any> | null;\n /**\n * Human-readable rule name (for debugging/logging).\n * @maxLength 200\n */\n name?: string | null;\n}\n\nexport interface PageRole {\n /**\n * Page role ID that uniquely identifies the page template.\n * @maxLength 200\n */\n _id?: string;\n /**\n * Human-readable title for the page role.\n * @maxLength 200\n */\n title?: string;\n}\n\nexport interface GetRouterSitemapCountResponse {\n /** List of count results grouped by page name. */\n result?: RouterCountItem[];\n}\n\nexport interface RouterCountItem {\n /**\n * Name of the dynamic page template.\n * @maxLength 200\n */\n pageName?: string;\n /** Number of inner routes for the given page. Capped at 1,000 for performance. */\n count?: number;\n}\n\nexport interface GetRouterSitemapRequest {\n /**\n * Full URL to the inner route\n * @maxLength 2048\n */\n fullUrl?: string;\n /**\n * Router prefix (TPA page ID for TPA pages)\n * @maxLength 2048\n */\n routerPrefix?: string;\n /**\n * Optional page name to filter patterns by matching page role title\n * @maxLength 2048\n */\n pageName?: string;\n /** Config containing request patterns, e.g. '/{title}' */\n config?: Config;\n /** Map of page roles containing page ID and title of each role */\n pageRoles?: Record<string, PageRole>;\n /**\n * Query param mapped to body, editor/site\n * @maxLength 200\n */\n viewMode?: string;\n /**\n * Query param mapped to body, unique for Wix code app\n * @format GUID\n */\n gridAppId?: string | null;\n}\n\nexport interface GetRouterSitemapResponse {\n /** List of sitemap entries containing URLs and metadata for dynamic pages. */\n result?: RouterRouteItem[];\n}\n\nexport interface RouterRouteItem {\n /**\n * URL to inner route relative to current domain\n * @maxLength 500\n */\n url?: string;\n /**\n * Dynamic page name\n * @maxLength 200\n */\n pageName?: string;\n /**\n * Title of the specific route, typically derived from collection data.\n * @maxLength 200\n */\n title?: string;\n /**\n * Change frequency for sitemap SEO purposes (e.g., `daily`, `weekly`, `monthly`).\n * @maxLength 100\n */\n changeFrequency?: string;\n /**\n * Last modified timestamp in ISO 8601 format.\n * @maxLength 100\n */\n lastModified?: string | null;\n /** Priority for sitemap SEO purposes (0.0 to 1.0). */\n priority?: number;\n}\n\nexport interface GetRouterPagesRequest {\n /**\n * Complete URL to the inner route. Used for context-aware processing and as a base for relative URL resolution.\n * Increased to 8192 to accommodate URLs with extensive query parameters (tracking, analytics, UTM params, etc.)\n * @maxLength 8192\n */\n fullUrl?: string;\n /**\n * Router prefix (TPA page ID for TPA pages)\n * @maxLength 2048\n */\n routerPrefix?: string;\n /**\n * Inner route suffix containing the dynamic part of the URL pattern. For example, `/{title}` or `/category/{category}/post/{slug}`.\n * Increased to 8192 to match full_url capacity for complex dynamic routes\n * @maxLength 8192\n */\n routerSuffix?: string;\n /** Additional request information including form factor (desktop/mobile) for device-appropriate routing. */\n requestInfo?: RequestInfo;\n /** Config containing request patterns, e.g. '/{title}' */\n config?: Config;\n /** Map of page roles containing page ID and title of each role */\n pageRoles?: Record<string, PageRole>;\n /**\n * Query param mapped to body, editor/site\n * @maxLength 200\n */\n viewMode?: string;\n /**\n * Query param mapped to body, unique for Wix code app\n * @format GUID\n */\n gridAppId?: string | null;\n}\n\nexport interface RequestInfo {\n /**\n * Device form factor, typically `desktop` or `mobile`. Used to serve device-appropriate page layouts.\n * @maxLength 200\n */\n formFactor?: string;\n}\n\nexport interface GetRouterPagesResponse {\n /** Page resolution result containing status, data, and metadata. */\n result?: RouterPagesResult;\n}\n\nexport interface RouterPagesResult {\n /** HTTP status code of the page (200, 302, 404) */\n status?: number;\n /**\n * Name of the dynamic page template that should be used for rendering.\n * @maxLength 200\n */\n page?: string;\n /** Application router data available only to internal Wix apps. Contains system-level and administrative information. */\n data?: Record<string, any> | null;\n /** SEO and metadata information for the page head section. */\n head?: RouterPageHead;\n /**\n * Error message when status indicates an error condition.\n * @maxLength 500\n */\n message?: string;\n /**\n * Target URL for redirects when status is 302.\n * @maxLength 2048\n */\n redirectUrl?: string;\n}\n\nexport interface RouterPageHead {\n /**\n * Page title for SEO and browser display.\n * @maxLength 200\n */\n title?: string;\n /** Meta tags for SEO optimization. Keys are meta tag names, values are the content. */\n metaTags?: Record<string, string>;\n /**\n * Page description for SEO. Extracted from seoMetaTags if present.\n * @maxLength 5000\n */\n description?: string;\n /**\n * Keywords for SEO. Extracted from seoMetaTags if present.\n * @maxLength 5000\n */\n keywords?: string;\n /**\n * NoIndex directive for search engines. Extracted from seoMetaTags if present.\n * @maxLength 500\n */\n noIndex?: string;\n}\n\n/** Viewer GET request: .r parameter containing {urlParams, body} envelope. */\nexport interface GetRouterPagesCachedRequest {\n /** URL parameters from the viewer's query string. */\n urlParams?: GetRouterPagesCachedUrlParams;\n /** Request body from the viewer's envelope. */\n body?: GetRouterPagesRequest;\n}\n\nexport interface GetRouterPagesCachedUrlParams {\n /**\n * Unique for Wix code app\n * @format GUID\n */\n gridAppId?: string | null;\n /**\n * Editor/site\n * @maxLength 200\n */\n viewMode?: string;\n}\n\nexport interface GetDraftPreviewTokenRequest {\n /**\n * Wix Data collection ID to get a draft preview key for.\n * @maxLength 256\n */\n collectionId?: string;\n}\n\nexport interface GetDraftPreviewTokenResponse {\n /**\n * Draft preview token.\n * @maxLength 10000\n */\n token?: string;\n}\n\n/**\n * Returns the count of sitemap entries grouped by page name.\n *\n * Use this endpoint for analytics dashboards, capacity planning, and understanding\n * the scale of dynamic content without retrieving actual URLs. Results are capped\n * at 1,000 items per pattern for performance.\n * @public\n * @documentationMaturity preview\n * @permissionId dynamic_page_router:v1:page:get_router_sitemap_count\n * @applicableIdentity APP\n * @fqn wix.dynamic_page_router.v1.DynamicPageRouter.GetRouterSitemapCount\n */\nexport async function getRouterSitemapCount(\n options?: GetRouterSitemapCountOptions\n): Promise<\n NonNullablePaths<\n GetRouterSitemapCountResponse,\n `result` | `result.${number}.pageName` | `result.${number}.count`,\n 4\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n routerPrefix: options?.routerPrefix,\n config: options?.config,\n pageRoles: options?.pageRoles,\n pageName: options?.pageName,\n viewMode: options?.viewMode,\n gridAppId: options?.gridAppId,\n });\n\n const reqOpts =\n ambassadorWixDynamicPageRouterV1Page.getRouterSitemapCount(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n routerPrefix: '$[0].routerPrefix',\n config: '$[0].config',\n pageRoles: '$[0].pageRoles',\n pageName: '$[0].pageName',\n viewMode: '$[0].viewMode',\n gridAppId: '$[0].gridAppId',\n },\n singleArgumentUnchanged: false,\n },\n ['options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface GetRouterSitemapCountOptions {\n /**\n * Router prefix that identifies the page type or origin. For TPA (Third-Party Application) pages, this contains the TPA page ID.\n * @maxLength 2048\n */\n routerPrefix?: string;\n /** Config containing request patterns, e.g. '/{title}' */\n config?: Config;\n /** Map of page roles containing page ID and title of each role */\n pageRoles?: Record<string, PageRole>;\n /**\n * Optional page name to filter patterns by matching page role title\n * @maxLength 200\n */\n pageName?: string;\n /**\n * Query param mapped to body, editor/site\n * @maxLength 200\n */\n viewMode?: string;\n /**\n * Query param mapped to body, unique for Wix code app\n * @format GUID\n */\n gridAppId?: string | null;\n}\n\n/**\n * Returns sitemap entries containing URLs, page names, and page titles.\n *\n * Use this endpoint to generate XML sitemaps for search engines, build navigation\n * menus, or provide URL listings to external systems. The `fullUrl` parameter\n * provides context for scoping sitemap generation to specific domains or URL hierarchies.\n * @public\n * @documentationMaturity preview\n * @permissionId dynamic_page_router:v1:page:get_router_sitemap\n * @applicableIdentity APP\n * @fqn wix.dynamic_page_router.v1.DynamicPageRouter.GetRouterSitemap\n */\nexport async function getRouterSitemap(\n options?: GetRouterSitemapOptions\n): Promise<\n NonNullablePaths<\n GetRouterSitemapResponse,\n | `result`\n | `result.${number}.url`\n | `result.${number}.pageName`\n | `result.${number}.title`\n | `result.${number}.changeFrequency`\n | `result.${number}.priority`,\n 4\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n fullUrl: options?.fullUrl,\n routerPrefix: options?.routerPrefix,\n pageName: options?.pageName,\n config: options?.config,\n pageRoles: options?.pageRoles,\n viewMode: options?.viewMode,\n gridAppId: options?.gridAppId,\n });\n\n const reqOpts =\n ambassadorWixDynamicPageRouterV1Page.getRouterSitemap(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n fullUrl: '$[0].fullUrl',\n routerPrefix: '$[0].routerPrefix',\n pageName: '$[0].pageName',\n config: '$[0].config',\n pageRoles: '$[0].pageRoles',\n viewMode: '$[0].viewMode',\n gridAppId: '$[0].gridAppId',\n },\n singleArgumentUnchanged: false,\n },\n ['options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface GetRouterSitemapOptions {\n /**\n * Full URL to the inner route\n * @maxLength 2048\n */\n fullUrl?: string;\n /**\n * Router prefix (TPA page ID for TPA pages)\n * @maxLength 2048\n */\n routerPrefix?: string;\n /**\n * Optional page name to filter patterns by matching page role title\n * @maxLength 2048\n */\n pageName?: string;\n /** Config containing request patterns, e.g. '/{title}' */\n config?: Config;\n /** Map of page roles containing page ID and title of each role */\n pageRoles?: Record<string, PageRole>;\n /**\n * Query param mapped to body, editor/site\n * @maxLength 200\n */\n viewMode?: string;\n /**\n * Query param mapped to body, unique for Wix code app\n * @format GUID\n */\n gridAppId?: string | null;\n}\n\n/**\n * Returns comprehensive page information for a specific route.\n * Called by the editor via POST with flat body + query params.\n * @public\n * @documentationMaturity preview\n * @permissionId dynamic_page_router:v1:page:get_router_pages\n * @applicableIdentity APP\n * @fqn wix.dynamic_page_router.v1.DynamicPageRouter.GetRouterPages\n */\nexport async function getRouterPages(\n options?: GetRouterPagesOptions\n): Promise<\n NonNullablePaths<\n GetRouterPagesResponse,\n | `result.status`\n | `result.page`\n | `result.head.title`\n | `result.head.description`\n | `result.head.keywords`\n | `result.head.noIndex`\n | `result.message`\n | `result.redirectUrl`,\n 4\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n fullUrl: options?.fullUrl,\n routerPrefix: options?.routerPrefix,\n routerSuffix: options?.routerSuffix,\n requestInfo: options?.requestInfo,\n config: options?.config,\n pageRoles: options?.pageRoles,\n viewMode: options?.viewMode,\n gridAppId: options?.gridAppId,\n });\n\n const reqOpts = ambassadorWixDynamicPageRouterV1Page.getRouterPages(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n fullUrl: '$[0].fullUrl',\n routerPrefix: '$[0].routerPrefix',\n routerSuffix: '$[0].routerSuffix',\n requestInfo: '$[0].requestInfo',\n config: '$[0].config',\n pageRoles: '$[0].pageRoles',\n viewMode: '$[0].viewMode',\n gridAppId: '$[0].gridAppId',\n },\n singleArgumentUnchanged: false,\n },\n ['options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface GetRouterPagesOptions {\n /**\n * Complete URL to the inner route. Used for context-aware processing and as a base for relative URL resolution.\n * Increased to 8192 to accommodate URLs with extensive query parameters (tracking, analytics, UTM params, etc.)\n * @maxLength 8192\n */\n fullUrl?: string;\n /**\n * Router prefix (TPA page ID for TPA pages)\n * @maxLength 2048\n */\n routerPrefix?: string;\n /**\n * Inner route suffix containing the dynamic part of the URL pattern. For example, `/{title}` or `/category/{category}/post/{slug}`.\n * Increased to 8192 to match full_url capacity for complex dynamic routes\n * @maxLength 8192\n */\n routerSuffix?: string;\n /** Additional request information including form factor (desktop/mobile) for device-appropriate routing. */\n requestInfo?: RequestInfo;\n /** Config containing request patterns, e.g. '/{title}' */\n config?: Config;\n /** Map of page roles containing page ID and title of each role */\n pageRoles?: Record<string, PageRole>;\n /**\n * Query param mapped to body, editor/site\n * @maxLength 200\n */\n viewMode?: string;\n /**\n * Query param mapped to body, unique for Wix code app\n * @format GUID\n */\n gridAppId?: string | null;\n}\n\n/**\n * Returns comprehensive page information for a specific route (cacheable).\n * Called by the viewer via GET with .r parameter containing {urlParams, body} envelope.\n * @public\n * @documentationMaturity preview\n * @permissionId dynamic_page_router:v1:page:get_router_pages\n * @applicableIdentity APP\n * @fqn wix.dynamic_page_router.v1.DynamicPageRouter.GetRouterPagesCached\n */\nexport async function getRouterPagesCached(\n options?: GetRouterPagesCachedOptions\n): Promise<\n NonNullablePaths<\n GetRouterPagesResponse,\n | `result.status`\n | `result.page`\n | `result.head.title`\n | `result.head.description`\n | `result.head.keywords`\n | `result.head.noIndex`\n | `result.message`\n | `result.redirectUrl`,\n 4\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n urlParams: options?.urlParams,\n body: options?.body,\n });\n\n const reqOpts =\n ambassadorWixDynamicPageRouterV1Page.getRouterPagesCached(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n urlParams: '$[0].urlParams',\n body: '$[0].body',\n },\n singleArgumentUnchanged: false,\n },\n ['options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface GetRouterPagesCachedOptions {\n /** URL parameters from the viewer's query string. */\n urlParams?: GetRouterPagesCachedUrlParams;\n /** Request body from the viewer's envelope. */\n body?: GetRouterPagesRequest;\n}\n\n/**\n * Returns the preview token used for draft collection previews.\n * @public\n * @documentationMaturity preview\n * @permissionId dynamic_page_router:v1:page:get_draft_preview_token\n * @fqn wix.dynamic_page_router.v1.DynamicPageRouter.GetDraftPreviewToken\n */\nexport async function getDraftPreviewToken(\n options?: GetDraftPreviewTokenOptions\n): Promise<NonNullablePaths<GetDraftPreviewTokenResponse, `token`, 2>> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n collectionId: options?.collectionId,\n });\n\n const reqOpts =\n ambassadorWixDynamicPageRouterV1Page.getDraftPreviewToken(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { collectionId: '$[0].collectionId' },\n singleArgumentUnchanged: false,\n },\n ['options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface GetDraftPreviewTokenOptions {\n /**\n * Wix Data collection ID to get a draft preview key for.\n * @maxLength 256\n */\n collectionId?: string;\n}\n","import { toURLSearchParams } from '@wix/sdk-runtime/rest-modules';\nimport { transformRESTFloatToSDKFloat } from '@wix/sdk-runtime/transformations/float';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nfunction resolveWixDynamicPageRouterV1DynamicPageRouterUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'editor._base_domain_': [\n {\n srcPath: '/_api/dynamic-pages-router',\n destPath: '',\n },\n {\n srcPath: '/_api/dynamic-page-router',\n destPath: '',\n },\n ],\n 'blocks._base_domain_': [\n {\n srcPath: '/_api/dynamic-pages-router',\n destPath: '',\n },\n {\n srcPath: '/_api/dynamic-page-router',\n destPath: '',\n },\n ],\n 'create.editorx': [\n {\n srcPath: '/_api/dynamic-pages-router',\n destPath: '',\n },\n {\n srcPath: '/_api/dynamic-page-router',\n destPath: '',\n },\n ],\n _: [\n {\n srcPath: '/_api/dynamic-pages-router',\n destPath: '',\n },\n {\n srcPath: '/_api/dynamic-page-router',\n destPath: '',\n },\n ],\n 'dev._base_domain_': [\n {\n srcPath: '/_api/dynamic-pages-router',\n destPath: '',\n },\n {\n srcPath: '/_api/dynamic-page-router',\n destPath: '',\n },\n ],\n 'api._api_base_domain_': [\n {\n srcPath: '/dynamic-pages-router',\n destPath: '',\n },\n {\n srcPath: '/dynamic-page-router',\n destPath: '',\n },\n ],\n 'www._base_domain_': [\n {\n srcPath: '/_api/dynamic-pages-router',\n destPath: '',\n },\n {\n srcPath: '/_api/dynamic-page-router',\n destPath: '',\n },\n ],\n 'bo._base_domain_': [\n {\n srcPath: '/_api/dynamic-pages-router',\n destPath: '',\n },\n {\n srcPath: '/_api/dynamic-page-router',\n destPath: '',\n },\n ],\n 'wixbo.ai': [\n {\n srcPath: '/_api/dynamic-pages-router',\n destPath: '',\n },\n {\n srcPath: '/_api/dynamic-page-router',\n destPath: '',\n },\n ],\n 'wix-bo.com': [\n {\n srcPath: '/_api/dynamic-pages-router',\n destPath: '',\n },\n {\n srcPath: '/_api/dynamic-page-router',\n destPath: '',\n },\n ],\n 'manage._base_domain_': [\n {\n srcPath: '/_api/dynamic-page-router',\n destPath: '',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/dynamic-page-router/v1/pages',\n destPath: '/v1/pages',\n },\n {\n srcPath: '/dynamic-page-router/v1/sitemap',\n destPath: '/v1/sitemap',\n },\n {\n srcPath: '/dynamic-page-router/v1/draft-preview-token',\n destPath: '/v1/draft-preview-token',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/dynamic-page-router/v1/pages',\n destPath: '/v1/pages',\n },\n {\n srcPath: '/dynamic-page-router/v1/sitemap',\n destPath: '/v1/sitemap',\n },\n {\n srcPath: '/dynamic-page-router/v1/draft-preview-token',\n destPath: '/v1/draft-preview-token',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_dynamic-page-router_pages';\n\n/**\n * Returns the count of sitemap entries grouped by page name.\n *\n * Use this endpoint for analytics dashboards, capacity planning, and understanding\n * the scale of dynamic content without retrieving actual URLs. Results are capped\n * at 1,000 items per pattern for performance.\n */\nexport function getRouterSitemapCount(\n payload: object\n): RequestOptionsFactory<any> {\n function __getRouterSitemapCount({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.dynamic_page_router.v1.page',\n method: 'POST' as any,\n methodFqn:\n 'wix.dynamic_page_router.v1.DynamicPageRouter.GetRouterSitemapCount',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixDynamicPageRouterV1DynamicPageRouterUrl({\n protoPath: '/v1/sitemapCount',\n data: payload,\n host,\n }),\n data: payload,\n };\n\n return metadata;\n }\n\n return __getRouterSitemapCount;\n}\n\n/**\n * Returns sitemap entries containing URLs, page names, and page titles.\n *\n * Use this endpoint to generate XML sitemaps for search engines, build navigation\n * menus, or provide URL listings to external systems. The `fullUrl` parameter\n * provides context for scoping sitemap generation to specific domains or URL hierarchies.\n */\nexport function getRouterSitemap(payload: object): RequestOptionsFactory<any> {\n function __getRouterSitemap({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.dynamic_page_router.v1.page',\n method: 'POST' as any,\n methodFqn:\n 'wix.dynamic_page_router.v1.DynamicPageRouter.GetRouterSitemap',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixDynamicPageRouterV1DynamicPageRouterUrl({\n protoPath: '/v1/sitemap',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [{ path: 'result.priority' }],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __getRouterSitemap;\n}\n\n/**\n * Returns comprehensive page information for a specific route.\n * Called by the editor via POST with flat body + query params.\n */\nexport function getRouterPages(payload: object): RequestOptionsFactory<any> {\n function __getRouterPages({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.dynamic_page_router.v1.page',\n method: 'POST' as any,\n methodFqn: 'wix.dynamic_page_router.v1.DynamicPageRouter.GetRouterPages',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixDynamicPageRouterV1DynamicPageRouterUrl({\n protoPath: '/v1/pages',\n data: payload,\n host,\n }),\n data: payload,\n };\n\n return metadata;\n }\n\n return __getRouterPages;\n}\n\n/**\n * Returns comprehensive page information for a specific route (cacheable).\n * Called by the viewer via GET with .r parameter containing {urlParams, body} envelope.\n */\nexport function getRouterPagesCached(\n payload: object\n): RequestOptionsFactory<any> {\n function __getRouterPagesCached({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.dynamic_page_router.v1.page',\n method: 'GET' as any,\n methodFqn:\n 'wix.dynamic_page_router.v1.DynamicPageRouter.GetRouterPagesCached',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixDynamicPageRouterV1DynamicPageRouterUrl({\n protoPath: '/v1/pages',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload, true),\n };\n\n return metadata;\n }\n\n return __getRouterPagesCached;\n}\n\n/** Returns the preview token used for draft collection previews. */\nexport function getDraftPreviewToken(\n payload: object\n): RequestOptionsFactory<any> {\n function __getDraftPreviewToken({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.dynamic_page_router.v1.page',\n method: 'POST' as any,\n methodFqn:\n 'wix.dynamic_page_router.v1.DynamicPageRouter.GetDraftPreviewToken',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixDynamicPageRouterV1DynamicPageRouterUrl({\n protoPath: '/v1/draft-preview-token',\n data: payload,\n host,\n }),\n data: payload,\n };\n\n return metadata;\n }\n\n return __getDraftPreviewToken;\n}\n","import { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport {\n GetDraftPreviewTokenOptions,\n GetDraftPreviewTokenResponse,\n GetRouterPagesCachedOptions,\n GetRouterPagesOptions,\n GetRouterPagesResponse,\n GetRouterSitemapCountOptions,\n GetRouterSitemapCountResponse,\n GetRouterSitemapOptions,\n GetRouterSitemapResponse,\n getDraftPreviewToken as universalGetDraftPreviewToken,\n getRouterPages as universalGetRouterPages,\n getRouterPagesCached as universalGetRouterPagesCached,\n getRouterSitemap as universalGetRouterSitemap,\n getRouterSitemapCount as universalGetRouterSitemapCount,\n} from './dynamic-page-router-v1-page-pages.universal.js';\n\nexport const __metadata = { PACKAGE_NAME: '@wix/dynamic-page-router' };\n\nexport function getRouterSitemapCount(\n httpClient: HttpClient\n): GetRouterSitemapCountSignature {\n return (options?: GetRouterSitemapCountOptions) =>\n universalGetRouterSitemapCount(\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface GetRouterSitemapCountSignature {\n /**\n * Returns the count of sitemap entries grouped by page name.\n *\n * Use this endpoint for analytics dashboards, capacity planning, and understanding\n * the scale of dynamic content without retrieving actual URLs. Results are capped\n * at 1,000 items per pattern for performance.\n */\n (options?: GetRouterSitemapCountOptions): Promise<\n NonNullablePaths<\n GetRouterSitemapCountResponse,\n `result` | `result.${number}.pageName` | `result.${number}.count`,\n 4\n >\n >;\n}\n\nexport function getRouterSitemap(\n httpClient: HttpClient\n): GetRouterSitemapSignature {\n return (options?: GetRouterSitemapOptions) =>\n universalGetRouterSitemap(\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface GetRouterSitemapSignature {\n /**\n * Returns sitemap entries containing URLs, page names, and page titles.\n *\n * Use this endpoint to generate XML sitemaps for search engines, build navigation\n * menus, or provide URL listings to external systems. The `fullUrl` parameter\n * provides context for scoping sitemap generation to specific domains or URL hierarchies.\n */\n (options?: GetRouterSitemapOptions): Promise<\n NonNullablePaths<\n GetRouterSitemapResponse,\n | `result`\n | `result.${number}.url`\n | `result.${number}.pageName`\n | `result.${number}.title`\n | `result.${number}.changeFrequency`\n | `result.${number}.priority`,\n 4\n >\n >;\n}\n\nexport function getRouterPages(\n httpClient: HttpClient\n): GetRouterPagesSignature {\n return (options?: GetRouterPagesOptions) =>\n universalGetRouterPages(\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface GetRouterPagesSignature {\n /**\n * Returns comprehensive page information for a specific route.\n * Called by the editor via POST with flat body + query params.\n */\n (options?: GetRouterPagesOptions): Promise<\n NonNullablePaths<\n GetRouterPagesResponse,\n | `result.status`\n | `result.page`\n | `result.head.title`\n | `result.head.description`\n | `result.head.keywords`\n | `result.head.noIndex`\n | `result.message`\n | `result.redirectUrl`,\n 4\n >\n >;\n}\n\nexport function getRouterPagesCached(\n httpClient: HttpClient\n): GetRouterPagesCachedSignature {\n return (options?: GetRouterPagesCachedOptions) =>\n universalGetRouterPagesCached(\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface GetRouterPagesCachedSignature {\n /**\n * Returns comprehensive page information for a specific route (cacheable).\n * Called by the viewer via GET with .r parameter containing {urlParams, body} envelope.\n */\n (options?: GetRouterPagesCachedOptions): Promise<\n NonNullablePaths<\n GetRouterPagesResponse,\n | `result.status`\n | `result.page`\n | `result.head.title`\n | `result.head.description`\n | `result.head.keywords`\n | `result.head.noIndex`\n | `result.message`\n | `result.redirectUrl`,\n 4\n >\n >;\n}\n\nexport function getDraftPreviewToken(\n httpClient: HttpClient\n): GetDraftPreviewTokenSignature {\n return (options?: GetDraftPreviewTokenOptions) =>\n universalGetDraftPreviewToken(\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface GetDraftPreviewTokenSignature {\n /**\n * Returns the preview token used for draft collection previews.\n */\n (options?: GetDraftPreviewTokenOptions): Promise<\n NonNullablePaths<GetDraftPreviewTokenResponse, `token`, 2>\n >;\n}\n\nexport {\n Config,\n GetDraftPreviewTokenOptions,\n GetDraftPreviewTokenRequest,\n GetDraftPreviewTokenResponse,\n GetRouterPagesCachedOptions,\n GetRouterPagesCachedRequest,\n GetRouterPagesCachedUrlParams,\n GetRouterPagesOptions,\n GetRouterPagesRequest,\n GetRouterPagesResponse,\n GetRouterSitemapCountOptions,\n GetRouterSitemapCountRequest,\n GetRouterSitemapCountResponse,\n GetRouterSitemapOptions,\n GetRouterSitemapRequest,\n GetRouterSitemapResponse,\n Page,\n PageRole,\n PageRule,\n Pattern,\n PatternConfig,\n RequestInfo,\n RouterCountItem,\n RouterPageHead,\n RouterPagesResult,\n RouterRouteItem,\n} from './dynamic-page-router-v1-page-pages.universal.js';\n","import {\n getRouterSitemapCount as publicGetRouterSitemapCount,\n getRouterSitemap as publicGetRouterSitemap,\n getRouterPages as publicGetRouterPages,\n getRouterPagesCached as publicGetRouterPagesCached,\n getDraftPreviewToken as publicGetDraftPreviewToken,\n} from './dynamic-page-router-v1-page-pages.public.js';\nimport { createRESTModule } from '@wix/sdk-runtime/rest-modules';\nimport { BuildRESTFunction, MaybeContext } from '@wix/sdk-types';\n\nexport const getRouterSitemapCount: MaybeContext<\n BuildRESTFunction<typeof publicGetRouterSitemapCount> &\n typeof publicGetRouterSitemapCount\n> = /*#__PURE__*/ createRESTModule(publicGetRouterSitemapCount);\nexport const getRouterSitemap: MaybeContext<\n BuildRESTFunction<typeof publicGetRouterSitemap> &\n typeof publicGetRouterSitemap\n> = /*#__PURE__*/ createRESTModule(publicGetRouterSitemap);\nexport const getRouterPages: MaybeContext<\n BuildRESTFunction<typeof publicGetRouterPages> & typeof publicGetRouterPages\n> = /*#__PURE__*/ createRESTModule(publicGetRouterPages);\nexport const getRouterPagesCached: MaybeContext<\n BuildRESTFunction<typeof publicGetRouterPagesCached> &\n typeof publicGetRouterPagesCached\n> = /*#__PURE__*/ createRESTModule(publicGetRouterPagesCached);\nexport const getDraftPreviewToken: MaybeContext<\n BuildRESTFunction<typeof publicGetDraftPreviewToken> &\n typeof publicGetDraftPreviewToken\n> = /*#__PURE__*/ createRESTModule(publicGetDraftPreviewToken);\n\nexport {\n Page,\n GetRouterSitemapCountRequest,\n Config,\n Pattern,\n PatternConfig,\n PageRule,\n PageRole,\n GetRouterSitemapCountResponse,\n RouterCountItem,\n GetRouterSitemapRequest,\n GetRouterSitemapResponse,\n RouterRouteItem,\n GetRouterPagesRequest,\n RequestInfo,\n GetRouterPagesResponse,\n RouterPagesResult,\n RouterPageHead,\n GetRouterPagesCachedRequest,\n GetRouterPagesCachedUrlParams,\n GetDraftPreviewTokenRequest,\n GetDraftPreviewTokenResponse,\n GetRouterSitemapCountOptions,\n GetRouterSitemapOptions,\n GetRouterPagesOptions,\n GetRouterPagesCachedOptions,\n GetDraftPreviewTokenOptions,\n} from './dynamic-page-router-v1-page-pages.universal.js';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA,8BAAAA;AAAA,EAAA,sBAAAC;AAAA,EAAA,4BAAAC;AAAA,EAAA,wBAAAC;AAAA,EAAA,6BAAAC;AAAA;AAAA;;;ACAA,6BAAoD;AACpD,oCAGO;;;ACJP,0BAAkC;AAClC,mBAA6C;AAC7C,6BAA+B;AAC/B,IAAAC,uBAA2B;AAI3B,SAAS,kDACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,wBAAwB;AAAA,MACt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eAAO,uEAAwC,OAAO,IAAI;AAAA,EAC5D,SAAS,KAAU;AACjB,UAAM,uBAAmB,uBAAAJ;AAAA,MACvB;AAAA,MACA;AAAA,QACE,wBAAwB,CAAC;AAAA,QACzB,0BAA0B,EAAE,cAAc,oBAAoB;AAAA,QAC9D,yBAAyB;AAAA,MAC3B;AAAA,MACA,CAAC,SAAS;AAAA,IACZ;AACA,iBAAa,UAAU,GAAG;AAE1B,UAAM;AAAA,EACR;AACF;;;AExvBO,SAASK,uBACd,YACgC;AAChC,SAAO,CAAC,YACNA;AAAA,IACE;AAAA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;AAmBO,SAASC,kBACd,YAC2B;AAC3B,SAAO,CAAC,YACNA;AAAA,IACE;AAAA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;AAwBO,SAASC,gBACd,YACyB;AACzB,SAAO,CAAC,YACNA;AAAA,IACE;AAAA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;AAuBO,SAASC,sBACd,YAC+B;AAC/B,SAAO,CAAC,YACNA;AAAA,IACE;AAAA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;AAuBO,SAASC,sBACd,YAC+B;AAC/B,SAAO,CAAC,YACNA;AAAA,IACE;AAAA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;;;ACnJA,IAAAC,uBAAiC;AAG1B,IAAMC,yBAGK,2DAAiBA,sBAA2B;AACvD,IAAMC,oBAGK,2DAAiBA,iBAAsB;AAClD,IAAMC,kBAEK,2DAAiBA,eAAoB;AAChD,IAAMC,wBAGK,2DAAiBA,qBAA0B;AACtD,IAAMC,wBAGK,2DAAiBA,qBAA0B;","names":["getDraftPreviewToken","getRouterPages","getRouterPagesCached","getRouterSitemap","getRouterSitemapCount","import_rest_modules","payload","getRouterSitemapCount","sdkTransformError","getRouterSitemap","getRouterPages","getRouterPagesCached","getDraftPreviewToken","getRouterSitemapCount","getRouterSitemap","getRouterPages","getRouterPagesCached","getDraftPreviewToken","import_rest_modules","getRouterSitemapCount","getRouterSitemap","getRouterPages","getRouterPagesCached","getDraftPreviewToken"]}
@@ -0,0 +1,487 @@
1
+ import { NonNullablePaths } from '@wix/sdk-types';
2
+
3
+ /** Stub entity, not used at the moment. */
4
+ interface Page {
5
+ /**
6
+ * Page ID.
7
+ * @format GUID
8
+ * @readonly
9
+ */
10
+ _id?: string | null;
11
+ }
12
+ interface GetRouterSitemapCountRequest {
13
+ /**
14
+ * Router prefix that identifies the page type or origin. For TPA (Third-Party Application) pages, this contains the TPA page ID.
15
+ * @maxLength 2048
16
+ */
17
+ routerPrefix?: string;
18
+ /** Config containing request patterns, e.g. '/{title}' */
19
+ config?: Config;
20
+ /** Map of page roles containing page ID and title of each role */
21
+ pageRoles?: Record<string, PageRole>;
22
+ /**
23
+ * Optional page name to filter patterns by matching page role title
24
+ * @maxLength 200
25
+ */
26
+ pageName?: string;
27
+ /**
28
+ * Query param mapped to body, editor/site
29
+ * @maxLength 200
30
+ */
31
+ viewMode?: string;
32
+ /**
33
+ * Query param mapped to body, unique for Wix code app
34
+ * @format GUID
35
+ */
36
+ gridAppId?: string | null;
37
+ }
38
+ interface Config {
39
+ /** Map of URL patterns to their configurations. The key is the URL pattern (e.g., `/{title}`) and the value contains the pattern configuration. */
40
+ patterns?: Record<string, Pattern>;
41
+ /** Maps rule ID → PageRule (filter + variant page role). */
42
+ rules?: Record<string, PageRule>;
43
+ /** Maps original page role ID → ordered rule IDs. First matching rule wins. */
44
+ roleVariations?: Record<string, any[]>;
45
+ }
46
+ interface Pattern {
47
+ /**
48
+ * Page role identifier that links this pattern to a specific page template.
49
+ * @maxLength 200
50
+ */
51
+ pageRole?: string;
52
+ /**
53
+ * Title pattern with field interpolation (e.g., "{title}, {author} - {category}").
54
+ * Increased to 50000 to support complex title templates with many interpolated fields and long text content.
55
+ * @maxLength 50000
56
+ */
57
+ title?: string;
58
+ /** Configuration specifying which collection to query and any filters to apply. */
59
+ config?: PatternConfig;
60
+ /** SEO meta tags to be included in the page head. Keys are meta tag names, values are the content. */
61
+ seoMetaTags?: Record<string, string>;
62
+ }
63
+ interface PatternConfig {
64
+ /**
65
+ * Name of the Wix Data collection to query for dynamic content.
66
+ * @maxLength 200
67
+ */
68
+ collection?: string;
69
+ /** Filter criteria to apply when querying the collection. Uses MongoDB-style query syntax to limit which items generate routes. */
70
+ filter?: Record<string, any> | null;
71
+ /** Indicates if URLs in sitemap should be turned to lowercase. Defaults to true if not set. */
72
+ lowercase?: boolean | null;
73
+ /**
74
+ * The field id that gets added to DataCollection and DataItems.
75
+ * Indicates that page links is a slug based and items should be retrieved by slug fields present in the pattern.
76
+ * @maxLength 1000
77
+ */
78
+ pageLinkId?: string | null;
79
+ /**
80
+ * Sort specification for query results. Each struct contains field name and direction (asc/desc).
81
+ * @maxSize 32
82
+ */
83
+ sort?: Record<string, any>[] | null;
84
+ /** Page size for pagination. */
85
+ pageSize?: number | null;
86
+ /** SEO v2 flag. */
87
+ seoV2?: boolean | null;
88
+ /** Cursor-based pagination flag. */
89
+ cursor?: boolean | null;
90
+ /**
91
+ * Dataset includes array for passthrough config.
92
+ * @maxSize 100
93
+ * @maxLength 1000
94
+ */
95
+ includes?: string[];
96
+ }
97
+ /** A variant rule: if filter matches the fetched data item, use page_role instead of the original. */
98
+ interface PageRule {
99
+ /**
100
+ * Variant page role ID to return when this rule matches.
101
+ * @maxLength 200
102
+ */
103
+ pageRole?: string;
104
+ /** Wix Data filter evaluated against the fetched item. */
105
+ filter?: Record<string, any> | null;
106
+ /**
107
+ * Human-readable rule name (for debugging/logging).
108
+ * @maxLength 200
109
+ */
110
+ name?: string | null;
111
+ }
112
+ interface PageRole {
113
+ /**
114
+ * Page role ID that uniquely identifies the page template.
115
+ * @maxLength 200
116
+ */
117
+ _id?: string;
118
+ /**
119
+ * Human-readable title for the page role.
120
+ * @maxLength 200
121
+ */
122
+ title?: string;
123
+ }
124
+ interface GetRouterSitemapCountResponse {
125
+ /** List of count results grouped by page name. */
126
+ result?: RouterCountItem[];
127
+ }
128
+ interface RouterCountItem {
129
+ /**
130
+ * Name of the dynamic page template.
131
+ * @maxLength 200
132
+ */
133
+ pageName?: string;
134
+ /** Number of inner routes for the given page. Capped at 1,000 for performance. */
135
+ count?: number;
136
+ }
137
+ interface GetRouterSitemapRequest {
138
+ /**
139
+ * Full URL to the inner route
140
+ * @maxLength 2048
141
+ */
142
+ fullUrl?: string;
143
+ /**
144
+ * Router prefix (TPA page ID for TPA pages)
145
+ * @maxLength 2048
146
+ */
147
+ routerPrefix?: string;
148
+ /**
149
+ * Optional page name to filter patterns by matching page role title
150
+ * @maxLength 2048
151
+ */
152
+ pageName?: string;
153
+ /** Config containing request patterns, e.g. '/{title}' */
154
+ config?: Config;
155
+ /** Map of page roles containing page ID and title of each role */
156
+ pageRoles?: Record<string, PageRole>;
157
+ /**
158
+ * Query param mapped to body, editor/site
159
+ * @maxLength 200
160
+ */
161
+ viewMode?: string;
162
+ /**
163
+ * Query param mapped to body, unique for Wix code app
164
+ * @format GUID
165
+ */
166
+ gridAppId?: string | null;
167
+ }
168
+ interface GetRouterSitemapResponse {
169
+ /** List of sitemap entries containing URLs and metadata for dynamic pages. */
170
+ result?: RouterRouteItem[];
171
+ }
172
+ interface RouterRouteItem {
173
+ /**
174
+ * URL to inner route relative to current domain
175
+ * @maxLength 500
176
+ */
177
+ url?: string;
178
+ /**
179
+ * Dynamic page name
180
+ * @maxLength 200
181
+ */
182
+ pageName?: string;
183
+ /**
184
+ * Title of the specific route, typically derived from collection data.
185
+ * @maxLength 200
186
+ */
187
+ title?: string;
188
+ /**
189
+ * Change frequency for sitemap SEO purposes (e.g., `daily`, `weekly`, `monthly`).
190
+ * @maxLength 100
191
+ */
192
+ changeFrequency?: string;
193
+ /**
194
+ * Last modified timestamp in ISO 8601 format.
195
+ * @maxLength 100
196
+ */
197
+ lastModified?: string | null;
198
+ /** Priority for sitemap SEO purposes (0.0 to 1.0). */
199
+ priority?: number;
200
+ }
201
+ interface GetRouterPagesRequest {
202
+ /**
203
+ * Complete URL to the inner route. Used for context-aware processing and as a base for relative URL resolution.
204
+ * Increased to 8192 to accommodate URLs with extensive query parameters (tracking, analytics, UTM params, etc.)
205
+ * @maxLength 8192
206
+ */
207
+ fullUrl?: string;
208
+ /**
209
+ * Router prefix (TPA page ID for TPA pages)
210
+ * @maxLength 2048
211
+ */
212
+ routerPrefix?: string;
213
+ /**
214
+ * Inner route suffix containing the dynamic part of the URL pattern. For example, `/{title}` or `/category/{category}/post/{slug}`.
215
+ * Increased to 8192 to match full_url capacity for complex dynamic routes
216
+ * @maxLength 8192
217
+ */
218
+ routerSuffix?: string;
219
+ /** Additional request information including form factor (desktop/mobile) for device-appropriate routing. */
220
+ requestInfo?: RequestInfo;
221
+ /** Config containing request patterns, e.g. '/{title}' */
222
+ config?: Config;
223
+ /** Map of page roles containing page ID and title of each role */
224
+ pageRoles?: Record<string, PageRole>;
225
+ /**
226
+ * Query param mapped to body, editor/site
227
+ * @maxLength 200
228
+ */
229
+ viewMode?: string;
230
+ /**
231
+ * Query param mapped to body, unique for Wix code app
232
+ * @format GUID
233
+ */
234
+ gridAppId?: string | null;
235
+ }
236
+ interface RequestInfo {
237
+ /**
238
+ * Device form factor, typically `desktop` or `mobile`. Used to serve device-appropriate page layouts.
239
+ * @maxLength 200
240
+ */
241
+ formFactor?: string;
242
+ }
243
+ interface GetRouterPagesResponse {
244
+ /** Page resolution result containing status, data, and metadata. */
245
+ result?: RouterPagesResult;
246
+ }
247
+ interface RouterPagesResult {
248
+ /** HTTP status code of the page (200, 302, 404) */
249
+ status?: number;
250
+ /**
251
+ * Name of the dynamic page template that should be used for rendering.
252
+ * @maxLength 200
253
+ */
254
+ page?: string;
255
+ /** Application router data available only to internal Wix apps. Contains system-level and administrative information. */
256
+ data?: Record<string, any> | null;
257
+ /** SEO and metadata information for the page head section. */
258
+ head?: RouterPageHead;
259
+ /**
260
+ * Error message when status indicates an error condition.
261
+ * @maxLength 500
262
+ */
263
+ message?: string;
264
+ /**
265
+ * Target URL for redirects when status is 302.
266
+ * @maxLength 2048
267
+ */
268
+ redirectUrl?: string;
269
+ }
270
+ interface RouterPageHead {
271
+ /**
272
+ * Page title for SEO and browser display.
273
+ * @maxLength 200
274
+ */
275
+ title?: string;
276
+ /** Meta tags for SEO optimization. Keys are meta tag names, values are the content. */
277
+ metaTags?: Record<string, string>;
278
+ /**
279
+ * Page description for SEO. Extracted from seoMetaTags if present.
280
+ * @maxLength 5000
281
+ */
282
+ description?: string;
283
+ /**
284
+ * Keywords for SEO. Extracted from seoMetaTags if present.
285
+ * @maxLength 5000
286
+ */
287
+ keywords?: string;
288
+ /**
289
+ * NoIndex directive for search engines. Extracted from seoMetaTags if present.
290
+ * @maxLength 500
291
+ */
292
+ noIndex?: string;
293
+ }
294
+ /** Viewer GET request: .r parameter containing {urlParams, body} envelope. */
295
+ interface GetRouterPagesCachedRequest {
296
+ /** URL parameters from the viewer's query string. */
297
+ urlParams?: GetRouterPagesCachedUrlParams;
298
+ /** Request body from the viewer's envelope. */
299
+ body?: GetRouterPagesRequest;
300
+ }
301
+ interface GetRouterPagesCachedUrlParams {
302
+ /**
303
+ * Unique for Wix code app
304
+ * @format GUID
305
+ */
306
+ gridAppId?: string | null;
307
+ /**
308
+ * Editor/site
309
+ * @maxLength 200
310
+ */
311
+ viewMode?: string;
312
+ }
313
+ interface GetDraftPreviewTokenRequest {
314
+ /**
315
+ * Wix Data collection ID to get a draft preview key for.
316
+ * @maxLength 256
317
+ */
318
+ collectionId?: string;
319
+ }
320
+ interface GetDraftPreviewTokenResponse {
321
+ /**
322
+ * Draft preview token.
323
+ * @maxLength 10000
324
+ */
325
+ token?: string;
326
+ }
327
+ /**
328
+ * Returns the count of sitemap entries grouped by page name.
329
+ *
330
+ * Use this endpoint for analytics dashboards, capacity planning, and understanding
331
+ * the scale of dynamic content without retrieving actual URLs. Results are capped
332
+ * at 1,000 items per pattern for performance.
333
+ * @public
334
+ * @documentationMaturity preview
335
+ * @permissionId dynamic_page_router:v1:page:get_router_sitemap_count
336
+ * @applicableIdentity APP
337
+ * @fqn wix.dynamic_page_router.v1.DynamicPageRouter.GetRouterSitemapCount
338
+ */
339
+ declare function getRouterSitemapCount(options?: GetRouterSitemapCountOptions): Promise<NonNullablePaths<GetRouterSitemapCountResponse, `result` | `result.${number}.pageName` | `result.${number}.count`, 4>>;
340
+ interface GetRouterSitemapCountOptions {
341
+ /**
342
+ * Router prefix that identifies the page type or origin. For TPA (Third-Party Application) pages, this contains the TPA page ID.
343
+ * @maxLength 2048
344
+ */
345
+ routerPrefix?: string;
346
+ /** Config containing request patterns, e.g. '/{title}' */
347
+ config?: Config;
348
+ /** Map of page roles containing page ID and title of each role */
349
+ pageRoles?: Record<string, PageRole>;
350
+ /**
351
+ * Optional page name to filter patterns by matching page role title
352
+ * @maxLength 200
353
+ */
354
+ pageName?: string;
355
+ /**
356
+ * Query param mapped to body, editor/site
357
+ * @maxLength 200
358
+ */
359
+ viewMode?: string;
360
+ /**
361
+ * Query param mapped to body, unique for Wix code app
362
+ * @format GUID
363
+ */
364
+ gridAppId?: string | null;
365
+ }
366
+ /**
367
+ * Returns sitemap entries containing URLs, page names, and page titles.
368
+ *
369
+ * Use this endpoint to generate XML sitemaps for search engines, build navigation
370
+ * menus, or provide URL listings to external systems. The `fullUrl` parameter
371
+ * provides context for scoping sitemap generation to specific domains or URL hierarchies.
372
+ * @public
373
+ * @documentationMaturity preview
374
+ * @permissionId dynamic_page_router:v1:page:get_router_sitemap
375
+ * @applicableIdentity APP
376
+ * @fqn wix.dynamic_page_router.v1.DynamicPageRouter.GetRouterSitemap
377
+ */
378
+ declare function getRouterSitemap(options?: GetRouterSitemapOptions): Promise<NonNullablePaths<GetRouterSitemapResponse, `result` | `result.${number}.url` | `result.${number}.pageName` | `result.${number}.title` | `result.${number}.changeFrequency` | `result.${number}.priority`, 4>>;
379
+ interface GetRouterSitemapOptions {
380
+ /**
381
+ * Full URL to the inner route
382
+ * @maxLength 2048
383
+ */
384
+ fullUrl?: string;
385
+ /**
386
+ * Router prefix (TPA page ID for TPA pages)
387
+ * @maxLength 2048
388
+ */
389
+ routerPrefix?: string;
390
+ /**
391
+ * Optional page name to filter patterns by matching page role title
392
+ * @maxLength 2048
393
+ */
394
+ pageName?: string;
395
+ /** Config containing request patterns, e.g. '/{title}' */
396
+ config?: Config;
397
+ /** Map of page roles containing page ID and title of each role */
398
+ pageRoles?: Record<string, PageRole>;
399
+ /**
400
+ * Query param mapped to body, editor/site
401
+ * @maxLength 200
402
+ */
403
+ viewMode?: string;
404
+ /**
405
+ * Query param mapped to body, unique for Wix code app
406
+ * @format GUID
407
+ */
408
+ gridAppId?: string | null;
409
+ }
410
+ /**
411
+ * Returns comprehensive page information for a specific route.
412
+ * Called by the editor via POST with flat body + query params.
413
+ * @public
414
+ * @documentationMaturity preview
415
+ * @permissionId dynamic_page_router:v1:page:get_router_pages
416
+ * @applicableIdentity APP
417
+ * @fqn wix.dynamic_page_router.v1.DynamicPageRouter.GetRouterPages
418
+ */
419
+ declare function getRouterPages(options?: GetRouterPagesOptions): Promise<NonNullablePaths<GetRouterPagesResponse, `result.status` | `result.page` | `result.head.title` | `result.head.description` | `result.head.keywords` | `result.head.noIndex` | `result.message` | `result.redirectUrl`, 4>>;
420
+ interface GetRouterPagesOptions {
421
+ /**
422
+ * Complete URL to the inner route. Used for context-aware processing and as a base for relative URL resolution.
423
+ * Increased to 8192 to accommodate URLs with extensive query parameters (tracking, analytics, UTM params, etc.)
424
+ * @maxLength 8192
425
+ */
426
+ fullUrl?: string;
427
+ /**
428
+ * Router prefix (TPA page ID for TPA pages)
429
+ * @maxLength 2048
430
+ */
431
+ routerPrefix?: string;
432
+ /**
433
+ * Inner route suffix containing the dynamic part of the URL pattern. For example, `/{title}` or `/category/{category}/post/{slug}`.
434
+ * Increased to 8192 to match full_url capacity for complex dynamic routes
435
+ * @maxLength 8192
436
+ */
437
+ routerSuffix?: string;
438
+ /** Additional request information including form factor (desktop/mobile) for device-appropriate routing. */
439
+ requestInfo?: RequestInfo;
440
+ /** Config containing request patterns, e.g. '/{title}' */
441
+ config?: Config;
442
+ /** Map of page roles containing page ID and title of each role */
443
+ pageRoles?: Record<string, PageRole>;
444
+ /**
445
+ * Query param mapped to body, editor/site
446
+ * @maxLength 200
447
+ */
448
+ viewMode?: string;
449
+ /**
450
+ * Query param mapped to body, unique for Wix code app
451
+ * @format GUID
452
+ */
453
+ gridAppId?: string | null;
454
+ }
455
+ /**
456
+ * Returns comprehensive page information for a specific route (cacheable).
457
+ * Called by the viewer via GET with .r parameter containing {urlParams, body} envelope.
458
+ * @public
459
+ * @documentationMaturity preview
460
+ * @permissionId dynamic_page_router:v1:page:get_router_pages
461
+ * @applicableIdentity APP
462
+ * @fqn wix.dynamic_page_router.v1.DynamicPageRouter.GetRouterPagesCached
463
+ */
464
+ declare function getRouterPagesCached(options?: GetRouterPagesCachedOptions): Promise<NonNullablePaths<GetRouterPagesResponse, `result.status` | `result.page` | `result.head.title` | `result.head.description` | `result.head.keywords` | `result.head.noIndex` | `result.message` | `result.redirectUrl`, 4>>;
465
+ interface GetRouterPagesCachedOptions {
466
+ /** URL parameters from the viewer's query string. */
467
+ urlParams?: GetRouterPagesCachedUrlParams;
468
+ /** Request body from the viewer's envelope. */
469
+ body?: GetRouterPagesRequest;
470
+ }
471
+ /**
472
+ * Returns the preview token used for draft collection previews.
473
+ * @public
474
+ * @documentationMaturity preview
475
+ * @permissionId dynamic_page_router:v1:page:get_draft_preview_token
476
+ * @fqn wix.dynamic_page_router.v1.DynamicPageRouter.GetDraftPreviewToken
477
+ */
478
+ declare function getDraftPreviewToken(options?: GetDraftPreviewTokenOptions): Promise<NonNullablePaths<GetDraftPreviewTokenResponse, `token`, 2>>;
479
+ interface GetDraftPreviewTokenOptions {
480
+ /**
481
+ * Wix Data collection ID to get a draft preview key for.
482
+ * @maxLength 256
483
+ */
484
+ collectionId?: string;
485
+ }
486
+
487
+ export { type Config, type GetDraftPreviewTokenOptions, type GetDraftPreviewTokenRequest, type GetDraftPreviewTokenResponse, type GetRouterPagesCachedOptions, type GetRouterPagesCachedRequest, type GetRouterPagesCachedUrlParams, type GetRouterPagesOptions, type GetRouterPagesRequest, type GetRouterPagesResponse, type GetRouterSitemapCountOptions, type GetRouterSitemapCountRequest, type GetRouterSitemapCountResponse, type GetRouterSitemapOptions, type GetRouterSitemapRequest, type GetRouterSitemapResponse, type Page, type PageRole, type PageRule, type Pattern, type PatternConfig, type RequestInfo, type RouterCountItem, type RouterPageHead, type RouterPagesResult, type RouterRouteItem, getDraftPreviewToken, getRouterPages, getRouterPagesCached, getRouterSitemap, getRouterSitemapCount };