@wix/auto_sdk_seo_seo-patterns 1.0.0 → 1.0.2
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/cjs/index.d.ts +18 -36
- package/build/cjs/index.js +3 -15
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +98 -128
- package/build/cjs/index.typings.js +3 -15
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +76 -60
- package/build/cjs/meta.js.map +1 -1
- package/build/cjs/schemas.d.ts +0 -3
- package/build/cjs/schemas.js +54 -65
- package/build/cjs/schemas.js.map +1 -1
- package/build/es/index.d.mts +18 -36
- package/build/es/index.mjs +3 -15
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +98 -128
- package/build/es/index.typings.mjs +3 -15
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +76 -60
- package/build/es/meta.mjs.map +1 -1
- package/build/es/schemas.d.mts +0 -3
- package/build/es/schemas.mjs +54 -65
- package/build/es/schemas.mjs.map +1 -1
- package/build/internal/cjs/index.d.ts +18 -36
- package/build/internal/cjs/index.js +3 -15
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.d.ts +107 -113
- package/build/internal/cjs/index.typings.js +3 -15
- package/build/internal/cjs/index.typings.js.map +1 -1
- package/build/internal/cjs/meta.d.ts +85 -45
- package/build/internal/cjs/meta.js.map +1 -1
- package/build/internal/cjs/schemas.d.ts +0 -3
- package/build/internal/cjs/schemas.js +54 -65
- package/build/internal/cjs/schemas.js.map +1 -1
- package/build/internal/es/index.d.mts +18 -36
- package/build/internal/es/index.mjs +3 -15
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/index.typings.d.mts +107 -113
- package/build/internal/es/index.typings.mjs +3 -15
- package/build/internal/es/index.typings.mjs.map +1 -1
- package/build/internal/es/meta.d.mts +85 -45
- package/build/internal/es/meta.mjs.map +1 -1
- package/build/internal/es/schemas.d.mts +0 -3
- package/build/internal/es/schemas.mjs +54 -65
- package/build/internal/es/schemas.mjs.map +1 -1
- package/package.json +2 -2
|
@@ -4,7 +4,7 @@ import { NonNullablePaths } from '@wix/sdk-types';
|
|
|
4
4
|
* An SEO pattern is a template of SEO tags defined for one page type, such as every blog
|
|
5
5
|
* post or every store product. A pattern's tags may contain variables, written as
|
|
6
6
|
* `{{variable}}`, that are filled in with each item's own values when its page renders,
|
|
7
|
-
* so a
|
|
7
|
+
* so a Wix user sets the tags for a whole page type once instead of item by item.
|
|
8
8
|
*
|
|
9
9
|
* Every page type always has a pattern in effect. When a site has no pattern of its own
|
|
10
10
|
* for a page type, the built-in Wix default applies, and `source` reports which of the
|
|
@@ -26,14 +26,6 @@ interface SeoPattern {
|
|
|
26
26
|
/**
|
|
27
27
|
* Page type the pattern applies to. For example, `STATIC_PAGE`, `BLOG_POST`, or
|
|
28
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
29
|
* @maxLength 100
|
|
38
30
|
* @readonly
|
|
39
31
|
*/
|
|
@@ -42,9 +34,7 @@ interface SeoPattern {
|
|
|
42
34
|
* ID of a single page built from a Wix Data collection, when the pattern applies to
|
|
43
35
|
* that page alone rather than to the whole page type.
|
|
44
36
|
*
|
|
45
|
-
* Supported only for the `WIX_DATA_PAGE_ITEM` page type.
|
|
46
|
-
* pattern for the type, and passing a page ID for one of those fails with
|
|
47
|
-
* `PAGE_ID_NOT_SUPPORTED`.
|
|
37
|
+
* Supported only for the `WIX_DATA_PAGE_ITEM` page type.
|
|
48
38
|
* @maxLength 200
|
|
49
39
|
*/
|
|
50
40
|
pageId?: string | null;
|
|
@@ -53,16 +43,14 @@ interface SeoPattern {
|
|
|
53
43
|
* default.
|
|
54
44
|
*
|
|
55
45
|
* Empty when the site has no pattern of its own, in which case `defaultPattern`
|
|
56
|
-
* applies.
|
|
57
|
-
* tag templates you want the page type to have.
|
|
46
|
+
* applies.
|
|
58
47
|
*/
|
|
59
48
|
pattern?: SeoPatternBlob;
|
|
60
49
|
/**
|
|
61
50
|
* The pattern Wix provides for the page type, which applies whenever the site has no
|
|
62
51
|
* pattern of its own.
|
|
63
52
|
*
|
|
64
|
-
* Always returned, so you can
|
|
65
|
-
* from, and see what a reset would restore.
|
|
53
|
+
* Always returned, so you can see what a reset would restore.
|
|
66
54
|
* @readonly
|
|
67
55
|
*/
|
|
68
56
|
defaultPattern?: SeoPatternBlob;
|
|
@@ -81,12 +69,13 @@ interface SeoPattern {
|
|
|
81
69
|
*/
|
|
82
70
|
language?: string | null;
|
|
83
71
|
/**
|
|
84
|
-
* What made the most recent change to the pattern, for example a user or the site
|
|
72
|
+
* What made the most recent change to the pattern, for example a Wix user or the site
|
|
85
73
|
* migration flow. Derived from the caller, not from the request.
|
|
86
74
|
*
|
|
87
|
-
*
|
|
88
|
-
*
|
|
89
|
-
*
|
|
75
|
+
* Reported only on the response to a write, and on the event the write emits. It isn't
|
|
76
|
+
* stored with the pattern, so Get SEO Pattern and List SEO Patterns always report
|
|
77
|
+
* `ORIGIN_UNSPECIFIED`, as does a write by a caller Wix doesn't identify as a specific
|
|
78
|
+
* origin.
|
|
90
79
|
* @readonly
|
|
91
80
|
*/
|
|
92
81
|
origin?: OriginWithLiterals;
|
|
@@ -102,10 +91,13 @@ interface SeoPatternBlob {
|
|
|
102
91
|
/**
|
|
103
92
|
* The pattern's SEO tag templates.
|
|
104
93
|
*
|
|
105
|
-
* A tag may reference only the variables the page type offers. Call List SEO Pattern
|
|
106
|
-
* Variables
|
|
94
|
+
* A tag may reference only the variables the page type offers. Call [List SEO Pattern
|
|
95
|
+
* Variables](https://dev.wix.com/docs/api-reference/business-management/seo/seo-pattern-v1/list-seo-pattern-variables)
|
|
96
|
+
* for the page type to retrieve them.
|
|
107
97
|
*
|
|
108
|
-
*
|
|
98
|
+
* A tag whose `disabled` or `custom` value is itself a variable is returned with that
|
|
99
|
+
* value unset, because those fields are booleans. The behavior still applies when the
|
|
100
|
+
* page renders.
|
|
109
101
|
* @maxSize 100
|
|
110
102
|
*/
|
|
111
103
|
tags?: Tag[];
|
|
@@ -127,7 +119,15 @@ interface Tag {
|
|
|
127
119
|
meta?: Record<string, any> | null;
|
|
128
120
|
/** SEO tag inner content. For example, `<title> inner content </title>`. */
|
|
129
121
|
children?: string;
|
|
130
|
-
/**
|
|
122
|
+
/**
|
|
123
|
+
* Whether the tag is a [custom tag](https://support.wix.com/en/article/adding-additional-meta-tags-to-your-sites-pages).
|
|
124
|
+
*
|
|
125
|
+
* Limitation: when `ResolveStaticPageSeoTags` is called without `seoData`, the per-page SEO data is read
|
|
126
|
+
* only from the Vibe/Wix-managed-headless override store. That store holds nothing for classic Wix Editor
|
|
127
|
+
* or Wix Studio pages, so custom tags saved on those pages are missing from the response entirely. For
|
|
128
|
+
* those pages `false` therefore does not mean "not a custom tag" — it means this API could not tell.
|
|
129
|
+
* Pass `seoData` explicitly to resolve against a known set of tags.
|
|
130
|
+
*/
|
|
131
131
|
custom?: boolean;
|
|
132
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
133
|
disabled?: boolean;
|
|
@@ -176,19 +176,10 @@ interface GetSeoPatternRequest {
|
|
|
176
176
|
* ID of a single page built from a Wix Data collection, to retrieve the pattern of that
|
|
177
177
|
* page alone.
|
|
178
178
|
*
|
|
179
|
-
* Supported only for the `WIX_DATA_PAGE_ITEM` page type.
|
|
180
|
-
* pattern for the type, and passing a page ID for one of those fails with
|
|
181
|
-
* `PAGE_ID_NOT_SUPPORTED`.
|
|
179
|
+
* Supported only for the `WIX_DATA_PAGE_ITEM` page type.
|
|
182
180
|
* @maxLength 200
|
|
183
181
|
*/
|
|
184
182
|
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
183
|
}
|
|
193
184
|
interface GetSeoPatternResponse {
|
|
194
185
|
/**
|
|
@@ -221,6 +212,9 @@ interface ListSeoPatternVariablesResponse {
|
|
|
221
212
|
/**
|
|
222
213
|
* Variables a pattern for this page type may use in its tags. For example,
|
|
223
214
|
* `{{product.name}}` in a title template.
|
|
215
|
+
*
|
|
216
|
+
* A variable can appear more than once, with different `userVisible` values, when both
|
|
217
|
+
* the site and the page type offer it. Either entry can be used in a pattern.
|
|
224
218
|
* @maxSize 500
|
|
225
219
|
*/
|
|
226
220
|
variables?: SeoPatternVariable[];
|
|
@@ -244,17 +238,18 @@ interface SeoPatternVariable {
|
|
|
244
238
|
*/
|
|
245
239
|
key?: string;
|
|
246
240
|
/**
|
|
247
|
-
* Whether
|
|
241
|
+
* Whether the variable appears in the list shown to Wix users editing the pattern in the
|
|
242
|
+
* dashboard.
|
|
248
243
|
*
|
|
249
|
-
* `false` doesn't prevent a pattern from using the variable. It marks a variable
|
|
250
|
-
*
|
|
244
|
+
* `false` doesn't prevent a pattern from using the variable. It marks a variable that's
|
|
245
|
+
* kept out of the dashboard's list, typically because it's only meaningful in certain
|
|
251
246
|
* cases.
|
|
252
247
|
*/
|
|
253
248
|
userVisible?: boolean;
|
|
254
249
|
}
|
|
255
250
|
interface CreateSeoPatternRequest {
|
|
256
251
|
/**
|
|
257
|
-
* Page type
|
|
252
|
+
* Page type to create a pattern for. For example, `STATIC_PAGE`, `BLOG_POST`, or
|
|
258
253
|
* `STORES_PRODUCT`.
|
|
259
254
|
* @maxLength 100
|
|
260
255
|
*/
|
|
@@ -293,24 +288,14 @@ interface SetSeoPatternRequest {
|
|
|
293
288
|
/**
|
|
294
289
|
* Fields to update.
|
|
295
290
|
*
|
|
296
|
-
*
|
|
297
|
-
* or a read-only field fails with `INVALID_FIELD_MASK`.
|
|
291
|
+
* Supported properties: `pattern`
|
|
298
292
|
*/
|
|
299
293
|
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
294
|
/**
|
|
308
295
|
* ID of a single page built from a Wix Data collection, to change the pattern of that
|
|
309
296
|
* page alone.
|
|
310
297
|
*
|
|
311
|
-
* Supported only for the `WIX_DATA_PAGE_ITEM` page type.
|
|
312
|
-
* pattern for the type, and passing a page ID for one of those fails with
|
|
313
|
-
* `PAGE_ID_NOT_SUPPORTED`.
|
|
298
|
+
* Supported only for the `WIX_DATA_PAGE_ITEM` page type.
|
|
314
299
|
* @maxLength 200
|
|
315
300
|
*/
|
|
316
301
|
pageId?: string | null;
|
|
@@ -326,20 +311,11 @@ interface ResetSeoPatternToDefaultRequest {
|
|
|
326
311
|
* @maxLength 100
|
|
327
312
|
*/
|
|
328
313
|
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
314
|
/**
|
|
337
315
|
* ID of a single page built from a Wix Data collection, to reset the pattern of that
|
|
338
316
|
* page alone.
|
|
339
317
|
*
|
|
340
|
-
* Supported only for the `WIX_DATA_PAGE_ITEM` page type.
|
|
341
|
-
* pattern for the type, and passing a page ID for one of those fails with
|
|
342
|
-
* `PAGE_ID_NOT_SUPPORTED`.
|
|
318
|
+
* Supported only for the `WIX_DATA_PAGE_ITEM` page type.
|
|
343
319
|
* @maxLength 200
|
|
344
320
|
*/
|
|
345
321
|
pageId?: string | null;
|
|
@@ -509,12 +485,28 @@ type GetSeoPatternApplicationErrors = {
|
|
|
509
485
|
code?: 'UNSUPPORTED_PAGE_TYPE';
|
|
510
486
|
description?: string;
|
|
511
487
|
data?: Record<string, any>;
|
|
488
|
+
} | {
|
|
489
|
+
code?: 'PAGE_TYPE_NOT_ON_SITE';
|
|
490
|
+
description?: string;
|
|
491
|
+
data?: Record<string, any>;
|
|
492
|
+
} | {
|
|
493
|
+
code?: 'PAGE_ID_NOT_SUPPORTED';
|
|
494
|
+
description?: string;
|
|
495
|
+
data?: Record<string, any>;
|
|
496
|
+
} | {
|
|
497
|
+
code?: 'COLLECTION_NAME_NOT_SUPPORTED';
|
|
498
|
+
description?: string;
|
|
499
|
+
data?: Record<string, any>;
|
|
512
500
|
};
|
|
513
501
|
/** @docsIgnore */
|
|
514
502
|
type ListSeoPatternVariablesApplicationErrors = {
|
|
515
503
|
code?: 'UNSUPPORTED_PAGE_TYPE';
|
|
516
504
|
description?: string;
|
|
517
505
|
data?: Record<string, any>;
|
|
506
|
+
} | {
|
|
507
|
+
code?: 'PAGE_TYPE_NOT_ON_SITE';
|
|
508
|
+
description?: string;
|
|
509
|
+
data?: Record<string, any>;
|
|
518
510
|
};
|
|
519
511
|
/** @docsIgnore */
|
|
520
512
|
type CreateSeoPatternApplicationErrors = {
|
|
@@ -529,6 +521,14 @@ type CreateSeoPatternApplicationErrors = {
|
|
|
529
521
|
code?: 'PATTERN_ALREADY_EXISTS';
|
|
530
522
|
description?: string;
|
|
531
523
|
data?: Record<string, any>;
|
|
524
|
+
} | {
|
|
525
|
+
code?: 'PAGE_TYPE_NOT_ON_SITE';
|
|
526
|
+
description?: string;
|
|
527
|
+
data?: Record<string, any>;
|
|
528
|
+
} | {
|
|
529
|
+
code?: 'PAGE_ID_NOT_SUPPORTED';
|
|
530
|
+
description?: string;
|
|
531
|
+
data?: Record<string, any>;
|
|
532
532
|
};
|
|
533
533
|
/** @docsIgnore */
|
|
534
534
|
type SetSeoPatternApplicationErrors = {
|
|
@@ -547,6 +547,14 @@ type SetSeoPatternApplicationErrors = {
|
|
|
547
547
|
code?: 'PATTERN_NOT_FOUND';
|
|
548
548
|
description?: string;
|
|
549
549
|
data?: Record<string, any>;
|
|
550
|
+
} | {
|
|
551
|
+
code?: 'PAGE_ID_NOT_SUPPORTED';
|
|
552
|
+
description?: string;
|
|
553
|
+
data?: Record<string, any>;
|
|
554
|
+
} | {
|
|
555
|
+
code?: 'COLLECTION_NAME_NOT_SUPPORTED';
|
|
556
|
+
description?: string;
|
|
557
|
+
data?: Record<string, any>;
|
|
550
558
|
};
|
|
551
559
|
/** @docsIgnore */
|
|
552
560
|
type ResetSeoPatternToDefaultApplicationErrors = {
|
|
@@ -557,16 +565,21 @@ type ResetSeoPatternToDefaultApplicationErrors = {
|
|
|
557
565
|
code?: 'PATTERN_NOT_FOUND';
|
|
558
566
|
description?: string;
|
|
559
567
|
data?: Record<string, any>;
|
|
568
|
+
} | {
|
|
569
|
+
code?: 'PAGE_ID_NOT_SUPPORTED';
|
|
570
|
+
description?: string;
|
|
571
|
+
data?: Record<string, any>;
|
|
572
|
+
} | {
|
|
573
|
+
code?: 'COLLECTION_NAME_NOT_SUPPORTED';
|
|
574
|
+
description?: string;
|
|
575
|
+
data?: Record<string, any>;
|
|
560
576
|
};
|
|
561
577
|
/**
|
|
562
578
|
* Retrieves the SEO pattern in effect for a page type.
|
|
563
579
|
*
|
|
564
|
-
* The response contains
|
|
565
|
-
*
|
|
566
|
-
*
|
|
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.
|
|
580
|
+
* The response contains the site's own pattern in `pattern`, and the pattern Wix
|
|
581
|
+
* provides in `defaultPattern`. `source` reports which of the two is in effect.
|
|
582
|
+
* `pattern` is empty when the site has no pattern of its own.
|
|
570
583
|
* @param pageType - Page type whose pattern to retrieve. For example, `STATIC_PAGE`, `BLOG_POST`, or
|
|
571
584
|
* `STORES_PRODUCT`.
|
|
572
585
|
* @public
|
|
@@ -585,30 +598,17 @@ interface GetSeoPatternOptions {
|
|
|
585
598
|
* ID of a single page built from a Wix Data collection, to retrieve the pattern of that
|
|
586
599
|
* page alone.
|
|
587
600
|
*
|
|
588
|
-
* Supported only for the `WIX_DATA_PAGE_ITEM` page type.
|
|
589
|
-
* pattern for the type, and passing a page ID for one of those fails with
|
|
590
|
-
* `PAGE_ID_NOT_SUPPORTED`.
|
|
601
|
+
* Supported only for the `WIX_DATA_PAGE_ITEM` page type.
|
|
591
602
|
* @maxLength 200
|
|
592
603
|
*/
|
|
593
604
|
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
605
|
}
|
|
602
606
|
/**
|
|
603
607
|
* Retrieves the patterns stored for a site, one per page type.
|
|
604
608
|
*
|
|
605
|
-
* Only page types that have had a pattern
|
|
606
|
-
*
|
|
607
|
-
*
|
|
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.
|
|
609
|
+
* Only returns page types that have had a pattern of the site's own stored, so a page
|
|
610
|
+
* type that has never had one is absent. A page type that was reset to its default remains in the
|
|
611
|
+
* list, with an empty `pattern` and `source` of `PATTERN_SOURCE_DEFAULT`.
|
|
612
612
|
* @public
|
|
613
613
|
* @documentationMaturity preview
|
|
614
614
|
* @permissionId wix-seo.read
|
|
@@ -620,15 +620,11 @@ declare function listSeoPatterns(): Promise<NonNullablePaths<ListSeoPatternsResp
|
|
|
620
620
|
/**
|
|
621
621
|
* Retrieves the variables a pattern for a page type may reference.
|
|
622
622
|
*
|
|
623
|
-
*
|
|
624
|
-
*
|
|
625
|
-
* `INVALID_PATTERN`.
|
|
623
|
+
* Call this method to retrieve the valid variables for a page type before writing a
|
|
624
|
+
* pattern.
|
|
626
625
|
*
|
|
627
626
|
* Variables for the page's own tags and variables for its structured data are returned
|
|
628
627
|
* 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
628
|
* @param pageType - Page type whose variables to retrieve. For example, `STATIC_PAGE`, `BLOG_POST`, or
|
|
633
629
|
* `STORES_PRODUCT`.
|
|
634
630
|
* @public
|
|
@@ -645,16 +641,12 @@ declare function listSeoPatternVariables(pageType: string): Promise<NonNullableP
|
|
|
645
641
|
/**
|
|
646
642
|
* Creates a pattern for a page type that's still on its Wix default.
|
|
647
643
|
*
|
|
648
|
-
* The pattern must contain at least one tag.
|
|
649
|
-
*
|
|
650
|
-
* nothing. To leave a page type on its Wix default, create nothing for it.
|
|
644
|
+
* The pattern must contain at least one tag. To leave a page type on its Wix default,
|
|
645
|
+
* create nothing for it.
|
|
651
646
|
*
|
|
652
|
-
* To change a pattern that already exists, call Set SEO
|
|
653
|
-
* pattern
|
|
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
|
|
647
|
+
* To change a pattern that already exists, call [Set SEO
|
|
648
|
+
* Pattern](https://dev.wix.com/docs/api-reference/business-management/seo/seo-pattern-v1/set-seo-pattern).
|
|
649
|
+
* @param pageType - Page type to create a pattern for. For example, `STATIC_PAGE`, `BLOG_POST`, or
|
|
658
650
|
* `STORES_PRODUCT`.
|
|
659
651
|
* @param seoPattern - Pattern to create for the page type.
|
|
660
652
|
*
|
|
@@ -681,9 +673,10 @@ declare function createSeoPattern(pageType: string, seoPattern: SeoPattern): Pro
|
|
|
681
673
|
* pattern first and send back the complete set you want it to have. Sending an empty
|
|
682
674
|
* pattern clears it, which returns the page type to its Wix default.
|
|
683
675
|
*
|
|
684
|
-
* This method changes a pattern that already exists rather than creating one
|
|
685
|
-
* type still on its Wix default
|
|
686
|
-
*
|
|
676
|
+
* This method changes a pattern that already exists rather than creating one. For a page
|
|
677
|
+
* type still on its Wix default, call [Create SEO
|
|
678
|
+
* Pattern](https://dev.wix.com/docs/api-reference/business-management/seo/seo-pattern-v1/create-seo-pattern)
|
|
679
|
+
* instead.
|
|
687
680
|
*
|
|
688
681
|
* A pattern has no revision, and the site's SEO settings in the dashboard write to the
|
|
689
682
|
* same pattern. The last write wins, so retrieve the pattern immediately before writing
|
|
@@ -711,24 +704,14 @@ interface SetSeoPatternOptions {
|
|
|
711
704
|
/**
|
|
712
705
|
* Fields to update.
|
|
713
706
|
*
|
|
714
|
-
*
|
|
715
|
-
* or a read-only field fails with `INVALID_FIELD_MASK`.
|
|
707
|
+
* Supported properties: `pattern`
|
|
716
708
|
*/
|
|
717
709
|
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
710
|
/**
|
|
726
711
|
* ID of a single page built from a Wix Data collection, to change the pattern of that
|
|
727
712
|
* page alone.
|
|
728
713
|
*
|
|
729
|
-
* Supported only for the `WIX_DATA_PAGE_ITEM` page type.
|
|
730
|
-
* pattern for the type, and passing a page ID for one of those fails with
|
|
731
|
-
* `PAGE_ID_NOT_SUPPORTED`.
|
|
714
|
+
* Supported only for the `WIX_DATA_PAGE_ITEM` page type.
|
|
732
715
|
* @maxLength 200
|
|
733
716
|
*/
|
|
734
717
|
pageId?: string | null;
|
|
@@ -737,11 +720,7 @@ interface SetSeoPatternOptions {
|
|
|
737
720
|
* Removes the pattern a site has for a page type, so the Wix default applies again.
|
|
738
721
|
*
|
|
739
722
|
* The response reports the page type after the reset, with an empty `pattern` and
|
|
740
|
-
* `source` of `PATTERN_SOURCE_DEFAULT`.
|
|
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.
|
|
723
|
+
* `source` of `PATTERN_SOURCE_DEFAULT`.
|
|
745
724
|
* @param pageType - Page type whose pattern to reset. For example, `STATIC_PAGE`, `BLOG_POST`, or
|
|
746
725
|
* `STORES_PRODUCT`.
|
|
747
726
|
* @public
|
|
@@ -755,20 +734,11 @@ declare function resetSeoPatternToDefault(pageType: string, options?: ResetSeoPa
|
|
|
755
734
|
__applicationErrorsType?: ResetSeoPatternToDefaultApplicationErrors;
|
|
756
735
|
}>;
|
|
757
736
|
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
737
|
/**
|
|
766
738
|
* ID of a single page built from a Wix Data collection, to reset the pattern of that
|
|
767
739
|
* page alone.
|
|
768
740
|
*
|
|
769
|
-
* Supported only for the `WIX_DATA_PAGE_ITEM` page type.
|
|
770
|
-
* pattern for the type, and passing a page ID for one of those fails with
|
|
771
|
-
* `PAGE_ID_NOT_SUPPORTED`.
|
|
741
|
+
* Supported only for the `WIX_DATA_PAGE_ITEM` page type.
|
|
772
742
|
* @maxLength 200
|
|
773
743
|
*/
|
|
774
744
|
pageId?: string | null;
|
|
@@ -218,8 +218,7 @@ async function getSeoPattern2(pageType, options) {
|
|
|
218
218
|
const { httpClient, sideEffects } = arguments[2];
|
|
219
219
|
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
220
220
|
pageType,
|
|
221
|
-
pageId: options?.pageId
|
|
222
|
-
collectionName: options?.collectionName
|
|
221
|
+
pageId: options?.pageId
|
|
223
222
|
});
|
|
224
223
|
const reqOpts = getSeoPattern(payload);
|
|
225
224
|
sideEffects?.onSiteCall?.();
|
|
@@ -232,11 +231,7 @@ async function getSeoPattern2(pageType, options) {
|
|
|
232
231
|
err,
|
|
233
232
|
{
|
|
234
233
|
spreadPathsToArguments: {},
|
|
235
|
-
explicitPathsToArguments: {
|
|
236
|
-
pageType: "$[0]",
|
|
237
|
-
pageId: "$[1].pageId",
|
|
238
|
-
collectionName: "$[1].collectionName"
|
|
239
|
-
},
|
|
234
|
+
explicitPathsToArguments: { pageType: "$[0]", pageId: "$[1].pageId" },
|
|
240
235
|
singleArgumentUnchanged: false
|
|
241
236
|
},
|
|
242
237
|
["pageType", "options"]
|
|
@@ -323,7 +318,6 @@ async function setSeoPattern2(pageType, seoPattern, options) {
|
|
|
323
318
|
pageType,
|
|
324
319
|
seoPattern,
|
|
325
320
|
fieldMask: options?.fieldMask,
|
|
326
|
-
collectionName: options?.collectionName,
|
|
327
321
|
pageId: options?.pageId
|
|
328
322
|
});
|
|
329
323
|
const reqOpts = setSeoPattern(payload);
|
|
@@ -341,7 +335,6 @@ async function setSeoPattern2(pageType, seoPattern, options) {
|
|
|
341
335
|
pageType: "$[0]",
|
|
342
336
|
seoPattern: "$[1]",
|
|
343
337
|
fieldMask: "$[2].fieldMask",
|
|
344
|
-
collectionName: "$[2].collectionName",
|
|
345
338
|
pageId: "$[2].pageId"
|
|
346
339
|
},
|
|
347
340
|
singleArgumentUnchanged: false
|
|
@@ -356,7 +349,6 @@ async function resetSeoPatternToDefault2(pageType, options) {
|
|
|
356
349
|
const { httpClient, sideEffects } = arguments[2];
|
|
357
350
|
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
358
351
|
pageType,
|
|
359
|
-
collectionName: options?.collectionName,
|
|
360
352
|
pageId: options?.pageId
|
|
361
353
|
});
|
|
362
354
|
const reqOpts = resetSeoPatternToDefault(payload);
|
|
@@ -370,11 +362,7 @@ async function resetSeoPatternToDefault2(pageType, options) {
|
|
|
370
362
|
err,
|
|
371
363
|
{
|
|
372
364
|
spreadPathsToArguments: {},
|
|
373
|
-
explicitPathsToArguments: {
|
|
374
|
-
pageType: "$[0]",
|
|
375
|
-
collectionName: "$[1].collectionName",
|
|
376
|
-
pageId: "$[1].pageId"
|
|
377
|
-
},
|
|
365
|
+
explicitPathsToArguments: { pageType: "$[0]", pageId: "$[1].pageId" },
|
|
378
366
|
singleArgumentUnchanged: false
|
|
379
367
|
},
|
|
380
368
|
["pageType", "options"]
|