@wix/auto_sdk_sites_sites 1.0.18 → 1.0.19

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.
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../index.ts","../../../src/site-list-v2-site-sites.universal.ts","../../../src/site-list-v2-site-sites.http.ts","../../../src/site-list-v2-site-sites.public.ts","../../../src/site-list-v2-site-sites.context.ts"],"sourcesContent":["export * from './src/site-list-v2-site-sites.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 ambassadorWixSiteListV2Site from './site-list-v2-site-sites.http.js';\n\nexport interface Site {\n /**\n * Site ID.\n * @format GUID\n */\n _id?: string;\n /**\n * HTML app ID for the site.\n * @format GUID\n */\n htmlAppId?: string | null;\n /** Site name. Used in the site's URL. */\n name?: string;\n /** Site display name. Used for display purposes, such as in the browser's tab name. */\n displayName?: string;\n /** Site creation date. */\n _createdDate?: Date | null;\n /** Site updated date. */\n _updatedDate?: Date | null;\n /** Site trashed date. */\n trashedDate?: Date | null;\n /** Whether the site is published. */\n published?: boolean;\n /** Whether the site has a Wix Premium (paid) plan. */\n premium?: boolean;\n /** Live site URL. */\n viewUrl?: string;\n /** Editor site URL. */\n editUrl?: string;\n /** Site thumbnail. */\n thumbnail?: string;\n /**\n * Site owner's account ID.\n * @format GUID\n */\n ownerAccountId?: string;\n /**\n * Site contributors' account IDs.\n * @format GUID\n * @minSize 1\n * @maxSize 1000\n */\n contributorAccountIds?: string[];\n /** Site's Wix editor type. */\n editorType?: EditorTypeWithLiterals;\n /** Whether Wix has blocked this site due to legal issues. */\n blocked?: boolean;\n /**\n * Folder ID that contains this site. Empty if site is at root level.\n * @format GUID\n */\n folderId?: string | null;\n /** Namespace of the site, for internal use. */\n namespace?: NamespaceWithLiterals;\n /** Whether the site has a connected domain. */\n domainConnected?: boolean;\n}\n\nexport enum EditorType {\n UNKNOWN = 'UNKNOWN',\n EDITOR = 'EDITOR',\n ADI = 'ADI',\n EDITORX = 'EDITORX',\n STUDIO = 'STUDIO',\n ODEDITOR = 'ODEDITOR',\n PICASSO = 'PICASSO',\n}\n\n/** @enumType */\nexport type EditorTypeWithLiterals =\n | EditorType\n | 'UNKNOWN'\n | 'EDITOR'\n | 'ADI'\n | 'EDITORX'\n | 'STUDIO'\n | 'ODEDITOR'\n | 'PICASSO';\n\nexport enum Namespace {\n UNKNOWN_NAMESPACE = 'UNKNOWN_NAMESPACE',\n /** Default namespace for UGC sites. MetaSites with this namespace will be shown in a user's site list by default. */\n WIX = 'WIX',\n /** ShoutOut stand alone product. These are siteless (no actual Wix site, no HtmlWeb). MetaSites with this namespace will *not* be shown in a user's site list by default. */\n SHOUT_OUT = 'SHOUT_OUT',\n /** MetaSites created by the Albums product, they appear as part of the Albums app. MetaSites with this namespace will *not* be shown in a user's site list by default. */\n ALBUMS = 'ALBUMS',\n /** Part of the WixStores migration flow, a user tries to migrate and gets this site to view and if the user likes it then stores removes this namespace and deletes the old site with the old stores. MetaSites with this namespace will *not* be shown in a user's site list by default. */\n WIX_STORES_TEST_DRIVE = 'WIX_STORES_TEST_DRIVE',\n /** Hotels standalone (siteless). MetaSites with this namespace will *not* be shown in a user's site list by default. */\n HOTELS = 'HOTELS',\n /** Clubs siteless MetaSites, a club without a wix website. MetaSites with this namespace will *not* be shown in a user's site list by default. */\n CLUBS = 'CLUBS',\n /** A partially created ADI website. MetaSites with this namespace will *not* be shown in a user's site list by default. */\n ONBOARDING_DRAFT = 'ONBOARDING_DRAFT',\n /** AppBuilder for AppStudio / shmite (c). MetaSites with this namespace will *not* be shown in a user's site list by default. */\n DEV_SITE = 'DEV_SITE',\n /** LogoMaker websites offered to the user after logo purchase. MetaSites with this namespace will *not* be shown in a user's site list by default. */\n LOGOS = 'LOGOS',\n /** VideoMaker websites offered to the user after video purchase. MetaSites with this namespace will *not* be shown in a user's site list by default. */\n VIDEO_MAKER = 'VIDEO_MAKER',\n /** MetaSites with this namespace will *not* be shown in a user's site list by default. */\n PARTNER_DASHBOARD = 'PARTNER_DASHBOARD',\n /** MetaSites with this namespace will *not* be shown in a user's site list by default. */\n DEV_CENTER_COMPANY = 'DEV_CENTER_COMPANY',\n /**\n * A draft created by HTML editor on open. Upon \"first save\" it will be moved to be of WIX domain.\n *\n * Meta site with this namespace will *not* be shown in a user's site list by default.\n */\n HTML_DRAFT = 'HTML_DRAFT',\n /**\n * the user-journey for Fitness users who want to start from managing their business instead of designing their website.\n * Will be accessible from Site List and will not have a website app.\n * Once the user attaches a site, the site will become a regular wixsite.\n */\n SITELESS_BUSINESS = 'SITELESS_BUSINESS',\n /** Belongs to \"strategic products\" company. Supports new product in the creator's economy space. */\n CREATOR_ECONOMY = 'CREATOR_ECONOMY',\n /** It is to be used in the Business First efforts. */\n DASHBOARD_FIRST = 'DASHBOARD_FIRST',\n /** Bookings business flow with no site. */\n ANYWHERE = 'ANYWHERE',\n /** Namespace for Headless Backoffice with no editor */\n HEADLESS = 'HEADLESS',\n /**\n * Namespace for master site that will exist in parent account that will be referenced by subaccounts\n * The site will be used for account level CSM feature for enterprise\n */\n ACCOUNT_MASTER_CMS = 'ACCOUNT_MASTER_CMS',\n /** Rise.ai Siteless account management for Gift Cards and Store Credit. */\n RISE = 'RISE',\n /**\n * As part of the branded app new funnel, users now can create a meta site that will be branded app first.\n * There's a blank site behind the scene but it's blank).\n * The Mobile company will be the owner of this namespace.\n */\n BRANDED_FIRST = 'BRANDED_FIRST',\n /** Nownia.com Siteless account management for Ai Scheduling Assistant. */\n NOWNIA = 'NOWNIA',\n /**\n * UGC Templates are templates that are created by users for personal use and to sale to other users.\n * The Partners company owns this namespace.\n */\n UGC_TEMPLATE = 'UGC_TEMPLATE',\n /** Codux Headless Sites */\n CODUX = 'CODUX',\n /** Bobb - AI Design Creator. */\n MEDIA_DESIGN_CREATOR = 'MEDIA_DESIGN_CREATOR',\n /**\n * Shared Blog Site is a unique single site across Enterprise account,\n * This site will hold all Blog posts related to the Marketing product.\n */\n SHARED_BLOG_ENTERPRISE = 'SHARED_BLOG_ENTERPRISE',\n /** Standalone forms (siteless). MetaSites with this namespace will *not* be shown in a user's site list by default. */\n STANDALONE_FORMS = 'STANDALONE_FORMS',\n /** Standalone events (siteless). MetaSites with this namespace will *not* be shown in a user's site list by default. */\n STANDALONE_EVENTS = 'STANDALONE_EVENTS',\n /** MIMIR - Siteless account for MIMIR Ai Job runner. */\n MIMIR = 'MIMIR',\n}\n\n/** @enumType */\nexport type NamespaceWithLiterals =\n | Namespace\n | 'UNKNOWN_NAMESPACE'\n | 'WIX'\n | 'SHOUT_OUT'\n | 'ALBUMS'\n | 'WIX_STORES_TEST_DRIVE'\n | 'HOTELS'\n | 'CLUBS'\n | 'ONBOARDING_DRAFT'\n | 'DEV_SITE'\n | 'LOGOS'\n | 'VIDEO_MAKER'\n | 'PARTNER_DASHBOARD'\n | 'DEV_CENTER_COMPANY'\n | 'HTML_DRAFT'\n | 'SITELESS_BUSINESS'\n | 'CREATOR_ECONOMY'\n | 'DASHBOARD_FIRST'\n | 'ANYWHERE'\n | 'HEADLESS'\n | 'ACCOUNT_MASTER_CMS'\n | 'RISE'\n | 'BRANDED_FIRST'\n | 'NOWNIA'\n | 'UGC_TEMPLATE'\n | 'CODUX'\n | 'MEDIA_DESIGN_CREATOR'\n | 'SHARED_BLOG_ENTERPRISE'\n | 'STANDALONE_FORMS'\n | 'STANDALONE_EVENTS'\n | 'MIMIR';\n\nexport interface QuerySitesRequest {\n /**\n * Filter and sorting with the following format:\n * `\"filter\" : { \"displayName\": \"my-site\" }`\n */\n query?: QueryV2;\n}\n\nexport interface QueryV2 extends QueryV2PagingMethodOneOf {\n /**\n * Paging options to limit and offset the number of items.\n * wix.common.Paging paging = 3;\n * Cursor token pointing to a page of results. Used in all calls following the first request.\n */\n cursorPaging?: CursorPaging;\n /**\n * Filter object with the following format:\n * `\"filter\" : {\n * \"displayName\": \"my-site\",\n * \"namespace\":{\"$in\":[\"value1\", \"value2\"]},\n * \"folderId\": {\"$exists\": false}\n * }`\n * Example of operators: `$in`, `$hasSome`, `$hasAll`, `$exists`\n */\n filter?: Record<string, any> | null;\n /**\n * Sort object with the following format:\n * `[{\"fieldName\":\"displayName\",\"order\":\"ASC\"},{\"fieldName\":\"createdDate\",\"order\":\"DESC\"}]`\n * @maxSize 4\n */\n sort?: Sorting[];\n}\n\n/** @oneof */\nexport interface QueryV2PagingMethodOneOf {\n /**\n * Paging options to limit and offset the number of items.\n * wix.common.Paging paging = 3;\n * Cursor token pointing to a page of results. Used in all calls following the first request.\n */\n cursorPaging?: CursorPaging;\n}\n\nexport interface Sorting {\n /**\n * Name of the field to sort by.\n * @maxLength 512\n */\n fieldName?: string;\n /** Sort order. */\n order?: SortOrderWithLiterals;\n}\n\nexport enum SortOrder {\n ASC = 'ASC',\n DESC = 'DESC',\n}\n\n/** @enumType */\nexport type SortOrderWithLiterals = SortOrder | 'ASC' | 'DESC';\n\nexport interface CursorPaging {\n /**\n * Maximum number of items to return in the results.\n * @max 100\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\nexport interface QuerySitesResponse {\n /** List of retrieved sites. */\n sites?: Site[];\n /**\n * Paging information.\n * @deprecated\n */\n cursorPaging?: CursorPaging;\n /** Meta data about the returned sites */\n metadata?: PagingMetadataV2;\n}\n\nexport interface PagingMetadataV2 {\n /** Number of items returned in the response. */\n count?: number | null;\n /** Cursors to navigate through the result pages using `next` and `prev`. Returned if cursor paging is used. */\n cursors?: Cursors;\n}\n\nexport interface Cursors {\n /** Cursor pointing to next page in the list of results. */\n next?: string | null;\n}\n\nexport interface CountSitesRequest {\n /**\n * Filter object. See [Filter and Sort](https://dev.wix.com/api/rest/account-level-apis/sites/filter-&-sort) documentation.\n * Note: the `premium` and `appIds` filters are not supported in this endpoint.\n */\n filter?: Record<string, any> | null;\n}\n\nexport interface CountSitesResponse {\n /**\n * Number of sites retrieved basd on the filter.\n * Free Wix accounts are limited to max 1,000 sites.\n * Premium accounts can have an unlimited number of sites.\n */\n count?: number;\n}\n\ntype SiteNonNullablePaths =\n | `_id`\n | `name`\n | `displayName`\n | `published`\n | `premium`\n | `viewUrl`\n | `editUrl`\n | `thumbnail`\n | `ownerAccountId`\n | `contributorAccountIds`\n | `editorType`\n | `blocked`\n | `namespace`\n | `domainConnected`;\n\n/**\n * Retrieves a list of up to 1,000 sites, given the provided [paging, sorting and filtering](https://dev.wix.com/api/rest/account-level-apis/sites/filter-&-sort).\n *\n * > **Important**: You can only call this method when authenticated as a Wix user or by using an account level API key.\n * @public\n * @permissionId SITE_LIST.READ\n * @fqn com.wixpress.sitelist.api.SiteListServiceV2.QuerySites\n */\nexport async function querySites(\n options?: QuerySitesOptions\n): Promise<\n NonNullablePaths<\n QuerySitesResponse,\n {\n [P in SiteNonNullablePaths]: `sites.${number}.${P}`;\n }[SiteNonNullablePaths]\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 query: options?.query,\n });\n\n const reqOpts = ambassadorWixSiteListV2Site.querySites(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: { query: '$[0].query' },\n singleArgumentUnchanged: false,\n },\n ['options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface QuerySitesOptions {\n /**\n * Filter and sorting with the following format:\n * `\"filter\" : { \"displayName\": \"my-site\" }`\n */\n query?: QueryV2;\n}\n\n/**\n * Retrieves the number of sites, given the provided [filtering](https://dev.wix.com/api/rest/account-level-apis/sites/filter-&-sort).\n *\n * > **Important**: You can only call this method when authenticated as a Wix user or by using an account level API key.\n * @public\n * @permissionId SITE_LIST.READ\n * @fqn com.wixpress.sitelist.api.SiteListServiceV2.CountSites\n */\nexport async function countSites(\n options?: CountSitesOptions\n): Promise<NonNullablePaths<CountSitesResponse, `count`>> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n filter: options?.filter,\n });\n\n const reqOpts = ambassadorWixSiteListV2Site.countSites(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: { filter: '$[0].filter' },\n singleArgumentUnchanged: false,\n },\n ['options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface CountSitesOptions {\n /**\n * Filter object. See [Filter and Sort](https://dev.wix.com/api/rest/account-level-apis/sites/filter-&-sort) documentation.\n * Note: the `premium` and `appIds` filters are not supported in this endpoint.\n */\n filter?: Record<string, any> | null;\n}\n","import { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\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 resolveComWixpressSitelistApiSiteListServiceV2Url(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'www._base_domain_': [\n {\n srcPath: '/_api/sites-list',\n destPath: '/api',\n },\n {\n srcPath: '/_api/sites-list/v2/sites',\n destPath: '/v2/sites',\n },\n ],\n 'feedback._base_domain_': [\n {\n srcPath: '/_api/sites-list',\n destPath: '/api',\n },\n ],\n 'manage._base_domain_': [\n {\n srcPath: '/_api/sites-list',\n destPath: '/api',\n },\n {\n srcPath: '/_api/sites-list/v2/sites',\n destPath: '/v2/sites',\n },\n {\n srcPath: '/_api/sites-list-data',\n destPath: '/api/sites-list-data',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/site-list/v2/sites',\n destPath: '/v2/sites',\n },\n ],\n 'api._api_base_domain_': [\n {\n srcPath: '/sites-list',\n destPath: '',\n },\n ],\n 'bo._base_domain_': [\n {\n srcPath: '/_api/sites-list/v2/sites',\n destPath: '/v2/sites',\n },\n ],\n 'wixbo.ai': [\n {\n srcPath: '/_api/sites-list/v2/sites',\n destPath: '/v2/sites',\n },\n ],\n 'wix-bo.com': [\n {\n srcPath: '/_api/sites-list/v2/sites',\n destPath: '/v2/sites',\n },\n ],\n 'dev._base_domain_': [\n {\n srcPath: '/_api/sites-list/v2/sites',\n destPath: '/v2/sites',\n },\n ],\n 'editor._base_domain_': [\n {\n srcPath: '/_api/sites-list/v2/sites',\n destPath: '/v2/sites',\n },\n ],\n 'blocks._base_domain_': [\n {\n srcPath: '/_api/sites-list/v2/sites',\n destPath: '/v2/sites',\n },\n ],\n 'create.editorx': [\n {\n srcPath: '/_api/sites-list/v2/sites',\n destPath: '/v2/sites',\n },\n ],\n 'online.codux.com': [\n {\n srcPath: '/_api/sites-list',\n destPath: '',\n },\n {\n srcPath: '/_api/sites-list/v2/sites',\n destPath: '/v2/sites',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/site-list/v2/sites',\n destPath: '/v2/sites',\n },\n ],\n 'vibe._base_domain_': [\n {\n srcPath: '/_api/sites-list',\n destPath: '',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_sites_sites';\n\n/**\n * Retrieves a list of up to 1,000 sites, given the provided [paging, sorting and filtering](https://dev.wix.com/api/rest/account-level-apis/sites/filter-&-sort).\n *\n * > **Important**: You can only call this method when authenticated as a Wix user or by using an account level API key.\n */\nexport function querySites(payload: object): RequestOptionsFactory<any> {\n function __querySites({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.site_list.v2.site',\n method: 'POST' as any,\n methodFqn: 'com.wixpress.sitelist.api.SiteListServiceV2.QuerySites',\n packageName: PACKAGE_NAME,\n url: resolveComWixpressSitelistApiSiteListServiceV2Url({\n protoPath: '/v2/sites/query',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'sites.createdDate' },\n { path: 'sites.updatedDate' },\n { path: 'sites.trashedDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __querySites;\n}\n\n/**\n * Retrieves the number of sites, given the provided [filtering](https://dev.wix.com/api/rest/account-level-apis/sites/filter-&-sort).\n *\n * > **Important**: You can only call this method when authenticated as a Wix user or by using an account level API key.\n */\nexport function countSites(payload: object): RequestOptionsFactory<any> {\n function __countSites({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.site_list.v2.site',\n method: 'POST' as any,\n methodFqn: 'com.wixpress.sitelist.api.SiteListServiceV2.CountSites',\n packageName: PACKAGE_NAME,\n url: resolveComWixpressSitelistApiSiteListServiceV2Url({\n protoPath: '/v2/sites/count',\n data: payload,\n host,\n }),\n data: payload,\n };\n\n return metadata;\n }\n\n return __countSites;\n}\n","import { HttpClient } from '@wix/sdk-types';\nimport {\n CountSitesOptions,\n CountSitesResponse,\n QuerySitesOptions,\n QuerySitesResponse,\n countSites as universalCountSites,\n querySites as universalQuerySites,\n} from './site-list-v2-site-sites.universal.js';\n\nexport const __metadata = { PACKAGE_NAME: '@wix/sites' };\n\nexport function querySites(httpClient: HttpClient): QuerySitesSignature {\n return (options?: QuerySitesOptions) =>\n universalQuerySites(\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface QuerySitesSignature {\n /**\n * Retrieves a list of up to 1,000 sites, given the provided [paging, sorting and filtering](https://dev.wix.com/api/rest/account-level-apis/sites/filter-&-sort).\n *\n * > **Important**: You can only call this method when authenticated as a Wix user or by using an account level API key.\n */\n (options?: QuerySitesOptions | undefined): Promise<QuerySitesResponse>;\n}\n\nexport function countSites(httpClient: HttpClient): CountSitesSignature {\n return (options?: CountSitesOptions) =>\n universalCountSites(\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface CountSitesSignature {\n /**\n * Retrieves the number of sites, given the provided [filtering](https://dev.wix.com/api/rest/account-level-apis/sites/filter-&-sort).\n *\n * > **Important**: You can only call this method when authenticated as a Wix user or by using an account level API key.\n */\n (options?: CountSitesOptions | undefined): Promise<CountSitesResponse>;\n}\n\nexport {\n CountSitesOptions,\n CountSitesRequest,\n CountSitesResponse,\n CursorPaging,\n Cursors,\n EditorType,\n Namespace,\n PagingMetadataV2,\n QuerySitesOptions,\n QuerySitesRequest,\n QuerySitesResponse,\n QueryV2,\n QueryV2PagingMethodOneOf,\n Site,\n SortOrder,\n Sorting,\n} from './site-list-v2-site-sites.universal.js';\n","import {\n querySites as publicQuerySites,\n countSites as publicCountSites,\n} from './site-list-v2-site-sites.public.js';\nimport { createRESTModule } from '@wix/sdk-runtime/rest-modules';\nimport { BuildRESTFunction, MaybeContext } from '@wix/sdk-types';\n\nexport const querySites: MaybeContext<\n BuildRESTFunction<typeof publicQuerySites> & typeof publicQuerySites\n> = /*#__PURE__*/ createRESTModule(publicQuerySites);\nexport const countSites: MaybeContext<\n BuildRESTFunction<typeof publicCountSites> & typeof publicCountSites\n> = /*#__PURE__*/ createRESTModule(publicCountSites);\n\nexport {\n EditorType,\n Namespace,\n SortOrder,\n} from './site-list-v2-site-sites.universal.js';\nexport {\n Site,\n QuerySitesRequest,\n QueryV2,\n QueryV2PagingMethodOneOf,\n Sorting,\n CursorPaging,\n QuerySitesResponse,\n PagingMetadataV2,\n Cursors,\n CountSitesRequest,\n CountSitesResponse,\n QuerySitesOptions,\n CountSitesOptions,\n} from './site-list-v2-site-sites.universal.js';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,oBAAAA;AAAA,EAAA,kBAAAC;AAAA;AAAA;;;ACAA,6BAAoD;AACpD,oCAGO;;;ACJP,uBAAqD;AACrD,6BAA+B;AAC/B,0BAA2B;AAI3B,SAAS,kDACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,qBAAqB;AAAA,MACnB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,0BAA0B;AAAA,MACxB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,mBAAmB;AAAA,MACjB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,yBAAyB;AAAA,MACvB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,oBAAoB;AAAA,MAClB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,YAAY;AAAA,MACV;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,cAAc;AAAA,MACZ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,OAAO;AAC/C,iBAAa,YAAY,MAAM;AAE/B,eAAO,uEAAwC,OAAO,IAAI;AAAA,EAC5D,SAAS,KAAU;AACjB,UAAM,uBAAmB,uBAAAD;AAAA,MACvB;AAAA,MACA;AAAA,QACE,wBAAwB,CAAC;AAAA,QACzB,0BAA0B,EAAE,QAAQ,cAAc;AAAA,QAClD,yBAAyB;AAAA,MAC3B;AAAA,MACA,CAAC,SAAS;AAAA,IACZ;AACA,iBAAa,UAAU,GAAG;AAE1B,UAAM;AAAA,EACR;AACF;;;AE7aO,SAASE,YAAW,YAA6C;AACtE,SAAO,CAAC,YACNA;AAAA,IACE;AAAA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;AAWO,SAASC,YAAW,YAA6C;AACtE,SAAO,CAAC,YACNA;AAAA,IACE;AAAA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;;;ACjCA,IAAAC,uBAAiC;AAG1B,IAAMC,cAEK,2DAAiBA,WAAgB;AAC5C,IAAMC,cAEK,2DAAiBA,WAAgB;","names":["countSites","querySites","payload","EditorType","Namespace","SortOrder","querySites","sdkTransformError","countSites","querySites","countSites","import_rest_modules","querySites","countSites"]}
1
+ {"version":3,"sources":["../../../index.ts","../../../src/site-list-v2-site-sites.universal.ts","../../../src/site-list-v2-site-sites.http.ts","../../../src/site-list-v2-site-sites.public.ts","../../../src/site-list-v2-site-sites.context.ts"],"sourcesContent":["export * from './src/site-list-v2-site-sites.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 ambassadorWixSiteListV2Site from './site-list-v2-site-sites.http.js';\n\nexport interface Site {\n /**\n * Site ID.\n * @format GUID\n */\n _id?: string;\n /**\n * HTML app ID for the site.\n * @format GUID\n */\n htmlAppId?: string | null;\n /** Site name. Used in the site's URL. */\n name?: string;\n /** Site display name. Used for display purposes, such as in the browser's tab name. */\n displayName?: string;\n /** Site creation date. */\n _createdDate?: Date | null;\n /** Site updated date. */\n _updatedDate?: Date | null;\n /** Site trashed date. */\n trashedDate?: Date | null;\n /** Whether the site is published. */\n published?: boolean;\n /** Whether the site has a Wix Premium (paid) plan. */\n premium?: boolean;\n /** Live site URL. */\n viewUrl?: string;\n /** Editor site URL. */\n editUrl?: string;\n /** Site thumbnail. */\n thumbnail?: string;\n /**\n * Site owner's account ID.\n * @format GUID\n */\n ownerAccountId?: string;\n /**\n * Site contributors' account IDs.\n * @format GUID\n * @minSize 1\n * @maxSize 1000\n */\n contributorAccountIds?: string[];\n /** Site's Wix editor type. */\n editorType?: EditorTypeWithLiterals;\n /** Whether Wix has blocked this site due to legal issues. */\n blocked?: boolean;\n /**\n * Folder ID that contains this site. Empty if site is at root level.\n * @format GUID\n */\n folderId?: string | null;\n /** Namespace of the site, for internal use. */\n namespace?: NamespaceWithLiterals;\n /** Whether the site has a connected domain. */\n domainConnected?: boolean;\n}\n\nexport enum EditorType {\n UNKNOWN = 'UNKNOWN',\n EDITOR = 'EDITOR',\n ADI = 'ADI',\n EDITORX = 'EDITORX',\n STUDIO = 'STUDIO',\n ODEDITOR = 'ODEDITOR',\n PICASSO = 'PICASSO',\n}\n\n/** @enumType */\nexport type EditorTypeWithLiterals =\n | EditorType\n | 'UNKNOWN'\n | 'EDITOR'\n | 'ADI'\n | 'EDITORX'\n | 'STUDIO'\n | 'ODEDITOR'\n | 'PICASSO';\n\nexport enum Namespace {\n UNKNOWN_NAMESPACE = 'UNKNOWN_NAMESPACE',\n /** Default namespace for UGC sites. MetaSites with this namespace will be shown in a user's site list by default. */\n WIX = 'WIX',\n /** ShoutOut stand alone product. These are siteless (no actual Wix site, no HtmlWeb). MetaSites with this namespace will *not* be shown in a user's site list by default. */\n SHOUT_OUT = 'SHOUT_OUT',\n /** MetaSites created by the Albums product, they appear as part of the Albums app. MetaSites with this namespace will *not* be shown in a user's site list by default. */\n ALBUMS = 'ALBUMS',\n /** Part of the WixStores migration flow, a user tries to migrate and gets this site to view and if the user likes it then stores removes this namespace and deletes the old site with the old stores. MetaSites with this namespace will *not* be shown in a user's site list by default. */\n WIX_STORES_TEST_DRIVE = 'WIX_STORES_TEST_DRIVE',\n /** Hotels standalone (siteless). MetaSites with this namespace will *not* be shown in a user's site list by default. */\n HOTELS = 'HOTELS',\n /** Clubs siteless MetaSites, a club without a wix website. MetaSites with this namespace will *not* be shown in a user's site list by default. */\n CLUBS = 'CLUBS',\n /** A partially created ADI website. MetaSites with this namespace will *not* be shown in a user's site list by default. */\n ONBOARDING_DRAFT = 'ONBOARDING_DRAFT',\n /** AppBuilder for AppStudio / shmite (c). MetaSites with this namespace will *not* be shown in a user's site list by default. */\n DEV_SITE = 'DEV_SITE',\n /** LogoMaker websites offered to the user after logo purchase. MetaSites with this namespace will *not* be shown in a user's site list by default. */\n LOGOS = 'LOGOS',\n /** VideoMaker websites offered to the user after video purchase. MetaSites with this namespace will *not* be shown in a user's site list by default. */\n VIDEO_MAKER = 'VIDEO_MAKER',\n /** MetaSites with this namespace will *not* be shown in a user's site list by default. */\n PARTNER_DASHBOARD = 'PARTNER_DASHBOARD',\n /** MetaSites with this namespace will *not* be shown in a user's site list by default. */\n DEV_CENTER_COMPANY = 'DEV_CENTER_COMPANY',\n /**\n * A draft created by HTML editor on open. Upon \"first save\" it will be moved to be of WIX domain.\n *\n * Meta site with this namespace will *not* be shown in a user's site list by default.\n */\n HTML_DRAFT = 'HTML_DRAFT',\n /**\n * the user-journey for Fitness users who want to start from managing their business instead of designing their website.\n * Will be accessible from Site List and will not have a website app.\n * Once the user attaches a site, the site will become a regular wixsite.\n */\n SITELESS_BUSINESS = 'SITELESS_BUSINESS',\n /** Belongs to \"strategic products\" company. Supports new product in the creator's economy space. */\n CREATOR_ECONOMY = 'CREATOR_ECONOMY',\n /** It is to be used in the Business First efforts. */\n DASHBOARD_FIRST = 'DASHBOARD_FIRST',\n /** Bookings business flow with no site. */\n ANYWHERE = 'ANYWHERE',\n /** Namespace for Headless Backoffice with no editor */\n HEADLESS = 'HEADLESS',\n /**\n * Namespace for master site that will exist in parent account that will be referenced by subaccounts\n * The site will be used for account level CSM feature for enterprise\n */\n ACCOUNT_MASTER_CMS = 'ACCOUNT_MASTER_CMS',\n /** Rise.ai Siteless account management for Gift Cards and Store Credit. */\n RISE = 'RISE',\n /**\n * As part of the branded app new funnel, users now can create a meta site that will be branded app first.\n * There's a blank site behind the scene but it's blank).\n * The Mobile company will be the owner of this namespace.\n */\n BRANDED_FIRST = 'BRANDED_FIRST',\n /** Nownia.com Siteless account management for Ai Scheduling Assistant. */\n NOWNIA = 'NOWNIA',\n /**\n * UGC Templates are templates that are created by users for personal use and to sale to other users.\n * The Partners company owns this namespace.\n */\n UGC_TEMPLATE = 'UGC_TEMPLATE',\n /** Codux Headless Sites */\n CODUX = 'CODUX',\n /** Bobb - AI Design Creator. */\n MEDIA_DESIGN_CREATOR = 'MEDIA_DESIGN_CREATOR',\n /**\n * Shared Blog Site is a unique single site across Enterprise account,\n * This site will hold all Blog posts related to the Marketing product.\n */\n SHARED_BLOG_ENTERPRISE = 'SHARED_BLOG_ENTERPRISE',\n /** Standalone forms (siteless). MetaSites with this namespace will *not* be shown in a user's site list by default. */\n STANDALONE_FORMS = 'STANDALONE_FORMS',\n /** Standalone events (siteless). MetaSites with this namespace will *not* be shown in a user's site list by default. */\n STANDALONE_EVENTS = 'STANDALONE_EVENTS',\n /** MIMIR - Siteless account for MIMIR Ai Job runner. */\n MIMIR = 'MIMIR',\n}\n\n/** @enumType */\nexport type NamespaceWithLiterals =\n | Namespace\n | 'UNKNOWN_NAMESPACE'\n | 'WIX'\n | 'SHOUT_OUT'\n | 'ALBUMS'\n | 'WIX_STORES_TEST_DRIVE'\n | 'HOTELS'\n | 'CLUBS'\n | 'ONBOARDING_DRAFT'\n | 'DEV_SITE'\n | 'LOGOS'\n | 'VIDEO_MAKER'\n | 'PARTNER_DASHBOARD'\n | 'DEV_CENTER_COMPANY'\n | 'HTML_DRAFT'\n | 'SITELESS_BUSINESS'\n | 'CREATOR_ECONOMY'\n | 'DASHBOARD_FIRST'\n | 'ANYWHERE'\n | 'HEADLESS'\n | 'ACCOUNT_MASTER_CMS'\n | 'RISE'\n | 'BRANDED_FIRST'\n | 'NOWNIA'\n | 'UGC_TEMPLATE'\n | 'CODUX'\n | 'MEDIA_DESIGN_CREATOR'\n | 'SHARED_BLOG_ENTERPRISE'\n | 'STANDALONE_FORMS'\n | 'STANDALONE_EVENTS'\n | 'MIMIR';\n\nexport interface QuerySitesRequest {\n /**\n * Filter and sorting with the following format:\n * `\"filter\" : { \"displayName\": \"my-site\" }`\n */\n query?: QueryV2;\n}\n\nexport interface QueryV2 extends QueryV2PagingMethodOneOf {\n /**\n * Paging options to limit and offset the number of items.\n * wix.common.Paging paging = 3;\n * Cursor token pointing to a page of results. Used in all calls following the first request.\n */\n cursorPaging?: CursorPaging;\n /**\n * Filter object with the following format:\n * `\"filter\" : {\n * \"displayName\": \"my-site\",\n * \"namespace\":{\"$in\":[\"value1\", \"value2\"]},\n * \"folderId\": {\"$exists\": false}\n * }`\n * Example of operators: `$in`, `$hasSome`, `$hasAll`, `$exists`\n */\n filter?: Record<string, any> | null;\n /**\n * Sort object with the following format:\n * `[{\"fieldName\":\"displayName\",\"order\":\"ASC\"},{\"fieldName\":\"createdDate\",\"order\":\"DESC\"}]`\n * @maxSize 4\n */\n sort?: Sorting[];\n}\n\n/** @oneof */\nexport interface QueryV2PagingMethodOneOf {\n /**\n * Paging options to limit and offset the number of items.\n * wix.common.Paging paging = 3;\n * Cursor token pointing to a page of results. Used in all calls following the first request.\n */\n cursorPaging?: CursorPaging;\n}\n\nexport interface Sorting {\n /**\n * Name of the field to sort by.\n * @maxLength 512\n */\n fieldName?: string;\n /** Sort order. */\n order?: SortOrderWithLiterals;\n}\n\nexport enum SortOrder {\n ASC = 'ASC',\n DESC = 'DESC',\n}\n\n/** @enumType */\nexport type SortOrderWithLiterals = SortOrder | 'ASC' | 'DESC';\n\nexport interface CursorPaging {\n /**\n * Maximum number of items to return in the results.\n * @max 100\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\nexport interface QuerySitesResponse {\n /** List of retrieved sites. */\n sites?: Site[];\n /**\n * Paging information.\n * @deprecated\n */\n cursorPaging?: CursorPaging;\n /** Meta data about the returned sites */\n metadata?: PagingMetadataV2;\n}\n\nexport interface PagingMetadataV2 {\n /** Number of items returned in the response. */\n count?: number | null;\n /** Cursors to navigate through the result pages using `next` and `prev`. Returned if cursor paging is used. */\n cursors?: Cursors;\n}\n\nexport interface Cursors {\n /** Cursor pointing to next page in the list of results. */\n next?: string | null;\n}\n\nexport interface CountSitesRequest {\n /**\n * Filter object. See [Filter and Sort](https://dev.wix.com/api/rest/account-level-apis/sites/filter-&-sort) documentation.\n * Note: the `premium` and `appIds` filters are not supported in this endpoint.\n */\n filter?: Record<string, any> | null;\n}\n\nexport interface CountSitesResponse {\n /**\n * Number of sites retrieved basd on the filter.\n * Free Wix accounts are limited to max 1,000 sites.\n * Premium accounts can have an unlimited number of sites.\n */\n count?: number;\n}\n\n/** @docsIgnore */\nexport type QuerySitesApplicationErrors = {\n code?: 'unauthenticated_user';\n description?: string;\n data?: Record<string, any>;\n};\n/** @docsIgnore */\nexport type CountSitesApplicationErrors = {\n code?: 'unauthenticated_user';\n description?: string;\n data?: Record<string, any>;\n};\n\n/**\n * Retrieves a list of up to 1,000 sites, given the provided [paging, sorting and filtering](https://dev.wix.com/api/rest/account-level-apis/sites/filter-&-sort).\n *\n * > **Important**: You can only call this method when authenticated as a Wix user or by using an account level API key.\n * @public\n * @permissionId SITE_LIST.READ\n * @fqn com.wixpress.sitelist.api.SiteListServiceV2.QuerySites\n */\nexport async function querySites(options?: QuerySitesOptions): Promise<\n NonNullablePaths<\n QuerySitesResponse,\n | `sites`\n | `sites.${number}._id`\n | `sites.${number}.name`\n | `sites.${number}.displayName`\n | `sites.${number}.published`\n | `sites.${number}.premium`\n | `sites.${number}.viewUrl`\n | `sites.${number}.editUrl`\n | `sites.${number}.thumbnail`\n | `sites.${number}.ownerAccountId`\n | `sites.${number}.editorType`\n | `sites.${number}.blocked`\n | `sites.${number}.namespace`\n | `sites.${number}.domainConnected`,\n 4\n > & {\n __applicationErrorsType?: QuerySitesApplicationErrors;\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 query: options?.query,\n });\n\n const reqOpts = ambassadorWixSiteListV2Site.querySites(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: { query: '$[0].query' },\n singleArgumentUnchanged: false,\n },\n ['options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface QuerySitesOptions {\n /**\n * Filter and sorting with the following format:\n * `\"filter\" : { \"displayName\": \"my-site\" }`\n */\n query?: QueryV2;\n}\n\n/**\n * Retrieves the number of sites, given the provided [filtering](https://dev.wix.com/api/rest/account-level-apis/sites/filter-&-sort).\n *\n * > **Important**: You can only call this method when authenticated as a Wix user or by using an account level API key.\n * @public\n * @permissionId SITE_LIST.READ\n * @fqn com.wixpress.sitelist.api.SiteListServiceV2.CountSites\n */\nexport async function countSites(options?: CountSitesOptions): Promise<\n NonNullablePaths<CountSitesResponse, `count`, 2> & {\n __applicationErrorsType?: CountSitesApplicationErrors;\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 filter: options?.filter,\n });\n\n const reqOpts = ambassadorWixSiteListV2Site.countSites(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: { filter: '$[0].filter' },\n singleArgumentUnchanged: false,\n },\n ['options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface CountSitesOptions {\n /**\n * Filter object. See [Filter and Sort](https://dev.wix.com/api/rest/account-level-apis/sites/filter-&-sort) documentation.\n * Note: the `premium` and `appIds` filters are not supported in this endpoint.\n */\n filter?: Record<string, any> | null;\n}\n","import { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\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 resolveComWixpressSitelistApiSiteListServiceV2Url(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'www._base_domain_': [\n {\n srcPath: '/_api/sites-list',\n destPath: '/api',\n },\n {\n srcPath: '/_api/sites-list/v2/sites',\n destPath: '/v2/sites',\n },\n ],\n 'feedback._base_domain_': [\n {\n srcPath: '/_api/sites-list',\n destPath: '/api',\n },\n ],\n 'manage._base_domain_': [\n {\n srcPath: '/_api/sites-list',\n destPath: '/api',\n },\n {\n srcPath: '/_api/sites-list/v2/sites',\n destPath: '/v2/sites',\n },\n {\n srcPath: '/_api/sites-list-data',\n destPath: '/api/sites-list-data',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/site-list/v2/sites',\n destPath: '/v2/sites',\n },\n ],\n 'api._api_base_domain_': [\n {\n srcPath: '/sites-list',\n destPath: '',\n },\n ],\n 'bo._base_domain_': [\n {\n srcPath: '/_api/sites-list/v2/sites',\n destPath: '/v2/sites',\n },\n ],\n 'wixbo.ai': [\n {\n srcPath: '/_api/sites-list/v2/sites',\n destPath: '/v2/sites',\n },\n ],\n 'wix-bo.com': [\n {\n srcPath: '/_api/sites-list/v2/sites',\n destPath: '/v2/sites',\n },\n ],\n 'dev._base_domain_': [\n {\n srcPath: '/_api/sites-list/v2/sites',\n destPath: '/v2/sites',\n },\n ],\n 'editor._base_domain_': [\n {\n srcPath: '/_api/sites-list/v2/sites',\n destPath: '/v2/sites',\n },\n ],\n 'blocks._base_domain_': [\n {\n srcPath: '/_api/sites-list/v2/sites',\n destPath: '/v2/sites',\n },\n ],\n 'create.editorx': [\n {\n srcPath: '/_api/sites-list/v2/sites',\n destPath: '/v2/sites',\n },\n ],\n 'online.codux.com': [\n {\n srcPath: '/_api/sites-list',\n destPath: '',\n },\n {\n srcPath: '/_api/sites-list/v2/sites',\n destPath: '/v2/sites',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/site-list/v2/sites',\n destPath: '/v2/sites',\n },\n ],\n 'vibe._base_domain_': [\n {\n srcPath: '/_api/sites-list',\n destPath: '',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_sites_sites';\n\n/**\n * Retrieves a list of up to 1,000 sites, given the provided [paging, sorting and filtering](https://dev.wix.com/api/rest/account-level-apis/sites/filter-&-sort).\n *\n * > **Important**: You can only call this method when authenticated as a Wix user or by using an account level API key.\n */\nexport function querySites(payload: object): RequestOptionsFactory<any> {\n function __querySites({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.site_list.v2.site',\n method: 'POST' as any,\n methodFqn: 'com.wixpress.sitelist.api.SiteListServiceV2.QuerySites',\n packageName: PACKAGE_NAME,\n url: resolveComWixpressSitelistApiSiteListServiceV2Url({\n protoPath: '/v2/sites/query',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'sites.createdDate' },\n { path: 'sites.updatedDate' },\n { path: 'sites.trashedDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __querySites;\n}\n\n/**\n * Retrieves the number of sites, given the provided [filtering](https://dev.wix.com/api/rest/account-level-apis/sites/filter-&-sort).\n *\n * > **Important**: You can only call this method when authenticated as a Wix user or by using an account level API key.\n */\nexport function countSites(payload: object): RequestOptionsFactory<any> {\n function __countSites({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.site_list.v2.site',\n method: 'POST' as any,\n methodFqn: 'com.wixpress.sitelist.api.SiteListServiceV2.CountSites',\n packageName: PACKAGE_NAME,\n url: resolveComWixpressSitelistApiSiteListServiceV2Url({\n protoPath: '/v2/sites/count',\n data: payload,\n host,\n }),\n data: payload,\n };\n\n return metadata;\n }\n\n return __countSites;\n}\n","import { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport {\n CountSitesApplicationErrors,\n CountSitesOptions,\n CountSitesResponse,\n QuerySitesApplicationErrors,\n QuerySitesOptions,\n QuerySitesResponse,\n countSites as universalCountSites,\n querySites as universalQuerySites,\n} from './site-list-v2-site-sites.universal.js';\n\nexport const __metadata = { PACKAGE_NAME: '@wix/sites' };\n\nexport function querySites(httpClient: HttpClient): QuerySitesSignature {\n return (options?: QuerySitesOptions) =>\n universalQuerySites(\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface QuerySitesSignature {\n /**\n * Retrieves a list of up to 1,000 sites, given the provided [paging, sorting and filtering](https://dev.wix.com/api/rest/account-level-apis/sites/filter-&-sort).\n *\n * > **Important**: You can only call this method when authenticated as a Wix user or by using an account level API key.\n */\n (options?: QuerySitesOptions): Promise<\n NonNullablePaths<\n QuerySitesResponse,\n | `sites`\n | `sites.${number}._id`\n | `sites.${number}.name`\n | `sites.${number}.displayName`\n | `sites.${number}.published`\n | `sites.${number}.premium`\n | `sites.${number}.viewUrl`\n | `sites.${number}.editUrl`\n | `sites.${number}.thumbnail`\n | `sites.${number}.ownerAccountId`\n | `sites.${number}.editorType`\n | `sites.${number}.blocked`\n | `sites.${number}.namespace`\n | `sites.${number}.domainConnected`,\n 4\n > & {\n __applicationErrorsType?: QuerySitesApplicationErrors;\n }\n >;\n}\n\nexport function countSites(httpClient: HttpClient): CountSitesSignature {\n return (options?: CountSitesOptions) =>\n universalCountSites(\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface CountSitesSignature {\n /**\n * Retrieves the number of sites, given the provided [filtering](https://dev.wix.com/api/rest/account-level-apis/sites/filter-&-sort).\n *\n * > **Important**: You can only call this method when authenticated as a Wix user or by using an account level API key.\n */\n (options?: CountSitesOptions): Promise<\n NonNullablePaths<CountSitesResponse, `count`, 2> & {\n __applicationErrorsType?: CountSitesApplicationErrors;\n }\n >;\n}\n\nexport {\n CountSitesOptions,\n CountSitesRequest,\n CountSitesResponse,\n CursorPaging,\n Cursors,\n EditorType,\n Namespace,\n PagingMetadataV2,\n QuerySitesOptions,\n QuerySitesRequest,\n QuerySitesResponse,\n QueryV2,\n QueryV2PagingMethodOneOf,\n Site,\n SortOrder,\n Sorting,\n} from './site-list-v2-site-sites.universal.js';\n","import {\n querySites as publicQuerySites,\n countSites as publicCountSites,\n} from './site-list-v2-site-sites.public.js';\nimport { createRESTModule } from '@wix/sdk-runtime/rest-modules';\nimport { BuildRESTFunction, MaybeContext } from '@wix/sdk-types';\n\nexport const querySites: MaybeContext<\n BuildRESTFunction<typeof publicQuerySites> & typeof publicQuerySites\n> = /*#__PURE__*/ createRESTModule(publicQuerySites);\nexport const countSites: MaybeContext<\n BuildRESTFunction<typeof publicCountSites> & typeof publicCountSites\n> = /*#__PURE__*/ createRESTModule(publicCountSites);\n\nexport {\n EditorType,\n Namespace,\n SortOrder,\n} from './site-list-v2-site-sites.universal.js';\nexport {\n Site,\n QuerySitesRequest,\n QueryV2,\n QueryV2PagingMethodOneOf,\n Sorting,\n CursorPaging,\n QuerySitesResponse,\n PagingMetadataV2,\n Cursors,\n CountSitesRequest,\n CountSitesResponse,\n QuerySitesOptions,\n CountSitesOptions,\n} from './site-list-v2-site-sites.universal.js';\nexport {\n EditorTypeWithLiterals,\n NamespaceWithLiterals,\n SortOrderWithLiterals,\n QuerySitesApplicationErrors,\n CountSitesApplicationErrors,\n} from './site-list-v2-site-sites.universal.js';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,oBAAAA;AAAA,EAAA,kBAAAC;AAAA;AAAA;;;ACAA,6BAAoD;AACpD,oCAGO;;;ACJP,uBAAqD;AACrD,6BAA+B;AAC/B,0BAA2B;AAI3B,SAAS,kDACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,qBAAqB;AAAA,MACnB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,0BAA0B;AAAA,MACxB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,mBAAmB;AAAA,MACjB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,yBAAyB;AAAA,MACvB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,oBAAoB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AI,UAAU,CAAC;AAK/C,QAAM,cAAU,qEAAsC;AAAA,IACpD,QAAQ,SAAS;AAAA,EACnB,CAAC;AAED,QAAM,UAAsC,WAAW,OAAO;AAE9D,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,uBAAAD;AAAA,MACvB;AAAA,MACA;AAAA,QACE,wBAAwB,CAAC;AAAA,QACzB,0BAA0B,EAAE,QAAQ,cAAc;AAAA,QAClD,yBAAyB;AAAA,MAC3B;AAAA,MACA,CAAC,SAAS;AAAA,IACZ;AACA,iBAAa,UAAU,GAAG;AAE1B,UAAM;AAAA,EACR;AACF;;;AEtbO,SAASE,YAAW,YAA6C;AACtE,SAAO,CAAC,YACNA;AAAA,IACE;AAAA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;AAgCO,SAASC,YAAW,YAA6C;AACtE,SAAO,CAAC,YACNA;AAAA,IACE;AAAA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;;;ACxDA,IAAAC,uBAAiC;AAG1B,IAAMC,cAEK,2DAAiBA,WAAgB;AAC5C,IAAMC,cAEK,2DAAiBA,WAAgB;","names":["countSites","querySites","payload","EditorType","Namespace","SortOrder","querySites","sdkTransformError","countSites","querySites","countSites","import_rest_modules","querySites","countSites"]}
@@ -1,3 +1,5 @@
1
+ import { NonNullablePaths } from '@wix/sdk-types';
2
+
1
3
  interface Site {
2
4
  /**
3
5
  * Site ID.
@@ -256,6 +258,29 @@ interface CountSitesResponse {
256
258
  */
257
259
  count?: number;
258
260
  }
261
+ /** @docsIgnore */
262
+ type QuerySitesApplicationErrors = {
263
+ code?: 'unauthenticated_user';
264
+ description?: string;
265
+ data?: Record<string, any>;
266
+ };
267
+ /** @docsIgnore */
268
+ type CountSitesApplicationErrors = {
269
+ code?: 'unauthenticated_user';
270
+ description?: string;
271
+ data?: Record<string, any>;
272
+ };
273
+ /**
274
+ * Retrieves a list of up to 1,000 sites, given the provided [paging, sorting and filtering](https://dev.wix.com/api/rest/account-level-apis/sites/filter-&-sort).
275
+ *
276
+ * > **Important**: You can only call this method when authenticated as a Wix user or by using an account level API key.
277
+ * @public
278
+ * @permissionId SITE_LIST.READ
279
+ * @fqn com.wixpress.sitelist.api.SiteListServiceV2.QuerySites
280
+ */
281
+ declare function querySites(options?: QuerySitesOptions): Promise<NonNullablePaths<QuerySitesResponse, `sites` | `sites.${number}._id` | `sites.${number}.name` | `sites.${number}.displayName` | `sites.${number}.published` | `sites.${number}.premium` | `sites.${number}.viewUrl` | `sites.${number}.editUrl` | `sites.${number}.thumbnail` | `sites.${number}.ownerAccountId` | `sites.${number}.editorType` | `sites.${number}.blocked` | `sites.${number}.namespace` | `sites.${number}.domainConnected`, 4> & {
282
+ __applicationErrorsType?: QuerySitesApplicationErrors;
283
+ }>;
259
284
  interface QuerySitesOptions {
260
285
  /**
261
286
  * Filter and sorting with the following format:
@@ -263,6 +288,17 @@ interface QuerySitesOptions {
263
288
  */
264
289
  query?: QueryV2;
265
290
  }
291
+ /**
292
+ * Retrieves the number of sites, given the provided [filtering](https://dev.wix.com/api/rest/account-level-apis/sites/filter-&-sort).
293
+ *
294
+ * > **Important**: You can only call this method when authenticated as a Wix user or by using an account level API key.
295
+ * @public
296
+ * @permissionId SITE_LIST.READ
297
+ * @fqn com.wixpress.sitelist.api.SiteListServiceV2.CountSites
298
+ */
299
+ declare function countSites(options?: CountSitesOptions): Promise<NonNullablePaths<CountSitesResponse, `count`, 2> & {
300
+ __applicationErrorsType?: CountSitesApplicationErrors;
301
+ }>;
266
302
  interface CountSitesOptions {
267
303
  /**
268
304
  * Filter object. See [Filter and Sort](https://dev.wix.com/api/rest/account-level-apis/sites/filter-&-sort) documentation.
@@ -271,4 +307,4 @@ interface CountSitesOptions {
271
307
  filter?: Record<string, any> | null;
272
308
  }
273
309
 
274
- export { type CountSitesOptions as C, EditorType as E, Namespace as N, type PagingMetadataV2 as P, type QuerySitesOptions as Q, SortOrder as S, type QuerySitesResponse as a, type CountSitesResponse as b, type Site as c, type QuerySitesRequest as d, type QueryV2 as e, type QueryV2PagingMethodOneOf as f, type Sorting as g, type CursorPaging as h, type Cursors as i, type CountSitesRequest as j };
310
+ export { type CountSitesApplicationErrors, type CountSitesOptions, type CountSitesRequest, type CountSitesResponse, type CursorPaging, type Cursors, EditorType, type EditorTypeWithLiterals, Namespace, type NamespaceWithLiterals, type PagingMetadataV2, type QuerySitesApplicationErrors, type QuerySitesOptions, type QuerySitesRequest, type QuerySitesResponse, type QueryV2, type QueryV2PagingMethodOneOf, type Site, SortOrder, type SortOrderWithLiterals, type Sorting, countSites, querySites };
@@ -0,0 +1,305 @@
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
+ EditorType: () => EditorType,
24
+ Namespace: () => Namespace,
25
+ SortOrder: () => SortOrder,
26
+ countSites: () => countSites2,
27
+ querySites: () => querySites2
28
+ });
29
+ module.exports = __toCommonJS(index_typings_exports);
30
+
31
+ // src/site-list-v2-site-sites.universal.ts
32
+ var import_transform_error = require("@wix/sdk-runtime/transform-error");
33
+ var import_rename_all_nested_keys = require("@wix/sdk-runtime/rename-all-nested-keys");
34
+
35
+ // src/site-list-v2-site-sites.http.ts
36
+ var import_timestamp = require("@wix/sdk-runtime/transformations/timestamp");
37
+ var import_transform_paths = require("@wix/sdk-runtime/transformations/transform-paths");
38
+ var import_rest_modules = require("@wix/sdk-runtime/rest-modules");
39
+ function resolveComWixpressSitelistApiSiteListServiceV2Url(opts) {
40
+ const domainToMappings = {
41
+ "www._base_domain_": [
42
+ {
43
+ srcPath: "/_api/sites-list",
44
+ destPath: "/api"
45
+ },
46
+ {
47
+ srcPath: "/_api/sites-list/v2/sites",
48
+ destPath: "/v2/sites"
49
+ }
50
+ ],
51
+ "feedback._base_domain_": [
52
+ {
53
+ srcPath: "/_api/sites-list",
54
+ destPath: "/api"
55
+ }
56
+ ],
57
+ "manage._base_domain_": [
58
+ {
59
+ srcPath: "/_api/sites-list",
60
+ destPath: "/api"
61
+ },
62
+ {
63
+ srcPath: "/_api/sites-list/v2/sites",
64
+ destPath: "/v2/sites"
65
+ },
66
+ {
67
+ srcPath: "/_api/sites-list-data",
68
+ destPath: "/api/sites-list-data"
69
+ }
70
+ ],
71
+ "www.wixapis.com": [
72
+ {
73
+ srcPath: "/site-list/v2/sites",
74
+ destPath: "/v2/sites"
75
+ }
76
+ ],
77
+ "api._api_base_domain_": [
78
+ {
79
+ srcPath: "/sites-list",
80
+ destPath: ""
81
+ }
82
+ ],
83
+ "bo._base_domain_": [
84
+ {
85
+ srcPath: "/_api/sites-list/v2/sites",
86
+ destPath: "/v2/sites"
87
+ }
88
+ ],
89
+ "wixbo.ai": [
90
+ {
91
+ srcPath: "/_api/sites-list/v2/sites",
92
+ destPath: "/v2/sites"
93
+ }
94
+ ],
95
+ "wix-bo.com": [
96
+ {
97
+ srcPath: "/_api/sites-list/v2/sites",
98
+ destPath: "/v2/sites"
99
+ }
100
+ ],
101
+ "dev._base_domain_": [
102
+ {
103
+ srcPath: "/_api/sites-list/v2/sites",
104
+ destPath: "/v2/sites"
105
+ }
106
+ ],
107
+ "editor._base_domain_": [
108
+ {
109
+ srcPath: "/_api/sites-list/v2/sites",
110
+ destPath: "/v2/sites"
111
+ }
112
+ ],
113
+ "blocks._base_domain_": [
114
+ {
115
+ srcPath: "/_api/sites-list/v2/sites",
116
+ destPath: "/v2/sites"
117
+ }
118
+ ],
119
+ "create.editorx": [
120
+ {
121
+ srcPath: "/_api/sites-list/v2/sites",
122
+ destPath: "/v2/sites"
123
+ }
124
+ ],
125
+ "online.codux.com": [
126
+ {
127
+ srcPath: "/_api/sites-list",
128
+ destPath: ""
129
+ },
130
+ {
131
+ srcPath: "/_api/sites-list/v2/sites",
132
+ destPath: "/v2/sites"
133
+ }
134
+ ],
135
+ "*.dev.wix-code.com": [
136
+ {
137
+ srcPath: "/site-list/v2/sites",
138
+ destPath: "/v2/sites"
139
+ }
140
+ ],
141
+ "vibe._base_domain_": [
142
+ {
143
+ srcPath: "/_api/sites-list",
144
+ destPath: ""
145
+ }
146
+ ]
147
+ };
148
+ return (0, import_rest_modules.resolveUrl)(Object.assign(opts, { domainToMappings }));
149
+ }
150
+ var PACKAGE_NAME = "@wix/auto_sdk_sites_sites";
151
+ function querySites(payload) {
152
+ function __querySites({ host }) {
153
+ const metadata = {
154
+ entityFqdn: "wix.site_list.v2.site",
155
+ method: "POST",
156
+ methodFqn: "com.wixpress.sitelist.api.SiteListServiceV2.QuerySites",
157
+ packageName: PACKAGE_NAME,
158
+ url: resolveComWixpressSitelistApiSiteListServiceV2Url({
159
+ protoPath: "/v2/sites/query",
160
+ data: payload,
161
+ host
162
+ }),
163
+ data: payload,
164
+ transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
165
+ {
166
+ transformFn: import_timestamp.transformRESTTimestampToSDKTimestamp,
167
+ paths: [
168
+ { path: "sites.createdDate" },
169
+ { path: "sites.updatedDate" },
170
+ { path: "sites.trashedDate" }
171
+ ]
172
+ }
173
+ ])
174
+ };
175
+ return metadata;
176
+ }
177
+ return __querySites;
178
+ }
179
+ function countSites(payload) {
180
+ function __countSites({ host }) {
181
+ const metadata = {
182
+ entityFqdn: "wix.site_list.v2.site",
183
+ method: "POST",
184
+ methodFqn: "com.wixpress.sitelist.api.SiteListServiceV2.CountSites",
185
+ packageName: PACKAGE_NAME,
186
+ url: resolveComWixpressSitelistApiSiteListServiceV2Url({
187
+ protoPath: "/v2/sites/count",
188
+ data: payload,
189
+ host
190
+ }),
191
+ data: payload
192
+ };
193
+ return metadata;
194
+ }
195
+ return __countSites;
196
+ }
197
+
198
+ // src/site-list-v2-site-sites.universal.ts
199
+ var EditorType = /* @__PURE__ */ ((EditorType2) => {
200
+ EditorType2["UNKNOWN"] = "UNKNOWN";
201
+ EditorType2["EDITOR"] = "EDITOR";
202
+ EditorType2["ADI"] = "ADI";
203
+ EditorType2["EDITORX"] = "EDITORX";
204
+ EditorType2["STUDIO"] = "STUDIO";
205
+ EditorType2["ODEDITOR"] = "ODEDITOR";
206
+ EditorType2["PICASSO"] = "PICASSO";
207
+ return EditorType2;
208
+ })(EditorType || {});
209
+ var Namespace = /* @__PURE__ */ ((Namespace2) => {
210
+ Namespace2["UNKNOWN_NAMESPACE"] = "UNKNOWN_NAMESPACE";
211
+ Namespace2["WIX"] = "WIX";
212
+ Namespace2["SHOUT_OUT"] = "SHOUT_OUT";
213
+ Namespace2["ALBUMS"] = "ALBUMS";
214
+ Namespace2["WIX_STORES_TEST_DRIVE"] = "WIX_STORES_TEST_DRIVE";
215
+ Namespace2["HOTELS"] = "HOTELS";
216
+ Namespace2["CLUBS"] = "CLUBS";
217
+ Namespace2["ONBOARDING_DRAFT"] = "ONBOARDING_DRAFT";
218
+ Namespace2["DEV_SITE"] = "DEV_SITE";
219
+ Namespace2["LOGOS"] = "LOGOS";
220
+ Namespace2["VIDEO_MAKER"] = "VIDEO_MAKER";
221
+ Namespace2["PARTNER_DASHBOARD"] = "PARTNER_DASHBOARD";
222
+ Namespace2["DEV_CENTER_COMPANY"] = "DEV_CENTER_COMPANY";
223
+ Namespace2["HTML_DRAFT"] = "HTML_DRAFT";
224
+ Namespace2["SITELESS_BUSINESS"] = "SITELESS_BUSINESS";
225
+ Namespace2["CREATOR_ECONOMY"] = "CREATOR_ECONOMY";
226
+ Namespace2["DASHBOARD_FIRST"] = "DASHBOARD_FIRST";
227
+ Namespace2["ANYWHERE"] = "ANYWHERE";
228
+ Namespace2["HEADLESS"] = "HEADLESS";
229
+ Namespace2["ACCOUNT_MASTER_CMS"] = "ACCOUNT_MASTER_CMS";
230
+ Namespace2["RISE"] = "RISE";
231
+ Namespace2["BRANDED_FIRST"] = "BRANDED_FIRST";
232
+ Namespace2["NOWNIA"] = "NOWNIA";
233
+ Namespace2["UGC_TEMPLATE"] = "UGC_TEMPLATE";
234
+ Namespace2["CODUX"] = "CODUX";
235
+ Namespace2["MEDIA_DESIGN_CREATOR"] = "MEDIA_DESIGN_CREATOR";
236
+ Namespace2["SHARED_BLOG_ENTERPRISE"] = "SHARED_BLOG_ENTERPRISE";
237
+ Namespace2["STANDALONE_FORMS"] = "STANDALONE_FORMS";
238
+ Namespace2["STANDALONE_EVENTS"] = "STANDALONE_EVENTS";
239
+ Namespace2["MIMIR"] = "MIMIR";
240
+ return Namespace2;
241
+ })(Namespace || {});
242
+ var SortOrder = /* @__PURE__ */ ((SortOrder2) => {
243
+ SortOrder2["ASC"] = "ASC";
244
+ SortOrder2["DESC"] = "DESC";
245
+ return SortOrder2;
246
+ })(SortOrder || {});
247
+ async function querySites2(options) {
248
+ const { httpClient, sideEffects } = arguments[1];
249
+ const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
250
+ query: options?.query
251
+ });
252
+ const reqOpts = querySites(payload);
253
+ sideEffects?.onSiteCall?.();
254
+ try {
255
+ const result = await httpClient.request(reqOpts);
256
+ sideEffects?.onSuccess?.(result);
257
+ return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
258
+ } catch (err) {
259
+ const transformedError = (0, import_transform_error.transformError)(
260
+ err,
261
+ {
262
+ spreadPathsToArguments: {},
263
+ explicitPathsToArguments: { query: "$[0].query" },
264
+ singleArgumentUnchanged: false
265
+ },
266
+ ["options"]
267
+ );
268
+ sideEffects?.onError?.(err);
269
+ throw transformedError;
270
+ }
271
+ }
272
+ async function countSites2(options) {
273
+ const { httpClient, sideEffects } = arguments[1];
274
+ const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
275
+ filter: options?.filter
276
+ });
277
+ const reqOpts = countSites(payload);
278
+ sideEffects?.onSiteCall?.();
279
+ try {
280
+ const result = await httpClient.request(reqOpts);
281
+ sideEffects?.onSuccess?.(result);
282
+ return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
283
+ } catch (err) {
284
+ const transformedError = (0, import_transform_error.transformError)(
285
+ err,
286
+ {
287
+ spreadPathsToArguments: {},
288
+ explicitPathsToArguments: { filter: "$[0].filter" },
289
+ singleArgumentUnchanged: false
290
+ },
291
+ ["options"]
292
+ );
293
+ sideEffects?.onError?.(err);
294
+ throw transformedError;
295
+ }
296
+ }
297
+ // Annotate the CommonJS export names for ESM import in node:
298
+ 0 && (module.exports = {
299
+ EditorType,
300
+ Namespace,
301
+ SortOrder,
302
+ countSites,
303
+ querySites
304
+ });
305
+ //# sourceMappingURL=index.typings.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../index.typings.ts","../../../src/site-list-v2-site-sites.universal.ts","../../../src/site-list-v2-site-sites.http.ts"],"sourcesContent":["export * from './src/site-list-v2-site-sites.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 ambassadorWixSiteListV2Site from './site-list-v2-site-sites.http.js';\n\nexport interface Site {\n /**\n * Site ID.\n * @format GUID\n */\n _id?: string;\n /**\n * HTML app ID for the site.\n * @format GUID\n */\n htmlAppId?: string | null;\n /** Site name. Used in the site's URL. */\n name?: string;\n /** Site display name. Used for display purposes, such as in the browser's tab name. */\n displayName?: string;\n /** Site creation date. */\n _createdDate?: Date | null;\n /** Site updated date. */\n _updatedDate?: Date | null;\n /** Site trashed date. */\n trashedDate?: Date | null;\n /** Whether the site is published. */\n published?: boolean;\n /** Whether the site has a Wix Premium (paid) plan. */\n premium?: boolean;\n /** Live site URL. */\n viewUrl?: string;\n /** Editor site URL. */\n editUrl?: string;\n /** Site thumbnail. */\n thumbnail?: string;\n /**\n * Site owner's account ID.\n * @format GUID\n */\n ownerAccountId?: string;\n /**\n * Site contributors' account IDs.\n * @format GUID\n * @minSize 1\n * @maxSize 1000\n */\n contributorAccountIds?: string[];\n /** Site's Wix editor type. */\n editorType?: EditorTypeWithLiterals;\n /** Whether Wix has blocked this site due to legal issues. */\n blocked?: boolean;\n /**\n * Folder ID that contains this site. Empty if site is at root level.\n * @format GUID\n */\n folderId?: string | null;\n /** Namespace of the site, for internal use. */\n namespace?: NamespaceWithLiterals;\n /** Whether the site has a connected domain. */\n domainConnected?: boolean;\n}\n\nexport enum EditorType {\n UNKNOWN = 'UNKNOWN',\n EDITOR = 'EDITOR',\n ADI = 'ADI',\n EDITORX = 'EDITORX',\n STUDIO = 'STUDIO',\n ODEDITOR = 'ODEDITOR',\n PICASSO = 'PICASSO',\n}\n\n/** @enumType */\nexport type EditorTypeWithLiterals =\n | EditorType\n | 'UNKNOWN'\n | 'EDITOR'\n | 'ADI'\n | 'EDITORX'\n | 'STUDIO'\n | 'ODEDITOR'\n | 'PICASSO';\n\nexport enum Namespace {\n UNKNOWN_NAMESPACE = 'UNKNOWN_NAMESPACE',\n /** Default namespace for UGC sites. MetaSites with this namespace will be shown in a user's site list by default. */\n WIX = 'WIX',\n /** ShoutOut stand alone product. These are siteless (no actual Wix site, no HtmlWeb). MetaSites with this namespace will *not* be shown in a user's site list by default. */\n SHOUT_OUT = 'SHOUT_OUT',\n /** MetaSites created by the Albums product, they appear as part of the Albums app. MetaSites with this namespace will *not* be shown in a user's site list by default. */\n ALBUMS = 'ALBUMS',\n /** Part of the WixStores migration flow, a user tries to migrate and gets this site to view and if the user likes it then stores removes this namespace and deletes the old site with the old stores. MetaSites with this namespace will *not* be shown in a user's site list by default. */\n WIX_STORES_TEST_DRIVE = 'WIX_STORES_TEST_DRIVE',\n /** Hotels standalone (siteless). MetaSites with this namespace will *not* be shown in a user's site list by default. */\n HOTELS = 'HOTELS',\n /** Clubs siteless MetaSites, a club without a wix website. MetaSites with this namespace will *not* be shown in a user's site list by default. */\n CLUBS = 'CLUBS',\n /** A partially created ADI website. MetaSites with this namespace will *not* be shown in a user's site list by default. */\n ONBOARDING_DRAFT = 'ONBOARDING_DRAFT',\n /** AppBuilder for AppStudio / shmite (c). MetaSites with this namespace will *not* be shown in a user's site list by default. */\n DEV_SITE = 'DEV_SITE',\n /** LogoMaker websites offered to the user after logo purchase. MetaSites with this namespace will *not* be shown in a user's site list by default. */\n LOGOS = 'LOGOS',\n /** VideoMaker websites offered to the user after video purchase. MetaSites with this namespace will *not* be shown in a user's site list by default. */\n VIDEO_MAKER = 'VIDEO_MAKER',\n /** MetaSites with this namespace will *not* be shown in a user's site list by default. */\n PARTNER_DASHBOARD = 'PARTNER_DASHBOARD',\n /** MetaSites with this namespace will *not* be shown in a user's site list by default. */\n DEV_CENTER_COMPANY = 'DEV_CENTER_COMPANY',\n /**\n * A draft created by HTML editor on open. Upon \"first save\" it will be moved to be of WIX domain.\n *\n * Meta site with this namespace will *not* be shown in a user's site list by default.\n */\n HTML_DRAFT = 'HTML_DRAFT',\n /**\n * the user-journey for Fitness users who want to start from managing their business instead of designing their website.\n * Will be accessible from Site List and will not have a website app.\n * Once the user attaches a site, the site will become a regular wixsite.\n */\n SITELESS_BUSINESS = 'SITELESS_BUSINESS',\n /** Belongs to \"strategic products\" company. Supports new product in the creator's economy space. */\n CREATOR_ECONOMY = 'CREATOR_ECONOMY',\n /** It is to be used in the Business First efforts. */\n DASHBOARD_FIRST = 'DASHBOARD_FIRST',\n /** Bookings business flow with no site. */\n ANYWHERE = 'ANYWHERE',\n /** Namespace for Headless Backoffice with no editor */\n HEADLESS = 'HEADLESS',\n /**\n * Namespace for master site that will exist in parent account that will be referenced by subaccounts\n * The site will be used for account level CSM feature for enterprise\n */\n ACCOUNT_MASTER_CMS = 'ACCOUNT_MASTER_CMS',\n /** Rise.ai Siteless account management for Gift Cards and Store Credit. */\n RISE = 'RISE',\n /**\n * As part of the branded app new funnel, users now can create a meta site that will be branded app first.\n * There's a blank site behind the scene but it's blank).\n * The Mobile company will be the owner of this namespace.\n */\n BRANDED_FIRST = 'BRANDED_FIRST',\n /** Nownia.com Siteless account management for Ai Scheduling Assistant. */\n NOWNIA = 'NOWNIA',\n /**\n * UGC Templates are templates that are created by users for personal use and to sale to other users.\n * The Partners company owns this namespace.\n */\n UGC_TEMPLATE = 'UGC_TEMPLATE',\n /** Codux Headless Sites */\n CODUX = 'CODUX',\n /** Bobb - AI Design Creator. */\n MEDIA_DESIGN_CREATOR = 'MEDIA_DESIGN_CREATOR',\n /**\n * Shared Blog Site is a unique single site across Enterprise account,\n * This site will hold all Blog posts related to the Marketing product.\n */\n SHARED_BLOG_ENTERPRISE = 'SHARED_BLOG_ENTERPRISE',\n /** Standalone forms (siteless). MetaSites with this namespace will *not* be shown in a user's site list by default. */\n STANDALONE_FORMS = 'STANDALONE_FORMS',\n /** Standalone events (siteless). MetaSites with this namespace will *not* be shown in a user's site list by default. */\n STANDALONE_EVENTS = 'STANDALONE_EVENTS',\n /** MIMIR - Siteless account for MIMIR Ai Job runner. */\n MIMIR = 'MIMIR',\n}\n\n/** @enumType */\nexport type NamespaceWithLiterals =\n | Namespace\n | 'UNKNOWN_NAMESPACE'\n | 'WIX'\n | 'SHOUT_OUT'\n | 'ALBUMS'\n | 'WIX_STORES_TEST_DRIVE'\n | 'HOTELS'\n | 'CLUBS'\n | 'ONBOARDING_DRAFT'\n | 'DEV_SITE'\n | 'LOGOS'\n | 'VIDEO_MAKER'\n | 'PARTNER_DASHBOARD'\n | 'DEV_CENTER_COMPANY'\n | 'HTML_DRAFT'\n | 'SITELESS_BUSINESS'\n | 'CREATOR_ECONOMY'\n | 'DASHBOARD_FIRST'\n | 'ANYWHERE'\n | 'HEADLESS'\n | 'ACCOUNT_MASTER_CMS'\n | 'RISE'\n | 'BRANDED_FIRST'\n | 'NOWNIA'\n | 'UGC_TEMPLATE'\n | 'CODUX'\n | 'MEDIA_DESIGN_CREATOR'\n | 'SHARED_BLOG_ENTERPRISE'\n | 'STANDALONE_FORMS'\n | 'STANDALONE_EVENTS'\n | 'MIMIR';\n\nexport interface QuerySitesRequest {\n /**\n * Filter and sorting with the following format:\n * `\"filter\" : { \"displayName\": \"my-site\" }`\n */\n query?: QueryV2;\n}\n\nexport interface QueryV2 extends QueryV2PagingMethodOneOf {\n /**\n * Paging options to limit and offset the number of items.\n * wix.common.Paging paging = 3;\n * Cursor token pointing to a page of results. Used in all calls following the first request.\n */\n cursorPaging?: CursorPaging;\n /**\n * Filter object with the following format:\n * `\"filter\" : {\n * \"displayName\": \"my-site\",\n * \"namespace\":{\"$in\":[\"value1\", \"value2\"]},\n * \"folderId\": {\"$exists\": false}\n * }`\n * Example of operators: `$in`, `$hasSome`, `$hasAll`, `$exists`\n */\n filter?: Record<string, any> | null;\n /**\n * Sort object with the following format:\n * `[{\"fieldName\":\"displayName\",\"order\":\"ASC\"},{\"fieldName\":\"createdDate\",\"order\":\"DESC\"}]`\n * @maxSize 4\n */\n sort?: Sorting[];\n}\n\n/** @oneof */\nexport interface QueryV2PagingMethodOneOf {\n /**\n * Paging options to limit and offset the number of items.\n * wix.common.Paging paging = 3;\n * Cursor token pointing to a page of results. Used in all calls following the first request.\n */\n cursorPaging?: CursorPaging;\n}\n\nexport interface Sorting {\n /**\n * Name of the field to sort by.\n * @maxLength 512\n */\n fieldName?: string;\n /** Sort order. */\n order?: SortOrderWithLiterals;\n}\n\nexport enum SortOrder {\n ASC = 'ASC',\n DESC = 'DESC',\n}\n\n/** @enumType */\nexport type SortOrderWithLiterals = SortOrder | 'ASC' | 'DESC';\n\nexport interface CursorPaging {\n /**\n * Maximum number of items to return in the results.\n * @max 100\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\nexport interface QuerySitesResponse {\n /** List of retrieved sites. */\n sites?: Site[];\n /**\n * Paging information.\n * @deprecated\n */\n cursorPaging?: CursorPaging;\n /** Meta data about the returned sites */\n metadata?: PagingMetadataV2;\n}\n\nexport interface PagingMetadataV2 {\n /** Number of items returned in the response. */\n count?: number | null;\n /** Cursors to navigate through the result pages using `next` and `prev`. Returned if cursor paging is used. */\n cursors?: Cursors;\n}\n\nexport interface Cursors {\n /** Cursor pointing to next page in the list of results. */\n next?: string | null;\n}\n\nexport interface CountSitesRequest {\n /**\n * Filter object. See [Filter and Sort](https://dev.wix.com/api/rest/account-level-apis/sites/filter-&-sort) documentation.\n * Note: the `premium` and `appIds` filters are not supported in this endpoint.\n */\n filter?: Record<string, any> | null;\n}\n\nexport interface CountSitesResponse {\n /**\n * Number of sites retrieved basd on the filter.\n * Free Wix accounts are limited to max 1,000 sites.\n * Premium accounts can have an unlimited number of sites.\n */\n count?: number;\n}\n\n/** @docsIgnore */\nexport type QuerySitesApplicationErrors = {\n code?: 'unauthenticated_user';\n description?: string;\n data?: Record<string, any>;\n};\n/** @docsIgnore */\nexport type CountSitesApplicationErrors = {\n code?: 'unauthenticated_user';\n description?: string;\n data?: Record<string, any>;\n};\n\n/**\n * Retrieves a list of up to 1,000 sites, given the provided [paging, sorting and filtering](https://dev.wix.com/api/rest/account-level-apis/sites/filter-&-sort).\n *\n * > **Important**: You can only call this method when authenticated as a Wix user or by using an account level API key.\n * @public\n * @permissionId SITE_LIST.READ\n * @fqn com.wixpress.sitelist.api.SiteListServiceV2.QuerySites\n */\nexport async function querySites(options?: QuerySitesOptions): Promise<\n NonNullablePaths<\n QuerySitesResponse,\n | `sites`\n | `sites.${number}._id`\n | `sites.${number}.name`\n | `sites.${number}.displayName`\n | `sites.${number}.published`\n | `sites.${number}.premium`\n | `sites.${number}.viewUrl`\n | `sites.${number}.editUrl`\n | `sites.${number}.thumbnail`\n | `sites.${number}.ownerAccountId`\n | `sites.${number}.editorType`\n | `sites.${number}.blocked`\n | `sites.${number}.namespace`\n | `sites.${number}.domainConnected`,\n 4\n > & {\n __applicationErrorsType?: QuerySitesApplicationErrors;\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 query: options?.query,\n });\n\n const reqOpts = ambassadorWixSiteListV2Site.querySites(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: { query: '$[0].query' },\n singleArgumentUnchanged: false,\n },\n ['options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface QuerySitesOptions {\n /**\n * Filter and sorting with the following format:\n * `\"filter\" : { \"displayName\": \"my-site\" }`\n */\n query?: QueryV2;\n}\n\n/**\n * Retrieves the number of sites, given the provided [filtering](https://dev.wix.com/api/rest/account-level-apis/sites/filter-&-sort).\n *\n * > **Important**: You can only call this method when authenticated as a Wix user or by using an account level API key.\n * @public\n * @permissionId SITE_LIST.READ\n * @fqn com.wixpress.sitelist.api.SiteListServiceV2.CountSites\n */\nexport async function countSites(options?: CountSitesOptions): Promise<\n NonNullablePaths<CountSitesResponse, `count`, 2> & {\n __applicationErrorsType?: CountSitesApplicationErrors;\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 filter: options?.filter,\n });\n\n const reqOpts = ambassadorWixSiteListV2Site.countSites(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: { filter: '$[0].filter' },\n singleArgumentUnchanged: false,\n },\n ['options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface CountSitesOptions {\n /**\n * Filter object. See [Filter and Sort](https://dev.wix.com/api/rest/account-level-apis/sites/filter-&-sort) documentation.\n * Note: the `premium` and `appIds` filters are not supported in this endpoint.\n */\n filter?: Record<string, any> | null;\n}\n","import { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\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 resolveComWixpressSitelistApiSiteListServiceV2Url(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'www._base_domain_': [\n {\n srcPath: '/_api/sites-list',\n destPath: '/api',\n },\n {\n srcPath: '/_api/sites-list/v2/sites',\n destPath: '/v2/sites',\n },\n ],\n 'feedback._base_domain_': [\n {\n srcPath: '/_api/sites-list',\n destPath: '/api',\n },\n ],\n 'manage._base_domain_': [\n {\n srcPath: '/_api/sites-list',\n destPath: '/api',\n },\n {\n srcPath: '/_api/sites-list/v2/sites',\n destPath: '/v2/sites',\n },\n {\n srcPath: '/_api/sites-list-data',\n destPath: '/api/sites-list-data',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/site-list/v2/sites',\n destPath: '/v2/sites',\n },\n ],\n 'api._api_base_domain_': [\n {\n srcPath: '/sites-list',\n destPath: '',\n },\n ],\n 'bo._base_domain_': [\n {\n srcPath: '/_api/sites-list/v2/sites',\n destPath: '/v2/sites',\n },\n ],\n 'wixbo.ai': [\n {\n srcPath: '/_api/sites-list/v2/sites',\n destPath: '/v2/sites',\n },\n ],\n 'wix-bo.com': [\n {\n srcPath: '/_api/sites-list/v2/sites',\n destPath: '/v2/sites',\n },\n ],\n 'dev._base_domain_': [\n {\n srcPath: '/_api/sites-list/v2/sites',\n destPath: '/v2/sites',\n },\n ],\n 'editor._base_domain_': [\n {\n srcPath: '/_api/sites-list/v2/sites',\n destPath: '/v2/sites',\n },\n ],\n 'blocks._base_domain_': [\n {\n srcPath: '/_api/sites-list/v2/sites',\n destPath: '/v2/sites',\n },\n ],\n 'create.editorx': [\n {\n srcPath: '/_api/sites-list/v2/sites',\n destPath: '/v2/sites',\n },\n ],\n 'online.codux.com': [\n {\n srcPath: '/_api/sites-list',\n destPath: '',\n },\n {\n srcPath: '/_api/sites-list/v2/sites',\n destPath: '/v2/sites',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/site-list/v2/sites',\n destPath: '/v2/sites',\n },\n ],\n 'vibe._base_domain_': [\n {\n srcPath: '/_api/sites-list',\n destPath: '',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_sites_sites';\n\n/**\n * Retrieves a list of up to 1,000 sites, given the provided [paging, sorting and filtering](https://dev.wix.com/api/rest/account-level-apis/sites/filter-&-sort).\n *\n * > **Important**: You can only call this method when authenticated as a Wix user or by using an account level API key.\n */\nexport function querySites(payload: object): RequestOptionsFactory<any> {\n function __querySites({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.site_list.v2.site',\n method: 'POST' as any,\n methodFqn: 'com.wixpress.sitelist.api.SiteListServiceV2.QuerySites',\n packageName: PACKAGE_NAME,\n url: resolveComWixpressSitelistApiSiteListServiceV2Url({\n protoPath: '/v2/sites/query',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'sites.createdDate' },\n { path: 'sites.updatedDate' },\n { path: 'sites.trashedDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __querySites;\n}\n\n/**\n * Retrieves the number of sites, given the provided [filtering](https://dev.wix.com/api/rest/account-level-apis/sites/filter-&-sort).\n *\n * > **Important**: You can only call this method when authenticated as a Wix user or by using an account level API key.\n */\nexport function countSites(payload: object): RequestOptionsFactory<any> {\n function __countSites({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.site_list.v2.site',\n method: 'POST' as any,\n methodFqn: 'com.wixpress.sitelist.api.SiteListServiceV2.CountSites',\n packageName: PACKAGE_NAME,\n url: resolveComWixpressSitelistApiSiteListServiceV2Url({\n protoPath: '/v2/sites/count',\n data: payload,\n host,\n }),\n data: payload,\n };\n\n return metadata;\n }\n\n return __countSites;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,oBAAAA;AAAA,EAAA,kBAAAC;AAAA;AAAA;;;ACAA,6BAAoD;AACpD,oCAGO;;;ACJP,uBAAqD;AACrD,6BAA+B;AAC/B,0BAA2B;AAI3B,SAAS,kDACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,qBAAqB;AAAA,MACnB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,0BAA0B;AAAA,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AE9D,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,EAAE,OAAO,aAAa;AAAA,QAChD,yBAAyB;AAAA,MAC3B;AAAA,MACA,CAAC,SAAS;AAAA,IACZ;AACA,iBAAa,UAAU,GAAG;AAE1B,UAAM;AAAA,EACR;AACF;AAkBA,eAAsBC,YAAW,SAI/B;AAEA,QAAM,EAAE,YAAY,YAAY,IAAI,UAAU,CAAC;AAK/C,QAAM,cAAU,qEAAsC;AAAA,IACpD,QAAQ,SAAS;AAAA,EACnB,CAAC;AAED,QAAM,UAAsC,WAAW,OAAO;AAE9D,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,uBAAAD;AAAA,MACvB;AAAA,MACA;AAAA,QACE,wBAAwB,CAAC;AAAA,QACzB,0BAA0B,EAAE,QAAQ,cAAc;AAAA,QAClD,yBAAyB;AAAA,MAC3B;AAAA,MACA,CAAC,SAAS;AAAA,IACZ;AACA,iBAAa,UAAU,GAAG;AAE1B,UAAM;AAAA,EACR;AACF;","names":["countSites","querySites","payload","EditorType","Namespace","SortOrder","querySites","sdkTransformError","countSites"]}
@@ -1,4 +1,5 @@
1
- import { d as QuerySitesRequest$1, a as QuerySitesResponse$1, j as CountSitesRequest$1, b as CountSitesResponse$1 } from './site-list-v2-site-sites.universal-DMSHEe0v.js';
1
+ import { QuerySitesRequest as QuerySitesRequest$1, QuerySitesResponse as QuerySitesResponse$1, CountSitesRequest as CountSitesRequest$1, CountSitesResponse as CountSitesResponse$1 } from './index.typings.js';
2
+ import '@wix/sdk-types';
2
3
 
3
4
  interface Site {
4
5
  /**
@@ -1,6 +1,6 @@
1
- import { HttpClient, MaybeContext, BuildRESTFunction } from '@wix/sdk-types';
2
- import { Q as QuerySitesOptions, a as QuerySitesResponse, C as CountSitesOptions, b as CountSitesResponse } from './site-list-v2-site-sites.universal-DMSHEe0v.mjs';
3
- export { j as CountSitesRequest, h as CursorPaging, i as Cursors, E as EditorType, N as Namespace, P as PagingMetadataV2, d as QuerySitesRequest, e as QueryV2, f as QueryV2PagingMethodOneOf, c as Site, S as SortOrder, g as Sorting } from './site-list-v2-site-sites.universal-DMSHEe0v.mjs';
1
+ import { HttpClient, NonNullablePaths, MaybeContext, BuildRESTFunction } from '@wix/sdk-types';
2
+ import { QuerySitesOptions, QuerySitesResponse, QuerySitesApplicationErrors, CountSitesOptions, CountSitesResponse, CountSitesApplicationErrors } from './index.typings.mjs';
3
+ export { CountSitesRequest, CursorPaging, Cursors, EditorType, EditorTypeWithLiterals, Namespace, NamespaceWithLiterals, PagingMetadataV2, QuerySitesRequest, QueryV2, QueryV2PagingMethodOneOf, Site, SortOrder, SortOrderWithLiterals, Sorting } from './index.typings.mjs';
4
4
 
5
5
  declare function querySites$1(httpClient: HttpClient): QuerySitesSignature;
6
6
  interface QuerySitesSignature {
@@ -9,7 +9,9 @@ interface QuerySitesSignature {
9
9
  *
10
10
  * > **Important**: You can only call this method when authenticated as a Wix user or by using an account level API key.
11
11
  */
12
- (options?: QuerySitesOptions | undefined): Promise<QuerySitesResponse>;
12
+ (options?: QuerySitesOptions): Promise<NonNullablePaths<QuerySitesResponse, `sites` | `sites.${number}._id` | `sites.${number}.name` | `sites.${number}.displayName` | `sites.${number}.published` | `sites.${number}.premium` | `sites.${number}.viewUrl` | `sites.${number}.editUrl` | `sites.${number}.thumbnail` | `sites.${number}.ownerAccountId` | `sites.${number}.editorType` | `sites.${number}.blocked` | `sites.${number}.namespace` | `sites.${number}.domainConnected`, 4> & {
13
+ __applicationErrorsType?: QuerySitesApplicationErrors;
14
+ }>;
13
15
  }
14
16
  declare function countSites$1(httpClient: HttpClient): CountSitesSignature;
15
17
  interface CountSitesSignature {
@@ -18,10 +20,12 @@ interface CountSitesSignature {
18
20
  *
19
21
  * > **Important**: You can only call this method when authenticated as a Wix user or by using an account level API key.
20
22
  */
21
- (options?: CountSitesOptions | undefined): Promise<CountSitesResponse>;
23
+ (options?: CountSitesOptions): Promise<NonNullablePaths<CountSitesResponse, `count`, 2> & {
24
+ __applicationErrorsType?: CountSitesApplicationErrors;
25
+ }>;
22
26
  }
23
27
 
24
28
  declare const querySites: MaybeContext<BuildRESTFunction<typeof querySites$1> & typeof querySites$1>;
25
29
  declare const countSites: MaybeContext<BuildRESTFunction<typeof countSites$1> & typeof countSites$1>;
26
30
 
27
- export { CountSitesOptions, CountSitesResponse, QuerySitesOptions, QuerySitesResponse, countSites, querySites };
31
+ export { CountSitesApplicationErrors, CountSitesOptions, CountSitesResponse, QuerySitesApplicationErrors, QuerySitesOptions, QuerySitesResponse, countSites, querySites };