@wix/auto_sdk_seo_seo-sitemap-entries 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 (39) hide show
  1. package/build/cjs/index.d.ts +19 -0
  2. package/build/cjs/index.js +127 -0
  3. package/build/cjs/index.js.map +1 -0
  4. package/build/cjs/index.typings.d.ts +174 -0
  5. package/build/cjs/index.typings.js +114 -0
  6. package/build/cjs/index.typings.js.map +1 -0
  7. package/build/cjs/meta.d.ts +167 -0
  8. package/build/cjs/meta.js +75 -0
  9. package/build/cjs/meta.js.map +1 -0
  10. package/build/es/index.d.mts +19 -0
  11. package/build/es/index.mjs +102 -0
  12. package/build/es/index.mjs.map +1 -0
  13. package/build/es/index.typings.d.mts +174 -0
  14. package/build/es/index.typings.mjs +89 -0
  15. package/build/es/index.typings.mjs.map +1 -0
  16. package/build/es/meta.d.mts +167 -0
  17. package/build/es/meta.mjs +48 -0
  18. package/build/es/meta.mjs.map +1 -0
  19. package/build/es/package.json +3 -0
  20. package/build/internal/cjs/index.d.ts +19 -0
  21. package/build/internal/cjs/index.js +127 -0
  22. package/build/internal/cjs/index.js.map +1 -0
  23. package/build/internal/cjs/index.typings.d.ts +174 -0
  24. package/build/internal/cjs/index.typings.js +114 -0
  25. package/build/internal/cjs/index.typings.js.map +1 -0
  26. package/build/internal/cjs/meta.d.ts +167 -0
  27. package/build/internal/cjs/meta.js +75 -0
  28. package/build/internal/cjs/meta.js.map +1 -0
  29. package/build/internal/es/index.d.mts +19 -0
  30. package/build/internal/es/index.mjs +102 -0
  31. package/build/internal/es/index.mjs.map +1 -0
  32. package/build/internal/es/index.typings.d.mts +174 -0
  33. package/build/internal/es/index.typings.mjs +89 -0
  34. package/build/internal/es/index.typings.mjs.map +1 -0
  35. package/build/internal/es/meta.d.mts +167 -0
  36. package/build/internal/es/meta.mjs +48 -0
  37. package/build/internal/es/meta.mjs.map +1 -0
  38. package/meta/package.json +3 -0
  39. package/package.json +54 -0
@@ -0,0 +1,19 @@
1
+ import { HttpClient, NonNullablePaths, MaybeContext, BuildRESTFunction } from '@wix/sdk-types';
2
+ import { GetSitemapPagesOptions, GetSitemapPagesResponse } from './index.typings.js';
3
+ export { CursorPaging, CursorResponse, GetSitemapPagesRequest, Image, ItemType, SitemapEntry, Video } from './index.typings.js';
4
+
5
+ type HeadlessSitemapEntryNonNullablePaths = `_id` | `shouldIncludeInSitemap` | `lastmod` | `images` | `images.${number}.url` | `images.${number}.altText` | `videos` | `videos.${number}.contentLoc` | `videos.${number}.thumbnailLoc` | `videos.${number}.title` | `videos.${number}.description`;
6
+ declare function getSitemapPages$1(httpClient: HttpClient): GetSitemapPagesSignature;
7
+ interface GetSitemapPagesSignature {
8
+ /**
9
+ * Gets sitemap pages for a given item type with optional pagination
10
+ * @returns Response message for getting sitemap pages
11
+ */
12
+ (options?: GetSitemapPagesOptions): Promise<NonNullablePaths<GetSitemapPagesResponse, {
13
+ [P in HeadlessSitemapEntryNonNullablePaths]: `pages.${number}.${P}`;
14
+ }[HeadlessSitemapEntryNonNullablePaths] | `cursor.count` | `cursor.cursor`>>;
15
+ }
16
+
17
+ declare const getSitemapPages: MaybeContext<BuildRESTFunction<typeof getSitemapPages$1> & typeof getSitemapPages$1>;
18
+
19
+ export { GetSitemapPagesOptions, GetSitemapPagesResponse, getSitemapPages };
@@ -0,0 +1,127 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // index.ts
21
+ var index_exports = {};
22
+ __export(index_exports, {
23
+ ItemType: () => ItemType,
24
+ getSitemapPages: () => getSitemapPages4
25
+ });
26
+ module.exports = __toCommonJS(index_exports);
27
+
28
+ // src/promote-seo-v1-headless-sitemap-entry-seo-sitemap-entries.universal.ts
29
+ var import_transform_error = require("@wix/sdk-runtime/transform-error");
30
+ var import_rename_all_nested_keys = require("@wix/sdk-runtime/rename-all-nested-keys");
31
+
32
+ // src/promote-seo-v1-headless-sitemap-entry-seo-sitemap-entries.http.ts
33
+ var import_rest_modules = require("@wix/sdk-runtime/rest-modules");
34
+ var import_rest_modules2 = require("@wix/sdk-runtime/rest-modules");
35
+ function resolveWixPromoteSeoHeadlessSitemapServiceV1SeoHeadlessSitemapServiceUrl(opts) {
36
+ const domainToMappings = {};
37
+ return (0, import_rest_modules2.resolveUrl)(Object.assign(opts, { domainToMappings }));
38
+ }
39
+ var PACKAGE_NAME = "@wix/auto_sdk_seo_seo-sitemap-entries";
40
+ function getSitemapPages(payload) {
41
+ function __getSitemapPages({ host }) {
42
+ const metadata = {
43
+ entityFqdn: "wix.promote.seo.v1.headless_sitemap_entry",
44
+ method: "GET",
45
+ methodFqn: "wix.promote.seo.headless.sitemap.service.v1.SeoHeadlessSitemapService.GetSitemapPages",
46
+ packageName: PACKAGE_NAME,
47
+ url: resolveWixPromoteSeoHeadlessSitemapServiceV1SeoHeadlessSitemapServiceUrl(
48
+ { protoPath: "/v1/get-sitemap-pages", data: payload, host }
49
+ ),
50
+ params: (0, import_rest_modules.toURLSearchParams)(payload)
51
+ };
52
+ return metadata;
53
+ }
54
+ return __getSitemapPages;
55
+ }
56
+
57
+ // src/promote-seo-v1-headless-sitemap-entry-seo-sitemap-entries.universal.ts
58
+ var ItemType = /* @__PURE__ */ ((ItemType2) => {
59
+ ItemType2["STORES_PRODUCT"] = "STORES_PRODUCT";
60
+ ItemType2["BLOG_POST"] = "BLOG_POST";
61
+ ItemType2["BLOG_CATEGORY"] = "BLOG_CATEGORY";
62
+ ItemType2["BLOG_TAGS"] = "BLOG_TAGS";
63
+ ItemType2["BLOG_ARCHIVE"] = "BLOG_ARCHIVE";
64
+ ItemType2["FORUM_POST"] = "FORUM_POST";
65
+ ItemType2["FORUM_CATEGORY"] = "FORUM_CATEGORY";
66
+ ItemType2["GROUPS_POST"] = "GROUPS_POST";
67
+ ItemType2["GROUPS_PAGE"] = "GROUPS_PAGE";
68
+ ItemType2["EVENTS_PAGE"] = "EVENTS_PAGE";
69
+ ItemType2["BOOKINGS_SERVICE"] = "BOOKINGS_SERVICE";
70
+ ItemType2["MEMBERS_AREA_PROFILE"] = "MEMBERS_AREA_PROFILE";
71
+ ItemType2["CHALLENGES_PAGE"] = "CHALLENGES_PAGE";
72
+ ItemType2["STORES_CATEGORY"] = "STORES_CATEGORY";
73
+ ItemType2["STORES_SUB_CATEGORY"] = "STORES_SUB_CATEGORY";
74
+ ItemType2["PORTFOLIO_COLLECTIONS"] = "PORTFOLIO_COLLECTIONS";
75
+ ItemType2["PORTFOLIO_PROJECTS"] = "PORTFOLIO_PROJECTS";
76
+ ItemType2["PRICING_PLANS"] = "PRICING_PLANS";
77
+ ItemType2["RESTAURANTS_MENU_PAGE"] = "RESTAURANTS_MENU_PAGE";
78
+ return ItemType2;
79
+ })(ItemType || {});
80
+ async function getSitemapPages2(options) {
81
+ const { httpClient, sideEffects } = arguments[1];
82
+ const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
83
+ itemType: options?.itemType,
84
+ cursor: options?.cursor
85
+ });
86
+ const reqOpts = getSitemapPages(payload);
87
+ sideEffects?.onSiteCall?.();
88
+ try {
89
+ const result = await httpClient.request(reqOpts);
90
+ sideEffects?.onSuccess?.(result);
91
+ return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
92
+ } catch (err) {
93
+ const transformedError = (0, import_transform_error.transformError)(
94
+ err,
95
+ {
96
+ spreadPathsToArguments: {},
97
+ explicitPathsToArguments: {
98
+ itemType: "$[0].itemType",
99
+ cursor: "$[0].cursor"
100
+ },
101
+ singleArgumentUnchanged: false
102
+ },
103
+ ["options"]
104
+ );
105
+ sideEffects?.onError?.(err);
106
+ throw transformedError;
107
+ }
108
+ }
109
+
110
+ // src/promote-seo-v1-headless-sitemap-entry-seo-sitemap-entries.public.ts
111
+ function getSitemapPages3(httpClient) {
112
+ return (options) => getSitemapPages2(
113
+ options,
114
+ // @ts-ignore
115
+ { httpClient }
116
+ );
117
+ }
118
+
119
+ // src/promote-seo-v1-headless-sitemap-entry-seo-sitemap-entries.context.ts
120
+ var import_rest_modules3 = require("@wix/sdk-runtime/rest-modules");
121
+ var getSitemapPages4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(getSitemapPages3);
122
+ // Annotate the CommonJS export names for ESM import in node:
123
+ 0 && (module.exports = {
124
+ ItemType,
125
+ getSitemapPages
126
+ });
127
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../index.ts","../../src/promote-seo-v1-headless-sitemap-entry-seo-sitemap-entries.universal.ts","../../src/promote-seo-v1-headless-sitemap-entry-seo-sitemap-entries.http.ts","../../src/promote-seo-v1-headless-sitemap-entry-seo-sitemap-entries.public.ts","../../src/promote-seo-v1-headless-sitemap-entry-seo-sitemap-entries.context.ts"],"sourcesContent":["export * from './src/promote-seo-v1-headless-sitemap-entry-seo-sitemap-entries.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 ambassadorWixPromoteSeoV1HeadlessSitemapEntry from './promote-seo-v1-headless-sitemap-entry-seo-sitemap-entries.http.js';\n\n/** Sitemap entry containing page information */\nexport interface SitemapEntry {\n /**\n * Entity identifier (e.g., productId, pageId)\n * @minLength 1\n * @maxLength 255\n */\n _id?: string;\n /** Indicates if the entry should be included in the generated sitemap. */\n shouldIncludeInSitemap?: boolean;\n /**\n * Optional last modification date in ISO 8601 format\n * @maxLength 50\n */\n lastmod?: string;\n /**\n * Optional list of images\n * @maxSize 1000\n */\n images?: Image[];\n /**\n * Optional list of video data\n * @maxSize 100\n */\n videos?: Video[];\n}\n\n/** Image information for sitemap entries */\nexport interface Image {\n /**\n * Image URL\n * @format WEB_URL\n * @maxLength 2048\n * @minLength 1\n */\n url?: string;\n /**\n * Optional image alt text\n * @maxLength 2048\n */\n altText?: string;\n}\n\n/** Video information for sitemap entries */\nexport interface Video {\n /**\n * Video content location URL\n * @format WEB_URL\n * @maxLength 2048\n * @minLength 1\n */\n contentLoc?: string;\n /**\n * Video thumbnail location URL\n * @format WEB_URL\n * @maxLength 2048\n * @minLength 1\n */\n thumbnailLoc?: string;\n /**\n * Optional video title\n * @maxLength 255\n */\n title?: string;\n /**\n * Optional video description\n * @maxLength 1000\n */\n description?: string;\n}\n\n/** Request message for getting sitemap pages */\nexport interface GetSitemapPagesRequest {\n /** Item type identifier - must be a valid enum value */\n itemType?: ItemTypeWithLiterals;\n /** Optional cursor for pagination */\n cursor?: CursorPaging;\n}\n\n/** Enum representing different types of items that can have sitemap entries */\nexport enum ItemType {\n /** Stores products */\n STORES_PRODUCT = 'STORES_PRODUCT',\n /** Blog posts */\n BLOG_POST = 'BLOG_POST',\n /** Blog categories */\n BLOG_CATEGORY = 'BLOG_CATEGORY',\n /** Blog tags */\n BLOG_TAGS = 'BLOG_TAGS',\n /** Blog archives */\n BLOG_ARCHIVE = 'BLOG_ARCHIVE',\n /** Forum posts */\n FORUM_POST = 'FORUM_POST',\n /** Forum categories */\n FORUM_CATEGORY = 'FORUM_CATEGORY',\n /** Groups posts */\n GROUPS_POST = 'GROUPS_POST',\n /** Groups pages */\n GROUPS_PAGE = 'GROUPS_PAGE',\n /** Events pages */\n EVENTS_PAGE = 'EVENTS_PAGE',\n /** Bookings services */\n BOOKINGS_SERVICE = 'BOOKINGS_SERVICE',\n /** Members area profiles */\n MEMBERS_AREA_PROFILE = 'MEMBERS_AREA_PROFILE',\n /** Challenges/online programs pages */\n CHALLENGES_PAGE = 'CHALLENGES_PAGE',\n /** Store categories */\n STORES_CATEGORY = 'STORES_CATEGORY',\n /** Store sub-categories */\n STORES_SUB_CATEGORY = 'STORES_SUB_CATEGORY',\n /** Portfolio collections */\n PORTFOLIO_COLLECTIONS = 'PORTFOLIO_COLLECTIONS',\n /** Portfolio projects */\n PORTFOLIO_PROJECTS = 'PORTFOLIO_PROJECTS',\n /** Pricing plans */\n PRICING_PLANS = 'PRICING_PLANS',\n /** Restaurant menu pages */\n RESTAURANTS_MENU_PAGE = 'RESTAURANTS_MENU_PAGE',\n}\n\n/** @enumType */\nexport type ItemTypeWithLiterals =\n | ItemType\n | 'STORES_PRODUCT'\n | 'BLOG_POST'\n | 'BLOG_CATEGORY'\n | 'BLOG_TAGS'\n | 'BLOG_ARCHIVE'\n | 'FORUM_POST'\n | 'FORUM_CATEGORY'\n | 'GROUPS_POST'\n | 'GROUPS_PAGE'\n | 'EVENTS_PAGE'\n | 'BOOKINGS_SERVICE'\n | 'MEMBERS_AREA_PROFILE'\n | 'CHALLENGES_PAGE'\n | 'STORES_CATEGORY'\n | 'STORES_SUB_CATEGORY'\n | 'PORTFOLIO_COLLECTIONS'\n | 'PORTFOLIO_PROJECTS'\n | 'PRICING_PLANS'\n | 'RESTAURANTS_MENU_PAGE';\n\nexport interface CursorPaging {\n /**\n * Maximum number of items to return in the results.\n * @max 200\n */\n limit?: number | null;\n /**\n * Pointer to the next or previous page in the list of results.\n *\n * Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.\n * Not relevant for the first request.\n * @maxLength 16000\n */\n cursor?: string | null;\n}\n\n/** Response message for getting sitemap pages */\nexport interface GetSitemapPagesResponse {\n /** List of sitemap entries */\n pages?: SitemapEntry[];\n /** Paging metadata for next page of results */\n cursor?: CursorResponse;\n}\n\n/** Cursor response containing pagination information as in siteStructure service */\nexport interface CursorResponse {\n /** Total count of items */\n count?: number;\n /**\n * Cursor for pagination\n * @maxLength 16000\n */\n cursor?: string;\n}\n\ntype HeadlessSitemapEntryNonNullablePaths =\n | `_id`\n | `shouldIncludeInSitemap`\n | `lastmod`\n | `images`\n | `images.${number}.url`\n | `images.${number}.altText`\n | `videos`\n | `videos.${number}.contentLoc`\n | `videos.${number}.thumbnailLoc`\n | `videos.${number}.title`\n | `videos.${number}.description`;\n\n/**\n * Gets sitemap pages for a given item type with optional pagination\n * @public\n * @documentationMaturity preview\n * @permissionId WIX.SEO_SITEMAP_ENTRIES_READ\n * @applicableIdentity APP\n * @applicableIdentity VISITOR\n * @returns Response message for getting sitemap pages\n * @fqn wix.promote.seo.headless.sitemap.service.v1.SeoHeadlessSitemapService.GetSitemapPages\n */\nexport async function getSitemapPages(\n options?: GetSitemapPagesOptions\n): Promise<\n NonNullablePaths<\n GetSitemapPagesResponse,\n | {\n [P in HeadlessSitemapEntryNonNullablePaths]: `pages.${number}.${P}`;\n }[HeadlessSitemapEntryNonNullablePaths]\n | `cursor.count`\n | `cursor.cursor`\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 itemType: options?.itemType,\n cursor: options?.cursor,\n });\n\n const reqOpts =\n ambassadorWixPromoteSeoV1HeadlessSitemapEntry.getSitemapPages(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 itemType: '$[0].itemType',\n cursor: '$[0].cursor',\n },\n singleArgumentUnchanged: false,\n },\n ['options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface GetSitemapPagesOptions {\n /** Item type identifier - must be a valid enum value */\n itemType?: ItemTypeWithLiterals;\n /** Optional cursor for pagination */\n cursor?: CursorPaging;\n}\n","import { toURLSearchParams } from '@wix/sdk-runtime/rest-modules';\nimport { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nfunction resolveWixPromoteSeoHeadlessSitemapServiceV1SeoHeadlessSitemapServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {};\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_seo_seo-sitemap-entries';\n\n/** Gets sitemap pages for a given item type with optional pagination */\nexport function getSitemapPages(payload: object): RequestOptionsFactory<any> {\n function __getSitemapPages({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.promote.seo.v1.headless_sitemap_entry',\n method: 'GET' as any,\n methodFqn:\n 'wix.promote.seo.headless.sitemap.service.v1.SeoHeadlessSitemapService.GetSitemapPages',\n packageName: PACKAGE_NAME,\n url: resolveWixPromoteSeoHeadlessSitemapServiceV1SeoHeadlessSitemapServiceUrl(\n { protoPath: '/v1/get-sitemap-pages', data: payload, host }\n ),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __getSitemapPages;\n}\n","import { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport {\n GetSitemapPagesOptions,\n GetSitemapPagesResponse,\n getSitemapPages as universalGetSitemapPages,\n} from './promote-seo-v1-headless-sitemap-entry-seo-sitemap-entries.universal.js';\n\nexport const __metadata = { PACKAGE_NAME: '@wix/seo' };\n\ntype HeadlessSitemapEntryNonNullablePaths =\n | `_id`\n | `shouldIncludeInSitemap`\n | `lastmod`\n | `images`\n | `images.${number}.url`\n | `images.${number}.altText`\n | `videos`\n | `videos.${number}.contentLoc`\n | `videos.${number}.thumbnailLoc`\n | `videos.${number}.title`\n | `videos.${number}.description`;\n\nexport function getSitemapPages(\n httpClient: HttpClient\n): GetSitemapPagesSignature {\n return (options?: GetSitemapPagesOptions) =>\n universalGetSitemapPages(\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface GetSitemapPagesSignature {\n /**\n * Gets sitemap pages for a given item type with optional pagination\n * @returns Response message for getting sitemap pages\n */\n (options?: GetSitemapPagesOptions): Promise<\n NonNullablePaths<\n GetSitemapPagesResponse,\n | {\n [P in HeadlessSitemapEntryNonNullablePaths]: `pages.${number}.${P}`;\n }[HeadlessSitemapEntryNonNullablePaths]\n | `cursor.count`\n | `cursor.cursor`\n >\n >;\n}\n\nexport {\n CursorPaging,\n CursorResponse,\n GetSitemapPagesOptions,\n GetSitemapPagesRequest,\n GetSitemapPagesResponse,\n Image,\n ItemType,\n SitemapEntry,\n Video,\n} from './promote-seo-v1-headless-sitemap-entry-seo-sitemap-entries.universal.js';\n","import { getSitemapPages as publicGetSitemapPages } from './promote-seo-v1-headless-sitemap-entry-seo-sitemap-entries.public.js';\nimport { createRESTModule } from '@wix/sdk-runtime/rest-modules';\nimport { BuildRESTFunction, MaybeContext } from '@wix/sdk-types';\n\nexport const getSitemapPages: MaybeContext<\n BuildRESTFunction<typeof publicGetSitemapPages> & typeof publicGetSitemapPages\n> = /*#__PURE__*/ createRESTModule(publicGetSitemapPages);\n\nexport { ItemType } from './promote-seo-v1-headless-sitemap-entry-seo-sitemap-entries.universal.js';\nexport {\n SitemapEntry,\n Image,\n Video,\n GetSitemapPagesRequest,\n CursorPaging,\n GetSitemapPagesResponse,\n CursorResponse,\n GetSitemapPagesOptions,\n} from './promote-seo-v1-headless-sitemap-entry-seo-sitemap-entries.universal.js';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA,yBAAAA;AAAA;AAAA;;;ACAA,6BAAoD;AACpD,oCAGO;;;ACJP,0BAAkC;AAClC,IAAAC,uBAA2B;AAI3B,SAAS,yEACP,MACA;AACA,QAAM,mBAAmB,CAAC;AAE1B,aAAO,iCAAW,OAAO,OAAO,MAAM,EAAE,iBAAiB,CAAC,CAAC;AAC7D;AAEA,IAAM,eAAe;AAGd,SAAS,gBAAgB,SAA6C;AAC3E,WAAS,kBAAkB,EAAE,KAAK,GAAQ;AACxC,UAAM,WAAW;AAAA,MACf,YAAY;AAAA,MACZ,QAAQ;AAAA,MACR,WACE;AAAA,MACF,aAAa;AAAA,MACb,KAAK;AAAA,QACH,EAAE,WAAW,yBAAyB,MAAM,SAAS,KAAK;AAAA,MAC5D;AAAA,MACA,YAAQ,uCAAkB,OAAO;AAAA,IACnC;AAEA,WAAO;AAAA,EACT;AAEA,SAAO;AACT;;;ADsDO,IAAK,WAAL,kBAAKC,cAAL;AAEL,EAAAA,UAAA,oBAAiB;AAEjB,EAAAA,UAAA,eAAY;AAEZ,EAAAA,UAAA,mBAAgB;AAEhB,EAAAA,UAAA,eAAY;AAEZ,EAAAA,UAAA,kBAAe;AAEf,EAAAA,UAAA,gBAAa;AAEb,EAAAA,UAAA,oBAAiB;AAEjB,EAAAA,UAAA,iBAAc;AAEd,EAAAA,UAAA,iBAAc;AAEd,EAAAA,UAAA,iBAAc;AAEd,EAAAA,UAAA,sBAAmB;AAEnB,EAAAA,UAAA,0BAAuB;AAEvB,EAAAA,UAAA,qBAAkB;AAElB,EAAAA,UAAA,qBAAkB;AAElB,EAAAA,UAAA,yBAAsB;AAEtB,EAAAA,UAAA,2BAAwB;AAExB,EAAAA,UAAA,wBAAqB;AAErB,EAAAA,UAAA,mBAAgB;AAEhB,EAAAA,UAAA,2BAAwB;AAtCd,SAAAA;AAAA,GAAA;AA0HZ,eAAsBC,iBACpB,SAUA;AAEA,QAAM,EAAE,YAAY,YAAY,IAAI,UAAU,CAAC;AAK/C,QAAM,cAAU,qEAAsC;AAAA,IACpD,UAAU,SAAS;AAAA,IACnB,QAAQ,SAAS;AAAA,EACnB,CAAC;AAED,QAAM,UAC0C,gBAAgB,OAAO;AAEvE,eAAa,aAAa;AAC1B,MAAI;AACF,UAAM,SAAS,MAAM,WAAW,QAAQ,OAAO;AAC/C,iBAAa,YAAY,MAAM;AAE/B,eAAO,uEAAwC,OAAO,IAAI;AAAA,EAC5D,SAAS,KAAU;AACjB,UAAM,uBAAmB,uBAAAC;AAAA,MACvB;AAAA,MACA;AAAA,QACE,wBAAwB,CAAC;AAAA,QACzB,0BAA0B;AAAA,UACxB,UAAU;AAAA,UACV,QAAQ;AAAA,QACV;AAAA,QACA,yBAAyB;AAAA,MAC3B;AAAA,MACA,CAAC,SAAS;AAAA,IACZ;AACA,iBAAa,UAAU,GAAG;AAE1B,UAAM;AAAA,EACR;AACF;;;AE7OO,SAASC,iBACd,YAC0B;AAC1B,SAAO,CAAC,YACNA;AAAA,IACE;AAAA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;;;AC9BA,IAAAC,uBAAiC;AAG1B,IAAMC,mBAEK,2DAAiBA,gBAAqB;","names":["getSitemapPages","import_rest_modules","ItemType","getSitemapPages","sdkTransformError","getSitemapPages","import_rest_modules","getSitemapPages"]}
@@ -0,0 +1,174 @@
1
+ import { NonNullablePaths } from '@wix/sdk-types';
2
+
3
+ /** Sitemap entry containing page information */
4
+ interface SitemapEntry {
5
+ /**
6
+ * Entity identifier (e.g., productId, pageId)
7
+ * @minLength 1
8
+ * @maxLength 255
9
+ */
10
+ _id?: string;
11
+ /** Indicates if the entry should be included in the generated sitemap. */
12
+ shouldIncludeInSitemap?: boolean;
13
+ /**
14
+ * Optional last modification date in ISO 8601 format
15
+ * @maxLength 50
16
+ */
17
+ lastmod?: string;
18
+ /**
19
+ * Optional list of images
20
+ * @maxSize 1000
21
+ */
22
+ images?: Image[];
23
+ /**
24
+ * Optional list of video data
25
+ * @maxSize 100
26
+ */
27
+ videos?: Video[];
28
+ }
29
+ /** Image information for sitemap entries */
30
+ interface Image {
31
+ /**
32
+ * Image URL
33
+ * @format WEB_URL
34
+ * @maxLength 2048
35
+ * @minLength 1
36
+ */
37
+ url?: string;
38
+ /**
39
+ * Optional image alt text
40
+ * @maxLength 2048
41
+ */
42
+ altText?: string;
43
+ }
44
+ /** Video information for sitemap entries */
45
+ interface Video {
46
+ /**
47
+ * Video content location URL
48
+ * @format WEB_URL
49
+ * @maxLength 2048
50
+ * @minLength 1
51
+ */
52
+ contentLoc?: string;
53
+ /**
54
+ * Video thumbnail location URL
55
+ * @format WEB_URL
56
+ * @maxLength 2048
57
+ * @minLength 1
58
+ */
59
+ thumbnailLoc?: string;
60
+ /**
61
+ * Optional video title
62
+ * @maxLength 255
63
+ */
64
+ title?: string;
65
+ /**
66
+ * Optional video description
67
+ * @maxLength 1000
68
+ */
69
+ description?: string;
70
+ }
71
+ /** Request message for getting sitemap pages */
72
+ interface GetSitemapPagesRequest {
73
+ /** Item type identifier - must be a valid enum value */
74
+ itemType?: ItemTypeWithLiterals;
75
+ /** Optional cursor for pagination */
76
+ cursor?: CursorPaging;
77
+ }
78
+ /** Enum representing different types of items that can have sitemap entries */
79
+ declare enum ItemType {
80
+ /** Stores products */
81
+ STORES_PRODUCT = "STORES_PRODUCT",
82
+ /** Blog posts */
83
+ BLOG_POST = "BLOG_POST",
84
+ /** Blog categories */
85
+ BLOG_CATEGORY = "BLOG_CATEGORY",
86
+ /** Blog tags */
87
+ BLOG_TAGS = "BLOG_TAGS",
88
+ /** Blog archives */
89
+ BLOG_ARCHIVE = "BLOG_ARCHIVE",
90
+ /** Forum posts */
91
+ FORUM_POST = "FORUM_POST",
92
+ /** Forum categories */
93
+ FORUM_CATEGORY = "FORUM_CATEGORY",
94
+ /** Groups posts */
95
+ GROUPS_POST = "GROUPS_POST",
96
+ /** Groups pages */
97
+ GROUPS_PAGE = "GROUPS_PAGE",
98
+ /** Events pages */
99
+ EVENTS_PAGE = "EVENTS_PAGE",
100
+ /** Bookings services */
101
+ BOOKINGS_SERVICE = "BOOKINGS_SERVICE",
102
+ /** Members area profiles */
103
+ MEMBERS_AREA_PROFILE = "MEMBERS_AREA_PROFILE",
104
+ /** Challenges/online programs pages */
105
+ CHALLENGES_PAGE = "CHALLENGES_PAGE",
106
+ /** Store categories */
107
+ STORES_CATEGORY = "STORES_CATEGORY",
108
+ /** Store sub-categories */
109
+ STORES_SUB_CATEGORY = "STORES_SUB_CATEGORY",
110
+ /** Portfolio collections */
111
+ PORTFOLIO_COLLECTIONS = "PORTFOLIO_COLLECTIONS",
112
+ /** Portfolio projects */
113
+ PORTFOLIO_PROJECTS = "PORTFOLIO_PROJECTS",
114
+ /** Pricing plans */
115
+ PRICING_PLANS = "PRICING_PLANS",
116
+ /** Restaurant menu pages */
117
+ RESTAURANTS_MENU_PAGE = "RESTAURANTS_MENU_PAGE"
118
+ }
119
+ /** @enumType */
120
+ type ItemTypeWithLiterals = ItemType | 'STORES_PRODUCT' | 'BLOG_POST' | 'BLOG_CATEGORY' | 'BLOG_TAGS' | 'BLOG_ARCHIVE' | 'FORUM_POST' | 'FORUM_CATEGORY' | 'GROUPS_POST' | 'GROUPS_PAGE' | 'EVENTS_PAGE' | 'BOOKINGS_SERVICE' | 'MEMBERS_AREA_PROFILE' | 'CHALLENGES_PAGE' | 'STORES_CATEGORY' | 'STORES_SUB_CATEGORY' | 'PORTFOLIO_COLLECTIONS' | 'PORTFOLIO_PROJECTS' | 'PRICING_PLANS' | 'RESTAURANTS_MENU_PAGE';
121
+ interface CursorPaging {
122
+ /**
123
+ * Maximum number of items to return in the results.
124
+ * @max 200
125
+ */
126
+ limit?: number | null;
127
+ /**
128
+ * Pointer to the next or previous page in the list of results.
129
+ *
130
+ * Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.
131
+ * Not relevant for the first request.
132
+ * @maxLength 16000
133
+ */
134
+ cursor?: string | null;
135
+ }
136
+ /** Response message for getting sitemap pages */
137
+ interface GetSitemapPagesResponse {
138
+ /** List of sitemap entries */
139
+ pages?: SitemapEntry[];
140
+ /** Paging metadata for next page of results */
141
+ cursor?: CursorResponse;
142
+ }
143
+ /** Cursor response containing pagination information as in siteStructure service */
144
+ interface CursorResponse {
145
+ /** Total count of items */
146
+ count?: number;
147
+ /**
148
+ * Cursor for pagination
149
+ * @maxLength 16000
150
+ */
151
+ cursor?: string;
152
+ }
153
+ type HeadlessSitemapEntryNonNullablePaths = `_id` | `shouldIncludeInSitemap` | `lastmod` | `images` | `images.${number}.url` | `images.${number}.altText` | `videos` | `videos.${number}.contentLoc` | `videos.${number}.thumbnailLoc` | `videos.${number}.title` | `videos.${number}.description`;
154
+ /**
155
+ * Gets sitemap pages for a given item type with optional pagination
156
+ * @public
157
+ * @documentationMaturity preview
158
+ * @permissionId WIX.SEO_SITEMAP_ENTRIES_READ
159
+ * @applicableIdentity APP
160
+ * @applicableIdentity VISITOR
161
+ * @returns Response message for getting sitemap pages
162
+ * @fqn wix.promote.seo.headless.sitemap.service.v1.SeoHeadlessSitemapService.GetSitemapPages
163
+ */
164
+ declare function getSitemapPages(options?: GetSitemapPagesOptions): Promise<NonNullablePaths<GetSitemapPagesResponse, {
165
+ [P in HeadlessSitemapEntryNonNullablePaths]: `pages.${number}.${P}`;
166
+ }[HeadlessSitemapEntryNonNullablePaths] | `cursor.count` | `cursor.cursor`>>;
167
+ interface GetSitemapPagesOptions {
168
+ /** Item type identifier - must be a valid enum value */
169
+ itemType?: ItemTypeWithLiterals;
170
+ /** Optional cursor for pagination */
171
+ cursor?: CursorPaging;
172
+ }
173
+
174
+ export { type CursorPaging, type CursorResponse, type GetSitemapPagesOptions, type GetSitemapPagesRequest, type GetSitemapPagesResponse, type Image, ItemType, type ItemTypeWithLiterals, type SitemapEntry, type Video, getSitemapPages };
@@ -0,0 +1,114 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // index.typings.ts
21
+ var index_typings_exports = {};
22
+ __export(index_typings_exports, {
23
+ ItemType: () => ItemType,
24
+ getSitemapPages: () => getSitemapPages2
25
+ });
26
+ module.exports = __toCommonJS(index_typings_exports);
27
+
28
+ // src/promote-seo-v1-headless-sitemap-entry-seo-sitemap-entries.universal.ts
29
+ var import_transform_error = require("@wix/sdk-runtime/transform-error");
30
+ var import_rename_all_nested_keys = require("@wix/sdk-runtime/rename-all-nested-keys");
31
+
32
+ // src/promote-seo-v1-headless-sitemap-entry-seo-sitemap-entries.http.ts
33
+ var import_rest_modules = require("@wix/sdk-runtime/rest-modules");
34
+ var import_rest_modules2 = require("@wix/sdk-runtime/rest-modules");
35
+ function resolveWixPromoteSeoHeadlessSitemapServiceV1SeoHeadlessSitemapServiceUrl(opts) {
36
+ const domainToMappings = {};
37
+ return (0, import_rest_modules2.resolveUrl)(Object.assign(opts, { domainToMappings }));
38
+ }
39
+ var PACKAGE_NAME = "@wix/auto_sdk_seo_seo-sitemap-entries";
40
+ function getSitemapPages(payload) {
41
+ function __getSitemapPages({ host }) {
42
+ const metadata = {
43
+ entityFqdn: "wix.promote.seo.v1.headless_sitemap_entry",
44
+ method: "GET",
45
+ methodFqn: "wix.promote.seo.headless.sitemap.service.v1.SeoHeadlessSitemapService.GetSitemapPages",
46
+ packageName: PACKAGE_NAME,
47
+ url: resolveWixPromoteSeoHeadlessSitemapServiceV1SeoHeadlessSitemapServiceUrl(
48
+ { protoPath: "/v1/get-sitemap-pages", data: payload, host }
49
+ ),
50
+ params: (0, import_rest_modules.toURLSearchParams)(payload)
51
+ };
52
+ return metadata;
53
+ }
54
+ return __getSitemapPages;
55
+ }
56
+
57
+ // src/promote-seo-v1-headless-sitemap-entry-seo-sitemap-entries.universal.ts
58
+ var ItemType = /* @__PURE__ */ ((ItemType2) => {
59
+ ItemType2["STORES_PRODUCT"] = "STORES_PRODUCT";
60
+ ItemType2["BLOG_POST"] = "BLOG_POST";
61
+ ItemType2["BLOG_CATEGORY"] = "BLOG_CATEGORY";
62
+ ItemType2["BLOG_TAGS"] = "BLOG_TAGS";
63
+ ItemType2["BLOG_ARCHIVE"] = "BLOG_ARCHIVE";
64
+ ItemType2["FORUM_POST"] = "FORUM_POST";
65
+ ItemType2["FORUM_CATEGORY"] = "FORUM_CATEGORY";
66
+ ItemType2["GROUPS_POST"] = "GROUPS_POST";
67
+ ItemType2["GROUPS_PAGE"] = "GROUPS_PAGE";
68
+ ItemType2["EVENTS_PAGE"] = "EVENTS_PAGE";
69
+ ItemType2["BOOKINGS_SERVICE"] = "BOOKINGS_SERVICE";
70
+ ItemType2["MEMBERS_AREA_PROFILE"] = "MEMBERS_AREA_PROFILE";
71
+ ItemType2["CHALLENGES_PAGE"] = "CHALLENGES_PAGE";
72
+ ItemType2["STORES_CATEGORY"] = "STORES_CATEGORY";
73
+ ItemType2["STORES_SUB_CATEGORY"] = "STORES_SUB_CATEGORY";
74
+ ItemType2["PORTFOLIO_COLLECTIONS"] = "PORTFOLIO_COLLECTIONS";
75
+ ItemType2["PORTFOLIO_PROJECTS"] = "PORTFOLIO_PROJECTS";
76
+ ItemType2["PRICING_PLANS"] = "PRICING_PLANS";
77
+ ItemType2["RESTAURANTS_MENU_PAGE"] = "RESTAURANTS_MENU_PAGE";
78
+ return ItemType2;
79
+ })(ItemType || {});
80
+ async function getSitemapPages2(options) {
81
+ const { httpClient, sideEffects } = arguments[1];
82
+ const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
83
+ itemType: options?.itemType,
84
+ cursor: options?.cursor
85
+ });
86
+ const reqOpts = getSitemapPages(payload);
87
+ sideEffects?.onSiteCall?.();
88
+ try {
89
+ const result = await httpClient.request(reqOpts);
90
+ sideEffects?.onSuccess?.(result);
91
+ return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
92
+ } catch (err) {
93
+ const transformedError = (0, import_transform_error.transformError)(
94
+ err,
95
+ {
96
+ spreadPathsToArguments: {},
97
+ explicitPathsToArguments: {
98
+ itemType: "$[0].itemType",
99
+ cursor: "$[0].cursor"
100
+ },
101
+ singleArgumentUnchanged: false
102
+ },
103
+ ["options"]
104
+ );
105
+ sideEffects?.onError?.(err);
106
+ throw transformedError;
107
+ }
108
+ }
109
+ // Annotate the CommonJS export names for ESM import in node:
110
+ 0 && (module.exports = {
111
+ ItemType,
112
+ getSitemapPages
113
+ });
114
+ //# sourceMappingURL=index.typings.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../index.typings.ts","../../src/promote-seo-v1-headless-sitemap-entry-seo-sitemap-entries.universal.ts","../../src/promote-seo-v1-headless-sitemap-entry-seo-sitemap-entries.http.ts"],"sourcesContent":["export * from './src/promote-seo-v1-headless-sitemap-entry-seo-sitemap-entries.universal.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 ambassadorWixPromoteSeoV1HeadlessSitemapEntry from './promote-seo-v1-headless-sitemap-entry-seo-sitemap-entries.http.js';\n\n/** Sitemap entry containing page information */\nexport interface SitemapEntry {\n /**\n * Entity identifier (e.g., productId, pageId)\n * @minLength 1\n * @maxLength 255\n */\n _id?: string;\n /** Indicates if the entry should be included in the generated sitemap. */\n shouldIncludeInSitemap?: boolean;\n /**\n * Optional last modification date in ISO 8601 format\n * @maxLength 50\n */\n lastmod?: string;\n /**\n * Optional list of images\n * @maxSize 1000\n */\n images?: Image[];\n /**\n * Optional list of video data\n * @maxSize 100\n */\n videos?: Video[];\n}\n\n/** Image information for sitemap entries */\nexport interface Image {\n /**\n * Image URL\n * @format WEB_URL\n * @maxLength 2048\n * @minLength 1\n */\n url?: string;\n /**\n * Optional image alt text\n * @maxLength 2048\n */\n altText?: string;\n}\n\n/** Video information for sitemap entries */\nexport interface Video {\n /**\n * Video content location URL\n * @format WEB_URL\n * @maxLength 2048\n * @minLength 1\n */\n contentLoc?: string;\n /**\n * Video thumbnail location URL\n * @format WEB_URL\n * @maxLength 2048\n * @minLength 1\n */\n thumbnailLoc?: string;\n /**\n * Optional video title\n * @maxLength 255\n */\n title?: string;\n /**\n * Optional video description\n * @maxLength 1000\n */\n description?: string;\n}\n\n/** Request message for getting sitemap pages */\nexport interface GetSitemapPagesRequest {\n /** Item type identifier - must be a valid enum value */\n itemType?: ItemTypeWithLiterals;\n /** Optional cursor for pagination */\n cursor?: CursorPaging;\n}\n\n/** Enum representing different types of items that can have sitemap entries */\nexport enum ItemType {\n /** Stores products */\n STORES_PRODUCT = 'STORES_PRODUCT',\n /** Blog posts */\n BLOG_POST = 'BLOG_POST',\n /** Blog categories */\n BLOG_CATEGORY = 'BLOG_CATEGORY',\n /** Blog tags */\n BLOG_TAGS = 'BLOG_TAGS',\n /** Blog archives */\n BLOG_ARCHIVE = 'BLOG_ARCHIVE',\n /** Forum posts */\n FORUM_POST = 'FORUM_POST',\n /** Forum categories */\n FORUM_CATEGORY = 'FORUM_CATEGORY',\n /** Groups posts */\n GROUPS_POST = 'GROUPS_POST',\n /** Groups pages */\n GROUPS_PAGE = 'GROUPS_PAGE',\n /** Events pages */\n EVENTS_PAGE = 'EVENTS_PAGE',\n /** Bookings services */\n BOOKINGS_SERVICE = 'BOOKINGS_SERVICE',\n /** Members area profiles */\n MEMBERS_AREA_PROFILE = 'MEMBERS_AREA_PROFILE',\n /** Challenges/online programs pages */\n CHALLENGES_PAGE = 'CHALLENGES_PAGE',\n /** Store categories */\n STORES_CATEGORY = 'STORES_CATEGORY',\n /** Store sub-categories */\n STORES_SUB_CATEGORY = 'STORES_SUB_CATEGORY',\n /** Portfolio collections */\n PORTFOLIO_COLLECTIONS = 'PORTFOLIO_COLLECTIONS',\n /** Portfolio projects */\n PORTFOLIO_PROJECTS = 'PORTFOLIO_PROJECTS',\n /** Pricing plans */\n PRICING_PLANS = 'PRICING_PLANS',\n /** Restaurant menu pages */\n RESTAURANTS_MENU_PAGE = 'RESTAURANTS_MENU_PAGE',\n}\n\n/** @enumType */\nexport type ItemTypeWithLiterals =\n | ItemType\n | 'STORES_PRODUCT'\n | 'BLOG_POST'\n | 'BLOG_CATEGORY'\n | 'BLOG_TAGS'\n | 'BLOG_ARCHIVE'\n | 'FORUM_POST'\n | 'FORUM_CATEGORY'\n | 'GROUPS_POST'\n | 'GROUPS_PAGE'\n | 'EVENTS_PAGE'\n | 'BOOKINGS_SERVICE'\n | 'MEMBERS_AREA_PROFILE'\n | 'CHALLENGES_PAGE'\n | 'STORES_CATEGORY'\n | 'STORES_SUB_CATEGORY'\n | 'PORTFOLIO_COLLECTIONS'\n | 'PORTFOLIO_PROJECTS'\n | 'PRICING_PLANS'\n | 'RESTAURANTS_MENU_PAGE';\n\nexport interface CursorPaging {\n /**\n * Maximum number of items to return in the results.\n * @max 200\n */\n limit?: number | null;\n /**\n * Pointer to the next or previous page in the list of results.\n *\n * Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.\n * Not relevant for the first request.\n * @maxLength 16000\n */\n cursor?: string | null;\n}\n\n/** Response message for getting sitemap pages */\nexport interface GetSitemapPagesResponse {\n /** List of sitemap entries */\n pages?: SitemapEntry[];\n /** Paging metadata for next page of results */\n cursor?: CursorResponse;\n}\n\n/** Cursor response containing pagination information as in siteStructure service */\nexport interface CursorResponse {\n /** Total count of items */\n count?: number;\n /**\n * Cursor for pagination\n * @maxLength 16000\n */\n cursor?: string;\n}\n\ntype HeadlessSitemapEntryNonNullablePaths =\n | `_id`\n | `shouldIncludeInSitemap`\n | `lastmod`\n | `images`\n | `images.${number}.url`\n | `images.${number}.altText`\n | `videos`\n | `videos.${number}.contentLoc`\n | `videos.${number}.thumbnailLoc`\n | `videos.${number}.title`\n | `videos.${number}.description`;\n\n/**\n * Gets sitemap pages for a given item type with optional pagination\n * @public\n * @documentationMaturity preview\n * @permissionId WIX.SEO_SITEMAP_ENTRIES_READ\n * @applicableIdentity APP\n * @applicableIdentity VISITOR\n * @returns Response message for getting sitemap pages\n * @fqn wix.promote.seo.headless.sitemap.service.v1.SeoHeadlessSitemapService.GetSitemapPages\n */\nexport async function getSitemapPages(\n options?: GetSitemapPagesOptions\n): Promise<\n NonNullablePaths<\n GetSitemapPagesResponse,\n | {\n [P in HeadlessSitemapEntryNonNullablePaths]: `pages.${number}.${P}`;\n }[HeadlessSitemapEntryNonNullablePaths]\n | `cursor.count`\n | `cursor.cursor`\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 itemType: options?.itemType,\n cursor: options?.cursor,\n });\n\n const reqOpts =\n ambassadorWixPromoteSeoV1HeadlessSitemapEntry.getSitemapPages(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 itemType: '$[0].itemType',\n cursor: '$[0].cursor',\n },\n singleArgumentUnchanged: false,\n },\n ['options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface GetSitemapPagesOptions {\n /** Item type identifier - must be a valid enum value */\n itemType?: ItemTypeWithLiterals;\n /** Optional cursor for pagination */\n cursor?: CursorPaging;\n}\n","import { toURLSearchParams } from '@wix/sdk-runtime/rest-modules';\nimport { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nfunction resolveWixPromoteSeoHeadlessSitemapServiceV1SeoHeadlessSitemapServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {};\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_seo_seo-sitemap-entries';\n\n/** Gets sitemap pages for a given item type with optional pagination */\nexport function getSitemapPages(payload: object): RequestOptionsFactory<any> {\n function __getSitemapPages({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.promote.seo.v1.headless_sitemap_entry',\n method: 'GET' as any,\n methodFqn:\n 'wix.promote.seo.headless.sitemap.service.v1.SeoHeadlessSitemapService.GetSitemapPages',\n packageName: PACKAGE_NAME,\n url: resolveWixPromoteSeoHeadlessSitemapServiceV1SeoHeadlessSitemapServiceUrl(\n { protoPath: '/v1/get-sitemap-pages', data: payload, host }\n ),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __getSitemapPages;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA,yBAAAA;AAAA;AAAA;;;ACAA,6BAAoD;AACpD,oCAGO;;;ACJP,0BAAkC;AAClC,IAAAC,uBAA2B;AAI3B,SAAS,yEACP,MACA;AACA,QAAM,mBAAmB,CAAC;AAE1B,aAAO,iCAAW,OAAO,OAAO,MAAM,EAAE,iBAAiB,CAAC,CAAC;AAC7D;AAEA,IAAM,eAAe;AAGd,SAAS,gBAAgB,SAA6C;AAC3E,WAAS,kBAAkB,EAAE,KAAK,GAAQ;AACxC,UAAM,WAAW;AAAA,MACf,YAAY;AAAA,MACZ,QAAQ;AAAA,MACR,WACE;AAAA,MACF,aAAa;AAAA,MACb,KAAK;AAAA,QACH,EAAE,WAAW,yBAAyB,MAAM,SAAS,KAAK;AAAA,MAC5D;AAAA,MACA,YAAQ,uCAAkB,OAAO;AAAA,IACnC;AAEA,WAAO;AAAA,EACT;AAEA,SAAO;AACT;;;ADsDO,IAAK,WAAL,kBAAKC,cAAL;AAEL,EAAAA,UAAA,oBAAiB;AAEjB,EAAAA,UAAA,eAAY;AAEZ,EAAAA,UAAA,mBAAgB;AAEhB,EAAAA,UAAA,eAAY;AAEZ,EAAAA,UAAA,kBAAe;AAEf,EAAAA,UAAA,gBAAa;AAEb,EAAAA,UAAA,oBAAiB;AAEjB,EAAAA,UAAA,iBAAc;AAEd,EAAAA,UAAA,iBAAc;AAEd,EAAAA,UAAA,iBAAc;AAEd,EAAAA,UAAA,sBAAmB;AAEnB,EAAAA,UAAA,0BAAuB;AAEvB,EAAAA,UAAA,qBAAkB;AAElB,EAAAA,UAAA,qBAAkB;AAElB,EAAAA,UAAA,yBAAsB;AAEtB,EAAAA,UAAA,2BAAwB;AAExB,EAAAA,UAAA,wBAAqB;AAErB,EAAAA,UAAA,mBAAgB;AAEhB,EAAAA,UAAA,2BAAwB;AAtCd,SAAAA;AAAA,GAAA;AA0HZ,eAAsBC,iBACpB,SAUA;AAEA,QAAM,EAAE,YAAY,YAAY,IAAI,UAAU,CAAC;AAK/C,QAAM,cAAU,qEAAsC;AAAA,IACpD,UAAU,SAAS;AAAA,IACnB,QAAQ,SAAS;AAAA,EACnB,CAAC;AAED,QAAM,UAC0C,gBAAgB,OAAO;AAEvE,eAAa,aAAa;AAC1B,MAAI;AACF,UAAM,SAAS,MAAM,WAAW,QAAQ,OAAO;AAC/C,iBAAa,YAAY,MAAM;AAE/B,eAAO,uEAAwC,OAAO,IAAI;AAAA,EAC5D,SAAS,KAAU;AACjB,UAAM,uBAAmB,uBAAAC;AAAA,MACvB;AAAA,MACA;AAAA,QACE,wBAAwB,CAAC;AAAA,QACzB,0BAA0B;AAAA,UACxB,UAAU;AAAA,UACV,QAAQ;AAAA,QACV;AAAA,QACA,yBAAyB;AAAA,MAC3B;AAAA,MACA,CAAC,SAAS;AAAA,IACZ;AACA,iBAAa,UAAU,GAAG;AAE1B,UAAM;AAAA,EACR;AACF;","names":["getSitemapPages","import_rest_modules","ItemType","getSitemapPages","sdkTransformError"]}
@@ -0,0 +1,167 @@
1
+ import { GetSitemapPagesRequest as GetSitemapPagesRequest$1, GetSitemapPagesResponse as GetSitemapPagesResponse$1 } from './index.typings.js';
2
+ import '@wix/sdk-types';
3
+
4
+ /** Sitemap entry containing page information */
5
+ interface SitemapEntry {
6
+ /**
7
+ * Entity identifier (e.g., productId, pageId)
8
+ * @minLength 1
9
+ * @maxLength 255
10
+ */
11
+ id?: string;
12
+ /** Indicates if the entry should be included in the generated sitemap. */
13
+ shouldIncludeInSitemap?: boolean;
14
+ /**
15
+ * Optional last modification date in ISO 8601 format
16
+ * @maxLength 50
17
+ */
18
+ lastmod?: string;
19
+ /**
20
+ * Optional list of images
21
+ * @maxSize 1000
22
+ */
23
+ images?: Image[];
24
+ /**
25
+ * Optional list of video data
26
+ * @maxSize 100
27
+ */
28
+ videos?: Video[];
29
+ }
30
+ /** Image information for sitemap entries */
31
+ interface Image {
32
+ /**
33
+ * Image URL
34
+ * @format WEB_URL
35
+ * @maxLength 2048
36
+ * @minLength 1
37
+ */
38
+ url?: string;
39
+ /**
40
+ * Optional image alt text
41
+ * @maxLength 2048
42
+ */
43
+ altText?: string;
44
+ }
45
+ /** Video information for sitemap entries */
46
+ interface Video {
47
+ /**
48
+ * Video content location URL
49
+ * @format WEB_URL
50
+ * @maxLength 2048
51
+ * @minLength 1
52
+ */
53
+ contentLoc?: string;
54
+ /**
55
+ * Video thumbnail location URL
56
+ * @format WEB_URL
57
+ * @maxLength 2048
58
+ * @minLength 1
59
+ */
60
+ thumbnailLoc?: string;
61
+ /**
62
+ * Optional video title
63
+ * @maxLength 255
64
+ */
65
+ title?: string;
66
+ /**
67
+ * Optional video description
68
+ * @maxLength 1000
69
+ */
70
+ description?: string;
71
+ }
72
+ /** Request message for getting sitemap pages */
73
+ interface GetSitemapPagesRequest {
74
+ /** Item type identifier - must be a valid enum value */
75
+ itemType?: ItemTypeWithLiterals;
76
+ /** Optional cursor for pagination */
77
+ cursor?: CursorPaging;
78
+ }
79
+ /** Enum representing different types of items that can have sitemap entries */
80
+ declare enum ItemType {
81
+ /** Stores products */
82
+ STORES_PRODUCT = "STORES_PRODUCT",
83
+ /** Blog posts */
84
+ BLOG_POST = "BLOG_POST",
85
+ /** Blog categories */
86
+ BLOG_CATEGORY = "BLOG_CATEGORY",
87
+ /** Blog tags */
88
+ BLOG_TAGS = "BLOG_TAGS",
89
+ /** Blog archives */
90
+ BLOG_ARCHIVE = "BLOG_ARCHIVE",
91
+ /** Forum posts */
92
+ FORUM_POST = "FORUM_POST",
93
+ /** Forum categories */
94
+ FORUM_CATEGORY = "FORUM_CATEGORY",
95
+ /** Groups posts */
96
+ GROUPS_POST = "GROUPS_POST",
97
+ /** Groups pages */
98
+ GROUPS_PAGE = "GROUPS_PAGE",
99
+ /** Events pages */
100
+ EVENTS_PAGE = "EVENTS_PAGE",
101
+ /** Bookings services */
102
+ BOOKINGS_SERVICE = "BOOKINGS_SERVICE",
103
+ /** Members area profiles */
104
+ MEMBERS_AREA_PROFILE = "MEMBERS_AREA_PROFILE",
105
+ /** Challenges/online programs pages */
106
+ CHALLENGES_PAGE = "CHALLENGES_PAGE",
107
+ /** Store categories */
108
+ STORES_CATEGORY = "STORES_CATEGORY",
109
+ /** Store sub-categories */
110
+ STORES_SUB_CATEGORY = "STORES_SUB_CATEGORY",
111
+ /** Portfolio collections */
112
+ PORTFOLIO_COLLECTIONS = "PORTFOLIO_COLLECTIONS",
113
+ /** Portfolio projects */
114
+ PORTFOLIO_PROJECTS = "PORTFOLIO_PROJECTS",
115
+ /** Pricing plans */
116
+ PRICING_PLANS = "PRICING_PLANS",
117
+ /** Restaurant menu pages */
118
+ RESTAURANTS_MENU_PAGE = "RESTAURANTS_MENU_PAGE"
119
+ }
120
+ /** @enumType */
121
+ type ItemTypeWithLiterals = ItemType | 'STORES_PRODUCT' | 'BLOG_POST' | 'BLOG_CATEGORY' | 'BLOG_TAGS' | 'BLOG_ARCHIVE' | 'FORUM_POST' | 'FORUM_CATEGORY' | 'GROUPS_POST' | 'GROUPS_PAGE' | 'EVENTS_PAGE' | 'BOOKINGS_SERVICE' | 'MEMBERS_AREA_PROFILE' | 'CHALLENGES_PAGE' | 'STORES_CATEGORY' | 'STORES_SUB_CATEGORY' | 'PORTFOLIO_COLLECTIONS' | 'PORTFOLIO_PROJECTS' | 'PRICING_PLANS' | 'RESTAURANTS_MENU_PAGE';
122
+ interface CursorPaging {
123
+ /**
124
+ * Maximum number of items to return in the results.
125
+ * @max 200
126
+ */
127
+ limit?: number | null;
128
+ /**
129
+ * Pointer to the next or previous page in the list of results.
130
+ *
131
+ * Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.
132
+ * Not relevant for the first request.
133
+ * @maxLength 16000
134
+ */
135
+ cursor?: string | null;
136
+ }
137
+ /** Response message for getting sitemap pages */
138
+ interface GetSitemapPagesResponse {
139
+ /** List of sitemap entries */
140
+ pages?: SitemapEntry[];
141
+ /** Paging metadata for next page of results */
142
+ cursor?: CursorResponse;
143
+ }
144
+ /** Cursor response containing pagination information as in siteStructure service */
145
+ interface CursorResponse {
146
+ /** Total count of items */
147
+ count?: number;
148
+ /**
149
+ * Cursor for pagination
150
+ * @maxLength 16000
151
+ */
152
+ cursor?: string;
153
+ }
154
+
155
+ type __PublicMethodMetaInfo<K = string, M = unknown, T = unknown, S = unknown, Q = unknown, R = unknown> = {
156
+ getUrl: (context: any) => string;
157
+ httpMethod: K;
158
+ path: string;
159
+ pathParams: M;
160
+ __requestType: T;
161
+ __originalRequestType: S;
162
+ __responseType: Q;
163
+ __originalResponseType: R;
164
+ };
165
+ declare function getSitemapPages(): __PublicMethodMetaInfo<'GET', {}, GetSitemapPagesRequest$1, GetSitemapPagesRequest, GetSitemapPagesResponse$1, GetSitemapPagesResponse>;
166
+
167
+ export { type __PublicMethodMetaInfo, getSitemapPages };