@teemill/blog 0.1.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/.openapi-generator/FILES +13 -0
- package/.openapi-generator/VERSION +1 -0
- package/.openapi-generator-ignore +23 -0
- package/README.md +46 -0
- package/api.ts +828 -0
- package/base.ts +86 -0
- package/common.ts +150 -0
- package/configuration.ts +110 -0
- package/dist/api.d.ts +545 -0
- package/dist/api.js +461 -0
- package/dist/base.d.ts +66 -0
- package/dist/base.js +65 -0
- package/dist/common.d.ts +65 -0
- package/dist/common.js +161 -0
- package/dist/configuration.d.ts +91 -0
- package/dist/configuration.js +43 -0
- package/dist/esm/api.d.ts +545 -0
- package/dist/esm/api.js +454 -0
- package/dist/esm/base.d.ts +66 -0
- package/dist/esm/base.js +60 -0
- package/dist/esm/common.d.ts +65 -0
- package/dist/esm/common.js +149 -0
- package/dist/esm/configuration.d.ts +91 -0
- package/dist/esm/configuration.js +39 -0
- package/dist/esm/index.d.ts +13 -0
- package/dist/esm/index.js +15 -0
- package/dist/index.d.ts +13 -0
- package/dist/index.js +31 -0
- package/git_push.sh +57 -0
- package/index.ts +18 -0
- package/package.json +33 -0
- package/tsconfig.esm.json +7 -0
- package/tsconfig.json +18 -0
package/dist/api.js
ADDED
|
@@ -0,0 +1,461 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* Blog API
|
|
6
|
+
* Read and write blogs on the PodOS platform. Currently this API is in development and is not yet publicly accessible. All paths and models are subject to change. For full documentation on functionality and account settings go to [teemill.com](https://teemill.com)
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 0.1.1
|
|
9
|
+
* Contact: hello@teemill.com
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
16
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
17
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
18
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
19
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
20
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
21
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
22
|
+
});
|
|
23
|
+
};
|
|
24
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
|
+
exports.BlogApi = exports.BlogApiFactory = exports.BlogApiFp = exports.BlogApiAxiosParamCreator = void 0;
|
|
26
|
+
const axios_1 = require("axios");
|
|
27
|
+
// Some imports not used depending on template conditions
|
|
28
|
+
// @ts-ignore
|
|
29
|
+
const common_1 = require("./common");
|
|
30
|
+
// @ts-ignore
|
|
31
|
+
const base_1 = require("./base");
|
|
32
|
+
/**
|
|
33
|
+
* BlogApi - axios parameter creator
|
|
34
|
+
* @export
|
|
35
|
+
*/
|
|
36
|
+
const BlogApiAxiosParamCreator = function (configuration) {
|
|
37
|
+
return {
|
|
38
|
+
/**
|
|
39
|
+
*
|
|
40
|
+
* @summary Create a blog
|
|
41
|
+
* @param {string} project
|
|
42
|
+
* @param {CreateBlogRequest} createBlogRequest
|
|
43
|
+
* @param {*} [options] Override http request option.
|
|
44
|
+
* @throws {RequiredError}
|
|
45
|
+
*/
|
|
46
|
+
createBlog: (project_1, createBlogRequest_1, ...args_1) => __awaiter(this, [project_1, createBlogRequest_1, ...args_1], void 0, function* (project, createBlogRequest, options = {}) {
|
|
47
|
+
// verify required parameter 'project' is not null or undefined
|
|
48
|
+
(0, common_1.assertParamExists)('createBlog', 'project', project);
|
|
49
|
+
// verify required parameter 'createBlogRequest' is not null or undefined
|
|
50
|
+
(0, common_1.assertParamExists)('createBlog', 'createBlogRequest', createBlogRequest);
|
|
51
|
+
const localVarPath = `/v1/blog/blogs`;
|
|
52
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
53
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
54
|
+
let baseOptions;
|
|
55
|
+
if (configuration) {
|
|
56
|
+
baseOptions = configuration.baseOptions;
|
|
57
|
+
}
|
|
58
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
|
|
59
|
+
const localVarHeaderParameter = {};
|
|
60
|
+
const localVarQueryParameter = {};
|
|
61
|
+
// authentication session-oauth required
|
|
62
|
+
// oauth required
|
|
63
|
+
yield (0, common_1.setOAuthToObject)(localVarHeaderParameter, "session-oauth", [], configuration);
|
|
64
|
+
// authentication api-key required
|
|
65
|
+
yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-api-key", configuration);
|
|
66
|
+
if (project !== undefined) {
|
|
67
|
+
localVarQueryParameter['project'] = project;
|
|
68
|
+
}
|
|
69
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
70
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
71
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
72
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
73
|
+
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(createBlogRequest, localVarRequestOptions, configuration);
|
|
74
|
+
return {
|
|
75
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
76
|
+
options: localVarRequestOptions,
|
|
77
|
+
};
|
|
78
|
+
}),
|
|
79
|
+
/**
|
|
80
|
+
*
|
|
81
|
+
* @summary Delete a blog
|
|
82
|
+
* @param {string} project
|
|
83
|
+
* @param {string} blogId
|
|
84
|
+
* @param {*} [options] Override http request option.
|
|
85
|
+
* @throws {RequiredError}
|
|
86
|
+
*/
|
|
87
|
+
deleteBlog: (project_1, blogId_1, ...args_1) => __awaiter(this, [project_1, blogId_1, ...args_1], void 0, function* (project, blogId, options = {}) {
|
|
88
|
+
// verify required parameter 'project' is not null or undefined
|
|
89
|
+
(0, common_1.assertParamExists)('deleteBlog', 'project', project);
|
|
90
|
+
// verify required parameter 'blogId' is not null or undefined
|
|
91
|
+
(0, common_1.assertParamExists)('deleteBlog', 'blogId', blogId);
|
|
92
|
+
const localVarPath = `/v1/blog/blogs/{blogId}`
|
|
93
|
+
.replace(`{${"blogId"}}`, encodeURIComponent(String(blogId)));
|
|
94
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
95
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
96
|
+
let baseOptions;
|
|
97
|
+
if (configuration) {
|
|
98
|
+
baseOptions = configuration.baseOptions;
|
|
99
|
+
}
|
|
100
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'DELETE' }, baseOptions), options);
|
|
101
|
+
const localVarHeaderParameter = {};
|
|
102
|
+
const localVarQueryParameter = {};
|
|
103
|
+
// authentication session-oauth required
|
|
104
|
+
// oauth required
|
|
105
|
+
yield (0, common_1.setOAuthToObject)(localVarHeaderParameter, "session-oauth", [], configuration);
|
|
106
|
+
// authentication api-key required
|
|
107
|
+
yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-api-key", configuration);
|
|
108
|
+
if (project !== undefined) {
|
|
109
|
+
localVarQueryParameter['project'] = project;
|
|
110
|
+
}
|
|
111
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
112
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
113
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
114
|
+
return {
|
|
115
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
116
|
+
options: localVarRequestOptions,
|
|
117
|
+
};
|
|
118
|
+
}),
|
|
119
|
+
/**
|
|
120
|
+
*
|
|
121
|
+
* @summary Get a blog
|
|
122
|
+
* @param {string} project
|
|
123
|
+
* @param {string} blogId
|
|
124
|
+
* @param {*} [options] Override http request option.
|
|
125
|
+
* @throws {RequiredError}
|
|
126
|
+
*/
|
|
127
|
+
getBlog: (project_1, blogId_1, ...args_1) => __awaiter(this, [project_1, blogId_1, ...args_1], void 0, function* (project, blogId, options = {}) {
|
|
128
|
+
// verify required parameter 'project' is not null or undefined
|
|
129
|
+
(0, common_1.assertParamExists)('getBlog', 'project', project);
|
|
130
|
+
// verify required parameter 'blogId' is not null or undefined
|
|
131
|
+
(0, common_1.assertParamExists)('getBlog', 'blogId', blogId);
|
|
132
|
+
const localVarPath = `/v1/blog/blogs/{blogId}`
|
|
133
|
+
.replace(`{${"blogId"}}`, encodeURIComponent(String(blogId)));
|
|
134
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
135
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
136
|
+
let baseOptions;
|
|
137
|
+
if (configuration) {
|
|
138
|
+
baseOptions = configuration.baseOptions;
|
|
139
|
+
}
|
|
140
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
141
|
+
const localVarHeaderParameter = {};
|
|
142
|
+
const localVarQueryParameter = {};
|
|
143
|
+
// authentication session-oauth required
|
|
144
|
+
// oauth required
|
|
145
|
+
yield (0, common_1.setOAuthToObject)(localVarHeaderParameter, "session-oauth", [], configuration);
|
|
146
|
+
// authentication api-key required
|
|
147
|
+
yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-api-key", configuration);
|
|
148
|
+
if (project !== undefined) {
|
|
149
|
+
localVarQueryParameter['project'] = project;
|
|
150
|
+
}
|
|
151
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
152
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
153
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
154
|
+
return {
|
|
155
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
156
|
+
options: localVarRequestOptions,
|
|
157
|
+
};
|
|
158
|
+
}),
|
|
159
|
+
/**
|
|
160
|
+
*
|
|
161
|
+
* @summary List blogs
|
|
162
|
+
* @param {string} project
|
|
163
|
+
* @param {*} [options] Override http request option.
|
|
164
|
+
* @throws {RequiredError}
|
|
165
|
+
*/
|
|
166
|
+
listBlogs: (project_1, ...args_1) => __awaiter(this, [project_1, ...args_1], void 0, function* (project, options = {}) {
|
|
167
|
+
// verify required parameter 'project' is not null or undefined
|
|
168
|
+
(0, common_1.assertParamExists)('listBlogs', 'project', project);
|
|
169
|
+
const localVarPath = `/v1/blog/blogs`;
|
|
170
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
171
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
172
|
+
let baseOptions;
|
|
173
|
+
if (configuration) {
|
|
174
|
+
baseOptions = configuration.baseOptions;
|
|
175
|
+
}
|
|
176
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
177
|
+
const localVarHeaderParameter = {};
|
|
178
|
+
const localVarQueryParameter = {};
|
|
179
|
+
// authentication session-oauth required
|
|
180
|
+
// oauth required
|
|
181
|
+
yield (0, common_1.setOAuthToObject)(localVarHeaderParameter, "session-oauth", [], configuration);
|
|
182
|
+
// authentication api-key required
|
|
183
|
+
yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-api-key", configuration);
|
|
184
|
+
if (project !== undefined) {
|
|
185
|
+
localVarQueryParameter['project'] = project;
|
|
186
|
+
}
|
|
187
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
188
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
189
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
190
|
+
return {
|
|
191
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
192
|
+
options: localVarRequestOptions,
|
|
193
|
+
};
|
|
194
|
+
}),
|
|
195
|
+
/**
|
|
196
|
+
*
|
|
197
|
+
* @summary Update a blog
|
|
198
|
+
* @param {string} project
|
|
199
|
+
* @param {string} blogId
|
|
200
|
+
* @param {UpdateBlogRequest} updateBlogRequest
|
|
201
|
+
* @param {*} [options] Override http request option.
|
|
202
|
+
* @throws {RequiredError}
|
|
203
|
+
*/
|
|
204
|
+
updateBlog: (project_1, blogId_1, updateBlogRequest_1, ...args_1) => __awaiter(this, [project_1, blogId_1, updateBlogRequest_1, ...args_1], void 0, function* (project, blogId, updateBlogRequest, options = {}) {
|
|
205
|
+
// verify required parameter 'project' is not null or undefined
|
|
206
|
+
(0, common_1.assertParamExists)('updateBlog', 'project', project);
|
|
207
|
+
// verify required parameter 'blogId' is not null or undefined
|
|
208
|
+
(0, common_1.assertParamExists)('updateBlog', 'blogId', blogId);
|
|
209
|
+
// verify required parameter 'updateBlogRequest' is not null or undefined
|
|
210
|
+
(0, common_1.assertParamExists)('updateBlog', 'updateBlogRequest', updateBlogRequest);
|
|
211
|
+
const localVarPath = `/v1/blog/blogs/{blogId}`
|
|
212
|
+
.replace(`{${"blogId"}}`, encodeURIComponent(String(blogId)));
|
|
213
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
214
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
215
|
+
let baseOptions;
|
|
216
|
+
if (configuration) {
|
|
217
|
+
baseOptions = configuration.baseOptions;
|
|
218
|
+
}
|
|
219
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'PATCH' }, baseOptions), options);
|
|
220
|
+
const localVarHeaderParameter = {};
|
|
221
|
+
const localVarQueryParameter = {};
|
|
222
|
+
// authentication session-oauth required
|
|
223
|
+
// oauth required
|
|
224
|
+
yield (0, common_1.setOAuthToObject)(localVarHeaderParameter, "session-oauth", [], configuration);
|
|
225
|
+
// authentication api-key required
|
|
226
|
+
yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-api-key", configuration);
|
|
227
|
+
if (project !== undefined) {
|
|
228
|
+
localVarQueryParameter['project'] = project;
|
|
229
|
+
}
|
|
230
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
231
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
232
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
233
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
234
|
+
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(updateBlogRequest, localVarRequestOptions, configuration);
|
|
235
|
+
return {
|
|
236
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
237
|
+
options: localVarRequestOptions,
|
|
238
|
+
};
|
|
239
|
+
}),
|
|
240
|
+
};
|
|
241
|
+
};
|
|
242
|
+
exports.BlogApiAxiosParamCreator = BlogApiAxiosParamCreator;
|
|
243
|
+
/**
|
|
244
|
+
* BlogApi - functional programming interface
|
|
245
|
+
* @export
|
|
246
|
+
*/
|
|
247
|
+
const BlogApiFp = function (configuration) {
|
|
248
|
+
const localVarAxiosParamCreator = (0, exports.BlogApiAxiosParamCreator)(configuration);
|
|
249
|
+
return {
|
|
250
|
+
/**
|
|
251
|
+
*
|
|
252
|
+
* @summary Create a blog
|
|
253
|
+
* @param {string} project
|
|
254
|
+
* @param {CreateBlogRequest} createBlogRequest
|
|
255
|
+
* @param {*} [options] Override http request option.
|
|
256
|
+
* @throws {RequiredError}
|
|
257
|
+
*/
|
|
258
|
+
createBlog(project, createBlogRequest, options) {
|
|
259
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
260
|
+
var _a, _b, _c;
|
|
261
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.createBlog(project, createBlogRequest, options);
|
|
262
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
263
|
+
const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['BlogApi.createBlog']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
264
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
265
|
+
});
|
|
266
|
+
},
|
|
267
|
+
/**
|
|
268
|
+
*
|
|
269
|
+
* @summary Delete a blog
|
|
270
|
+
* @param {string} project
|
|
271
|
+
* @param {string} blogId
|
|
272
|
+
* @param {*} [options] Override http request option.
|
|
273
|
+
* @throws {RequiredError}
|
|
274
|
+
*/
|
|
275
|
+
deleteBlog(project, blogId, options) {
|
|
276
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
277
|
+
var _a, _b, _c;
|
|
278
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.deleteBlog(project, blogId, options);
|
|
279
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
280
|
+
const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['BlogApi.deleteBlog']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
281
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
282
|
+
});
|
|
283
|
+
},
|
|
284
|
+
/**
|
|
285
|
+
*
|
|
286
|
+
* @summary Get a blog
|
|
287
|
+
* @param {string} project
|
|
288
|
+
* @param {string} blogId
|
|
289
|
+
* @param {*} [options] Override http request option.
|
|
290
|
+
* @throws {RequiredError}
|
|
291
|
+
*/
|
|
292
|
+
getBlog(project, blogId, options) {
|
|
293
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
294
|
+
var _a, _b, _c;
|
|
295
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.getBlog(project, blogId, options);
|
|
296
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
297
|
+
const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['BlogApi.getBlog']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
298
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
299
|
+
});
|
|
300
|
+
},
|
|
301
|
+
/**
|
|
302
|
+
*
|
|
303
|
+
* @summary List blogs
|
|
304
|
+
* @param {string} project
|
|
305
|
+
* @param {*} [options] Override http request option.
|
|
306
|
+
* @throws {RequiredError}
|
|
307
|
+
*/
|
|
308
|
+
listBlogs(project, options) {
|
|
309
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
310
|
+
var _a, _b, _c;
|
|
311
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.listBlogs(project, options);
|
|
312
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
313
|
+
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
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
315
|
+
});
|
|
316
|
+
},
|
|
317
|
+
/**
|
|
318
|
+
*
|
|
319
|
+
* @summary Update a blog
|
|
320
|
+
* @param {string} project
|
|
321
|
+
* @param {string} blogId
|
|
322
|
+
* @param {UpdateBlogRequest} updateBlogRequest
|
|
323
|
+
* @param {*} [options] Override http request option.
|
|
324
|
+
* @throws {RequiredError}
|
|
325
|
+
*/
|
|
326
|
+
updateBlog(project, blogId, updateBlogRequest, options) {
|
|
327
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
328
|
+
var _a, _b, _c;
|
|
329
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.updateBlog(project, blogId, updateBlogRequest, options);
|
|
330
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
331
|
+
const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['BlogApi.updateBlog']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
332
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
333
|
+
});
|
|
334
|
+
},
|
|
335
|
+
};
|
|
336
|
+
};
|
|
337
|
+
exports.BlogApiFp = BlogApiFp;
|
|
338
|
+
/**
|
|
339
|
+
* BlogApi - factory interface
|
|
340
|
+
* @export
|
|
341
|
+
*/
|
|
342
|
+
const BlogApiFactory = function (configuration, basePath, axios) {
|
|
343
|
+
const localVarFp = (0, exports.BlogApiFp)(configuration);
|
|
344
|
+
return {
|
|
345
|
+
/**
|
|
346
|
+
*
|
|
347
|
+
* @summary Create a blog
|
|
348
|
+
* @param {BlogApiCreateBlogRequest} requestParameters Request parameters.
|
|
349
|
+
* @param {*} [options] Override http request option.
|
|
350
|
+
* @throws {RequiredError}
|
|
351
|
+
*/
|
|
352
|
+
createBlog(requestParameters, options) {
|
|
353
|
+
return localVarFp.createBlog(requestParameters.project, requestParameters.createBlogRequest, options).then((request) => request(axios, basePath));
|
|
354
|
+
},
|
|
355
|
+
/**
|
|
356
|
+
*
|
|
357
|
+
* @summary Delete a blog
|
|
358
|
+
* @param {BlogApiDeleteBlogRequest} requestParameters Request parameters.
|
|
359
|
+
* @param {*} [options] Override http request option.
|
|
360
|
+
* @throws {RequiredError}
|
|
361
|
+
*/
|
|
362
|
+
deleteBlog(requestParameters, options) {
|
|
363
|
+
return localVarFp.deleteBlog(requestParameters.project, requestParameters.blogId, options).then((request) => request(axios, basePath));
|
|
364
|
+
},
|
|
365
|
+
/**
|
|
366
|
+
*
|
|
367
|
+
* @summary Get a blog
|
|
368
|
+
* @param {BlogApiGetBlogRequest} requestParameters Request parameters.
|
|
369
|
+
* @param {*} [options] Override http request option.
|
|
370
|
+
* @throws {RequiredError}
|
|
371
|
+
*/
|
|
372
|
+
getBlog(requestParameters, options) {
|
|
373
|
+
return localVarFp.getBlog(requestParameters.project, requestParameters.blogId, options).then((request) => request(axios, basePath));
|
|
374
|
+
},
|
|
375
|
+
/**
|
|
376
|
+
*
|
|
377
|
+
* @summary List blogs
|
|
378
|
+
* @param {BlogApiListBlogsRequest} requestParameters Request parameters.
|
|
379
|
+
* @param {*} [options] Override http request option.
|
|
380
|
+
* @throws {RequiredError}
|
|
381
|
+
*/
|
|
382
|
+
listBlogs(requestParameters, options) {
|
|
383
|
+
return localVarFp.listBlogs(requestParameters.project, options).then((request) => request(axios, basePath));
|
|
384
|
+
},
|
|
385
|
+
/**
|
|
386
|
+
*
|
|
387
|
+
* @summary Update a blog
|
|
388
|
+
* @param {BlogApiUpdateBlogRequest} requestParameters Request parameters.
|
|
389
|
+
* @param {*} [options] Override http request option.
|
|
390
|
+
* @throws {RequiredError}
|
|
391
|
+
*/
|
|
392
|
+
updateBlog(requestParameters, options) {
|
|
393
|
+
return localVarFp.updateBlog(requestParameters.project, requestParameters.blogId, requestParameters.updateBlogRequest, options).then((request) => request(axios, basePath));
|
|
394
|
+
},
|
|
395
|
+
};
|
|
396
|
+
};
|
|
397
|
+
exports.BlogApiFactory = BlogApiFactory;
|
|
398
|
+
/**
|
|
399
|
+
* BlogApi - object-oriented interface
|
|
400
|
+
* @export
|
|
401
|
+
* @class BlogApi
|
|
402
|
+
* @extends {BaseAPI}
|
|
403
|
+
*/
|
|
404
|
+
class BlogApi extends base_1.BaseAPI {
|
|
405
|
+
/**
|
|
406
|
+
*
|
|
407
|
+
* @summary Create a blog
|
|
408
|
+
* @param {BlogApiCreateBlogRequest} requestParameters Request parameters.
|
|
409
|
+
* @param {*} [options] Override http request option.
|
|
410
|
+
* @throws {RequiredError}
|
|
411
|
+
* @memberof BlogApi
|
|
412
|
+
*/
|
|
413
|
+
createBlog(requestParameters, options) {
|
|
414
|
+
return (0, exports.BlogApiFp)(this.configuration).createBlog(requestParameters.project, requestParameters.createBlogRequest, options).then((request) => request(this.axios, this.basePath));
|
|
415
|
+
}
|
|
416
|
+
/**
|
|
417
|
+
*
|
|
418
|
+
* @summary Delete a blog
|
|
419
|
+
* @param {BlogApiDeleteBlogRequest} requestParameters Request parameters.
|
|
420
|
+
* @param {*} [options] Override http request option.
|
|
421
|
+
* @throws {RequiredError}
|
|
422
|
+
* @memberof BlogApi
|
|
423
|
+
*/
|
|
424
|
+
deleteBlog(requestParameters, options) {
|
|
425
|
+
return (0, exports.BlogApiFp)(this.configuration).deleteBlog(requestParameters.project, requestParameters.blogId, options).then((request) => request(this.axios, this.basePath));
|
|
426
|
+
}
|
|
427
|
+
/**
|
|
428
|
+
*
|
|
429
|
+
* @summary Get a blog
|
|
430
|
+
* @param {BlogApiGetBlogRequest} requestParameters Request parameters.
|
|
431
|
+
* @param {*} [options] Override http request option.
|
|
432
|
+
* @throws {RequiredError}
|
|
433
|
+
* @memberof BlogApi
|
|
434
|
+
*/
|
|
435
|
+
getBlog(requestParameters, options) {
|
|
436
|
+
return (0, exports.BlogApiFp)(this.configuration).getBlog(requestParameters.project, requestParameters.blogId, options).then((request) => request(this.axios, this.basePath));
|
|
437
|
+
}
|
|
438
|
+
/**
|
|
439
|
+
*
|
|
440
|
+
* @summary List blogs
|
|
441
|
+
* @param {BlogApiListBlogsRequest} requestParameters Request parameters.
|
|
442
|
+
* @param {*} [options] Override http request option.
|
|
443
|
+
* @throws {RequiredError}
|
|
444
|
+
* @memberof BlogApi
|
|
445
|
+
*/
|
|
446
|
+
listBlogs(requestParameters, options) {
|
|
447
|
+
return (0, exports.BlogApiFp)(this.configuration).listBlogs(requestParameters.project, options).then((request) => request(this.axios, this.basePath));
|
|
448
|
+
}
|
|
449
|
+
/**
|
|
450
|
+
*
|
|
451
|
+
* @summary Update a blog
|
|
452
|
+
* @param {BlogApiUpdateBlogRequest} requestParameters Request parameters.
|
|
453
|
+
* @param {*} [options] Override http request option.
|
|
454
|
+
* @throws {RequiredError}
|
|
455
|
+
* @memberof BlogApi
|
|
456
|
+
*/
|
|
457
|
+
updateBlog(requestParameters, options) {
|
|
458
|
+
return (0, exports.BlogApiFp)(this.configuration).updateBlog(requestParameters.project, requestParameters.blogId, requestParameters.updateBlogRequest, options).then((request) => request(this.axios, this.basePath));
|
|
459
|
+
}
|
|
460
|
+
}
|
|
461
|
+
exports.BlogApi = BlogApi;
|
package/dist/base.d.ts
ADDED
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Blog API
|
|
3
|
+
* Read and write blogs on the PodOS platform. Currently this API is in development and is not yet publicly accessible. All paths and models are subject to change. For full documentation on functionality and account settings go to [teemill.com](https://teemill.com)
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 0.1.1
|
|
6
|
+
* Contact: hello@teemill.com
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
import type { Configuration } from './configuration';
|
|
13
|
+
import type { AxiosInstance, RawAxiosRequestConfig } from 'axios';
|
|
14
|
+
export declare const BASE_PATH: string;
|
|
15
|
+
/**
|
|
16
|
+
*
|
|
17
|
+
* @export
|
|
18
|
+
*/
|
|
19
|
+
export declare const COLLECTION_FORMATS: {
|
|
20
|
+
csv: string;
|
|
21
|
+
ssv: string;
|
|
22
|
+
tsv: string;
|
|
23
|
+
pipes: string;
|
|
24
|
+
};
|
|
25
|
+
/**
|
|
26
|
+
*
|
|
27
|
+
* @export
|
|
28
|
+
* @interface RequestArgs
|
|
29
|
+
*/
|
|
30
|
+
export interface RequestArgs {
|
|
31
|
+
url: string;
|
|
32
|
+
options: RawAxiosRequestConfig;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
*
|
|
36
|
+
* @export
|
|
37
|
+
* @class BaseAPI
|
|
38
|
+
*/
|
|
39
|
+
export declare class BaseAPI {
|
|
40
|
+
protected basePath: string;
|
|
41
|
+
protected axios: AxiosInstance;
|
|
42
|
+
protected configuration: Configuration | undefined;
|
|
43
|
+
constructor(configuration?: Configuration, basePath?: string, axios?: AxiosInstance);
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
*
|
|
47
|
+
* @export
|
|
48
|
+
* @class RequiredError
|
|
49
|
+
* @extends {Error}
|
|
50
|
+
*/
|
|
51
|
+
export declare class RequiredError extends Error {
|
|
52
|
+
field: string;
|
|
53
|
+
constructor(field: string, msg?: string);
|
|
54
|
+
}
|
|
55
|
+
interface ServerMap {
|
|
56
|
+
[key: string]: {
|
|
57
|
+
url: string;
|
|
58
|
+
description: string;
|
|
59
|
+
}[];
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
*
|
|
63
|
+
* @export
|
|
64
|
+
*/
|
|
65
|
+
export declare const operationServerMap: ServerMap;
|
|
66
|
+
export {};
|
package/dist/base.js
ADDED
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* Blog API
|
|
6
|
+
* Read and write blogs on the PodOS platform. Currently this API is in development and is not yet publicly accessible. All paths and models are subject to change. For full documentation on functionality and account settings go to [teemill.com](https://teemill.com)
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 0.1.1
|
|
9
|
+
* Contact: hello@teemill.com
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.operationServerMap = exports.RequiredError = exports.BaseAPI = exports.COLLECTION_FORMATS = exports.BASE_PATH = void 0;
|
|
17
|
+
const axios_1 = require("axios");
|
|
18
|
+
exports.BASE_PATH = "https://localhost:8080".replace(/\/+$/, "");
|
|
19
|
+
/**
|
|
20
|
+
*
|
|
21
|
+
* @export
|
|
22
|
+
*/
|
|
23
|
+
exports.COLLECTION_FORMATS = {
|
|
24
|
+
csv: ",",
|
|
25
|
+
ssv: " ",
|
|
26
|
+
tsv: "\t",
|
|
27
|
+
pipes: "|",
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
*
|
|
31
|
+
* @export
|
|
32
|
+
* @class BaseAPI
|
|
33
|
+
*/
|
|
34
|
+
class BaseAPI {
|
|
35
|
+
constructor(configuration, basePath = exports.BASE_PATH, axios = axios_1.default) {
|
|
36
|
+
var _a;
|
|
37
|
+
this.basePath = basePath;
|
|
38
|
+
this.axios = axios;
|
|
39
|
+
if (configuration) {
|
|
40
|
+
this.configuration = configuration;
|
|
41
|
+
this.basePath = (_a = configuration.basePath) !== null && _a !== void 0 ? _a : basePath;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
exports.BaseAPI = BaseAPI;
|
|
46
|
+
;
|
|
47
|
+
/**
|
|
48
|
+
*
|
|
49
|
+
* @export
|
|
50
|
+
* @class RequiredError
|
|
51
|
+
* @extends {Error}
|
|
52
|
+
*/
|
|
53
|
+
class RequiredError extends Error {
|
|
54
|
+
constructor(field, msg) {
|
|
55
|
+
super(msg);
|
|
56
|
+
this.field = field;
|
|
57
|
+
this.name = "RequiredError";
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
exports.RequiredError = RequiredError;
|
|
61
|
+
/**
|
|
62
|
+
*
|
|
63
|
+
* @export
|
|
64
|
+
*/
|
|
65
|
+
exports.operationServerMap = {};
|
package/dist/common.d.ts
ADDED
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Blog API
|
|
3
|
+
* Read and write blogs on the PodOS platform. Currently this API is in development and is not yet publicly accessible. All paths and models are subject to change. For full documentation on functionality and account settings go to [teemill.com](https://teemill.com)
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 0.1.1
|
|
6
|
+
* Contact: hello@teemill.com
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
import type { Configuration } from "./configuration";
|
|
13
|
+
import type { RequestArgs } from "./base";
|
|
14
|
+
import type { AxiosInstance, AxiosResponse } from 'axios';
|
|
15
|
+
/**
|
|
16
|
+
*
|
|
17
|
+
* @export
|
|
18
|
+
*/
|
|
19
|
+
export declare const DUMMY_BASE_URL = "https://example.com";
|
|
20
|
+
/**
|
|
21
|
+
*
|
|
22
|
+
* @throws {RequiredError}
|
|
23
|
+
* @export
|
|
24
|
+
*/
|
|
25
|
+
export declare const assertParamExists: (functionName: string, paramName: string, paramValue: unknown) => void;
|
|
26
|
+
/**
|
|
27
|
+
*
|
|
28
|
+
* @export
|
|
29
|
+
*/
|
|
30
|
+
export declare const setApiKeyToObject: (object: any, keyParamName: string, configuration?: Configuration) => Promise<void>;
|
|
31
|
+
/**
|
|
32
|
+
*
|
|
33
|
+
* @export
|
|
34
|
+
*/
|
|
35
|
+
export declare const setBasicAuthToObject: (object: any, configuration?: Configuration) => void;
|
|
36
|
+
/**
|
|
37
|
+
*
|
|
38
|
+
* @export
|
|
39
|
+
*/
|
|
40
|
+
export declare const setBearerAuthToObject: (object: any, configuration?: Configuration) => Promise<void>;
|
|
41
|
+
/**
|
|
42
|
+
*
|
|
43
|
+
* @export
|
|
44
|
+
*/
|
|
45
|
+
export declare const setOAuthToObject: (object: any, name: string, scopes: string[], configuration?: Configuration) => Promise<void>;
|
|
46
|
+
/**
|
|
47
|
+
*
|
|
48
|
+
* @export
|
|
49
|
+
*/
|
|
50
|
+
export declare const setSearchParams: (url: URL, ...objects: any[]) => void;
|
|
51
|
+
/**
|
|
52
|
+
*
|
|
53
|
+
* @export
|
|
54
|
+
*/
|
|
55
|
+
export declare const serializeDataIfNeeded: (value: any, requestOptions: any, configuration?: Configuration) => any;
|
|
56
|
+
/**
|
|
57
|
+
*
|
|
58
|
+
* @export
|
|
59
|
+
*/
|
|
60
|
+
export declare const toPathString: (url: URL) => string;
|
|
61
|
+
/**
|
|
62
|
+
*
|
|
63
|
+
* @export
|
|
64
|
+
*/
|
|
65
|
+
export declare const createRequestFunction: (axiosArgs: RequestArgs, globalAxios: AxiosInstance, BASE_PATH: string, configuration?: Configuration) => <T = unknown, R = AxiosResponse<T, any>>(axios?: AxiosInstance, basePath?: string) => Promise<R>;
|