@wix/auto_sdk_multilingual_locale-settings 1.0.10 → 1.0.12
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 +72 -0
- package/build/index.d.ts +72 -0
- package/build/index.js +487 -0
- package/build/index.js.map +1 -0
- package/build/index.mjs +450 -0
- package/build/index.mjs.map +1 -0
- package/build/internal/index.d.mts +72 -0
- package/build/internal/index.d.ts +72 -0
- package/build/internal/index.js +487 -0
- package/build/internal/index.js.map +1 -0
- package/build/internal/index.mjs +450 -0
- package/build/internal/index.mjs.map +1 -0
- package/build/internal/meta.d.mts +222 -0
- package/build/internal/meta.d.ts +222 -0
- package/build/internal/meta.js +254 -0
- package/build/internal/meta.js.map +1 -0
- package/build/internal/meta.mjs +225 -0
- package/build/internal/meta.mjs.map +1 -0
- package/build/{cjs/src/multilingual-settings-v2-locale-settings-locale-settings.types.d.ts → internal/multilingual-settings-v2-locale-settings-locale-settings.universal-Ci-4rS0w.d.mts} +144 -85
- package/build/internal/{cjs/src/multilingual-settings-v2-locale-settings-locale-settings.types.d.ts → multilingual-settings-v2-locale-settings-locale-settings.universal-Ci-4rS0w.d.ts} +144 -85
- package/build/meta.d.mts +222 -0
- package/build/meta.d.ts +222 -0
- package/build/meta.js +254 -0
- package/build/meta.js.map +1 -0
- package/build/meta.mjs +225 -0
- package/build/meta.mjs.map +1 -0
- package/build/{es/src/multilingual-settings-v2-locale-settings-locale-settings.types.d.ts → multilingual-settings-v2-locale-settings-locale-settings.universal-Ci-4rS0w.d.mts} +144 -85
- package/build/{internal/es/src/multilingual-settings-v2-locale-settings-locale-settings.types.d.ts → multilingual-settings-v2-locale-settings-locale-settings.universal-Ci-4rS0w.d.ts} +144 -85
- package/package.json +12 -11
- package/build/cjs/index.d.ts +0 -1
- package/build/cjs/index.js +0 -18
- package/build/cjs/index.js.map +0 -1
- package/build/cjs/index.typings.d.ts +0 -1
- package/build/cjs/index.typings.js +0 -18
- package/build/cjs/index.typings.js.map +0 -1
- package/build/cjs/meta.d.ts +0 -1
- package/build/cjs/meta.js +0 -18
- package/build/cjs/meta.js.map +0 -1
- package/build/cjs/src/multilingual-settings-v2-locale-settings-locale-settings.context.d.ts +0 -28
- package/build/cjs/src/multilingual-settings-v2-locale-settings-locale-settings.context.js +0 -38
- package/build/cjs/src/multilingual-settings-v2-locale-settings-locale-settings.context.js.map +0 -1
- package/build/cjs/src/multilingual-settings-v2-locale-settings-locale-settings.http.d.ts +0 -20
- package/build/cjs/src/multilingual-settings-v2-locale-settings-locale-settings.http.js +0 -179
- package/build/cjs/src/multilingual-settings-v2-locale-settings-locale-settings.http.js.map +0 -1
- package/build/cjs/src/multilingual-settings-v2-locale-settings-locale-settings.meta.d.ts +0 -15
- package/build/cjs/src/multilingual-settings-v2-locale-settings-locale-settings.meta.js +0 -85
- package/build/cjs/src/multilingual-settings-v2-locale-settings-locale-settings.meta.js.map +0 -1
- package/build/cjs/src/multilingual-settings-v2-locale-settings-locale-settings.public.d.ts +0 -49
- package/build/cjs/src/multilingual-settings-v2-locale-settings-locale-settings.public.js +0 -82
- package/build/cjs/src/multilingual-settings-v2-locale-settings-locale-settings.public.js.map +0 -1
- package/build/cjs/src/multilingual-settings-v2-locale-settings-locale-settings.types.js +0 -148
- package/build/cjs/src/multilingual-settings-v2-locale-settings-locale-settings.types.js.map +0 -1
- package/build/cjs/src/multilingual-settings-v2-locale-settings-locale-settings.universal.d.ts +0 -970
- package/build/cjs/src/multilingual-settings-v2-locale-settings-locale-settings.universal.js +0 -295
- package/build/cjs/src/multilingual-settings-v2-locale-settings-locale-settings.universal.js.map +0 -1
- package/build/es/index.d.ts +0 -1
- package/build/es/index.js +0 -2
- package/build/es/index.js.map +0 -1
- package/build/es/index.typings.d.ts +0 -1
- package/build/es/index.typings.js +0 -2
- package/build/es/index.typings.js.map +0 -1
- package/build/es/meta.d.ts +0 -1
- package/build/es/meta.js +0 -2
- package/build/es/meta.js.map +0 -1
- package/build/es/package.json +0 -3
- package/build/es/src/multilingual-settings-v2-locale-settings-locale-settings.context.d.ts +0 -28
- package/build/es/src/multilingual-settings-v2-locale-settings-locale-settings.context.js +0 -28
- package/build/es/src/multilingual-settings-v2-locale-settings-locale-settings.context.js.map +0 -1
- package/build/es/src/multilingual-settings-v2-locale-settings-locale-settings.http.d.ts +0 -20
- package/build/es/src/multilingual-settings-v2-locale-settings-locale-settings.http.js +0 -173
- package/build/es/src/multilingual-settings-v2-locale-settings-locale-settings.http.js.map +0 -1
- package/build/es/src/multilingual-settings-v2-locale-settings-locale-settings.meta.d.ts +0 -15
- package/build/es/src/multilingual-settings-v2-locale-settings-locale-settings.meta.js +0 -56
- package/build/es/src/multilingual-settings-v2-locale-settings-locale-settings.meta.js.map +0 -1
- package/build/es/src/multilingual-settings-v2-locale-settings-locale-settings.public.d.ts +0 -49
- package/build/es/src/multilingual-settings-v2-locale-settings-locale-settings.public.js +0 -69
- package/build/es/src/multilingual-settings-v2-locale-settings-locale-settings.public.js.map +0 -1
- package/build/es/src/multilingual-settings-v2-locale-settings-locale-settings.types.js +0 -145
- package/build/es/src/multilingual-settings-v2-locale-settings-locale-settings.types.js.map +0 -1
- package/build/es/src/multilingual-settings-v2-locale-settings-locale-settings.universal.d.ts +0 -970
- package/build/es/src/multilingual-settings-v2-locale-settings-locale-settings.universal.js +0 -266
- package/build/es/src/multilingual-settings-v2-locale-settings-locale-settings.universal.js.map +0 -1
- package/build/internal/cjs/index.d.ts +0 -1
- package/build/internal/cjs/index.js +0 -18
- package/build/internal/cjs/index.js.map +0 -1
- package/build/internal/cjs/index.typings.d.ts +0 -1
- package/build/internal/cjs/index.typings.js +0 -18
- package/build/internal/cjs/index.typings.js.map +0 -1
- package/build/internal/cjs/meta.d.ts +0 -1
- package/build/internal/cjs/meta.js +0 -18
- package/build/internal/cjs/meta.js.map +0 -1
- package/build/internal/cjs/src/multilingual-settings-v2-locale-settings-locale-settings.context.d.ts +0 -28
- package/build/internal/cjs/src/multilingual-settings-v2-locale-settings-locale-settings.context.js +0 -38
- package/build/internal/cjs/src/multilingual-settings-v2-locale-settings-locale-settings.context.js.map +0 -1
- package/build/internal/cjs/src/multilingual-settings-v2-locale-settings-locale-settings.http.d.ts +0 -20
- package/build/internal/cjs/src/multilingual-settings-v2-locale-settings-locale-settings.http.js +0 -179
- package/build/internal/cjs/src/multilingual-settings-v2-locale-settings-locale-settings.http.js.map +0 -1
- package/build/internal/cjs/src/multilingual-settings-v2-locale-settings-locale-settings.meta.d.ts +0 -15
- package/build/internal/cjs/src/multilingual-settings-v2-locale-settings-locale-settings.meta.js +0 -85
- package/build/internal/cjs/src/multilingual-settings-v2-locale-settings-locale-settings.meta.js.map +0 -1
- package/build/internal/cjs/src/multilingual-settings-v2-locale-settings-locale-settings.public.d.ts +0 -49
- package/build/internal/cjs/src/multilingual-settings-v2-locale-settings-locale-settings.public.js +0 -82
- package/build/internal/cjs/src/multilingual-settings-v2-locale-settings-locale-settings.public.js.map +0 -1
- package/build/internal/cjs/src/multilingual-settings-v2-locale-settings-locale-settings.types.js +0 -148
- package/build/internal/cjs/src/multilingual-settings-v2-locale-settings-locale-settings.types.js.map +0 -1
- package/build/internal/cjs/src/multilingual-settings-v2-locale-settings-locale-settings.universal.d.ts +0 -970
- package/build/internal/cjs/src/multilingual-settings-v2-locale-settings-locale-settings.universal.js +0 -295
- package/build/internal/cjs/src/multilingual-settings-v2-locale-settings-locale-settings.universal.js.map +0 -1
- package/build/internal/es/index.d.ts +0 -1
- package/build/internal/es/index.js +0 -2
- package/build/internal/es/index.js.map +0 -1
- package/build/internal/es/index.typings.d.ts +0 -1
- package/build/internal/es/index.typings.js +0 -2
- package/build/internal/es/index.typings.js.map +0 -1
- package/build/internal/es/meta.d.ts +0 -1
- package/build/internal/es/meta.js +0 -2
- package/build/internal/es/meta.js.map +0 -1
- package/build/internal/es/src/multilingual-settings-v2-locale-settings-locale-settings.context.d.ts +0 -28
- package/build/internal/es/src/multilingual-settings-v2-locale-settings-locale-settings.context.js +0 -28
- package/build/internal/es/src/multilingual-settings-v2-locale-settings-locale-settings.context.js.map +0 -1
- package/build/internal/es/src/multilingual-settings-v2-locale-settings-locale-settings.http.d.ts +0 -20
- package/build/internal/es/src/multilingual-settings-v2-locale-settings-locale-settings.http.js +0 -173
- package/build/internal/es/src/multilingual-settings-v2-locale-settings-locale-settings.http.js.map +0 -1
- package/build/internal/es/src/multilingual-settings-v2-locale-settings-locale-settings.meta.d.ts +0 -15
- package/build/internal/es/src/multilingual-settings-v2-locale-settings-locale-settings.meta.js +0 -56
- package/build/internal/es/src/multilingual-settings-v2-locale-settings-locale-settings.meta.js.map +0 -1
- package/build/internal/es/src/multilingual-settings-v2-locale-settings-locale-settings.public.d.ts +0 -49
- package/build/internal/es/src/multilingual-settings-v2-locale-settings-locale-settings.public.js +0 -69
- package/build/internal/es/src/multilingual-settings-v2-locale-settings-locale-settings.public.js.map +0 -1
- package/build/internal/es/src/multilingual-settings-v2-locale-settings-locale-settings.types.js +0 -145
- package/build/internal/es/src/multilingual-settings-v2-locale-settings-locale-settings.types.js.map +0 -1
- package/build/internal/es/src/multilingual-settings-v2-locale-settings-locale-settings.universal.d.ts +0 -970
- package/build/internal/es/src/multilingual-settings-v2-locale-settings-locale-settings.universal.js +0 -266
- package/build/internal/es/src/multilingual-settings-v2-locale-settings-locale-settings.universal.js.map +0 -1
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { HttpClient, EventDefinition, MaybeContext, BuildRESTFunction, BuildEventDefinition } from '@wix/sdk-types';
|
|
2
|
+
import { G as GetLocaleSettingsResponse, L as LocaleSettings, U as UpdateLocaleSettingsResponse, S as SetMultilingualModeResponse, a as LocaleSettingsCreatedEnvelope, b as LocaleSettingsDeletedEnvelope, c as LocaleSettingsMultilingualModeUpdatedEnvelope, d as LocaleSettingsUpdatedEnvelope } from './multilingual-settings-v2-locale-settings-locale-settings.universal-Ci-4rS0w.mjs';
|
|
3
|
+
export { A as ActionEvent, u as Asset, a3 as BaseEventMetadata, y as DeleteContext, D as DeleteStatus, n as DomainEvent, o as DomainEventBodyOneOf, r as Empty, E as EntityCreatedEvent, q as EntityDeletedEvent, p as EntityUpdatedEvent, a4 as EventMetadata, k as GetLocaleSettingsRequest, a1 as IdentificationData, a2 as IdentificationDataIdOneOf, i as Locale, f as LocaleVisibility, a0 as MessageEnvelope, s as MetaSiteSpecialEvent, t as MetaSiteSpecialEventPayloadOneOf, M as MultilingualModeUpdated, N as Namespace, P as NamespaceChanged, Y as OdeditorAssigned, Z as OdeditorUnassigned, _ as PicassoAssigned, $ as PicassoUnassigned, R as RestoreInfo, I as ServiceProvisioned, J as ServiceRemoved, m as SetMultilingualModeRequest, v as SiteCreated, h as SiteCreatedContext, x as SiteDeleted, O as SiteHardDeleted, F as SiteMarkedAsTemplate, H as SiteMarkedAsWixSite, B as SitePublished, X as SitePurgedExternally, K as SiteRenamed, w as SiteTransferred, z as SiteUndeleted, C as SiteUnpublished, V as SiteUrlChanged, g as State, Q as StudioAssigned, T as StudioUnassigned, l as UpdateLocaleSettingsRequest, e as UrlStructure, j as UrlStructureOverride, W as WebhookIdentityType } from './multilingual-settings-v2-locale-settings-locale-settings.universal-Ci-4rS0w.mjs';
|
|
4
|
+
|
|
5
|
+
declare function getLocaleSettings$1(httpClient: HttpClient): GetLocaleSettingsSignature;
|
|
6
|
+
interface GetLocaleSettingsSignature {
|
|
7
|
+
/**
|
|
8
|
+
* Retrieves a site's locale settings.
|
|
9
|
+
* @returns Response message containing the requested multilingual settings
|
|
10
|
+
*/
|
|
11
|
+
(): Promise<GetLocaleSettingsResponse>;
|
|
12
|
+
}
|
|
13
|
+
declare function updateLocaleSettings$1(httpClient: HttpClient): UpdateLocaleSettingsSignature;
|
|
14
|
+
interface UpdateLocaleSettingsSignature {
|
|
15
|
+
/**
|
|
16
|
+
* Updates a site's locale settings.
|
|
17
|
+
*
|
|
18
|
+
* > **Note:**
|
|
19
|
+
* > You can't call this method to update a site's multilingual mode. To enable or disable multilingual mode, call Set Multilingual Mode.
|
|
20
|
+
* @param - Locale settings to update.
|
|
21
|
+
* @returns Response message containing the updated multilingual settings
|
|
22
|
+
*/
|
|
23
|
+
(localeSettings: LocaleSettings): Promise<UpdateLocaleSettingsResponse>;
|
|
24
|
+
}
|
|
25
|
+
declare function setMultilingualMode$1(httpClient: HttpClient): SetMultilingualModeSignature;
|
|
26
|
+
interface SetMultilingualModeSignature {
|
|
27
|
+
/**
|
|
28
|
+
* Sets a site's multilingual mode.
|
|
29
|
+
*
|
|
30
|
+
* Multilingual mode allows a site to support multiple locales. This means that when multilingual mode is enabled, you can create and manage secondary locales.
|
|
31
|
+
*
|
|
32
|
+
* 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.
|
|
33
|
+
*
|
|
34
|
+
* <blockquote class="important">
|
|
35
|
+
* <strong>Important:</strong>
|
|
36
|
+
*
|
|
37
|
+
* 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).
|
|
38
|
+
*
|
|
39
|
+
* </blockquote>
|
|
40
|
+
* @param - Whether to enable multilingual mode for the site.
|
|
41
|
+
*
|
|
42
|
+
* Default: `false`
|
|
43
|
+
* @returns Response message containing the updated settings after changing the multilingual mode
|
|
44
|
+
*/
|
|
45
|
+
(multilingualModeEnabled: boolean): Promise<SetMultilingualModeResponse>;
|
|
46
|
+
}
|
|
47
|
+
declare const onLocaleSettingsCreated$1: EventDefinition<LocaleSettingsCreatedEnvelope, "wix.multilingual.settings.v2.locale_settings_created">;
|
|
48
|
+
declare const onLocaleSettingsDeleted$1: EventDefinition<LocaleSettingsDeletedEnvelope, "wix.multilingual.settings.v2.locale_settings_deleted">;
|
|
49
|
+
declare const onLocaleSettingsMultilingualModeUpdated$1: EventDefinition<LocaleSettingsMultilingualModeUpdatedEnvelope, "wix.multilingual.settings.v2.locale_settings_multilingual_mode_updated">;
|
|
50
|
+
declare const onLocaleSettingsUpdated$1: EventDefinition<LocaleSettingsUpdatedEnvelope, "wix.multilingual.settings.v2.locale_settings_updated">;
|
|
51
|
+
|
|
52
|
+
declare const getLocaleSettings: MaybeContext<BuildRESTFunction<typeof getLocaleSettings$1> & typeof getLocaleSettings$1>;
|
|
53
|
+
declare const updateLocaleSettings: MaybeContext<BuildRESTFunction<typeof updateLocaleSettings$1> & typeof updateLocaleSettings$1>;
|
|
54
|
+
declare const setMultilingualMode: MaybeContext<BuildRESTFunction<typeof setMultilingualMode$1> & typeof setMultilingualMode$1>;
|
|
55
|
+
/**
|
|
56
|
+
* Triggered when the site is created.
|
|
57
|
+
*/
|
|
58
|
+
declare const onLocaleSettingsCreated: BuildEventDefinition<typeof onLocaleSettingsCreated$1>;
|
|
59
|
+
/**
|
|
60
|
+
* Triggered when the site is deleted.
|
|
61
|
+
*/
|
|
62
|
+
declare const onLocaleSettingsDeleted: BuildEventDefinition<typeof onLocaleSettingsDeleted$1>;
|
|
63
|
+
/**
|
|
64
|
+
* Triggered when the site's multilingual mode is updated.
|
|
65
|
+
*/
|
|
66
|
+
declare const onLocaleSettingsMultilingualModeUpdated: BuildEventDefinition<typeof onLocaleSettingsMultilingualModeUpdated$1>;
|
|
67
|
+
/**
|
|
68
|
+
* Triggered when locale settings are updated.
|
|
69
|
+
*/
|
|
70
|
+
declare const onLocaleSettingsUpdated: BuildEventDefinition<typeof onLocaleSettingsUpdated$1>;
|
|
71
|
+
|
|
72
|
+
export { GetLocaleSettingsResponse, LocaleSettings, LocaleSettingsCreatedEnvelope, LocaleSettingsDeletedEnvelope, LocaleSettingsMultilingualModeUpdatedEnvelope, LocaleSettingsUpdatedEnvelope, SetMultilingualModeResponse, UpdateLocaleSettingsResponse, getLocaleSettings, onLocaleSettingsCreated, onLocaleSettingsDeleted, onLocaleSettingsMultilingualModeUpdated, onLocaleSettingsUpdated, setMultilingualMode, updateLocaleSettings };
|
package/build/index.d.ts
ADDED
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { HttpClient, EventDefinition, MaybeContext, BuildRESTFunction, BuildEventDefinition } from '@wix/sdk-types';
|
|
2
|
+
import { G as GetLocaleSettingsResponse, L as LocaleSettings, U as UpdateLocaleSettingsResponse, S as SetMultilingualModeResponse, a as LocaleSettingsCreatedEnvelope, b as LocaleSettingsDeletedEnvelope, c as LocaleSettingsMultilingualModeUpdatedEnvelope, d as LocaleSettingsUpdatedEnvelope } from './multilingual-settings-v2-locale-settings-locale-settings.universal-Ci-4rS0w.js';
|
|
3
|
+
export { A as ActionEvent, u as Asset, a3 as BaseEventMetadata, y as DeleteContext, D as DeleteStatus, n as DomainEvent, o as DomainEventBodyOneOf, r as Empty, E as EntityCreatedEvent, q as EntityDeletedEvent, p as EntityUpdatedEvent, a4 as EventMetadata, k as GetLocaleSettingsRequest, a1 as IdentificationData, a2 as IdentificationDataIdOneOf, i as Locale, f as LocaleVisibility, a0 as MessageEnvelope, s as MetaSiteSpecialEvent, t as MetaSiteSpecialEventPayloadOneOf, M as MultilingualModeUpdated, N as Namespace, P as NamespaceChanged, Y as OdeditorAssigned, Z as OdeditorUnassigned, _ as PicassoAssigned, $ as PicassoUnassigned, R as RestoreInfo, I as ServiceProvisioned, J as ServiceRemoved, m as SetMultilingualModeRequest, v as SiteCreated, h as SiteCreatedContext, x as SiteDeleted, O as SiteHardDeleted, F as SiteMarkedAsTemplate, H as SiteMarkedAsWixSite, B as SitePublished, X as SitePurgedExternally, K as SiteRenamed, w as SiteTransferred, z as SiteUndeleted, C as SiteUnpublished, V as SiteUrlChanged, g as State, Q as StudioAssigned, T as StudioUnassigned, l as UpdateLocaleSettingsRequest, e as UrlStructure, j as UrlStructureOverride, W as WebhookIdentityType } from './multilingual-settings-v2-locale-settings-locale-settings.universal-Ci-4rS0w.js';
|
|
4
|
+
|
|
5
|
+
declare function getLocaleSettings$1(httpClient: HttpClient): GetLocaleSettingsSignature;
|
|
6
|
+
interface GetLocaleSettingsSignature {
|
|
7
|
+
/**
|
|
8
|
+
* Retrieves a site's locale settings.
|
|
9
|
+
* @returns Response message containing the requested multilingual settings
|
|
10
|
+
*/
|
|
11
|
+
(): Promise<GetLocaleSettingsResponse>;
|
|
12
|
+
}
|
|
13
|
+
declare function updateLocaleSettings$1(httpClient: HttpClient): UpdateLocaleSettingsSignature;
|
|
14
|
+
interface UpdateLocaleSettingsSignature {
|
|
15
|
+
/**
|
|
16
|
+
* Updates a site's locale settings.
|
|
17
|
+
*
|
|
18
|
+
* > **Note:**
|
|
19
|
+
* > You can't call this method to update a site's multilingual mode. To enable or disable multilingual mode, call Set Multilingual Mode.
|
|
20
|
+
* @param - Locale settings to update.
|
|
21
|
+
* @returns Response message containing the updated multilingual settings
|
|
22
|
+
*/
|
|
23
|
+
(localeSettings: LocaleSettings): Promise<UpdateLocaleSettingsResponse>;
|
|
24
|
+
}
|
|
25
|
+
declare function setMultilingualMode$1(httpClient: HttpClient): SetMultilingualModeSignature;
|
|
26
|
+
interface SetMultilingualModeSignature {
|
|
27
|
+
/**
|
|
28
|
+
* Sets a site's multilingual mode.
|
|
29
|
+
*
|
|
30
|
+
* Multilingual mode allows a site to support multiple locales. This means that when multilingual mode is enabled, you can create and manage secondary locales.
|
|
31
|
+
*
|
|
32
|
+
* 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.
|
|
33
|
+
*
|
|
34
|
+
* <blockquote class="important">
|
|
35
|
+
* <strong>Important:</strong>
|
|
36
|
+
*
|
|
37
|
+
* 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).
|
|
38
|
+
*
|
|
39
|
+
* </blockquote>
|
|
40
|
+
* @param - Whether to enable multilingual mode for the site.
|
|
41
|
+
*
|
|
42
|
+
* Default: `false`
|
|
43
|
+
* @returns Response message containing the updated settings after changing the multilingual mode
|
|
44
|
+
*/
|
|
45
|
+
(multilingualModeEnabled: boolean): Promise<SetMultilingualModeResponse>;
|
|
46
|
+
}
|
|
47
|
+
declare const onLocaleSettingsCreated$1: EventDefinition<LocaleSettingsCreatedEnvelope, "wix.multilingual.settings.v2.locale_settings_created">;
|
|
48
|
+
declare const onLocaleSettingsDeleted$1: EventDefinition<LocaleSettingsDeletedEnvelope, "wix.multilingual.settings.v2.locale_settings_deleted">;
|
|
49
|
+
declare const onLocaleSettingsMultilingualModeUpdated$1: EventDefinition<LocaleSettingsMultilingualModeUpdatedEnvelope, "wix.multilingual.settings.v2.locale_settings_multilingual_mode_updated">;
|
|
50
|
+
declare const onLocaleSettingsUpdated$1: EventDefinition<LocaleSettingsUpdatedEnvelope, "wix.multilingual.settings.v2.locale_settings_updated">;
|
|
51
|
+
|
|
52
|
+
declare const getLocaleSettings: MaybeContext<BuildRESTFunction<typeof getLocaleSettings$1> & typeof getLocaleSettings$1>;
|
|
53
|
+
declare const updateLocaleSettings: MaybeContext<BuildRESTFunction<typeof updateLocaleSettings$1> & typeof updateLocaleSettings$1>;
|
|
54
|
+
declare const setMultilingualMode: MaybeContext<BuildRESTFunction<typeof setMultilingualMode$1> & typeof setMultilingualMode$1>;
|
|
55
|
+
/**
|
|
56
|
+
* Triggered when the site is created.
|
|
57
|
+
*/
|
|
58
|
+
declare const onLocaleSettingsCreated: BuildEventDefinition<typeof onLocaleSettingsCreated$1>;
|
|
59
|
+
/**
|
|
60
|
+
* Triggered when the site is deleted.
|
|
61
|
+
*/
|
|
62
|
+
declare const onLocaleSettingsDeleted: BuildEventDefinition<typeof onLocaleSettingsDeleted$1>;
|
|
63
|
+
/**
|
|
64
|
+
* Triggered when the site's multilingual mode is updated.
|
|
65
|
+
*/
|
|
66
|
+
declare const onLocaleSettingsMultilingualModeUpdated: BuildEventDefinition<typeof onLocaleSettingsMultilingualModeUpdated$1>;
|
|
67
|
+
/**
|
|
68
|
+
* Triggered when locale settings are updated.
|
|
69
|
+
*/
|
|
70
|
+
declare const onLocaleSettingsUpdated: BuildEventDefinition<typeof onLocaleSettingsUpdated$1>;
|
|
71
|
+
|
|
72
|
+
export { GetLocaleSettingsResponse, LocaleSettings, LocaleSettingsCreatedEnvelope, LocaleSettingsDeletedEnvelope, LocaleSettingsMultilingualModeUpdatedEnvelope, LocaleSettingsUpdatedEnvelope, SetMultilingualModeResponse, UpdateLocaleSettingsResponse, getLocaleSettings, onLocaleSettingsCreated, onLocaleSettingsDeleted, onLocaleSettingsMultilingualModeUpdated, onLocaleSettingsUpdated, setMultilingualMode, updateLocaleSettings };
|
package/build/index.js
ADDED
|
@@ -0,0 +1,487 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// index.ts
|
|
21
|
+
var index_exports = {};
|
|
22
|
+
__export(index_exports, {
|
|
23
|
+
DeleteStatus: () => DeleteStatus,
|
|
24
|
+
LocaleVisibility: () => LocaleVisibility,
|
|
25
|
+
Namespace: () => Namespace,
|
|
26
|
+
SiteCreatedContext: () => SiteCreatedContext,
|
|
27
|
+
State: () => State,
|
|
28
|
+
UrlStructure: () => UrlStructure,
|
|
29
|
+
WebhookIdentityType: () => WebhookIdentityType,
|
|
30
|
+
getLocaleSettings: () => getLocaleSettings4,
|
|
31
|
+
onLocaleSettingsCreated: () => onLocaleSettingsCreated2,
|
|
32
|
+
onLocaleSettingsDeleted: () => onLocaleSettingsDeleted2,
|
|
33
|
+
onLocaleSettingsMultilingualModeUpdated: () => onLocaleSettingsMultilingualModeUpdated2,
|
|
34
|
+
onLocaleSettingsUpdated: () => onLocaleSettingsUpdated2,
|
|
35
|
+
setMultilingualMode: () => setMultilingualMode4,
|
|
36
|
+
updateLocaleSettings: () => updateLocaleSettings4
|
|
37
|
+
});
|
|
38
|
+
module.exports = __toCommonJS(index_exports);
|
|
39
|
+
|
|
40
|
+
// src/multilingual-settings-v2-locale-settings-locale-settings.public.ts
|
|
41
|
+
var import_rename_all_nested_keys2 = require("@wix/sdk-runtime/rename-all-nested-keys");
|
|
42
|
+
var import_timestamp3 = require("@wix/sdk-runtime/transformations/timestamp");
|
|
43
|
+
var import_transform_paths2 = require("@wix/sdk-runtime/transformations/transform-paths");
|
|
44
|
+
var import_sdk_types = require("@wix/sdk-types");
|
|
45
|
+
|
|
46
|
+
// src/multilingual-settings-v2-locale-settings-locale-settings.universal.ts
|
|
47
|
+
var import_transform_error = require("@wix/sdk-runtime/transform-error");
|
|
48
|
+
var import_rename_all_nested_keys = require("@wix/sdk-runtime/rename-all-nested-keys");
|
|
49
|
+
|
|
50
|
+
// src/multilingual-settings-v2-locale-settings-locale-settings.http.ts
|
|
51
|
+
var import_rest_modules = require("@wix/sdk-runtime/rest-modules");
|
|
52
|
+
var import_timestamp = require("@wix/sdk-runtime/transformations/timestamp");
|
|
53
|
+
var import_timestamp2 = require("@wix/sdk-runtime/transformations/timestamp");
|
|
54
|
+
var import_field_mask = require("@wix/sdk-runtime/transformations/field-mask");
|
|
55
|
+
var import_transform_paths = require("@wix/sdk-runtime/transformations/transform-paths");
|
|
56
|
+
var import_rest_modules2 = require("@wix/sdk-runtime/rest-modules");
|
|
57
|
+
function resolveWixMultilingualSettingsV2SettingsServiceUrl(opts) {
|
|
58
|
+
const domainToMappings = {
|
|
59
|
+
"manage._base_domain_": [
|
|
60
|
+
{
|
|
61
|
+
srcPath: "/_api/settings",
|
|
62
|
+
destPath: ""
|
|
63
|
+
}
|
|
64
|
+
],
|
|
65
|
+
"editor._base_domain_": [
|
|
66
|
+
{
|
|
67
|
+
srcPath: "/_api/settings",
|
|
68
|
+
destPath: ""
|
|
69
|
+
}
|
|
70
|
+
],
|
|
71
|
+
"blocks._base_domain_": [
|
|
72
|
+
{
|
|
73
|
+
srcPath: "/_api/settings",
|
|
74
|
+
destPath: ""
|
|
75
|
+
}
|
|
76
|
+
],
|
|
77
|
+
"create.editorx": [
|
|
78
|
+
{
|
|
79
|
+
srcPath: "/_api/settings",
|
|
80
|
+
destPath: ""
|
|
81
|
+
}
|
|
82
|
+
],
|
|
83
|
+
_: [
|
|
84
|
+
{
|
|
85
|
+
srcPath: "/_api/settings",
|
|
86
|
+
destPath: ""
|
|
87
|
+
}
|
|
88
|
+
],
|
|
89
|
+
"*.dev.wix-code.com": [
|
|
90
|
+
{
|
|
91
|
+
srcPath: "/_api/settings",
|
|
92
|
+
destPath: ""
|
|
93
|
+
}
|
|
94
|
+
],
|
|
95
|
+
"www.wixapis.com": [
|
|
96
|
+
{
|
|
97
|
+
srcPath: "/locale-settings",
|
|
98
|
+
destPath: ""
|
|
99
|
+
}
|
|
100
|
+
]
|
|
101
|
+
};
|
|
102
|
+
return (0, import_rest_modules2.resolveUrl)(Object.assign(opts, { domainToMappings }));
|
|
103
|
+
}
|
|
104
|
+
var PACKAGE_NAME = "@wix/auto_sdk_multilingual_locale-settings";
|
|
105
|
+
function getLocaleSettings(payload) {
|
|
106
|
+
function __getLocaleSettings({ host }) {
|
|
107
|
+
const metadata = {
|
|
108
|
+
entityFqdn: "wix.multilingual.settings.v2.locale_settings",
|
|
109
|
+
method: "GET",
|
|
110
|
+
methodFqn: "wix.multilingual.settings.v2.SettingsService.GetLocaleSettings",
|
|
111
|
+
packageName: PACKAGE_NAME,
|
|
112
|
+
url: resolveWixMultilingualSettingsV2SettingsServiceUrl({
|
|
113
|
+
protoPath: "/v2/settings",
|
|
114
|
+
data: payload,
|
|
115
|
+
host
|
|
116
|
+
}),
|
|
117
|
+
params: (0, import_rest_modules.toURLSearchParams)(payload),
|
|
118
|
+
transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
|
|
119
|
+
{
|
|
120
|
+
transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
|
|
121
|
+
paths: [
|
|
122
|
+
{ path: "localeSettings.createdDate" },
|
|
123
|
+
{ path: "localeSettings.updatedDate" },
|
|
124
|
+
{ path: "localeSettings.primaryLocale.createdDate" },
|
|
125
|
+
{ path: "localeSettings.primaryLocale.updatedDate" }
|
|
126
|
+
]
|
|
127
|
+
}
|
|
128
|
+
])
|
|
129
|
+
};
|
|
130
|
+
return metadata;
|
|
131
|
+
}
|
|
132
|
+
return __getLocaleSettings;
|
|
133
|
+
}
|
|
134
|
+
function updateLocaleSettings(payload) {
|
|
135
|
+
function __updateLocaleSettings({ host }) {
|
|
136
|
+
const serializedData = (0, import_transform_paths.transformPaths)(payload, [
|
|
137
|
+
{
|
|
138
|
+
transformFn: import_field_mask.transformSDKFieldMaskToRESTFieldMask,
|
|
139
|
+
paths: [{ path: "fieldMask" }]
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
transformFn: import_timestamp.transformSDKTimestampToRESTTimestamp,
|
|
143
|
+
paths: [
|
|
144
|
+
{ path: "localeSettings.createdDate" },
|
|
145
|
+
{ path: "localeSettings.updatedDate" },
|
|
146
|
+
{ path: "localeSettings.primaryLocale.createdDate" },
|
|
147
|
+
{ path: "localeSettings.primaryLocale.updatedDate" }
|
|
148
|
+
]
|
|
149
|
+
}
|
|
150
|
+
]);
|
|
151
|
+
const metadata = {
|
|
152
|
+
entityFqdn: "wix.multilingual.settings.v2.locale_settings",
|
|
153
|
+
method: "PATCH",
|
|
154
|
+
methodFqn: "wix.multilingual.settings.v2.SettingsService.UpdateLocaleSettings",
|
|
155
|
+
packageName: PACKAGE_NAME,
|
|
156
|
+
url: resolveWixMultilingualSettingsV2SettingsServiceUrl({
|
|
157
|
+
protoPath: "/v2/settings",
|
|
158
|
+
data: serializedData,
|
|
159
|
+
host
|
|
160
|
+
}),
|
|
161
|
+
data: serializedData,
|
|
162
|
+
transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
|
|
163
|
+
{
|
|
164
|
+
transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
|
|
165
|
+
paths: [
|
|
166
|
+
{ path: "localeSettings.createdDate" },
|
|
167
|
+
{ path: "localeSettings.updatedDate" },
|
|
168
|
+
{ path: "localeSettings.primaryLocale.createdDate" },
|
|
169
|
+
{ path: "localeSettings.primaryLocale.updatedDate" }
|
|
170
|
+
]
|
|
171
|
+
}
|
|
172
|
+
])
|
|
173
|
+
};
|
|
174
|
+
return metadata;
|
|
175
|
+
}
|
|
176
|
+
return __updateLocaleSettings;
|
|
177
|
+
}
|
|
178
|
+
function setMultilingualMode(payload) {
|
|
179
|
+
function __setMultilingualMode({ host }) {
|
|
180
|
+
const metadata = {
|
|
181
|
+
entityFqdn: "wix.multilingual.settings.v2.locale_settings",
|
|
182
|
+
method: "POST",
|
|
183
|
+
methodFqn: "wix.multilingual.settings.v2.SettingsService.SetMultilingualMode",
|
|
184
|
+
packageName: PACKAGE_NAME,
|
|
185
|
+
url: resolveWixMultilingualSettingsV2SettingsServiceUrl({
|
|
186
|
+
protoPath: "/v2/settings/mode",
|
|
187
|
+
data: payload,
|
|
188
|
+
host
|
|
189
|
+
}),
|
|
190
|
+
data: payload,
|
|
191
|
+
transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
|
|
192
|
+
{
|
|
193
|
+
transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
|
|
194
|
+
paths: [
|
|
195
|
+
{ path: "localeSettings.createdDate" },
|
|
196
|
+
{ path: "localeSettings.updatedDate" },
|
|
197
|
+
{ path: "localeSettings.primaryLocale.createdDate" },
|
|
198
|
+
{ path: "localeSettings.primaryLocale.updatedDate" }
|
|
199
|
+
]
|
|
200
|
+
}
|
|
201
|
+
])
|
|
202
|
+
};
|
|
203
|
+
return metadata;
|
|
204
|
+
}
|
|
205
|
+
return __setMultilingualMode;
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
// src/multilingual-settings-v2-locale-settings-locale-settings.universal.ts
|
|
209
|
+
var UrlStructure = /* @__PURE__ */ ((UrlStructure2) => {
|
|
210
|
+
UrlStructure2["UNDEFINED_RESOLUTION_METHOD"] = "UNDEFINED_RESOLUTION_METHOD";
|
|
211
|
+
UrlStructure2["SUBDIRECTORY"] = "SUBDIRECTORY";
|
|
212
|
+
UrlStructure2["SUBDOMAIN"] = "SUBDOMAIN";
|
|
213
|
+
UrlStructure2["QUERY_PARAM"] = "QUERY_PARAM";
|
|
214
|
+
return UrlStructure2;
|
|
215
|
+
})(UrlStructure || {});
|
|
216
|
+
var LocaleVisibility = /* @__PURE__ */ ((LocaleVisibility2) => {
|
|
217
|
+
LocaleVisibility2["UNDEFINED_LOCALE_STATUS"] = "UNDEFINED_LOCALE_STATUS";
|
|
218
|
+
LocaleVisibility2["HIDDEN"] = "HIDDEN";
|
|
219
|
+
LocaleVisibility2["VISIBLE"] = "VISIBLE";
|
|
220
|
+
return LocaleVisibility2;
|
|
221
|
+
})(LocaleVisibility || {});
|
|
222
|
+
var State = /* @__PURE__ */ ((State2) => {
|
|
223
|
+
State2["UNKNOWN"] = "UNKNOWN";
|
|
224
|
+
State2["ENABLED"] = "ENABLED";
|
|
225
|
+
State2["DISABLED"] = "DISABLED";
|
|
226
|
+
State2["PENDING"] = "PENDING";
|
|
227
|
+
State2["DEMO"] = "DEMO";
|
|
228
|
+
return State2;
|
|
229
|
+
})(State || {});
|
|
230
|
+
var SiteCreatedContext = /* @__PURE__ */ ((SiteCreatedContext2) => {
|
|
231
|
+
SiteCreatedContext2["OTHER"] = "OTHER";
|
|
232
|
+
SiteCreatedContext2["FROM_TEMPLATE"] = "FROM_TEMPLATE";
|
|
233
|
+
SiteCreatedContext2["DUPLICATE_BY_SITE_TRANSFER"] = "DUPLICATE_BY_SITE_TRANSFER";
|
|
234
|
+
SiteCreatedContext2["DUPLICATE"] = "DUPLICATE";
|
|
235
|
+
SiteCreatedContext2["OLD_SITE_TRANSFER"] = "OLD_SITE_TRANSFER";
|
|
236
|
+
SiteCreatedContext2["FLASH"] = "FLASH";
|
|
237
|
+
return SiteCreatedContext2;
|
|
238
|
+
})(SiteCreatedContext || {});
|
|
239
|
+
var Namespace = /* @__PURE__ */ ((Namespace2) => {
|
|
240
|
+
Namespace2["UNKNOWN_NAMESPACE"] = "UNKNOWN_NAMESPACE";
|
|
241
|
+
Namespace2["WIX"] = "WIX";
|
|
242
|
+
Namespace2["SHOUT_OUT"] = "SHOUT_OUT";
|
|
243
|
+
Namespace2["ALBUMS"] = "ALBUMS";
|
|
244
|
+
Namespace2["WIX_STORES_TEST_DRIVE"] = "WIX_STORES_TEST_DRIVE";
|
|
245
|
+
Namespace2["HOTELS"] = "HOTELS";
|
|
246
|
+
Namespace2["CLUBS"] = "CLUBS";
|
|
247
|
+
Namespace2["ONBOARDING_DRAFT"] = "ONBOARDING_DRAFT";
|
|
248
|
+
Namespace2["DEV_SITE"] = "DEV_SITE";
|
|
249
|
+
Namespace2["LOGOS"] = "LOGOS";
|
|
250
|
+
Namespace2["VIDEO_MAKER"] = "VIDEO_MAKER";
|
|
251
|
+
Namespace2["PARTNER_DASHBOARD"] = "PARTNER_DASHBOARD";
|
|
252
|
+
Namespace2["DEV_CENTER_COMPANY"] = "DEV_CENTER_COMPANY";
|
|
253
|
+
Namespace2["HTML_DRAFT"] = "HTML_DRAFT";
|
|
254
|
+
Namespace2["SITELESS_BUSINESS"] = "SITELESS_BUSINESS";
|
|
255
|
+
Namespace2["CREATOR_ECONOMY"] = "CREATOR_ECONOMY";
|
|
256
|
+
Namespace2["DASHBOARD_FIRST"] = "DASHBOARD_FIRST";
|
|
257
|
+
Namespace2["ANYWHERE"] = "ANYWHERE";
|
|
258
|
+
Namespace2["HEADLESS"] = "HEADLESS";
|
|
259
|
+
Namespace2["ACCOUNT_MASTER_CMS"] = "ACCOUNT_MASTER_CMS";
|
|
260
|
+
Namespace2["RISE"] = "RISE";
|
|
261
|
+
Namespace2["BRANDED_FIRST"] = "BRANDED_FIRST";
|
|
262
|
+
Namespace2["NOWNIA"] = "NOWNIA";
|
|
263
|
+
Namespace2["UGC_TEMPLATE"] = "UGC_TEMPLATE";
|
|
264
|
+
Namespace2["CODUX"] = "CODUX";
|
|
265
|
+
Namespace2["MEDIA_DESIGN_CREATOR"] = "MEDIA_DESIGN_CREATOR";
|
|
266
|
+
Namespace2["SHARED_BLOG_ENTERPRISE"] = "SHARED_BLOG_ENTERPRISE";
|
|
267
|
+
Namespace2["STANDALONE_FORMS"] = "STANDALONE_FORMS";
|
|
268
|
+
Namespace2["STANDALONE_EVENTS"] = "STANDALONE_EVENTS";
|
|
269
|
+
Namespace2["MIMIR"] = "MIMIR";
|
|
270
|
+
return Namespace2;
|
|
271
|
+
})(Namespace || {});
|
|
272
|
+
var DeleteStatus = /* @__PURE__ */ ((DeleteStatus2) => {
|
|
273
|
+
DeleteStatus2["UNKNOWN"] = "UNKNOWN";
|
|
274
|
+
DeleteStatus2["TRASH"] = "TRASH";
|
|
275
|
+
DeleteStatus2["DELETED"] = "DELETED";
|
|
276
|
+
DeleteStatus2["PENDING_PURGE"] = "PENDING_PURGE";
|
|
277
|
+
DeleteStatus2["PURGED_EXTERNALLY"] = "PURGED_EXTERNALLY";
|
|
278
|
+
return DeleteStatus2;
|
|
279
|
+
})(DeleteStatus || {});
|
|
280
|
+
var WebhookIdentityType = /* @__PURE__ */ ((WebhookIdentityType2) => {
|
|
281
|
+
WebhookIdentityType2["UNKNOWN"] = "UNKNOWN";
|
|
282
|
+
WebhookIdentityType2["ANONYMOUS_VISITOR"] = "ANONYMOUS_VISITOR";
|
|
283
|
+
WebhookIdentityType2["MEMBER"] = "MEMBER";
|
|
284
|
+
WebhookIdentityType2["WIX_USER"] = "WIX_USER";
|
|
285
|
+
WebhookIdentityType2["APP"] = "APP";
|
|
286
|
+
return WebhookIdentityType2;
|
|
287
|
+
})(WebhookIdentityType || {});
|
|
288
|
+
async function getLocaleSettings2() {
|
|
289
|
+
const { httpClient, sideEffects } = arguments[0];
|
|
290
|
+
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({});
|
|
291
|
+
const reqOpts = getLocaleSettings(
|
|
292
|
+
payload
|
|
293
|
+
);
|
|
294
|
+
sideEffects?.onSiteCall?.();
|
|
295
|
+
try {
|
|
296
|
+
const result = await httpClient.request(reqOpts);
|
|
297
|
+
sideEffects?.onSuccess?.(result);
|
|
298
|
+
return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
|
|
299
|
+
} catch (err) {
|
|
300
|
+
const transformedError = (0, import_transform_error.transformError)(
|
|
301
|
+
err,
|
|
302
|
+
{
|
|
303
|
+
spreadPathsToArguments: {},
|
|
304
|
+
explicitPathsToArguments: {},
|
|
305
|
+
singleArgumentUnchanged: false
|
|
306
|
+
},
|
|
307
|
+
[]
|
|
308
|
+
);
|
|
309
|
+
sideEffects?.onError?.(err);
|
|
310
|
+
throw transformedError;
|
|
311
|
+
}
|
|
312
|
+
}
|
|
313
|
+
async function updateLocaleSettings2(localeSettings) {
|
|
314
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
315
|
+
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
316
|
+
localeSettings
|
|
317
|
+
});
|
|
318
|
+
const reqOpts = updateLocaleSettings(
|
|
319
|
+
payload
|
|
320
|
+
);
|
|
321
|
+
sideEffects?.onSiteCall?.();
|
|
322
|
+
try {
|
|
323
|
+
const result = await httpClient.request(reqOpts);
|
|
324
|
+
sideEffects?.onSuccess?.(result);
|
|
325
|
+
return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
|
|
326
|
+
} catch (err) {
|
|
327
|
+
const transformedError = (0, import_transform_error.transformError)(
|
|
328
|
+
err,
|
|
329
|
+
{
|
|
330
|
+
spreadPathsToArguments: {},
|
|
331
|
+
explicitPathsToArguments: { localeSettings: "$[0]" },
|
|
332
|
+
singleArgumentUnchanged: false
|
|
333
|
+
},
|
|
334
|
+
["localeSettings"]
|
|
335
|
+
);
|
|
336
|
+
sideEffects?.onError?.(err);
|
|
337
|
+
throw transformedError;
|
|
338
|
+
}
|
|
339
|
+
}
|
|
340
|
+
async function setMultilingualMode2(multilingualModeEnabled) {
|
|
341
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
342
|
+
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
343
|
+
multilingualModeEnabled
|
|
344
|
+
});
|
|
345
|
+
const reqOpts = setMultilingualMode(
|
|
346
|
+
payload
|
|
347
|
+
);
|
|
348
|
+
sideEffects?.onSiteCall?.();
|
|
349
|
+
try {
|
|
350
|
+
const result = await httpClient.request(reqOpts);
|
|
351
|
+
sideEffects?.onSuccess?.(result);
|
|
352
|
+
return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
|
|
353
|
+
} catch (err) {
|
|
354
|
+
const transformedError = (0, import_transform_error.transformError)(
|
|
355
|
+
err,
|
|
356
|
+
{
|
|
357
|
+
spreadPathsToArguments: {},
|
|
358
|
+
explicitPathsToArguments: { multilingualModeEnabled: "$[0]" },
|
|
359
|
+
singleArgumentUnchanged: false
|
|
360
|
+
},
|
|
361
|
+
["multilingualModeEnabled"]
|
|
362
|
+
);
|
|
363
|
+
sideEffects?.onError?.(err);
|
|
364
|
+
throw transformedError;
|
|
365
|
+
}
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
// src/multilingual-settings-v2-locale-settings-locale-settings.public.ts
|
|
369
|
+
function getLocaleSettings3(httpClient) {
|
|
370
|
+
return () => getLocaleSettings2(
|
|
371
|
+
// @ts-ignore
|
|
372
|
+
{ httpClient }
|
|
373
|
+
);
|
|
374
|
+
}
|
|
375
|
+
function updateLocaleSettings3(httpClient) {
|
|
376
|
+
return (localeSettings) => updateLocaleSettings2(
|
|
377
|
+
localeSettings,
|
|
378
|
+
// @ts-ignore
|
|
379
|
+
{ httpClient }
|
|
380
|
+
);
|
|
381
|
+
}
|
|
382
|
+
function setMultilingualMode3(httpClient) {
|
|
383
|
+
return (multilingualModeEnabled) => setMultilingualMode2(
|
|
384
|
+
multilingualModeEnabled,
|
|
385
|
+
// @ts-ignore
|
|
386
|
+
{ httpClient }
|
|
387
|
+
);
|
|
388
|
+
}
|
|
389
|
+
var onLocaleSettingsCreated = (0, import_sdk_types.EventDefinition)(
|
|
390
|
+
"wix.multilingual.settings.v2.locale_settings_created",
|
|
391
|
+
true,
|
|
392
|
+
(event) => (0, import_rename_all_nested_keys2.renameKeysFromRESTResponseToSDKResponse)(
|
|
393
|
+
(0, import_transform_paths2.transformPaths)(event, [
|
|
394
|
+
{
|
|
395
|
+
transformFn: import_timestamp3.transformRESTTimestampToSDKTimestamp,
|
|
396
|
+
paths: [
|
|
397
|
+
{ path: "entity.createdDate" },
|
|
398
|
+
{ path: "entity.updatedDate" },
|
|
399
|
+
{ path: "entity.primaryLocale.createdDate" },
|
|
400
|
+
{ path: "entity.primaryLocale.updatedDate" },
|
|
401
|
+
{ path: "metadata.eventTime" }
|
|
402
|
+
]
|
|
403
|
+
}
|
|
404
|
+
])
|
|
405
|
+
)
|
|
406
|
+
)();
|
|
407
|
+
var onLocaleSettingsDeleted = (0, import_sdk_types.EventDefinition)(
|
|
408
|
+
"wix.multilingual.settings.v2.locale_settings_deleted",
|
|
409
|
+
true,
|
|
410
|
+
(event) => (0, import_rename_all_nested_keys2.renameKeysFromRESTResponseToSDKResponse)(
|
|
411
|
+
(0, import_transform_paths2.transformPaths)(event, [
|
|
412
|
+
{
|
|
413
|
+
transformFn: import_timestamp3.transformRESTTimestampToSDKTimestamp,
|
|
414
|
+
paths: [
|
|
415
|
+
{ path: "undefined.createdDate" },
|
|
416
|
+
{ path: "undefined.updatedDate" },
|
|
417
|
+
{ path: "undefined.primaryLocale.createdDate" },
|
|
418
|
+
{ path: "undefined.primaryLocale.updatedDate" },
|
|
419
|
+
{ path: "metadata.eventTime" }
|
|
420
|
+
]
|
|
421
|
+
}
|
|
422
|
+
])
|
|
423
|
+
)
|
|
424
|
+
)();
|
|
425
|
+
var onLocaleSettingsMultilingualModeUpdated = (0, import_sdk_types.EventDefinition)(
|
|
426
|
+
"wix.multilingual.settings.v2.locale_settings_multilingual_mode_updated",
|
|
427
|
+
true,
|
|
428
|
+
(event) => (0, import_rename_all_nested_keys2.renameKeysFromRESTResponseToSDKResponse)(
|
|
429
|
+
(0, import_transform_paths2.transformPaths)(event, [
|
|
430
|
+
{
|
|
431
|
+
transformFn: import_timestamp3.transformRESTTimestampToSDKTimestamp,
|
|
432
|
+
paths: [
|
|
433
|
+
{ path: "data.primaryLocale.createdDate" },
|
|
434
|
+
{ path: "data.primaryLocale.updatedDate" },
|
|
435
|
+
{ path: "metadata.eventTime" }
|
|
436
|
+
]
|
|
437
|
+
}
|
|
438
|
+
])
|
|
439
|
+
)
|
|
440
|
+
)();
|
|
441
|
+
var onLocaleSettingsUpdated = (0, import_sdk_types.EventDefinition)(
|
|
442
|
+
"wix.multilingual.settings.v2.locale_settings_updated",
|
|
443
|
+
true,
|
|
444
|
+
(event) => (0, import_rename_all_nested_keys2.renameKeysFromRESTResponseToSDKResponse)(
|
|
445
|
+
(0, import_transform_paths2.transformPaths)(event, [
|
|
446
|
+
{
|
|
447
|
+
transformFn: import_timestamp3.transformRESTTimestampToSDKTimestamp,
|
|
448
|
+
paths: [
|
|
449
|
+
{ path: "entity.createdDate" },
|
|
450
|
+
{ path: "entity.updatedDate" },
|
|
451
|
+
{ path: "entity.primaryLocale.createdDate" },
|
|
452
|
+
{ path: "entity.primaryLocale.updatedDate" },
|
|
453
|
+
{ path: "metadata.eventTime" }
|
|
454
|
+
]
|
|
455
|
+
}
|
|
456
|
+
])
|
|
457
|
+
)
|
|
458
|
+
)();
|
|
459
|
+
|
|
460
|
+
// src/multilingual-settings-v2-locale-settings-locale-settings.context.ts
|
|
461
|
+
var import_rest_modules3 = require("@wix/sdk-runtime/rest-modules");
|
|
462
|
+
var import_event_definition_modules = require("@wix/sdk-runtime/event-definition-modules");
|
|
463
|
+
var getLocaleSettings4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(getLocaleSettings3);
|
|
464
|
+
var updateLocaleSettings4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(updateLocaleSettings3);
|
|
465
|
+
var setMultilingualMode4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(setMultilingualMode3);
|
|
466
|
+
var onLocaleSettingsCreated2 = (0, import_event_definition_modules.createEventModule)(onLocaleSettingsCreated);
|
|
467
|
+
var onLocaleSettingsDeleted2 = (0, import_event_definition_modules.createEventModule)(onLocaleSettingsDeleted);
|
|
468
|
+
var onLocaleSettingsMultilingualModeUpdated2 = (0, import_event_definition_modules.createEventModule)(onLocaleSettingsMultilingualModeUpdated);
|
|
469
|
+
var onLocaleSettingsUpdated2 = (0, import_event_definition_modules.createEventModule)(onLocaleSettingsUpdated);
|
|
470
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
471
|
+
0 && (module.exports = {
|
|
472
|
+
DeleteStatus,
|
|
473
|
+
LocaleVisibility,
|
|
474
|
+
Namespace,
|
|
475
|
+
SiteCreatedContext,
|
|
476
|
+
State,
|
|
477
|
+
UrlStructure,
|
|
478
|
+
WebhookIdentityType,
|
|
479
|
+
getLocaleSettings,
|
|
480
|
+
onLocaleSettingsCreated,
|
|
481
|
+
onLocaleSettingsDeleted,
|
|
482
|
+
onLocaleSettingsMultilingualModeUpdated,
|
|
483
|
+
onLocaleSettingsUpdated,
|
|
484
|
+
setMultilingualMode,
|
|
485
|
+
updateLocaleSettings
|
|
486
|
+
});
|
|
487
|
+
//# sourceMappingURL=index.js.map
|