@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,391 @@
1
+ export interface Category {
2
+ /**
3
+ * Category ID.
4
+ * @readonly
5
+ */
6
+ id?: string;
7
+ /** Category label. Displayed in the Category Menu. */
8
+ label?: string;
9
+ /**
10
+ * Number of posts in the category.
11
+ * @readonly
12
+ */
13
+ postCount?: number;
14
+ /**
15
+ * Category URL.
16
+ * @readonly
17
+ */
18
+ url?: PageUrl;
19
+ /** Category description. */
20
+ description?: string | null;
21
+ /** Category title. */
22
+ title?: string;
23
+ /**
24
+ * __Deprecated.__ Use `displayPosition` instead.
25
+ * This property will be removed on March 2, 2023.
26
+ *
27
+ * Category position in sequence.
28
+ */
29
+ rank?: number | null;
30
+ /**
31
+ * Category position in sequence. Categories with lower display position are displayed first. A position of `-1` will be at the end of the sequence.
32
+ *
33
+ * Default: `-1`
34
+ */
35
+ displayPosition?: number | null;
36
+ /** ID of the category's translations. All translations of a single category will share the same `translationId`. */
37
+ translationId?: string | null;
38
+ /** Category language.Two-letter language code in [ISO 639-1 alpha-2](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format. */
39
+ language?: string;
40
+ /** Category slug. For example, 'category-slug'. */
41
+ slug?: string;
42
+ /** SEO data. */
43
+ seoData?: SeoSchema;
44
+ /** Category cover image. */
45
+ coverImage?: Image;
46
+ }
47
+ export interface PageUrl {
48
+ /** The base URL. For premium sites, this will be the domain. For free sites, this would be site URL (e.g mysite.wixsite.com/mysite) */
49
+ base?: string;
50
+ /** The path to that page - e.g /product-page/a-product */
51
+ path?: string;
52
+ }
53
+ export interface CoverMedia extends CoverMediaMediaOneOf {
54
+ /** Whether cover media is displayed. */
55
+ displayed?: boolean;
56
+ /** Whether cover media is custom. If `false` the cover image is set to the first media item that appears in the content. */
57
+ custom?: boolean;
58
+ /** Image url. */
59
+ image?: Image;
60
+ /** Video url. */
61
+ video?: Video;
62
+ }
63
+ /** @oneof */
64
+ export interface CoverMediaMediaOneOf {
65
+ /** Image url. */
66
+ image?: Image;
67
+ /** Video url. */
68
+ video?: Video;
69
+ }
70
+ export interface Image {
71
+ /** WixMedia image ID. */
72
+ id?: string;
73
+ /** Image URL. */
74
+ url?: string;
75
+ /**
76
+ * Original image height.
77
+ * @readonly
78
+ */
79
+ height?: number;
80
+ /**
81
+ * Original image width.
82
+ * @readonly
83
+ */
84
+ width?: number;
85
+ /** Image alt text. */
86
+ altText?: string | null;
87
+ /**
88
+ * Image filename.
89
+ * @readonly
90
+ */
91
+ filename?: string | null;
92
+ }
93
+ /** Deprecated - use VideoV2 */
94
+ export interface Video {
95
+ /** WixMedia ID */
96
+ id?: string;
97
+ /** URL of video */
98
+ url?: string;
99
+ /**
100
+ * Original image height
101
+ * @readonly
102
+ */
103
+ height?: number;
104
+ /**
105
+ * Original image width
106
+ * @readonly
107
+ */
108
+ width?: number;
109
+ /** Video poster */
110
+ thumbnail?: Image;
111
+ }
112
+ /**
113
+ * 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.
114
+ * The search engines use this information for ranking purposes, or to display snippets in the search results.
115
+ * 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.
116
+ */
117
+ export interface SeoSchema {
118
+ /** SEO tags information. */
119
+ tags?: Tag[];
120
+ /** SEO general settings. */
121
+ settings?: Settings;
122
+ }
123
+ export interface Tag {
124
+ /** SEO tag type. Supported values: `title`, `meta`, `script`, `link`. */
125
+ type?: string;
126
+ /** SEO tag attributes/properties (name, content, rel, href). */
127
+ props?: Record<string, any> | null;
128
+ /** Tag meta data, e.g. {height: 300, width: 240}. */
129
+ meta?: Record<string, any> | null;
130
+ /** Tag inner content e.g. `<title> inner content </title>`. */
131
+ children?: string;
132
+ /** Whether the tag is a custom tag. */
133
+ custom?: boolean;
134
+ /** Whether the tag is disabled. */
135
+ disabled?: boolean;
136
+ }
137
+ export interface Settings {
138
+ /** disable auto creation of 301 redirects on slug changes (enabled by default). */
139
+ preventAutoRedirect?: boolean;
140
+ }
141
+ export interface CreateCategoryRequest {
142
+ /** Category info. */
143
+ category: Category;
144
+ /**
145
+ * List of category fields to be included if entities are present in the response.
146
+ * Base fieldset, which is default, will return all core category properties.
147
+ * Example: When URL fieldset is selected, returned category will have a set of base properties and category url.
148
+ */
149
+ fieldsets?: Field[];
150
+ }
151
+ export declare enum Field {
152
+ UNKNOWN = "UNKNOWN",
153
+ /** Includes Category url. */
154
+ URL = "URL",
155
+ /**
156
+ * Includes internal id field.
157
+ * Reserved for internal use
158
+ */
159
+ INTERNAL_ID = "INTERNAL_ID",
160
+ /** Includes SEO data. */
161
+ SEO = "SEO"
162
+ }
163
+ export interface CreateCategoryResponse {
164
+ /** Category info. */
165
+ category?: Category;
166
+ }
167
+ export interface BulkCreateCategoriesRequest {
168
+ /** Categories to create. */
169
+ categories?: Category[];
170
+ /** Whether to return the full created category entities in the response. */
171
+ returnFullEntity?: boolean;
172
+ /**
173
+ * List of category fields to be included if entities are present in the response.
174
+ * Base fieldset, which is default, will return all core category properties.
175
+ * Example: When URL fieldset is selected, returned category will have a set of base properties and category url.
176
+ */
177
+ fieldsets?: Field[];
178
+ }
179
+ export interface BulkCreateCategoriesResponse {
180
+ /** Categories created by bulk action. */
181
+ results?: BulkCategoryResult[];
182
+ /** Bulk action metadata. */
183
+ bulkActionMetadata?: BulkActionMetadata;
184
+ }
185
+ export interface BulkCategoryResult {
186
+ /** Bulk actions metadata for category. */
187
+ itemMetadata?: ItemMetadata;
188
+ /** Optional created category. */
189
+ item?: Category;
190
+ }
191
+ export interface ItemMetadata {
192
+ /** Item ID. Should always be available, unless it's impossible (for example, when failing to create an item). */
193
+ id?: string | null;
194
+ /** Index of the item within the request array. Allows for correlation between request and response items. */
195
+ originalIndex?: number;
196
+ /** Whether the requested action was successful for this item. When `false`, the `error` field is populated. */
197
+ success?: boolean;
198
+ /** Details about the error in case of failure. */
199
+ error?: ApplicationError;
200
+ }
201
+ export interface ApplicationError {
202
+ code?: string;
203
+ description?: string;
204
+ data?: Record<string, any> | null;
205
+ }
206
+ export interface BulkActionMetadata {
207
+ /** Number of items that were successfully processed. */
208
+ totalSuccesses?: number;
209
+ /** Number of items that couldn't be processed. */
210
+ totalFailures?: number;
211
+ /** Number of failures without details because detailed failure threshold was exceeded. */
212
+ undetailedFailures?: number;
213
+ }
214
+ export interface UpdateCategoryRequest {
215
+ /** Category info. */
216
+ category: Category;
217
+ /** Field mask of fields to update. */
218
+ fieldMask?: string[];
219
+ /**
220
+ * List of category fields to be included if entities are present in the response.
221
+ * Base fieldset, which is default, will return all core category properties.
222
+ * Example: When URL fieldset is selected, returned category will have a set of base properties and category url.
223
+ */
224
+ fieldsets?: Field[];
225
+ }
226
+ export interface UpdateCategoryResponse {
227
+ /** Category info. */
228
+ category?: Category;
229
+ }
230
+ export interface GetCategoryRequest {
231
+ /** Category ID. */
232
+ categoryId: string;
233
+ /**
234
+ * List of category fields to be included if entities are present in the response.
235
+ * Base fieldset, which is default, will return all core category properties.
236
+ * Example: When URL fieldset is selected, returned category will have a set of base properties and category url.
237
+ */
238
+ fieldsets?: Field[];
239
+ }
240
+ export interface GetCategoryResponse {
241
+ /** Category info. */
242
+ category?: Category;
243
+ }
244
+ export interface GetCategoryBySlugRequest {
245
+ /** Slug of the category to retrieve. */
246
+ slug: string;
247
+ /**
248
+ * List of category fields to be included if entities are present in the response.
249
+ * Base fieldset, which is default, will return all core category properties.
250
+ * Example: When URL fieldset is selected, returned category will have a set of base properties and category url.
251
+ */
252
+ fieldsets?: Field[];
253
+ }
254
+ export interface GetCategoryBySlugResponse {
255
+ /** Category info. */
256
+ category?: Category;
257
+ }
258
+ export interface ListCategoriesRequest {
259
+ /** Pagination options. */
260
+ paging?: BlogPaging;
261
+ /**
262
+ * List of category fields to be included if entities are present in the response.
263
+ * Base fieldset, which is default, will return all core category properties.
264
+ * Example: When URL fieldset is selected, returned category will have a set of base properties and category url.
265
+ */
266
+ fieldsets?: Field[];
267
+ }
268
+ export interface BlogPaging {
269
+ /** Number of items to skip in the current sort order. */
270
+ offset?: number;
271
+ /**
272
+ * Number of items to return.
273
+ *
274
+ *
275
+ * Default:`50`.
276
+ */
277
+ limit?: number;
278
+ /** Pointer to the next or previous page in the list of results. */
279
+ cursor?: string | null;
280
+ }
281
+ export interface ListCategoriesResponse {
282
+ /** List of categories. */
283
+ categories?: Category[];
284
+ /** Details on the paged set of results returned. */
285
+ metaData?: MetaData;
286
+ }
287
+ export interface MetaData {
288
+ /** Number of items returned in this response. */
289
+ count?: number;
290
+ /** Requested offset. */
291
+ offset?: number;
292
+ /** Total number of items that match the query. */
293
+ total?: number;
294
+ /** Pointer to the next or previous page in the list of results. */
295
+ cursor?: string | null;
296
+ }
297
+ export interface QueryCategoriesRequest {
298
+ /** Query options. */
299
+ query?: PlatformQuery;
300
+ /**
301
+ * List of category fields to be included if entities are present in the response.
302
+ * Base fieldset, which is default, will return all core category properties.
303
+ * Example: When URL fieldset is selected, returned category will have a set of base properties and category url.
304
+ */
305
+ fieldsets?: Field[];
306
+ }
307
+ export interface Sorting {
308
+ /** Name of the field to sort by. */
309
+ fieldName?: string;
310
+ /** Sort order. */
311
+ order?: SortOrder;
312
+ }
313
+ export declare enum SortOrder {
314
+ ASC = "ASC",
315
+ DESC = "DESC"
316
+ }
317
+ export interface PlatformQuery extends PlatformQueryPagingMethodOneOf {
318
+ /**
319
+ * Filter object in the following format:
320
+ * `"filter" : {
321
+ * "fieldName1": "value1",
322
+ * "fieldName2":{"$operator":"value2"}
323
+ * }`
324
+ * Example of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains`
325
+ */
326
+ filter?: Record<string, any> | null;
327
+ /**
328
+ * Sort object in the following format:
329
+ * `[{"fieldName":"sortField1","order":"ASC"},{"fieldName":"sortField2","order":"DESC"}]`
330
+ */
331
+ sort?: Sorting[];
332
+ /** Paging options to limit and skip the number of items. */
333
+ paging?: Paging;
334
+ /** 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`. */
335
+ cursorPaging?: CursorPaging;
336
+ }
337
+ /** @oneof */
338
+ export interface PlatformQueryPagingMethodOneOf {
339
+ /** Paging options to limit and skip the number of items. */
340
+ paging?: Paging;
341
+ /** 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`. */
342
+ cursorPaging?: CursorPaging;
343
+ }
344
+ export interface Paging {
345
+ /** Number of items to load. */
346
+ limit?: number | null;
347
+ /** Number of items to skip in the current sort order. */
348
+ offset?: number | null;
349
+ }
350
+ export interface CursorPaging {
351
+ /** Number of items to load. */
352
+ limit?: number | null;
353
+ /**
354
+ * Pointer to the next or previous page in the list of results.
355
+ *
356
+ * You can get the relevant cursor token
357
+ * from the `pagingMetadata` object in the previous call's response.
358
+ * Not relevant for the first request.
359
+ */
360
+ cursor?: string | null;
361
+ }
362
+ export interface QueryCategoriesResponse {
363
+ /** List of categories. */
364
+ categories?: Category[];
365
+ /** Details on the paged set of results returned. */
366
+ pagingMetadata?: PagingMetadataV2;
367
+ }
368
+ export interface PagingMetadataV2 {
369
+ /** Number of items returned in the response. */
370
+ count?: number | null;
371
+ /** Offset that was requested. */
372
+ offset?: number | null;
373
+ /** Total number of items that match the query. Returned if offset paging is used and the `tooManyToCount` flag is not set. */
374
+ total?: number | null;
375
+ /** Flag that indicates the server failed to calculate the `total` field. */
376
+ tooManyToCount?: boolean | null;
377
+ /** Cursors to navigate through the result pages using `next` and `prev`. Returned if cursor paging is used. */
378
+ cursors?: Cursors;
379
+ }
380
+ export interface Cursors {
381
+ /** Cursor pointing to next page in the list of results. */
382
+ next?: string | null;
383
+ /** Cursor pointing to previous page in the list of results. */
384
+ prev?: string | null;
385
+ }
386
+ export interface DeleteCategoryRequest {
387
+ /** Category ID. */
388
+ categoryId: string;
389
+ }
390
+ export interface DeleteCategoryResponse {
391
+ }
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SortOrder = exports.Field = void 0;
4
+ var Field;
5
+ (function (Field) {
6
+ Field["UNKNOWN"] = "UNKNOWN";
7
+ /** Includes Category url. */
8
+ Field["URL"] = "URL";
9
+ /**
10
+ * Includes internal id field.
11
+ * Reserved for internal use
12
+ */
13
+ Field["INTERNAL_ID"] = "INTERNAL_ID";
14
+ /** Includes SEO data. */
15
+ Field["SEO"] = "SEO";
16
+ })(Field = exports.Field || (exports.Field = {}));
17
+ var SortOrder;
18
+ (function (SortOrder) {
19
+ SortOrder["ASC"] = "ASC";
20
+ SortOrder["DESC"] = "DESC";
21
+ })(SortOrder = exports.SortOrder || (exports.SortOrder = {}));
22
+ //# sourceMappingURL=blog-v3-category.types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"blog-v3-category.types.js","sourceRoot":"","sources":["../../../src/blog-v3-category.types.ts"],"names":[],"mappings":";;;AAgKA,IAAY,KAWX;AAXD,WAAY,KAAK;IACf,4BAAmB,CAAA;IACnB,6BAA6B;IAC7B,oBAAW,CAAA;IACX;;;OAGG;IACH,oCAA2B,CAAA;IAC3B,yBAAyB;IACzB,oBAAW,CAAA;AACb,CAAC,EAXW,KAAK,GAAL,aAAK,KAAL,aAAK,QAWhB;AA2KD,IAAY,SAGX;AAHD,WAAY,SAAS;IACnB,wBAAW,CAAA;IACX,0BAAa,CAAA;AACf,CAAC,EAHW,SAAS,GAAT,iBAAS,KAAT,iBAAS,QAGpB"}