@wix/auto_sdk_seo_seo-patterns 1.0.0

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.
Files changed (52) hide show
  1. package/build/cjs/index.d.ts +141 -0
  2. package/build/cjs/index.js +455 -0
  3. package/build/cjs/index.js.map +1 -0
  4. package/build/cjs/index.typings.d.ts +777 -0
  5. package/build/cjs/index.typings.js +398 -0
  6. package/build/cjs/index.typings.js.map +1 -0
  7. package/build/cjs/meta.d.ts +592 -0
  8. package/build/cjs/meta.js +335 -0
  9. package/build/cjs/meta.js.map +1 -0
  10. package/build/cjs/schemas.d.ts +312 -0
  11. package/build/cjs/schemas.js +717 -0
  12. package/build/cjs/schemas.js.map +1 -0
  13. package/build/es/index.d.mts +141 -0
  14. package/build/es/index.mjs +423 -0
  15. package/build/es/index.mjs.map +1 -0
  16. package/build/es/index.typings.d.mts +777 -0
  17. package/build/es/index.typings.mjs +366 -0
  18. package/build/es/index.typings.mjs.map +1 -0
  19. package/build/es/meta.d.mts +592 -0
  20. package/build/es/meta.mjs +300 -0
  21. package/build/es/meta.mjs.map +1 -0
  22. package/build/es/package.json +3 -0
  23. package/build/es/schemas.d.mts +312 -0
  24. package/build/es/schemas.mjs +669 -0
  25. package/build/es/schemas.mjs.map +1 -0
  26. package/build/internal/cjs/index.d.ts +141 -0
  27. package/build/internal/cjs/index.js +455 -0
  28. package/build/internal/cjs/index.js.map +1 -0
  29. package/build/internal/cjs/index.typings.d.ts +777 -0
  30. package/build/internal/cjs/index.typings.js +398 -0
  31. package/build/internal/cjs/index.typings.js.map +1 -0
  32. package/build/internal/cjs/meta.d.ts +634 -0
  33. package/build/internal/cjs/meta.js +335 -0
  34. package/build/internal/cjs/meta.js.map +1 -0
  35. package/build/internal/cjs/schemas.d.ts +312 -0
  36. package/build/internal/cjs/schemas.js +717 -0
  37. package/build/internal/cjs/schemas.js.map +1 -0
  38. package/build/internal/es/index.d.mts +141 -0
  39. package/build/internal/es/index.mjs +423 -0
  40. package/build/internal/es/index.mjs.map +1 -0
  41. package/build/internal/es/index.typings.d.mts +777 -0
  42. package/build/internal/es/index.typings.mjs +366 -0
  43. package/build/internal/es/index.typings.mjs.map +1 -0
  44. package/build/internal/es/meta.d.mts +634 -0
  45. package/build/internal/es/meta.mjs +300 -0
  46. package/build/internal/es/meta.mjs.map +1 -0
  47. package/build/internal/es/schemas.d.mts +312 -0
  48. package/build/internal/es/schemas.mjs +669 -0
  49. package/build/internal/es/schemas.mjs.map +1 -0
  50. package/meta/package.json +3 -0
  51. package/package.json +61 -0
  52. package/schemas/package.json +3 -0
@@ -0,0 +1,777 @@
1
+ import { NonNullablePaths } from '@wix/sdk-types';
2
+
3
+ /**
4
+ * An SEO pattern is a template of SEO tags defined for one page type, such as every blog
5
+ * post or every store product. A pattern's tags may contain variables, written as
6
+ * `{{variable}}`, that are filled in with each item's own values when its page renders,
7
+ * so a site owner sets the tags for a whole page type once instead of item by item.
8
+ *
9
+ * Every page type always has a pattern in effect. When a site has no pattern of its own
10
+ * for a page type, the built-in Wix default applies, and `source` reports which of the
11
+ * two is in effect.
12
+ *
13
+ * A change to a pattern reaches the live site without a site publish, and applies to
14
+ * every page of that type that has no SEO tags set for the item itself.
15
+ */
16
+ interface SeoPattern {
17
+ /**
18
+ * SEO pattern ID, in the format `{pageType}`.
19
+ *
20
+ * For a pattern that applies to a single page built from a Wix Data collection, the
21
+ * format is `{pageType}:{pageId}`.
22
+ * @readonly
23
+ * @maxLength 400
24
+ */
25
+ _id?: string | null;
26
+ /**
27
+ * Page type the pattern applies to. For example, `STATIC_PAGE`, `BLOG_POST`, or
28
+ * `STORES_PRODUCT`.
29
+ *
30
+ * Calling with a page type Wix doesn't recognize fails with `UNSUPPORTED_PAGE_TYPE`,
31
+ * and the error lists the page types that are supported. For a page type provided by a
32
+ * Wix app, such as `BLOG_POST`, the app must be installed on the site.
33
+ *
34
+ * Page types aren't the same set as the item types of the Item SEO Tags API: a page
35
+ * type can support a pattern without supporting tags set per item, and the other way
36
+ * round.
37
+ * @maxLength 100
38
+ * @readonly
39
+ */
40
+ pageType?: string;
41
+ /**
42
+ * ID of a single page built from a Wix Data collection, when the pattern applies to
43
+ * that page alone rather than to the whole page type.
44
+ *
45
+ * Supported only for the `WIX_DATA_PAGE_ITEM` page type. Every other page type has one
46
+ * pattern for the type, and passing a page ID for one of those fails with
47
+ * `PAGE_ID_NOT_SUPPORTED`.
48
+ * @maxLength 200
49
+ */
50
+ pageId?: string | null;
51
+ /**
52
+ * The site's own pattern for the page type, which takes precedence over the Wix
53
+ * default.
54
+ *
55
+ * Empty when the site has no pattern of its own, in which case `defaultPattern`
56
+ * applies. Setting this field replaces the pattern in full, so send the complete set of
57
+ * tag templates you want the page type to have.
58
+ */
59
+ pattern?: SeoPatternBlob;
60
+ /**
61
+ * The pattern Wix provides for the page type, which applies whenever the site has no
62
+ * pattern of its own.
63
+ *
64
+ * Always returned, so you can compare a customized pattern with the one it started
65
+ * from, and see what a reset would restore.
66
+ * @readonly
67
+ */
68
+ defaultPattern?: SeoPatternBlob;
69
+ /**
70
+ * Which pattern is in effect for the page type: the site's own, or the Wix default.
71
+ * @readonly
72
+ */
73
+ source?: PatternSourceWithLiterals;
74
+ /**
75
+ * Language the pattern applies to, as an IETF BCP 47 language tag. For example,
76
+ * `en-US` for U.S. English.
77
+ *
78
+ * A page type has a single pattern, so this reports the site's primary language.
79
+ * @maxLength 100
80
+ * @readonly
81
+ */
82
+ language?: string | null;
83
+ /**
84
+ * What made the most recent change to the pattern, for example a user or the site
85
+ * migration flow. Derived from the caller, not from the request.
86
+ *
87
+ * `ORIGIN_UNSPECIFIED` when the caller isn't one Wix identifies as a specific origin.
88
+ * Origin isn't stored with the pattern either, so Get SEO Pattern and List SEO Patterns
89
+ * always return `ORIGIN_UNSPECIFIED`.
90
+ * @readonly
91
+ */
92
+ origin?: OriginWithLiterals;
93
+ }
94
+ /**
95
+ * A set of SEO tag templates.
96
+ *
97
+ * Each tag has the same structure as a rendered SEO tag, except that its values may
98
+ * contain `{{variable}}` placeholders, which are replaced with an item's own values when
99
+ * its page renders.
100
+ */
101
+ interface SeoPatternBlob {
102
+ /**
103
+ * The pattern's SEO tag templates.
104
+ *
105
+ * A tag may reference only the variables the page type offers. Call List SEO Pattern
106
+ * Variables for the page type to retrieve them.
107
+ *
108
+ * Max: 100 tags
109
+ * @maxSize 100
110
+ */
111
+ tags?: Tag[];
112
+ }
113
+ interface Tag {
114
+ /**
115
+ * SEO tag type.
116
+ *
117
+ *
118
+ * Supported values: `title`, `meta`, `script`, `link`.
119
+ */
120
+ type?: string;
121
+ /**
122
+ * A `{"key": "value"}` pair object where each SEO tag property (`"name"`, `"content"`, `"rel"`, `"href"`) contains a value.
123
+ * For example: `{"name": "description", "content": "the description itself"}`.
124
+ */
125
+ props?: Record<string, any> | null;
126
+ /** SEO tag metadata. For example, `{"height": 300, "width": 240}`. */
127
+ meta?: Record<string, any> | null;
128
+ /** SEO tag inner content. For example, `<title> inner content </title>`. */
129
+ children?: string;
130
+ /** Whether the tag is a [custom tag](https://support.wix.com/en/article/adding-additional-meta-tags-to-your-sites-pages). */
131
+ custom?: boolean;
132
+ /** Whether the tag is disabled. If the tag is disabled, people can't find your page when searching for this phrase in search engines. */
133
+ disabled?: boolean;
134
+ }
135
+ /** Which pattern is in effect for a page type. */
136
+ declare enum PatternSource {
137
+ /** Unknown source. */
138
+ PATTERN_SOURCE_UNSPECIFIED = "PATTERN_SOURCE_UNSPECIFIED",
139
+ /** The site has a pattern of its own for the page type, returned in `pattern`. */
140
+ PATTERN_SOURCE_USER = "PATTERN_SOURCE_USER",
141
+ /**
142
+ * The site has no pattern of its own for the page type, so the Wix default in
143
+ * `defaultPattern` applies.
144
+ */
145
+ PATTERN_SOURCE_DEFAULT = "PATTERN_SOURCE_DEFAULT"
146
+ }
147
+ /** @enumType */
148
+ type PatternSourceWithLiterals = PatternSource | 'PATTERN_SOURCE_UNSPECIFIED' | 'PATTERN_SOURCE_USER' | 'PATTERN_SOURCE_DEFAULT';
149
+ /**
150
+ * What made a change to a site's SEO tags or patterns. Derived from the caller, not from
151
+ * the request.
152
+ */
153
+ declare enum Origin {
154
+ /**
155
+ * Unknown origin. Returned by read methods, because origin isn't stored alongside the
156
+ * data it describes.
157
+ */
158
+ ORIGIN_UNSPECIFIED = "ORIGIN_UNSPECIFIED",
159
+ /** A user, working in the dashboard or editor, or calling the API on their own behalf. */
160
+ ORIGIN_USER = "ORIGIN_USER",
161
+ /** The flow that imports an existing site into Wix. */
162
+ ORIGIN_MIGRATION = "ORIGIN_MIGRATION",
163
+ /** An AI agent or an automated suggestion flow. */
164
+ ORIGIN_AI = "ORIGIN_AI"
165
+ }
166
+ /** @enumType */
167
+ type OriginWithLiterals = Origin | 'ORIGIN_UNSPECIFIED' | 'ORIGIN_USER' | 'ORIGIN_MIGRATION' | 'ORIGIN_AI';
168
+ interface GetSeoPatternRequest {
169
+ /**
170
+ * Page type whose pattern to retrieve. For example, `STATIC_PAGE`, `BLOG_POST`, or
171
+ * `STORES_PRODUCT`.
172
+ * @maxLength 100
173
+ */
174
+ pageType: string;
175
+ /**
176
+ * ID of a single page built from a Wix Data collection, to retrieve the pattern of that
177
+ * page alone.
178
+ *
179
+ * Supported only for the `WIX_DATA_PAGE_ITEM` page type. Every other page type has one
180
+ * pattern for the type, and passing a page ID for one of those fails with
181
+ * `PAGE_ID_NOT_SUPPORTED`.
182
+ * @maxLength 200
183
+ */
184
+ pageId?: string | null;
185
+ /**
186
+ * Not supported yet. Passing a value fails with `COLLECTION_NAME_NOT_SUPPORTED`.
187
+ *
188
+ * To address a single page built from a Wix Data collection, pass its `pageId`.
189
+ * @maxLength 200
190
+ */
191
+ collectionName?: string | null;
192
+ }
193
+ interface GetSeoPatternResponse {
194
+ /**
195
+ * The page type's pattern: the site's own pattern, the Wix default, and which of the
196
+ * two is in effect.
197
+ */
198
+ seoPattern?: SeoPattern;
199
+ }
200
+ interface ListSeoPatternsRequest {
201
+ }
202
+ interface ListSeoPatternsResponse {
203
+ /**
204
+ * The patterns stored for the site, one per page type.
205
+ *
206
+ * A page type that has never had a pattern stored isn't included. A page type that was
207
+ * reset to its Wix default is included, with an empty `pattern`.
208
+ * @maxSize 200
209
+ */
210
+ seoPatterns?: SeoPattern[];
211
+ }
212
+ interface ListSeoPatternVariablesRequest {
213
+ /**
214
+ * Page type whose variables to retrieve. For example, `STATIC_PAGE`, `BLOG_POST`, or
215
+ * `STORES_PRODUCT`.
216
+ * @maxLength 100
217
+ */
218
+ pageType: string;
219
+ }
220
+ interface ListSeoPatternVariablesResponse {
221
+ /**
222
+ * Variables a pattern for this page type may use in its tags. For example,
223
+ * `{{product.name}}` in a title template.
224
+ * @maxSize 500
225
+ */
226
+ variables?: SeoPatternVariable[];
227
+ /**
228
+ * Variables a pattern for this page type may use in its structured data tags.
229
+ *
230
+ * A pattern may use these as well as the variables in `variables`.
231
+ * @maxSize 500
232
+ */
233
+ structuredDataVariables?: SeoPatternVariable[];
234
+ }
235
+ /**
236
+ * A variable a pattern may reference, which is replaced with an item's own value when its
237
+ * page renders.
238
+ */
239
+ interface SeoPatternVariable {
240
+ /**
241
+ * Name of the variable, without the surrounding braces. For example, `product.name`,
242
+ * which a pattern references as `{{product.name}}`.
243
+ * @maxLength 200
244
+ */
245
+ key?: string;
246
+ /**
247
+ * Whether Wix offers this variable to site owners editing the pattern in the dashboard.
248
+ *
249
+ * `false` doesn't prevent a pattern from using the variable. It marks a variable Wix
250
+ * keeps out of the dashboard's list, typically because it's only meaningful in specific
251
+ * cases.
252
+ */
253
+ userVisible?: boolean;
254
+ }
255
+ interface CreateSeoPatternRequest {
256
+ /**
257
+ * Page type whose pattern to create a pattern for. For example, `STATIC_PAGE`, `BLOG_POST`, or
258
+ * `STORES_PRODUCT`.
259
+ * @maxLength 100
260
+ */
261
+ pageType: string;
262
+ /**
263
+ * Pattern to create for the page type.
264
+ *
265
+ * `pattern` is the only field to send. The page type comes from the request path, and
266
+ * every other field is read-only. To create a pattern for a single page built from a
267
+ * Wix Data collection, set `pageId`.
268
+ */
269
+ seoPattern: SeoPattern;
270
+ }
271
+ interface CreateSeoPatternResponse {
272
+ /**
273
+ * The created pattern, with `source` reporting that the site's own pattern is now in
274
+ * effect.
275
+ */
276
+ seoPattern?: SeoPattern;
277
+ }
278
+ interface SetSeoPatternRequest {
279
+ /**
280
+ * Page type whose pattern to change. For example, `STATIC_PAGE`, `BLOG_POST`, or
281
+ * `STORES_PRODUCT`.
282
+ * @maxLength 100
283
+ */
284
+ pageType: string;
285
+ /**
286
+ * Pattern to set for the page type.
287
+ *
288
+ * `pattern` is the only writable field, and setting it replaces the page type's tag
289
+ * templates in full. Sending an empty pattern clears it, which returns the page type to
290
+ * its Wix default.
291
+ */
292
+ seoPattern: SeoPattern;
293
+ /**
294
+ * Fields to update.
295
+ *
296
+ * Required, and must name only writable fields. An empty field mask, an unknown field,
297
+ * or a read-only field fails with `INVALID_FIELD_MASK`.
298
+ */
299
+ fieldMask: string[];
300
+ /**
301
+ * Not supported yet. Passing a value fails with `COLLECTION_NAME_NOT_SUPPORTED`.
302
+ *
303
+ * To address a single page built from a Wix Data collection, pass its `pageId`.
304
+ * @maxLength 200
305
+ */
306
+ collectionName?: string | null;
307
+ /**
308
+ * ID of a single page built from a Wix Data collection, to change the pattern of that
309
+ * page alone.
310
+ *
311
+ * Supported only for the `WIX_DATA_PAGE_ITEM` page type. Every other page type has one
312
+ * pattern for the type, and passing a page ID for one of those fails with
313
+ * `PAGE_ID_NOT_SUPPORTED`.
314
+ * @maxLength 200
315
+ */
316
+ pageId?: string | null;
317
+ }
318
+ interface SetSeoPatternResponse {
319
+ /** The updated pattern. */
320
+ seoPattern?: SeoPattern;
321
+ }
322
+ interface ResetSeoPatternToDefaultRequest {
323
+ /**
324
+ * Page type whose pattern to reset. For example, `STATIC_PAGE`, `BLOG_POST`, or
325
+ * `STORES_PRODUCT`.
326
+ * @maxLength 100
327
+ */
328
+ pageType: string;
329
+ /**
330
+ * Not supported yet. Passing a value fails with `COLLECTION_NAME_NOT_SUPPORTED`.
331
+ *
332
+ * To address a single page built from a Wix Data collection, pass its `pageId`.
333
+ * @maxLength 200
334
+ */
335
+ collectionName?: string | null;
336
+ /**
337
+ * ID of a single page built from a Wix Data collection, to reset the pattern of that
338
+ * page alone.
339
+ *
340
+ * Supported only for the `WIX_DATA_PAGE_ITEM` page type. Every other page type has one
341
+ * pattern for the type, and passing a page ID for one of those fails with
342
+ * `PAGE_ID_NOT_SUPPORTED`.
343
+ * @maxLength 200
344
+ */
345
+ pageId?: string | null;
346
+ }
347
+ interface ResetSeoPatternToDefaultResponse {
348
+ /**
349
+ * The page type after the reset: an empty `pattern`, and `source` of
350
+ * `PATTERN_SOURCE_DEFAULT`.
351
+ */
352
+ seoPattern?: SeoPattern;
353
+ }
354
+ interface DomainEvent extends DomainEventBodyOneOf {
355
+ createdEvent?: EntityCreatedEvent;
356
+ updatedEvent?: EntityUpdatedEvent;
357
+ deletedEvent?: EntityDeletedEvent;
358
+ actionEvent?: ActionEvent;
359
+ /** Event ID. With this ID you can easily spot duplicated events and ignore them. */
360
+ _id?: string;
361
+ /**
362
+ * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.
363
+ * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.
364
+ */
365
+ entityFqdn?: string;
366
+ /**
367
+ * Event action name, placed at the top level to make it easier for users to dispatch messages.
368
+ * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.
369
+ */
370
+ slug?: string;
371
+ /** ID of the entity associated with the event. */
372
+ entityId?: string;
373
+ /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */
374
+ eventTime?: Date | null;
375
+ /**
376
+ * Whether the event was triggered as a result of a privacy regulation application
377
+ * (for example, GDPR).
378
+ */
379
+ triggeredByAnonymizeRequest?: boolean | null;
380
+ /** If present, indicates the action that triggered the event. */
381
+ originatedFrom?: string | null;
382
+ /**
383
+ * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at `16:00` and then again at `16:01`, the second update will always have a higher sequence number.
384
+ * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.
385
+ */
386
+ entityEventSequence?: string | null;
387
+ }
388
+ /** @oneof */
389
+ interface DomainEventBodyOneOf {
390
+ createdEvent?: EntityCreatedEvent;
391
+ updatedEvent?: EntityUpdatedEvent;
392
+ deletedEvent?: EntityDeletedEvent;
393
+ actionEvent?: ActionEvent;
394
+ }
395
+ interface EntityCreatedEvent {
396
+ entity?: string;
397
+ }
398
+ interface RestoreInfo {
399
+ deletedDate?: Date | null;
400
+ }
401
+ interface EntityUpdatedEvent {
402
+ /**
403
+ * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
404
+ * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
405
+ * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
406
+ */
407
+ currentEntity?: string;
408
+ }
409
+ interface EntityDeletedEvent {
410
+ /** Entity that was deleted. */
411
+ deletedEntity?: string | null;
412
+ }
413
+ interface ActionEvent {
414
+ body?: string;
415
+ }
416
+ interface MessageEnvelope {
417
+ /**
418
+ * App instance ID.
419
+ * @format GUID
420
+ */
421
+ instanceId?: string | null;
422
+ /**
423
+ * Event type.
424
+ * @maxLength 150
425
+ */
426
+ eventType?: string;
427
+ /** The identification type and identity data. */
428
+ identity?: IdentificationData;
429
+ /** Stringify payload. */
430
+ data?: string;
431
+ /** Details related to the account */
432
+ accountInfo?: AccountInfo;
433
+ }
434
+ interface IdentificationData extends IdentificationDataIdOneOf {
435
+ /**
436
+ * ID of a site visitor that has not logged in to the site.
437
+ * @format GUID
438
+ */
439
+ anonymousVisitorId?: string;
440
+ /**
441
+ * ID of a site visitor that has logged in to the site.
442
+ * @format GUID
443
+ */
444
+ memberId?: string;
445
+ /**
446
+ * ID of a Wix user (site owner, contributor, etc.).
447
+ * @format GUID
448
+ */
449
+ wixUserId?: string;
450
+ /**
451
+ * ID of an app.
452
+ * @format GUID
453
+ */
454
+ appId?: string;
455
+ /** @readonly */
456
+ identityType?: WebhookIdentityTypeWithLiterals;
457
+ }
458
+ /** @oneof */
459
+ interface IdentificationDataIdOneOf {
460
+ /**
461
+ * ID of a site visitor that has not logged in to the site.
462
+ * @format GUID
463
+ */
464
+ anonymousVisitorId?: string;
465
+ /**
466
+ * ID of a site visitor that has logged in to the site.
467
+ * @format GUID
468
+ */
469
+ memberId?: string;
470
+ /**
471
+ * ID of a Wix user (site owner, contributor, etc.).
472
+ * @format GUID
473
+ */
474
+ wixUserId?: string;
475
+ /**
476
+ * ID of an app.
477
+ * @format GUID
478
+ */
479
+ appId?: string;
480
+ }
481
+ declare enum WebhookIdentityType {
482
+ UNKNOWN = "UNKNOWN",
483
+ ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
484
+ MEMBER = "MEMBER",
485
+ WIX_USER = "WIX_USER",
486
+ APP = "APP"
487
+ }
488
+ /** @enumType */
489
+ type WebhookIdentityTypeWithLiterals = WebhookIdentityType | 'UNKNOWN' | 'ANONYMOUS_VISITOR' | 'MEMBER' | 'WIX_USER' | 'APP';
490
+ interface AccountInfo {
491
+ /**
492
+ * ID of the Wix account associated with the event.
493
+ * @format GUID
494
+ */
495
+ accountId?: string | null;
496
+ /**
497
+ * ID of the parent Wix account. Only included when accountId belongs to a child account.
498
+ * @format GUID
499
+ */
500
+ parentAccountId?: string | null;
501
+ /**
502
+ * ID of the Wix site associated with the event. Only included when the event is tied to a specific site.
503
+ * @format GUID
504
+ */
505
+ siteId?: string | null;
506
+ }
507
+ /** @docsIgnore */
508
+ type GetSeoPatternApplicationErrors = {
509
+ code?: 'UNSUPPORTED_PAGE_TYPE';
510
+ description?: string;
511
+ data?: Record<string, any>;
512
+ };
513
+ /** @docsIgnore */
514
+ type ListSeoPatternVariablesApplicationErrors = {
515
+ code?: 'UNSUPPORTED_PAGE_TYPE';
516
+ description?: string;
517
+ data?: Record<string, any>;
518
+ };
519
+ /** @docsIgnore */
520
+ type CreateSeoPatternApplicationErrors = {
521
+ code?: 'UNSUPPORTED_PAGE_TYPE';
522
+ description?: string;
523
+ data?: Record<string, any>;
524
+ } | {
525
+ code?: 'INVALID_PATTERN';
526
+ description?: string;
527
+ data?: Record<string, any>;
528
+ } | {
529
+ code?: 'PATTERN_ALREADY_EXISTS';
530
+ description?: string;
531
+ data?: Record<string, any>;
532
+ };
533
+ /** @docsIgnore */
534
+ type SetSeoPatternApplicationErrors = {
535
+ code?: 'UNSUPPORTED_PAGE_TYPE';
536
+ description?: string;
537
+ data?: Record<string, any>;
538
+ } | {
539
+ code?: 'INVALID_PATTERN';
540
+ description?: string;
541
+ data?: Record<string, any>;
542
+ } | {
543
+ code?: 'INVALID_FIELD_MASK';
544
+ description?: string;
545
+ data?: Record<string, any>;
546
+ } | {
547
+ code?: 'PATTERN_NOT_FOUND';
548
+ description?: string;
549
+ data?: Record<string, any>;
550
+ };
551
+ /** @docsIgnore */
552
+ type ResetSeoPatternToDefaultApplicationErrors = {
553
+ code?: 'UNSUPPORTED_PAGE_TYPE';
554
+ description?: string;
555
+ data?: Record<string, any>;
556
+ } | {
557
+ code?: 'PATTERN_NOT_FOUND';
558
+ description?: string;
559
+ data?: Record<string, any>;
560
+ };
561
+ /**
562
+ * Retrieves the SEO pattern in effect for a page type.
563
+ *
564
+ * The response contains both the site's own pattern, which is empty when the site has
565
+ * none, and the Wix default, with `source` reporting which of the two is in effect. A
566
+ * page type with no pattern of its own isn't an error.
567
+ *
568
+ * Fails with `PAGE_TYPE_NOT_ON_SITE` if the page type comes from a Wix app that isn't
569
+ * installed on the site.
570
+ * @param pageType - Page type whose pattern to retrieve. For example, `STATIC_PAGE`, `BLOG_POST`, or
571
+ * `STORES_PRODUCT`.
572
+ * @public
573
+ * @documentationMaturity preview
574
+ * @requiredField pageType
575
+ * @permissionId wix-seo.read
576
+ * @applicableIdentity APP
577
+ * @applicableIdentity MEMBER
578
+ * @fqn wix.promote.seo.metatags.v1.PageTypeSeoPatternsService.GetSeoPattern
579
+ */
580
+ declare function getSeoPattern(pageType: string, options?: GetSeoPatternOptions): Promise<NonNullablePaths<GetSeoPatternResponse, `seoPattern.pageType` | `seoPattern.pattern.tags` | `seoPattern.pattern.tags.${number}.type` | `seoPattern.pattern.tags.${number}.children` | `seoPattern.pattern.tags.${number}.custom` | `seoPattern.pattern.tags.${number}.disabled` | `seoPattern.source` | `seoPattern.origin`, 6> & {
581
+ __applicationErrorsType?: GetSeoPatternApplicationErrors;
582
+ }>;
583
+ interface GetSeoPatternOptions {
584
+ /**
585
+ * ID of a single page built from a Wix Data collection, to retrieve the pattern of that
586
+ * page alone.
587
+ *
588
+ * Supported only for the `WIX_DATA_PAGE_ITEM` page type. Every other page type has one
589
+ * pattern for the type, and passing a page ID for one of those fails with
590
+ * `PAGE_ID_NOT_SUPPORTED`.
591
+ * @maxLength 200
592
+ */
593
+ pageId?: string | null;
594
+ /**
595
+ * Not supported yet. Passing a value fails with `COLLECTION_NAME_NOT_SUPPORTED`.
596
+ *
597
+ * To address a single page built from a Wix Data collection, pass its `pageId`.
598
+ * @maxLength 200
599
+ */
600
+ collectionName?: string | null;
601
+ }
602
+ /**
603
+ * Retrieves the patterns stored for a site, one per page type.
604
+ *
605
+ * Only page types that have had a pattern stored are returned, so this isn't an
606
+ * inventory of a site's page types: a page type still on its Wix default is absent.
607
+ * A page type that was reset to its default remains in the list, with an empty
608
+ * `pattern` and `source` of `PATTERN_SOURCE_DEFAULT`.
609
+ *
610
+ * The response isn't paged. A site has a bounded number of page types, and all of them
611
+ * are returned in one call.
612
+ * @public
613
+ * @documentationMaturity preview
614
+ * @permissionId wix-seo.read
615
+ * @applicableIdentity APP
616
+ * @applicableIdentity MEMBER
617
+ * @fqn wix.promote.seo.metatags.v1.PageTypeSeoPatternsService.ListSeoPatterns
618
+ */
619
+ declare function listSeoPatterns(): Promise<NonNullablePaths<ListSeoPatternsResponse, `seoPatterns` | `seoPatterns.${number}.pageType` | `seoPatterns.${number}.source` | `seoPatterns.${number}.origin`, 4>>;
620
+ /**
621
+ * Retrieves the variables a pattern for a page type may reference.
622
+ *
623
+ * A pattern may reference only the variables its page type offers, so call this method
624
+ * before writing a pattern. A pattern referencing any other variable is rejected with
625
+ * `INVALID_PATTERN`.
626
+ *
627
+ * Variables for the page's own tags and variables for its structured data are returned
628
+ * in separate fields, and a pattern may use either.
629
+ *
630
+ * Fails with `PAGE_TYPE_NOT_ON_SITE` if the page type comes from a Wix app that isn't
631
+ * installed on the site.
632
+ * @param pageType - Page type whose variables to retrieve. For example, `STATIC_PAGE`, `BLOG_POST`, or
633
+ * `STORES_PRODUCT`.
634
+ * @public
635
+ * @documentationMaturity preview
636
+ * @requiredField pageType
637
+ * @permissionId wix-seo.read
638
+ * @applicableIdentity APP
639
+ * @applicableIdentity MEMBER
640
+ * @fqn wix.promote.seo.metatags.v1.PageTypeSeoPatternsService.ListSeoPatternVariables
641
+ */
642
+ declare function listSeoPatternVariables(pageType: string): Promise<NonNullablePaths<ListSeoPatternVariablesResponse, `variables` | `variables.${number}.key` | `variables.${number}.userVisible` | `structuredDataVariables` | `structuredDataVariables.${number}.key` | `structuredDataVariables.${number}.userVisible`, 4> & {
643
+ __applicationErrorsType?: ListSeoPatternVariablesApplicationErrors;
644
+ }>;
645
+ /**
646
+ * Creates a pattern for a page type that's still on its Wix default.
647
+ *
648
+ * The pattern must contain at least one tag. An empty pattern is stored and read back
649
+ * as no pattern at all, so it's rejected rather than saved as a pattern that does
650
+ * nothing. To leave a page type on its Wix default, create nothing for it.
651
+ *
652
+ * To change a pattern that already exists, call Set SEO Pattern. Creating a second
653
+ * pattern for the same page type fails with `PATTERN_ALREADY_EXISTS`.
654
+ *
655
+ * Fails with `PAGE_TYPE_NOT_ON_SITE` if the page type comes from a Wix app that isn't
656
+ * installed on the site.
657
+ * @param pageType - Page type whose pattern to create a pattern for. For example, `STATIC_PAGE`, `BLOG_POST`, or
658
+ * `STORES_PRODUCT`.
659
+ * @param seoPattern - Pattern to create for the page type.
660
+ *
661
+ * `pattern` is the only field to send. The page type comes from the request path, and
662
+ * every other field is read-only. To create a pattern for a single page built from a
663
+ * Wix Data collection, set `pageId`.
664
+ * @public
665
+ * @documentationMaturity preview
666
+ * @requiredField pageType
667
+ * @requiredField seoPattern
668
+ * @permissionId wix-seo.edit
669
+ * @applicableIdentity APP
670
+ * @returns The created pattern, with `source` reporting that the site's own pattern is now in
671
+ * effect.
672
+ * @fqn wix.promote.seo.metatags.v1.PageTypeSeoPatternsService.CreateSeoPattern
673
+ */
674
+ declare function createSeoPattern(pageType: string, seoPattern: SeoPattern): Promise<NonNullablePaths<SeoPattern, `pageType` | `pattern.tags` | `pattern.tags.${number}.type` | `pattern.tags.${number}.children` | `pattern.tags.${number}.custom` | `pattern.tags.${number}.disabled` | `source` | `origin`, 5> & {
675
+ __applicationErrorsType?: CreateSeoPatternApplicationErrors;
676
+ }>;
677
+ /**
678
+ * Changes the pattern a site has for a page type.
679
+ *
680
+ * Setting `pattern` replaces the page type's tag templates in full, so retrieve the
681
+ * pattern first and send back the complete set you want it to have. Sending an empty
682
+ * pattern clears it, which returns the page type to its Wix default.
683
+ *
684
+ * This method changes a pattern that already exists rather than creating one, so a page
685
+ * type still on its Wix default fails with `PATTERN_NOT_FOUND`. Call Create SEO Pattern
686
+ * for it instead.
687
+ *
688
+ * A pattern has no revision, and the site's SEO settings in the dashboard write to the
689
+ * same pattern. The last write wins, so retrieve the pattern immediately before writing
690
+ * it.
691
+ * @param pageType - Page type whose pattern to change. For example, `STATIC_PAGE`, `BLOG_POST`, or
692
+ * `STORES_PRODUCT`.
693
+ * @param seoPattern - Pattern to set for the page type.
694
+ *
695
+ * `pattern` is the only writable field, and setting it replaces the page type's tag
696
+ * templates in full. Sending an empty pattern clears it, which returns the page type to
697
+ * its Wix default.
698
+ * @public
699
+ * @documentationMaturity preview
700
+ * @requiredField options.fieldMask
701
+ * @requiredField pageType
702
+ * @requiredField seoPattern
703
+ * @permissionId wix-seo.edit
704
+ * @applicableIdentity APP
705
+ * @fqn wix.promote.seo.metatags.v1.PageTypeSeoPatternsService.SetSeoPattern
706
+ */
707
+ declare function setSeoPattern(pageType: string, seoPattern: SeoPattern, options?: NonNullablePaths<SetSeoPatternOptions, `fieldMask`, 2>): Promise<NonNullablePaths<SetSeoPatternResponse, `seoPattern.pageType` | `seoPattern.pattern.tags` | `seoPattern.pattern.tags.${number}.type` | `seoPattern.pattern.tags.${number}.children` | `seoPattern.pattern.tags.${number}.custom` | `seoPattern.pattern.tags.${number}.disabled` | `seoPattern.source` | `seoPattern.origin`, 6> & {
708
+ __applicationErrorsType?: SetSeoPatternApplicationErrors;
709
+ }>;
710
+ interface SetSeoPatternOptions {
711
+ /**
712
+ * Fields to update.
713
+ *
714
+ * Required, and must name only writable fields. An empty field mask, an unknown field,
715
+ * or a read-only field fails with `INVALID_FIELD_MASK`.
716
+ */
717
+ fieldMask: string[];
718
+ /**
719
+ * Not supported yet. Passing a value fails with `COLLECTION_NAME_NOT_SUPPORTED`.
720
+ *
721
+ * To address a single page built from a Wix Data collection, pass its `pageId`.
722
+ * @maxLength 200
723
+ */
724
+ collectionName?: string | null;
725
+ /**
726
+ * ID of a single page built from a Wix Data collection, to change the pattern of that
727
+ * page alone.
728
+ *
729
+ * Supported only for the `WIX_DATA_PAGE_ITEM` page type. Every other page type has one
730
+ * pattern for the type, and passing a page ID for one of those fails with
731
+ * `PAGE_ID_NOT_SUPPORTED`.
732
+ * @maxLength 200
733
+ */
734
+ pageId?: string | null;
735
+ }
736
+ /**
737
+ * Removes the pattern a site has for a page type, so the Wix default applies again.
738
+ *
739
+ * The response reports the page type after the reset, with an empty `pattern` and
740
+ * `source` of `PATTERN_SOURCE_DEFAULT`. The page type remains in the response of List
741
+ * SEO Patterns, with the same empty pattern.
742
+ *
743
+ * Fails with `PATTERN_NOT_FOUND` if the page type is already on its Wix default, so
744
+ * there's nothing to reset.
745
+ * @param pageType - Page type whose pattern to reset. For example, `STATIC_PAGE`, `BLOG_POST`, or
746
+ * `STORES_PRODUCT`.
747
+ * @public
748
+ * @documentationMaturity preview
749
+ * @requiredField pageType
750
+ * @permissionId wix-seo.edit
751
+ * @applicableIdentity APP
752
+ * @fqn wix.promote.seo.metatags.v1.PageTypeSeoPatternsService.ResetSeoPatternToDefault
753
+ */
754
+ declare function resetSeoPatternToDefault(pageType: string, options?: ResetSeoPatternToDefaultOptions): Promise<NonNullablePaths<ResetSeoPatternToDefaultResponse, `seoPattern.pageType` | `seoPattern.pattern.tags` | `seoPattern.pattern.tags.${number}.type` | `seoPattern.pattern.tags.${number}.children` | `seoPattern.pattern.tags.${number}.custom` | `seoPattern.pattern.tags.${number}.disabled` | `seoPattern.source` | `seoPattern.origin`, 6> & {
755
+ __applicationErrorsType?: ResetSeoPatternToDefaultApplicationErrors;
756
+ }>;
757
+ interface ResetSeoPatternToDefaultOptions {
758
+ /**
759
+ * Not supported yet. Passing a value fails with `COLLECTION_NAME_NOT_SUPPORTED`.
760
+ *
761
+ * To address a single page built from a Wix Data collection, pass its `pageId`.
762
+ * @maxLength 200
763
+ */
764
+ collectionName?: string | null;
765
+ /**
766
+ * ID of a single page built from a Wix Data collection, to reset the pattern of that
767
+ * page alone.
768
+ *
769
+ * Supported only for the `WIX_DATA_PAGE_ITEM` page type. Every other page type has one
770
+ * pattern for the type, and passing a page ID for one of those fails with
771
+ * `PAGE_ID_NOT_SUPPORTED`.
772
+ * @maxLength 200
773
+ */
774
+ pageId?: string | null;
775
+ }
776
+
777
+ export { type AccountInfo, type ActionEvent, type CreateSeoPatternApplicationErrors, type CreateSeoPatternRequest, type CreateSeoPatternResponse, type DomainEvent, type DomainEventBodyOneOf, type EntityCreatedEvent, type EntityDeletedEvent, type EntityUpdatedEvent, type GetSeoPatternApplicationErrors, type GetSeoPatternOptions, type GetSeoPatternRequest, type GetSeoPatternResponse, type IdentificationData, type IdentificationDataIdOneOf, type ListSeoPatternVariablesApplicationErrors, type ListSeoPatternVariablesRequest, type ListSeoPatternVariablesResponse, type ListSeoPatternsRequest, type ListSeoPatternsResponse, type MessageEnvelope, Origin, type OriginWithLiterals, PatternSource, type PatternSourceWithLiterals, type ResetSeoPatternToDefaultApplicationErrors, type ResetSeoPatternToDefaultOptions, type ResetSeoPatternToDefaultRequest, type ResetSeoPatternToDefaultResponse, type RestoreInfo, type SeoPattern, type SeoPatternBlob, type SeoPatternVariable, type SetSeoPatternApplicationErrors, type SetSeoPatternOptions, type SetSeoPatternRequest, type SetSeoPatternResponse, type Tag, WebhookIdentityType, type WebhookIdentityTypeWithLiterals, createSeoPattern, getSeoPattern, listSeoPatternVariables, listSeoPatterns, resetSeoPatternToDefault, setSeoPattern };