@wix/blog 1.0.113

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 (79) hide show
  1. package/build/cjs/index.d.ts +3 -0
  2. package/build/cjs/index.js +26 -0
  3. package/build/cjs/index.js.map +1 -0
  4. package/build/cjs/src/blog-v3-category.http.d.ts +50 -0
  5. package/build/cjs/src/blog-v3-category.http.js +421 -0
  6. package/build/cjs/src/blog-v3-category.http.js.map +1 -0
  7. package/build/cjs/src/blog-v3-category.public.d.ts +11 -0
  8. package/build/cjs/src/blog-v3-category.public.js +50 -0
  9. package/build/cjs/src/blog-v3-category.public.js.map +1 -0
  10. package/build/cjs/src/blog-v3-category.types.d.ts +391 -0
  11. package/build/cjs/src/blog-v3-category.types.js +22 -0
  12. package/build/cjs/src/blog-v3-category.types.js.map +1 -0
  13. package/build/cjs/src/blog-v3-category.universal.d.ts +582 -0
  14. package/build/cjs/src/blog-v3-category.universal.js +460 -0
  15. package/build/cjs/src/blog-v3-category.universal.js.map +1 -0
  16. package/build/cjs/src/blog-v3-post.http.d.ts +81 -0
  17. package/build/cjs/src/blog-v3-post.http.js +844 -0
  18. package/build/cjs/src/blog-v3-post.http.js.map +1 -0
  19. package/build/cjs/src/blog-v3-post.public.d.ts +11 -0
  20. package/build/cjs/src/blog-v3-post.public.js +86 -0
  21. package/build/cjs/src/blog-v3-post.public.js.map +1 -0
  22. package/build/cjs/src/blog-v3-post.types.d.ts +2227 -0
  23. package/build/cjs/src/blog-v3-post.types.js +464 -0
  24. package/build/cjs/src/blog-v3-post.types.js.map +1 -0
  25. package/build/cjs/src/blog-v3-post.universal.d.ts +2488 -0
  26. package/build/cjs/src/blog-v3-post.universal.js +935 -0
  27. package/build/cjs/src/blog-v3-post.universal.js.map +1 -0
  28. package/build/cjs/src/blog-v3-tag.http.d.ts +45 -0
  29. package/build/cjs/src/blog-v3-tag.http.js +385 -0
  30. package/build/cjs/src/blog-v3-tag.http.js.map +1 -0
  31. package/build/cjs/src/blog-v3-tag.public.d.ts +10 -0
  32. package/build/cjs/src/blog-v3-tag.public.js +44 -0
  33. package/build/cjs/src/blog-v3-tag.public.js.map +1 -0
  34. package/build/cjs/src/blog-v3-tag.types.d.ts +345 -0
  35. package/build/cjs/src/blog-v3-tag.types.js +15 -0
  36. package/build/cjs/src/blog-v3-tag.types.js.map +1 -0
  37. package/build/cjs/src/blog-v3-tag.universal.d.ts +512 -0
  38. package/build/cjs/src/blog-v3-tag.universal.js +390 -0
  39. package/build/cjs/src/blog-v3-tag.universal.js.map +1 -0
  40. package/build/es/index.d.ts +3 -0
  41. package/build/es/index.js +4 -0
  42. package/build/es/index.js.map +1 -0
  43. package/build/es/src/blog-v3-category.http.d.ts +50 -0
  44. package/build/es/src/blog-v3-category.http.js +411 -0
  45. package/build/es/src/blog-v3-category.http.js.map +1 -0
  46. package/build/es/src/blog-v3-category.public.d.ts +11 -0
  47. package/build/es/src/blog-v3-category.public.js +38 -0
  48. package/build/es/src/blog-v3-category.public.js.map +1 -0
  49. package/build/es/src/blog-v3-category.types.d.ts +391 -0
  50. package/build/es/src/blog-v3-category.types.js +19 -0
  51. package/build/es/src/blog-v3-category.types.js.map +1 -0
  52. package/build/es/src/blog-v3-category.universal.d.ts +582 -0
  53. package/build/es/src/blog-v3-category.universal.js +431 -0
  54. package/build/es/src/blog-v3-category.universal.js.map +1 -0
  55. package/build/es/src/blog-v3-post.http.d.ts +81 -0
  56. package/build/es/src/blog-v3-post.http.js +834 -0
  57. package/build/es/src/blog-v3-post.http.js.map +1 -0
  58. package/build/es/src/blog-v3-post.public.d.ts +11 -0
  59. package/build/es/src/blog-v3-post.public.js +38 -0
  60. package/build/es/src/blog-v3-post.public.js.map +1 -0
  61. package/build/es/src/blog-v3-post.types.d.ts +2227 -0
  62. package/build/es/src/blog-v3-post.types.js +461 -0
  63. package/build/es/src/blog-v3-post.types.js.map +1 -0
  64. package/build/es/src/blog-v3-post.universal.d.ts +2488 -0
  65. package/build/es/src/blog-v3-post.universal.js +906 -0
  66. package/build/es/src/blog-v3-post.universal.js.map +1 -0
  67. package/build/es/src/blog-v3-tag.http.d.ts +45 -0
  68. package/build/es/src/blog-v3-tag.http.js +376 -0
  69. package/build/es/src/blog-v3-tag.http.js.map +1 -0
  70. package/build/es/src/blog-v3-tag.public.d.ts +10 -0
  71. package/build/es/src/blog-v3-tag.public.js +33 -0
  72. package/build/es/src/blog-v3-tag.public.js.map +1 -0
  73. package/build/es/src/blog-v3-tag.types.d.ts +345 -0
  74. package/build/es/src/blog-v3-tag.types.js +12 -0
  75. package/build/es/src/blog-v3-tag.types.js.map +1 -0
  76. package/build/es/src/blog-v3-tag.universal.d.ts +512 -0
  77. package/build/es/src/blog-v3-tag.universal.js +362 -0
  78. package/build/es/src/blog-v3-tag.universal.js.map +1 -0
  79. package/package.json +37 -0
@@ -0,0 +1,582 @@
1
+ export declare const __debug: {
2
+ verboseLogging: {
3
+ on: () => boolean;
4
+ off: () => boolean;
5
+ };
6
+ };
7
+ export interface Category {
8
+ /**
9
+ * Category ID.
10
+ * @readonly
11
+ */
12
+ _id?: string;
13
+ /** Category label. Displayed in the Category Menu. */
14
+ label?: string;
15
+ /**
16
+ * Number of posts in the category.
17
+ * @readonly
18
+ */
19
+ postCount?: number;
20
+ /**
21
+ * Category URL.
22
+ *
23
+ *
24
+ * The `url` directs you to a page that lists every post with the specified category.
25
+ *
26
+ * @readonly
27
+ */
28
+ url?: string;
29
+ /** Category description. */
30
+ description?: string | null;
31
+ /** Category title. */
32
+ title?: string;
33
+ /** Reserved for internal use. */
34
+ rank?: number | null;
35
+ /** Position of the category in the [Category Menu](https://support.wix.com/en/article/wix-blog-adding-and-customizing-a-category-menu). Categories with lower display position are displayed first. */
36
+ displayPosition?: number | null;
37
+ /** ID of the category's translations when [Wix Multilingual](https://wix.wixanswers.com/app/kb/article/36837a9d-5d22-4fa1-9a80-1b99b7f82b5e/en) is installed on a site. All translations of a single category will share the same `translationId`. */
38
+ translationId?: string | null;
39
+ /**
40
+ * Category Language.</br>
41
+ * 2-letter language code in [ISO 639-1 format](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes).
42
+ */
43
+ language?: string;
44
+ /**
45
+ * Part of a category's URL that refers to a specific category.
46
+ *
47
+ *
48
+ * For example, `'https:/example.com/blog/category/{my-category-slug}'`.
49
+ */
50
+ slug?: string;
51
+ /** SEO data. */
52
+ seoData?: SeoSchema;
53
+ /** Category cover image. */
54
+ coverImage?: string;
55
+ }
56
+ export interface CoverMedia extends CoverMediaMediaOneOf {
57
+ /** Whether cover media is displayed. */
58
+ displayed?: boolean;
59
+ /** If `false`, the cover image is the first media item appearing in the content. */
60
+ custom?: boolean;
61
+ /** Image url. */
62
+ image?: string;
63
+ /** Video url. */
64
+ video?: string;
65
+ }
66
+ /** @oneof */
67
+ export interface CoverMediaMediaOneOf {
68
+ /** Image url. */
69
+ image?: string;
70
+ /** Video url. */
71
+ video?: string;
72
+ }
73
+ /**
74
+ * 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.
75
+ * The search engines use this information for ranking purposes, or to display snippets in the search results.
76
+ * 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.
77
+ */
78
+ export interface SeoSchema {
79
+ /** SEO tag information. */
80
+ tags?: Tag[];
81
+ /** SEO general settings. */
82
+ settings?: Settings;
83
+ }
84
+ export interface Tag {
85
+ /** SEO tag type. Supported values: `title`, `meta`, `script`, `link`. */
86
+ type?: string;
87
+ /** SEO tag attributes/properties (name, content, rel, href). */
88
+ props?: Record<string, any> | null;
89
+ /** Tag meta data, e.g. {height: 300, width: 240}. */
90
+ meta?: Record<string, any> | null;
91
+ /** Tag inner content e.g. `<title> inner content </title>`. */
92
+ children?: string;
93
+ /** Whether the tag is a custom tag. */
94
+ custom?: boolean;
95
+ /** Whether the tag is disabled. */
96
+ disabled?: boolean;
97
+ }
98
+ export interface Settings {
99
+ /** disable auto creation of 301 redirects on slug changes (enabled by default). */
100
+ preventAutoRedirect?: boolean;
101
+ }
102
+ export interface CreateCategoryRequest {
103
+ /** Category info. */
104
+ category: Category;
105
+ /**
106
+ * List of category fields to be included if entities are present in the response.
107
+ * Base fieldset, which is default, will return all core category properties.
108
+ * Example: When URL fieldset is selected, returned category will have a set of base properties and category url.
109
+ */
110
+ fieldsets?: Field[];
111
+ }
112
+ export declare enum Field {
113
+ UNKNOWN = "UNKNOWN",
114
+ /** Includes Category url. */
115
+ URL = "URL",
116
+ /**
117
+ * Includes internal id field.
118
+ * Reserved for internal use
119
+ */
120
+ INTERNAL_ID = "INTERNAL_ID",
121
+ /** Includes SEO data. */
122
+ SEO = "SEO"
123
+ }
124
+ export interface CreateCategoryResponse {
125
+ /** Category info. */
126
+ category?: Category;
127
+ }
128
+ export interface BulkCreateCategoriesRequest {
129
+ /** Categories to create. */
130
+ categories?: Category[];
131
+ /** Whether to return the full created category entities in the response. */
132
+ returnFullEntity?: boolean;
133
+ /**
134
+ * List of category fields to be included if entities are present in the response.
135
+ * Base fieldset, which is default, will return all core category properties.
136
+ * Example: When URL fieldset is selected, returned category will have a set of base properties and category url.
137
+ */
138
+ fieldsets?: Field[];
139
+ }
140
+ export interface BulkCreateCategoriesResponse {
141
+ /** Categories created by bulk action. */
142
+ results?: BulkCategoryResult[];
143
+ /** Bulk action metadata. */
144
+ bulkActionMetadata?: BulkActionMetadata;
145
+ }
146
+ export interface BulkCategoryResult {
147
+ /** Bulk actions metadata for category. */
148
+ itemMetadata?: ItemMetadata;
149
+ /** Optional created category. */
150
+ item?: Category;
151
+ }
152
+ export interface ItemMetadata {
153
+ /** Item ID. Should always be available, unless it's impossible (for example, when failing to create an item). */
154
+ _id?: string | null;
155
+ /** Index of the item within the request array. Allows for correlation between request and response items. */
156
+ originalIndex?: number;
157
+ /** Whether the requested action was successful for this item. When `false`, the `error` field is populated. */
158
+ success?: boolean;
159
+ /** Details about the error in case of failure. */
160
+ error?: ApplicationError;
161
+ }
162
+ export interface ApplicationError {
163
+ code?: string;
164
+ description?: string;
165
+ data?: Record<string, any> | null;
166
+ }
167
+ export interface BulkActionMetadata {
168
+ /** Number of items that were successfully processed. */
169
+ totalSuccesses?: number;
170
+ /** Number of items that couldn't be processed. */
171
+ totalFailures?: number;
172
+ /** Number of failures without details because detailed failure threshold was exceeded. */
173
+ undetailedFailures?: number;
174
+ }
175
+ export interface UpdateCategoryRequest {
176
+ /** Category info. */
177
+ category: Category;
178
+ /** Field mask of fields to update. */
179
+ fieldMask?: string[];
180
+ /**
181
+ * List of category fields to be included if entities are present in the response.
182
+ * Base fieldset, which is default, will return all core category properties.
183
+ * Example: When URL fieldset is selected, returned category will have a set of base properties and category url.
184
+ */
185
+ fieldsets?: Field[];
186
+ }
187
+ export interface UpdateCategoryResponse {
188
+ /** Category info. */
189
+ category?: Category;
190
+ }
191
+ export interface GetCategoryRequest {
192
+ /** Category ID. */
193
+ categoryId: string;
194
+ /**
195
+ * List of category fields to be included if entities are present in the response.
196
+ * Base fieldset, which is default, will return all core category properties.
197
+ * Example: When URL fieldset is selected, returned category will have a set of base properties and category url.
198
+ */
199
+ fieldsets?: Field[];
200
+ }
201
+ export interface GetCategoryResponse {
202
+ /** Category info. */
203
+ category?: Category;
204
+ }
205
+ export interface GetCategoryBySlugRequest {
206
+ /** Slug of the category to retrieve. */
207
+ slug: string;
208
+ /**
209
+ * List of category fields to be included if entities are present in the response.
210
+ * Base fieldset, which is default, will return all core category properties.
211
+ * Example: When URL fieldset is selected, returned category will have a set of base properties and category url.
212
+ */
213
+ fieldsets?: Field[];
214
+ }
215
+ export interface GetCategoryBySlugResponse {
216
+ /** Category info. */
217
+ category?: Category;
218
+ }
219
+ export interface ListCategoriesRequest {
220
+ /** Pagination options. */
221
+ paging?: BlogPaging;
222
+ /**
223
+ * List of category fields to be included if entities are present in the response.
224
+ * Base fieldset, which is default, will return all core category properties.
225
+ * Example: When URL fieldset is selected, returned category will have a set of base properties and category url.
226
+ */
227
+ fieldsets?: Field[];
228
+ }
229
+ export interface BlogPaging {
230
+ /** Number of categories to skip in the list. */
231
+ offset?: number;
232
+ /**
233
+ * Number of items to return.
234
+ *
235
+ * Default: `50`
236
+ *
237
+ * Max: `100`
238
+ */
239
+ limit?: number;
240
+ /** Pointer to the next or previous page in the list of results. */
241
+ cursor?: string | null;
242
+ }
243
+ export interface ListCategoriesResponse {
244
+ /** List of categories. */
245
+ categories?: Category[];
246
+ /** Details on the paged set of results returned. */
247
+ metaData?: MetaData;
248
+ }
249
+ export interface MetaData {
250
+ /** Number of items returned in this response. */
251
+ count?: number;
252
+ /** Number of items skipped. */
253
+ offset?: number;
254
+ /** Total number of items that match the query. */
255
+ total?: number;
256
+ /** Pointer to the next or previous page in the list of results. */
257
+ cursor?: string | null;
258
+ }
259
+ export interface QueryCategoriesRequest {
260
+ /** Query options. */
261
+ query?: PlatformQuery;
262
+ /**
263
+ * List of category fields to be included if entities are present in the response.
264
+ * Base fieldset, which is default, will return all core category properties.
265
+ * Example: When URL fieldset is selected, returned category will have a set of base properties and category url.
266
+ */
267
+ fieldsets?: Field[];
268
+ }
269
+ export interface Sorting {
270
+ /** Name of the field to sort by. */
271
+ fieldName?: string;
272
+ /** Sort order. */
273
+ order?: SortOrder;
274
+ }
275
+ export declare enum SortOrder {
276
+ ASC = "ASC",
277
+ DESC = "DESC"
278
+ }
279
+ export interface PlatformQuery extends PlatformQueryPagingMethodOneOf {
280
+ /**
281
+ * Filter object in the following format:
282
+ * `"filter" : {
283
+ * "fieldName1": "value1",
284
+ * "fieldName2":{"$operator":"value2"}
285
+ * }`
286
+ * Example of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains`
287
+ */
288
+ filter?: Record<string, any> | null;
289
+ /**
290
+ * Sort object in the following format:
291
+ * `[{"fieldName":"sortField1","order":"ASC"},{"fieldName":"sortField2","order":"DESC"}]`
292
+ */
293
+ sort?: Sorting[];
294
+ /** Paging options to limit and skip the number of items. */
295
+ paging?: Paging;
296
+ /** 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`. */
297
+ cursorPaging?: CursorPaging;
298
+ }
299
+ /** @oneof */
300
+ export interface PlatformQueryPagingMethodOneOf {
301
+ /** Paging options to limit and skip the number of items. */
302
+ paging?: Paging;
303
+ /** 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`. */
304
+ cursorPaging?: CursorPaging;
305
+ }
306
+ export interface Paging {
307
+ /** Number of items to load. */
308
+ limit?: number | null;
309
+ /** Number of items to skip in the current sort order. */
310
+ offset?: number | null;
311
+ }
312
+ export interface CursorPaging {
313
+ /** Number of items to load. */
314
+ limit?: number | null;
315
+ /**
316
+ * Pointer to the next or previous page in the list of results.
317
+ *
318
+ * You can get the relevant cursor token
319
+ * from the `pagingMetadata` object in the previous call's response.
320
+ * Not relevant for the first request.
321
+ */
322
+ cursor?: string | null;
323
+ }
324
+ export interface QueryCategoriesResponse {
325
+ /** List of categories. */
326
+ categories?: Category[];
327
+ /** Details on the paged set of results returned. */
328
+ pagingMetadata?: PagingMetadataV2;
329
+ }
330
+ export interface PagingMetadataV2 {
331
+ /** Number of items returned in the response. */
332
+ count?: number | null;
333
+ /** Offset that was requested. */
334
+ offset?: number | null;
335
+ /** Total number of items that match the query. Returned if offset paging is used and the `tooManyToCount` flag is not set. */
336
+ total?: number | null;
337
+ /** Flag that indicates the server failed to calculate the `total` field. */
338
+ tooManyToCount?: boolean | null;
339
+ /** Cursors to navigate through the result pages using `next` and `prev`. Returned if cursor paging is used. */
340
+ cursors?: Cursors;
341
+ }
342
+ export interface Cursors {
343
+ /** Cursor pointing to next page in the list of results. */
344
+ next?: string | null;
345
+ /** Cursor pointing to previous page in the list of results. */
346
+ prev?: string | null;
347
+ }
348
+ export interface DeleteCategoryRequest {
349
+ /** Category ID. */
350
+ categoryId: string;
351
+ }
352
+ export interface DeleteCategoryResponse {
353
+ }
354
+ /**
355
+ * Creates a category.
356
+ * @param category - Category info.
357
+ * @public
358
+ * @requiredField category
359
+ * @requiredField category.label
360
+ */
361
+ export declare function createCategory(category: Category, options?: CreateCategoryOptions): Promise<CreateCategoryResponse>;
362
+ export interface CreateCategoryOptions {
363
+ /**
364
+ * List of category fields to be included if entities are present in the response.
365
+ * Base fieldset, which is default, will return all core category properties.
366
+ * Example: When URL fieldset is selected, returned category will have a set of base properties and category url.
367
+ */
368
+ fieldsets?: Field[];
369
+ }
370
+ /**
371
+ * Updates a category.
372
+ * @param _id - Category ID.
373
+ * @public
374
+ * @requiredField _id
375
+ * @requiredField category
376
+ */
377
+ export declare function updateCategory(_id: string, category: UpdateCategory, options?: UpdateCategoryOptions): Promise<UpdateCategoryResponse>;
378
+ export interface UpdateCategory {
379
+ /**
380
+ * Category ID.
381
+ * @readonly
382
+ */
383
+ _id?: string;
384
+ /** Category label. Displayed in the Category Menu. */
385
+ label?: string;
386
+ /**
387
+ * Number of posts in the category.
388
+ * @readonly
389
+ */
390
+ postCount?: number;
391
+ /**
392
+ * Category URL.
393
+ *
394
+ *
395
+ * The `url` directs you to a page that lists every post with the specified category.
396
+ *
397
+ * @readonly
398
+ */
399
+ url?: string;
400
+ /** Category description. */
401
+ description?: string | null;
402
+ /** Category title. */
403
+ title?: string;
404
+ /** Reserved for internal use. */
405
+ rank?: number | null;
406
+ /** Position of the category in the [Category Menu](https://support.wix.com/en/article/wix-blog-adding-and-customizing-a-category-menu). Categories with lower display position are displayed first. */
407
+ displayPosition?: number | null;
408
+ /** ID of the category's translations when [Wix Multilingual](https://wix.wixanswers.com/app/kb/article/36837a9d-5d22-4fa1-9a80-1b99b7f82b5e/en) is installed on a site. All translations of a single category will share the same `translationId`. */
409
+ translationId?: string | null;
410
+ /**
411
+ * Category Language.</br>
412
+ * 2-letter language code in [ISO 639-1 format](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes).
413
+ */
414
+ language?: string;
415
+ /**
416
+ * Part of a category's URL that refers to a specific category.
417
+ *
418
+ *
419
+ * For example, `'https:/example.com/blog/category/{my-category-slug}'`.
420
+ */
421
+ slug?: string;
422
+ /** SEO data. */
423
+ seoData?: SeoSchema;
424
+ /** Category cover image. */
425
+ coverImage?: string;
426
+ }
427
+ export interface UpdateCategoryOptions {
428
+ /** Field mask of fields to update. */
429
+ fieldMask?: string[];
430
+ /**
431
+ * List of category fields to be included if entities are present in the response.
432
+ * Base fieldset, which is default, will return all core category properties.
433
+ * Example: When URL fieldset is selected, returned category will have a set of base properties and category url.
434
+ */
435
+ fieldsets?: Field[];
436
+ }
437
+ /**
438
+ * Gets a category by the specified ID.
439
+ *
440
+ *
441
+ * The `getCategory()` function returns a Promise that resolves to a category whose ID matches the specified ID.
442
+ *
443
+ * @param categoryId - Category ID.
444
+ * @public
445
+ * @requiredField categoryId
446
+ * @param options - Options specifying which fields to return.
447
+ */
448
+ export declare function getCategory(categoryId: string, options?: GetCategoryOptions): Promise<GetCategoryResponse>;
449
+ export interface GetCategoryOptions {
450
+ /**
451
+ * List of category fields to be included in the response. By default, any fields not passed are not returned.
452
+ *
453
+ * Supported Values:
454
+ * `"SEO"` and `"URL"`.
455
+ */
456
+ fieldsets?: Field[];
457
+ }
458
+ /**
459
+ * Gets a category by the specified slug.
460
+ *
461
+ *
462
+ * The `getCategoryBySlug()` function returns a Promise that resolves to a category whose slug matches the specified slug.
463
+ *
464
+ * The `slug` is the end of a category's URL that refers to a specific category. For example, if a category's URL is `https://example.com/blog/category/{my-category-slug}`, the slug is `my-post-slug`. The slug is case-sensitive string that is generally derived from the category's `label`, unless specified otherwise.
465
+ *
466
+ * @public
467
+ * @requiredField GetCategoryBySlugRequest
468
+ * @requiredField slug
469
+ * @param slug - Slug of the category to retrieve.
470
+ *
471
+ * The end of a category's URL. For example, `'https:/example.com/blog/category/{my-category-slug}'`. Case sensitive and generally based on the category `label` if not specified.
472
+ * @param options - Options specifying which fields to return.
473
+ */
474
+ export declare function getCategoryBySlug(slug: string, options?: GetCategoryBySlugOptions): Promise<GetCategoryBySlugResponse>;
475
+ export interface GetCategoryBySlugOptions {
476
+ /**
477
+ * List of category fields to be included in the response. By default, any fields not passed are not returned.
478
+ *
479
+ * Supported Values:
480
+ * `"SEO"` and `"URL"`.
481
+ */
482
+ fieldsets?: Field[];
483
+ }
484
+ /**
485
+ * Retrieves a list of categories.
486
+ *
487
+ *
488
+ * The `listCategories()` function returns a Promise that resolves to a list of up to 100 categories per language in order of their `displayPosition` starting with `0`. The `displayPosition` is the position in which the categories are displayed in the Category Menu page. By default, categories get added to the bottom of the Category Menu with a `displayPosition` of `-1`.
489
+ * @public
490
+ * @param options - Filter and paging options.
491
+ */
492
+ export declare function listCategories(options?: ListCategoriesOptions): Promise<ListCategoriesResponse>;
493
+ export interface ListCategoriesOptions {
494
+ /** Pagination options. */
495
+ paging?: BlogPaging;
496
+ /**
497
+ * List of category fields to be included in the response. By default, any fields not passed are not returned.
498
+ *
499
+ * Supported Values:
500
+ * `"SEO"` and `"URL"`.
501
+ */
502
+ fieldsets?: Field[];
503
+ }
504
+ /**
505
+ * Creates a query to retrieve a list of categories.
506
+ *
507
+ *
508
+ * The `queryCategories()` function builds a query to retrieve a list of up to 100 categories per language, and returns a [`CategoriesQueryBuilder`](https://www.wix.com/velo/reference/wix-blog-backend/category/categoriesquerybuilder) object.
509
+ *
510
+ * 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/category/categoriesquerybuilder/find) function.
511
+ *
512
+ * You can refine the query by chaining `CategoriesQueryBuilder` functions to the query. `CategoriesQueryBuilder` functions enable you to sort, filter, and control the results that `queryCategories` returns. Any functions chained to the `queryCategories()` function are applied in the order that they are called.
513
+ *
514
+ * `queryCategories()` runs with these `CategoriesQueryBuilder` defaults, which you can override.
515
+ * - [`limit(100)`](https://www.wix.com/velo/reference/wix-blog-backend/category/categoriesquerybuilder/limit)
516
+ * - [`ascending(displayPosition)`](https://www.wix.com/velo/reference/wix-blog-backend/category/categoriesquerybuilder/ascending)
517
+ *
518
+ * The following `CategoriesQueryBuilder` functions are supported for `queryCategories()`. For a full description of the `Categories` object, see the object returned for the [`items`](https://www.wix.com/velo/reference/wix-blog-backend/category/categoriesqueryresult/items) property in [`CategoriesQueryResult`](https://www.wix.com/velo/reference/wix-blog-backend/category/categoriesqueryresult).
519
+ * @public */
520
+ export declare function queryCategories(): CategoriesQueryBuilder;
521
+ interface QueryOffsetResult {
522
+ currentPage: number;
523
+ totalPages: number;
524
+ totalCount: number;
525
+ hasNext: () => boolean;
526
+ hasPrev: () => boolean;
527
+ length: number;
528
+ pageSize: number;
529
+ }
530
+ export interface CategoriesQueryResult extends QueryOffsetResult {
531
+ items: Category[];
532
+ query: CategoriesQueryBuilder;
533
+ next: () => Promise<CategoriesQueryResult>;
534
+ prev: () => Promise<CategoriesQueryResult>;
535
+ }
536
+ export interface CategoriesQueryBuilder {
537
+ /** @param propertyName - Property whose value is compared with `value`.
538
+ * @param value - Value to compare against.
539
+ */
540
+ eq: (propertyName: string, value: any) => CategoriesQueryBuilder;
541
+ /** @param propertyName - Property whose value is compared with `value`.
542
+ * @param value - Value to compare against.
543
+ */
544
+ ne: (propertyName: string, value: any) => CategoriesQueryBuilder;
545
+ /** @param propertyName - Property whose value is compared with `value`.
546
+ * @param value - Value to compare against.
547
+ */
548
+ ge: (propertyName: string, value: any) => CategoriesQueryBuilder;
549
+ /** @param propertyName - Property whose value is compared with `value`.
550
+ * @param value - Value to compare against.
551
+ */
552
+ gt: (propertyName: string, value: any) => CategoriesQueryBuilder;
553
+ /** @param propertyName - Property whose value is compared with `value`.
554
+ * @param value - Value to compare against.
555
+ */
556
+ le: (propertyName: string, value: any) => CategoriesQueryBuilder;
557
+ /** @param propertyName - Property whose value is compared with `value`.
558
+ * @param value - Value to compare against.
559
+ */
560
+ lt: (propertyName: string, value: any) => CategoriesQueryBuilder;
561
+ /** @param propertyName - Property whose value is compared with `string`.
562
+ * @param string - String to compare against. Case-insensitive.
563
+ */
564
+ startsWith: (propertyName: string, value: string) => CategoriesQueryBuilder;
565
+ /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments. */
566
+ ascending: (...propertyNames: string[]) => CategoriesQueryBuilder;
567
+ /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments. */
568
+ descending: (...propertyNames: string[]) => CategoriesQueryBuilder;
569
+ /** @param limit - Number of items to return, which is also the `pageSize` of the results object. */
570
+ limit: (limit: number) => CategoriesQueryBuilder;
571
+ /** @param skip - Number of items to skip in the query results before returning the results. */
572
+ skip: (skip: number) => CategoriesQueryBuilder;
573
+ find: () => Promise<CategoriesQueryResult>;
574
+ }
575
+ /**
576
+ * Deletes a category.
577
+ * @param categoryId - Category ID.
578
+ * @public
579
+ * @requiredField categoryId
580
+ */
581
+ export declare function deleteCategory(categoryId: string): Promise<void>;
582
+ export {};