@teemill/blog 0.2.1 → 0.3.1
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/README.md +47 -2
- package/api.ts +105 -8
- package/base.ts +3 -3
- package/common.ts +3 -3
- package/configuration.ts +9 -4
- package/dist/api.d.ts +71 -5
- package/dist/api.js +43 -9
- package/dist/base.d.ts +3 -3
- package/dist/base.js +3 -3
- package/dist/common.d.ts +4 -4
- package/dist/common.js +3 -3
- package/dist/configuration.d.ts +3 -3
- package/dist/configuration.js +5 -4
- package/dist/esm/api.d.ts +71 -5
- package/dist/esm/api.js +42 -8
- package/dist/esm/base.d.ts +3 -3
- package/dist/esm/base.js +3 -3
- package/dist/esm/common.d.ts +4 -4
- package/dist/esm/common.js +3 -3
- package/dist/esm/configuration.d.ts +3 -3
- package/dist/esm/configuration.js +5 -4
- package/dist/esm/index.d.ts +3 -3
- package/dist/esm/index.js +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +3 -3
- package/docs/ApiError.md +22 -0
- package/docs/Blog.md +40 -0
- package/docs/BlogApi.md +313 -0
- package/docs/BlogListing.md +38 -0
- package/docs/BlogListingType.md +13 -0
- package/docs/CreateBlogRequest.md +34 -0
- package/docs/ListBlogsResponse.md +20 -0
- package/docs/UpdateBlogRequest.md +32 -0
- package/index.ts +3 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
## @teemill/blog@0.
|
|
1
|
+
## @teemill/blog@0.3.1
|
|
2
2
|
|
|
3
3
|
This generator creates TypeScript/JavaScript client that utilizes [axios](https://github.com/axios/axios). The generated Node module can be used in the following environments:
|
|
4
4
|
|
|
@@ -36,7 +36,7 @@ navigate to the folder of your consuming project and run one of the following co
|
|
|
36
36
|
_published:_
|
|
37
37
|
|
|
38
38
|
```
|
|
39
|
-
npm install @teemill/blog@0.
|
|
39
|
+
npm install @teemill/blog@0.3.1 --save
|
|
40
40
|
```
|
|
41
41
|
|
|
42
42
|
_unPublished (not recommended):_
|
|
@@ -44,3 +44,48 @@ _unPublished (not recommended):_
|
|
|
44
44
|
```
|
|
45
45
|
npm install PATH_TO_GENERATED_PACKAGE --save
|
|
46
46
|
```
|
|
47
|
+
|
|
48
|
+
### Documentation for API Endpoints
|
|
49
|
+
|
|
50
|
+
All URIs are relative to *https://localhost:8080*
|
|
51
|
+
|
|
52
|
+
Class | Method | HTTP request | Description
|
|
53
|
+
------------ | ------------- | ------------- | -------------
|
|
54
|
+
*BlogApi* | [**createBlog**](docs/BlogApi.md#createblog) | **POST** /v1/blog/blogs | Create a blog
|
|
55
|
+
*BlogApi* | [**deleteBlog**](docs/BlogApi.md#deleteblog) | **DELETE** /v1/blog/blogs/{blogId} | Delete a blog
|
|
56
|
+
*BlogApi* | [**getBlog**](docs/BlogApi.md#getblog) | **GET** /v1/blog/blogs/{blogId} | Get a blog
|
|
57
|
+
*BlogApi* | [**listBlogs**](docs/BlogApi.md#listblogs) | **GET** /v1/blog/blogs | List blogs
|
|
58
|
+
*BlogApi* | [**updateBlog**](docs/BlogApi.md#updateblog) | **PATCH** /v1/blog/blogs/{blogId} | Update a blog
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
### Documentation For Models
|
|
62
|
+
|
|
63
|
+
- [ApiError](docs/ApiError.md)
|
|
64
|
+
- [Blog](docs/Blog.md)
|
|
65
|
+
- [BlogListing](docs/BlogListing.md)
|
|
66
|
+
- [BlogListingType](docs/BlogListingType.md)
|
|
67
|
+
- [CreateBlogRequest](docs/CreateBlogRequest.md)
|
|
68
|
+
- [ListBlogsResponse](docs/ListBlogsResponse.md)
|
|
69
|
+
- [UpdateBlogRequest](docs/UpdateBlogRequest.md)
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
<a id="documentation-for-authorization"></a>
|
|
73
|
+
## Documentation For Authorization
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
Authentication schemes defined for the API:
|
|
77
|
+
<a id="api-key"></a>
|
|
78
|
+
### api-key
|
|
79
|
+
|
|
80
|
+
- **Type**: API key
|
|
81
|
+
- **API key parameter name**: x-api-key
|
|
82
|
+
- **Location**: HTTP header
|
|
83
|
+
|
|
84
|
+
<a id="session-oauth"></a>
|
|
85
|
+
### session-oauth
|
|
86
|
+
|
|
87
|
+
- **Type**: OAuth
|
|
88
|
+
- **Flow**: password
|
|
89
|
+
- **Authorization URL**:
|
|
90
|
+
- **Scopes**: N/A
|
|
91
|
+
|
package/api.ts
CHANGED
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
/* eslint-disable */
|
|
3
3
|
/**
|
|
4
4
|
* Blog API
|
|
5
|
-
* Read and write blogs on the PodOS platform.
|
|
5
|
+
* Read and write blogs on the PodOS platform.
|
|
6
6
|
*
|
|
7
|
-
* The version of the OpenAPI document: 0.
|
|
8
|
-
*
|
|
7
|
+
* The version of the OpenAPI document: 0.3.1
|
|
8
|
+
*
|
|
9
9
|
*
|
|
10
10
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
11
|
* https://openapi-generator.tech
|
|
@@ -84,6 +84,12 @@ export interface Blog {
|
|
|
84
84
|
* @memberof Blog
|
|
85
85
|
*/
|
|
86
86
|
'metaImage': string | null;
|
|
87
|
+
/**
|
|
88
|
+
*
|
|
89
|
+
* @type {BlogListingType}
|
|
90
|
+
* @memberof Blog
|
|
91
|
+
*/
|
|
92
|
+
'type': BlogListingType;
|
|
87
93
|
/**
|
|
88
94
|
*
|
|
89
95
|
* @type {string}
|
|
@@ -109,6 +115,8 @@ export interface Blog {
|
|
|
109
115
|
*/
|
|
110
116
|
'content': string;
|
|
111
117
|
}
|
|
118
|
+
|
|
119
|
+
|
|
112
120
|
/**
|
|
113
121
|
*
|
|
114
122
|
* @export
|
|
@@ -151,6 +159,12 @@ export interface BlogListing {
|
|
|
151
159
|
* @memberof BlogListing
|
|
152
160
|
*/
|
|
153
161
|
'metaImage': string | null;
|
|
162
|
+
/**
|
|
163
|
+
*
|
|
164
|
+
* @type {BlogListingType}
|
|
165
|
+
* @memberof BlogListing
|
|
166
|
+
*/
|
|
167
|
+
'type': BlogListingType;
|
|
154
168
|
/**
|
|
155
169
|
*
|
|
156
170
|
* @type {string}
|
|
@@ -170,6 +184,23 @@ export interface BlogListing {
|
|
|
170
184
|
*/
|
|
171
185
|
'updatedAt': string;
|
|
172
186
|
}
|
|
187
|
+
|
|
188
|
+
|
|
189
|
+
/**
|
|
190
|
+
* The type of blog. Project blogs are only visible to the project. Platform blogs are visible to all clients of the platform. Requires the Platform module to be installed. Parent platform blogs are published by the parent platform of the current project.
|
|
191
|
+
* @export
|
|
192
|
+
* @enum {string}
|
|
193
|
+
*/
|
|
194
|
+
|
|
195
|
+
export const BlogListingType = {
|
|
196
|
+
Project: 'project',
|
|
197
|
+
Platform: 'platform',
|
|
198
|
+
ParentPlatform: 'parent-platform'
|
|
199
|
+
} as const;
|
|
200
|
+
|
|
201
|
+
export type BlogListingType = typeof BlogListingType[keyof typeof BlogListingType];
|
|
202
|
+
|
|
203
|
+
|
|
173
204
|
/**
|
|
174
205
|
*
|
|
175
206
|
* @export
|
|
@@ -218,7 +249,21 @@ export interface CreateBlogRequest {
|
|
|
218
249
|
* @memberof CreateBlogRequest
|
|
219
250
|
*/
|
|
220
251
|
'published'?: boolean;
|
|
252
|
+
/**
|
|
253
|
+
* The type of blog. Project blogs are only visible to the project. Platform blogs are visible to all clients of the project\'s platform. Requires the Platform module to be installed.
|
|
254
|
+
* @type {string}
|
|
255
|
+
* @memberof CreateBlogRequest
|
|
256
|
+
*/
|
|
257
|
+
'type': CreateBlogRequestTypeEnum;
|
|
221
258
|
}
|
|
259
|
+
|
|
260
|
+
export const CreateBlogRequestTypeEnum = {
|
|
261
|
+
Project: 'project',
|
|
262
|
+
Platform: 'platform'
|
|
263
|
+
} as const;
|
|
264
|
+
|
|
265
|
+
export type CreateBlogRequestTypeEnum = typeof CreateBlogRequestTypeEnum[keyof typeof CreateBlogRequestTypeEnum];
|
|
266
|
+
|
|
222
267
|
/**
|
|
223
268
|
*
|
|
224
269
|
* @export
|
|
@@ -438,10 +483,14 @@ export const BlogApiAxiosParamCreator = function (configuration?: Configuration)
|
|
|
438
483
|
*
|
|
439
484
|
* @summary List blogs
|
|
440
485
|
* @param {string} project
|
|
486
|
+
* @param {number} [pageSize] Max page size. This is the maximum page size that will be returned, but it might be smaller.
|
|
487
|
+
* @param {number} [pageToken] Page reference token
|
|
488
|
+
* @param {Array<string>} [sortBy] An array of fields to sort by, prefixed with a \'-\' for descending order or \'+\' for ascending. Default is ascending.
|
|
489
|
+
* @param {string} [search] Search term to filter results
|
|
441
490
|
* @param {*} [options] Override http request option.
|
|
442
491
|
* @throws {RequiredError}
|
|
443
492
|
*/
|
|
444
|
-
listBlogs: async (project: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
493
|
+
listBlogs: async (project: string, pageSize?: number, pageToken?: number, sortBy?: Array<string>, search?: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
445
494
|
// verify required parameter 'project' is not null or undefined
|
|
446
495
|
assertParamExists('listBlogs', 'project', project)
|
|
447
496
|
const localVarPath = `/v1/blog/blogs`;
|
|
@@ -467,6 +516,22 @@ export const BlogApiAxiosParamCreator = function (configuration?: Configuration)
|
|
|
467
516
|
localVarQueryParameter['project'] = project;
|
|
468
517
|
}
|
|
469
518
|
|
|
519
|
+
if (pageSize !== undefined) {
|
|
520
|
+
localVarQueryParameter['pageSize'] = pageSize;
|
|
521
|
+
}
|
|
522
|
+
|
|
523
|
+
if (pageToken !== undefined) {
|
|
524
|
+
localVarQueryParameter['pageToken'] = pageToken;
|
|
525
|
+
}
|
|
526
|
+
|
|
527
|
+
if (sortBy) {
|
|
528
|
+
localVarQueryParameter['sortBy'] = sortBy;
|
|
529
|
+
}
|
|
530
|
+
|
|
531
|
+
if (search !== undefined) {
|
|
532
|
+
localVarQueryParameter['search'] = search;
|
|
533
|
+
}
|
|
534
|
+
|
|
470
535
|
|
|
471
536
|
|
|
472
537
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
@@ -588,11 +653,15 @@ export const BlogApiFp = function(configuration?: Configuration) {
|
|
|
588
653
|
*
|
|
589
654
|
* @summary List blogs
|
|
590
655
|
* @param {string} project
|
|
656
|
+
* @param {number} [pageSize] Max page size. This is the maximum page size that will be returned, but it might be smaller.
|
|
657
|
+
* @param {number} [pageToken] Page reference token
|
|
658
|
+
* @param {Array<string>} [sortBy] An array of fields to sort by, prefixed with a \'-\' for descending order or \'+\' for ascending. Default is ascending.
|
|
659
|
+
* @param {string} [search] Search term to filter results
|
|
591
660
|
* @param {*} [options] Override http request option.
|
|
592
661
|
* @throws {RequiredError}
|
|
593
662
|
*/
|
|
594
|
-
async listBlogs(project: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ListBlogsResponse>> {
|
|
595
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.listBlogs(project, options);
|
|
663
|
+
async listBlogs(project: string, pageSize?: number, pageToken?: number, sortBy?: Array<string>, search?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ListBlogsResponse>> {
|
|
664
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.listBlogs(project, pageSize, pageToken, sortBy, search, options);
|
|
596
665
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
597
666
|
const localVarOperationServerBasePath = operationServerMap['BlogApi.listBlogs']?.[localVarOperationServerIndex]?.url;
|
|
598
667
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
@@ -660,7 +729,7 @@ export const BlogApiFactory = function (configuration?: Configuration, basePath?
|
|
|
660
729
|
* @throws {RequiredError}
|
|
661
730
|
*/
|
|
662
731
|
listBlogs(requestParameters: BlogApiListBlogsRequest, options?: RawAxiosRequestConfig): AxiosPromise<ListBlogsResponse> {
|
|
663
|
-
return localVarFp.listBlogs(requestParameters.project, options).then((request) => request(axios, basePath));
|
|
732
|
+
return localVarFp.listBlogs(requestParameters.project, requestParameters.pageSize, requestParameters.pageToken, requestParameters.sortBy, requestParameters.search, options).then((request) => request(axios, basePath));
|
|
664
733
|
},
|
|
665
734
|
/**
|
|
666
735
|
*
|
|
@@ -750,6 +819,34 @@ export interface BlogApiListBlogsRequest {
|
|
|
750
819
|
* @memberof BlogApiListBlogs
|
|
751
820
|
*/
|
|
752
821
|
readonly project: string
|
|
822
|
+
|
|
823
|
+
/**
|
|
824
|
+
* Max page size. This is the maximum page size that will be returned, but it might be smaller.
|
|
825
|
+
* @type {number}
|
|
826
|
+
* @memberof BlogApiListBlogs
|
|
827
|
+
*/
|
|
828
|
+
readonly pageSize?: number
|
|
829
|
+
|
|
830
|
+
/**
|
|
831
|
+
* Page reference token
|
|
832
|
+
* @type {number}
|
|
833
|
+
* @memberof BlogApiListBlogs
|
|
834
|
+
*/
|
|
835
|
+
readonly pageToken?: number
|
|
836
|
+
|
|
837
|
+
/**
|
|
838
|
+
* An array of fields to sort by, prefixed with a \'-\' for descending order or \'+\' for ascending. Default is ascending.
|
|
839
|
+
* @type {Array<string>}
|
|
840
|
+
* @memberof BlogApiListBlogs
|
|
841
|
+
*/
|
|
842
|
+
readonly sortBy?: Array<string>
|
|
843
|
+
|
|
844
|
+
/**
|
|
845
|
+
* Search term to filter results
|
|
846
|
+
* @type {string}
|
|
847
|
+
* @memberof BlogApiListBlogs
|
|
848
|
+
*/
|
|
849
|
+
readonly search?: string
|
|
753
850
|
}
|
|
754
851
|
|
|
755
852
|
/**
|
|
@@ -832,7 +929,7 @@ export class BlogApi extends BaseAPI {
|
|
|
832
929
|
* @memberof BlogApi
|
|
833
930
|
*/
|
|
834
931
|
public listBlogs(requestParameters: BlogApiListBlogsRequest, options?: RawAxiosRequestConfig) {
|
|
835
|
-
return BlogApiFp(this.configuration).listBlogs(requestParameters.project, options).then((request) => request(this.axios, this.basePath));
|
|
932
|
+
return BlogApiFp(this.configuration).listBlogs(requestParameters.project, requestParameters.pageSize, requestParameters.pageToken, requestParameters.sortBy, requestParameters.search, options).then((request) => request(this.axios, this.basePath));
|
|
836
933
|
}
|
|
837
934
|
|
|
838
935
|
/**
|
package/base.ts
CHANGED
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
/* eslint-disable */
|
|
3
3
|
/**
|
|
4
4
|
* Blog API
|
|
5
|
-
* Read and write blogs on the PodOS platform.
|
|
5
|
+
* Read and write blogs on the PodOS platform.
|
|
6
6
|
*
|
|
7
|
-
* The version of the OpenAPI document: 0.
|
|
8
|
-
*
|
|
7
|
+
* The version of the OpenAPI document: 0.3.1
|
|
8
|
+
*
|
|
9
9
|
*
|
|
10
10
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
11
|
* https://openapi-generator.tech
|
package/common.ts
CHANGED
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
/* eslint-disable */
|
|
3
3
|
/**
|
|
4
4
|
* Blog API
|
|
5
|
-
* Read and write blogs on the PodOS platform.
|
|
5
|
+
* Read and write blogs on the PodOS platform.
|
|
6
6
|
*
|
|
7
|
-
* The version of the OpenAPI document: 0.
|
|
8
|
-
*
|
|
7
|
+
* The version of the OpenAPI document: 0.3.1
|
|
8
|
+
*
|
|
9
9
|
*
|
|
10
10
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
11
|
* https://openapi-generator.tech
|
package/configuration.ts
CHANGED
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
/* eslint-disable */
|
|
3
3
|
/**
|
|
4
4
|
* Blog API
|
|
5
|
-
* Read and write blogs on the PodOS platform.
|
|
5
|
+
* Read and write blogs on the PodOS platform.
|
|
6
6
|
*
|
|
7
|
-
* The version of the OpenAPI document: 0.
|
|
8
|
-
*
|
|
7
|
+
* The version of the OpenAPI document: 0.3.1
|
|
8
|
+
*
|
|
9
9
|
*
|
|
10
10
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
11
|
* https://openapi-generator.tech
|
|
@@ -89,7 +89,12 @@ export class Configuration {
|
|
|
89
89
|
this.accessToken = param.accessToken;
|
|
90
90
|
this.basePath = param.basePath;
|
|
91
91
|
this.serverIndex = param.serverIndex;
|
|
92
|
-
this.baseOptions =
|
|
92
|
+
this.baseOptions = {
|
|
93
|
+
...param.baseOptions,
|
|
94
|
+
headers: {
|
|
95
|
+
...param.baseOptions?.headers,
|
|
96
|
+
},
|
|
97
|
+
};
|
|
93
98
|
this.formDataCtor = param.formDataCtor;
|
|
94
99
|
}
|
|
95
100
|
|
package/dist/api.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Blog API
|
|
3
|
-
* Read and write blogs on the PodOS platform.
|
|
3
|
+
* Read and write blogs on the PodOS platform.
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 0.3.1
|
|
4
6
|
*
|
|
5
|
-
* The version of the OpenAPI document: 0.2.1
|
|
6
|
-
* Contact: hello@teemill.com
|
|
7
7
|
*
|
|
8
8
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
9
|
* https://openapi-generator.tech
|
|
@@ -74,6 +74,12 @@ export interface Blog {
|
|
|
74
74
|
* @memberof Blog
|
|
75
75
|
*/
|
|
76
76
|
'metaImage': string | null;
|
|
77
|
+
/**
|
|
78
|
+
*
|
|
79
|
+
* @type {BlogListingType}
|
|
80
|
+
* @memberof Blog
|
|
81
|
+
*/
|
|
82
|
+
'type': BlogListingType;
|
|
77
83
|
/**
|
|
78
84
|
*
|
|
79
85
|
* @type {string}
|
|
@@ -141,6 +147,12 @@ export interface BlogListing {
|
|
|
141
147
|
* @memberof BlogListing
|
|
142
148
|
*/
|
|
143
149
|
'metaImage': string | null;
|
|
150
|
+
/**
|
|
151
|
+
*
|
|
152
|
+
* @type {BlogListingType}
|
|
153
|
+
* @memberof BlogListing
|
|
154
|
+
*/
|
|
155
|
+
'type': BlogListingType;
|
|
144
156
|
/**
|
|
145
157
|
*
|
|
146
158
|
* @type {string}
|
|
@@ -160,6 +172,17 @@ export interface BlogListing {
|
|
|
160
172
|
*/
|
|
161
173
|
'updatedAt': string;
|
|
162
174
|
}
|
|
175
|
+
/**
|
|
176
|
+
* The type of blog. Project blogs are only visible to the project. Platform blogs are visible to all clients of the platform. Requires the Platform module to be installed. Parent platform blogs are published by the parent platform of the current project.
|
|
177
|
+
* @export
|
|
178
|
+
* @enum {string}
|
|
179
|
+
*/
|
|
180
|
+
export declare const BlogListingType: {
|
|
181
|
+
readonly Project: "project";
|
|
182
|
+
readonly Platform: "platform";
|
|
183
|
+
readonly ParentPlatform: "parent-platform";
|
|
184
|
+
};
|
|
185
|
+
export type BlogListingType = typeof BlogListingType[keyof typeof BlogListingType];
|
|
163
186
|
/**
|
|
164
187
|
*
|
|
165
188
|
* @export
|
|
@@ -208,7 +231,18 @@ export interface CreateBlogRequest {
|
|
|
208
231
|
* @memberof CreateBlogRequest
|
|
209
232
|
*/
|
|
210
233
|
'published'?: boolean;
|
|
234
|
+
/**
|
|
235
|
+
* The type of blog. Project blogs are only visible to the project. Platform blogs are visible to all clients of the project\'s platform. Requires the Platform module to be installed.
|
|
236
|
+
* @type {string}
|
|
237
|
+
* @memberof CreateBlogRequest
|
|
238
|
+
*/
|
|
239
|
+
'type': CreateBlogRequestTypeEnum;
|
|
211
240
|
}
|
|
241
|
+
export declare const CreateBlogRequestTypeEnum: {
|
|
242
|
+
readonly Project: "project";
|
|
243
|
+
readonly Platform: "platform";
|
|
244
|
+
};
|
|
245
|
+
export type CreateBlogRequestTypeEnum = typeof CreateBlogRequestTypeEnum[keyof typeof CreateBlogRequestTypeEnum];
|
|
212
246
|
/**
|
|
213
247
|
*
|
|
214
248
|
* @export
|
|
@@ -307,10 +341,14 @@ export declare const BlogApiAxiosParamCreator: (configuration?: Configuration) =
|
|
|
307
341
|
*
|
|
308
342
|
* @summary List blogs
|
|
309
343
|
* @param {string} project
|
|
344
|
+
* @param {number} [pageSize] Max page size. This is the maximum page size that will be returned, but it might be smaller.
|
|
345
|
+
* @param {number} [pageToken] Page reference token
|
|
346
|
+
* @param {Array<string>} [sortBy] An array of fields to sort by, prefixed with a \'-\' for descending order or \'+\' for ascending. Default is ascending.
|
|
347
|
+
* @param {string} [search] Search term to filter results
|
|
310
348
|
* @param {*} [options] Override http request option.
|
|
311
349
|
* @throws {RequiredError}
|
|
312
350
|
*/
|
|
313
|
-
listBlogs: (project: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
|
|
351
|
+
listBlogs: (project: string, pageSize?: number, pageToken?: number, sortBy?: Array<string>, search?: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
|
|
314
352
|
/**
|
|
315
353
|
*
|
|
316
354
|
* @summary Update a blog
|
|
@@ -358,10 +396,14 @@ export declare const BlogApiFp: (configuration?: Configuration) => {
|
|
|
358
396
|
*
|
|
359
397
|
* @summary List blogs
|
|
360
398
|
* @param {string} project
|
|
399
|
+
* @param {number} [pageSize] Max page size. This is the maximum page size that will be returned, but it might be smaller.
|
|
400
|
+
* @param {number} [pageToken] Page reference token
|
|
401
|
+
* @param {Array<string>} [sortBy] An array of fields to sort by, prefixed with a \'-\' for descending order or \'+\' for ascending. Default is ascending.
|
|
402
|
+
* @param {string} [search] Search term to filter results
|
|
361
403
|
* @param {*} [options] Override http request option.
|
|
362
404
|
* @throws {RequiredError}
|
|
363
405
|
*/
|
|
364
|
-
listBlogs(project: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ListBlogsResponse>>;
|
|
406
|
+
listBlogs(project: string, pageSize?: number, pageToken?: number, sortBy?: Array<string>, search?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ListBlogsResponse>>;
|
|
365
407
|
/**
|
|
366
408
|
*
|
|
367
409
|
* @summary Update a blog
|
|
@@ -488,6 +530,30 @@ export interface BlogApiListBlogsRequest {
|
|
|
488
530
|
* @memberof BlogApiListBlogs
|
|
489
531
|
*/
|
|
490
532
|
readonly project: string;
|
|
533
|
+
/**
|
|
534
|
+
* Max page size. This is the maximum page size that will be returned, but it might be smaller.
|
|
535
|
+
* @type {number}
|
|
536
|
+
* @memberof BlogApiListBlogs
|
|
537
|
+
*/
|
|
538
|
+
readonly pageSize?: number;
|
|
539
|
+
/**
|
|
540
|
+
* Page reference token
|
|
541
|
+
* @type {number}
|
|
542
|
+
* @memberof BlogApiListBlogs
|
|
543
|
+
*/
|
|
544
|
+
readonly pageToken?: number;
|
|
545
|
+
/**
|
|
546
|
+
* An array of fields to sort by, prefixed with a \'-\' for descending order or \'+\' for ascending. Default is ascending.
|
|
547
|
+
* @type {Array<string>}
|
|
548
|
+
* @memberof BlogApiListBlogs
|
|
549
|
+
*/
|
|
550
|
+
readonly sortBy?: Array<string>;
|
|
551
|
+
/**
|
|
552
|
+
* Search term to filter results
|
|
553
|
+
* @type {string}
|
|
554
|
+
* @memberof BlogApiListBlogs
|
|
555
|
+
*/
|
|
556
|
+
readonly search?: string;
|
|
491
557
|
}
|
|
492
558
|
/**
|
|
493
559
|
* Request parameters for updateBlog operation in BlogApi.
|
package/dist/api.js
CHANGED
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
/* eslint-disable */
|
|
4
4
|
/**
|
|
5
5
|
* Blog API
|
|
6
|
-
* Read and write blogs on the PodOS platform.
|
|
6
|
+
* Read and write blogs on the PodOS platform.
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 0.3.1
|
|
7
9
|
*
|
|
8
|
-
* The version of the OpenAPI document: 0.2.1
|
|
9
|
-
* Contact: hello@teemill.com
|
|
10
10
|
*
|
|
11
11
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
12
|
* https://openapi-generator.tech
|
|
@@ -22,13 +22,27 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
22
22
|
});
|
|
23
23
|
};
|
|
24
24
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
|
-
exports.BlogApi = exports.BlogApiFactory = exports.BlogApiFp = exports.BlogApiAxiosParamCreator = void 0;
|
|
25
|
+
exports.BlogApi = exports.BlogApiFactory = exports.BlogApiFp = exports.BlogApiAxiosParamCreator = exports.CreateBlogRequestTypeEnum = exports.BlogListingType = void 0;
|
|
26
26
|
const axios_1 = require("axios");
|
|
27
27
|
// Some imports not used depending on template conditions
|
|
28
28
|
// @ts-ignore
|
|
29
29
|
const common_1 = require("./common");
|
|
30
30
|
// @ts-ignore
|
|
31
31
|
const base_1 = require("./base");
|
|
32
|
+
/**
|
|
33
|
+
* The type of blog. Project blogs are only visible to the project. Platform blogs are visible to all clients of the platform. Requires the Platform module to be installed. Parent platform blogs are published by the parent platform of the current project.
|
|
34
|
+
* @export
|
|
35
|
+
* @enum {string}
|
|
36
|
+
*/
|
|
37
|
+
exports.BlogListingType = {
|
|
38
|
+
Project: 'project',
|
|
39
|
+
Platform: 'platform',
|
|
40
|
+
ParentPlatform: 'parent-platform'
|
|
41
|
+
};
|
|
42
|
+
exports.CreateBlogRequestTypeEnum = {
|
|
43
|
+
Project: 'project',
|
|
44
|
+
Platform: 'platform'
|
|
45
|
+
};
|
|
32
46
|
/**
|
|
33
47
|
* BlogApi - axios parameter creator
|
|
34
48
|
* @export
|
|
@@ -160,10 +174,14 @@ const BlogApiAxiosParamCreator = function (configuration) {
|
|
|
160
174
|
*
|
|
161
175
|
* @summary List blogs
|
|
162
176
|
* @param {string} project
|
|
177
|
+
* @param {number} [pageSize] Max page size. This is the maximum page size that will be returned, but it might be smaller.
|
|
178
|
+
* @param {number} [pageToken] Page reference token
|
|
179
|
+
* @param {Array<string>} [sortBy] An array of fields to sort by, prefixed with a \'-\' for descending order or \'+\' for ascending. Default is ascending.
|
|
180
|
+
* @param {string} [search] Search term to filter results
|
|
163
181
|
* @param {*} [options] Override http request option.
|
|
164
182
|
* @throws {RequiredError}
|
|
165
183
|
*/
|
|
166
|
-
listBlogs: (project_1, ...args_1) => __awaiter(this, [project_1, ...args_1], void 0, function* (project, options = {}) {
|
|
184
|
+
listBlogs: (project_1, pageSize_1, pageToken_1, sortBy_1, search_1, ...args_1) => __awaiter(this, [project_1, pageSize_1, pageToken_1, sortBy_1, search_1, ...args_1], void 0, function* (project, pageSize, pageToken, sortBy, search, options = {}) {
|
|
167
185
|
// verify required parameter 'project' is not null or undefined
|
|
168
186
|
(0, common_1.assertParamExists)('listBlogs', 'project', project);
|
|
169
187
|
const localVarPath = `/v1/blog/blogs`;
|
|
@@ -184,6 +202,18 @@ const BlogApiAxiosParamCreator = function (configuration) {
|
|
|
184
202
|
if (project !== undefined) {
|
|
185
203
|
localVarQueryParameter['project'] = project;
|
|
186
204
|
}
|
|
205
|
+
if (pageSize !== undefined) {
|
|
206
|
+
localVarQueryParameter['pageSize'] = pageSize;
|
|
207
|
+
}
|
|
208
|
+
if (pageToken !== undefined) {
|
|
209
|
+
localVarQueryParameter['pageToken'] = pageToken;
|
|
210
|
+
}
|
|
211
|
+
if (sortBy) {
|
|
212
|
+
localVarQueryParameter['sortBy'] = sortBy;
|
|
213
|
+
}
|
|
214
|
+
if (search !== undefined) {
|
|
215
|
+
localVarQueryParameter['search'] = search;
|
|
216
|
+
}
|
|
187
217
|
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
188
218
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
189
219
|
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
@@ -302,13 +332,17 @@ const BlogApiFp = function (configuration) {
|
|
|
302
332
|
*
|
|
303
333
|
* @summary List blogs
|
|
304
334
|
* @param {string} project
|
|
335
|
+
* @param {number} [pageSize] Max page size. This is the maximum page size that will be returned, but it might be smaller.
|
|
336
|
+
* @param {number} [pageToken] Page reference token
|
|
337
|
+
* @param {Array<string>} [sortBy] An array of fields to sort by, prefixed with a \'-\' for descending order or \'+\' for ascending. Default is ascending.
|
|
338
|
+
* @param {string} [search] Search term to filter results
|
|
305
339
|
* @param {*} [options] Override http request option.
|
|
306
340
|
* @throws {RequiredError}
|
|
307
341
|
*/
|
|
308
|
-
listBlogs(project, options) {
|
|
342
|
+
listBlogs(project, pageSize, pageToken, sortBy, search, options) {
|
|
309
343
|
return __awaiter(this, void 0, void 0, function* () {
|
|
310
344
|
var _a, _b, _c;
|
|
311
|
-
const localVarAxiosArgs = yield localVarAxiosParamCreator.listBlogs(project, options);
|
|
345
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.listBlogs(project, pageSize, pageToken, sortBy, search, options);
|
|
312
346
|
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
313
347
|
const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['BlogApi.listBlogs']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
314
348
|
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
@@ -380,7 +414,7 @@ const BlogApiFactory = function (configuration, basePath, axios) {
|
|
|
380
414
|
* @throws {RequiredError}
|
|
381
415
|
*/
|
|
382
416
|
listBlogs(requestParameters, options) {
|
|
383
|
-
return localVarFp.listBlogs(requestParameters.project, options).then((request) => request(axios, basePath));
|
|
417
|
+
return localVarFp.listBlogs(requestParameters.project, requestParameters.pageSize, requestParameters.pageToken, requestParameters.sortBy, requestParameters.search, options).then((request) => request(axios, basePath));
|
|
384
418
|
},
|
|
385
419
|
/**
|
|
386
420
|
*
|
|
@@ -444,7 +478,7 @@ class BlogApi extends base_1.BaseAPI {
|
|
|
444
478
|
* @memberof BlogApi
|
|
445
479
|
*/
|
|
446
480
|
listBlogs(requestParameters, options) {
|
|
447
|
-
return (0, exports.BlogApiFp)(this.configuration).listBlogs(requestParameters.project, options).then((request) => request(this.axios, this.basePath));
|
|
481
|
+
return (0, exports.BlogApiFp)(this.configuration).listBlogs(requestParameters.project, requestParameters.pageSize, requestParameters.pageToken, requestParameters.sortBy, requestParameters.search, options).then((request) => request(this.axios, this.basePath));
|
|
448
482
|
}
|
|
449
483
|
/**
|
|
450
484
|
*
|
package/dist/base.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Blog API
|
|
3
|
-
* Read and write blogs on the PodOS platform.
|
|
3
|
+
* Read and write blogs on the PodOS platform.
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 0.3.1
|
|
4
6
|
*
|
|
5
|
-
* The version of the OpenAPI document: 0.2.1
|
|
6
|
-
* Contact: hello@teemill.com
|
|
7
7
|
*
|
|
8
8
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
9
|
* https://openapi-generator.tech
|
package/dist/base.js
CHANGED
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
/* eslint-disable */
|
|
4
4
|
/**
|
|
5
5
|
* Blog API
|
|
6
|
-
* Read and write blogs on the PodOS platform.
|
|
6
|
+
* Read and write blogs on the PodOS platform.
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 0.3.1
|
|
7
9
|
*
|
|
8
|
-
* The version of the OpenAPI document: 0.2.1
|
|
9
|
-
* Contact: hello@teemill.com
|
|
10
10
|
*
|
|
11
11
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
12
|
* https://openapi-generator.tech
|
package/dist/common.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Blog API
|
|
3
|
-
* Read and write blogs on the PodOS platform.
|
|
3
|
+
* Read and write blogs on the PodOS platform.
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 0.3.1
|
|
4
6
|
*
|
|
5
|
-
* The version of the OpenAPI document: 0.2.1
|
|
6
|
-
* Contact: hello@teemill.com
|
|
7
7
|
*
|
|
8
8
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
9
|
* https://openapi-generator.tech
|
|
@@ -62,4 +62,4 @@ export declare const toPathString: (url: URL) => string;
|
|
|
62
62
|
*
|
|
63
63
|
* @export
|
|
64
64
|
*/
|
|
65
|
-
export declare const createRequestFunction: (axiosArgs: RequestArgs, globalAxios: AxiosInstance, BASE_PATH: string, configuration?: Configuration) => <T = unknown, R = AxiosResponse<T
|
|
65
|
+
export declare const createRequestFunction: (axiosArgs: RequestArgs, globalAxios: AxiosInstance, BASE_PATH: string, configuration?: Configuration) => <T = unknown, R = AxiosResponse<T>>(axios?: AxiosInstance, basePath?: string) => Promise<R>;
|
package/dist/common.js
CHANGED
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
/* eslint-disable */
|
|
4
4
|
/**
|
|
5
5
|
* Blog API
|
|
6
|
-
* Read and write blogs on the PodOS platform.
|
|
6
|
+
* Read and write blogs on the PodOS platform.
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 0.3.1
|
|
7
9
|
*
|
|
8
|
-
* The version of the OpenAPI document: 0.2.1
|
|
9
|
-
* Contact: hello@teemill.com
|
|
10
10
|
*
|
|
11
11
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
12
|
* https://openapi-generator.tech
|
package/dist/configuration.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Blog API
|
|
3
|
-
* Read and write blogs on the PodOS platform.
|
|
3
|
+
* Read and write blogs on the PodOS platform.
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 0.3.1
|
|
4
6
|
*
|
|
5
|
-
* The version of the OpenAPI document: 0.2.1
|
|
6
|
-
* Contact: hello@teemill.com
|
|
7
7
|
*
|
|
8
8
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
9
|
* https://openapi-generator.tech
|