@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.
@@ -1,64 +1,67 @@
1
- /**
2
- * Settings is a 'single entity per tenant' entity with META-SITE tenancy.
3
- * This means that Settings is active for every site, not only sites that have multilingual functionality installed.
4
- */
5
1
  interface LocaleSettings {
6
2
  /**
7
- * Settings lifecycle begins at site creation and cannot be manually created or deleted.
8
- * It's created automatically for each site.
9
- * Revision number, used for optimistic locking
3
+ * 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.
10
4
  * @readonly
11
5
  */
12
6
  revision?: string | null;
13
7
  /**
14
- * Timestamp of when the Settings entity was created
8
+ * Date and time the locale settings were created.
15
9
  * @readonly
16
10
  */
17
11
  _createdDate?: Date | null;
18
12
  /**
19
- * Timestamp of the last update to the Settings entity
13
+ * Date and time the locale settings were last updated.
20
14
  * @readonly
21
15
  */
22
16
  _updatedDate?: Date | null;
23
17
  /**
24
18
  * Indicates whether multilingual mode is enabled for the site.
25
- * When false, the user can change the main language.
26
- * When true, the main language cannot be changed.
27
- * Changing this value may have significant implications for the site's content and structure.
19
+ *
20
+ * When set to `true`, you can create secondary locales.
28
21
  * @readonly
29
22
  */
30
23
  multilingualModeEnabled?: boolean | null;
31
24
  /**
32
- * When true, the live site will automatically open in a secondary language
33
- * if it detects that the user's browser is set to that language.
25
+ * Indicates whether the live site will automatically open in a secondary locale if the
26
+ * site visitor's browser is set to that locale.
27
+ *
28
+ * Default: `false`
29
+ *
30
+ * <blockquote class="caution">
31
+ *
32
+ * __Caution:__
33
+ * 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.
34
+ *
35
+ * </blockquote>
34
36
  */
35
37
  autoSwitch?: boolean | null;
36
38
  /**
37
- * Defines how secondary languages will be resolved in the URL of the live site by default.
38
- * This can be overridden per locale.
39
+ * Defines the default method for how secondary languages appear in the live site's URL.
40
+ * The URL structure can be overridden per locale, using the Locale API.
41
+ *
42
+ * Default: `"SUBDIRECTORY"`
39
43
  */
40
44
  urlStructure?: UrlStructure;
41
45
  /**
42
- * The primary locale of the site, materialized from the locales service.
46
+ * The site's primary locale.
43
47
  * @readonly
44
48
  */
45
49
  primaryLocale?: Locale;
46
50
  }
47
51
  /** Enum representing the method for resolving locales in URLs. */
48
52
  declare enum UrlStructure {
49
- /** Value not specified */
53
+ /** Undefined resolution method. */
50
54
  UNDEFINED_RESOLUTION_METHOD = "UNDEFINED_RESOLUTION_METHOD",
51
- /** www.mysite.com/fr */
55
+ /** Subdirectory resolution method for the URL structure. For example, `"www.mysite.com/fr"`. */
52
56
  SUBDIRECTORY = "SUBDIRECTORY",
53
- /** fr.mysite.com */
57
+ /** Subdomain resolution method for the URL structure. For example, `"fr.mysite.com"`. */
54
58
  SUBDOMAIN = "SUBDOMAIN",
55
- /** www.mysite.com?lang=fr */
59
+ /** Query parameter resolution method for the URL structure. For example, `"www.mysite.com?lang=fr"`. */
56
60
  QUERY_PARAM = "QUERY_PARAM"
57
61
  }
58
- /** Every locale created will be validated using the IETF BCP 47 standard using framework validation. */
59
62
  interface Locale {
60
63
  /**
61
- * Locale ID. The ID is calculated from the language + region (+ script for future use).
64
+ * Locale ID. The ID is made up of the language and region codes. For example, `"en-US"`.
62
65
  * @maxLength 20
63
66
  * @format LANGUAGE_TAG
64
67
  * @readonly
@@ -66,108 +69,108 @@ interface Locale {
66
69
  */
67
70
  _id?: string | null;
68
71
  /**
69
- * Revision number for optimistic locking.
72
+ * 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.
70
73
  * @readonly
71
74
  */
72
75
  revision?: string | null;
73
76
  /**
74
- * Date and time the Locale was created.
77
+ * Date and time the locale was created.
75
78
  * @readonly
76
79
  */
77
80
  _createdDate?: Date | null;
78
81
  /**
79
- * Date and time the Locale was last updated.
82
+ * Date and time the locale was last updated.
80
83
  * @readonly
81
84
  */
82
85
  _updatedDate?: Date | null;
83
86
  /**
84
- * Language code (e.g., "en" for English).
87
+ * Language code. For example, `"en"` for English.
85
88
  * @immutable
86
89
  * @format LANGUAGE
87
90
  */
88
91
  languageCode?: string | null;
89
92
  /**
90
- * Region code (e.g., "US" for United States).
93
+ * Region code. For example, `"UK"` for United Kingdom.
91
94
  * @immutable
92
95
  * @format COUNTRY
93
96
  */
94
97
  regionCode?: string | null;
95
- /**
96
- * HIDDEN - locale will be available for the user to see it in editor and preview but won't be available for UoU
97
- * 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)
98
- */
98
+ /** Locale visibility status. */
99
99
  visibility?: LocaleVisibility;
100
100
  /**
101
- * Indicates if the language is the primary user-facing language in the Business Manager.
101
+ * Indicates whether the locale is the site's primary locale.
102
102
  * @readonly
103
103
  */
104
104
  primaryLocale?: boolean | null;
105
105
  /**
106
- * Indicates if the language is the primary visitor-facing language in the live site.
106
+ * Indicates whether the locale is treated as the default for site visitors when no language is specified in the URL of the site.
107
107
  * @readonly
108
108
  */
109
109
  visitorPrimaryLocale?: boolean | null;
110
110
  /**
111
- * Flag code (e.g., "US" for United States flag).
111
+ * Flag as a 3-letter language code based on Wix's supported locales. For example, `"USA"` for the United States flag.
112
112
  * @maxLength 3
113
113
  */
114
114
  flag?: string | null;
115
115
  /**
116
- * Date and number format (e.g., "en-US" for US English formatting).
116
+ * Regional format for determining how to display data types such as dates, times, numbers, and currencies. For example, `"en-US"` for US English formatting.
117
117
  * @format LANGUAGE_TAG
118
118
  */
119
119
  regionalFormat?: string | null;
120
120
  /**
121
- * The final and calculated specific locale resolution method.
122
- * This is taken by default from the settings unless there is an active override.
121
+ * Default URL structure for the locale's live site URL,
122
+ * based on the locale's settings, unless overridden.
123
123
  * @readonly
124
124
  */
125
125
  effectiveUrlStructure?: UrlStructure;
126
- /** Override for the default resolution method, if needed. */
126
+ /** Optional override for the locale's default URL structure. */
127
127
  urlStructureOverride?: UrlStructureOverride;
128
128
  /**
129
- * Machine translation code, can be overridden. By default, it has the value of language_code.
130
- * Add example for override needs (ZH_TW | ZH_CN)
129
+ * Language code based on Wix's supported locales, used to specify the target language when
130
+ * translatable content is sent for machine translation. For example, `"ES"` for Spanish
131
+ * or `"ZH_TW"` for Traditional Chinese.
132
+ *
133
+ * Default: The locale's `languageCode` value.
131
134
  * @format LANGUAGE_TAG
132
135
  */
133
136
  machineTranslationCode?: string | null;
134
137
  /**
135
- * Calculated display name. This will equal override_name if it exists, or localized_name as default.
138
+ * The locale's `displayName`, unless overridden.
136
139
  * @readonly
137
140
  * @maxLength 30
138
141
  */
139
142
  effectiveDisplayName?: string | null;
140
143
  /**
141
- * Localized name inferred from the ID using the locale data set.
144
+ * Default display name for the locale, inferred from the locale ID and region code.
142
145
  * @readonly
143
146
  * @maxLength 30
144
147
  */
145
148
  displayName?: string | null;
146
149
  /**
147
- * User-defined override name for the locale.
150
+ * Optional override for the locale's display name.
148
151
  * @maxLength 30
149
152
  */
150
153
  overrideDisplayName?: string | null;
151
154
  }
152
155
  /** Enum representing the visibility status of a locale. */
153
156
  declare enum LocaleVisibility {
154
- /** Value not specified */
157
+ /** Undefined visibility status. */
155
158
  UNDEFINED_LOCALE_STATUS = "UNDEFINED_LOCALE_STATUS",
156
- /** Locale was added to site but was not activated */
159
+ /** Locale is hidden from site visitors. */
157
160
  HIDDEN = "HIDDEN",
158
- /** Locale was added to site and activated */
161
+ /** Locale is visible to site visitors. A site can only have up to 100 visible locales. */
159
162
  VISIBLE = "VISIBLE"
160
163
  }
161
164
  /** Message for overriding the default resolution method. */
162
165
  interface UrlStructureOverride {
163
- /** The specific resolution method to use instead of the default. */
166
+ /** Resolution method that defines the URL structure to use instead of the default. */
164
167
  urlStructure?: UrlStructure;
165
168
  }
166
169
  /** Payload for the event triggered when the multilingual_mode value changes */
167
170
  interface MultilingualModeUpdated {
168
- /** The primary locale when multilingual mode is enabled or disabled */
171
+ /** The primary locale when `multilingualModeEnabled` is updated. */
169
172
  primaryLocale?: Locale;
170
- /** Indicates whether multilingual mode is enabled or disabled */
173
+ /** Indicates whether the multilingual mode is enabled on the site. */
171
174
  multilingualModeEnabled?: boolean;
172
175
  }
173
176
  /** Request message for retrieving multilingual settings */
@@ -175,27 +178,31 @@ interface GetLocaleSettingsRequest {
175
178
  }
176
179
  /** Response message containing the requested multilingual settings */
177
180
  interface GetLocaleSettingsResponse {
178
- /** The requested Settings entity */
181
+ /** Retrieved locale settings. */
179
182
  localeSettings?: LocaleSettings;
180
183
  }
181
184
  /** Request message for updating multilingual settings */
182
185
  interface UpdateLocaleSettingsRequest {
183
- /** Settings to be updated, may be partial */
186
+ /** Locale settings to update. */
184
187
  localeSettings: LocaleSettings;
185
188
  }
186
189
  /** Response message containing the updated multilingual settings */
187
190
  interface UpdateLocaleSettingsResponse {
188
- /** The updated Settings entity */
191
+ /** Updated locale settings. */
189
192
  localeSettings?: LocaleSettings;
190
193
  }
191
194
  /** Request message for setting the multilingual mode */
192
195
  interface SetMultilingualModeRequest {
193
- /** The new value of multilingual_mode to be set */
196
+ /**
197
+ * Whether to enable multilingual mode for the site.
198
+ *
199
+ * Default: `false`
200
+ */
194
201
  multilingualModeEnabled: boolean;
195
202
  }
196
203
  /** Response message containing the updated settings after changing the multilingual mode */
197
204
  interface SetMultilingualModeResponse {
198
- /** The current Settings entity after the change */
205
+ /** Updated locale settings. */
199
206
  localeSettings?: LocaleSettings;
200
207
  }
201
208
  interface DomainEvent extends DomainEventBodyOneOf {
@@ -301,6 +308,16 @@ interface MetaSiteSpecialEvent extends MetaSiteSpecialEventPayloadOneOf {
301
308
  studioAssigned?: StudioAssigned;
302
309
  /** Emitted when Studio is detached. */
303
310
  studioUnassigned?: StudioUnassigned;
311
+ /**
312
+ * Emitted when one of the URLs is changed. After this event you may call `urls-server` to fetch
313
+ * the actual URL.
314
+ *
315
+ * See: https://wix.slack.com/archives/C0UHEBPFT/p1732520791210559?thread_ts=1732027914.294059&cid=C0UHEBPFT
316
+ * See: https://wix.slack.com/archives/C0UHEBPFT/p1744115197619459
317
+ */
318
+ urlChanged?: SiteUrlChanged;
319
+ /** Site is marked as PurgedExternally */
320
+ sitePurgedExternally?: SitePurgedExternally;
304
321
  /**
305
322
  * A meta site id.
306
323
  * @format GUID
@@ -349,6 +366,16 @@ interface MetaSiteSpecialEventPayloadOneOf {
349
366
  studioAssigned?: StudioAssigned;
350
367
  /** Emitted when Studio is detached. */
351
368
  studioUnassigned?: StudioUnassigned;
369
+ /**
370
+ * Emitted when one of the URLs is changed. After this event you may call `urls-server` to fetch
371
+ * the actual URL.
372
+ *
373
+ * See: https://wix.slack.com/archives/C0UHEBPFT/p1732520791210559?thread_ts=1732027914.294059&cid=C0UHEBPFT
374
+ * See: https://wix.slack.com/archives/C0UHEBPFT/p1744115197619459
375
+ */
376
+ urlChanged?: SiteUrlChanged;
377
+ /** Site is marked as PurgedExternally */
378
+ sitePurgedExternally?: SitePurgedExternally;
352
379
  }
353
380
  interface Asset {
354
381
  /**
@@ -481,7 +508,20 @@ declare enum Namespace {
481
508
  */
482
509
  UGC_TEMPLATE = "UGC_TEMPLATE",
483
510
  /** Codux Headless Sites */
484
- CODUX = "CODUX"
511
+ CODUX = "CODUX",
512
+ /** Bobb - AI Design Creator. */
513
+ MEDIA_DESIGN_CREATOR = "MEDIA_DESIGN_CREATOR",
514
+ /**
515
+ * Shared Blog Site is a unique single site across Enterprise account,
516
+ * This site will hold all Blog posts related to the Marketing product.
517
+ */
518
+ SHARED_BLOG_ENTERPRISE = "SHARED_BLOG_ENTERPRISE",
519
+ /** Standalone forms (siteless). MetaSites with this namespace will *not* be shown in a user's site list by default. */
520
+ STANDALONE_FORMS = "STANDALONE_FORMS",
521
+ /** Standalone events (siteless). MetaSites with this namespace will *not* be shown in a user's site list by default. */
522
+ STANDALONE_EVENTS = "STANDALONE_EVENTS",
523
+ /** MIMIR - Siteless account for MIMIR Ai Job runner. */
524
+ MIMIR = "MIMIR"
485
525
  }
486
526
  /** Site transferred to another user. */
487
527
  interface SiteTransferred {
@@ -521,7 +561,8 @@ declare enum DeleteStatus {
521
561
  UNKNOWN = "UNKNOWN",
522
562
  TRASH = "TRASH",
523
563
  DELETED = "DELETED",
524
- PENDING_PURGE = "PENDING_PURGE"
564
+ PENDING_PURGE = "PENDING_PURGE",
565
+ PURGED_EXTERNALLY = "PURGED_EXTERNALLY"
525
566
  }
526
567
  /** Restoration of the meta site. */
527
568
  interface SiteUndeleted {
@@ -541,6 +582,21 @@ interface SiteMarkedAsTemplate {
541
582
  }
542
583
  interface SiteMarkedAsWixSite {
543
584
  }
585
+ /**
586
+ * Represents a service provisioned a site.
587
+ *
588
+ * Note on `origin_instance_id`:
589
+ * There is no guarantee that you will be able to find a meta site using `origin_instance_id`.
590
+ * This is because of the following scenario:
591
+ *
592
+ * Imagine you have a template where a third-party application (TPA) includes some stub data,
593
+ * such as a product catalog. When you create a site from this template, you inherit this
594
+ * default product catalog. However, if the template's product catalog is modified,
595
+ * your site will retain the catalog as it was at the time of site creation. This ensures that
596
+ * your site remains consistent with what you initially received and does not include any
597
+ * changes made to the original template afterward.
598
+ * To ensure this, the TPA on the template gets a new instance_id.
599
+ */
544
600
  interface ServiceProvisioned {
545
601
  /**
546
602
  * Either UUID or EmbeddedServiceType.
@@ -619,6 +675,29 @@ interface StudioAssigned {
619
675
  /** Unassigned Studio editor */
620
676
  interface StudioUnassigned {
621
677
  }
678
+ /**
679
+ * Fired in case site URLs were changed in any way: new secondary domain, published, account slug rename, site rename etc.
680
+ *
681
+ * This is an internal event, it's not propagated in special events, because it's non-actionable. If you need to keep up
682
+ * with sites and its urls, you need to listen to another topic/event. Read about it:
683
+ *
684
+ * https://bo.wix.com/wix-docs/rest/meta-site/meta-site---urls-service
685
+ */
686
+ interface SiteUrlChanged {
687
+ }
688
+ /**
689
+ * Used at the end of the deletion flow for both draft sites and when a user deletes a site.
690
+ * Consumed by other teams to remove relevant data.
691
+ */
692
+ interface SitePurgedExternally {
693
+ /**
694
+ * @maxLength 2048
695
+ * @maxSize 100
696
+ * @deprecated
697
+ * @targetRemovalDate 2025-04-15
698
+ */
699
+ appDefId?: string[];
700
+ }
622
701
  interface MessageEnvelope {
623
702
  /**
624
703
  * App instance ID.
@@ -690,4 +769,4 @@ declare enum WebhookIdentityType {
690
769
  APP = "APP"
691
770
  }
692
771
 
693
- export { type ActionEvent as A, type ServiceProvisioned as B, type ServiceRemoved as C, DeleteStatus as D, type EntityCreatedEvent as E, type SiteRenamed as F, type GetLocaleSettingsResponse as G, type SiteHardDeleted as H, type NamespaceChanged as I, type StudioAssigned as J, type StudioUnassigned as K, type LocaleSettings as L, type MultilingualModeUpdated as M, Namespace as N, type MessageEnvelope as O, type IdentificationData as P, type IdentificationDataIdOneOf as Q, type RestoreInfo as R, type SetMultilingualModeResponse as S, type UpdateLocaleSettingsResponse as U, WebhookIdentityType as W, UrlStructure as a, LocaleVisibility as b, State as c, SiteCreatedContext as d, type Locale as e, type UrlStructureOverride as f, type GetLocaleSettingsRequest as g, type UpdateLocaleSettingsRequest as h, type SetMultilingualModeRequest as i, type DomainEvent as j, type DomainEventBodyOneOf as k, type EntityUpdatedEvent as l, type EntityDeletedEvent as m, type Empty as n, type MetaSiteSpecialEvent as o, type MetaSiteSpecialEventPayloadOneOf as p, type Asset as q, type SiteCreated as r, type SiteTransferred as s, type SiteDeleted as t, type DeleteContext as u, type SiteUndeleted as v, type SitePublished as w, type SiteUnpublished as x, type SiteMarkedAsTemplate as y, type SiteMarkedAsWixSite as z };
772
+ export { type ActionEvent as A, type ServiceProvisioned as B, type ServiceRemoved as C, DeleteStatus as D, type EntityCreatedEvent as E, type SiteRenamed as F, type GetLocaleSettingsResponse as G, type SiteHardDeleted as H, type NamespaceChanged as I, type StudioAssigned as J, type StudioUnassigned as K, type LocaleSettings as L, type MultilingualModeUpdated as M, Namespace as N, type SiteUrlChanged as O, type SitePurgedExternally as P, type MessageEnvelope as Q, type RestoreInfo as R, type SetMultilingualModeResponse as S, type IdentificationData as T, type UpdateLocaleSettingsResponse as U, type IdentificationDataIdOneOf as V, WebhookIdentityType as W, UrlStructure as a, LocaleVisibility as b, State as c, SiteCreatedContext as d, type Locale as e, type UrlStructureOverride as f, type GetLocaleSettingsRequest as g, type UpdateLocaleSettingsRequest as h, type SetMultilingualModeRequest as i, type DomainEvent as j, type DomainEventBodyOneOf as k, type EntityUpdatedEvent as l, type EntityDeletedEvent as m, type Empty as n, type MetaSiteSpecialEvent as o, type MetaSiteSpecialEventPayloadOneOf as p, type Asset as q, type SiteCreated as r, type SiteTransferred as s, type SiteDeleted as t, type DeleteContext as u, type SiteUndeleted as v, type SitePublished as w, type SiteUnpublished as x, type SiteMarkedAsTemplate as y, type SiteMarkedAsWixSite as z };
package/build/meta.d.mts CHANGED
@@ -1,66 +1,69 @@
1
1
  import { GetLocaleSettingsRequest as GetLocaleSettingsRequest$1, GetLocaleSettingsResponse as GetLocaleSettingsResponse$1, UpdateLocaleSettingsRequest as UpdateLocaleSettingsRequest$1, UpdateLocaleSettingsResponse as UpdateLocaleSettingsResponse$1, SetMultilingualModeRequest as SetMultilingualModeRequest$1, SetMultilingualModeResponse as SetMultilingualModeResponse$1 } from './index.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
- * Settings lifecycle begins at site creation and cannot be manually created or deleted.
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
- * Timestamp of when the Settings entity was created
10
+ * Date and time the locale settings were created.
17
11
  * @readonly
18
12
  */
19
13
  createdDate?: Date | null;
20
14
  /**
21
- * Timestamp of the last update to the Settings entity
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
- * When false, the user can change the main language.
28
- * When true, the main language cannot be changed.
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
- * When true, the live site will automatically open in a secondary language
35
- * if it detects that the user's browser is set to that language.
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 will be resolved in the URL of the live site by default.
40
- * This can be overridden per locale.
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 of the site, materialized from the locales service.
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
- /** Value not specified */
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 calculated from the language + region (+ script for future use).
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 for optimistic locking.
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 Locale was created.
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 Locale was last updated.
84
+ * Date and time the locale was last updated.
82
85
  * @readonly
83
86
  */
84
87
  updatedDate?: Date | null;
85
88
  /**
86
- * Language code (e.g., "en" for English).
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 (e.g., "US" for United States).
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 if the language is the primary user-facing language in the Business Manager.
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 if the language is the primary visitor-facing language in the live site.
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 (e.g., "US" for United States flag).
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
- * Date and number format (e.g., "en-US" for US English formatting).
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
- * The final and calculated specific locale resolution method.
124
- * This is taken by default from the settings unless there is an active override.
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
- /** Override for the default resolution method, if needed. */
128
+ /** Optional override for the locale's default URL structure. */
129
129
  urlStructureOverride?: UrlStructureOverride;
130
130
  /**
131
- * Machine translation code, can be overridden. By default, it has the value of language_code.
132
- * Add example for override needs (ZH_TW | ZH_CN)
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
- * Calculated display name. This will equal override_name if it exists, or localized_name as default.
140
+ * The locale's `displayName`, unless overridden.
138
141
  * @readonly
139
142
  * @maxLength 30
140
143
  */
141
144
  effectiveDisplayName?: string | null;
142
145
  /**
143
- * Localized name inferred from the ID using the locale data set.
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
- * User-defined override name for the locale.
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
- /** Value not specified */
159
+ /** Undefined visibility status. */
157
160
  UNDEFINED_LOCALE_STATUS = "UNDEFINED_LOCALE_STATUS",
158
- /** Locale was added to site but was not activated */
161
+ /** Locale is hidden from site visitors. */
159
162
  HIDDEN = "HIDDEN",
160
- /** Locale was added to site and activated */
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
- /** The specific resolution method to use instead of the default. */
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
- /** The requested Settings entity */
176
+ /** Retrieved locale settings. */
174
177
  localeSettings?: LocaleSettings;
175
178
  }
176
179
  /** Request message for updating multilingual settings */
177
180
  interface UpdateLocaleSettingsRequest {
178
- /** Settings to be updated, may be partial */
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
- /** The updated Settings entity */
186
+ /** Updated locale settings. */
184
187
  localeSettings?: LocaleSettings;
185
188
  }
186
189
  /** Request message for setting the multilingual mode */
187
190
  interface SetMultilingualModeRequest {
188
- /** The new value of multilingual_mode to be set */
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
- /** The current Settings entity after the change */
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<'PATCH', {}, SetMultilingualModeRequest$1, SetMultilingualModeRequest, SetMultilingualModeResponse$1, SetMultilingualModeResponse>;
216
+ declare function setMultilingualMode(): __PublicMethodMetaInfo<'POST', {}, SetMultilingualModeRequest$1, SetMultilingualModeRequest, SetMultilingualModeResponse$1, SetMultilingualModeResponse>;
210
217
 
211
218
  export { type __PublicMethodMetaInfo, getLocaleSettings, setMultilingualMode, updateLocaleSettings };