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