@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.
- package/build/cjs/index.d.ts +3 -0
- package/build/cjs/index.js +26 -0
- package/build/cjs/index.js.map +1 -0
- package/build/cjs/src/blog-v3-category.http.d.ts +50 -0
- package/build/cjs/src/blog-v3-category.http.js +421 -0
- package/build/cjs/src/blog-v3-category.http.js.map +1 -0
- package/build/cjs/src/blog-v3-category.public.d.ts +11 -0
- package/build/cjs/src/blog-v3-category.public.js +50 -0
- package/build/cjs/src/blog-v3-category.public.js.map +1 -0
- package/build/cjs/src/blog-v3-category.types.d.ts +391 -0
- package/build/cjs/src/blog-v3-category.types.js +22 -0
- package/build/cjs/src/blog-v3-category.types.js.map +1 -0
- package/build/cjs/src/blog-v3-category.universal.d.ts +582 -0
- package/build/cjs/src/blog-v3-category.universal.js +460 -0
- package/build/cjs/src/blog-v3-category.universal.js.map +1 -0
- package/build/cjs/src/blog-v3-post.http.d.ts +81 -0
- package/build/cjs/src/blog-v3-post.http.js +844 -0
- package/build/cjs/src/blog-v3-post.http.js.map +1 -0
- package/build/cjs/src/blog-v3-post.public.d.ts +11 -0
- package/build/cjs/src/blog-v3-post.public.js +86 -0
- package/build/cjs/src/blog-v3-post.public.js.map +1 -0
- package/build/cjs/src/blog-v3-post.types.d.ts +2227 -0
- package/build/cjs/src/blog-v3-post.types.js +464 -0
- package/build/cjs/src/blog-v3-post.types.js.map +1 -0
- package/build/cjs/src/blog-v3-post.universal.d.ts +2488 -0
- package/build/cjs/src/blog-v3-post.universal.js +935 -0
- package/build/cjs/src/blog-v3-post.universal.js.map +1 -0
- package/build/cjs/src/blog-v3-tag.http.d.ts +45 -0
- package/build/cjs/src/blog-v3-tag.http.js +385 -0
- package/build/cjs/src/blog-v3-tag.http.js.map +1 -0
- package/build/cjs/src/blog-v3-tag.public.d.ts +10 -0
- package/build/cjs/src/blog-v3-tag.public.js +44 -0
- package/build/cjs/src/blog-v3-tag.public.js.map +1 -0
- package/build/cjs/src/blog-v3-tag.types.d.ts +345 -0
- package/build/cjs/src/blog-v3-tag.types.js +15 -0
- package/build/cjs/src/blog-v3-tag.types.js.map +1 -0
- package/build/cjs/src/blog-v3-tag.universal.d.ts +512 -0
- package/build/cjs/src/blog-v3-tag.universal.js +390 -0
- package/build/cjs/src/blog-v3-tag.universal.js.map +1 -0
- package/build/es/index.d.ts +3 -0
- package/build/es/index.js +4 -0
- package/build/es/index.js.map +1 -0
- package/build/es/src/blog-v3-category.http.d.ts +50 -0
- package/build/es/src/blog-v3-category.http.js +411 -0
- package/build/es/src/blog-v3-category.http.js.map +1 -0
- package/build/es/src/blog-v3-category.public.d.ts +11 -0
- package/build/es/src/blog-v3-category.public.js +38 -0
- package/build/es/src/blog-v3-category.public.js.map +1 -0
- package/build/es/src/blog-v3-category.types.d.ts +391 -0
- package/build/es/src/blog-v3-category.types.js +19 -0
- package/build/es/src/blog-v3-category.types.js.map +1 -0
- package/build/es/src/blog-v3-category.universal.d.ts +582 -0
- package/build/es/src/blog-v3-category.universal.js +431 -0
- package/build/es/src/blog-v3-category.universal.js.map +1 -0
- package/build/es/src/blog-v3-post.http.d.ts +81 -0
- package/build/es/src/blog-v3-post.http.js +834 -0
- package/build/es/src/blog-v3-post.http.js.map +1 -0
- package/build/es/src/blog-v3-post.public.d.ts +11 -0
- package/build/es/src/blog-v3-post.public.js +38 -0
- package/build/es/src/blog-v3-post.public.js.map +1 -0
- package/build/es/src/blog-v3-post.types.d.ts +2227 -0
- package/build/es/src/blog-v3-post.types.js +461 -0
- package/build/es/src/blog-v3-post.types.js.map +1 -0
- package/build/es/src/blog-v3-post.universal.d.ts +2488 -0
- package/build/es/src/blog-v3-post.universal.js +906 -0
- package/build/es/src/blog-v3-post.universal.js.map +1 -0
- package/build/es/src/blog-v3-tag.http.d.ts +45 -0
- package/build/es/src/blog-v3-tag.http.js +376 -0
- package/build/es/src/blog-v3-tag.http.js.map +1 -0
- package/build/es/src/blog-v3-tag.public.d.ts +10 -0
- package/build/es/src/blog-v3-tag.public.js +33 -0
- package/build/es/src/blog-v3-tag.public.js.map +1 -0
- package/build/es/src/blog-v3-tag.types.d.ts +345 -0
- package/build/es/src/blog-v3-tag.types.js +12 -0
- package/build/es/src/blog-v3-tag.types.js.map +1 -0
- package/build/es/src/blog-v3-tag.universal.d.ts +512 -0
- package/build/es/src/blog-v3-tag.universal.js +362 -0
- package/build/es/src/blog-v3-tag.universal.js.map +1 -0
- package/package.json +37 -0
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
+
}) : (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
o[k2] = m[k];
|
|
8
|
+
}));
|
|
9
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
10
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
11
|
+
}) : function(o, v) {
|
|
12
|
+
o["default"] = v;
|
|
13
|
+
});
|
|
14
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
15
|
+
if (mod && mod.__esModule) return mod;
|
|
16
|
+
var result = {};
|
|
17
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
18
|
+
__setModuleDefault(result, mod);
|
|
19
|
+
return result;
|
|
20
|
+
};
|
|
21
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
|
+
exports.tags = exports.posts = exports.categories = void 0;
|
|
23
|
+
exports.categories = __importStar(require("./src/blog-v3-category.public"));
|
|
24
|
+
exports.posts = __importStar(require("./src/blog-v3-post.public"));
|
|
25
|
+
exports.tags = __importStar(require("./src/blog-v3-tag.public"));
|
|
26
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,4EAA4D;AAC5D,mEAAmD;AACnD,iEAAiD"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { RequestOptionsFactory } from '@wix/sdk-types';
|
|
2
|
+
import { CreateCategoryRequest, CreateCategoryResponse, DeleteCategoryRequest, DeleteCategoryResponse, GetCategoryBySlugRequest, GetCategoryBySlugResponse, GetCategoryRequest, GetCategoryResponse, ListCategoriesRequest, ListCategoriesResponse, QueryCategoriesRequest, QueryCategoriesResponse, UpdateCategoryRequest, UpdateCategoryResponse } from './blog-v3-category.types';
|
|
3
|
+
/** Creates a category. */
|
|
4
|
+
export declare function createCategory(payload: CreateCategoryRequest): RequestOptionsFactory<CreateCategoryResponse>;
|
|
5
|
+
/** Updates a category. */
|
|
6
|
+
export declare function updateCategory(payload: UpdateCategoryRequest): RequestOptionsFactory<UpdateCategoryResponse>;
|
|
7
|
+
/**
|
|
8
|
+
* Gets a category by the specified ID.
|
|
9
|
+
*
|
|
10
|
+
*
|
|
11
|
+
* The `getCategory()` function returns a Promise that resolves to a category whose ID matches the specified ID.
|
|
12
|
+
*
|
|
13
|
+
*/
|
|
14
|
+
export declare function getCategory(payload: GetCategoryRequest): RequestOptionsFactory<GetCategoryResponse>;
|
|
15
|
+
/**
|
|
16
|
+
* Gets a category by the specified slug.
|
|
17
|
+
*
|
|
18
|
+
*
|
|
19
|
+
* The `getCategoryBySlug()` function returns a Promise that resolves to a category whose slug matches the specified slug.
|
|
20
|
+
*
|
|
21
|
+
* 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.
|
|
22
|
+
*
|
|
23
|
+
*/
|
|
24
|
+
export declare function getCategoryBySlug(payload: GetCategoryBySlugRequest): RequestOptionsFactory<GetCategoryBySlugResponse>;
|
|
25
|
+
/**
|
|
26
|
+
* Retrieves a list of categories.
|
|
27
|
+
*
|
|
28
|
+
*
|
|
29
|
+
* 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`.
|
|
30
|
+
*/
|
|
31
|
+
export declare function listCategories(payload: ListCategoriesRequest): RequestOptionsFactory<ListCategoriesResponse>;
|
|
32
|
+
/**
|
|
33
|
+
* Creates a query to retrieve a list of categories.
|
|
34
|
+
*
|
|
35
|
+
*
|
|
36
|
+
* 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.
|
|
37
|
+
*
|
|
38
|
+
* 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.
|
|
39
|
+
*
|
|
40
|
+
* 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.
|
|
41
|
+
*
|
|
42
|
+
* `queryCategories()` runs with these `CategoriesQueryBuilder` defaults, which you can override.
|
|
43
|
+
* - [`limit(100)`](https://www.wix.com/velo/reference/wix-blog-backend/category/categoriesquerybuilder/limit)
|
|
44
|
+
* - [`ascending(displayPosition)`](https://www.wix.com/velo/reference/wix-blog-backend/category/categoriesquerybuilder/ascending)
|
|
45
|
+
*
|
|
46
|
+
* 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).
|
|
47
|
+
*/
|
|
48
|
+
export declare function queryCategories(payload: QueryCategoriesRequest): RequestOptionsFactory<QueryCategoriesResponse>;
|
|
49
|
+
/** Deletes a category. */
|
|
50
|
+
export declare function deleteCategory(payload: DeleteCategoryRequest): RequestOptionsFactory<DeleteCategoryResponse>;
|
|
@@ -0,0 +1,421 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.deleteCategory = exports.queryCategories = exports.listCategories = exports.getCategoryBySlug = exports.getCategory = exports.updateCategory = exports.createCategory = void 0;
|
|
4
|
+
const metro_runtime_1 = require("@wix/metro-runtime");
|
|
5
|
+
const ambassador_1 = require("@wix/metro-runtime/ambassador");
|
|
6
|
+
const metro_runtime_2 = require("@wix/metro-runtime");
|
|
7
|
+
const _category = { coverMedia: '_coverMedia', coverImage: '_image' };
|
|
8
|
+
const _coverMedia = { image: '_image', video: '_video' };
|
|
9
|
+
const _createCategoryRequest = { category: '_category' };
|
|
10
|
+
const _createCategoryResponse = { category: '_category' };
|
|
11
|
+
const _deleteCategoryRequest = {};
|
|
12
|
+
const _deleteCategoryResponse = {};
|
|
13
|
+
const _getCategoryBySlugRequest = {};
|
|
14
|
+
const _getCategoryBySlugResponse = { category: '_category' };
|
|
15
|
+
const _getCategoryRequest = {};
|
|
16
|
+
const _getCategoryResponse = { category: '_category' };
|
|
17
|
+
const _image = { urlExpirationDate: 'google.protobuf.Timestamp' };
|
|
18
|
+
const _listCategoriesRequest = {};
|
|
19
|
+
const _listCategoriesResponse = { categories: '_category' };
|
|
20
|
+
const _queryCategoriesRequest = {};
|
|
21
|
+
const _queryCategoriesResponse = { categories: '_category' };
|
|
22
|
+
const _updateCategoryRequest = {
|
|
23
|
+
fieldMask: 'google.protobuf.FieldMask',
|
|
24
|
+
category: '_category',
|
|
25
|
+
};
|
|
26
|
+
const _updateCategoryResponse = { category: '_category' };
|
|
27
|
+
const _video = { thumbnail: '_image' };
|
|
28
|
+
function resolveComWixpressNpmCommunitiesPlatformizedBlogV3CategoryServiceUrl(opts) {
|
|
29
|
+
const domainToMappings = {
|
|
30
|
+
'api._api_base_domain_': [
|
|
31
|
+
{
|
|
32
|
+
srcPath: '/communities-blog-node-api',
|
|
33
|
+
destPath: '',
|
|
34
|
+
},
|
|
35
|
+
],
|
|
36
|
+
'www._base_domain_': [
|
|
37
|
+
{
|
|
38
|
+
srcPath: '/_api/communities-blog-node-api',
|
|
39
|
+
destPath: '',
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
srcPath: '/_api/communities-blog-node-api/v3/posts',
|
|
43
|
+
destPath: '/v3/posts',
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
srcPath: '/_api/communities-blog-node-api/v3/categories',
|
|
47
|
+
destPath: '/v3/categories',
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
srcPath: '/_api/communities-blog-node-api/v3/tags',
|
|
51
|
+
destPath: '/v3/tags',
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
srcPath: '/_api/communities-blog-node-api/v2/stats',
|
|
55
|
+
destPath: '/v2/stats',
|
|
56
|
+
},
|
|
57
|
+
],
|
|
58
|
+
'apps._base_domain_': [
|
|
59
|
+
{
|
|
60
|
+
srcPath: '/_api/communities-blog-node-api',
|
|
61
|
+
destPath: '',
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
srcPath: '/_api/communities-blog-node-api/v3/posts',
|
|
65
|
+
destPath: '/v3/posts',
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
srcPath: '/_api/communities-blog-node-api/v3/categories',
|
|
69
|
+
destPath: '/v3/categories',
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
srcPath: '/_api/communities-blog-node-api/v3/tags',
|
|
73
|
+
destPath: '/v3/tags',
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
srcPath: '/_api/communities-blog-node-api/v2/stats',
|
|
77
|
+
destPath: '/v2/stats',
|
|
78
|
+
},
|
|
79
|
+
],
|
|
80
|
+
_: [
|
|
81
|
+
{
|
|
82
|
+
srcPath: '/_api/communities-blog-node-api',
|
|
83
|
+
destPath: '',
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
srcPath: '/_api/communities-blog-node-api/_api/blogs/this',
|
|
87
|
+
destPath: '/_api/blogs/this',
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
srcPath: '/_api/communities-blog-node-api/_api/categories',
|
|
91
|
+
destPath: '/_api/categories',
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
srcPath: '/_api/communities-blog-node-api/_api/site-properties',
|
|
95
|
+
destPath: '/_api/site-properties',
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
srcPath: '/_api/communities-blog-node-api/_api/posts/content',
|
|
99
|
+
destPath: '/_api/posts/content',
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
srcPath: '/_api/communities-blog-node-api/v3/posts',
|
|
103
|
+
destPath: '/v3/posts',
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
srcPath: '/_api/communities-blog-node-api/v3/categories',
|
|
107
|
+
destPath: '/v3/categories',
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
srcPath: '/_api/communities-blog-node-api/v3/tags',
|
|
111
|
+
destPath: '/v3/tags',
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
srcPath: '/_api/communities-blog-node-api/v2/stats',
|
|
115
|
+
destPath: '/v2/stats',
|
|
116
|
+
},
|
|
117
|
+
],
|
|
118
|
+
'editor._base_domain_': [
|
|
119
|
+
{
|
|
120
|
+
srcPath: '/_api/communities-blog-node-api',
|
|
121
|
+
destPath: '',
|
|
122
|
+
},
|
|
123
|
+
],
|
|
124
|
+
'blocks._base_domain_': [
|
|
125
|
+
{
|
|
126
|
+
srcPath: '/_api/communities-blog-node-api',
|
|
127
|
+
destPath: '',
|
|
128
|
+
},
|
|
129
|
+
],
|
|
130
|
+
'create.editorx': [
|
|
131
|
+
{
|
|
132
|
+
srcPath: '/_api/communities-blog-node-api',
|
|
133
|
+
destPath: '',
|
|
134
|
+
},
|
|
135
|
+
],
|
|
136
|
+
'*.dev.wix-code.com': [
|
|
137
|
+
{
|
|
138
|
+
srcPath: '/_api/communities-blog-node-api',
|
|
139
|
+
destPath: '',
|
|
140
|
+
},
|
|
141
|
+
],
|
|
142
|
+
'*.pub.wix-code.com': [
|
|
143
|
+
{
|
|
144
|
+
srcPath: '/_api/communities-blog-node-api',
|
|
145
|
+
destPath: '',
|
|
146
|
+
},
|
|
147
|
+
],
|
|
148
|
+
'bo._base_domain_': [
|
|
149
|
+
{
|
|
150
|
+
srcPath: '/_api/communities-blog-node-api',
|
|
151
|
+
destPath: '',
|
|
152
|
+
},
|
|
153
|
+
{
|
|
154
|
+
srcPath: '/_api/communities-blog-node-api',
|
|
155
|
+
destPath: '',
|
|
156
|
+
},
|
|
157
|
+
],
|
|
158
|
+
'manage._base_domain_': [
|
|
159
|
+
{
|
|
160
|
+
srcPath: '/_api/communities-blog-node-api',
|
|
161
|
+
destPath: '',
|
|
162
|
+
},
|
|
163
|
+
],
|
|
164
|
+
'social-blog._base_domain_': [
|
|
165
|
+
{
|
|
166
|
+
srcPath: '/_api/communities-blog-node-api',
|
|
167
|
+
destPath: '',
|
|
168
|
+
},
|
|
169
|
+
],
|
|
170
|
+
'editor.wixapps.net': [
|
|
171
|
+
{
|
|
172
|
+
srcPath: '/_api/communities-blog-node-api',
|
|
173
|
+
destPath: '',
|
|
174
|
+
},
|
|
175
|
+
],
|
|
176
|
+
'dev._base_domain_': [
|
|
177
|
+
{
|
|
178
|
+
srcPath: '/_api/communities-blog-node-api',
|
|
179
|
+
destPath: '',
|
|
180
|
+
},
|
|
181
|
+
],
|
|
182
|
+
'www.wixapis.com': [
|
|
183
|
+
{
|
|
184
|
+
srcPath: '/blog/v2',
|
|
185
|
+
destPath: '/v2',
|
|
186
|
+
},
|
|
187
|
+
{
|
|
188
|
+
srcPath: '/blog/v3',
|
|
189
|
+
destPath: '/v3',
|
|
190
|
+
},
|
|
191
|
+
{
|
|
192
|
+
srcPath: '/v2/stats',
|
|
193
|
+
destPath: '/v2/stats',
|
|
194
|
+
},
|
|
195
|
+
{
|
|
196
|
+
srcPath: '/v3/tags',
|
|
197
|
+
destPath: '/v3/tags',
|
|
198
|
+
},
|
|
199
|
+
{
|
|
200
|
+
srcPath: '/v3/categories',
|
|
201
|
+
destPath: '/v3/categories',
|
|
202
|
+
},
|
|
203
|
+
{
|
|
204
|
+
srcPath: '/v3/posts',
|
|
205
|
+
destPath: '/v3/posts',
|
|
206
|
+
},
|
|
207
|
+
{
|
|
208
|
+
srcPath: '/blog/v3/posts',
|
|
209
|
+
destPath: '/v3/posts',
|
|
210
|
+
},
|
|
211
|
+
{
|
|
212
|
+
srcPath: '/blog/v3/categories',
|
|
213
|
+
destPath: '/v3/categories',
|
|
214
|
+
},
|
|
215
|
+
{
|
|
216
|
+
srcPath: '/blog/v3/tags',
|
|
217
|
+
destPath: '/v3/tags',
|
|
218
|
+
},
|
|
219
|
+
{
|
|
220
|
+
srcPath: '/blog/v2/stats',
|
|
221
|
+
destPath: '/v2/stats',
|
|
222
|
+
},
|
|
223
|
+
],
|
|
224
|
+
};
|
|
225
|
+
return metro_runtime_2.resolveUrl(Object.assign(opts, { domainToMappings }));
|
|
226
|
+
}
|
|
227
|
+
/** Creates a category. */
|
|
228
|
+
function createCategory(payload) {
|
|
229
|
+
const { toJSON: toReq, fromJSON: fromReq } = ambassador_1.serializer(_createCategoryRequest, { _category, _coverMedia, _image, _video });
|
|
230
|
+
const { fromJSON: fromRes } = ambassador_1.serializer(_createCategoryResponse, {
|
|
231
|
+
_category,
|
|
232
|
+
_coverMedia,
|
|
233
|
+
_image,
|
|
234
|
+
_video,
|
|
235
|
+
});
|
|
236
|
+
function __createCategory({ host }) {
|
|
237
|
+
const serializedData = toReq(payload);
|
|
238
|
+
const metadata = {
|
|
239
|
+
method: 'POST',
|
|
240
|
+
url: resolveComWixpressNpmCommunitiesPlatformizedBlogV3CategoryServiceUrl({ protoPath: '/v3/categories', data: serializedData, host }),
|
|
241
|
+
data: serializedData,
|
|
242
|
+
transformResponse: fromRes,
|
|
243
|
+
};
|
|
244
|
+
return metadata;
|
|
245
|
+
}
|
|
246
|
+
__createCategory.fromReq = fromReq;
|
|
247
|
+
return __createCategory;
|
|
248
|
+
}
|
|
249
|
+
exports.createCategory = createCategory;
|
|
250
|
+
/** Updates a category. */
|
|
251
|
+
function updateCategory(payload) {
|
|
252
|
+
const { toJSON: toReq, fromJSON: fromReq } = ambassador_1.serializer(_updateCategoryRequest, { _category, _coverMedia, _image, _video });
|
|
253
|
+
const { fromJSON: fromRes } = ambassador_1.serializer(_updateCategoryResponse, {
|
|
254
|
+
_category,
|
|
255
|
+
_coverMedia,
|
|
256
|
+
_image,
|
|
257
|
+
_video,
|
|
258
|
+
});
|
|
259
|
+
function __updateCategory({ host }) {
|
|
260
|
+
const serializedData = toReq(payload);
|
|
261
|
+
const metadata = {
|
|
262
|
+
method: 'PATCH',
|
|
263
|
+
url: resolveComWixpressNpmCommunitiesPlatformizedBlogV3CategoryServiceUrl({
|
|
264
|
+
protoPath: '/v3/categories/{category.id}',
|
|
265
|
+
data: serializedData,
|
|
266
|
+
host,
|
|
267
|
+
}),
|
|
268
|
+
data: serializedData,
|
|
269
|
+
transformResponse: fromRes,
|
|
270
|
+
};
|
|
271
|
+
return metadata;
|
|
272
|
+
}
|
|
273
|
+
__updateCategory.fromReq = fromReq;
|
|
274
|
+
return __updateCategory;
|
|
275
|
+
}
|
|
276
|
+
exports.updateCategory = updateCategory;
|
|
277
|
+
/**
|
|
278
|
+
* Gets a category by the specified ID.
|
|
279
|
+
*
|
|
280
|
+
*
|
|
281
|
+
* The `getCategory()` function returns a Promise that resolves to a category whose ID matches the specified ID.
|
|
282
|
+
*
|
|
283
|
+
*/
|
|
284
|
+
function getCategory(payload) {
|
|
285
|
+
const { toJSON: toReq, fromJSON: fromReq } = ambassador_1.serializer(_getCategoryRequest, {});
|
|
286
|
+
const { fromJSON: fromRes } = ambassador_1.serializer(_getCategoryResponse, {
|
|
287
|
+
_category,
|
|
288
|
+
_coverMedia,
|
|
289
|
+
_image,
|
|
290
|
+
_video,
|
|
291
|
+
});
|
|
292
|
+
function __getCategory({ host }) {
|
|
293
|
+
const serializedData = toReq(payload);
|
|
294
|
+
const metadata = {
|
|
295
|
+
method: 'GET',
|
|
296
|
+
url: resolveComWixpressNpmCommunitiesPlatformizedBlogV3CategoryServiceUrl({ protoPath: '/v3/categories/{categoryId}', data: serializedData, host }),
|
|
297
|
+
params: metro_runtime_1.toURLSearchParams(serializedData),
|
|
298
|
+
transformResponse: fromRes,
|
|
299
|
+
};
|
|
300
|
+
return metadata;
|
|
301
|
+
}
|
|
302
|
+
__getCategory.fromReq = fromReq;
|
|
303
|
+
return __getCategory;
|
|
304
|
+
}
|
|
305
|
+
exports.getCategory = getCategory;
|
|
306
|
+
/**
|
|
307
|
+
* Gets a category by the specified slug.
|
|
308
|
+
*
|
|
309
|
+
*
|
|
310
|
+
* The `getCategoryBySlug()` function returns a Promise that resolves to a category whose slug matches the specified slug.
|
|
311
|
+
*
|
|
312
|
+
* 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.
|
|
313
|
+
*
|
|
314
|
+
*/
|
|
315
|
+
function getCategoryBySlug(payload) {
|
|
316
|
+
const { toJSON: toReq, fromJSON: fromReq } = ambassador_1.serializer(_getCategoryBySlugRequest, {});
|
|
317
|
+
const { fromJSON: fromRes } = ambassador_1.serializer(_getCategoryBySlugResponse, {
|
|
318
|
+
_category,
|
|
319
|
+
_coverMedia,
|
|
320
|
+
_image,
|
|
321
|
+
_video,
|
|
322
|
+
});
|
|
323
|
+
function __getCategoryBySlug({ host }) {
|
|
324
|
+
const serializedData = toReq(payload);
|
|
325
|
+
const metadata = {
|
|
326
|
+
method: 'GET',
|
|
327
|
+
url: resolveComWixpressNpmCommunitiesPlatformizedBlogV3CategoryServiceUrl({ protoPath: '/v3/categories/slugs/{slug}', data: serializedData, host }),
|
|
328
|
+
params: metro_runtime_1.toURLSearchParams(serializedData),
|
|
329
|
+
transformResponse: fromRes,
|
|
330
|
+
};
|
|
331
|
+
return metadata;
|
|
332
|
+
}
|
|
333
|
+
__getCategoryBySlug.fromReq = fromReq;
|
|
334
|
+
return __getCategoryBySlug;
|
|
335
|
+
}
|
|
336
|
+
exports.getCategoryBySlug = getCategoryBySlug;
|
|
337
|
+
/**
|
|
338
|
+
* Retrieves a list of categories.
|
|
339
|
+
*
|
|
340
|
+
*
|
|
341
|
+
* 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`.
|
|
342
|
+
*/
|
|
343
|
+
function listCategories(payload) {
|
|
344
|
+
const { toJSON: toReq, fromJSON: fromReq } = ambassador_1.serializer(_listCategoriesRequest, {});
|
|
345
|
+
const { fromJSON: fromRes } = ambassador_1.serializer(_listCategoriesResponse, {
|
|
346
|
+
_category,
|
|
347
|
+
_coverMedia,
|
|
348
|
+
_image,
|
|
349
|
+
_video,
|
|
350
|
+
});
|
|
351
|
+
function __listCategories({ host }) {
|
|
352
|
+
const serializedData = toReq(payload);
|
|
353
|
+
const metadata = {
|
|
354
|
+
method: 'GET',
|
|
355
|
+
url: resolveComWixpressNpmCommunitiesPlatformizedBlogV3CategoryServiceUrl({ protoPath: '/v3/categories', data: serializedData, host }),
|
|
356
|
+
params: metro_runtime_1.toURLSearchParams(serializedData),
|
|
357
|
+
transformResponse: fromRes,
|
|
358
|
+
};
|
|
359
|
+
return metadata;
|
|
360
|
+
}
|
|
361
|
+
__listCategories.fromReq = fromReq;
|
|
362
|
+
return __listCategories;
|
|
363
|
+
}
|
|
364
|
+
exports.listCategories = listCategories;
|
|
365
|
+
/**
|
|
366
|
+
* Creates a query to retrieve a list of categories.
|
|
367
|
+
*
|
|
368
|
+
*
|
|
369
|
+
* 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.
|
|
370
|
+
*
|
|
371
|
+
* 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.
|
|
372
|
+
*
|
|
373
|
+
* 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.
|
|
374
|
+
*
|
|
375
|
+
* `queryCategories()` runs with these `CategoriesQueryBuilder` defaults, which you can override.
|
|
376
|
+
* - [`limit(100)`](https://www.wix.com/velo/reference/wix-blog-backend/category/categoriesquerybuilder/limit)
|
|
377
|
+
* - [`ascending(displayPosition)`](https://www.wix.com/velo/reference/wix-blog-backend/category/categoriesquerybuilder/ascending)
|
|
378
|
+
*
|
|
379
|
+
* 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).
|
|
380
|
+
*/
|
|
381
|
+
function queryCategories(payload) {
|
|
382
|
+
const { toJSON: toReq, fromJSON: fromReq } = ambassador_1.serializer(_queryCategoriesRequest, {});
|
|
383
|
+
const { fromJSON: fromRes } = ambassador_1.serializer(_queryCategoriesResponse, {
|
|
384
|
+
_category,
|
|
385
|
+
_coverMedia,
|
|
386
|
+
_image,
|
|
387
|
+
_video,
|
|
388
|
+
});
|
|
389
|
+
function __queryCategories({ host }) {
|
|
390
|
+
const serializedData = toReq(payload);
|
|
391
|
+
const metadata = {
|
|
392
|
+
method: 'POST',
|
|
393
|
+
url: resolveComWixpressNpmCommunitiesPlatformizedBlogV3CategoryServiceUrl({ protoPath: '/v3/categories/query', data: serializedData, host }),
|
|
394
|
+
data: serializedData,
|
|
395
|
+
transformResponse: fromRes,
|
|
396
|
+
};
|
|
397
|
+
return metadata;
|
|
398
|
+
}
|
|
399
|
+
__queryCategories.fromReq = fromReq;
|
|
400
|
+
return __queryCategories;
|
|
401
|
+
}
|
|
402
|
+
exports.queryCategories = queryCategories;
|
|
403
|
+
/** Deletes a category. */
|
|
404
|
+
function deleteCategory(payload) {
|
|
405
|
+
const { toJSON: toReq, fromJSON: fromReq } = ambassador_1.serializer(_deleteCategoryRequest, {});
|
|
406
|
+
const { fromJSON: fromRes } = ambassador_1.serializer(_deleteCategoryResponse, {});
|
|
407
|
+
function __deleteCategory({ host }) {
|
|
408
|
+
const serializedData = toReq(payload);
|
|
409
|
+
const metadata = {
|
|
410
|
+
method: 'DELETE',
|
|
411
|
+
url: resolveComWixpressNpmCommunitiesPlatformizedBlogV3CategoryServiceUrl({ protoPath: '/v3/categories/{categoryId}', data: serializedData, host }),
|
|
412
|
+
params: metro_runtime_1.toURLSearchParams(serializedData),
|
|
413
|
+
transformResponse: fromRes,
|
|
414
|
+
};
|
|
415
|
+
return metadata;
|
|
416
|
+
}
|
|
417
|
+
__deleteCategory.fromReq = fromReq;
|
|
418
|
+
return __deleteCategory;
|
|
419
|
+
}
|
|
420
|
+
exports.deleteCategory = deleteCategory;
|
|
421
|
+
//# sourceMappingURL=blog-v3-category.http.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"blog-v3-category.http.js","sourceRoot":"","sources":["../../../src/blog-v3-category.http.ts"],"names":[],"mappings":";;;AAAA,sDAAuD;AACvD,8DAA2D;AAC3D,sD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CategoryOptions, ListCategoriesOptions, UpdateCategory, UpdateCategoryOptions } from './blog-v3-category.universal';
|
|
3
|
+
export declare function createCategory(httpClient: HttpClient): (category: Category, options?: CreateCategoryOptions | undefined) => Promise<import("./blog-v3-category.universal").CreateCategoryResponse>;
|
|
4
|
+
export declare function updateCategory(httpClient: HttpClient): (_id: string, category: UpdateCategory, options?: UpdateCategoryOptions | undefined) => Promise<import("./blog-v3-category.universal").UpdateCategoryResponse>;
|
|
5
|
+
export declare function getCategory(httpClient: HttpClient): (categoryId: string, options?: GetCategoryOptions | undefined) => Promise<import("./blog-v3-category.universal").GetCategoryResponse>;
|
|
6
|
+
export declare function getCategoryBySlug(httpClient: HttpClient): (slug: string, options?: GetCategoryBySlugOptions | undefined) => Promise<import("./blog-v3-category.universal").GetCategoryBySlugResponse>;
|
|
7
|
+
export declare function listCategories(httpClient: HttpClient): (options?: ListCategoriesOptions | undefined) => Promise<import("./blog-v3-category.universal").ListCategoriesResponse>;
|
|
8
|
+
export declare function queryCategories(httpClient: HttpClient): () => import("./blog-v3-category.universal").CategoriesQueryBuilder;
|
|
9
|
+
export declare function deleteCategory(httpClient: HttpClient): (categoryId: string) => Promise<void>;
|
|
10
|
+
export { Field, SortOrder } from './blog-v3-category.universal';
|
|
11
|
+
export { Category, CoverMedia, CoverMediaMediaOneOf, SeoSchema, Tag, Settings, CreateCategoryRequest, CreateCategoryResponse, BulkCreateCategoriesRequest, BulkCreateCategoriesResponse, BulkCategoryResult, ItemMetadata, ApplicationError, BulkActionMetadata, UpdateCategoryRequest, UpdateCategoryResponse, GetCategoryRequest, GetCategoryResponse, GetCategoryBySlugRequest, GetCategoryBySlugResponse, ListCategoriesRequest, BlogPaging, ListCategoriesResponse, MetaData, QueryCategoriesRequest, Sorting, PlatformQuery, PlatformQueryPagingMethodOneOf, Paging, CursorPaging, QueryCategoriesResponse, PagingMetadataV2, Cursors, DeleteCategoryRequest, DeleteCategoryResponse, CreateCategoryOptions, UpdateCategory, UpdateCategoryOptions, GetCategoryOptions, GetCategoryBySlugOptions, ListCategoriesOptions, CategoriesQueryResult, CategoriesQueryBuilder, } from './blog-v3-category.universal';
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SortOrder = exports.Field = exports.deleteCategory = exports.queryCategories = exports.listCategories = exports.getCategoryBySlug = exports.getCategory = exports.updateCategory = exports.createCategory = void 0;
|
|
4
|
+
const blog_v3_category_universal_1 = require("./blog-v3-category.universal");
|
|
5
|
+
function createCategory(httpClient) {
|
|
6
|
+
return (category, options) => blog_v3_category_universal_1.createCategory(category, options,
|
|
7
|
+
// @ts-ignore
|
|
8
|
+
{ httpClient });
|
|
9
|
+
}
|
|
10
|
+
exports.createCategory = createCategory;
|
|
11
|
+
function updateCategory(httpClient) {
|
|
12
|
+
return (_id, category, options) => blog_v3_category_universal_1.updateCategory(_id, category, options,
|
|
13
|
+
// @ts-ignore
|
|
14
|
+
{ httpClient });
|
|
15
|
+
}
|
|
16
|
+
exports.updateCategory = updateCategory;
|
|
17
|
+
function getCategory(httpClient) {
|
|
18
|
+
return (categoryId, options) => blog_v3_category_universal_1.getCategory(categoryId, options,
|
|
19
|
+
// @ts-ignore
|
|
20
|
+
{ httpClient });
|
|
21
|
+
}
|
|
22
|
+
exports.getCategory = getCategory;
|
|
23
|
+
function getCategoryBySlug(httpClient) {
|
|
24
|
+
return (slug, options) => blog_v3_category_universal_1.getCategoryBySlug(slug, options,
|
|
25
|
+
// @ts-ignore
|
|
26
|
+
{ httpClient });
|
|
27
|
+
}
|
|
28
|
+
exports.getCategoryBySlug = getCategoryBySlug;
|
|
29
|
+
function listCategories(httpClient) {
|
|
30
|
+
return (options) => blog_v3_category_universal_1.listCategories(options,
|
|
31
|
+
// @ts-ignore
|
|
32
|
+
{ httpClient });
|
|
33
|
+
}
|
|
34
|
+
exports.listCategories = listCategories;
|
|
35
|
+
function queryCategories(httpClient) {
|
|
36
|
+
return () => blog_v3_category_universal_1.queryCategories(
|
|
37
|
+
// @ts-ignore
|
|
38
|
+
{ httpClient });
|
|
39
|
+
}
|
|
40
|
+
exports.queryCategories = queryCategories;
|
|
41
|
+
function deleteCategory(httpClient) {
|
|
42
|
+
return (categoryId) => blog_v3_category_universal_1.deleteCategory(categoryId,
|
|
43
|
+
// @ts-ignore
|
|
44
|
+
{ httpClient });
|
|
45
|
+
}
|
|
46
|
+
exports.deleteCategory = deleteCategory;
|
|
47
|
+
var blog_v3_category_universal_2 = require("./blog-v3-category.universal");
|
|
48
|
+
Object.defineProperty(exports, "Field", { enumerable: true, get: function () { return blog_v3_category_universal_2.Field; } });
|
|
49
|
+
Object.defineProperty(exports, "SortOrder", { enumerable: true, get: function () { return blog_v3_category_universal_2.SortOrder; } });
|
|
50
|
+
//# sourceMappingURL=blog-v3-category.public.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"blog-v3-category.public.js","sourceRoot":"","sources":["../../../src/blog-v3-category.public.ts"],"names":[],"mappings":";;;AACA,6EAesC;AAEtC,SAAgB,cAAc,CAAC,UAAsB;IACnD,OAAO,CAAC,QAAkB,EAAE,OAA+B,EAAE,EAAE,CAC7D,2CAAuB,CACrB,QAAQ,EACR,OAAO;IACP,aAAa;IACb,EAAE,UAAU,EAAE,CACf,CAAC;AACN,CAAC;AARD,wCAQC;AAED,SAAgB,cAAc,CAAC,UAAsB;IACnD,OAAO,CACL,GAAW,EACX,QAAwB,EACxB,OAA+B,EAC/B,EAAE,CACF,2CAAuB,CACrB,GAAG,EACH,QAAQ,EACR,OAAO;IACP,aAAa;IACb,EAAE,UAAU,EAAE,CACf,CAAC;AACN,CAAC;AAbD,wCAaC;AAED,SAAgB,WAAW,CAAC,UAAsB;IAChD,OAAO,CAAC,UAAkB,EAAE,OAA4B,EAAE,EAAE,CAC1D,wCAAoB,CAClB,UAAU,EACV,OAAO;IACP,aAAa;IACb,EAAE,UAAU,EAAE,CACf,C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