@wix/blog 1.0.237 → 1.0.239
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/context.d.ts +4 -4
- package/build/cjs/context.js +4 -4
- package/build/cjs/context.js.map +1 -1
- package/build/cjs/index.d.ts +4 -4
- package/build/cjs/index.js +4 -4
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/meta.d.ts +4 -4
- package/build/cjs/meta.js +4 -4
- package/build/cjs/meta.js.map +1 -1
- package/build/es/context.d.ts +4 -4
- package/build/es/context.js +4 -4
- package/build/es/context.js.map +1 -1
- package/build/es/index.d.ts +4 -4
- package/build/es/index.js +4 -4
- package/build/es/index.js.map +1 -1
- package/build/es/meta.d.ts +4 -4
- package/build/es/meta.js +4 -4
- package/build/es/meta.js.map +1 -1
- package/package.json +14 -9
- package/build/cjs/index.typings.d.ts +0 -4
- package/build/cjs/index.typings.js +0 -31
- package/build/cjs/index.typings.js.map +0 -1
- package/build/cjs/src/blog-v3-category.context.d.ts +0 -6
- package/build/cjs/src/blog-v3-category.context.js +0 -53
- package/build/cjs/src/blog-v3-category.context.js.map +0 -1
- package/build/cjs/src/blog-v3-category.http.d.ts +0 -43
- package/build/cjs/src/blog-v3-category.http.js +0 -355
- package/build/cjs/src/blog-v3-category.http.js.map +0 -1
- package/build/cjs/src/blog-v3-category.meta.d.ts +0 -20
- package/build/cjs/src/blog-v3-category.meta.js +0 -104
- package/build/cjs/src/blog-v3-category.meta.js.map +0 -1
- package/build/cjs/src/blog-v3-category.public.d.ts +0 -43
- package/build/cjs/src/blog-v3-category.public.js +0 -37
- package/build/cjs/src/blog-v3-category.public.js.map +0 -1
- package/build/cjs/src/blog-v3-category.types.d.ts +0 -910
- package/build/cjs/src/blog-v3-category.types.js +0 -24
- package/build/cjs/src/blog-v3-category.types.js.map +0 -1
- package/build/cjs/src/blog-v3-category.universal.d.ts +0 -956
- package/build/cjs/src/blog-v3-category.universal.js +0 -383
- package/build/cjs/src/blog-v3-category.universal.js.map +0 -1
- package/build/cjs/src/blog-v3-draft.context.d.ts +0 -16
- package/build/cjs/src/blog-v3-draft.context.js +0 -173
- package/build/cjs/src/blog-v3-draft.context.js.map +0 -1
- package/build/cjs/src/blog-v3-draft.http.d.ts +0 -79
- package/build/cjs/src/blog-v3-draft.http.js +0 -1498
- package/build/cjs/src/blog-v3-draft.http.js.map +0 -1
- package/build/cjs/src/blog-v3-draft.meta.d.ts +0 -40
- package/build/cjs/src/blog-v3-draft.meta.js +0 -294
- package/build/cjs/src/blog-v3-draft.meta.js.map +0 -1
- package/build/cjs/src/blog-v3-draft.public.d.ts +0 -22
- package/build/cjs/src/blog-v3-draft.public.js +0 -133
- package/build/cjs/src/blog-v3-draft.public.js.map +0 -1
- package/build/cjs/src/blog-v3-draft.types.d.ts +0 -9171
- package/build/cjs/src/blog-v3-draft.types.js +0 -456
- package/build/cjs/src/blog-v3-draft.types.js.map +0 -1
- package/build/cjs/src/blog-v3-draft.universal.d.ts +0 -8816
- package/build/cjs/src/blog-v3-draft.universal.js +0 -1585
- package/build/cjs/src/blog-v3-draft.universal.js.map +0 -1
- package/build/cjs/src/blog-v3-post.context.d.ts +0 -9
- package/build/cjs/src/blog-v3-post.context.js +0 -89
- package/build/cjs/src/blog-v3-post.context.js.map +0 -1
- package/build/cjs/src/blog-v3-post.http.d.ts +0 -80
- package/build/cjs/src/blog-v3-post.http.js +0 -893
- package/build/cjs/src/blog-v3-post.http.js.map +0 -1
- package/build/cjs/src/blog-v3-post.meta.d.ts +0 -25
- package/build/cjs/src/blog-v3-post.meta.js +0 -161
- package/build/cjs/src/blog-v3-post.meta.js.map +0 -1
- package/build/cjs/src/blog-v3-post.public.d.ts +0 -548
- package/build/cjs/src/blog-v3-post.public.js +0 -94
- package/build/cjs/src/blog-v3-post.public.js.map +0 -1
- package/build/cjs/src/blog-v3-post.types.d.ts +0 -5238
- package/build/cjs/src/blog-v3-post.types.js +0 -478
- package/build/cjs/src/blog-v3-post.types.js.map +0 -1
- package/build/cjs/src/blog-v3-post.universal.d.ts +0 -5216
- package/build/cjs/src/blog-v3-post.universal.js +0 -1112
- package/build/cjs/src/blog-v3-post.universal.js.map +0 -1
- package/build/cjs/src/blog-v3-tag.context.d.ts +0 -6
- package/build/cjs/src/blog-v3-tag.context.js +0 -53
- package/build/cjs/src/blog-v3-tag.context.js.map +0 -1
- package/build/cjs/src/blog-v3-tag.http.d.ts +0 -40
- package/build/cjs/src/blog-v3-tag.http.js +0 -348
- package/build/cjs/src/blog-v3-tag.http.js.map +0 -1
- package/build/cjs/src/blog-v3-tag.meta.d.ts +0 -22
- package/build/cjs/src/blog-v3-tag.meta.js +0 -104
- package/build/cjs/src/blog-v3-tag.meta.js.map +0 -1
- package/build/cjs/src/blog-v3-tag.public.d.ts +0 -20
- package/build/cjs/src/blog-v3-tag.public.js +0 -37
- package/build/cjs/src/blog-v3-tag.public.js.map +0 -1
- package/build/cjs/src/blog-v3-tag.types.d.ts +0 -663
- package/build/cjs/src/blog-v3-tag.types.js +0 -17
- package/build/cjs/src/blog-v3-tag.types.js.map +0 -1
- package/build/cjs/src/blog-v3-tag.universal.d.ts +0 -807
- package/build/cjs/src/blog-v3-tag.universal.js +0 -364
- package/build/cjs/src/blog-v3-tag.universal.js.map +0 -1
- package/build/es/index.typings.d.ts +0 -4
- package/build/es/index.typings.js +0 -5
- package/build/es/index.typings.js.map +0 -1
- package/build/es/src/blog-v3-category.context.d.ts +0 -6
- package/build/es/src/blog-v3-category.context.js +0 -46
- package/build/es/src/blog-v3-category.context.js.map +0 -1
- package/build/es/src/blog-v3-category.http.d.ts +0 -43
- package/build/es/src/blog-v3-category.http.js +0 -348
- package/build/es/src/blog-v3-category.http.js.map +0 -1
- package/build/es/src/blog-v3-category.meta.d.ts +0 -20
- package/build/es/src/blog-v3-category.meta.js +0 -74
- package/build/es/src/blog-v3-category.meta.js.map +0 -1
- package/build/es/src/blog-v3-category.public.d.ts +0 -43
- package/build/es/src/blog-v3-category.public.js +0 -25
- package/build/es/src/blog-v3-category.public.js.map +0 -1
- package/build/es/src/blog-v3-category.types.d.ts +0 -910
- package/build/es/src/blog-v3-category.types.js +0 -21
- package/build/es/src/blog-v3-category.types.js.map +0 -1
- package/build/es/src/blog-v3-category.universal.d.ts +0 -956
- package/build/es/src/blog-v3-category.universal.js +0 -353
- package/build/es/src/blog-v3-category.universal.js.map +0 -1
- package/build/es/src/blog-v3-draft.context.d.ts +0 -16
- package/build/es/src/blog-v3-draft.context.js +0 -156
- package/build/es/src/blog-v3-draft.context.js.map +0 -1
- package/build/es/src/blog-v3-draft.http.d.ts +0 -79
- package/build/es/src/blog-v3-draft.http.js +0 -1481
- package/build/es/src/blog-v3-draft.http.js.map +0 -1
- package/build/es/src/blog-v3-draft.meta.d.ts +0 -40
- package/build/es/src/blog-v3-draft.meta.js +0 -254
- package/build/es/src/blog-v3-draft.meta.js.map +0 -1
- package/build/es/src/blog-v3-draft.public.d.ts +0 -22
- package/build/es/src/blog-v3-draft.public.js +0 -75
- package/build/es/src/blog-v3-draft.public.js.map +0 -1
- package/build/es/src/blog-v3-draft.types.d.ts +0 -9171
- package/build/es/src/blog-v3-draft.types.js +0 -453
- package/build/es/src/blog-v3-draft.types.js.map +0 -1
- package/build/es/src/blog-v3-draft.universal.d.ts +0 -8816
- package/build/es/src/blog-v3-draft.universal.js +0 -1544
- package/build/es/src/blog-v3-draft.universal.js.map +0 -1
- package/build/es/src/blog-v3-post.context.d.ts +0 -9
- package/build/es/src/blog-v3-post.context.js +0 -79
- package/build/es/src/blog-v3-post.context.js.map +0 -1
- package/build/es/src/blog-v3-post.http.d.ts +0 -80
- package/build/es/src/blog-v3-post.http.js +0 -883
- package/build/es/src/blog-v3-post.http.js.map +0 -1
- package/build/es/src/blog-v3-post.meta.d.ts +0 -25
- package/build/es/src/blog-v3-post.meta.js +0 -128
- package/build/es/src/blog-v3-post.meta.js.map +0 -1
- package/build/es/src/blog-v3-post.public.d.ts +0 -548
- package/build/es/src/blog-v3-post.public.js +0 -40
- package/build/es/src/blog-v3-post.public.js.map +0 -1
- package/build/es/src/blog-v3-post.types.d.ts +0 -5238
- package/build/es/src/blog-v3-post.types.js +0 -475
- package/build/es/src/blog-v3-post.types.js.map +0 -1
- package/build/es/src/blog-v3-post.universal.d.ts +0 -5216
- package/build/es/src/blog-v3-post.universal.js +0 -1079
- package/build/es/src/blog-v3-post.universal.js.map +0 -1
- package/build/es/src/blog-v3-tag.context.d.ts +0 -6
- package/build/es/src/blog-v3-tag.context.js +0 -46
- package/build/es/src/blog-v3-tag.context.js.map +0 -1
- package/build/es/src/blog-v3-tag.http.d.ts +0 -40
- package/build/es/src/blog-v3-tag.http.js +0 -341
- package/build/es/src/blog-v3-tag.http.js.map +0 -1
- package/build/es/src/blog-v3-tag.meta.d.ts +0 -22
- package/build/es/src/blog-v3-tag.meta.js +0 -74
- package/build/es/src/blog-v3-tag.meta.js.map +0 -1
- package/build/es/src/blog-v3-tag.public.d.ts +0 -20
- package/build/es/src/blog-v3-tag.public.js +0 -25
- package/build/es/src/blog-v3-tag.public.js.map +0 -1
- package/build/es/src/blog-v3-tag.types.d.ts +0 -663
- package/build/es/src/blog-v3-tag.types.js +0 -14
- package/build/es/src/blog-v3-tag.types.js.map +0 -1
- package/build/es/src/blog-v3-tag.universal.d.ts +0 -807
- package/build/es/src/blog-v3-tag.universal.js +0 -334
- package/build/es/src/blog-v3-tag.universal.js.map +0 -1
|
@@ -1,807 +0,0 @@
|
|
|
1
|
-
import { EventDefinition } from '@wix/sdk-types';
|
|
2
|
-
export interface Tag {
|
|
3
|
-
/**
|
|
4
|
-
* Tag ID.
|
|
5
|
-
* @readonly
|
|
6
|
-
*/
|
|
7
|
-
_id?: string;
|
|
8
|
-
/**
|
|
9
|
-
* Tag label.
|
|
10
|
-
*
|
|
11
|
-
* A blog can't have two tags with the same label.
|
|
12
|
-
*/
|
|
13
|
-
label?: string;
|
|
14
|
-
/**
|
|
15
|
-
* Part of a tag's URL that refers to a specific tag.
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
* For example, `'https:/example.com/tags/{my-tag-slug}'`.
|
|
19
|
-
*/
|
|
20
|
-
slug?: string;
|
|
21
|
-
/**
|
|
22
|
-
* Date the tag was created.
|
|
23
|
-
* @readonly
|
|
24
|
-
*/
|
|
25
|
-
_createdDate?: Date;
|
|
26
|
-
/**
|
|
27
|
-
* Date the tag was last updated.
|
|
28
|
-
* @readonly
|
|
29
|
-
*/
|
|
30
|
-
_updatedDate?: Date;
|
|
31
|
-
/**
|
|
32
|
-
* Reserved for internal use.
|
|
33
|
-
* @readonly
|
|
34
|
-
*/
|
|
35
|
-
publicationCount?: number;
|
|
36
|
-
/**
|
|
37
|
-
* Number of posts with this tag, including unpublished draft posts.
|
|
38
|
-
* @readonly
|
|
39
|
-
*/
|
|
40
|
-
postCount?: number;
|
|
41
|
-
/**
|
|
42
|
-
* Tag URL.
|
|
43
|
-
*
|
|
44
|
-
*
|
|
45
|
-
* The `url` directs you to a page that lists every post with the specified tag.
|
|
46
|
-
* @readonly
|
|
47
|
-
*/
|
|
48
|
-
url?: string;
|
|
49
|
-
/**
|
|
50
|
-
* Number of published posts with this tag.
|
|
51
|
-
* @readonly
|
|
52
|
-
*/
|
|
53
|
-
publishedPostCount?: number;
|
|
54
|
-
/**
|
|
55
|
-
* ID of the tag's translations when [Wix Multilingual](https://support.wix.com/en/article/wix-multilingual-translating-your-blog) is installed on a site. All translations of a single tag will share the same `translationId`.
|
|
56
|
-
* @readonly
|
|
57
|
-
*/
|
|
58
|
-
translationId?: string | null;
|
|
59
|
-
/**
|
|
60
|
-
* Tag language.
|
|
61
|
-
*
|
|
62
|
-
* 2-letter language code in [ISO 639-1 alpha-2](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.
|
|
63
|
-
*/
|
|
64
|
-
language?: string | null;
|
|
65
|
-
}
|
|
66
|
-
/**
|
|
67
|
-
* 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.
|
|
68
|
-
* The search engines use this information for ranking purposes, or to display snippets in the search results.
|
|
69
|
-
* 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.
|
|
70
|
-
*/
|
|
71
|
-
export interface SeoSchema {
|
|
72
|
-
/** SEO tag information. */
|
|
73
|
-
tags?: SeoSchemaTag[];
|
|
74
|
-
/** SEO general settings. */
|
|
75
|
-
settings?: Settings;
|
|
76
|
-
}
|
|
77
|
-
export interface Keyword {
|
|
78
|
-
/** Keyword value. */
|
|
79
|
-
term?: string;
|
|
80
|
-
/** Whether the keyword is the main focus keyword. */
|
|
81
|
-
isMain?: boolean;
|
|
82
|
-
}
|
|
83
|
-
export interface SeoSchemaTag {
|
|
84
|
-
/**
|
|
85
|
-
* SEO tag type.
|
|
86
|
-
*
|
|
87
|
-
*
|
|
88
|
-
* Supported values: `title`, `meta`, `script`, `link`.
|
|
89
|
-
*/
|
|
90
|
-
type?: string;
|
|
91
|
-
/**
|
|
92
|
-
* A `{'key':'value'}` pair object where each SEO tag property (`'name'`, `'content'`, `'rel'`, `'href'`) contains a value.
|
|
93
|
-
* For example: `{'name': 'description', 'content': 'the description itself'}`.
|
|
94
|
-
*/
|
|
95
|
-
props?: Record<string, any> | null;
|
|
96
|
-
/** SEO tag meta data. For example, `{height: 300, width: 240}`. */
|
|
97
|
-
meta?: Record<string, any> | null;
|
|
98
|
-
/** SEO tag inner content. For example, `<title> inner content </title>`. */
|
|
99
|
-
children?: string;
|
|
100
|
-
/** Whether the tag is a custom tag. */
|
|
101
|
-
custom?: boolean;
|
|
102
|
-
/** Whether the tag is disabled. */
|
|
103
|
-
disabled?: boolean;
|
|
104
|
-
}
|
|
105
|
-
export interface Settings {
|
|
106
|
-
/**
|
|
107
|
-
* Whether the Auto Redirect feature, which creates `301 redirects` on a slug change, is enabled.
|
|
108
|
-
*
|
|
109
|
-
*
|
|
110
|
-
* Default: `false` (Auto Redirect is enabled.)
|
|
111
|
-
*/
|
|
112
|
-
preventAutoRedirect?: boolean;
|
|
113
|
-
/** User-selected keyword terms for a specific page. */
|
|
114
|
-
keywords?: Keyword[];
|
|
115
|
-
}
|
|
116
|
-
export interface InitialTagsCopied {
|
|
117
|
-
/** Number of tags copied. */
|
|
118
|
-
count?: number;
|
|
119
|
-
}
|
|
120
|
-
export interface GetOrCreateTagRequest {
|
|
121
|
-
/** Tag name. Unique per blog. */
|
|
122
|
-
label?: string;
|
|
123
|
-
/** Tag language. */
|
|
124
|
-
language?: string | null;
|
|
125
|
-
/**
|
|
126
|
-
* List of tag fields to be included if entities are present in the response.
|
|
127
|
-
* Base fieldset, which is default, will return all core tag properties.
|
|
128
|
-
* Example: When URL fieldset is selected, returned tag will have a set of base properties and tag url.
|
|
129
|
-
*/
|
|
130
|
-
fieldsets?: Field[];
|
|
131
|
-
}
|
|
132
|
-
export declare enum Field {
|
|
133
|
-
UNKNOWN = "UNKNOWN",
|
|
134
|
-
/** Includes Tag URL when present. */
|
|
135
|
-
URL = "URL",
|
|
136
|
-
/** Includes SEO data. */
|
|
137
|
-
SEO = "SEO"
|
|
138
|
-
}
|
|
139
|
-
export interface GetOrCreateTagResponse {
|
|
140
|
-
/** Tag info. */
|
|
141
|
-
tag?: Tag;
|
|
142
|
-
}
|
|
143
|
-
export interface CreateTagRequest {
|
|
144
|
-
/** Tag label. The label for each tag in a blog must be unique. */
|
|
145
|
-
label?: string;
|
|
146
|
-
/**
|
|
147
|
-
* Tag language.
|
|
148
|
-
*
|
|
149
|
-
* 2-letter language code in [ISO 639-1 alpha-2](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.
|
|
150
|
-
*/
|
|
151
|
-
language?: string | null;
|
|
152
|
-
/** Preferred tag slug. For example, `'tag-slug'`. */
|
|
153
|
-
slug?: string | null;
|
|
154
|
-
/**
|
|
155
|
-
* List of additional tag fields to include in the response. For example, use the `URL` fieldset to retrieve the url field in
|
|
156
|
-
* the response in addition to the tag's base fields. Base fields don’t include any of the supported fieldset values. By default
|
|
157
|
-
* only the tag's base fields are returned.
|
|
158
|
-
*/
|
|
159
|
-
fieldsets?: Field[];
|
|
160
|
-
}
|
|
161
|
-
export interface CreateTagResponse {
|
|
162
|
-
/** Tag info. */
|
|
163
|
-
tag?: Tag;
|
|
164
|
-
}
|
|
165
|
-
export interface UpdateTagRequest {
|
|
166
|
-
/** Tag info. */
|
|
167
|
-
tag?: Tag;
|
|
168
|
-
/**
|
|
169
|
-
* List of tag fields to be included if entities are present in the response.
|
|
170
|
-
* Base fieldset, which is default, will return all core tag properties.
|
|
171
|
-
* Example: When URL fieldset is selected, returned tag will have a set of base properties and tag url.
|
|
172
|
-
*/
|
|
173
|
-
fieldsets?: Field[];
|
|
174
|
-
}
|
|
175
|
-
export interface UpdateTagResponse {
|
|
176
|
-
/** Tag info. */
|
|
177
|
-
tag?: Tag;
|
|
178
|
-
}
|
|
179
|
-
export interface BulkCreateTagsRequest {
|
|
180
|
-
/** Tags to create. */
|
|
181
|
-
tags?: Tag[];
|
|
182
|
-
/** Whether to return the full created tag entities in the response. */
|
|
183
|
-
returnFullEntity?: boolean;
|
|
184
|
-
/**
|
|
185
|
-
* List of tag fields to be included if entities are present in the response.
|
|
186
|
-
* Base fieldset, which is default, will return all core tag properties.
|
|
187
|
-
* Example: When URL fieldset is selected, returned tag will have a set of base properties and tag url.
|
|
188
|
-
*/
|
|
189
|
-
fieldsets?: Field[];
|
|
190
|
-
}
|
|
191
|
-
export interface BulkCreateTagsResponse {
|
|
192
|
-
/** Tags created by bulk action. */
|
|
193
|
-
results?: BulkTagResult[];
|
|
194
|
-
/** Bulk action metadata. */
|
|
195
|
-
bulkActionMetadata?: BulkActionMetadata;
|
|
196
|
-
}
|
|
197
|
-
export interface BulkTagResult {
|
|
198
|
-
/** Bulk actions metadata for tag. */
|
|
199
|
-
itemMetadata?: ItemMetadata;
|
|
200
|
-
/** Optional created tag. */
|
|
201
|
-
item?: Tag;
|
|
202
|
-
}
|
|
203
|
-
export interface ItemMetadata {
|
|
204
|
-
/** Item ID. Should always be available, unless it's impossible (for example, when failing to create an item). */
|
|
205
|
-
_id?: string | null;
|
|
206
|
-
/** Index of the item within the request array. Allows for correlation between request and response items. */
|
|
207
|
-
originalIndex?: number;
|
|
208
|
-
/** Whether the requested action was successful for this item. When `false`, the `error` field is populated. */
|
|
209
|
-
success?: boolean;
|
|
210
|
-
/** Details about the error in case of failure. */
|
|
211
|
-
error?: ApplicationError;
|
|
212
|
-
}
|
|
213
|
-
export interface ApplicationError {
|
|
214
|
-
/** Error code. */
|
|
215
|
-
code?: string;
|
|
216
|
-
/** Description of the error. */
|
|
217
|
-
description?: string;
|
|
218
|
-
/** Data related to the error. */
|
|
219
|
-
data?: Record<string, any> | null;
|
|
220
|
-
}
|
|
221
|
-
export interface BulkActionMetadata {
|
|
222
|
-
/** Number of items that were successfully processed. */
|
|
223
|
-
totalSuccesses?: number;
|
|
224
|
-
/** Number of items that couldn't be processed. */
|
|
225
|
-
totalFailures?: number;
|
|
226
|
-
/** Number of failures without details because detailed failure threshold was exceeded. */
|
|
227
|
-
undetailedFailures?: number;
|
|
228
|
-
}
|
|
229
|
-
export interface GetTagByLabelRequest {
|
|
230
|
-
/** Tag label. */
|
|
231
|
-
label: string;
|
|
232
|
-
/**
|
|
233
|
-
* Tag language.
|
|
234
|
-
*
|
|
235
|
-
* 2-letter language code in [ISO 639-1 alpha-2](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.
|
|
236
|
-
* If omitted, tags in all languages are returned.
|
|
237
|
-
*/
|
|
238
|
-
language?: string | null;
|
|
239
|
-
/**
|
|
240
|
-
* __Deprecated.__ Use `fieldsets` instead.
|
|
241
|
-
* This parameter will be removed on June 30, 2023.
|
|
242
|
-
*
|
|
243
|
-
* List of tag fields to be included in the response.
|
|
244
|
-
*/
|
|
245
|
-
fieldsToInclude?: Field[];
|
|
246
|
-
/**
|
|
247
|
-
* List of additional tag fields to include in the response. For example, use the `URL` fieldset to retrieve the url field in
|
|
248
|
-
* the response in addition to the tag's base fields. Base fields don’t include any of the supported fieldset values. By default
|
|
249
|
-
* only the tag's base fields are returned.
|
|
250
|
-
*/
|
|
251
|
-
fieldsets?: Field[];
|
|
252
|
-
}
|
|
253
|
-
export interface GetTagByLabelResponse {
|
|
254
|
-
/** Tag info. */
|
|
255
|
-
tag?: Tag;
|
|
256
|
-
}
|
|
257
|
-
export interface GetTagRequest {
|
|
258
|
-
/** Tag ID. */
|
|
259
|
-
tagId: string;
|
|
260
|
-
/**
|
|
261
|
-
* __Deprecated.__ Use `fieldsets` instead.
|
|
262
|
-
* This parameter will be removed on June 30, 2023.
|
|
263
|
-
*
|
|
264
|
-
* List of tag fields to be included in the response.
|
|
265
|
-
*/
|
|
266
|
-
fieldsToInclude?: Field[];
|
|
267
|
-
/**
|
|
268
|
-
* List of additional tag fields to include in the response. For example, use the `URL` fieldset to retrieve the url field in
|
|
269
|
-
* the response in addition to the tag's base fields. Base fields don’t include any of the supported fieldset values. By default
|
|
270
|
-
* only the tag's base fields are returned.
|
|
271
|
-
*/
|
|
272
|
-
fieldsets?: Field[];
|
|
273
|
-
}
|
|
274
|
-
export interface GetTagResponse {
|
|
275
|
-
/** Tag info. */
|
|
276
|
-
tag?: Tag;
|
|
277
|
-
}
|
|
278
|
-
export interface GetTagBySlugRequest {
|
|
279
|
-
/** Slug of the tag to retrieve. */
|
|
280
|
-
slug: string;
|
|
281
|
-
/**
|
|
282
|
-
* __Deprecated.__ Use `fieldsets` instead.
|
|
283
|
-
* This parameter will be removed on June 30, 2023.
|
|
284
|
-
*
|
|
285
|
-
* List of tag fields to be included in the response.
|
|
286
|
-
*/
|
|
287
|
-
fieldsToInclude?: Field[];
|
|
288
|
-
/**
|
|
289
|
-
* List of additional tag fields to include in the response. For example, use the `URL` fieldset to retrieve the url field in
|
|
290
|
-
* the response in addition to the tag's base fields. Base fields don’t include any of the supported fieldset values. By default
|
|
291
|
-
* only the tag's base fields are returned.
|
|
292
|
-
*/
|
|
293
|
-
fieldsets?: Field[];
|
|
294
|
-
}
|
|
295
|
-
export interface GetTagBySlugResponse {
|
|
296
|
-
/** Tag info. */
|
|
297
|
-
tag?: Tag;
|
|
298
|
-
}
|
|
299
|
-
export interface QueryTagsRequest {
|
|
300
|
-
/**
|
|
301
|
-
* __Deprecated.__ Use `query` instead.
|
|
302
|
-
* This parameter will be removed on June 30, 2023.
|
|
303
|
-
*
|
|
304
|
-
* Filter object.
|
|
305
|
-
* For a detailed list of supported filters, see [Field Support for Filtering and Sorting](https://dev.wix.com/api/rest/community/blog/filter-and-sort).
|
|
306
|
-
*/
|
|
307
|
-
filter?: Record<string, any> | null;
|
|
308
|
-
/**
|
|
309
|
-
* __Deprecated.__ Use `query` instead.
|
|
310
|
-
* This parameter will be removed on June 30, 2023.
|
|
311
|
-
*
|
|
312
|
-
* Sorting options. For a list of sortable fields, see [Field Support for Filtering and Sorting](https://dev.wix.com/api/rest/community/blog/filter-and-sort).
|
|
313
|
-
*/
|
|
314
|
-
sort?: Sorting[];
|
|
315
|
-
/**
|
|
316
|
-
* __Deprecated.__ Use `query` instead.
|
|
317
|
-
* This parameter will be removed on June 30, 2023.
|
|
318
|
-
*
|
|
319
|
-
* Pagination options.
|
|
320
|
-
*/
|
|
321
|
-
paging?: Paging;
|
|
322
|
-
/**
|
|
323
|
-
* __Deprecated.__ Use `fieldsets` instead.
|
|
324
|
-
* This parameter will be removed on June 30, 2023.
|
|
325
|
-
*
|
|
326
|
-
* List of tag fields to be included in the response.
|
|
327
|
-
*/
|
|
328
|
-
fieldsToInclude?: Field[];
|
|
329
|
-
/** Query options. */
|
|
330
|
-
query?: PlatformQuery;
|
|
331
|
-
/**
|
|
332
|
-
* List of additional tag fields to include in the response. For example, use the `URL` fieldset to retrieve the url field in
|
|
333
|
-
* the response in addition to the tag's base fields. Base fields don’t include any of the supported fieldset values. By default
|
|
334
|
-
* only the tag's base fields are returned.
|
|
335
|
-
*/
|
|
336
|
-
fieldsets?: Field[];
|
|
337
|
-
}
|
|
338
|
-
export interface Sorting {
|
|
339
|
-
/** Name of the field to sort by. */
|
|
340
|
-
fieldName?: string;
|
|
341
|
-
/** Sort order. */
|
|
342
|
-
order?: SortOrder;
|
|
343
|
-
}
|
|
344
|
-
export declare enum SortOrder {
|
|
345
|
-
ASC = "ASC",
|
|
346
|
-
DESC = "DESC"
|
|
347
|
-
}
|
|
348
|
-
export interface Paging {
|
|
349
|
-
/** Number of items to load. */
|
|
350
|
-
limit?: number | null;
|
|
351
|
-
/** Number of items to skip in the current sort order. */
|
|
352
|
-
offset?: number | null;
|
|
353
|
-
}
|
|
354
|
-
export interface TagsFieldSet {
|
|
355
|
-
/** Includes tag URL when TRUE. Defaults to FALSE. */
|
|
356
|
-
includeUrl?: boolean;
|
|
357
|
-
}
|
|
358
|
-
export interface PlatformQuery extends PlatformQueryPagingMethodOneOf {
|
|
359
|
-
/** Paging options to limit and skip the number of items. */
|
|
360
|
-
paging?: Paging;
|
|
361
|
-
/** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */
|
|
362
|
-
cursorPaging?: CursorPaging;
|
|
363
|
-
/**
|
|
364
|
-
* Filter object in the following format:
|
|
365
|
-
* `"filter" : {
|
|
366
|
-
* "fieldName1": "value1",
|
|
367
|
-
* "fieldName2":{"$operator":"value2"}
|
|
368
|
-
* }`
|
|
369
|
-
* Example of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains`
|
|
370
|
-
*/
|
|
371
|
-
filter?: Record<string, any> | null;
|
|
372
|
-
/**
|
|
373
|
-
* Sort object in the following format:
|
|
374
|
-
* `[{"fieldName":"sortField1","order":"ASC"},{"fieldName":"sortField2","order":"DESC"}]`
|
|
375
|
-
*/
|
|
376
|
-
sort?: Sorting[];
|
|
377
|
-
}
|
|
378
|
-
/** @oneof */
|
|
379
|
-
export interface PlatformQueryPagingMethodOneOf {
|
|
380
|
-
/** Paging options to limit and skip the number of items. */
|
|
381
|
-
paging?: Paging;
|
|
382
|
-
/** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */
|
|
383
|
-
cursorPaging?: CursorPaging;
|
|
384
|
-
}
|
|
385
|
-
export interface CursorPaging {
|
|
386
|
-
/** Number of items to load. */
|
|
387
|
-
limit?: number | null;
|
|
388
|
-
/**
|
|
389
|
-
* Pointer to the next or previous page in the list of results.
|
|
390
|
-
*
|
|
391
|
-
* You can get the relevant cursor token
|
|
392
|
-
* from the `pagingMetadata` object in the previous call's response.
|
|
393
|
-
* Not relevant for the first request.
|
|
394
|
-
*/
|
|
395
|
-
cursor?: string | null;
|
|
396
|
-
}
|
|
397
|
-
export interface QueryTagsResponse {
|
|
398
|
-
/** List of tags. */
|
|
399
|
-
tags?: Tag[];
|
|
400
|
-
/**
|
|
401
|
-
* __Deprecated.__ Use `pagingMetadata` instead.
|
|
402
|
-
* This property will be removed on June 30, 2023.
|
|
403
|
-
*
|
|
404
|
-
* Details on the paged set of results returned.
|
|
405
|
-
*/
|
|
406
|
-
metaData?: MetaData;
|
|
407
|
-
/** Details on the paged set of results returned. */
|
|
408
|
-
pagingMetadata?: PagingMetadataV2;
|
|
409
|
-
}
|
|
410
|
-
export interface MetaData {
|
|
411
|
-
/** Number of items returned in this response. */
|
|
412
|
-
count?: number;
|
|
413
|
-
/** Requested offset. */
|
|
414
|
-
offset?: number;
|
|
415
|
-
/** Total number of items that match the query. */
|
|
416
|
-
total?: number;
|
|
417
|
-
/** Pointer to the next or previous page in the list of results. */
|
|
418
|
-
cursor?: string | null;
|
|
419
|
-
}
|
|
420
|
-
export interface PagingMetadataV2 {
|
|
421
|
-
/** Number of items returned in the response. */
|
|
422
|
-
count?: number | null;
|
|
423
|
-
/** Offset that was requested. */
|
|
424
|
-
offset?: number | null;
|
|
425
|
-
/** Total number of items that match the query. Returned if offset paging is used and the `tooManyToCount` flag is not set. */
|
|
426
|
-
total?: number | null;
|
|
427
|
-
/** Flag that indicates the server failed to calculate the `total` field. */
|
|
428
|
-
tooManyToCount?: boolean | null;
|
|
429
|
-
/** Cursors to navigate through the result pages using `next` and `prev`. Returned if cursor paging is used. */
|
|
430
|
-
cursors?: Cursors;
|
|
431
|
-
}
|
|
432
|
-
export interface Cursors {
|
|
433
|
-
/** Cursor pointing to next page in the list of results. */
|
|
434
|
-
next?: string | null;
|
|
435
|
-
/** Cursor pointing to previous page in the list of results. */
|
|
436
|
-
prev?: string | null;
|
|
437
|
-
}
|
|
438
|
-
export interface ListTagsRequest extends ListTagsRequestPagingMethodOneOf {
|
|
439
|
-
/** Paging options to limit and skip the number of items. */
|
|
440
|
-
paging?: Paging;
|
|
441
|
-
/** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `sort`. */
|
|
442
|
-
cursorPaging?: CursorPaging;
|
|
443
|
-
/** Sorting options. For a list of sortable fields, see [Field Support for Filtering and Sorting](https://dev.wix.com/api/rest/community/blog/filter-and-sort). */
|
|
444
|
-
sort?: Sorting[];
|
|
445
|
-
/**
|
|
446
|
-
* List of tag fields to be included if entities are present in the response.
|
|
447
|
-
* Base fieldset, which is default, will return all core tag properties.
|
|
448
|
-
* Example: When URL fieldset is selected, returned tag will have a set of base properties and tag url.
|
|
449
|
-
*/
|
|
450
|
-
fieldsets?: Field[];
|
|
451
|
-
}
|
|
452
|
-
/** @oneof */
|
|
453
|
-
export interface ListTagsRequestPagingMethodOneOf {
|
|
454
|
-
/** Paging options to limit and skip the number of items. */
|
|
455
|
-
paging?: Paging;
|
|
456
|
-
/** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `sort`. */
|
|
457
|
-
cursorPaging?: CursorPaging;
|
|
458
|
-
}
|
|
459
|
-
export interface ListTagsResponse {
|
|
460
|
-
/** List of tags. */
|
|
461
|
-
tags?: Tag[];
|
|
462
|
-
/** Details on the paged set of results returned. */
|
|
463
|
-
metaData?: MetaData;
|
|
464
|
-
}
|
|
465
|
-
export interface BulkDeleteTagRequest {
|
|
466
|
-
/** Tag IDs. */
|
|
467
|
-
tagIds?: string[];
|
|
468
|
-
}
|
|
469
|
-
export interface BulkDeleteTagResponse {
|
|
470
|
-
}
|
|
471
|
-
export interface DeleteTagRequest {
|
|
472
|
-
/** Tag ID. */
|
|
473
|
-
tagId?: string;
|
|
474
|
-
}
|
|
475
|
-
export interface DeleteTagResponse {
|
|
476
|
-
}
|
|
477
|
-
export interface DomainEvent<T = string> extends DomainEventBodyOneOf<T> {
|
|
478
|
-
createdEvent?: EntityCreatedEvent<T>;
|
|
479
|
-
updatedEvent?: EntityUpdatedEvent<T>;
|
|
480
|
-
deletedEvent?: EntityDeletedEvent<T>;
|
|
481
|
-
actionEvent?: ActionEvent<T>;
|
|
482
|
-
/**
|
|
483
|
-
* Unique event ID.
|
|
484
|
-
* Allows clients to ignore duplicate webhooks.
|
|
485
|
-
*/
|
|
486
|
-
_id?: string;
|
|
487
|
-
/**
|
|
488
|
-
* Assumes actions are also always typed to an entity_type
|
|
489
|
-
* Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction
|
|
490
|
-
*/
|
|
491
|
-
entityFqdn?: string;
|
|
492
|
-
/**
|
|
493
|
-
* This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)
|
|
494
|
-
* This is although the created/updated/deleted notion is duplication of the oneof types
|
|
495
|
-
* Example: created/updated/deleted/started/completed/email_opened
|
|
496
|
-
*/
|
|
497
|
-
slug?: string;
|
|
498
|
-
/** ID of the entity associated with the event. */
|
|
499
|
-
entityId?: string;
|
|
500
|
-
/** Event timestamp. */
|
|
501
|
-
eventTime?: Date;
|
|
502
|
-
/**
|
|
503
|
-
* Whether the event was triggered as a result of a privacy regulation application
|
|
504
|
-
* (for example, GDPR).
|
|
505
|
-
*/
|
|
506
|
-
triggeredByAnonymizeRequest?: boolean | null;
|
|
507
|
-
/** If present, indicates the action that triggered the event. */
|
|
508
|
-
originatedFrom?: string | null;
|
|
509
|
-
/**
|
|
510
|
-
* A sequence number defining the order of updates to the underlying entity.
|
|
511
|
-
* For example, given that some entity was updated at 16:00 and than again at 16:01,
|
|
512
|
-
* it is guaranteed that the sequence number of the second update is strictly higher than the first.
|
|
513
|
-
* As the consumer, you can use this value to ensure that you handle messages in the correct order.
|
|
514
|
-
* To do so, you will need to persist this number on your end, and compare the sequence number from the
|
|
515
|
-
* message against the one you have stored. Given that the stored number is higher, you should ignore the message.
|
|
516
|
-
*/
|
|
517
|
-
entityEventSequence?: string | null;
|
|
518
|
-
}
|
|
519
|
-
export interface DomainCreatedEvent<T> extends Omit<DomainEvent<T>, 'deletedEvent' | 'updatedEvent' | 'actionEvent'> {
|
|
520
|
-
}
|
|
521
|
-
export interface DomainDeletedEvent<T> extends Omit<DomainEvent<T>, 'createdEvent' | 'updatedEvent' | 'actionEvent'> {
|
|
522
|
-
}
|
|
523
|
-
export interface DomainUpdatedEvent<T> extends Omit<DomainEvent<T>, 'createdEvent' | 'deletedEvent' | 'actionEvent'> {
|
|
524
|
-
}
|
|
525
|
-
export interface DomainActionEvent<T> extends Omit<DomainEvent<T>, 'createdEvent' | 'deletedEvent' | 'updatedEvent'> {
|
|
526
|
-
}
|
|
527
|
-
/** @oneof */
|
|
528
|
-
export interface DomainEventBodyOneOf<T> {
|
|
529
|
-
createdEvent?: EntityCreatedEvent<T>;
|
|
530
|
-
updatedEvent?: EntityUpdatedEvent<T>;
|
|
531
|
-
deletedEvent?: EntityDeletedEvent<T>;
|
|
532
|
-
actionEvent?: ActionEvent<T>;
|
|
533
|
-
}
|
|
534
|
-
export interface EntityCreatedEvent<T> {
|
|
535
|
-
entity?: T;
|
|
536
|
-
}
|
|
537
|
-
export interface EntityUpdatedEvent<T> {
|
|
538
|
-
/**
|
|
539
|
-
* Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
|
|
540
|
-
* This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
|
|
541
|
-
* We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
|
|
542
|
-
*/
|
|
543
|
-
currentEntity?: T;
|
|
544
|
-
}
|
|
545
|
-
export interface EntityDeletedEvent<T> {
|
|
546
|
-
/** Entity that was deleted */
|
|
547
|
-
deletedEntity?: T | null;
|
|
548
|
-
}
|
|
549
|
-
export interface ActionEvent<T> {
|
|
550
|
-
body?: T;
|
|
551
|
-
}
|
|
552
|
-
export interface GetTagByLabelResponseNonNullableFields {
|
|
553
|
-
tag?: {
|
|
554
|
-
_id: string;
|
|
555
|
-
label: string;
|
|
556
|
-
slug: string;
|
|
557
|
-
publicationCount: number;
|
|
558
|
-
postCount: number;
|
|
559
|
-
url: string;
|
|
560
|
-
publishedPostCount: number;
|
|
561
|
-
};
|
|
562
|
-
}
|
|
563
|
-
export interface GetTagResponseNonNullableFields {
|
|
564
|
-
tag?: {
|
|
565
|
-
_id: string;
|
|
566
|
-
label: string;
|
|
567
|
-
slug: string;
|
|
568
|
-
publicationCount: number;
|
|
569
|
-
postCount: number;
|
|
570
|
-
url: string;
|
|
571
|
-
publishedPostCount: number;
|
|
572
|
-
};
|
|
573
|
-
}
|
|
574
|
-
export interface GetTagBySlugResponseNonNullableFields {
|
|
575
|
-
tag?: {
|
|
576
|
-
_id: string;
|
|
577
|
-
label: string;
|
|
578
|
-
slug: string;
|
|
579
|
-
publicationCount: number;
|
|
580
|
-
postCount: number;
|
|
581
|
-
url: string;
|
|
582
|
-
publishedPostCount: number;
|
|
583
|
-
};
|
|
584
|
-
}
|
|
585
|
-
export interface QueryTagsResponseNonNullableFields {
|
|
586
|
-
tags: {
|
|
587
|
-
_id: string;
|
|
588
|
-
label: string;
|
|
589
|
-
slug: string;
|
|
590
|
-
publicationCount: number;
|
|
591
|
-
postCount: number;
|
|
592
|
-
url: string;
|
|
593
|
-
publishedPostCount: number;
|
|
594
|
-
}[];
|
|
595
|
-
metaData?: {
|
|
596
|
-
count: number;
|
|
597
|
-
offset: number;
|
|
598
|
-
total: number;
|
|
599
|
-
};
|
|
600
|
-
}
|
|
601
|
-
export declare const onTagCreated: EventDefinition<DomainCreatedEvent<Tag>, "wix.blog.v3.tag_created">;
|
|
602
|
-
export declare const onTagUpdated: EventDefinition<DomainUpdatedEvent<Tag>, "wix.blog.v3.tag_updated">;
|
|
603
|
-
export declare const onTagDeleted: EventDefinition<DomainDeletedEvent<Tag>, "wix.blog.v3.tag_deleted">;
|
|
604
|
-
/**
|
|
605
|
-
* Gets a tag by the specified label.
|
|
606
|
-
*
|
|
607
|
-
* The `getTagByLabel()` function returns a Promise that resolves to a tag whose label matches the specified label.
|
|
608
|
-
* @param label - Tag label.
|
|
609
|
-
* @public
|
|
610
|
-
* @requiredField label
|
|
611
|
-
* @param options - Options specifying which additional fields to return.
|
|
612
|
-
* @permissionScope Read Blog
|
|
613
|
-
* @permissionScopeId SCOPE.DC-BLOG.READ-BLOGS
|
|
614
|
-
* @permissionScope Manage Blog
|
|
615
|
-
* @permissionScopeId SCOPE.DC-BLOG.MANAGE-BLOG
|
|
616
|
-
* @permissionScope Read Draft Blog Posts
|
|
617
|
-
* @permissionScopeId SCOPE.DC-BLOG.READ-DRAFT-POSTS
|
|
618
|
-
* @applicableIdentity APP
|
|
619
|
-
* @applicableIdentity VISITOR
|
|
620
|
-
*/
|
|
621
|
-
export declare function getTagByLabel(label: string, options?: GetTagByLabelOptions): Promise<GetTagByLabelResponse & GetTagByLabelResponseNonNullableFields>;
|
|
622
|
-
export interface GetTagByLabelOptions {
|
|
623
|
-
/**
|
|
624
|
-
* Tag language.
|
|
625
|
-
*
|
|
626
|
-
* 2-letter language code in [ISO 639-1 alpha-2](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.
|
|
627
|
-
* If omitted, tags in all languages are returned.
|
|
628
|
-
*/
|
|
629
|
-
language?: string | null;
|
|
630
|
-
/** @internal */
|
|
631
|
-
fieldsToInclude?: Field[];
|
|
632
|
-
/**
|
|
633
|
-
* List of additional tag fields to be included in the response. By default, any fields not passed are not returned.
|
|
634
|
-
*
|
|
635
|
-
* Supported Values:
|
|
636
|
-
* `"URL"`
|
|
637
|
-
*/
|
|
638
|
-
fieldsets?: Field[];
|
|
639
|
-
}
|
|
640
|
-
/**
|
|
641
|
-
* Gets a tag by the specified ID.
|
|
642
|
-
*
|
|
643
|
-
*
|
|
644
|
-
* The `getTag()` function returns a Promise that resolves to a tag whose ID matches the specified ID.
|
|
645
|
-
* @param tagId - Tag ID.
|
|
646
|
-
* @public
|
|
647
|
-
* @requiredField tagId
|
|
648
|
-
* @param options - Options specifying which additional fields to return.
|
|
649
|
-
* @permissionScope Read Blog
|
|
650
|
-
* @permissionScopeId SCOPE.DC-BLOG.READ-BLOGS
|
|
651
|
-
* @permissionScope Manage Blog
|
|
652
|
-
* @permissionScopeId SCOPE.DC-BLOG.MANAGE-BLOG
|
|
653
|
-
* @permissionScope Read Draft Blog Posts
|
|
654
|
-
* @permissionScopeId SCOPE.DC-BLOG.READ-DRAFT-POSTS
|
|
655
|
-
* @applicableIdentity APP
|
|
656
|
-
* @applicableIdentity VISITOR
|
|
657
|
-
* @returns Tag info.
|
|
658
|
-
*/
|
|
659
|
-
export declare function getTag(tagId: string, options?: GetTagOptions): Promise<Tag & NonNullable<GetTagResponseNonNullableFields>['tag']>;
|
|
660
|
-
export interface GetTagOptions {
|
|
661
|
-
/** @internal */
|
|
662
|
-
fieldsToInclude?: Field[];
|
|
663
|
-
/**
|
|
664
|
-
* List of additional tag fields to be included in the response. By default, any fields not passed are not returned.
|
|
665
|
-
*
|
|
666
|
-
* Supported Values:
|
|
667
|
-
* `"URL"`
|
|
668
|
-
*/
|
|
669
|
-
fieldsets?: Field[];
|
|
670
|
-
}
|
|
671
|
-
/**
|
|
672
|
-
* Gets a tag by the specified slug.
|
|
673
|
-
*
|
|
674
|
-
*
|
|
675
|
-
* The `getTagBySlug()` function returns a Promise that resolves to a tag whose slug matches the specified slug.
|
|
676
|
-
*
|
|
677
|
-
* The `slug` is the end of a tag's URL that refers to a specific tag. For example, if a tag's URL is `https://example.com/blog/tag/{my-tag-slug}`, the slug is `my-tag-slug`. The slug is case-sensitive and derived from the tag's `label`.
|
|
678
|
-
* @param slug - Slug of the tag to retrieve.
|
|
679
|
-
* @public
|
|
680
|
-
* @requiredField slug
|
|
681
|
-
* @param options - Options specifying which additional fields to return.
|
|
682
|
-
* @permissionScope Read Blog
|
|
683
|
-
* @permissionScopeId SCOPE.DC-BLOG.READ-BLOGS
|
|
684
|
-
* @permissionScope Manage Blog
|
|
685
|
-
* @permissionScopeId SCOPE.DC-BLOG.MANAGE-BLOG
|
|
686
|
-
* @permissionScope Read Draft Blog Posts
|
|
687
|
-
* @permissionScopeId SCOPE.DC-BLOG.READ-DRAFT-POSTS
|
|
688
|
-
* @applicableIdentity APP
|
|
689
|
-
* @applicableIdentity VISITOR
|
|
690
|
-
*/
|
|
691
|
-
export declare function getTagBySlug(slug: string, options?: GetTagBySlugOptions): Promise<GetTagBySlugResponse & GetTagBySlugResponseNonNullableFields>;
|
|
692
|
-
export interface GetTagBySlugOptions {
|
|
693
|
-
/** @internal */
|
|
694
|
-
fieldsToInclude?: Field[];
|
|
695
|
-
/**
|
|
696
|
-
* List of additional tag fields to be included in the response. By default, any fields not passed are not returned.
|
|
697
|
-
*
|
|
698
|
-
* Supported Values:
|
|
699
|
-
* `"URL"`
|
|
700
|
-
*/
|
|
701
|
-
fieldsets?: Field[];
|
|
702
|
-
}
|
|
703
|
-
/**
|
|
704
|
-
* Creates a query to retrieve a list of tags.
|
|
705
|
-
*
|
|
706
|
-
*
|
|
707
|
-
* The `queryTags()` function builds a query to retrieve a list of up to 4,000 tags per language, and returns a [`TagsQueryBuilder`](https://www.wix.com/velo/reference/wix-blog-backend/tags/tagsquerybuilder) object.
|
|
708
|
-
*
|
|
709
|
-
* The returned object contains the query definition, which is typically used to run the query using the [`find()`](https://www.wix.com/velo/reference/wix-blog-backend/tags/tagsquerybuilder/find) function.
|
|
710
|
-
*
|
|
711
|
-
* You can refine the query by chaining `TagsQueryBuilder` functions onto the query. `TagsQueryBuilder` functions enable you to sort, filter, and control the results that `queryTags()` returns.
|
|
712
|
-
*
|
|
713
|
-
* `queryTags()` runs with these `TagsQueryBuilder` defaults that can be overridden:
|
|
714
|
-
* - [`limit(50)`](https://www.wix.com/velo/reference/wix-blog-backend/tags/tagsquerybuilder/limit)
|
|
715
|
-
* - [`ascending('_id')`](https://www.wix.com/velo/reference/wix-blog-backend/tags/tagsquerybuilder/ascending)
|
|
716
|
-
*
|
|
717
|
-
* The following `TagQueryBuilder` functions are supported for `queryTags()`. For a full description of the Tags object, see the object returned for the [`items`](https://www.wix.com/velo/reference/wix-blog-backend/tags/tagsqueryresult/items) property in [`TagsQueryResult`](https://www.wix.com/velo/reference/wix-blog-backend/tags/tagsqueryresult).
|
|
718
|
-
* @public
|
|
719
|
-
* @param options - Options specifying which fields to return.
|
|
720
|
-
* @permissionScope Read Blog
|
|
721
|
-
* @permissionScopeId SCOPE.DC-BLOG.READ-BLOGS
|
|
722
|
-
* @permissionScope Manage Blog
|
|
723
|
-
* @permissionScopeId SCOPE.DC-BLOG.MANAGE-BLOG
|
|
724
|
-
* @permissionScope Read Draft Blog Posts
|
|
725
|
-
* @permissionScopeId SCOPE.DC-BLOG.READ-DRAFT-POSTS
|
|
726
|
-
* @applicableIdentity APP
|
|
727
|
-
* @applicableIdentity VISITOR
|
|
728
|
-
*/
|
|
729
|
-
export declare function queryTags(options?: QueryTagsOptions): TagsQueryBuilder;
|
|
730
|
-
export interface QueryTagsOptions {
|
|
731
|
-
/** @internal */
|
|
732
|
-
filter?: Record<string, any> | null | undefined;
|
|
733
|
-
/** @internal */
|
|
734
|
-
sort?: Sorting[] | undefined;
|
|
735
|
-
/** @internal */
|
|
736
|
-
paging?: Paging | undefined;
|
|
737
|
-
/** @internal */
|
|
738
|
-
fieldsToInclude?: Field[] | undefined;
|
|
739
|
-
/**
|
|
740
|
-
* List of additional tag fields to be included in the response. By default, any fields not passed are not returned.
|
|
741
|
-
*
|
|
742
|
-
* Supported Values:
|
|
743
|
-
* `"URL"`
|
|
744
|
-
*/
|
|
745
|
-
fieldsets?: Field[] | undefined;
|
|
746
|
-
}
|
|
747
|
-
interface QueryOffsetResult {
|
|
748
|
-
currentPage: number | undefined;
|
|
749
|
-
totalPages: number | undefined;
|
|
750
|
-
totalCount: number | undefined;
|
|
751
|
-
hasNext: () => boolean;
|
|
752
|
-
hasPrev: () => boolean;
|
|
753
|
-
length: number;
|
|
754
|
-
pageSize: number;
|
|
755
|
-
}
|
|
756
|
-
export interface TagsQueryResult extends QueryOffsetResult {
|
|
757
|
-
items: Tag[];
|
|
758
|
-
query: TagsQueryBuilder;
|
|
759
|
-
next: () => Promise<TagsQueryResult>;
|
|
760
|
-
prev: () => Promise<TagsQueryResult>;
|
|
761
|
-
}
|
|
762
|
-
export interface TagsQueryBuilder {
|
|
763
|
-
/** @param propertyName - Property whose value is compared with `value`.
|
|
764
|
-
* @param value - Value to compare against.
|
|
765
|
-
*/
|
|
766
|
-
eq: (propertyName: '_id' | 'label' | 'slug' | 'publicationCount' | 'postCount' | 'translationId' | 'language', value: any) => TagsQueryBuilder;
|
|
767
|
-
/** @param propertyName - Property whose value is compared with `value`.
|
|
768
|
-
* @param value - Value to compare against.
|
|
769
|
-
*/
|
|
770
|
-
ne: (propertyName: '_id' | 'label' | 'slug' | 'publicationCount' | 'postCount' | 'translationId' | 'language', value: any) => TagsQueryBuilder;
|
|
771
|
-
/** @param propertyName - Property whose value is compared with `value`.
|
|
772
|
-
* @param value - Value to compare against.
|
|
773
|
-
*/
|
|
774
|
-
ge: (propertyName: 'publicationCount' | 'postCount', value: any) => TagsQueryBuilder;
|
|
775
|
-
/** @param propertyName - Property whose value is compared with `value`.
|
|
776
|
-
* @param value - Value to compare against.
|
|
777
|
-
*/
|
|
778
|
-
gt: (propertyName: 'publicationCount' | 'postCount', value: any) => TagsQueryBuilder;
|
|
779
|
-
/** @param propertyName - Property whose value is compared with `value`.
|
|
780
|
-
* @param value - Value to compare against.
|
|
781
|
-
*/
|
|
782
|
-
le: (propertyName: 'publicationCount' | 'postCount', value: any) => TagsQueryBuilder;
|
|
783
|
-
/** @param propertyName - Property whose value is compared with `value`.
|
|
784
|
-
* @param value - Value to compare against.
|
|
785
|
-
*/
|
|
786
|
-
lt: (propertyName: 'publicationCount' | 'postCount', value: any) => TagsQueryBuilder;
|
|
787
|
-
/** @param propertyName - Property whose value is compared with `string`.
|
|
788
|
-
* @param string - String to compare against. Case-insensitive.
|
|
789
|
-
*/
|
|
790
|
-
startsWith: (propertyName: 'label' | 'slug', value: string) => TagsQueryBuilder;
|
|
791
|
-
/** @param propertyName - Property whose value is compared with `values`.
|
|
792
|
-
* @param values - List of values to compare against.
|
|
793
|
-
*/
|
|
794
|
-
hasSome: (propertyName: '_id' | 'label' | 'slug', value: any[]) => TagsQueryBuilder;
|
|
795
|
-
in: (propertyName: 'label' | 'slug' | 'publicationCount' | 'postCount' | 'translationId' | 'language', value: any) => TagsQueryBuilder;
|
|
796
|
-
exists: (propertyName: 'label' | 'slug' | 'translationId' | 'language', value: boolean) => TagsQueryBuilder;
|
|
797
|
-
/** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments. */
|
|
798
|
-
ascending: (...propertyNames: Array<'label' | 'slug' | 'publicationCount' | 'postCount' | 'language'>) => TagsQueryBuilder;
|
|
799
|
-
/** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments. */
|
|
800
|
-
descending: (...propertyNames: Array<'label' | 'slug' | 'publicationCount' | 'postCount' | 'language'>) => TagsQueryBuilder;
|
|
801
|
-
/** @param limit - Number of items to return, which is also the `pageSize` of the results object. */
|
|
802
|
-
limit: (limit: number) => TagsQueryBuilder;
|
|
803
|
-
/** @param skip - Number of items to skip in the query results before returning the results. */
|
|
804
|
-
skip: (skip: number) => TagsQueryBuilder;
|
|
805
|
-
find: () => Promise<TagsQueryResult>;
|
|
806
|
-
}
|
|
807
|
-
export {};
|