From 5dd7b5def910f74774713204b4cb59757266ec63 Mon Sep 17 00:00:00 2001 From: imnotashrimp Date: Sun, 8 Oct 2023 13:49:22 +0300 Subject: [PATCH] extract siteProperties docs for publishing --- .../wix-business-tools-v2.service.json | 15 + .../SiteProperties.service.json | 1992 +++++++++++++++++ .../guides/site-properties-intro.md | 76 + 3 files changed, 2083 insertions(+) create mode 100644 wix-business-tools-v2/wix-business-tools-v2/SiteProperties.service.json create mode 100644 wix-business-tools-v2/wix-business-tools-v2/SiteProperties/guides/site-properties-intro.md diff --git a/wix-business-tools-v2/wix-business-tools-v2.service.json b/wix-business-tools-v2/wix-business-tools-v2.service.json index 7e2c0a2f73..9f84893154 100644 --- a/wix-business-tools-v2/wix-business-tools-v2.service.json +++ b/wix-business-tools-v2/wix-business-tools-v2.service.json @@ -22,6 +22,21 @@ "extra": {} }, "hidden": true + }, + { + "name": "siteProperties", + "type": [ + { + "referenceType": "wix-business-tools-v2.SiteProperties" + } + ], + "docs": { + "summary": "", + "links": [], + "examples": [], + "extra": {} + }, + "hidden": true } ], "operations": [], diff --git a/wix-business-tools-v2/wix-business-tools-v2/SiteProperties.service.json b/wix-business-tools-v2/wix-business-tools-v2/SiteProperties.service.json new file mode 100644 index 0000000000..2400ee466f --- /dev/null +++ b/wix-business-tools-v2/wix-business-tools-v2/SiteProperties.service.json @@ -0,0 +1,1992 @@ +{ + "name": "SiteProperties", + "memberOf": "wix-business-tools-v2", + "mixes": [], + "callbacks": [], + "extra": {}, + "clientId": "wix-business-tools.v2-properties", + "docs": {}, + "relatedGuides": [], + "properties": [], + "operations": [ + { + "name": "getSiteProperties", + "params": [ + { + "name": "options", + "type": [ + { + "referenceType": "wix-business-tools-v2.SiteProperties.GetSitePropertiesOptions" + } + ], + "doc": "Field options.", + "required": false + } + ], + "requiredFields": [], + "ret": { + "type": [ + { + "complexType": { + "nativeType": "Promise", + "typeParams": [ + { + "referenceType": "wix-business-tools-v2.SiteProperties.PropertiesReadResponse" + } + ] + } + } + ], + "doc": "The resulting properties for the requested site.\n" + }, + "docs": { + "summary": "Retrieves a current snapshot of a site's properties.", + "description": [ + "This function is not a universal function and runs only on the backend." + ], + "examples": [ + { + "title": "getSiteProperties example", + "body": [ + "import { siteProperties } from 'wix-business-tools.v2';", + " ", + " async function getSiteProperties(options) {", + " try {", + " const result = await siteProperties.getSiteProperties(options);", + "", + " return result;", + " } catch (error) {", + " console.error(error);", + " // Handle the error", + " }", + " }", + " " + ] + } + ] + }, + "isVeloEvent": false, + "customLabels": [ + { + "id": "maturity-beta" + } + ], + "syntaxName": "getSiteProperties", + "isAdminMethod": true + }, + { + "name": "updateBusinessContact", + "params": [ + { + "name": "businessContact", + "type": [ + { + "referenceType": "wix-business-tools-v2.SiteProperties.BusinessContactData" + } + ], + "doc": "The site's business contact information.", + "required": true + }, + { + "name": "fields", + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "string" + } + ] + } + } + ], + "doc": "The properties of `businessContact` to be updated. Properties not explicitly specified here are ignored. Properties included here but excluded from `businessContact` are cleared.", + "required": true + } + ], + "requiredFields": [ + "businessContact", + "fields" + ], + "ret": { + "type": [ + { + "complexType": { + "nativeType": "Promise", + "typeParams": [ + { + "nativeType": "void" + } + ] + } + } + ], + "doc": null + }, + "docs": { + "summary": "Updates a site's business contact information.", + "description": [ + "This function is not a universal function and runs only on the backend." + ], + "examples": [ + { + "title": "updateBusinessContact example", + "body": [ + "import { siteProperties } from 'wix-business-tools.v2';", + " ", + " async function updateBusinessContact(businessContact, fields) {", + " try {", + " const result = await siteProperties.updateBusinessContact(businessContact, fields);", + "", + " return result;", + " } catch (error) {", + " console.error(error);", + " // Handle the error", + " }", + " }", + " " + ] + } + ] + }, + "isVeloEvent": false, + "customLabels": [ + { + "id": "maturity-beta" + } + ], + "syntaxName": "updateBusinessContact", + "isAdminMethod": true + }, + { + "name": "updateBusinessProfile", + "params": [ + { + "name": "businessProfile", + "type": [ + { + "referenceType": "wix-business-tools-v2.SiteProperties.BusinessProfileData" + } + ], + "doc": "The site's business profile.", + "required": true + }, + { + "name": "fields", + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "string" + } + ] + } + } + ], + "doc": "The properties of `businessProfile` to be updated. Properties not explicitly specified here are ignored. Properties included here but excluded from `businessProfile` are cleared.", + "required": true + } + ], + "requiredFields": [ + "businessProfile", + "fields" + ], + "ret": { + "type": [ + { + "complexType": { + "nativeType": "Promise", + "typeParams": [ + { + "nativeType": "void" + } + ] + } + } + ], + "doc": null + }, + "docs": { + "summary": "Updates a site's business profile.", + "description": [ + "This function is not a universal function and runs only on the backend." + ], + "examples": [ + { + "title": "updateBusinessProfile example", + "body": [ + "import { siteProperties } from 'wix-business-tools.v2';", + " ", + " async function updateBusinessProfile(businessProfile, fields) {", + " try {", + " const result = await siteProperties.updateBusinessProfile(businessProfile, fields);", + "", + " return result;", + " } catch (error) {", + " console.error(error);", + " // Handle the error", + " }", + " }", + " " + ] + } + ] + }, + "isVeloEvent": false, + "customLabels": [ + { + "id": "maturity-beta" + } + ], + "syntaxName": "updateBusinessProfile", + "isAdminMethod": true + }, + { + "name": "updateBusinessSchedule", + "params": [ + { + "name": "businessSchedule", + "type": [ + { + "referenceType": "wix-business-tools-v2.SiteProperties.BusinessSchedule" + } + ], + "doc": "The site's business schedule in the site time zone.", + "required": true + } + ], + "requiredFields": [ + "businessSchedule" + ], + "ret": { + "type": [ + { + "complexType": { + "nativeType": "Promise", + "typeParams": [ + { + "nativeType": "void" + } + ] + } + } + ], + "doc": null + }, + "docs": { + "summary": "Updates a site's business schedule.", + "description": [ + "This function is not a universal function and runs only on the backend." + ], + "examples": [ + { + "title": "updateBusinessSchedule example", + "body": [ + "import { siteProperties } from 'wix-business-tools.v2';", + " ", + " async function updateBusinessSchedule(businessSchedule) {", + " try {", + " const result = await siteProperties.updateBusinessSchedule(businessSchedule);", + "", + " return result;", + " } catch (error) {", + " console.error(error);", + " // Handle the error", + " }", + " }", + " " + ] + } + ] + }, + "isVeloEvent": false, + "customLabels": [ + { + "id": "maturity-beta" + } + ], + "syntaxName": "updateBusinessSchedule", + "isAdminMethod": true + }, + { + "name": "updateConsentPolicy", + "params": [ + { + "name": "consentPolicy", + "type": [ + { + "referenceType": "wix-business-tools-v2.SiteProperties.ConsentPolicy" + } + ], + "doc": "Default consent policy defined by the site owner. Can be further limited by site visitors.", + "required": true + } + ], + "requiredFields": [ + "consentPolicy" + ], + "ret": { + "type": [ + { + "complexType": { + "nativeType": "Promise", + "typeParams": [ + { + "nativeType": "void" + } + ] + } + } + ], + "doc": null + }, + "docs": { + "summary": "Updates a site's default consent policy.", + "description": [ + "This function is not a universal function and runs only on the backend." + ], + "examples": [ + { + "title": "updateConsentPolicy example", + "body": [ + "import { siteProperties } from 'wix-business-tools.v2';", + " ", + " async function updateConsentPolicy(consentPolicy) {", + " try {", + " const result = await siteProperties.updateConsentPolicy(consentPolicy);", + "", + " return result;", + " } catch (error) {", + " console.error(error);", + " // Handle the error", + " }", + " }", + " " + ] + } + ] + }, + "isVeloEvent": false, + "customLabels": [ + { + "id": "maturity-beta" + } + ], + "syntaxName": "updateConsentPolicy", + "isAdminMethod": true + } + ], + "messages": [ + { + "name": "Address", + "members": [ + { + "name": "apartmentNumber", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Apartment number." + }, + { + "name": "city", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "City name." + }, + { + "name": "coordinates", + "optional": true, + "type": [ + { + "referenceType": "wix-business-tools-v2.SiteProperties.GeoCoordinates" + } + ], + "doc": "Geographic coordinates of location." + }, + { + "name": "country", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Two-letter country code in an [ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format." + }, + { + "name": "googleFormattedAddress", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Google-formatted version of this address." + }, + { + "name": "hint", + "optional": true, + "type": [ + { + "referenceType": "wix-business-tools-v2.SiteProperties.AddressHint" + } + ], + "doc": "Extra information to be displayed in the address." + }, + { + "name": "isPhysical", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether this address represents a physical location." + }, + { + "name": "state", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "State." + }, + { + "name": "street", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Street name." + }, + { + "name": "streetNumber", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Street number." + }, + { + "name": "zip", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Zip or postal code." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "AddressHint", + "members": [ + { + "name": "placement", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Where the extra text should be displayed." + }, + { + "name": "text", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Extra text displayed next to, or instead of, the actual address." + } + ], + "docs": { + "description": [ + "Extra information on displayed addresses.\nThis is used for display purposes. Used to add additional data about the address, such as \"In the passage\".\nFree text. In addition the user can state where he wants that additional description - before, after, or instead\nthe address string." + ] + } + }, + { + "name": "BulkPropertiesReadRequest", + "members": [ + { + "name": "sites", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "string" + } + ] + } + } + ], + "doc": "Sites ids." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "BulkPropertiesReadResponse", + "members": [ + { + "name": "sites", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Record", + "typeParams": [ + { + "nativeType": "string" + }, + { + "referenceType": "wix-business-tools-v2.SiteProperties.PropertiesReadResponse" + } + ] + } + } + ], + "doc": "The ID of the resolved MetaSite for the request." + } + ], + "docs": { + "description": [ + "The resulting properties for the requested site." + ] + } + }, + { + "name": "BusinessContactData", + "members": [ + { + "name": "address", + "optional": true, + "type": [ + { + "referenceType": "wix-business-tools-v2.SiteProperties.Address" + } + ], + "doc": "Publicly-available business address." + }, + { + "name": "email", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Publicly-available business email address." + }, + { + "name": "fax", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Publicly-available business fax number." + }, + { + "name": "phone", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Publicly-available business phone number." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "BusinessProfileData", + "members": [ + { + "name": "businessName", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Business name." + }, + { + "name": "description", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Site description." + }, + { + "name": "logo", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Path to the site's logo in Wix Media (without Wix Media base URL)." + }, + { + "name": "siteDisplayName", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Site display name." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "BusinessSchedule", + "members": [ + { + "name": "periods", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-business-tools-v2.SiteProperties.TimePeriod" + } + ] + } + } + ], + "doc": "Weekly recurring time periods when the business is regularly open or the service is available. Limited to 100 time periods." + }, + { + "name": "specialHourPeriod", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-business-tools-v2.SiteProperties.SpecialHourPeriod" + } + ] + } + } + ], + "doc": "Exceptions to the business's regular hours. The business can be open or closed during the exception." + } + ], + "docs": { + "description": [ + "Business schedule. Regular and exceptional time periods when the business is open or the service is available." + ] + } + }, + { + "name": "Categories", + "members": [ + { + "name": "businessTermId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Business Term Id" + }, + { + "name": "primary", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Primary site category." + }, + { + "name": "secondary", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "string" + } + ] + } + } + ], + "doc": "Secondary site category." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "ChangeContext", + "members": [ + { + "name": "propertiesChange", + "optional": true, + "type": [ + { + "referenceType": "wix-business-tools-v2.SiteProperties.PropertiesChange" + } + ], + "doc": "Properties were updated." + }, + { + "name": "siteCloned", + "optional": true, + "type": [ + { + "referenceType": "wix-business-tools-v2.SiteProperties.SiteCloned" + } + ], + "doc": "Properties were cloned on site cloning." + }, + { + "name": "siteCreated", + "optional": true, + "type": [ + { + "referenceType": "wix-business-tools-v2.SiteProperties.SiteCreated" + } + ], + "doc": "Default properties were created on site creation." + } + ], + "extra": { + "oneOfGroups": [ + { + "name": "oneOfChangeContextPayloadOneOf", + "members": [ + "propertiesChange", + "siteCloned", + "siteCreated" + ] + } + ] + }, + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "ChangeContextPayloadOneOf", + "members": [ + { + "name": "propertiesChange", + "optional": true, + "type": [ + { + "referenceType": "wix-business-tools-v2.SiteProperties.PropertiesChange" + } + ], + "doc": "Properties were updated." + }, + { + "name": "siteCloned", + "optional": true, + "type": [ + { + "referenceType": "wix-business-tools-v2.SiteProperties.SiteCloned" + } + ], + "doc": "Properties were cloned on site cloning." + }, + { + "name": "siteCreated", + "optional": true, + "type": [ + { + "referenceType": "wix-business-tools-v2.SiteProperties.SiteCreated" + } + ], + "doc": "Default properties were created on site creation." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "ConsentPolicy", + "members": [ + { + "name": "advertising", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether the site uses cookies that collect information allowing better customization of the experience for a current visitor." + }, + { + "name": "analytics", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether the site uses cookies that collect analytics about how the site is used (in order to improve it)." + }, + { + "name": "dataToThirdParty", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "CCPA compliance flag." + }, + { + "name": "essential", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether the site uses cookies that are essential to site operation." + }, + { + "name": "functional", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether the site uses cookies that affect site performance and other functional measurements." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "GeoCoordinates", + "members": [ + { + "name": "latitude", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Latitude of the location. Must be between -90 and 90." + }, + { + "name": "longitude", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Longitude of the location. Must be between -180 and 180." + } + ], + "docs": { + "description": [ + "Geocoordinates for a particular address." + ] + } + }, + { + "name": "GetSitePropertiesOptions", + "members": [ + { + "name": "fields", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "string" + } + ] + } + } + ], + "doc": "List of fields to return.\nIf omitted, all fields are returned." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "Locale", + "members": [ + { + "name": "country", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Two-letter country code in [ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) format." + }, + { + "name": "languageCode", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Two-letter language code in [ISO 639-1 alpha-2](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "Multilingual", + "members": [ + { + "name": "autoRedirect", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether to redirect to user language." + }, + { + "name": "supportedLanguages", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-business-tools-v2.SiteProperties.SupportedLanguage" + } + ] + } + } + ], + "doc": "Supported languages list." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "Properties", + "members": [ + { + "name": "address", + "optional": true, + "type": [ + { + "referenceType": "wix-business-tools-v2.SiteProperties.Address" + } + ], + "doc": "Address." + }, + { + "name": "businessConfig", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Supported values: `FITNESS SERVICE`, `RESTAURANT`, `BLOG`, `STORE`, `EVENT`, `UNKNOWN`.\n\nSite business type.\n" + }, + { + "name": "businessName", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Business name." + }, + { + "name": "businessSchedule", + "optional": true, + "type": [ + { + "referenceType": "wix-business-tools-v2.SiteProperties.BusinessSchedule" + } + ], + "doc": "Business schedule. Regular and exceptional time periods when the business is open or the service is available.\n\n__Note:__ Not supported by Wix Bookings.\n" + }, + { + "name": "categories", + "optional": true, + "type": [ + { + "referenceType": "wix-business-tools-v2.SiteProperties.Categories" + } + ], + "doc": "Site categories." + }, + { + "name": "consentPolicy", + "optional": true, + "type": [ + { + "referenceType": "wix-business-tools-v2.SiteProperties.ConsentPolicy" + } + ], + "doc": "Cookie policy the site owner defined for their site (before the users interacts with/limits it)." + }, + { + "name": "description", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Site description." + }, + { + "name": "email", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Email address." + }, + { + "name": "externalSiteUrl", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "External site url that uses Wix as its headless business solution" + }, + { + "name": "fax", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Fax number." + }, + { + "name": "language", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Site language.\n\nTwo-letter language code in [ISO 639-1 alpha-2](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.\n" + }, + { + "name": "locale", + "optional": true, + "type": [ + { + "referenceType": "wix-business-tools-v2.SiteProperties.Locale" + } + ], + "doc": "Site locale." + }, + { + "name": "logo", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Path to the site's logo in Wix Media (without Wix Media base URL)." + }, + { + "name": "multilingual", + "optional": true, + "type": [ + { + "referenceType": "wix-business-tools-v2.SiteProperties.Multilingual" + } + ], + "doc": "Supported languages of a site and the primary language." + }, + { + "name": "paymentCurrency", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Site currency format used to bill customers.\n\nThree-letter currency code in [ISO-4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format.\n" + }, + { + "name": "phone", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Phone number." + }, + { + "name": "siteDisplayName", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Site display name." + }, + { + "name": "timeZone", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Timezone in `America/New_York` format." + }, + { + "name": "trackClicksAnalytics", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Track clicks analytics" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "PropertiesChange", + "members": [], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "PropertiesReadRequest", + "members": [ + { + "name": "fields", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "string" + } + ] + } + } + ], + "doc": "List of fields to return.\nIf omitted, all fields are returned." + } + ], + "docs": { + "description": [ + "The parameters of a site properties read request." + ] + } + }, + { + "name": "PropertiesReadResponse", + "members": [ + { + "name": "properties", + "optional": true, + "type": [ + { + "referenceType": "wix-business-tools-v2.SiteProperties.Properties" + } + ], + "doc": "Properties for the requested site." + }, + { + "name": "version", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Current version of the stored property site. For internal use." + } + ], + "docs": { + "description": [ + "The resulting properties for the requested site." + ] + } + }, + { + "name": "PropertiesUpdateRequest", + "members": [ + { + "name": "fields", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "string" + } + ] + } + } + ], + "doc": "The properties to be updated. Properties not explicitly specified here are ignored. Properties included here but excluded from `properties` are cleared." + }, + { + "name": "properties", + "optional": true, + "type": [ + { + "referenceType": "wix-business-tools-v2.SiteProperties.Properties" + } + ], + "doc": "" + } + ], + "docs": { + "description": [ + "The request used to update a site's properties." + ] + } + }, + { + "name": "PropertiesUpdateResponse", + "members": [ + { + "name": "version", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The new version of the stored properties after the update. For internal use." + } + ], + "docs": { + "description": [ + "The details resulting from an update operation." + ] + } + }, + { + "name": "SiteCloned", + "members": [ + { + "name": "originMetaSiteId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Origin site id." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "SiteCreated", + "members": [ + { + "name": "originTemplateId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Origin template site id." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "SitePropertiesEvent", + "members": [ + { + "name": "fields", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "string" + } + ] + } + } + ], + "doc": "Set of properties that were updated - corresponds to the fields in \"properties\"." + }, + { + "name": "properties", + "optional": true, + "type": [ + { + "referenceType": "wix-business-tools-v2.SiteProperties.Properties" + } + ], + "doc": "Updated properties." + }, + { + "name": "version", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Version of the site's properties represented by this update." + } + ], + "docs": { + "description": [ + "The actual update event for a particular notification." + ] + } + }, + { + "name": "SitePropertiesFullNotification", + "members": [ + { + "name": "changeContext", + "optional": true, + "type": [ + { + "referenceType": "wix-business-tools-v2.SiteProperties.ChangeContext" + } + ], + "doc": "Context of the notification" + }, + { + "name": "metaSiteId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The site ID for which this snapshot applies." + }, + { + "name": "properties", + "optional": true, + "type": [ + { + "referenceType": "wix-business-tools-v2.SiteProperties.Properties" + } + ], + "doc": "Snapshot properties." + }, + { + "name": "version", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Version of the site's properties current snapshot." + } + ], + "docs": { + "description": [ + "Snapshot of latest site properties." + ] + } + }, + { + "name": "SitePropertiesNotification", + "members": [ + { + "name": "changeContext", + "optional": true, + "type": [ + { + "referenceType": "wix-business-tools-v2.SiteProperties.ChangeContext" + } + ], + "doc": "Context of the notification" + }, + { + "name": "event", + "optional": true, + "type": [ + { + "referenceType": "wix-business-tools-v2.SiteProperties.SitePropertiesEvent" + } + ], + "doc": "The actual update event." + }, + { + "name": "metasiteId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The site ID for which this update notification applies." + }, + { + "name": "translations", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-business-tools-v2.SiteProperties.Translation" + } + ] + } + } + ], + "doc": "A convenience set of mappings from the MetaSite ID to its constituent services." + } + ], + "docs": { + "description": [ + "Encapsulates all details written to the Greyhound topic when a site's properties are updated." + ] + } + }, + { + "name": "SitePropertiesUpdated", + "members": [ + { + "name": "event", + "optional": true, + "type": [ + { + "referenceType": "wix-business-tools-v2.SiteProperties.SitePropertiesEvent" + } + ], + "doc": "Update details." + }, + { + "name": "metasiteId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "ID of the Wix site that has been updated." + } + ], + "docs": { + "description": [ + "Encapsulates all changes when site properties are updated" + ] + } + }, + { + "name": "SpecialHourPeriod", + "members": [ + { + "name": "comment", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Additional info about the exception. For example, \"We close earlier on New Year's Eve.\"" + }, + { + "name": "endDate", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "End date and time of the exception in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format and [Coordinated Universal Time (UTC)](https://en.wikipedia.org/wiki/Coordinated_Universal_Time)." + }, + { + "name": "isClosed", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether the business is closed (or the service is not available) during the exception.\n\nDefault: `true`.\n" + }, + { + "name": "startDate", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Start date and time of the exception in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format and [Coordinated Universal Time (UTC)](https://en.wikipedia.org/wiki/Coordinated_Universal_Time)." + } + ], + "docs": { + "description": [ + "Exception to the business's regular hours. The business can be open or closed during the exception." + ] + } + }, + { + "name": "SupportedLanguage", + "members": [ + { + "name": "countryCode", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Language icon." + }, + { + "name": "isPrimary", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether the supported language is the primary language for the site." + }, + { + "name": "languageCode", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Two-letter language code in [ISO 639-1 alpha-2](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format." + }, + { + "name": "locale", + "optional": true, + "type": [ + { + "referenceType": "wix-business-tools-v2.SiteProperties.Locale" + } + ], + "doc": "Locale." + }, + { + "name": "resolutionMethod", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "How the language will be resolved. For internal use." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "TimePeriod", + "members": [ + { + "name": "closeDay", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Day of the week the period ends on." + }, + { + "name": "closeTime", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Time the period ends in 24-hour [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) extended format. Valid values are `00:00` to `24:00`, where `24:00` represents\nmidnight at the end of the specified day.\n\n__Note:__ If `openDay` and `closeDay` specify the same day of the week `closeTime` must be later than `openTime`.\n" + }, + { + "name": "openDay", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Day of the week the period starts on." + }, + { + "name": "openTime", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Time the period starts in 24-hour [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) extended format. Valid values are `00:00` to `24:00`, where `24:00` represents\nmidnight at the end of the specified day." + } + ], + "docs": { + "description": [ + "Weekly recurring time periods when the business is regularly open or the service is available." + ] + } + }, + { + "name": "Translation", + "members": [ + { + "name": "appDefId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The application definition ID; this only applies to services of type ThirdPartyApps." + }, + { + "name": "instanceId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The instance ID of the service." + }, + { + "name": "serviceType", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The service type." + } + ], + "docs": { + "description": [ + "A single mapping from the MetaSite ID to a particular service." + ] + } + }, + { + "name": "UpdateBusinessContactRequest", + "members": [ + { + "name": "businessContact", + "optional": true, + "type": [ + { + "referenceType": "wix-business-tools-v2.SiteProperties.BusinessContactData" + } + ], + "doc": "The site's business contact information." + }, + { + "name": "fields", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "string" + } + ] + } + } + ], + "doc": "The properties of `businessContact` to be updated. Properties not explicitly specified here are ignored. Properties included here but excluded from `businessContact` are cleared." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "UpdateBusinessContactResponse", + "members": [], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "UpdateBusinessProfileRequest", + "members": [ + { + "name": "businessProfile", + "optional": true, + "type": [ + { + "referenceType": "wix-business-tools-v2.SiteProperties.BusinessProfileData" + } + ], + "doc": "The site's business profile." + }, + { + "name": "fields", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "string" + } + ] + } + } + ], + "doc": "The properties of `businessProfile` to be updated. Properties not explicitly specified here are ignored. Properties included here but excluded from `businessProfile` are cleared." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "UpdateBusinessProfileResponse", + "members": [], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "UpdateBusinessScheduleRequest", + "members": [ + { + "name": "businessSchedule", + "optional": true, + "type": [ + { + "referenceType": "wix-business-tools-v2.SiteProperties.BusinessSchedule" + } + ], + "doc": "The site's business schedule in the site time zone." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "UpdateBusinessScheduleResponse", + "members": [], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "UpdateConsentPolicyRequest", + "members": [ + { + "name": "consentPolicy", + "optional": true, + "type": [ + { + "referenceType": "wix-business-tools-v2.SiteProperties.ConsentPolicy" + } + ], + "doc": "Default consent policy defined by the site owner. Can be further limited by site visitors." + } + ], + "docs": { + "description": [ + "The request used to update site's default consent policy" + ] + } + }, + { + "name": "UpdateConsentPolicyResponse", + "members": [], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "UpdateOptions", + "members": [ + { + "name": "fields", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "string" + } + ] + } + } + ], + "doc": "The properties to be updated. Properties not explicitly specified here are ignored. Properties included here but excluded from `properties` are cleared." + }, + { + "name": "properties", + "optional": true, + "type": [ + { + "referenceType": "wix-business-tools-v2.SiteProperties.Properties" + } + ], + "doc": "" + } + ], + "docs": { + "description": [ + "" + ] + } + } + ] +} diff --git a/wix-business-tools-v2/wix-business-tools-v2/SiteProperties/guides/site-properties-intro.md b/wix-business-tools-v2/wix-business-tools-v2/SiteProperties/guides/site-properties-intro.md new file mode 100644 index 0000000000..dc18084c63 --- /dev/null +++ b/wix-business-tools-v2/wix-business-tools-v2/SiteProperties/guides/site-properties-intro.md @@ -0,0 +1,76 @@ +--- +title: Introduction +--- + +# Introduction + +  + +
+ Developer Preview +
+ Some functions in this module are in Developer Preview. APIs in Developer Preview are subject to change and are not intended for use in production.
Send us your suggestions for improving these functions. Your feedback is valuable to us.
+
+ +  + +The Site Properties API +holds all the public information about the site and business in a single place, +including profile, contact details, schedule information, and consent policy. + +You can manage your site properties +using the [Business Info][dashoard-business-info] page in the site dashbaord. + +The Site Properties API allows you to: + +- Read all site properties. +- Manage your business contact details, business schedule, + region and locale settings, and default consent policy for visitors. + +For more information about managing your site properties, +see [Adding Your Site's Business Information][kb-adding-business-info]. + +To use the Site Properties API, +import `{ properties }` from wix-business-tools.v2: + +```js +import { properties } from 'wix-business-tools.v2'; +``` + +## About consent policy + +To help you comply with regulation guidelines such as GDPR and CCPA, +Wix has enabled a consent policy and adherence to the GDPR. +You can access and manage the default consent policy set for a site. + +The consent policy includes these types: + +- **Functional**: + Used to remember choices users make to improve their experience + (for example, language). +- **Analytics**: + Lets you and installed apps understand how visitors use the website + (for example, which pages they visit), + provide statistics on how the website is used, + and improve the website by identifying any errors and performance issues. +- **Advertising/Marketing**: + Used to collect information about the impact of marketing campaigns + performed in other websites on users and non-users. +- **Essential**: + Lets the visitor move around the website + and use essential features like secure and private areas. +- **Data To Third Parties**: + Lets you and installed apps share data with other parties. + This includes the sale of data, + as well sharing data for essential or enhanced functionality + (for example, Google Analytics). + Specifically for CCPA compliance. + +For more information about the consent policy process, see the following: + +- [Displaying a Cookie Banner On Your Site](https://support.wix.com/en/article/displaying-a-cookie-banner-on-your-site) +- [Adding a "Do Not Sell Data" Link to Your Wix Site](https://support.wix.com/en/article/adding-a-do-not-sell-data-link-to-your-wix-site) +- [Important Information About Editor Elements - Third Party Apps](https://support.wix.com/en/article/important-information-about-editor-elements-third-party-apps-custom-code-and-the-cookie-banner#third-party-apps) + +[dashboard-business-info]: https://www.wix.com/my-account/site-selector/?buttonText=Select%20Site&title=Select%20a%20Site&autoSelectOnSingleSite=true&actionUrl=https:%2F%2Fwww.wix.com%2Fdashboard%2F%7B%7BmetaSiteId%7D%7D%2Fsettings/business-info +[kb-adding-business-info]: https://support.wix.com/en/article/adding-your-sites-business-information \ No newline at end of file