@wix/auto_sdk_seo_seo-patterns 1.0.0 → 1.0.1
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 +89 -127
- package/build/cjs/index.typings.js +3 -15
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +67 -59
- package/build/cjs/meta.js.map +1 -1
- package/build/cjs/schemas.d.ts +0 -3
- package/build/cjs/schemas.js +40 -51
- 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 +89 -127
- package/build/es/index.typings.mjs +3 -15
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +67 -59
- package/build/es/meta.mjs.map +1 -1
- package/build/es/schemas.d.mts +0 -3
- package/build/es/schemas.mjs +40 -51
- 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 +98 -112
- 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 +76 -44
- package/build/internal/cjs/meta.js.map +1 -1
- package/build/internal/cjs/schemas.d.ts +0 -3
- package/build/internal/cjs/schemas.js +40 -51
- 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 +98 -112
- 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 +76 -44
- package/build/internal/es/meta.mjs.map +1 -1
- package/build/internal/es/schemas.d.mts +0 -3
- package/build/internal/es/schemas.mjs +40 -51
- 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[];
|
|
@@ -176,16 +168,15 @@ interface GetSeoPatternRequest {
|
|
|
176
168
|
* ID of a single page built from a Wix Data collection, to retrieve the pattern of that
|
|
177
169
|
* page alone.
|
|
178
170
|
*
|
|
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`.
|
|
171
|
+
* Supported only for the `WIX_DATA_PAGE_ITEM` page type.
|
|
182
172
|
* @maxLength 200
|
|
183
173
|
*/
|
|
184
174
|
pageId?: string | null;
|
|
185
175
|
/**
|
|
186
|
-
* Not supported yet.
|
|
176
|
+
* Not supported yet.
|
|
187
177
|
*
|
|
188
|
-
* To address a single page built from a Wix Data collection,
|
|
178
|
+
* To address a single page built from a Wix Data collection, specify its `pageId`.
|
|
179
|
+
* @internal
|
|
189
180
|
* @maxLength 200
|
|
190
181
|
*/
|
|
191
182
|
collectionName?: string | null;
|
|
@@ -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,14 +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
294
|
/**
|
|
301
|
-
* Not supported yet.
|
|
295
|
+
* Not supported yet.
|
|
302
296
|
*
|
|
303
|
-
* To address a single page built from a Wix Data collection,
|
|
297
|
+
* To address a single page built from a Wix Data collection, specify its `pageId`.
|
|
298
|
+
* @internal
|
|
304
299
|
* @maxLength 200
|
|
305
300
|
*/
|
|
306
301
|
collectionName?: string | null;
|
|
@@ -308,9 +303,7 @@ interface SetSeoPatternRequest {
|
|
|
308
303
|
* ID of a single page built from a Wix Data collection, to change the pattern of that
|
|
309
304
|
* page alone.
|
|
310
305
|
*
|
|
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`.
|
|
306
|
+
* Supported only for the `WIX_DATA_PAGE_ITEM` page type.
|
|
314
307
|
* @maxLength 200
|
|
315
308
|
*/
|
|
316
309
|
pageId?: string | null;
|
|
@@ -327,9 +320,10 @@ interface ResetSeoPatternToDefaultRequest {
|
|
|
327
320
|
*/
|
|
328
321
|
pageType: string;
|
|
329
322
|
/**
|
|
330
|
-
* Not supported yet.
|
|
323
|
+
* Not supported yet.
|
|
331
324
|
*
|
|
332
|
-
* To address a single page built from a Wix Data collection,
|
|
325
|
+
* To address a single page built from a Wix Data collection, specify its `pageId`.
|
|
326
|
+
* @internal
|
|
333
327
|
* @maxLength 200
|
|
334
328
|
*/
|
|
335
329
|
collectionName?: string | null;
|
|
@@ -337,9 +331,7 @@ interface ResetSeoPatternToDefaultRequest {
|
|
|
337
331
|
* ID of a single page built from a Wix Data collection, to reset the pattern of that
|
|
338
332
|
* page alone.
|
|
339
333
|
*
|
|
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`.
|
|
334
|
+
* Supported only for the `WIX_DATA_PAGE_ITEM` page type.
|
|
343
335
|
* @maxLength 200
|
|
344
336
|
*/
|
|
345
337
|
pageId?: string | null;
|
|
@@ -509,12 +501,28 @@ type GetSeoPatternApplicationErrors = {
|
|
|
509
501
|
code?: 'UNSUPPORTED_PAGE_TYPE';
|
|
510
502
|
description?: string;
|
|
511
503
|
data?: Record<string, any>;
|
|
504
|
+
} | {
|
|
505
|
+
code?: 'PAGE_TYPE_NOT_ON_SITE';
|
|
506
|
+
description?: string;
|
|
507
|
+
data?: Record<string, any>;
|
|
508
|
+
} | {
|
|
509
|
+
code?: 'PAGE_ID_NOT_SUPPORTED';
|
|
510
|
+
description?: string;
|
|
511
|
+
data?: Record<string, any>;
|
|
512
|
+
} | {
|
|
513
|
+
code?: 'COLLECTION_NAME_NOT_SUPPORTED';
|
|
514
|
+
description?: string;
|
|
515
|
+
data?: Record<string, any>;
|
|
512
516
|
};
|
|
513
517
|
/** @docsIgnore */
|
|
514
518
|
type ListSeoPatternVariablesApplicationErrors = {
|
|
515
519
|
code?: 'UNSUPPORTED_PAGE_TYPE';
|
|
516
520
|
description?: string;
|
|
517
521
|
data?: Record<string, any>;
|
|
522
|
+
} | {
|
|
523
|
+
code?: 'PAGE_TYPE_NOT_ON_SITE';
|
|
524
|
+
description?: string;
|
|
525
|
+
data?: Record<string, any>;
|
|
518
526
|
};
|
|
519
527
|
/** @docsIgnore */
|
|
520
528
|
type CreateSeoPatternApplicationErrors = {
|
|
@@ -529,6 +537,14 @@ type CreateSeoPatternApplicationErrors = {
|
|
|
529
537
|
code?: 'PATTERN_ALREADY_EXISTS';
|
|
530
538
|
description?: string;
|
|
531
539
|
data?: Record<string, any>;
|
|
540
|
+
} | {
|
|
541
|
+
code?: 'PAGE_TYPE_NOT_ON_SITE';
|
|
542
|
+
description?: string;
|
|
543
|
+
data?: Record<string, any>;
|
|
544
|
+
} | {
|
|
545
|
+
code?: 'PAGE_ID_NOT_SUPPORTED';
|
|
546
|
+
description?: string;
|
|
547
|
+
data?: Record<string, any>;
|
|
532
548
|
};
|
|
533
549
|
/** @docsIgnore */
|
|
534
550
|
type SetSeoPatternApplicationErrors = {
|
|
@@ -547,6 +563,14 @@ type SetSeoPatternApplicationErrors = {
|
|
|
547
563
|
code?: 'PATTERN_NOT_FOUND';
|
|
548
564
|
description?: string;
|
|
549
565
|
data?: Record<string, any>;
|
|
566
|
+
} | {
|
|
567
|
+
code?: 'PAGE_ID_NOT_SUPPORTED';
|
|
568
|
+
description?: string;
|
|
569
|
+
data?: Record<string, any>;
|
|
570
|
+
} | {
|
|
571
|
+
code?: 'COLLECTION_NAME_NOT_SUPPORTED';
|
|
572
|
+
description?: string;
|
|
573
|
+
data?: Record<string, any>;
|
|
550
574
|
};
|
|
551
575
|
/** @docsIgnore */
|
|
552
576
|
type ResetSeoPatternToDefaultApplicationErrors = {
|
|
@@ -557,16 +581,21 @@ type ResetSeoPatternToDefaultApplicationErrors = {
|
|
|
557
581
|
code?: 'PATTERN_NOT_FOUND';
|
|
558
582
|
description?: string;
|
|
559
583
|
data?: Record<string, any>;
|
|
584
|
+
} | {
|
|
585
|
+
code?: 'PAGE_ID_NOT_SUPPORTED';
|
|
586
|
+
description?: string;
|
|
587
|
+
data?: Record<string, any>;
|
|
588
|
+
} | {
|
|
589
|
+
code?: 'COLLECTION_NAME_NOT_SUPPORTED';
|
|
590
|
+
description?: string;
|
|
591
|
+
data?: Record<string, any>;
|
|
560
592
|
};
|
|
561
593
|
/**
|
|
562
594
|
* Retrieves the SEO pattern in effect for a page type.
|
|
563
595
|
*
|
|
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.
|
|
596
|
+
* The response contains the site's own pattern in `pattern`, and the pattern Wix
|
|
597
|
+
* provides in `defaultPattern`. `source` reports which of the two is in effect.
|
|
598
|
+
* `pattern` is empty when the site has no pattern of its own.
|
|
570
599
|
* @param pageType - Page type whose pattern to retrieve. For example, `STATIC_PAGE`, `BLOG_POST`, or
|
|
571
600
|
* `STORES_PRODUCT`.
|
|
572
601
|
* @public
|
|
@@ -585,30 +614,17 @@ interface GetSeoPatternOptions {
|
|
|
585
614
|
* ID of a single page built from a Wix Data collection, to retrieve the pattern of that
|
|
586
615
|
* page alone.
|
|
587
616
|
*
|
|
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`.
|
|
617
|
+
* Supported only for the `WIX_DATA_PAGE_ITEM` page type.
|
|
591
618
|
* @maxLength 200
|
|
592
619
|
*/
|
|
593
620
|
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
621
|
}
|
|
602
622
|
/**
|
|
603
623
|
* Retrieves the patterns stored for a site, one per page type.
|
|
604
624
|
*
|
|
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.
|
|
625
|
+
* Only returns page types that have had a pattern of the site's own stored, so a page
|
|
626
|
+
* type that has never had one is absent. A page type that was reset to its default remains in the
|
|
627
|
+
* list, with an empty `pattern` and `source` of `PATTERN_SOURCE_DEFAULT`.
|
|
612
628
|
* @public
|
|
613
629
|
* @documentationMaturity preview
|
|
614
630
|
* @permissionId wix-seo.read
|
|
@@ -620,15 +636,11 @@ declare function listSeoPatterns(): Promise<NonNullablePaths<ListSeoPatternsResp
|
|
|
620
636
|
/**
|
|
621
637
|
* Retrieves the variables a pattern for a page type may reference.
|
|
622
638
|
*
|
|
623
|
-
*
|
|
624
|
-
*
|
|
625
|
-
* `INVALID_PATTERN`.
|
|
639
|
+
* Call this method to retrieve the valid variables for a page type before writing a
|
|
640
|
+
* pattern.
|
|
626
641
|
*
|
|
627
642
|
* Variables for the page's own tags and variables for its structured data are returned
|
|
628
643
|
* 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
644
|
* @param pageType - Page type whose variables to retrieve. For example, `STATIC_PAGE`, `BLOG_POST`, or
|
|
633
645
|
* `STORES_PRODUCT`.
|
|
634
646
|
* @public
|
|
@@ -645,16 +657,12 @@ declare function listSeoPatternVariables(pageType: string): Promise<NonNullableP
|
|
|
645
657
|
/**
|
|
646
658
|
* Creates a pattern for a page type that's still on its Wix default.
|
|
647
659
|
*
|
|
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.
|
|
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`.
|
|
660
|
+
* The pattern must contain at least one tag. To leave a page type on its Wix default,
|
|
661
|
+
* create nothing for it.
|
|
654
662
|
*
|
|
655
|
-
*
|
|
656
|
-
*
|
|
657
|
-
* @param pageType - Page type
|
|
663
|
+
* To change a pattern that already exists, call [Set SEO
|
|
664
|
+
* Pattern](https://dev.wix.com/docs/api-reference/business-management/seo/seo-pattern-v1/set-seo-pattern).
|
|
665
|
+
* @param pageType - Page type to create a pattern for. For example, `STATIC_PAGE`, `BLOG_POST`, or
|
|
658
666
|
* `STORES_PRODUCT`.
|
|
659
667
|
* @param seoPattern - Pattern to create for the page type.
|
|
660
668
|
*
|
|
@@ -681,9 +689,10 @@ declare function createSeoPattern(pageType: string, seoPattern: SeoPattern): Pro
|
|
|
681
689
|
* pattern first and send back the complete set you want it to have. Sending an empty
|
|
682
690
|
* pattern clears it, which returns the page type to its Wix default.
|
|
683
691
|
*
|
|
684
|
-
* This method changes a pattern that already exists rather than creating one
|
|
685
|
-
* type still on its Wix default
|
|
686
|
-
*
|
|
692
|
+
* This method changes a pattern that already exists rather than creating one. For a page
|
|
693
|
+
* type still on its Wix default, call [Create SEO
|
|
694
|
+
* Pattern](https://dev.wix.com/docs/api-reference/business-management/seo/seo-pattern-v1/create-seo-pattern)
|
|
695
|
+
* instead.
|
|
687
696
|
*
|
|
688
697
|
* A pattern has no revision, and the site's SEO settings in the dashboard write to the
|
|
689
698
|
* same pattern. The last write wins, so retrieve the pattern immediately before writing
|
|
@@ -711,24 +720,14 @@ interface SetSeoPatternOptions {
|
|
|
711
720
|
/**
|
|
712
721
|
* Fields to update.
|
|
713
722
|
*
|
|
714
|
-
*
|
|
715
|
-
* or a read-only field fails with `INVALID_FIELD_MASK`.
|
|
723
|
+
* Supported properties: `pattern`
|
|
716
724
|
*/
|
|
717
725
|
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
|
/**
|
|
726
727
|
* ID of a single page built from a Wix Data collection, to change the pattern of that
|
|
727
728
|
* page alone.
|
|
728
729
|
*
|
|
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`.
|
|
730
|
+
* Supported only for the `WIX_DATA_PAGE_ITEM` page type.
|
|
732
731
|
* @maxLength 200
|
|
733
732
|
*/
|
|
734
733
|
pageId?: string | null;
|
|
@@ -737,11 +736,7 @@ interface SetSeoPatternOptions {
|
|
|
737
736
|
* Removes the pattern a site has for a page type, so the Wix default applies again.
|
|
738
737
|
*
|
|
739
738
|
* 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.
|
|
739
|
+
* `source` of `PATTERN_SOURCE_DEFAULT`.
|
|
745
740
|
* @param pageType - Page type whose pattern to reset. For example, `STATIC_PAGE`, `BLOG_POST`, or
|
|
746
741
|
* `STORES_PRODUCT`.
|
|
747
742
|
* @public
|
|
@@ -755,20 +750,11 @@ declare function resetSeoPatternToDefault(pageType: string, options?: ResetSeoPa
|
|
|
755
750
|
__applicationErrorsType?: ResetSeoPatternToDefaultApplicationErrors;
|
|
756
751
|
}>;
|
|
757
752
|
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
753
|
/**
|
|
766
754
|
* ID of a single page built from a Wix Data collection, to reset the pattern of that
|
|
767
755
|
* page alone.
|
|
768
756
|
*
|
|
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`.
|
|
757
|
+
* Supported only for the `WIX_DATA_PAGE_ITEM` page type.
|
|
772
758
|
* @maxLength 200
|
|
773
759
|
*/
|
|
774
760
|
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"]
|