@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/api.ts ADDED
@@ -0,0 +1,828 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Blog API
5
+ * 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)
6
+ *
7
+ * The version of the OpenAPI document: 0.1.1
8
+ * Contact: hello@teemill.com
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+
16
+ import type { Configuration } from './configuration';
17
+ import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios';
18
+ import globalAxios from 'axios';
19
+ // Some imports not used depending on template conditions
20
+ // @ts-ignore
21
+ import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from './common';
22
+ import type { RequestArgs } from './base';
23
+ // @ts-ignore
24
+ import { BASE_PATH, COLLECTION_FORMATS, BaseAPI, RequiredError, operationServerMap } from './base';
25
+
26
+ /**
27
+ *
28
+ * @export
29
+ * @interface ApiError
30
+ */
31
+ export interface ApiError {
32
+ /**
33
+ *
34
+ * @type {string}
35
+ * @memberof ApiError
36
+ */
37
+ 'code'?: string;
38
+ /**
39
+ *
40
+ * @type {string}
41
+ * @memberof ApiError
42
+ */
43
+ 'message': string;
44
+ }
45
+ /**
46
+ *
47
+ * @export
48
+ * @interface Blog
49
+ */
50
+ export interface Blog {
51
+ /**
52
+ *
53
+ * @type {string}
54
+ * @memberof Blog
55
+ */
56
+ 'id': string;
57
+ /**
58
+ *
59
+ * @type {string}
60
+ * @memberof Blog
61
+ */
62
+ 'title': string;
63
+ /**
64
+ *
65
+ * @type {string}
66
+ * @memberof Blog
67
+ */
68
+ 'slug': string;
69
+ /**
70
+ *
71
+ * @type {string}
72
+ * @memberof Blog
73
+ */
74
+ 'description': string;
75
+ /**
76
+ *
77
+ * @type {string}
78
+ * @memberof Blog
79
+ */
80
+ 'metaImage': string | null;
81
+ /**
82
+ *
83
+ * @type {string}
84
+ * @memberof Blog
85
+ */
86
+ 'publishedAt': string | null;
87
+ /**
88
+ *
89
+ * @type {string}
90
+ * @memberof Blog
91
+ */
92
+ 'createdAt': string;
93
+ /**
94
+ *
95
+ * @type {string}
96
+ * @memberof Blog
97
+ */
98
+ 'updatedAt': string;
99
+ /**
100
+ *
101
+ * @type {string}
102
+ * @memberof Blog
103
+ */
104
+ 'content': string;
105
+ }
106
+ /**
107
+ *
108
+ * @export
109
+ * @interface BlogListing
110
+ */
111
+ export interface BlogListing {
112
+ /**
113
+ *
114
+ * @type {string}
115
+ * @memberof BlogListing
116
+ */
117
+ 'id': string;
118
+ /**
119
+ *
120
+ * @type {string}
121
+ * @memberof BlogListing
122
+ */
123
+ 'title': string;
124
+ /**
125
+ *
126
+ * @type {string}
127
+ * @memberof BlogListing
128
+ */
129
+ 'slug': string;
130
+ /**
131
+ *
132
+ * @type {string}
133
+ * @memberof BlogListing
134
+ */
135
+ 'description': string;
136
+ /**
137
+ *
138
+ * @type {string}
139
+ * @memberof BlogListing
140
+ */
141
+ 'metaImage': string | null;
142
+ /**
143
+ *
144
+ * @type {string}
145
+ * @memberof BlogListing
146
+ */
147
+ 'publishedAt': string | null;
148
+ /**
149
+ *
150
+ * @type {string}
151
+ * @memberof BlogListing
152
+ */
153
+ 'createdAt': string;
154
+ /**
155
+ *
156
+ * @type {string}
157
+ * @memberof BlogListing
158
+ */
159
+ 'updatedAt': string;
160
+ }
161
+ /**
162
+ *
163
+ * @export
164
+ * @interface CreateBlogRequest
165
+ */
166
+ export interface CreateBlogRequest {
167
+ /**
168
+ *
169
+ * @type {string}
170
+ * @memberof CreateBlogRequest
171
+ */
172
+ 'title': string;
173
+ /**
174
+ *
175
+ * @type {string}
176
+ * @memberof CreateBlogRequest
177
+ */
178
+ 'content': string;
179
+ /**
180
+ *
181
+ * @type {string}
182
+ * @memberof CreateBlogRequest
183
+ */
184
+ 'slug': string;
185
+ /**
186
+ *
187
+ * @type {string}
188
+ * @memberof CreateBlogRequest
189
+ */
190
+ 'description': string;
191
+ /**
192
+ *
193
+ * @type {string}
194
+ * @memberof CreateBlogRequest
195
+ */
196
+ 'metaImage': string;
197
+ /**
198
+ *
199
+ * @type {boolean}
200
+ * @memberof CreateBlogRequest
201
+ */
202
+ 'published'?: boolean;
203
+ }
204
+ /**
205
+ *
206
+ * @export
207
+ * @interface ListBlogsResponse
208
+ */
209
+ export interface ListBlogsResponse {
210
+ /**
211
+ *
212
+ * @type {Array<BlogListing>}
213
+ * @memberof ListBlogsResponse
214
+ */
215
+ 'blogs': Array<BlogListing>;
216
+ }
217
+ /**
218
+ *
219
+ * @export
220
+ * @interface UpdateBlogRequest
221
+ */
222
+ export interface UpdateBlogRequest {
223
+ /**
224
+ *
225
+ * @type {string}
226
+ * @memberof UpdateBlogRequest
227
+ */
228
+ 'title'?: string;
229
+ /**
230
+ *
231
+ * @type {string}
232
+ * @memberof UpdateBlogRequest
233
+ */
234
+ 'content'?: string;
235
+ /**
236
+ *
237
+ * @type {string}
238
+ * @memberof UpdateBlogRequest
239
+ */
240
+ 'slug'?: string;
241
+ /**
242
+ *
243
+ * @type {string}
244
+ * @memberof UpdateBlogRequest
245
+ */
246
+ 'description'?: string;
247
+ /**
248
+ *
249
+ * @type {string}
250
+ * @memberof UpdateBlogRequest
251
+ */
252
+ 'metaImage'?: string;
253
+ /**
254
+ *
255
+ * @type {boolean}
256
+ * @memberof UpdateBlogRequest
257
+ */
258
+ 'published'?: boolean;
259
+ }
260
+
261
+ /**
262
+ * BlogApi - axios parameter creator
263
+ * @export
264
+ */
265
+ export const BlogApiAxiosParamCreator = function (configuration?: Configuration) {
266
+ return {
267
+ /**
268
+ *
269
+ * @summary Create a blog
270
+ * @param {string} project
271
+ * @param {CreateBlogRequest} createBlogRequest
272
+ * @param {*} [options] Override http request option.
273
+ * @throws {RequiredError}
274
+ */
275
+ createBlog: async (project: string, createBlogRequest: CreateBlogRequest, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
276
+ // verify required parameter 'project' is not null or undefined
277
+ assertParamExists('createBlog', 'project', project)
278
+ // verify required parameter 'createBlogRequest' is not null or undefined
279
+ assertParamExists('createBlog', 'createBlogRequest', createBlogRequest)
280
+ const localVarPath = `/v1/blog/blogs`;
281
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
282
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
283
+ let baseOptions;
284
+ if (configuration) {
285
+ baseOptions = configuration.baseOptions;
286
+ }
287
+
288
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
289
+ const localVarHeaderParameter = {} as any;
290
+ const localVarQueryParameter = {} as any;
291
+
292
+ // authentication session-oauth required
293
+ // oauth required
294
+ await setOAuthToObject(localVarHeaderParameter, "session-oauth", [], configuration)
295
+
296
+ // authentication api-key required
297
+ await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration)
298
+
299
+ if (project !== undefined) {
300
+ localVarQueryParameter['project'] = project;
301
+ }
302
+
303
+
304
+
305
+ localVarHeaderParameter['Content-Type'] = 'application/json';
306
+
307
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
308
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
309
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
310
+ localVarRequestOptions.data = serializeDataIfNeeded(createBlogRequest, localVarRequestOptions, configuration)
311
+
312
+ return {
313
+ url: toPathString(localVarUrlObj),
314
+ options: localVarRequestOptions,
315
+ };
316
+ },
317
+ /**
318
+ *
319
+ * @summary Delete a blog
320
+ * @param {string} project
321
+ * @param {string} blogId
322
+ * @param {*} [options] Override http request option.
323
+ * @throws {RequiredError}
324
+ */
325
+ deleteBlog: async (project: string, blogId: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
326
+ // verify required parameter 'project' is not null or undefined
327
+ assertParamExists('deleteBlog', 'project', project)
328
+ // verify required parameter 'blogId' is not null or undefined
329
+ assertParamExists('deleteBlog', 'blogId', blogId)
330
+ const localVarPath = `/v1/blog/blogs/{blogId}`
331
+ .replace(`{${"blogId"}}`, encodeURIComponent(String(blogId)));
332
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
333
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
334
+ let baseOptions;
335
+ if (configuration) {
336
+ baseOptions = configuration.baseOptions;
337
+ }
338
+
339
+ const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options};
340
+ const localVarHeaderParameter = {} as any;
341
+ const localVarQueryParameter = {} as any;
342
+
343
+ // authentication session-oauth required
344
+ // oauth required
345
+ await setOAuthToObject(localVarHeaderParameter, "session-oauth", [], configuration)
346
+
347
+ // authentication api-key required
348
+ await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration)
349
+
350
+ if (project !== undefined) {
351
+ localVarQueryParameter['project'] = project;
352
+ }
353
+
354
+
355
+
356
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
357
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
358
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
359
+
360
+ return {
361
+ url: toPathString(localVarUrlObj),
362
+ options: localVarRequestOptions,
363
+ };
364
+ },
365
+ /**
366
+ *
367
+ * @summary Get a blog
368
+ * @param {string} project
369
+ * @param {string} blogId
370
+ * @param {*} [options] Override http request option.
371
+ * @throws {RequiredError}
372
+ */
373
+ getBlog: async (project: string, blogId: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
374
+ // verify required parameter 'project' is not null or undefined
375
+ assertParamExists('getBlog', 'project', project)
376
+ // verify required parameter 'blogId' is not null or undefined
377
+ assertParamExists('getBlog', 'blogId', blogId)
378
+ const localVarPath = `/v1/blog/blogs/{blogId}`
379
+ .replace(`{${"blogId"}}`, encodeURIComponent(String(blogId)));
380
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
381
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
382
+ let baseOptions;
383
+ if (configuration) {
384
+ baseOptions = configuration.baseOptions;
385
+ }
386
+
387
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
388
+ const localVarHeaderParameter = {} as any;
389
+ const localVarQueryParameter = {} as any;
390
+
391
+ // authentication session-oauth required
392
+ // oauth required
393
+ await setOAuthToObject(localVarHeaderParameter, "session-oauth", [], configuration)
394
+
395
+ // authentication api-key required
396
+ await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration)
397
+
398
+ if (project !== undefined) {
399
+ localVarQueryParameter['project'] = project;
400
+ }
401
+
402
+
403
+
404
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
405
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
406
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
407
+
408
+ return {
409
+ url: toPathString(localVarUrlObj),
410
+ options: localVarRequestOptions,
411
+ };
412
+ },
413
+ /**
414
+ *
415
+ * @summary List blogs
416
+ * @param {string} project
417
+ * @param {*} [options] Override http request option.
418
+ * @throws {RequiredError}
419
+ */
420
+ listBlogs: async (project: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
421
+ // verify required parameter 'project' is not null or undefined
422
+ assertParamExists('listBlogs', 'project', project)
423
+ const localVarPath = `/v1/blog/blogs`;
424
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
425
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
426
+ let baseOptions;
427
+ if (configuration) {
428
+ baseOptions = configuration.baseOptions;
429
+ }
430
+
431
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
432
+ const localVarHeaderParameter = {} as any;
433
+ const localVarQueryParameter = {} as any;
434
+
435
+ // authentication session-oauth required
436
+ // oauth required
437
+ await setOAuthToObject(localVarHeaderParameter, "session-oauth", [], configuration)
438
+
439
+ // authentication api-key required
440
+ await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration)
441
+
442
+ if (project !== undefined) {
443
+ localVarQueryParameter['project'] = project;
444
+ }
445
+
446
+
447
+
448
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
449
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
450
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
451
+
452
+ return {
453
+ url: toPathString(localVarUrlObj),
454
+ options: localVarRequestOptions,
455
+ };
456
+ },
457
+ /**
458
+ *
459
+ * @summary Update a blog
460
+ * @param {string} project
461
+ * @param {string} blogId
462
+ * @param {UpdateBlogRequest} updateBlogRequest
463
+ * @param {*} [options] Override http request option.
464
+ * @throws {RequiredError}
465
+ */
466
+ updateBlog: async (project: string, blogId: string, updateBlogRequest: UpdateBlogRequest, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
467
+ // verify required parameter 'project' is not null or undefined
468
+ assertParamExists('updateBlog', 'project', project)
469
+ // verify required parameter 'blogId' is not null or undefined
470
+ assertParamExists('updateBlog', 'blogId', blogId)
471
+ // verify required parameter 'updateBlogRequest' is not null or undefined
472
+ assertParamExists('updateBlog', 'updateBlogRequest', updateBlogRequest)
473
+ const localVarPath = `/v1/blog/blogs/{blogId}`
474
+ .replace(`{${"blogId"}}`, encodeURIComponent(String(blogId)));
475
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
476
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
477
+ let baseOptions;
478
+ if (configuration) {
479
+ baseOptions = configuration.baseOptions;
480
+ }
481
+
482
+ const localVarRequestOptions = { method: 'PATCH', ...baseOptions, ...options};
483
+ const localVarHeaderParameter = {} as any;
484
+ const localVarQueryParameter = {} as any;
485
+
486
+ // authentication session-oauth required
487
+ // oauth required
488
+ await setOAuthToObject(localVarHeaderParameter, "session-oauth", [], configuration)
489
+
490
+ // authentication api-key required
491
+ await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration)
492
+
493
+ if (project !== undefined) {
494
+ localVarQueryParameter['project'] = project;
495
+ }
496
+
497
+
498
+
499
+ localVarHeaderParameter['Content-Type'] = 'application/json';
500
+
501
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
502
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
503
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
504
+ localVarRequestOptions.data = serializeDataIfNeeded(updateBlogRequest, localVarRequestOptions, configuration)
505
+
506
+ return {
507
+ url: toPathString(localVarUrlObj),
508
+ options: localVarRequestOptions,
509
+ };
510
+ },
511
+ }
512
+ };
513
+
514
+ /**
515
+ * BlogApi - functional programming interface
516
+ * @export
517
+ */
518
+ export const BlogApiFp = function(configuration?: Configuration) {
519
+ const localVarAxiosParamCreator = BlogApiAxiosParamCreator(configuration)
520
+ return {
521
+ /**
522
+ *
523
+ * @summary Create a blog
524
+ * @param {string} project
525
+ * @param {CreateBlogRequest} createBlogRequest
526
+ * @param {*} [options] Override http request option.
527
+ * @throws {RequiredError}
528
+ */
529
+ async createBlog(project: string, createBlogRequest: CreateBlogRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Blog>> {
530
+ const localVarAxiosArgs = await localVarAxiosParamCreator.createBlog(project, createBlogRequest, options);
531
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
532
+ const localVarOperationServerBasePath = operationServerMap['BlogApi.createBlog']?.[localVarOperationServerIndex]?.url;
533
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
534
+ },
535
+ /**
536
+ *
537
+ * @summary Delete a blog
538
+ * @param {string} project
539
+ * @param {string} blogId
540
+ * @param {*} [options] Override http request option.
541
+ * @throws {RequiredError}
542
+ */
543
+ async deleteBlog(project: string, blogId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
544
+ const localVarAxiosArgs = await localVarAxiosParamCreator.deleteBlog(project, blogId, options);
545
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
546
+ const localVarOperationServerBasePath = operationServerMap['BlogApi.deleteBlog']?.[localVarOperationServerIndex]?.url;
547
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
548
+ },
549
+ /**
550
+ *
551
+ * @summary Get a blog
552
+ * @param {string} project
553
+ * @param {string} blogId
554
+ * @param {*} [options] Override http request option.
555
+ * @throws {RequiredError}
556
+ */
557
+ async getBlog(project: string, blogId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Blog>> {
558
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getBlog(project, blogId, options);
559
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
560
+ const localVarOperationServerBasePath = operationServerMap['BlogApi.getBlog']?.[localVarOperationServerIndex]?.url;
561
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
562
+ },
563
+ /**
564
+ *
565
+ * @summary List blogs
566
+ * @param {string} project
567
+ * @param {*} [options] Override http request option.
568
+ * @throws {RequiredError}
569
+ */
570
+ async listBlogs(project: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ListBlogsResponse>> {
571
+ const localVarAxiosArgs = await localVarAxiosParamCreator.listBlogs(project, options);
572
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
573
+ const localVarOperationServerBasePath = operationServerMap['BlogApi.listBlogs']?.[localVarOperationServerIndex]?.url;
574
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
575
+ },
576
+ /**
577
+ *
578
+ * @summary Update a blog
579
+ * @param {string} project
580
+ * @param {string} blogId
581
+ * @param {UpdateBlogRequest} updateBlogRequest
582
+ * @param {*} [options] Override http request option.
583
+ * @throws {RequiredError}
584
+ */
585
+ async updateBlog(project: string, blogId: string, updateBlogRequest: UpdateBlogRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Blog>> {
586
+ const localVarAxiosArgs = await localVarAxiosParamCreator.updateBlog(project, blogId, updateBlogRequest, options);
587
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
588
+ const localVarOperationServerBasePath = operationServerMap['BlogApi.updateBlog']?.[localVarOperationServerIndex]?.url;
589
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
590
+ },
591
+ }
592
+ };
593
+
594
+ /**
595
+ * BlogApi - factory interface
596
+ * @export
597
+ */
598
+ export const BlogApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
599
+ const localVarFp = BlogApiFp(configuration)
600
+ return {
601
+ /**
602
+ *
603
+ * @summary Create a blog
604
+ * @param {BlogApiCreateBlogRequest} requestParameters Request parameters.
605
+ * @param {*} [options] Override http request option.
606
+ * @throws {RequiredError}
607
+ */
608
+ createBlog(requestParameters: BlogApiCreateBlogRequest, options?: RawAxiosRequestConfig): AxiosPromise<Blog> {
609
+ return localVarFp.createBlog(requestParameters.project, requestParameters.createBlogRequest, options).then((request) => request(axios, basePath));
610
+ },
611
+ /**
612
+ *
613
+ * @summary Delete a blog
614
+ * @param {BlogApiDeleteBlogRequest} requestParameters Request parameters.
615
+ * @param {*} [options] Override http request option.
616
+ * @throws {RequiredError}
617
+ */
618
+ deleteBlog(requestParameters: BlogApiDeleteBlogRequest, options?: RawAxiosRequestConfig): AxiosPromise<void> {
619
+ return localVarFp.deleteBlog(requestParameters.project, requestParameters.blogId, options).then((request) => request(axios, basePath));
620
+ },
621
+ /**
622
+ *
623
+ * @summary Get a blog
624
+ * @param {BlogApiGetBlogRequest} requestParameters Request parameters.
625
+ * @param {*} [options] Override http request option.
626
+ * @throws {RequiredError}
627
+ */
628
+ getBlog(requestParameters: BlogApiGetBlogRequest, options?: RawAxiosRequestConfig): AxiosPromise<Blog> {
629
+ return localVarFp.getBlog(requestParameters.project, requestParameters.blogId, options).then((request) => request(axios, basePath));
630
+ },
631
+ /**
632
+ *
633
+ * @summary List blogs
634
+ * @param {BlogApiListBlogsRequest} requestParameters Request parameters.
635
+ * @param {*} [options] Override http request option.
636
+ * @throws {RequiredError}
637
+ */
638
+ listBlogs(requestParameters: BlogApiListBlogsRequest, options?: RawAxiosRequestConfig): AxiosPromise<ListBlogsResponse> {
639
+ return localVarFp.listBlogs(requestParameters.project, options).then((request) => request(axios, basePath));
640
+ },
641
+ /**
642
+ *
643
+ * @summary Update a blog
644
+ * @param {BlogApiUpdateBlogRequest} requestParameters Request parameters.
645
+ * @param {*} [options] Override http request option.
646
+ * @throws {RequiredError}
647
+ */
648
+ updateBlog(requestParameters: BlogApiUpdateBlogRequest, options?: RawAxiosRequestConfig): AxiosPromise<Blog> {
649
+ return localVarFp.updateBlog(requestParameters.project, requestParameters.blogId, requestParameters.updateBlogRequest, options).then((request) => request(axios, basePath));
650
+ },
651
+ };
652
+ };
653
+
654
+ /**
655
+ * Request parameters for createBlog operation in BlogApi.
656
+ * @export
657
+ * @interface BlogApiCreateBlogRequest
658
+ */
659
+ export interface BlogApiCreateBlogRequest {
660
+ /**
661
+ *
662
+ * @type {string}
663
+ * @memberof BlogApiCreateBlog
664
+ */
665
+ readonly project: string
666
+
667
+ /**
668
+ *
669
+ * @type {CreateBlogRequest}
670
+ * @memberof BlogApiCreateBlog
671
+ */
672
+ readonly createBlogRequest: CreateBlogRequest
673
+ }
674
+
675
+ /**
676
+ * Request parameters for deleteBlog operation in BlogApi.
677
+ * @export
678
+ * @interface BlogApiDeleteBlogRequest
679
+ */
680
+ export interface BlogApiDeleteBlogRequest {
681
+ /**
682
+ *
683
+ * @type {string}
684
+ * @memberof BlogApiDeleteBlog
685
+ */
686
+ readonly project: string
687
+
688
+ /**
689
+ *
690
+ * @type {string}
691
+ * @memberof BlogApiDeleteBlog
692
+ */
693
+ readonly blogId: string
694
+ }
695
+
696
+ /**
697
+ * Request parameters for getBlog operation in BlogApi.
698
+ * @export
699
+ * @interface BlogApiGetBlogRequest
700
+ */
701
+ export interface BlogApiGetBlogRequest {
702
+ /**
703
+ *
704
+ * @type {string}
705
+ * @memberof BlogApiGetBlog
706
+ */
707
+ readonly project: string
708
+
709
+ /**
710
+ *
711
+ * @type {string}
712
+ * @memberof BlogApiGetBlog
713
+ */
714
+ readonly blogId: string
715
+ }
716
+
717
+ /**
718
+ * Request parameters for listBlogs operation in BlogApi.
719
+ * @export
720
+ * @interface BlogApiListBlogsRequest
721
+ */
722
+ export interface BlogApiListBlogsRequest {
723
+ /**
724
+ *
725
+ * @type {string}
726
+ * @memberof BlogApiListBlogs
727
+ */
728
+ readonly project: string
729
+ }
730
+
731
+ /**
732
+ * Request parameters for updateBlog operation in BlogApi.
733
+ * @export
734
+ * @interface BlogApiUpdateBlogRequest
735
+ */
736
+ export interface BlogApiUpdateBlogRequest {
737
+ /**
738
+ *
739
+ * @type {string}
740
+ * @memberof BlogApiUpdateBlog
741
+ */
742
+ readonly project: string
743
+
744
+ /**
745
+ *
746
+ * @type {string}
747
+ * @memberof BlogApiUpdateBlog
748
+ */
749
+ readonly blogId: string
750
+
751
+ /**
752
+ *
753
+ * @type {UpdateBlogRequest}
754
+ * @memberof BlogApiUpdateBlog
755
+ */
756
+ readonly updateBlogRequest: UpdateBlogRequest
757
+ }
758
+
759
+ /**
760
+ * BlogApi - object-oriented interface
761
+ * @export
762
+ * @class BlogApi
763
+ * @extends {BaseAPI}
764
+ */
765
+ export class BlogApi extends BaseAPI {
766
+ /**
767
+ *
768
+ * @summary Create a blog
769
+ * @param {BlogApiCreateBlogRequest} requestParameters Request parameters.
770
+ * @param {*} [options] Override http request option.
771
+ * @throws {RequiredError}
772
+ * @memberof BlogApi
773
+ */
774
+ public createBlog(requestParameters: BlogApiCreateBlogRequest, options?: RawAxiosRequestConfig) {
775
+ return BlogApiFp(this.configuration).createBlog(requestParameters.project, requestParameters.createBlogRequest, options).then((request) => request(this.axios, this.basePath));
776
+ }
777
+
778
+ /**
779
+ *
780
+ * @summary Delete a blog
781
+ * @param {BlogApiDeleteBlogRequest} requestParameters Request parameters.
782
+ * @param {*} [options] Override http request option.
783
+ * @throws {RequiredError}
784
+ * @memberof BlogApi
785
+ */
786
+ public deleteBlog(requestParameters: BlogApiDeleteBlogRequest, options?: RawAxiosRequestConfig) {
787
+ return BlogApiFp(this.configuration).deleteBlog(requestParameters.project, requestParameters.blogId, options).then((request) => request(this.axios, this.basePath));
788
+ }
789
+
790
+ /**
791
+ *
792
+ * @summary Get a blog
793
+ * @param {BlogApiGetBlogRequest} requestParameters Request parameters.
794
+ * @param {*} [options] Override http request option.
795
+ * @throws {RequiredError}
796
+ * @memberof BlogApi
797
+ */
798
+ public getBlog(requestParameters: BlogApiGetBlogRequest, options?: RawAxiosRequestConfig) {
799
+ return BlogApiFp(this.configuration).getBlog(requestParameters.project, requestParameters.blogId, options).then((request) => request(this.axios, this.basePath));
800
+ }
801
+
802
+ /**
803
+ *
804
+ * @summary List blogs
805
+ * @param {BlogApiListBlogsRequest} requestParameters Request parameters.
806
+ * @param {*} [options] Override http request option.
807
+ * @throws {RequiredError}
808
+ * @memberof BlogApi
809
+ */
810
+ public listBlogs(requestParameters: BlogApiListBlogsRequest, options?: RawAxiosRequestConfig) {
811
+ return BlogApiFp(this.configuration).listBlogs(requestParameters.project, options).then((request) => request(this.axios, this.basePath));
812
+ }
813
+
814
+ /**
815
+ *
816
+ * @summary Update a blog
817
+ * @param {BlogApiUpdateBlogRequest} requestParameters Request parameters.
818
+ * @param {*} [options] Override http request option.
819
+ * @throws {RequiredError}
820
+ * @memberof BlogApi
821
+ */
822
+ public updateBlog(requestParameters: BlogApiUpdateBlogRequest, options?: RawAxiosRequestConfig) {
823
+ return BlogApiFp(this.configuration).updateBlog(requestParameters.project, requestParameters.blogId, requestParameters.updateBlogRequest, options).then((request) => request(this.axios, this.basePath));
824
+ }
825
+ }
826
+
827
+
828
+