@wix/auto_sdk_restaurants_menus 1.0.92 → 1.0.94

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.
@@ -71,73 +71,117 @@ interface ExtendedFields {
71
71
  namespaces?: Record<string, Record<string, any>>;
72
72
  }
73
73
  /**
74
- * The SEO schema object contains data about different types of meta tags. It makes sure that the information about your page is presented properly to search engines.
75
- * The search engines use this information for ranking purposes, or to display snippets in the search results.
76
- * This data will override other sources of tags (for example patterns) and will be included in the <head> section of the HTML document, while not being displayed on the page itself.
74
+ * The SEO data for a single page or dynamic item, in the shape stored today.
75
+ *
76
+ * FROZEN. Existing server code maps onto this message field by field, so its
77
+ * field set must never change (see the file header). New writers use
78
+ * `SeoSchemaV2`.
79
+ *
80
+ * These tags are rendered into the <head> of the HTML document and are not
81
+ * visible on the page itself. They override every other source of tags
82
+ * (site defaults, vertical presets, patterns) for this page.
77
83
  */
78
84
  interface SeoSchema {
79
- /** SEO tag information. */
85
+ /**
86
+ * The tags rendered into <head>, in no particular order. Render order is
87
+ * decided by the renderer, not by position in this list.
88
+ *
89
+ * No maxSize: this list is already populated by data written years ago, and
90
+ * a bound added now could reject a page that is already stored.
91
+ */
80
92
  tags?: Tag[];
81
- /** SEO general settings. */
93
+ /** Page-level SEO settings that are not themselves tags. */
82
94
  settings?: Settings;
83
95
  }
96
+ /** A keyword term the user is targeting. */
84
97
  interface Keyword {
85
- /** Keyword value. */
98
+ /**
99
+ * The term itself, e.g. "trail running shoes".
100
+ *
101
+ * No maxLength, for the same reason as the legacy tag fields: keywords are
102
+ * already stored, and a bound added now could reject a record written
103
+ * before the bound existed. The flynt `missing-string-validations` warning
104
+ * on this field is accepted deliberately.
105
+ */
86
106
  term?: string;
87
- /** Whether the keyword is the main focus keyword. */
107
+ /** Whether this is the page's primary focus keyword. At most one per page. */
88
108
  isMain?: boolean;
89
109
  /**
90
- * The source that added the keyword terms to the SEO settings.
110
+ * Which surface added the term, e.g. a panel or a suggestion flow. Used for
111
+ * attribution in BI. Opaque to the renderer.
91
112
  * @maxLength 1000
92
113
  */
93
114
  origin?: string | null;
94
115
  }
116
+ /**
117
+ * One tag in the page's <head>.
118
+ *
119
+ * Not deprecated, and with no removal date, deliberately: stored data is
120
+ * never migrated, so this shape stays valid input forever. `seo-renderer`
121
+ * normalizes both shapes on READ.
122
+ */
95
123
  interface Tag {
96
124
  /**
97
- * SEO tag type.
98
- *
125
+ * Legacy. Was a free-form string: "title" | "meta" | "script" | "link".
126
+ * The typed replacement is the `kind` oneof on `SeoSchemaV2.Tag`, which makes
127
+ * the invalid combinations unrepresentable rather than merely discouraged.
99
128
  *
100
- * Supported values: `title`, `meta`, `script`, `link`.
101
- *
102
- * Which of these an API actually accepts depends on where the tag is being set: this
103
- * list is not a blanket guarantee across every API that reuses this message. Site SEO
104
- * Tags in particular accepts only `meta` (see `SiteSeoTags.tags`) and rejects
105
- * `title`/`script`/`link` with a validation error even though they appear here —
106
- * check the field description of the specific `tags`-typed field you're writing to
107
- * for the types it actually supports and the error it returns.
129
+ * Which of these an API actually accepts depends on where the tag is being
130
+ * set: this list is not a blanket guarantee across every API that reuses
131
+ * this message. Site SEO Tags in particular accepts only `meta` (see
132
+ * `SiteSeoTags.tags`) and rejects `title`/`script`/`link` with a validation
133
+ * error even though they appear here — check the field description of the
134
+ * specific `tags`-typed field you are writing to.
108
135
  *
109
136
  * Limitation: `title` and `script` (e.g. a `script` tag with `props.type`
110
- * `"application/ld+json"` carrying structured data) are supported only when
111
- * `custom` is unset or `false`. Setting `custom: true` on a `title` or `script`
112
- * tag is rejected with `TAG_TYPE_NOT_ALLOWED`, because `custom: true` routes the
113
- * write through the site's Advanced/Custom Tags list. To write structured data,
114
- * omit `custom` (or set it to `false`).
137
+ * "application/ld+json" carrying structured data) are supported only when
138
+ * `custom` is unset or `false`. Setting `custom: true` on a `title` or
139
+ * `script` tag is rejected with `TAG_TYPE_NOT_ALLOWED`, because
140
+ * `custom: true` routes the write through the site's Advanced/Custom Tags
141
+ * list. To write structured data, omit `custom` (or set it to `false`).
142
+ *
143
+ * No length limit: this field holds data written years ago by writers we
144
+ * are not migrating. A constraint here could reject a record that is
145
+ * already stored, which is exactly the promise this design makes.
115
146
  */
116
147
  type?: string;
117
148
  /**
118
- * A `{"key": "value"}` pair object where each SEO tag property (`"name"`, `"content"`, `"rel"`, `"href"`) contains a value.
119
- * For example: `{"name": "description", "content": "the description itself"}`.
149
+ * Legacy. Was an untyped bag of HTML attributes.
150
+ * Typed replacement: `SeoSchemaV2.TitleTag` / `MetaTag` / `LinkTag`.
120
151
  */
121
152
  props?: Record<string, any> | null;
122
- /** SEO tag metadata. For example, `{"height": 300, "width": 240}`. */
153
+ /**
154
+ * Legacy. Was an untyped bag of 16 mixed-purpose keys. In `SeoSchemaV2`
155
+ * its contents are split by purpose: per-page structured-data state moves to
156
+ * StructuredDataTag, authorship to `written_by`, and render-time preset
157
+ * logic (variants, enabledByExperiment, removeSchemaIf*) moved out of the
158
+ * stored document entirely — it belongs to the preset definition, not to the
159
+ * page. See the design log for the full key-by-key mapping.
160
+ */
123
161
  meta?: Record<string, any> | null;
124
- /** SEO tag inner content. For example, `<title> inner content </title>`. */
162
+ /**
163
+ * Legacy. Was the tag's inner content, doubling as the JSON-LD payload
164
+ * for script tags. Typed replacement: `SeoSchemaV2.TitleTag.text` and
165
+ * `StructuredDataTag.json_ld`.
166
+ * No length limit, for the same reason as `type` above.
167
+ */
125
168
  children?: string;
126
169
  /**
127
170
  * Whether the tag is a [custom tag](https://support.wix.com/en/article/adding-additional-meta-tags-to-your-sites-pages) —
128
171
  * i.e. an entry from the site's Advanced/Custom Tags list.
129
172
  *
130
- * Setting this to `true` on a write restricts which `type` values are accepted
131
- * — the same restriction the Advanced/Custom Tags UI enforces. `title` and
132
- * `script` tags (including JSON-LD structured data) must be sent with `custom`
133
- * omitted or `false`; sending them with `custom: true` is rejected with
134
- * `TAG_TYPE_NOT_ALLOWED`.
173
+ * Setting this to `true` on a write restricts which `type` values are
174
+ * accepted — the same restriction the Advanced/Custom Tags UI enforces.
175
+ * `title` and `script` tags (including JSON-LD structured data) must be sent
176
+ * with `custom` omitted or `false`; sending them with `custom: true` is
177
+ * rejected with `TAG_TYPE_NOT_ALLOWED`.
135
178
  *
136
- * Note this is a separate restriction from Site SEO Tags' own type restriction on
137
- * `SiteSeoTags.tags`: even with `custom` unset, Site SEO Tags rejects `script` (e.g.
138
- * for site-wide structured data) unconditionally. There is currently no way to set
139
- * site-wide, every-page structured data through any of these APIs — write a per-page
140
- * `script` tag through the Item SEO Tags API instead.
179
+ * Note this is a separate restriction from Site SEO Tags' own type
180
+ * restriction on `SiteSeoTags.tags`: even with `custom` unset, Site SEO Tags
181
+ * rejects `script` (e.g. for site-wide structured data) unconditionally.
182
+ * There is currently no way to set site-wide, every-page structured data
183
+ * through any of these APIs — write a per-page `script` tag through the Item
184
+ * SEO Tags API instead.
141
185
  *
142
186
  * This flag is scoped to that feature only. It is NOT an indicator of whether a standard tag
143
187
  * (`title`, `description`, Open Graph, etc.) reflects a manually configured value versus a computed
@@ -150,22 +194,39 @@ interface Tag {
150
194
  * or Wix Studio pages, so even genuine Advanced/Custom Tags saved on those pages are missing from the
151
195
  * response entirely — there, `false` means this API could not tell, not that no custom tag exists.
152
196
  * Pass `seoData` explicitly to resolve against a known set of tags.
197
+ *
198
+ * `SeoSchemaV2.Tag` expresses this as `written_by = USER_CUSTOM`.
153
199
  */
154
200
  custom?: boolean;
155
- /** Whether the tag is disabled. If the tag is disabled, people can't find your page when searching for this phrase in search engines. */
201
+ /**
202
+ * Whether the tag is excluded from the rendered <head>.
203
+ *
204
+ * A disabled tag is still stored, so the user can re-enable it and so a
205
+ * pattern-provided tag stays suppressed on this page. Default false.
206
+ */
156
207
  disabled?: boolean;
157
208
  }
209
+ /** Page-level SEO settings that are not tags. */
158
210
  interface Settings {
159
211
  /**
160
- * Whether the [automatical redirect visits](https://support.wix.com/en/article/customizing-your-pages-seo-settings-in-the-seo-panel) from the old URL to the new one is enabled.
212
+ * Whether to suppress the automatic redirect from this page's previous URL to
213
+ * its current one after a slug change.
161
214
  *
162
- *
163
- * Default: `false` (automatical redirect is enabled).
215
+ * Default false, meaning the redirect IS created. The field is named for the
216
+ * exception rather than the rule, which reads backwards; kept as-is because
217
+ * renaming a stored boolean is not worth the migration.
164
218
  */
165
219
  preventAutoRedirect?: boolean;
166
220
  /**
167
- * User-selected keyword terms for a specific page.
168
- * @maxSize 5
221
+ * Keyword terms the user is targeting for this page. Used by the SEO
222
+ * assistant and checklist; never rendered into <head>.
223
+ *
224
+ * 20 is a sanity bound, not the product limit. v1 declared 5 — the number
225
+ * the panel happens to allow today — which is exactly the mistake we are
226
+ * fixing for structured data. A product decision to allow 8 should not need
227
+ * a proto release, so the panel owns that number and the proto only stops
228
+ * something absurd.
229
+ * @maxSize 20
169
230
  */
170
231
  keywords?: Keyword[];
171
232
  }