@wix/auto_sdk_sites_sites 1.0.18 → 1.0.20
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.
- package/build/cjs/index.d.ts +10 -6
- package/build/cjs/index.js +1 -0
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/{site-list-v2-site-sites.universal-DMSHEe0v.d.ts → index.typings.d.ts} +41 -3
- package/build/cjs/index.typings.js +306 -0
- package/build/cjs/index.typings.js.map +1 -0
- package/build/cjs/meta.d.ts +6 -3
- package/build/es/index.d.mts +10 -6
- package/build/es/index.mjs +1 -0
- package/build/es/index.mjs.map +1 -1
- package/build/es/{site-list-v2-site-sites.universal-DMSHEe0v.d.mts → index.typings.d.mts} +41 -3
- package/build/es/index.typings.mjs +278 -0
- package/build/es/index.typings.mjs.map +1 -0
- package/build/es/meta.d.mts +6 -3
- package/build/internal/cjs/index.d.ts +10 -6
- package/build/internal/cjs/index.js +1 -0
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/{site-list-v2-site-sites.universal-DMSHEe0v.d.ts → index.typings.d.ts} +41 -3
- package/build/internal/cjs/index.typings.js +306 -0
- package/build/internal/cjs/index.typings.js.map +1 -0
- package/build/internal/cjs/meta.d.ts +6 -3
- package/build/internal/es/index.d.mts +10 -6
- package/build/internal/es/index.mjs +1 -0
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/{site-list-v2-site-sites.universal-DMSHEe0v.d.mts → index.typings.d.mts} +41 -3
- package/build/internal/es/index.typings.mjs +278 -0
- package/build/internal/es/index.typings.mjs.map +1 -0
- package/build/internal/es/meta.d.mts +6 -3
- package/package.json +5 -4
|
@@ -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 /** Wix Twins platform. */\n TWINS = 'TWINS',\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 | 'TWINS';\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;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kTransformError","countSites"]}
|
package/build/cjs/meta.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
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
|
/**
|
|
@@ -148,10 +149,12 @@ declare enum Namespace {
|
|
|
148
149
|
/** Standalone events (siteless). MetaSites with this namespace will *not* be shown in a user's site list by default. */
|
|
149
150
|
STANDALONE_EVENTS = "STANDALONE_EVENTS",
|
|
150
151
|
/** MIMIR - Siteless account for MIMIR Ai Job runner. */
|
|
151
|
-
MIMIR = "MIMIR"
|
|
152
|
+
MIMIR = "MIMIR",
|
|
153
|
+
/** Wix Twins platform. */
|
|
154
|
+
TWINS = "TWINS"
|
|
152
155
|
}
|
|
153
156
|
/** @enumType */
|
|
154
|
-
type NamespaceWithLiterals = Namespace | 'UNKNOWN_NAMESPACE' | 'WIX' | 'SHOUT_OUT' | 'ALBUMS' | 'WIX_STORES_TEST_DRIVE' | 'HOTELS' | 'CLUBS' | 'ONBOARDING_DRAFT' | 'DEV_SITE' | 'LOGOS' | 'VIDEO_MAKER' | 'PARTNER_DASHBOARD' | 'DEV_CENTER_COMPANY' | 'HTML_DRAFT' | 'SITELESS_BUSINESS' | 'CREATOR_ECONOMY' | 'DASHBOARD_FIRST' | 'ANYWHERE' | 'HEADLESS' | 'ACCOUNT_MASTER_CMS' | 'RISE' | 'BRANDED_FIRST' | 'NOWNIA' | 'UGC_TEMPLATE' | 'CODUX' | 'MEDIA_DESIGN_CREATOR' | 'SHARED_BLOG_ENTERPRISE' | 'STANDALONE_FORMS' | 'STANDALONE_EVENTS' | 'MIMIR';
|
|
157
|
+
type NamespaceWithLiterals = Namespace | 'UNKNOWN_NAMESPACE' | 'WIX' | 'SHOUT_OUT' | 'ALBUMS' | 'WIX_STORES_TEST_DRIVE' | 'HOTELS' | 'CLUBS' | 'ONBOARDING_DRAFT' | 'DEV_SITE' | 'LOGOS' | 'VIDEO_MAKER' | 'PARTNER_DASHBOARD' | 'DEV_CENTER_COMPANY' | 'HTML_DRAFT' | 'SITELESS_BUSINESS' | 'CREATOR_ECONOMY' | 'DASHBOARD_FIRST' | 'ANYWHERE' | 'HEADLESS' | 'ACCOUNT_MASTER_CMS' | 'RISE' | 'BRANDED_FIRST' | 'NOWNIA' | 'UGC_TEMPLATE' | 'CODUX' | 'MEDIA_DESIGN_CREATOR' | 'SHARED_BLOG_ENTERPRISE' | 'STANDALONE_FORMS' | 'STANDALONE_EVENTS' | 'MIMIR' | 'TWINS';
|
|
155
158
|
interface QuerySitesRequest {
|
|
156
159
|
/**
|
|
157
160
|
* Filter and sorting with the following format:
|
package/build/es/index.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { HttpClient, MaybeContext, BuildRESTFunction } from '@wix/sdk-types';
|
|
2
|
-
import {
|
|
3
|
-
export {
|
|
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
|
|
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
|
|
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 };
|
package/build/es/index.mjs
CHANGED
|
@@ -210,6 +210,7 @@ var Namespace = /* @__PURE__ */ ((Namespace2) => {
|
|
|
210
210
|
Namespace2["STANDALONE_FORMS"] = "STANDALONE_FORMS";
|
|
211
211
|
Namespace2["STANDALONE_EVENTS"] = "STANDALONE_EVENTS";
|
|
212
212
|
Namespace2["MIMIR"] = "MIMIR";
|
|
213
|
+
Namespace2["TWINS"] = "TWINS";
|
|
213
214
|
return Namespace2;
|
|
214
215
|
})(Namespace || {});
|
|
215
216
|
var SortOrder = /* @__PURE__ */ ((SortOrder2) => {
|
package/build/es/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../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":["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,SAAS,kBAAkB,yBAAyB;AACpD;AAAA,EACE;AAAA,EACA;AAAA,OACK;;;ACJP,SAAS,4CAA4C;AACrD,SAAS,sBAAsB;AAC/B,SAAS,kBAAkB;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;AA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AACF,UAAM,SAAS,MAAM,WAAW,QAAQ,OAAO;AAC/C,iBAAa,YAAY,MAAM;AAE/B,WAAO,wCAAwC,OAAO,IAAI;AAAA,EAC5D,SAAS,KAAU;AACjB,UAAM,mBAAmB;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,SAASC,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,SAAS,wBAAwB;AAG1B,IAAMC,cAEK,iCAAiBA,WAAgB;AAC5C,IAAMC,cAEK,iCAAiBA,WAAgB;","names":["payload","EditorType","Namespace","SortOrder","querySites","countSites","querySites","countSites","querySites","countSites"]}
|
|
1
|
+
{"version":3,"sources":["../../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":["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 /** Wix Twins platform. */\n TWINS = 'TWINS',\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 | 'TWINS';\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,SAAS,kBAAkB,yBAAyB;AACpD;AAAA,EACE;AAAA,EACA;AAAA,OACK;;;ACJP,SAAS,4CAA4C;AACrD,SAAS,sBAAsB;AAC/B,SAAS,kBAAkB;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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M,UAAU,sCAAsC;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,WAAO,wCAAwC,OAAO,IAAI;AAAA,EAC5D,SAAS,KAAU;AACjB,UAAM,mBAAmB;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;;;AEzbO,SAASC,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,SAAS,wBAAwB;AAG1B,IAAMC,cAEK,iCAAiBA,WAAgB;AAC5C,IAAMC,cAEK,iCAAiBA,WAAgB;","names":["payload","EditorType","Namespace","SortOrder","querySites","countSites","querySites","countSites","querySites","countSites"]}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { NonNullablePaths } from '@wix/sdk-types';
|
|
2
|
+
|
|
1
3
|
interface Site {
|
|
2
4
|
/**
|
|
3
5
|
* Site ID.
|
|
@@ -146,10 +148,12 @@ declare enum Namespace {
|
|
|
146
148
|
/** Standalone events (siteless). MetaSites with this namespace will *not* be shown in a user's site list by default. */
|
|
147
149
|
STANDALONE_EVENTS = "STANDALONE_EVENTS",
|
|
148
150
|
/** MIMIR - Siteless account for MIMIR Ai Job runner. */
|
|
149
|
-
MIMIR = "MIMIR"
|
|
151
|
+
MIMIR = "MIMIR",
|
|
152
|
+
/** Wix Twins platform. */
|
|
153
|
+
TWINS = "TWINS"
|
|
150
154
|
}
|
|
151
155
|
/** @enumType */
|
|
152
|
-
type NamespaceWithLiterals = Namespace | 'UNKNOWN_NAMESPACE' | 'WIX' | 'SHOUT_OUT' | 'ALBUMS' | 'WIX_STORES_TEST_DRIVE' | 'HOTELS' | 'CLUBS' | 'ONBOARDING_DRAFT' | 'DEV_SITE' | 'LOGOS' | 'VIDEO_MAKER' | 'PARTNER_DASHBOARD' | 'DEV_CENTER_COMPANY' | 'HTML_DRAFT' | 'SITELESS_BUSINESS' | 'CREATOR_ECONOMY' | 'DASHBOARD_FIRST' | 'ANYWHERE' | 'HEADLESS' | 'ACCOUNT_MASTER_CMS' | 'RISE' | 'BRANDED_FIRST' | 'NOWNIA' | 'UGC_TEMPLATE' | 'CODUX' | 'MEDIA_DESIGN_CREATOR' | 'SHARED_BLOG_ENTERPRISE' | 'STANDALONE_FORMS' | 'STANDALONE_EVENTS' | 'MIMIR';
|
|
156
|
+
type NamespaceWithLiterals = Namespace | 'UNKNOWN_NAMESPACE' | 'WIX' | 'SHOUT_OUT' | 'ALBUMS' | 'WIX_STORES_TEST_DRIVE' | 'HOTELS' | 'CLUBS' | 'ONBOARDING_DRAFT' | 'DEV_SITE' | 'LOGOS' | 'VIDEO_MAKER' | 'PARTNER_DASHBOARD' | 'DEV_CENTER_COMPANY' | 'HTML_DRAFT' | 'SITELESS_BUSINESS' | 'CREATOR_ECONOMY' | 'DASHBOARD_FIRST' | 'ANYWHERE' | 'HEADLESS' | 'ACCOUNT_MASTER_CMS' | 'RISE' | 'BRANDED_FIRST' | 'NOWNIA' | 'UGC_TEMPLATE' | 'CODUX' | 'MEDIA_DESIGN_CREATOR' | 'SHARED_BLOG_ENTERPRISE' | 'STANDALONE_FORMS' | 'STANDALONE_EVENTS' | 'MIMIR' | 'TWINS';
|
|
153
157
|
interface QuerySitesRequest {
|
|
154
158
|
/**
|
|
155
159
|
* Filter and sorting with the following format:
|
|
@@ -256,6 +260,29 @@ interface CountSitesResponse {
|
|
|
256
260
|
*/
|
|
257
261
|
count?: number;
|
|
258
262
|
}
|
|
263
|
+
/** @docsIgnore */
|
|
264
|
+
type QuerySitesApplicationErrors = {
|
|
265
|
+
code?: 'unauthenticated_user';
|
|
266
|
+
description?: string;
|
|
267
|
+
data?: Record<string, any>;
|
|
268
|
+
};
|
|
269
|
+
/** @docsIgnore */
|
|
270
|
+
type CountSitesApplicationErrors = {
|
|
271
|
+
code?: 'unauthenticated_user';
|
|
272
|
+
description?: string;
|
|
273
|
+
data?: Record<string, any>;
|
|
274
|
+
};
|
|
275
|
+
/**
|
|
276
|
+
* 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).
|
|
277
|
+
*
|
|
278
|
+
* > **Important**: You can only call this method when authenticated as a Wix user or by using an account level API key.
|
|
279
|
+
* @public
|
|
280
|
+
* @permissionId SITE_LIST.READ
|
|
281
|
+
* @fqn com.wixpress.sitelist.api.SiteListServiceV2.QuerySites
|
|
282
|
+
*/
|
|
283
|
+
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> & {
|
|
284
|
+
__applicationErrorsType?: QuerySitesApplicationErrors;
|
|
285
|
+
}>;
|
|
259
286
|
interface QuerySitesOptions {
|
|
260
287
|
/**
|
|
261
288
|
* Filter and sorting with the following format:
|
|
@@ -263,6 +290,17 @@ interface QuerySitesOptions {
|
|
|
263
290
|
*/
|
|
264
291
|
query?: QueryV2;
|
|
265
292
|
}
|
|
293
|
+
/**
|
|
294
|
+
* Retrieves the number of sites, given the provided [filtering](https://dev.wix.com/api/rest/account-level-apis/sites/filter-&-sort).
|
|
295
|
+
*
|
|
296
|
+
* > **Important**: You can only call this method when authenticated as a Wix user or by using an account level API key.
|
|
297
|
+
* @public
|
|
298
|
+
* @permissionId SITE_LIST.READ
|
|
299
|
+
* @fqn com.wixpress.sitelist.api.SiteListServiceV2.CountSites
|
|
300
|
+
*/
|
|
301
|
+
declare function countSites(options?: CountSitesOptions): Promise<NonNullablePaths<CountSitesResponse, `count`, 2> & {
|
|
302
|
+
__applicationErrorsType?: CountSitesApplicationErrors;
|
|
303
|
+
}>;
|
|
266
304
|
interface CountSitesOptions {
|
|
267
305
|
/**
|
|
268
306
|
* Filter object. See [Filter and Sort](https://dev.wix.com/api/rest/account-level-apis/sites/filter-&-sort) documentation.
|
|
@@ -271,4 +309,4 @@ interface CountSitesOptions {
|
|
|
271
309
|
filter?: Record<string, any> | null;
|
|
272
310
|
}
|
|
273
311
|
|
|
274
|
-
export { type
|
|
312
|
+
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 };
|