@wix/auto_sdk_multilingual_locale-settings 1.0.3 → 1.0.4
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/index.d.mts +137 -58
- package/build/index.d.ts +137 -58
- package/build/index.js +7 -1
- package/build/index.js.map +1 -1
- package/build/index.mjs +7 -1
- package/build/index.mjs.map +1 -1
- package/build/internal/index.d.mts +20 -9
- package/build/internal/index.d.ts +20 -9
- package/build/internal/index.js +7 -1
- package/build/internal/index.js.map +1 -1
- package/build/internal/index.mjs +7 -1
- package/build/internal/index.mjs.map +1 -1
- package/build/internal/meta.d.mts +62 -55
- package/build/internal/meta.d.ts +62 -55
- package/build/internal/meta.js +2 -2
- package/build/internal/meta.js.map +1 -1
- package/build/internal/meta.mjs +2 -2
- package/build/internal/meta.mjs.map +1 -1
- package/build/internal/{multilingual-settings-v2-locale-settings-locale-settings.universal-DWm_DkN7.d.mts → multilingual-settings-v2-locale-settings-locale-settings.universal-CEiXVHN_.d.mts} +137 -58
- package/build/internal/{multilingual-settings-v2-locale-settings-locale-settings.universal-DWm_DkN7.d.ts → multilingual-settings-v2-locale-settings-locale-settings.universal-CEiXVHN_.d.ts} +137 -58
- package/build/meta.d.mts +61 -54
- package/build/meta.d.ts +61 -54
- package/build/meta.js +2 -2
- package/build/meta.js.map +1 -1
- package/build/meta.mjs +2 -2
- package/build/meta.mjs.map +1 -1
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/multilingual-settings-v2-locale-settings-locale-settings.universal.ts","../../src/multilingual-settings-v2-locale-settings-locale-settings.http.ts","../../src/multilingual-settings-v2-locale-settings-locale-settings.public.ts","../../src/multilingual-settings-v2-locale-settings-locale-settings.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 ambassadorWixMultilingualSettingsV2LocaleSettings from './multilingual-settings-v2-locale-settings-locale-settings.http.js';\n\n/**\n * Settings is a 'single entity per tenant' entity with META-SITE tenancy.\n * This means that Settings is active for every site, not only sites that have multilingual functionality installed.\n */\nexport interface LocaleSettings {\n /**\n * Settings lifecycle begins at site creation and cannot be manually created or deleted.\n * It's created automatically for each site.\n * Revision number, used for optimistic locking\n * @readonly\n */\n revision?: string | null;\n /**\n * Timestamp of when the Settings entity was created\n * @readonly\n */\n _createdDate?: Date | null;\n /**\n * Timestamp of the last update to the Settings entity\n * @readonly\n */\n _updatedDate?: Date | null;\n /**\n * Indicates whether multilingual mode is enabled for the site.\n * When false, the user can change the main language.\n * When true, the main language cannot be changed.\n * Changing this value may have significant implications for the site's content and structure.\n * @readonly\n */\n multilingualModeEnabled?: boolean | null;\n /**\n * When true, the live site will automatically open in a secondary language\n * if it detects that the user's browser is set to that language.\n */\n autoSwitch?: boolean | null;\n /**\n * Defines how secondary languages will be resolved in the URL of the live site by default.\n * This can be overridden per locale.\n */\n urlStructure?: UrlStructure;\n /**\n * The primary locale of the site, materialized from the locales service.\n * @readonly\n */\n primaryLocale?: Locale;\n}\n\n/** Enum representing the method for resolving locales in URLs. */\nexport enum UrlStructure {\n /** Value not specified */\n UNDEFINED_RESOLUTION_METHOD = 'UNDEFINED_RESOLUTION_METHOD',\n /** www.mysite.com/fr */\n SUBDIRECTORY = 'SUBDIRECTORY',\n /** fr.mysite.com */\n SUBDOMAIN = 'SUBDOMAIN',\n /** www.mysite.com?lang=fr */\n QUERY_PARAM = 'QUERY_PARAM',\n}\n\n/** Every locale created will be validated using the IETF BCP 47 standard using framework validation. */\nexport interface Locale {\n /**\n * Locale ID. The ID is calculated from the language + region (+ script for future use).\n * @maxLength 20\n * @format LANGUAGE_TAG\n * @readonly\n * @immutable\n */\n _id?: string | null;\n /**\n * Revision number for optimistic locking.\n * @readonly\n */\n revision?: string | null;\n /**\n * Date and time the Locale was created.\n * @readonly\n */\n _createdDate?: Date | null;\n /**\n * Date and time the Locale was last updated.\n * @readonly\n */\n _updatedDate?: Date | null;\n /**\n * Language code (e.g., \"en\" for English).\n * @immutable\n * @format LANGUAGE\n */\n languageCode?: string | null;\n /**\n * Region code (e.g., \"US\" for United States).\n * @immutable\n * @format COUNTRY\n */\n regionCode?: string | null;\n /**\n * HIDDEN - locale will be available for the user to see it in editor and preview but won't be available for UoU\n * VISIBLE - locale will be available for the user to see it in editor and preview and be available for UoU to view the site in the specific locale, the URL of the page will indicate the locale according to the `effective_resolution_method` (e.g. www.mysite.com/es)\n */\n visibility?: LocaleVisibility;\n /**\n * Indicates if the language is the primary user-facing language in the Business Manager.\n * @readonly\n */\n primaryLocale?: boolean | null;\n /**\n * Indicates if the language is the primary visitor-facing language in the live site.\n * @readonly\n */\n visitorPrimaryLocale?: boolean | null;\n /**\n * Flag code (e.g., \"US\" for United States flag).\n * @maxLength 3\n */\n flag?: string | null;\n /**\n * Date and number format (e.g., \"en-US\" for US English formatting).\n * @format LANGUAGE_TAG\n */\n regionalFormat?: string | null;\n /**\n * The final and calculated specific locale resolution method.\n * This is taken by default from the settings unless there is an active override.\n * @readonly\n */\n effectiveUrlStructure?: UrlStructure;\n /** Override for the default resolution method, if needed. */\n urlStructureOverride?: UrlStructureOverride;\n /**\n * Machine translation code, can be overridden. By default, it has the value of language_code.\n * Add example for override needs (ZH_TW | ZH_CN)\n * @format LANGUAGE_TAG\n */\n machineTranslationCode?: string | null;\n /**\n * Calculated display name. This will equal override_name if it exists, or localized_name as default.\n * @readonly\n * @maxLength 30\n */\n effectiveDisplayName?: string | null;\n /**\n * Localized name inferred from the ID using the locale data set.\n * @readonly\n * @maxLength 30\n */\n displayName?: string | null;\n /**\n * User-defined override name for the locale.\n * @maxLength 30\n */\n overrideDisplayName?: string | null;\n}\n\n/** Enum representing the visibility status of a locale. */\nexport enum LocaleVisibility {\n /** Value not specified */\n UNDEFINED_LOCALE_STATUS = 'UNDEFINED_LOCALE_STATUS',\n /** Locale was added to site but was not activated */\n HIDDEN = 'HIDDEN',\n /** Locale was added to site and activated */\n VISIBLE = 'VISIBLE',\n}\n\n/** Message for overriding the default resolution method. */\nexport interface UrlStructureOverride {\n /** The specific resolution method to use instead of the default. */\n urlStructure?: UrlStructure;\n}\n\n/** Payload for the event triggered when the multilingual_mode value changes */\nexport interface MultilingualModeUpdated {\n /** The primary locale when multilingual mode is enabled or disabled */\n primaryLocale?: Locale;\n /** Indicates whether multilingual mode is enabled or disabled */\n multilingualModeEnabled?: boolean;\n}\n\n/** Request message for retrieving multilingual settings */\nexport interface GetLocaleSettingsRequest {}\n\n/** Response message containing the requested multilingual settings */\nexport interface GetLocaleSettingsResponse {\n /** The requested Settings entity */\n localeSettings?: LocaleSettings;\n}\n\n/** Request message for updating multilingual settings */\nexport interface UpdateLocaleSettingsRequest {\n /** Settings to be updated, may be partial */\n localeSettings: LocaleSettings;\n}\n\n/** Response message containing the updated multilingual settings */\nexport interface UpdateLocaleSettingsResponse {\n /** The updated Settings entity */\n localeSettings?: LocaleSettings;\n}\n\n/** Request message for setting the multilingual mode */\nexport interface SetMultilingualModeRequest {\n /** The new value of multilingual_mode to be set */\n multilingualModeEnabled: boolean;\n}\n\n/** Response message containing the updated settings after changing the multilingual mode */\nexport interface SetMultilingualModeResponse {\n /** The current Settings entity after the change */\n localeSettings?: LocaleSettings;\n}\n\nexport interface DomainEvent extends DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n /**\n * Unique event ID.\n * Allows clients to ignore duplicate webhooks.\n */\n _id?: string;\n /**\n * Assumes actions are also always typed to an entity_type\n * Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction\n */\n entityFqdn?: string;\n /**\n * This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)\n * This is although the created/updated/deleted notion is duplication of the oneof types\n * Example: created/updated/deleted/started/completed/email_opened\n */\n slug?: string;\n /** ID of the entity associated with the event. */\n entityId?: string;\n /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example: 2020-04-26T13:57:50.699Z */\n eventTime?: Date | null;\n /**\n * Whether the event was triggered as a result of a privacy regulation application\n * (for example, GDPR).\n */\n triggeredByAnonymizeRequest?: boolean | null;\n /** If present, indicates the action that triggered the event. */\n originatedFrom?: string | null;\n /**\n * A sequence number defining the order of updates to the underlying entity.\n * For example, given that some entity was updated at 16:00 and than again at 16:01,\n * it is guaranteed that the sequence number of the second update is strictly higher than the first.\n * As the consumer, you can use this value to ensure that you handle messages in the correct order.\n * To do so, you will need to persist this number on your end, and compare the sequence number from the\n * message against the one you have stored. Given that the stored number is higher, you should ignore the message.\n */\n entityEventSequence?: string | null;\n}\n\n/** @oneof */\nexport interface DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n}\n\nexport interface EntityCreatedEvent {\n entity?: string;\n}\n\nexport interface RestoreInfo {\n deletedDate?: Date | null;\n}\n\nexport interface EntityUpdatedEvent {\n /**\n * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.\n * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.\n * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.\n */\n currentEntity?: string;\n}\n\nexport interface EntityDeletedEvent {\n /** Entity that was deleted */\n deletedEntity?: string | null;\n}\n\nexport interface ActionEvent {\n body?: string;\n}\n\nexport interface Empty {}\n\nexport interface MetaSiteSpecialEvent extends MetaSiteSpecialEventPayloadOneOf {\n /** Emitted on a meta site creation. */\n siteCreated?: SiteCreated;\n /** Emitted on a meta site transfer completion. */\n siteTransferred?: SiteTransferred;\n /** Emitted on a meta site deletion. */\n siteDeleted?: SiteDeleted;\n /** Emitted on a meta site restoration. */\n siteUndeleted?: SiteUndeleted;\n /** Emitted on the first* publish of the meta site (* switching from unpublished to published state). */\n sitePublished?: SitePublished;\n /** Emitted on a meta site unpublish. */\n siteUnpublished?: SiteUnpublished;\n /** Emitted when meta site is marked as template. */\n siteMarkedAsTemplate?: SiteMarkedAsTemplate;\n /** Emitted when meta site is marked as a WixSite. */\n siteMarkedAsWixSite?: SiteMarkedAsWixSite;\n /** Emitted when an application is provisioned (installed). */\n serviceProvisioned?: ServiceProvisioned;\n /** Emitted when an application is removed (uninstalled). */\n serviceRemoved?: ServiceRemoved;\n /** Emitted when meta site name (URL slug) is changed. */\n siteRenamedPayload?: SiteRenamed;\n /** Emitted when meta site was permanently deleted. */\n hardDeleted?: SiteHardDeleted;\n /** Emitted on a namespace change. */\n namespaceChanged?: NamespaceChanged;\n /** Emitted when Studio is attached. */\n studioAssigned?: StudioAssigned;\n /** Emitted when Studio is detached. */\n studioUnassigned?: StudioUnassigned;\n /**\n * A meta site id.\n * @format GUID\n */\n metaSiteId?: string;\n /** A meta site version. Monotonically increasing. */\n version?: string;\n /** A timestamp of the event. */\n timestamp?: string;\n /**\n * TODO(meta-site): Change validation once validations are disabled for consumers\n * More context: https://wix.slack.com/archives/C0UHEBPFT/p1720957844413149 and https://wix.slack.com/archives/CFWKX325T/p1728892152855659\n * @maxSize 4000\n */\n assets?: Asset[];\n}\n\n/** @oneof */\nexport interface MetaSiteSpecialEventPayloadOneOf {\n /** Emitted on a meta site creation. */\n siteCreated?: SiteCreated;\n /** Emitted on a meta site transfer completion. */\n siteTransferred?: SiteTransferred;\n /** Emitted on a meta site deletion. */\n siteDeleted?: SiteDeleted;\n /** Emitted on a meta site restoration. */\n siteUndeleted?: SiteUndeleted;\n /** Emitted on the first* publish of the meta site (* switching from unpublished to published state). */\n sitePublished?: SitePublished;\n /** Emitted on a meta site unpublish. */\n siteUnpublished?: SiteUnpublished;\n /** Emitted when meta site is marked as template. */\n siteMarkedAsTemplate?: SiteMarkedAsTemplate;\n /** Emitted when meta site is marked as a WixSite. */\n siteMarkedAsWixSite?: SiteMarkedAsWixSite;\n /** Emitted when an application is provisioned (installed). */\n serviceProvisioned?: ServiceProvisioned;\n /** Emitted when an application is removed (uninstalled). */\n serviceRemoved?: ServiceRemoved;\n /** Emitted when meta site name (URL slug) is changed. */\n siteRenamedPayload?: SiteRenamed;\n /** Emitted when meta site was permanently deleted. */\n hardDeleted?: SiteHardDeleted;\n /** Emitted on a namespace change. */\n namespaceChanged?: NamespaceChanged;\n /** Emitted when Studio is attached. */\n studioAssigned?: StudioAssigned;\n /** Emitted when Studio is detached. */\n studioUnassigned?: StudioUnassigned;\n}\n\nexport interface Asset {\n /**\n * An application definition id (app_id in dev-center). For legacy reasons may be UUID or a string (from Java Enum).\n * @maxLength 36\n */\n appDefId?: string;\n /**\n * An instance id. For legacy reasons may be UUID or a string.\n * @maxLength 200\n */\n instanceId?: string;\n /** An application state. */\n state?: State;\n}\n\nexport enum State {\n UNKNOWN = 'UNKNOWN',\n ENABLED = 'ENABLED',\n DISABLED = 'DISABLED',\n PENDING = 'PENDING',\n DEMO = 'DEMO',\n}\n\nexport interface SiteCreated {\n /**\n * A template identifier (empty if not created from a template).\n * @maxLength 36\n */\n originTemplateId?: string;\n /**\n * An account id of the owner.\n * @format GUID\n */\n ownerId?: string;\n /** A context in which meta site was created. */\n context?: SiteCreatedContext;\n /**\n * A meta site id from which this site was created.\n *\n * In case of a creation from a template it's a template id.\n * In case of a site duplication (\"Save As\" in dashboard or duplicate in UM) it's an id of a source site.\n * @format GUID\n */\n originMetaSiteId?: string | null;\n /**\n * A meta site name (URL slug).\n * @maxLength 20\n */\n siteName?: string;\n /** A namespace. */\n namespace?: Namespace;\n}\n\nexport enum SiteCreatedContext {\n /** A valid option, we don't expose all reasons why site might be created. */\n OTHER = 'OTHER',\n /** A meta site was created from template. */\n FROM_TEMPLATE = 'FROM_TEMPLATE',\n /** A meta site was created by copying of the transfferred meta site. */\n DUPLICATE_BY_SITE_TRANSFER = 'DUPLICATE_BY_SITE_TRANSFER',\n /** A copy of existing meta site. */\n DUPLICATE = 'DUPLICATE',\n /** A meta site was created as a transfferred site (copy of the original), old flow, should die soon. */\n OLD_SITE_TRANSFER = 'OLD_SITE_TRANSFER',\n /** deprecated A meta site was created for Flash editor. */\n FLASH = 'FLASH',\n}\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}\n\n/** Site transferred to another user. */\nexport interface SiteTransferred {\n /**\n * A previous owner id (user that transfers meta site).\n * @format GUID\n */\n oldOwnerId?: string;\n /**\n * A new owner id (user that accepts meta site).\n * @format GUID\n */\n newOwnerId?: string;\n}\n\n/** Soft deletion of the meta site. Could be restored. */\nexport interface SiteDeleted {\n /** A deletion context. */\n deleteContext?: DeleteContext;\n}\n\nexport interface DeleteContext {\n /** When the meta site was deleted. */\n dateDeleted?: Date | null;\n /** A status. */\n deleteStatus?: DeleteStatus;\n /**\n * A reason (flow).\n * @maxLength 255\n */\n deleteOrigin?: string;\n /**\n * A service that deleted it.\n * @maxLength 255\n */\n initiatorId?: string | null;\n}\n\nexport enum DeleteStatus {\n UNKNOWN = 'UNKNOWN',\n TRASH = 'TRASH',\n DELETED = 'DELETED',\n PENDING_PURGE = 'PENDING_PURGE',\n}\n\n/** Restoration of the meta site. */\nexport interface SiteUndeleted {}\n\n/** First publish of a meta site. Or subsequent publish after unpublish. */\nexport interface SitePublished {}\n\nexport interface SiteUnpublished {\n /**\n * A list of URLs previously associated with the meta site.\n * @maxLength 4000\n * @maxSize 10000\n */\n urls?: string[];\n}\n\nexport interface SiteMarkedAsTemplate {}\n\nexport interface SiteMarkedAsWixSite {}\n\nexport interface ServiceProvisioned {\n /**\n * Either UUID or EmbeddedServiceType.\n * @maxLength 36\n */\n appDefId?: string;\n /**\n * Not only UUID. Something here could be something weird.\n * @maxLength 36\n */\n instanceId?: string;\n /**\n * An instance id from which this instance is originated.\n * @maxLength 36\n */\n originInstanceId?: string;\n /**\n * A version.\n * @maxLength 500\n */\n version?: string | null;\n /**\n * The origin meta site id\n * @format GUID\n */\n originMetaSiteId?: string | null;\n}\n\nexport interface ServiceRemoved {\n /**\n * Either UUID or EmbeddedServiceType.\n * @maxLength 36\n */\n appDefId?: string;\n /**\n * Not only UUID. Something here could be something weird.\n * @maxLength 36\n */\n instanceId?: string;\n /**\n * A version.\n * @maxLength 500\n */\n version?: string | null;\n}\n\n/** Rename of the site. Meaning, free public url has been changed as well. */\nexport interface SiteRenamed {\n /**\n * A new meta site name (URL slug).\n * @maxLength 20\n */\n newSiteName?: string;\n /**\n * A previous meta site name (URL slug).\n * @maxLength 255\n */\n oldSiteName?: string;\n}\n\n/**\n * Hard deletion of the meta site.\n *\n * Could not be restored. Therefore it's desirable to cleanup data.\n */\nexport interface SiteHardDeleted {\n /** A deletion context. */\n deleteContext?: DeleteContext;\n}\n\nexport interface NamespaceChanged {\n /** A previous namespace. */\n oldNamespace?: Namespace;\n /** A new namespace. */\n newNamespace?: Namespace;\n}\n\n/** Assigned Studio editor */\nexport interface StudioAssigned {}\n\n/** Unassigned Studio editor */\nexport interface StudioUnassigned {}\n\nexport interface MessageEnvelope {\n /**\n * App instance ID.\n * @format GUID\n */\n instanceId?: string | null;\n /**\n * Event type.\n * @maxLength 150\n */\n eventType?: string;\n /** The identification type and identity data. */\n identity?: IdentificationData;\n /** Stringify payload. */\n data?: string;\n}\n\nexport interface IdentificationData extends IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n /** @readonly */\n identityType?: WebhookIdentityType;\n}\n\n/** @oneof */\nexport interface IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n}\n\nexport enum WebhookIdentityType {\n UNKNOWN = 'UNKNOWN',\n ANONYMOUS_VISITOR = 'ANONYMOUS_VISITOR',\n MEMBER = 'MEMBER',\n WIX_USER = 'WIX_USER',\n APP = 'APP',\n}\n\ntype LocaleSettingsNonNullablePaths =\n | `urlStructure`\n | `primaryLocale.visibility`\n | `primaryLocale.effectiveUrlStructure`\n | `primaryLocale.urlStructureOverride.urlStructure`;\n\n/**\n * Retrieves the current multilingual settings for a site.\n * @internal\n * @documentationMaturity preview\n * @permissionId WIX_MULTILINGUAL.SETTINGS_READ\n * @returns Response message containing the requested multilingual settings\n * @fqn wix.multilingual.settings.v2.SettingsService.GetLocaleSettings\n */\nexport async function getLocaleSettings(): Promise<\n NonNullablePaths<\n GetLocaleSettingsResponse,\n {\n [P in LocaleSettingsNonNullablePaths]: `localeSettings.${P}`;\n }[LocaleSettingsNonNullablePaths]\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[0] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({});\n\n const reqOpts =\n ambassadorWixMultilingualSettingsV2LocaleSettings.getLocaleSettings(\n payload\n );\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {},\n singleArgumentUnchanged: false,\n },\n []\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Updates the multilingual settings for a site.\n * @param localeSettings - Settings to be updated, may be partial\n * @internal\n * @documentationMaturity preview\n * @requiredField localeSettings\n * @requiredField localeSettings.revision\n * @permissionId WIX_MULTILINGUAL.SETTINGS_UPDATE\n * @returns Response message containing the updated multilingual settings\n * @fqn wix.multilingual.settings.v2.SettingsService.UpdateLocaleSettings\n */\nexport async function updateLocaleSettings(\n localeSettings: NonNullablePaths<LocaleSettings, `revision`>\n): Promise<\n NonNullablePaths<\n UpdateLocaleSettingsResponse,\n {\n [P in LocaleSettingsNonNullablePaths]: `localeSettings.${P}`;\n }[LocaleSettingsNonNullablePaths]\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 localeSettings: localeSettings,\n });\n\n const reqOpts =\n ambassadorWixMultilingualSettingsV2LocaleSettings.updateLocaleSettings(\n payload\n );\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: { localeSettings: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['localeSettings']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Custom action to update the multilingual mode with strict validation on the state.\n * Once the value is set to true, the user can add more secondary languages and change the default settings.\n * To change the value to false, the site must not have any secondary languages, and the settings value will be restored to default.\n * @param multilingualModeEnabled - The new value of multilingual_mode to be set\n * @internal\n * @documentationMaturity preview\n * @requiredField multilingualModeEnabled\n * @permissionId WIX_MULTILINGUAL.SETTINGS_SET_MODE\n * @returns Response message containing the updated settings after changing the multilingual mode\n * @fqn wix.multilingual.settings.v2.SettingsService.SetMultilingualMode\n */\nexport async function setMultilingualMode(\n multilingualModeEnabled: boolean\n): Promise<\n NonNullablePaths<\n SetMultilingualModeResponse,\n {\n [P in LocaleSettingsNonNullablePaths]: `localeSettings.${P}`;\n }[LocaleSettingsNonNullablePaths]\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 multilingualModeEnabled: multilingualModeEnabled,\n });\n\n const reqOpts =\n ambassadorWixMultilingualSettingsV2LocaleSettings.setMultilingualMode(\n payload\n );\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: { multilingualModeEnabled: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['multilingualModeEnabled']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n","import { toURLSearchParams } from '@wix/sdk-runtime/rest-modules';\nimport { transformSDKTimestampToRESTTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformSDKFieldMaskToRESTFieldMask } from '@wix/sdk-runtime/transformations/field-mask';\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 resolveWixMultilingualSettingsV2SettingsServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'manage._base_domain_': [\n {\n srcPath: '/_api/settings',\n destPath: '',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_multilingual_locale-settings';\n\n/** Retrieves the current multilingual settings for a site. */\nexport function getLocaleSettings(payload: object): RequestOptionsFactory<any> {\n function __getLocaleSettings({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.multilingual.settings.v2.locale_settings',\n method: 'GET' as any,\n methodFqn:\n 'wix.multilingual.settings.v2.SettingsService.GetLocaleSettings',\n packageName: PACKAGE_NAME,\n url: resolveWixMultilingualSettingsV2SettingsServiceUrl({\n protoPath: '/v2/settings',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'localeSettings.createdDate' },\n { path: 'localeSettings.updatedDate' },\n { path: 'localeSettings.primaryLocale.createdDate' },\n { path: 'localeSettings.primaryLocale.updatedDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __getLocaleSettings;\n}\n\n/** Updates the multilingual settings for a site. */\nexport function updateLocaleSettings(\n payload: object\n): RequestOptionsFactory<any> {\n function __updateLocaleSettings({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKFieldMaskToRESTFieldMask,\n paths: [{ path: 'fieldMask' }],\n },\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [\n { path: 'localeSettings.createdDate' },\n { path: 'localeSettings.updatedDate' },\n { path: 'localeSettings.primaryLocale.createdDate' },\n { path: 'localeSettings.primaryLocale.updatedDate' },\n ],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.multilingual.settings.v2.locale_settings',\n method: 'PATCH' as any,\n methodFqn:\n 'wix.multilingual.settings.v2.SettingsService.UpdateLocaleSettings',\n packageName: PACKAGE_NAME,\n url: resolveWixMultilingualSettingsV2SettingsServiceUrl({\n protoPath: '/v2/settings',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'localeSettings.createdDate' },\n { path: 'localeSettings.updatedDate' },\n { path: 'localeSettings.primaryLocale.createdDate' },\n { path: 'localeSettings.primaryLocale.updatedDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __updateLocaleSettings;\n}\n\n/**\n * Custom action to update the multilingual mode with strict validation on the state.\n * Once the value is set to true, the user can add more secondary languages and change the default settings.\n * To change the value to false, the site must not have any secondary languages, and the settings value will be restored to default.\n */\nexport function setMultilingualMode(\n payload: object\n): RequestOptionsFactory<any> {\n function __setMultilingualMode({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.multilingual.settings.v2.locale_settings',\n method: 'PATCH' as any,\n methodFqn:\n 'wix.multilingual.settings.v2.SettingsService.SetMultilingualMode',\n packageName: PACKAGE_NAME,\n url: resolveWixMultilingualSettingsV2SettingsServiceUrl({\n protoPath: '/v2/settings/mode',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'localeSettings.createdDate' },\n { path: 'localeSettings.updatedDate' },\n { path: 'localeSettings.primaryLocale.createdDate' },\n { path: 'localeSettings.primaryLocale.updatedDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __setMultilingualMode;\n}\n","import { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport {\n GetLocaleSettingsResponse,\n LocaleSettings,\n SetMultilingualModeResponse,\n UpdateLocaleSettingsResponse,\n getLocaleSettings as universalGetLocaleSettings,\n setMultilingualMode as universalSetMultilingualMode,\n updateLocaleSettings as universalUpdateLocaleSettings,\n} from './multilingual-settings-v2-locale-settings-locale-settings.universal.js';\n\nexport const __metadata = { PACKAGE_NAME: '@wix/multilingual' };\n\n/** @internal */\nexport function getLocaleSettings(\n httpClient: HttpClient\n): GetLocaleSettingsSignature {\n return () =>\n universalGetLocaleSettings(\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface GetLocaleSettingsSignature {\n /**\n * Retrieves the current multilingual settings for a site.\n * @returns Response message containing the requested multilingual settings\n */\n (): Promise<GetLocaleSettingsResponse>;\n}\n\n/** @internal */\nexport function updateLocaleSettings(\n httpClient: HttpClient\n): UpdateLocaleSettingsSignature {\n return (localeSettings: NonNullablePaths<LocaleSettings, `revision`>) =>\n universalUpdateLocaleSettings(\n localeSettings,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface UpdateLocaleSettingsSignature {\n /**\n * Updates the multilingual settings for a site.\n * @param - Settings to be updated, may be partial\n * @returns Response message containing the updated multilingual settings\n */\n (localeSettings: LocaleSettings): Promise<UpdateLocaleSettingsResponse>;\n}\n\n/** @internal */\nexport function setMultilingualMode(\n httpClient: HttpClient\n): SetMultilingualModeSignature {\n return (multilingualModeEnabled: boolean) =>\n universalSetMultilingualMode(\n multilingualModeEnabled,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface SetMultilingualModeSignature {\n /**\n * Custom action to update the multilingual mode with strict validation on the state.\n * Once the value is set to true, the user can add more secondary languages and change the default settings.\n * To change the value to false, the site must not have any secondary languages, and the settings value will be restored to default.\n * @param - The new value of multilingual_mode to be set\n * @returns Response message containing the updated settings after changing the multilingual mode\n */\n (multilingualModeEnabled: boolean): Promise<SetMultilingualModeResponse>;\n}\n\nexport {\n ActionEvent,\n Asset,\n DeleteContext,\n DeleteStatus,\n DomainEvent,\n DomainEventBodyOneOf,\n Empty,\n EntityCreatedEvent,\n EntityDeletedEvent,\n EntityUpdatedEvent,\n GetLocaleSettingsRequest,\n GetLocaleSettingsResponse,\n IdentificationData,\n IdentificationDataIdOneOf,\n Locale,\n LocaleSettings,\n LocaleVisibility,\n MessageEnvelope,\n MetaSiteSpecialEvent,\n MetaSiteSpecialEventPayloadOneOf,\n MultilingualModeUpdated,\n Namespace,\n NamespaceChanged,\n RestoreInfo,\n ServiceProvisioned,\n ServiceRemoved,\n SetMultilingualModeRequest,\n SetMultilingualModeResponse,\n SiteCreated,\n SiteCreatedContext,\n SiteDeleted,\n SiteHardDeleted,\n SiteMarkedAsTemplate,\n SiteMarkedAsWixSite,\n SitePublished,\n SiteRenamed,\n SiteTransferred,\n SiteUndeleted,\n SiteUnpublished,\n State,\n StudioAssigned,\n StudioUnassigned,\n UpdateLocaleSettingsRequest,\n UpdateLocaleSettingsResponse,\n UrlStructure,\n UrlStructureOverride,\n WebhookIdentityType,\n} from './multilingual-settings-v2-locale-settings-locale-settings.universal.js';\n","import {\n getLocaleSettings as publicGetLocaleSettings,\n updateLocaleSettings as publicUpdateLocaleSettings,\n setMultilingualMode as publicSetMultilingualMode,\n} from './multilingual-settings-v2-locale-settings-locale-settings.public.js';\nimport { createRESTModule } from '@wix/sdk-runtime/rest-modules';\nimport { BuildRESTFunction, MaybeContext } from '@wix/sdk-types';\n\n/** @internal */\nexport const getLocaleSettings: MaybeContext<\n BuildRESTFunction<typeof publicGetLocaleSettings> &\n typeof publicGetLocaleSettings\n> = /*#__PURE__*/ createRESTModule(publicGetLocaleSettings);\n/** @internal */\nexport const updateLocaleSettings: MaybeContext<\n BuildRESTFunction<typeof publicUpdateLocaleSettings> &\n typeof publicUpdateLocaleSettings\n> = /*#__PURE__*/ createRESTModule(publicUpdateLocaleSettings);\n/** @internal */\nexport const setMultilingualMode: MaybeContext<\n BuildRESTFunction<typeof publicSetMultilingualMode> &\n typeof publicSetMultilingualMode\n> = /*#__PURE__*/ createRESTModule(publicSetMultilingualMode);\n\nexport {\n UrlStructure,\n LocaleVisibility,\n State,\n SiteCreatedContext,\n Namespace,\n DeleteStatus,\n WebhookIdentityType,\n} from './multilingual-settings-v2-locale-settings-locale-settings.universal.js';\nexport {\n LocaleSettings,\n Locale,\n UrlStructureOverride,\n MultilingualModeUpdated,\n GetLocaleSettingsRequest,\n GetLocaleSettingsResponse,\n UpdateLocaleSettingsRequest,\n UpdateLocaleSettingsResponse,\n SetMultilingualModeRequest,\n SetMultilingualModeResponse,\n DomainEvent,\n DomainEventBodyOneOf,\n EntityCreatedEvent,\n RestoreInfo,\n EntityUpdatedEvent,\n EntityDeletedEvent,\n ActionEvent,\n Empty,\n MetaSiteSpecialEvent,\n MetaSiteSpecialEventPayloadOneOf,\n Asset,\n SiteCreated,\n SiteTransferred,\n SiteDeleted,\n DeleteContext,\n SiteUndeleted,\n SitePublished,\n SiteUnpublished,\n SiteMarkedAsTemplate,\n SiteMarkedAsWixSite,\n ServiceProvisioned,\n ServiceRemoved,\n SiteRenamed,\n SiteHardDeleted,\n NamespaceChanged,\n StudioAssigned,\n StudioUnassigned,\n MessageEnvelope,\n IdentificationData,\n IdentificationDataIdOneOf,\n} from './multilingual-settings-v2-locale-settings-locale-settings.universal.js';\n"],"mappings":";AAAA,SAAS,kBAAkB,yBAAyB;AACpD;AAAA,EACE;AAAA,EACA;AAAA,OACK;;;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AE,WAAW;AAAA,EACf;AACJ;;;AC1DA,SAAS,wBAAwB;AAI1B,IAAMC,qBAGK,iCAAiBA,kBAAuB;AAEnD,IAAMC,wBAGK,iCAAiBA,qBAA0B;AAEtD,IAAMC,uBAGK,iCAAiBA,oBAAyB;","names":["payload","UrlStructure","LocaleVisibility","State","SiteCreatedContext","Namespace","DeleteStatus","WebhookIdentityType","getLocaleSettings","updateLocaleSettings","setMultilingualMode","getLocaleSettings","updateLocaleSettings","setMultilingualMode","getLocaleSettings","updateLocaleSettings","setMultilingualMode"]}
|
|
1
|
+
{"version":3,"sources":["../../src/multilingual-settings-v2-locale-settings-locale-settings.universal.ts","../../src/multilingual-settings-v2-locale-settings-locale-settings.http.ts","../../src/multilingual-settings-v2-locale-settings-locale-settings.public.ts","../../src/multilingual-settings-v2-locale-settings-locale-settings.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 ambassadorWixMultilingualSettingsV2LocaleSettings from './multilingual-settings-v2-locale-settings-locale-settings.http.js';\n\nexport interface LocaleSettings {\n /**\n * Revision number, which increments by 1 each time the locale settings object is updated. To prevent conflicting changes, the existing revision must be passed when updating the locale settings object.\n * @readonly\n */\n revision?: string | null;\n /**\n * Date and time the locale settings were created.\n * @readonly\n */\n _createdDate?: Date | null;\n /**\n * Date and time the locale settings were last updated.\n * @readonly\n */\n _updatedDate?: Date | null;\n /**\n * Indicates whether multilingual mode is enabled for the site.\n *\n * When set to `true`, you can create secondary locales.\n * @readonly\n */\n multilingualModeEnabled?: boolean | null;\n /**\n * Indicates whether the live site will automatically open in a secondary locale if the\n * site visitor's browser is set to that locale.\n *\n * Default: `false`\n *\n * <blockquote class=\"caution\">\n *\n * __Caution:__\n * Auto-switch can harm SEO by causing duplicate content issues and restricting search engine indexing of different language versions, which limits visibility in search results.\n *\n * </blockquote>\n */\n autoSwitch?: boolean | null;\n /**\n * Defines the default method for how secondary languages appear in the live site's URL.\n * The URL structure can be overridden per locale, using the Locale API.\n *\n * Default: `\"SUBDIRECTORY\"`\n */\n urlStructure?: UrlStructure;\n /**\n * The site's primary locale.\n * @readonly\n */\n primaryLocale?: Locale;\n}\n\n/** Enum representing the method for resolving locales in URLs. */\nexport enum UrlStructure {\n /** Undefined resolution method. */\n UNDEFINED_RESOLUTION_METHOD = 'UNDEFINED_RESOLUTION_METHOD',\n /** Subdirectory resolution method for the URL structure. For example, `\"www.mysite.com/fr\"`. */\n SUBDIRECTORY = 'SUBDIRECTORY',\n /** Subdomain resolution method for the URL structure. For example, `\"fr.mysite.com\"`. */\n SUBDOMAIN = 'SUBDOMAIN',\n /** Query parameter resolution method for the URL structure. For example, `\"www.mysite.com?lang=fr\"`. */\n QUERY_PARAM = 'QUERY_PARAM',\n}\n\nexport interface Locale {\n /**\n * Locale ID. The ID is made up of the language and region codes. For example, `\"en-US\"`.\n * @maxLength 20\n * @format LANGUAGE_TAG\n * @readonly\n * @immutable\n */\n _id?: string | null;\n /**\n * Revision number, which increments by 1 each time the locale is updated. To prevent conflicting changes, the existing revision must be passed when updating the locale object.\n * @readonly\n */\n revision?: string | null;\n /**\n * Date and time the locale was created.\n * @readonly\n */\n _createdDate?: Date | null;\n /**\n * Date and time the locale was last updated.\n * @readonly\n */\n _updatedDate?: Date | null;\n /**\n * Language code. For example, `\"en\"` for English.\n * @immutable\n * @format LANGUAGE\n */\n languageCode?: string | null;\n /**\n * Region code. For example, `\"UK\"` for United Kingdom.\n * @immutable\n * @format COUNTRY\n */\n regionCode?: string | null;\n /** Locale visibility status. */\n visibility?: LocaleVisibility;\n /**\n * Indicates whether the locale is the site's primary locale.\n * @readonly\n */\n primaryLocale?: boolean | null;\n /**\n * Indicates whether the locale is treated as the default for site visitors when no language is specified in the URL of the site.\n * @readonly\n */\n visitorPrimaryLocale?: boolean | null;\n /**\n * Flag as a 3-letter language code based on Wix's supported locales. For example, `\"USA\"` for the United States flag.\n * @maxLength 3\n */\n flag?: string | null;\n /**\n * Regional format for determining how to display data types such as dates, times, numbers, and currencies. For example, `\"en-US\"` for US English formatting.\n * @format LANGUAGE_TAG\n */\n regionalFormat?: string | null;\n /**\n * Default URL structure for the locale's live site URL,\n * based on the locale's settings, unless overridden.\n * @readonly\n */\n effectiveUrlStructure?: UrlStructure;\n /** Optional override for the locale's default URL structure. */\n urlStructureOverride?: UrlStructureOverride;\n /**\n * Language code based on Wix's supported locales, used to specify the target language when\n * translatable content is sent for machine translation. For example, `\"ES\"` for Spanish\n * or `\"ZH_TW\"` for Traditional Chinese.\n *\n * Default: The locale's `languageCode` value.\n * @format LANGUAGE_TAG\n */\n machineTranslationCode?: string | null;\n /**\n * The locale's `displayName`, unless overridden.\n * @readonly\n * @maxLength 30\n */\n effectiveDisplayName?: string | null;\n /**\n * Default display name for the locale, inferred from the locale ID and region code.\n * @readonly\n * @maxLength 30\n */\n displayName?: string | null;\n /**\n * Optional override for the locale's display name.\n * @maxLength 30\n */\n overrideDisplayName?: string | null;\n}\n\n/** Enum representing the visibility status of a locale. */\nexport enum LocaleVisibility {\n /** Undefined visibility status. */\n UNDEFINED_LOCALE_STATUS = 'UNDEFINED_LOCALE_STATUS',\n /** Locale is hidden from site visitors. */\n HIDDEN = 'HIDDEN',\n /** Locale is visible to site visitors. A site can only have up to 100 visible locales. */\n VISIBLE = 'VISIBLE',\n}\n\n/** Message for overriding the default resolution method. */\nexport interface UrlStructureOverride {\n /** Resolution method that defines the URL structure to use instead of the default. */\n urlStructure?: UrlStructure;\n}\n\n/** Payload for the event triggered when the multilingual_mode value changes */\nexport interface MultilingualModeUpdated {\n /** The primary locale when `multilingualModeEnabled` is updated. */\n primaryLocale?: Locale;\n /** Indicates whether the multilingual mode is enabled on the site. */\n multilingualModeEnabled?: boolean;\n}\n\n/** Request message for retrieving multilingual settings */\nexport interface GetLocaleSettingsRequest {}\n\n/** Response message containing the requested multilingual settings */\nexport interface GetLocaleSettingsResponse {\n /** Retrieved locale settings. */\n localeSettings?: LocaleSettings;\n}\n\n/** Request message for updating multilingual settings */\nexport interface UpdateLocaleSettingsRequest {\n /** Locale settings to update. */\n localeSettings: LocaleSettings;\n}\n\n/** Response message containing the updated multilingual settings */\nexport interface UpdateLocaleSettingsResponse {\n /** Updated locale settings. */\n localeSettings?: LocaleSettings;\n}\n\n/** Request message for setting the multilingual mode */\nexport interface SetMultilingualModeRequest {\n /**\n * Whether to enable multilingual mode for the site.\n *\n * Default: `false`\n */\n multilingualModeEnabled: boolean;\n}\n\n/** Response message containing the updated settings after changing the multilingual mode */\nexport interface SetMultilingualModeResponse {\n /** Updated locale settings. */\n localeSettings?: LocaleSettings;\n}\n\nexport interface DomainEvent extends DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n /**\n * Unique event ID.\n * Allows clients to ignore duplicate webhooks.\n */\n _id?: string;\n /**\n * Assumes actions are also always typed to an entity_type\n * Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction\n */\n entityFqdn?: string;\n /**\n * This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)\n * This is although the created/updated/deleted notion is duplication of the oneof types\n * Example: created/updated/deleted/started/completed/email_opened\n */\n slug?: string;\n /** ID of the entity associated with the event. */\n entityId?: string;\n /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example: 2020-04-26T13:57:50.699Z */\n eventTime?: Date | null;\n /**\n * Whether the event was triggered as a result of a privacy regulation application\n * (for example, GDPR).\n */\n triggeredByAnonymizeRequest?: boolean | null;\n /** If present, indicates the action that triggered the event. */\n originatedFrom?: string | null;\n /**\n * A sequence number defining the order of updates to the underlying entity.\n * For example, given that some entity was updated at 16:00 and than again at 16:01,\n * it is guaranteed that the sequence number of the second update is strictly higher than the first.\n * As the consumer, you can use this value to ensure that you handle messages in the correct order.\n * To do so, you will need to persist this number on your end, and compare the sequence number from the\n * message against the one you have stored. Given that the stored number is higher, you should ignore the message.\n */\n entityEventSequence?: string | null;\n}\n\n/** @oneof */\nexport interface DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n}\n\nexport interface EntityCreatedEvent {\n entity?: string;\n}\n\nexport interface RestoreInfo {\n deletedDate?: Date | null;\n}\n\nexport interface EntityUpdatedEvent {\n /**\n * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.\n * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.\n * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.\n */\n currentEntity?: string;\n}\n\nexport interface EntityDeletedEvent {\n /** Entity that was deleted */\n deletedEntity?: string | null;\n}\n\nexport interface ActionEvent {\n body?: string;\n}\n\nexport interface Empty {}\n\nexport interface MetaSiteSpecialEvent extends MetaSiteSpecialEventPayloadOneOf {\n /** Emitted on a meta site creation. */\n siteCreated?: SiteCreated;\n /** Emitted on a meta site transfer completion. */\n siteTransferred?: SiteTransferred;\n /** Emitted on a meta site deletion. */\n siteDeleted?: SiteDeleted;\n /** Emitted on a meta site restoration. */\n siteUndeleted?: SiteUndeleted;\n /** Emitted on the first* publish of the meta site (* switching from unpublished to published state). */\n sitePublished?: SitePublished;\n /** Emitted on a meta site unpublish. */\n siteUnpublished?: SiteUnpublished;\n /** Emitted when meta site is marked as template. */\n siteMarkedAsTemplate?: SiteMarkedAsTemplate;\n /** Emitted when meta site is marked as a WixSite. */\n siteMarkedAsWixSite?: SiteMarkedAsWixSite;\n /** Emitted when an application is provisioned (installed). */\n serviceProvisioned?: ServiceProvisioned;\n /** Emitted when an application is removed (uninstalled). */\n serviceRemoved?: ServiceRemoved;\n /** Emitted when meta site name (URL slug) is changed. */\n siteRenamedPayload?: SiteRenamed;\n /** Emitted when meta site was permanently deleted. */\n hardDeleted?: SiteHardDeleted;\n /** Emitted on a namespace change. */\n namespaceChanged?: NamespaceChanged;\n /** Emitted when Studio is attached. */\n studioAssigned?: StudioAssigned;\n /** Emitted when Studio is detached. */\n studioUnassigned?: StudioUnassigned;\n /**\n * Emitted when one of the URLs is changed. After this event you may call `urls-server` to fetch\n * the actual URL.\n *\n * See: https://wix.slack.com/archives/C0UHEBPFT/p1732520791210559?thread_ts=1732027914.294059&cid=C0UHEBPFT\n * See: https://wix.slack.com/archives/C0UHEBPFT/p1744115197619459\n */\n urlChanged?: SiteUrlChanged;\n /** Site is marked as PurgedExternally */\n sitePurgedExternally?: SitePurgedExternally;\n /**\n * A meta site id.\n * @format GUID\n */\n metaSiteId?: string;\n /** A meta site version. Monotonically increasing. */\n version?: string;\n /** A timestamp of the event. */\n timestamp?: string;\n /**\n * TODO(meta-site): Change validation once validations are disabled for consumers\n * More context: https://wix.slack.com/archives/C0UHEBPFT/p1720957844413149 and https://wix.slack.com/archives/CFWKX325T/p1728892152855659\n * @maxSize 4000\n */\n assets?: Asset[];\n}\n\n/** @oneof */\nexport interface MetaSiteSpecialEventPayloadOneOf {\n /** Emitted on a meta site creation. */\n siteCreated?: SiteCreated;\n /** Emitted on a meta site transfer completion. */\n siteTransferred?: SiteTransferred;\n /** Emitted on a meta site deletion. */\n siteDeleted?: SiteDeleted;\n /** Emitted on a meta site restoration. */\n siteUndeleted?: SiteUndeleted;\n /** Emitted on the first* publish of the meta site (* switching from unpublished to published state). */\n sitePublished?: SitePublished;\n /** Emitted on a meta site unpublish. */\n siteUnpublished?: SiteUnpublished;\n /** Emitted when meta site is marked as template. */\n siteMarkedAsTemplate?: SiteMarkedAsTemplate;\n /** Emitted when meta site is marked as a WixSite. */\n siteMarkedAsWixSite?: SiteMarkedAsWixSite;\n /** Emitted when an application is provisioned (installed). */\n serviceProvisioned?: ServiceProvisioned;\n /** Emitted when an application is removed (uninstalled). */\n serviceRemoved?: ServiceRemoved;\n /** Emitted when meta site name (URL slug) is changed. */\n siteRenamedPayload?: SiteRenamed;\n /** Emitted when meta site was permanently deleted. */\n hardDeleted?: SiteHardDeleted;\n /** Emitted on a namespace change. */\n namespaceChanged?: NamespaceChanged;\n /** Emitted when Studio is attached. */\n studioAssigned?: StudioAssigned;\n /** Emitted when Studio is detached. */\n studioUnassigned?: StudioUnassigned;\n /**\n * Emitted when one of the URLs is changed. After this event you may call `urls-server` to fetch\n * the actual URL.\n *\n * See: https://wix.slack.com/archives/C0UHEBPFT/p1732520791210559?thread_ts=1732027914.294059&cid=C0UHEBPFT\n * See: https://wix.slack.com/archives/C0UHEBPFT/p1744115197619459\n */\n urlChanged?: SiteUrlChanged;\n /** Site is marked as PurgedExternally */\n sitePurgedExternally?: SitePurgedExternally;\n}\n\nexport interface Asset {\n /**\n * An application definition id (app_id in dev-center). For legacy reasons may be UUID or a string (from Java Enum).\n * @maxLength 36\n */\n appDefId?: string;\n /**\n * An instance id. For legacy reasons may be UUID or a string.\n * @maxLength 200\n */\n instanceId?: string;\n /** An application state. */\n state?: State;\n}\n\nexport enum State {\n UNKNOWN = 'UNKNOWN',\n ENABLED = 'ENABLED',\n DISABLED = 'DISABLED',\n PENDING = 'PENDING',\n DEMO = 'DEMO',\n}\n\nexport interface SiteCreated {\n /**\n * A template identifier (empty if not created from a template).\n * @maxLength 36\n */\n originTemplateId?: string;\n /**\n * An account id of the owner.\n * @format GUID\n */\n ownerId?: string;\n /** A context in which meta site was created. */\n context?: SiteCreatedContext;\n /**\n * A meta site id from which this site was created.\n *\n * In case of a creation from a template it's a template id.\n * In case of a site duplication (\"Save As\" in dashboard or duplicate in UM) it's an id of a source site.\n * @format GUID\n */\n originMetaSiteId?: string | null;\n /**\n * A meta site name (URL slug).\n * @maxLength 20\n */\n siteName?: string;\n /** A namespace. */\n namespace?: Namespace;\n}\n\nexport enum SiteCreatedContext {\n /** A valid option, we don't expose all reasons why site might be created. */\n OTHER = 'OTHER',\n /** A meta site was created from template. */\n FROM_TEMPLATE = 'FROM_TEMPLATE',\n /** A meta site was created by copying of the transfferred meta site. */\n DUPLICATE_BY_SITE_TRANSFER = 'DUPLICATE_BY_SITE_TRANSFER',\n /** A copy of existing meta site. */\n DUPLICATE = 'DUPLICATE',\n /** A meta site was created as a transfferred site (copy of the original), old flow, should die soon. */\n OLD_SITE_TRANSFER = 'OLD_SITE_TRANSFER',\n /** deprecated A meta site was created for Flash editor. */\n FLASH = 'FLASH',\n}\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/** Site transferred to another user. */\nexport interface SiteTransferred {\n /**\n * A previous owner id (user that transfers meta site).\n * @format GUID\n */\n oldOwnerId?: string;\n /**\n * A new owner id (user that accepts meta site).\n * @format GUID\n */\n newOwnerId?: string;\n}\n\n/** Soft deletion of the meta site. Could be restored. */\nexport interface SiteDeleted {\n /** A deletion context. */\n deleteContext?: DeleteContext;\n}\n\nexport interface DeleteContext {\n /** When the meta site was deleted. */\n dateDeleted?: Date | null;\n /** A status. */\n deleteStatus?: DeleteStatus;\n /**\n * A reason (flow).\n * @maxLength 255\n */\n deleteOrigin?: string;\n /**\n * A service that deleted it.\n * @maxLength 255\n */\n initiatorId?: string | null;\n}\n\nexport enum DeleteStatus {\n UNKNOWN = 'UNKNOWN',\n TRASH = 'TRASH',\n DELETED = 'DELETED',\n PENDING_PURGE = 'PENDING_PURGE',\n PURGED_EXTERNALLY = 'PURGED_EXTERNALLY',\n}\n\n/** Restoration of the meta site. */\nexport interface SiteUndeleted {}\n\n/** First publish of a meta site. Or subsequent publish after unpublish. */\nexport interface SitePublished {}\n\nexport interface SiteUnpublished {\n /**\n * A list of URLs previously associated with the meta site.\n * @maxLength 4000\n * @maxSize 10000\n */\n urls?: string[];\n}\n\nexport interface SiteMarkedAsTemplate {}\n\nexport interface SiteMarkedAsWixSite {}\n\n/**\n * Represents a service provisioned a site.\n *\n * Note on `origin_instance_id`:\n * There is no guarantee that you will be able to find a meta site using `origin_instance_id`.\n * This is because of the following scenario:\n *\n * Imagine you have a template where a third-party application (TPA) includes some stub data,\n * such as a product catalog. When you create a site from this template, you inherit this\n * default product catalog. However, if the template's product catalog is modified,\n * your site will retain the catalog as it was at the time of site creation. This ensures that\n * your site remains consistent with what you initially received and does not include any\n * changes made to the original template afterward.\n * To ensure this, the TPA on the template gets a new instance_id.\n */\nexport interface ServiceProvisioned {\n /**\n * Either UUID or EmbeddedServiceType.\n * @maxLength 36\n */\n appDefId?: string;\n /**\n * Not only UUID. Something here could be something weird.\n * @maxLength 36\n */\n instanceId?: string;\n /**\n * An instance id from which this instance is originated.\n * @maxLength 36\n */\n originInstanceId?: string;\n /**\n * A version.\n * @maxLength 500\n */\n version?: string | null;\n /**\n * The origin meta site id\n * @format GUID\n */\n originMetaSiteId?: string | null;\n}\n\nexport interface ServiceRemoved {\n /**\n * Either UUID or EmbeddedServiceType.\n * @maxLength 36\n */\n appDefId?: string;\n /**\n * Not only UUID. Something here could be something weird.\n * @maxLength 36\n */\n instanceId?: string;\n /**\n * A version.\n * @maxLength 500\n */\n version?: string | null;\n}\n\n/** Rename of the site. Meaning, free public url has been changed as well. */\nexport interface SiteRenamed {\n /**\n * A new meta site name (URL slug).\n * @maxLength 20\n */\n newSiteName?: string;\n /**\n * A previous meta site name (URL slug).\n * @maxLength 255\n */\n oldSiteName?: string;\n}\n\n/**\n * Hard deletion of the meta site.\n *\n * Could not be restored. Therefore it's desirable to cleanup data.\n */\nexport interface SiteHardDeleted {\n /** A deletion context. */\n deleteContext?: DeleteContext;\n}\n\nexport interface NamespaceChanged {\n /** A previous namespace. */\n oldNamespace?: Namespace;\n /** A new namespace. */\n newNamespace?: Namespace;\n}\n\n/** Assigned Studio editor */\nexport interface StudioAssigned {}\n\n/** Unassigned Studio editor */\nexport interface StudioUnassigned {}\n\n/**\n * Fired in case site URLs were changed in any way: new secondary domain, published, account slug rename, site rename etc.\n *\n * This is an internal event, it's not propagated in special events, because it's non-actionable. If you need to keep up\n * with sites and its urls, you need to listen to another topic/event. Read about it:\n *\n * https://bo.wix.com/wix-docs/rest/meta-site/meta-site---urls-service\n */\nexport interface SiteUrlChanged {}\n\n/**\n * Used at the end of the deletion flow for both draft sites and when a user deletes a site.\n * Consumed by other teams to remove relevant data.\n */\nexport interface SitePurgedExternally {\n /**\n * @maxLength 2048\n * @maxSize 100\n * @deprecated\n * @targetRemovalDate 2025-04-15\n */\n appDefId?: string[];\n}\n\nexport interface MessageEnvelope {\n /**\n * App instance ID.\n * @format GUID\n */\n instanceId?: string | null;\n /**\n * Event type.\n * @maxLength 150\n */\n eventType?: string;\n /** The identification type and identity data. */\n identity?: IdentificationData;\n /** Stringify payload. */\n data?: string;\n}\n\nexport interface IdentificationData extends IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n /** @readonly */\n identityType?: WebhookIdentityType;\n}\n\n/** @oneof */\nexport interface IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n}\n\nexport enum WebhookIdentityType {\n UNKNOWN = 'UNKNOWN',\n ANONYMOUS_VISITOR = 'ANONYMOUS_VISITOR',\n MEMBER = 'MEMBER',\n WIX_USER = 'WIX_USER',\n APP = 'APP',\n}\n\ntype LocaleSettingsNonNullablePaths =\n | `urlStructure`\n | `primaryLocale.visibility`\n | `primaryLocale.effectiveUrlStructure`\n | `primaryLocale.urlStructureOverride.urlStructure`;\n\n/**\n * Retrieves a site's locale settings.\n * @internal\n * @documentationMaturity preview\n * @permissionId WIX_MULTILINGUAL.SETTINGS_READ\n * @returns Response message containing the requested multilingual settings\n * @fqn wix.multilingual.settings.v2.SettingsService.GetLocaleSettings\n */\nexport async function getLocaleSettings(): Promise<\n NonNullablePaths<\n GetLocaleSettingsResponse,\n {\n [P in LocaleSettingsNonNullablePaths]: `localeSettings.${P}`;\n }[LocaleSettingsNonNullablePaths]\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[0] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({});\n\n const reqOpts =\n ambassadorWixMultilingualSettingsV2LocaleSettings.getLocaleSettings(\n payload\n );\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {},\n singleArgumentUnchanged: false,\n },\n []\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Updates a site's locale settings.\n * @param localeSettings - Locale settings to update.\n * @internal\n * @documentationMaturity preview\n * @requiredField localeSettings\n * @requiredField localeSettings.revision\n * @permissionId WIX_MULTILINGUAL.SETTINGS_UPDATE\n * @returns Response message containing the updated multilingual settings\n * @fqn wix.multilingual.settings.v2.SettingsService.UpdateLocaleSettings\n */\nexport async function updateLocaleSettings(\n localeSettings: NonNullablePaths<LocaleSettings, `revision`>\n): Promise<\n NonNullablePaths<\n UpdateLocaleSettingsResponse,\n {\n [P in LocaleSettingsNonNullablePaths]: `localeSettings.${P}`;\n }[LocaleSettingsNonNullablePaths]\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 localeSettings: localeSettings,\n });\n\n const reqOpts =\n ambassadorWixMultilingualSettingsV2LocaleSettings.updateLocaleSettings(\n payload\n );\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: { localeSettings: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['localeSettings']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Sets a site's multilingual mode.\n *\n * When multilingual mode is enabled, you can create secondary locales.\n *\n * To disable multilingual mode, all secondary locales must first be removed. This action removes all translated content from your site. Disabling multilingual mode will also reset the locale settings to their default values.\n *\n * <blockquote class=\"important\">\n * <strong>Important:</strong>\n *\n * You can only call this method on sites where a Wix user has installed the [Wix Multilingual app](https://www.wix.com/app-market/wix-multilingual?searchLocation=home).\n *\n * </blockquote>\n * @param multilingualModeEnabled - Whether to enable multilingual mode for the site.\n *\n * Default: `false`\n * @internal\n * @documentationMaturity preview\n * @requiredField multilingualModeEnabled\n * @permissionId WIX_MULTILINGUAL.SETTINGS_SET_MODE\n * @returns Response message containing the updated settings after changing the multilingual mode\n * @fqn wix.multilingual.settings.v2.SettingsService.SetMultilingualMode\n */\nexport async function setMultilingualMode(\n multilingualModeEnabled: boolean\n): Promise<\n NonNullablePaths<\n SetMultilingualModeResponse,\n {\n [P in LocaleSettingsNonNullablePaths]: `localeSettings.${P}`;\n }[LocaleSettingsNonNullablePaths]\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 multilingualModeEnabled: multilingualModeEnabled,\n });\n\n const reqOpts =\n ambassadorWixMultilingualSettingsV2LocaleSettings.setMultilingualMode(\n payload\n );\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: { multilingualModeEnabled: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['multilingualModeEnabled']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n","import { toURLSearchParams } from '@wix/sdk-runtime/rest-modules';\nimport { transformSDKTimestampToRESTTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformSDKFieldMaskToRESTFieldMask } from '@wix/sdk-runtime/transformations/field-mask';\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 resolveWixMultilingualSettingsV2SettingsServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'manage._base_domain_': [\n {\n srcPath: '/_api/settings',\n destPath: '',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_multilingual_locale-settings';\n\n/** Retrieves a site's locale settings. */\nexport function getLocaleSettings(payload: object): RequestOptionsFactory<any> {\n function __getLocaleSettings({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.multilingual.settings.v2.locale_settings',\n method: 'GET' as any,\n methodFqn:\n 'wix.multilingual.settings.v2.SettingsService.GetLocaleSettings',\n packageName: PACKAGE_NAME,\n url: resolveWixMultilingualSettingsV2SettingsServiceUrl({\n protoPath: '/v2/settings',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'localeSettings.createdDate' },\n { path: 'localeSettings.updatedDate' },\n { path: 'localeSettings.primaryLocale.createdDate' },\n { path: 'localeSettings.primaryLocale.updatedDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __getLocaleSettings;\n}\n\n/** Updates a site's locale settings. */\nexport function updateLocaleSettings(\n payload: object\n): RequestOptionsFactory<any> {\n function __updateLocaleSettings({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKFieldMaskToRESTFieldMask,\n paths: [{ path: 'fieldMask' }],\n },\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [\n { path: 'localeSettings.createdDate' },\n { path: 'localeSettings.updatedDate' },\n { path: 'localeSettings.primaryLocale.createdDate' },\n { path: 'localeSettings.primaryLocale.updatedDate' },\n ],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.multilingual.settings.v2.locale_settings',\n method: 'PATCH' as any,\n methodFqn:\n 'wix.multilingual.settings.v2.SettingsService.UpdateLocaleSettings',\n packageName: PACKAGE_NAME,\n url: resolveWixMultilingualSettingsV2SettingsServiceUrl({\n protoPath: '/v2/settings',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'localeSettings.createdDate' },\n { path: 'localeSettings.updatedDate' },\n { path: 'localeSettings.primaryLocale.createdDate' },\n { path: 'localeSettings.primaryLocale.updatedDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __updateLocaleSettings;\n}\n\n/**\n * Sets a site's multilingual mode.\n *\n * When multilingual mode is enabled, you can create secondary locales.\n *\n * To disable multilingual mode, all secondary locales must first be removed. This action removes all translated content from your site. Disabling multilingual mode will also reset the locale settings to their default values.\n *\n * <blockquote class=\"important\">\n * <strong>Important:</strong>\n *\n * You can only call this method on sites where a Wix user has installed the [Wix Multilingual app](https://www.wix.com/app-market/wix-multilingual?searchLocation=home).\n *\n * </blockquote>\n */\nexport function setMultilingualMode(\n payload: object\n): RequestOptionsFactory<any> {\n function __setMultilingualMode({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.multilingual.settings.v2.locale_settings',\n method: 'POST' as any,\n methodFqn:\n 'wix.multilingual.settings.v2.SettingsService.SetMultilingualMode',\n packageName: PACKAGE_NAME,\n url: resolveWixMultilingualSettingsV2SettingsServiceUrl({\n protoPath: '/v2/settings/mode',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'localeSettings.createdDate' },\n { path: 'localeSettings.updatedDate' },\n { path: 'localeSettings.primaryLocale.createdDate' },\n { path: 'localeSettings.primaryLocale.updatedDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __setMultilingualMode;\n}\n","import { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport {\n GetLocaleSettingsResponse,\n LocaleSettings,\n SetMultilingualModeResponse,\n UpdateLocaleSettingsResponse,\n getLocaleSettings as universalGetLocaleSettings,\n setMultilingualMode as universalSetMultilingualMode,\n updateLocaleSettings as universalUpdateLocaleSettings,\n} from './multilingual-settings-v2-locale-settings-locale-settings.universal.js';\n\nexport const __metadata = { PACKAGE_NAME: '@wix/multilingual' };\n\n/** @internal */\nexport function getLocaleSettings(\n httpClient: HttpClient\n): GetLocaleSettingsSignature {\n return () =>\n universalGetLocaleSettings(\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface GetLocaleSettingsSignature {\n /**\n * Retrieves a site's locale settings.\n * @returns Response message containing the requested multilingual settings\n */\n (): Promise<GetLocaleSettingsResponse>;\n}\n\n/** @internal */\nexport function updateLocaleSettings(\n httpClient: HttpClient\n): UpdateLocaleSettingsSignature {\n return (localeSettings: NonNullablePaths<LocaleSettings, `revision`>) =>\n universalUpdateLocaleSettings(\n localeSettings,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface UpdateLocaleSettingsSignature {\n /**\n * Updates a site's locale settings.\n * @param - Locale settings to update.\n * @returns Response message containing the updated multilingual settings\n */\n (localeSettings: LocaleSettings): Promise<UpdateLocaleSettingsResponse>;\n}\n\n/** @internal */\nexport function setMultilingualMode(\n httpClient: HttpClient\n): SetMultilingualModeSignature {\n return (multilingualModeEnabled: boolean) =>\n universalSetMultilingualMode(\n multilingualModeEnabled,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface SetMultilingualModeSignature {\n /**\n * Sets a site's multilingual mode.\n *\n * When multilingual mode is enabled, you can create secondary locales.\n *\n * To disable multilingual mode, all secondary locales must first be removed. This action removes all translated content from your site. Disabling multilingual mode will also reset the locale settings to their default values.\n *\n * <blockquote class=\"important\">\n * <strong>Important:</strong>\n *\n * You can only call this method on sites where a Wix user has installed the [Wix Multilingual app](https://www.wix.com/app-market/wix-multilingual?searchLocation=home).\n *\n * </blockquote>\n * @param - Whether to enable multilingual mode for the site.\n *\n * Default: `false`\n * @returns Response message containing the updated settings after changing the multilingual mode\n */\n (multilingualModeEnabled: boolean): Promise<SetMultilingualModeResponse>;\n}\n\nexport {\n ActionEvent,\n Asset,\n DeleteContext,\n DeleteStatus,\n DomainEvent,\n DomainEventBodyOneOf,\n Empty,\n EntityCreatedEvent,\n EntityDeletedEvent,\n EntityUpdatedEvent,\n GetLocaleSettingsRequest,\n GetLocaleSettingsResponse,\n IdentificationData,\n IdentificationDataIdOneOf,\n Locale,\n LocaleSettings,\n LocaleVisibility,\n MessageEnvelope,\n MetaSiteSpecialEvent,\n MetaSiteSpecialEventPayloadOneOf,\n MultilingualModeUpdated,\n Namespace,\n NamespaceChanged,\n RestoreInfo,\n ServiceProvisioned,\n ServiceRemoved,\n SetMultilingualModeRequest,\n SetMultilingualModeResponse,\n SiteCreated,\n SiteCreatedContext,\n SiteDeleted,\n SiteHardDeleted,\n SiteMarkedAsTemplate,\n SiteMarkedAsWixSite,\n SitePublished,\n SitePurgedExternally,\n SiteRenamed,\n SiteTransferred,\n SiteUndeleted,\n SiteUnpublished,\n SiteUrlChanged,\n State,\n StudioAssigned,\n StudioUnassigned,\n UpdateLocaleSettingsRequest,\n UpdateLocaleSettingsResponse,\n UrlStructure,\n UrlStructureOverride,\n WebhookIdentityType,\n} from './multilingual-settings-v2-locale-settings-locale-settings.universal.js';\n","import {\n getLocaleSettings as publicGetLocaleSettings,\n updateLocaleSettings as publicUpdateLocaleSettings,\n setMultilingualMode as publicSetMultilingualMode,\n} from './multilingual-settings-v2-locale-settings-locale-settings.public.js';\nimport { createRESTModule } from '@wix/sdk-runtime/rest-modules';\nimport { BuildRESTFunction, MaybeContext } from '@wix/sdk-types';\n\n/** @internal */\nexport const getLocaleSettings: MaybeContext<\n BuildRESTFunction<typeof publicGetLocaleSettings> &\n typeof publicGetLocaleSettings\n> = /*#__PURE__*/ createRESTModule(publicGetLocaleSettings);\n/** @internal */\nexport const updateLocaleSettings: MaybeContext<\n BuildRESTFunction<typeof publicUpdateLocaleSettings> &\n typeof publicUpdateLocaleSettings\n> = /*#__PURE__*/ createRESTModule(publicUpdateLocaleSettings);\n/** @internal */\nexport const setMultilingualMode: MaybeContext<\n BuildRESTFunction<typeof publicSetMultilingualMode> &\n typeof publicSetMultilingualMode\n> = /*#__PURE__*/ createRESTModule(publicSetMultilingualMode);\n\nexport {\n UrlStructure,\n LocaleVisibility,\n State,\n SiteCreatedContext,\n Namespace,\n DeleteStatus,\n WebhookIdentityType,\n} from './multilingual-settings-v2-locale-settings-locale-settings.universal.js';\nexport {\n LocaleSettings,\n Locale,\n UrlStructureOverride,\n MultilingualModeUpdated,\n GetLocaleSettingsRequest,\n GetLocaleSettingsResponse,\n UpdateLocaleSettingsRequest,\n UpdateLocaleSettingsResponse,\n SetMultilingualModeRequest,\n SetMultilingualModeResponse,\n DomainEvent,\n DomainEventBodyOneOf,\n EntityCreatedEvent,\n RestoreInfo,\n EntityUpdatedEvent,\n EntityDeletedEvent,\n ActionEvent,\n Empty,\n MetaSiteSpecialEvent,\n MetaSiteSpecialEventPayloadOneOf,\n Asset,\n SiteCreated,\n SiteTransferred,\n SiteDeleted,\n DeleteContext,\n SiteUndeleted,\n SitePublished,\n SiteUnpublished,\n SiteMarkedAsTemplate,\n SiteMarkedAsWixSite,\n ServiceProvisioned,\n ServiceRemoved,\n SiteRenamed,\n SiteHardDeleted,\n NamespaceChanged,\n StudioAssigned,\n StudioUnassigned,\n SiteUrlChanged,\n SitePurgedExternally,\n MessageEnvelope,\n IdentificationData,\n IdentificationDataIdOneOf,\n} from './multilingual-settings-v2-locale-settings-locale-settings.universal.js';\n"],"mappings":";AAAA,SAAS,kBAAkB,yBAAyB;AACpD;AAAA,EACE;AAAA,EACA;AAAA,OACK;;;ACJP,SAAS,yBAAyB;AAClC,SAAS,4CAA4C;AACrD,SAAS,4CAA4C;AACrD,SAAS,4CAA4C;AACrD,SAAS,sBAAsB;AAC/B,SAAS,kBAAkB;AAI3B,SAAS,mDACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,EACF;AAEA,SAAO,WAAW,OAAO,OAAO,MAAM,EAAE,iBAAiB,CAAC,CAAC;AAC7D;AAEA,IAAM,eAAe;AAGd,SAAS,kBAAkB,SAA6C;AAC7E,WAAS,oBAAoB,EAAE,KAAK,GAAQ;AAC1C,UAAM,WAAW;AAAA,MACf,YAAY;AAAA,MACZ,QAAQ;AAAA,MACR,WACE;AAAA,MACF,aAAa;AAAA,MACb,KAAK,mDAAmD;AAAA,QACtD,WAAW;AAAA,QACX,MAAM;AAAA,QACN;AAAA,MACF,CAAC;AAAA,MACD,QAAQ,kBAAkB,OAAO;AAAA,MACjC,mBAAmB,CAACA,aAClB,eAAeA,UAAS;AAAA,QACtB;AAAA,UACE,a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IAChD;AAAA,EACF;AAEF,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,yBAAyB,OAAO;AAAA,QAC5D,yBAAyB;AAAA,MAC3B;AAAA,MACA,CAAC,yBAAyB;AAAA,IAC5B;AACA,iBAAa,UAAU,GAAG;AAE1B,UAAM;AAAA,EACR;AACF;;;AE39BO,SAASC,mBACd,YAC4B;AAC5B,SAAO,MACLA;AAAA;AAAA,IAEE,EAAE,WAAW;AAAA,EACf;AACJ;AAWO,SAASC,sBACd,YAC+B;AAC/B,SAAO,CAAC,mBACNA;AAAA,IACE;AAAA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;AAYO,SAASC,qBACd,YAC8B;AAC9B,SAAO,CAAC,4BACNA;AAAA,IACE;AAAA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;;;AC1DA,SAAS,wBAAwB;AAI1B,IAAMC,qBAGK,iCAAiBA,kBAAuB;AAEnD,IAAMC,wBAGK,iCAAiBA,qBAA0B;AAEtD,IAAMC,uBAGK,iCAAiBA,oBAAyB;","names":["payload","UrlStructure","LocaleVisibility","State","SiteCreatedContext","Namespace","DeleteStatus","WebhookIdentityType","getLocaleSettings","updateLocaleSettings","setMultilingualMode","getLocaleSettings","updateLocaleSettings","setMultilingualMode","getLocaleSettings","updateLocaleSettings","setMultilingualMode"]}
|
|
@@ -1,66 +1,69 @@
|
|
|
1
|
-
import { g as GetLocaleSettingsRequest$1, G as GetLocaleSettingsResponse$1, h as UpdateLocaleSettingsRequest$1, U as UpdateLocaleSettingsResponse$1, i as SetMultilingualModeRequest$1, S as SetMultilingualModeResponse$1 } from './multilingual-settings-v2-locale-settings-locale-settings.universal-
|
|
1
|
+
import { g as GetLocaleSettingsRequest$1, G as GetLocaleSettingsResponse$1, h as UpdateLocaleSettingsRequest$1, U as UpdateLocaleSettingsResponse$1, i as SetMultilingualModeRequest$1, S as SetMultilingualModeResponse$1 } from './multilingual-settings-v2-locale-settings-locale-settings.universal-CEiXVHN_.mjs';
|
|
2
2
|
|
|
3
|
-
/**
|
|
4
|
-
* Settings is a 'single entity per tenant' entity with META-SITE tenancy.
|
|
5
|
-
* This means that Settings is active for every site, not only sites that have multilingual functionality installed.
|
|
6
|
-
*/
|
|
7
3
|
interface LocaleSettings {
|
|
8
4
|
/**
|
|
9
|
-
*
|
|
10
|
-
* It's created automatically for each site.
|
|
11
|
-
* Revision number, used for optimistic locking
|
|
5
|
+
* Revision number, which increments by 1 each time the locale settings object is updated. To prevent conflicting changes, the existing revision must be passed when updating the locale settings object.
|
|
12
6
|
* @readonly
|
|
13
7
|
*/
|
|
14
8
|
revision?: string | null;
|
|
15
9
|
/**
|
|
16
|
-
*
|
|
10
|
+
* Date and time the locale settings were created.
|
|
17
11
|
* @readonly
|
|
18
12
|
*/
|
|
19
13
|
createdDate?: Date | null;
|
|
20
14
|
/**
|
|
21
|
-
*
|
|
15
|
+
* Date and time the locale settings were last updated.
|
|
22
16
|
* @readonly
|
|
23
17
|
*/
|
|
24
18
|
updatedDate?: Date | null;
|
|
25
19
|
/**
|
|
26
20
|
* Indicates whether multilingual mode is enabled for the site.
|
|
27
|
-
*
|
|
28
|
-
* When true
|
|
29
|
-
* Changing this value may have significant implications for the site's content and structure.
|
|
21
|
+
*
|
|
22
|
+
* When set to `true`, you can create secondary locales.
|
|
30
23
|
* @readonly
|
|
31
24
|
*/
|
|
32
25
|
multilingualModeEnabled?: boolean | null;
|
|
33
26
|
/**
|
|
34
|
-
*
|
|
35
|
-
*
|
|
27
|
+
* Indicates whether the live site will automatically open in a secondary locale if the
|
|
28
|
+
* site visitor's browser is set to that locale.
|
|
29
|
+
*
|
|
30
|
+
* Default: `false`
|
|
31
|
+
*
|
|
32
|
+
* <blockquote class="caution">
|
|
33
|
+
*
|
|
34
|
+
* __Caution:__
|
|
35
|
+
* Auto-switch can harm SEO by causing duplicate content issues and restricting search engine indexing of different language versions, which limits visibility in search results.
|
|
36
|
+
*
|
|
37
|
+
* </blockquote>
|
|
36
38
|
*/
|
|
37
39
|
autoSwitch?: boolean | null;
|
|
38
40
|
/**
|
|
39
|
-
* Defines how secondary languages
|
|
40
|
-
*
|
|
41
|
+
* Defines the default method for how secondary languages appear in the live site's URL.
|
|
42
|
+
* The URL structure can be overridden per locale, using the Locale API.
|
|
43
|
+
*
|
|
44
|
+
* Default: `"SUBDIRECTORY"`
|
|
41
45
|
*/
|
|
42
46
|
urlStructure?: UrlStructure;
|
|
43
47
|
/**
|
|
44
|
-
* The primary locale
|
|
48
|
+
* The site's primary locale.
|
|
45
49
|
* @readonly
|
|
46
50
|
*/
|
|
47
51
|
primaryLocale?: Locale;
|
|
48
52
|
}
|
|
49
53
|
/** Enum representing the method for resolving locales in URLs. */
|
|
50
54
|
declare enum UrlStructure {
|
|
51
|
-
/**
|
|
55
|
+
/** Undefined resolution method. */
|
|
52
56
|
UNDEFINED_RESOLUTION_METHOD = "UNDEFINED_RESOLUTION_METHOD",
|
|
53
|
-
/** www.mysite.com/fr */
|
|
57
|
+
/** Subdirectory resolution method for the URL structure. For example, `"www.mysite.com/fr"`. */
|
|
54
58
|
SUBDIRECTORY = "SUBDIRECTORY",
|
|
55
|
-
/** fr.mysite.com */
|
|
59
|
+
/** Subdomain resolution method for the URL structure. For example, `"fr.mysite.com"`. */
|
|
56
60
|
SUBDOMAIN = "SUBDOMAIN",
|
|
57
|
-
/** www.mysite.com?lang=fr */
|
|
61
|
+
/** Query parameter resolution method for the URL structure. For example, `"www.mysite.com?lang=fr"`. */
|
|
58
62
|
QUERY_PARAM = "QUERY_PARAM"
|
|
59
63
|
}
|
|
60
|
-
/** Every locale created will be validated using the IETF BCP 47 standard using framework validation. */
|
|
61
64
|
interface Locale {
|
|
62
65
|
/**
|
|
63
|
-
* Locale ID. The ID is
|
|
66
|
+
* Locale ID. The ID is made up of the language and region codes. For example, `"en-US"`.
|
|
64
67
|
* @maxLength 20
|
|
65
68
|
* @format LANGUAGE_TAG
|
|
66
69
|
* @readonly
|
|
@@ -68,101 +71,101 @@ interface Locale {
|
|
|
68
71
|
*/
|
|
69
72
|
id?: string | null;
|
|
70
73
|
/**
|
|
71
|
-
* Revision number
|
|
74
|
+
* Revision number, which increments by 1 each time the locale is updated. To prevent conflicting changes, the existing revision must be passed when updating the locale object.
|
|
72
75
|
* @readonly
|
|
73
76
|
*/
|
|
74
77
|
revision?: string | null;
|
|
75
78
|
/**
|
|
76
|
-
* Date and time the
|
|
79
|
+
* Date and time the locale was created.
|
|
77
80
|
* @readonly
|
|
78
81
|
*/
|
|
79
82
|
createdDate?: Date | null;
|
|
80
83
|
/**
|
|
81
|
-
* Date and time the
|
|
84
|
+
* Date and time the locale was last updated.
|
|
82
85
|
* @readonly
|
|
83
86
|
*/
|
|
84
87
|
updatedDate?: Date | null;
|
|
85
88
|
/**
|
|
86
|
-
* Language code
|
|
89
|
+
* Language code. For example, `"en"` for English.
|
|
87
90
|
* @immutable
|
|
88
91
|
* @format LANGUAGE
|
|
89
92
|
*/
|
|
90
93
|
languageCode?: string | null;
|
|
91
94
|
/**
|
|
92
|
-
* Region code
|
|
95
|
+
* Region code. For example, `"UK"` for United Kingdom.
|
|
93
96
|
* @immutable
|
|
94
97
|
* @format COUNTRY
|
|
95
98
|
*/
|
|
96
99
|
regionCode?: string | null;
|
|
97
|
-
/**
|
|
98
|
-
* HIDDEN - locale will be available for the user to see it in editor and preview but won't be available for UoU
|
|
99
|
-
* VISIBLE - locale will be available for the user to see it in editor and preview and be available for UoU to view the site in the specific locale, the URL of the page will indicate the locale according to the `effective_resolution_method` (e.g. www.mysite.com/es)
|
|
100
|
-
*/
|
|
100
|
+
/** Locale visibility status. */
|
|
101
101
|
visibility?: LocaleVisibility;
|
|
102
102
|
/**
|
|
103
|
-
* Indicates
|
|
103
|
+
* Indicates whether the locale is the site's primary locale.
|
|
104
104
|
* @readonly
|
|
105
105
|
*/
|
|
106
106
|
primaryLocale?: boolean | null;
|
|
107
107
|
/**
|
|
108
|
-
* Indicates
|
|
108
|
+
* Indicates whether the locale is treated as the default for site visitors when no language is specified in the URL of the site.
|
|
109
109
|
* @readonly
|
|
110
110
|
*/
|
|
111
111
|
visitorPrimaryLocale?: boolean | null;
|
|
112
112
|
/**
|
|
113
|
-
* Flag code
|
|
113
|
+
* Flag as a 3-letter language code based on Wix's supported locales. For example, `"USA"` for the United States flag.
|
|
114
114
|
* @maxLength 3
|
|
115
115
|
*/
|
|
116
116
|
flag?: string | null;
|
|
117
117
|
/**
|
|
118
|
-
*
|
|
118
|
+
* Regional format for determining how to display data types such as dates, times, numbers, and currencies. For example, `"en-US"` for US English formatting.
|
|
119
119
|
* @format LANGUAGE_TAG
|
|
120
120
|
*/
|
|
121
121
|
regionalFormat?: string | null;
|
|
122
122
|
/**
|
|
123
|
-
*
|
|
124
|
-
*
|
|
123
|
+
* Default URL structure for the locale's live site URL,
|
|
124
|
+
* based on the locale's settings, unless overridden.
|
|
125
125
|
* @readonly
|
|
126
126
|
*/
|
|
127
127
|
effectiveUrlStructure?: UrlStructure;
|
|
128
|
-
/**
|
|
128
|
+
/** Optional override for the locale's default URL structure. */
|
|
129
129
|
urlStructureOverride?: UrlStructureOverride;
|
|
130
130
|
/**
|
|
131
|
-
*
|
|
132
|
-
*
|
|
131
|
+
* Language code based on Wix's supported locales, used to specify the target language when
|
|
132
|
+
* translatable content is sent for machine translation. For example, `"ES"` for Spanish
|
|
133
|
+
* or `"ZH_TW"` for Traditional Chinese.
|
|
134
|
+
*
|
|
135
|
+
* Default: The locale's `languageCode` value.
|
|
133
136
|
* @format LANGUAGE_TAG
|
|
134
137
|
*/
|
|
135
138
|
machineTranslationCode?: string | null;
|
|
136
139
|
/**
|
|
137
|
-
*
|
|
140
|
+
* The locale's `displayName`, unless overridden.
|
|
138
141
|
* @readonly
|
|
139
142
|
* @maxLength 30
|
|
140
143
|
*/
|
|
141
144
|
effectiveDisplayName?: string | null;
|
|
142
145
|
/**
|
|
143
|
-
*
|
|
146
|
+
* Default display name for the locale, inferred from the locale ID and region code.
|
|
144
147
|
* @readonly
|
|
145
148
|
* @maxLength 30
|
|
146
149
|
*/
|
|
147
150
|
displayName?: string | null;
|
|
148
151
|
/**
|
|
149
|
-
*
|
|
152
|
+
* Optional override for the locale's display name.
|
|
150
153
|
* @maxLength 30
|
|
151
154
|
*/
|
|
152
155
|
overrideDisplayName?: string | null;
|
|
153
156
|
}
|
|
154
157
|
/** Enum representing the visibility status of a locale. */
|
|
155
158
|
declare enum LocaleVisibility {
|
|
156
|
-
/**
|
|
159
|
+
/** Undefined visibility status. */
|
|
157
160
|
UNDEFINED_LOCALE_STATUS = "UNDEFINED_LOCALE_STATUS",
|
|
158
|
-
/** Locale
|
|
161
|
+
/** Locale is hidden from site visitors. */
|
|
159
162
|
HIDDEN = "HIDDEN",
|
|
160
|
-
/** Locale
|
|
163
|
+
/** Locale is visible to site visitors. A site can only have up to 100 visible locales. */
|
|
161
164
|
VISIBLE = "VISIBLE"
|
|
162
165
|
}
|
|
163
166
|
/** Message for overriding the default resolution method. */
|
|
164
167
|
interface UrlStructureOverride {
|
|
165
|
-
/**
|
|
168
|
+
/** Resolution method that defines the URL structure to use instead of the default. */
|
|
166
169
|
urlStructure?: UrlStructure;
|
|
167
170
|
}
|
|
168
171
|
/** Request message for retrieving multilingual settings */
|
|
@@ -170,27 +173,31 @@ interface GetLocaleSettingsRequest {
|
|
|
170
173
|
}
|
|
171
174
|
/** Response message containing the requested multilingual settings */
|
|
172
175
|
interface GetLocaleSettingsResponse {
|
|
173
|
-
/**
|
|
176
|
+
/** Retrieved locale settings. */
|
|
174
177
|
localeSettings?: LocaleSettings;
|
|
175
178
|
}
|
|
176
179
|
/** Request message for updating multilingual settings */
|
|
177
180
|
interface UpdateLocaleSettingsRequest {
|
|
178
|
-
/**
|
|
181
|
+
/** Locale settings to update. */
|
|
179
182
|
localeSettings: LocaleSettings;
|
|
180
183
|
}
|
|
181
184
|
/** Response message containing the updated multilingual settings */
|
|
182
185
|
interface UpdateLocaleSettingsResponse {
|
|
183
|
-
/**
|
|
186
|
+
/** Updated locale settings. */
|
|
184
187
|
localeSettings?: LocaleSettings;
|
|
185
188
|
}
|
|
186
189
|
/** Request message for setting the multilingual mode */
|
|
187
190
|
interface SetMultilingualModeRequest {
|
|
188
|
-
/**
|
|
191
|
+
/**
|
|
192
|
+
* Whether to enable multilingual mode for the site.
|
|
193
|
+
*
|
|
194
|
+
* Default: `false`
|
|
195
|
+
*/
|
|
189
196
|
multilingualModeEnabled: boolean;
|
|
190
197
|
}
|
|
191
198
|
/** Response message containing the updated settings after changing the multilingual mode */
|
|
192
199
|
interface SetMultilingualModeResponse {
|
|
193
|
-
/**
|
|
200
|
+
/** Updated locale settings. */
|
|
194
201
|
localeSettings?: LocaleSettings;
|
|
195
202
|
}
|
|
196
203
|
|
|
@@ -206,6 +213,6 @@ type __PublicMethodMetaInfo<K = string, M = unknown, T = unknown, S = unknown, Q
|
|
|
206
213
|
};
|
|
207
214
|
declare function getLocaleSettings(): __PublicMethodMetaInfo<'GET', {}, GetLocaleSettingsRequest$1, GetLocaleSettingsRequest, GetLocaleSettingsResponse$1, GetLocaleSettingsResponse>;
|
|
208
215
|
declare function updateLocaleSettings(): __PublicMethodMetaInfo<'PATCH', {}, UpdateLocaleSettingsRequest$1, UpdateLocaleSettingsRequest, UpdateLocaleSettingsResponse$1, UpdateLocaleSettingsResponse>;
|
|
209
|
-
declare function setMultilingualMode(): __PublicMethodMetaInfo<'
|
|
216
|
+
declare function setMultilingualMode(): __PublicMethodMetaInfo<'POST', {}, SetMultilingualModeRequest$1, SetMultilingualModeRequest, SetMultilingualModeResponse$1, SetMultilingualModeResponse>;
|
|
210
217
|
|
|
211
218
|
export { type __PublicMethodMetaInfo, getLocaleSettings, setMultilingualMode, updateLocaleSettings };
|