@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,345 @@
1
+ export interface Tag {
2
+ /**
3
+ * Tag ID.
4
+ * @readonly
5
+ */
6
+ id?: string;
7
+ /**
8
+ * Tag label.
9
+ *
10
+ *
11
+ * A blog cannot have two tags with the same label.
12
+ */
13
+ label?: string;
14
+ /** Tag slug. For example, 'tag-slug'. */
15
+ slug?: string;
16
+ /**
17
+ * Date the tag was created.
18
+ * @readonly
19
+ */
20
+ createdDate?: Date;
21
+ /**
22
+ * Date the tag was updated.
23
+ * @readonly
24
+ */
25
+ updatedDate?: Date;
26
+ /**
27
+ * Number of posts with this tag, including unpublished draft posts.
28
+ * @readonly
29
+ */
30
+ postCount?: number;
31
+ /**
32
+ * Tag URL.
33
+ * @readonly
34
+ */
35
+ url?: PageUrl;
36
+ /**
37
+ * Number of published posts with this tag.
38
+ * @readonly
39
+ */
40
+ publishedPostCount?: number;
41
+ /**
42
+ * ID of the tag translations.
43
+ *
44
+ *
45
+ * All translations of a single tag will share the same `translationId`.
46
+ * @readonly
47
+ */
48
+ translationId?: string | null;
49
+ /**
50
+ * Tag language.
51
+ *
52
+ *
53
+ * 2-letter language code in [ISO 639-1 alpha-2](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.
54
+ * @readonly
55
+ */
56
+ language?: string | null;
57
+ }
58
+ export interface PageUrl {
59
+ /** 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) */
60
+ base?: string;
61
+ /** The path to that page - e.g /product-page/a-product */
62
+ path?: string;
63
+ }
64
+ export interface GetOrCreateTagRequest {
65
+ /** Tag name. Unique per blog. */
66
+ label?: string;
67
+ /** Tag language. */
68
+ language?: string;
69
+ /**
70
+ * List of tag fields to be included if entities are present in the response.
71
+ * Base fieldset, which is default, will return all core tag properties.
72
+ * Example: When URL fieldset is selected, returned tag will have a set of base properties and tag url.
73
+ */
74
+ fieldsets?: Field[];
75
+ }
76
+ export declare enum Field {
77
+ UNKNOWN = "UNKNOWN",
78
+ /** Includes Tag URL when present. */
79
+ URL = "URL"
80
+ }
81
+ export interface GetOrCreateTagResponse {
82
+ /** Tag info. */
83
+ tag?: Tag;
84
+ }
85
+ export interface CreateTagRequest {
86
+ /** Tag label. Unique per blog. */
87
+ label: string;
88
+ /** Tag language. */
89
+ language?: string;
90
+ /** Preferred tag slug. For example, 'tag-slug'. */
91
+ slug?: string | null;
92
+ /**
93
+ * List of tag fields to be included if entities are present in the response.
94
+ * Base fieldset, which is default, will return all core tag properties.
95
+ * Example: When URL fieldset is selected, returned tag will have a set of base properties and tag url.
96
+ */
97
+ fieldsets?: Field[];
98
+ }
99
+ export interface CreateTagResponse {
100
+ /** Tag info. */
101
+ tag?: Tag;
102
+ }
103
+ export interface UpdateTagRequest {
104
+ /** Tag info. */
105
+ tag?: Tag;
106
+ /** Field mask of fields to update. */
107
+ fieldMask?: string[];
108
+ /**
109
+ * List of tag fields to be included if entities are present in the response.
110
+ * Base fieldset, which is default, will return all core tag properties.
111
+ * Example: When URL fieldset is selected, returned tag will have a set of base properties and tag url.
112
+ */
113
+ fieldsets?: Field[];
114
+ }
115
+ export interface UpdateTagResponse {
116
+ /** Tag info. */
117
+ tag?: Tag;
118
+ }
119
+ export interface BulkCreateTagsRequest {
120
+ /** Tags to create. */
121
+ tags?: Tag[];
122
+ /** Whether to return the full created tag entities in the response. */
123
+ returnFullEntity?: boolean;
124
+ /**
125
+ * List of tag fields to be included if entities are present in the response.
126
+ * Base fieldset, which is default, will return all core tag properties.
127
+ * Example: When URL fieldset is selected, returned tag will have a set of base properties and tag url.
128
+ */
129
+ fieldsets?: Field[];
130
+ }
131
+ export interface BulkCreateTagsResponse {
132
+ /** Tags created by bulk action. */
133
+ results?: BulkTagResult[];
134
+ /** Bulk action metadata. */
135
+ bulkActionMetadata?: BulkActionMetadata;
136
+ }
137
+ export interface BulkTagResult {
138
+ /** Bulk actions metadata for tag. */
139
+ itemMetadata?: ItemMetadata;
140
+ /** Optional created tag. */
141
+ item?: Tag;
142
+ }
143
+ export interface ItemMetadata {
144
+ /** Item ID. Should always be available, unless it's impossible (for example, when failing to create an item). */
145
+ id?: string | null;
146
+ /** Index of the item within the request array. Allows for correlation between request and response items. */
147
+ originalIndex?: number;
148
+ /** Whether the requested action was successful for this item. When `false`, the `error` field is populated. */
149
+ success?: boolean;
150
+ /** Details about the error in case of failure. */
151
+ error?: ApplicationError;
152
+ }
153
+ export interface ApplicationError {
154
+ code?: string;
155
+ description?: string;
156
+ data?: Record<string, any> | null;
157
+ }
158
+ export interface BulkActionMetadata {
159
+ /** Number of items that were successfully processed. */
160
+ totalSuccesses?: number;
161
+ /** Number of items that couldn't be processed. */
162
+ totalFailures?: number;
163
+ /** Number of failures without details because detailed failure threshold was exceeded. */
164
+ undetailedFailures?: number;
165
+ }
166
+ export interface GetTagByLabelRequest {
167
+ /** Tag label. */
168
+ label: string;
169
+ /** Tag language. */
170
+ language?: string | null;
171
+ /**
172
+ * List of tag fields to be included if entities are present in the response.
173
+ * Base fieldset, which is default, will return all core tag properties.
174
+ * Example: When URL fieldset is selected, returned tag will have a set of base properties and tag url.
175
+ */
176
+ fieldsets?: Field[];
177
+ }
178
+ export interface GetTagByLabelResponse {
179
+ /** Tag info. */
180
+ tag?: Tag;
181
+ }
182
+ export interface GetTagRequest {
183
+ /** Tag ID. */
184
+ tagId: string;
185
+ /**
186
+ * List of tag fields to be included if entities are present in the response.
187
+ * Base fieldset, which is default, will return all core tag properties.
188
+ * Example: When URL fieldset is selected, returned tag will have a set of base properties and tag url.
189
+ */
190
+ fieldsets?: Field[];
191
+ }
192
+ export interface GetTagResponse {
193
+ /** Tag info. */
194
+ tag?: Tag;
195
+ }
196
+ export interface GetTagBySlugRequest {
197
+ /** Slug of the tag to retrieve. */
198
+ slug: string;
199
+ /**
200
+ * List of tag fields to be included if entities are present in the response.
201
+ * Base fieldset, which is default, will return all core tag properties.
202
+ * Example: When URL fieldset is selected, returned tag will have a set of base properties and tag url.
203
+ */
204
+ fieldsets?: Field[];
205
+ }
206
+ export interface GetTagBySlugResponse {
207
+ /** Tag info. */
208
+ tag?: Tag;
209
+ }
210
+ export interface QueryTagsRequest {
211
+ /** Query options. */
212
+ query?: PlatformQuery;
213
+ /**
214
+ * List of tag fields to be included if entities are present in the response.
215
+ * Base fieldset, which is default, will return all core tag properties.
216
+ * Example: When URL fieldset is selected, returned tag will have a set of base properties and tag url.
217
+ */
218
+ fieldsets?: Field[];
219
+ }
220
+ export interface Sorting {
221
+ /** Name of the field to sort by. */
222
+ fieldName?: string;
223
+ /** Sort order. */
224
+ order?: SortOrder;
225
+ }
226
+ export declare enum SortOrder {
227
+ ASC = "ASC",
228
+ DESC = "DESC"
229
+ }
230
+ export interface Paging {
231
+ /** Number of items to load. */
232
+ limit?: number | null;
233
+ /** Number of items to skip in the current sort order. */
234
+ offset?: number | null;
235
+ }
236
+ export interface TagsFieldSet {
237
+ /** Includes tag URL when TRUE. Defaults to FALSE. */
238
+ includeUrl?: boolean;
239
+ }
240
+ export interface PlatformQuery extends PlatformQueryPagingMethodOneOf {
241
+ /**
242
+ * Filter object in the following format:
243
+ * `"filter" : {
244
+ * "fieldName1": "value1",
245
+ * "fieldName2":{"$operator":"value2"}
246
+ * }`
247
+ * Example of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains`
248
+ */
249
+ filter?: Record<string, any> | null;
250
+ /**
251
+ * Sort object in the following format:
252
+ * `[{"fieldName":"sortField1","order":"ASC"},{"fieldName":"sortField2","order":"DESC"}]`
253
+ */
254
+ sort?: Sorting[];
255
+ /** Paging options to limit and skip the number of items. */
256
+ paging?: Paging;
257
+ /** 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`. */
258
+ cursorPaging?: CursorPaging;
259
+ }
260
+ /** @oneof */
261
+ export interface PlatformQueryPagingMethodOneOf {
262
+ /** Paging options to limit and skip the number of items. */
263
+ paging?: Paging;
264
+ /** 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`. */
265
+ cursorPaging?: CursorPaging;
266
+ }
267
+ export interface CursorPaging {
268
+ /** Number of items to load. */
269
+ limit?: number | null;
270
+ /**
271
+ * Pointer to the next or previous page in the list of results.
272
+ *
273
+ * You can get the relevant cursor token
274
+ * from the `pagingMetadata` object in the previous call's response.
275
+ * Not relevant for the first request.
276
+ */
277
+ cursor?: string | null;
278
+ }
279
+ export interface QueryTagsResponse {
280
+ /** List of tags. */
281
+ tags?: Tag[];
282
+ /** Details on the paged set of results returned. */
283
+ pagingMetadata?: PagingMetadataV2;
284
+ }
285
+ export interface MetaData {
286
+ /** Number of items returned in this response. */
287
+ count?: number;
288
+ /** Requested offset. */
289
+ offset?: number;
290
+ /** Total number of items that match the query. */
291
+ total?: number;
292
+ /** Pointer to the next or previous page in the list of results. */
293
+ cursor?: string | null;
294
+ }
295
+ export interface PagingMetadataV2 {
296
+ /** Number of items returned in the response. */
297
+ count?: number | null;
298
+ /** Offset that was requested. */
299
+ offset?: number | null;
300
+ /** Total number of items that match the query. Returned if offset paging is used and the `tooManyToCount` flag is not set. */
301
+ total?: number | null;
302
+ /** Flag that indicates the server failed to calculate the `total` field. */
303
+ tooManyToCount?: boolean | null;
304
+ /** Cursors to navigate through the result pages using `next` and `prev`. Returned if cursor paging is used. */
305
+ cursors?: Cursors;
306
+ }
307
+ export interface Cursors {
308
+ /** Cursor pointing to next page in the list of results. */
309
+ next?: string | null;
310
+ /** Cursor pointing to previous page in the list of results. */
311
+ prev?: string | null;
312
+ }
313
+ export interface ListTagsRequest extends ListTagsRequestPagingMethodOneOf {
314
+ /** 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). */
315
+ sort?: Sorting[];
316
+ /**
317
+ * List of tag fields to be included if entities are present in the response.
318
+ * Base fieldset, which is default, will return all core tag properties.
319
+ * Example: When URL fieldset is selected, returned tag will have a set of base properties and tag url.
320
+ */
321
+ fieldsets?: Field[];
322
+ /** Paging options to limit and skip the number of items. */
323
+ paging?: Paging;
324
+ /** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `sort`. */
325
+ cursorPaging?: CursorPaging;
326
+ }
327
+ /** @oneof */
328
+ export interface ListTagsRequestPagingMethodOneOf {
329
+ /** Paging options to limit and skip the number of items. */
330
+ paging?: Paging;
331
+ /** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `sort`. */
332
+ cursorPaging?: CursorPaging;
333
+ }
334
+ export interface ListTagsResponse {
335
+ /** List of tags. */
336
+ tags?: Tag[];
337
+ /** Details on the paged set of results returned. */
338
+ metaData?: MetaData;
339
+ }
340
+ export interface DeleteTagRequest {
341
+ /** Tag ID. */
342
+ tagId: string;
343
+ }
344
+ export interface DeleteTagResponse {
345
+ }
@@ -0,0 +1,12 @@
1
+ export var Field;
2
+ (function (Field) {
3
+ Field["UNKNOWN"] = "UNKNOWN";
4
+ /** Includes Tag URL when present. */
5
+ Field["URL"] = "URL";
6
+ })(Field || (Field = {}));
7
+ export var SortOrder;
8
+ (function (SortOrder) {
9
+ SortOrder["ASC"] = "ASC";
10
+ SortOrder["DESC"] = "DESC";
11
+ })(SortOrder || (SortOrder = {}));
12
+ //# sourceMappingURL=blog-v3-tag.types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"blog-v3-tag.types.js","sourceRoot":"","sources":["../../../src/blog-v3-tag.types.ts"],"names":[],"mappings":"AA8EA,MAAM,CAAN,IAAY,KAIX;AAJD,WAAY,KAAK;IACf,4BAAmB,CAAA;IACnB,qCAAqC;IACrC,oBAAW,CAAA;AACb,CAAC,EAJW,KAAK,KAAL,KAAK,QAIhB;AAsKD,MAAM,CAAN,IAAY,SAGX;AAHD,WAAY,SAAS;IACnB,wBAAW,CAAA;IACX,0BAAa,CAAA;AACf,CAAC,EAHW,SAAS,KAAT,SAAS,QAGpB"}