@redonvn/redai-openapi-wp-content-post 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.
@@ -0,0 +1,618 @@
1
+ {
2
+ "pluginId": "redai-openapi-wp-content-post",
3
+ "pluginName": "RedAI User API Export - WP Content Post",
4
+ "version": "0.1.0",
5
+ "description": "OpenAPI export cho nhóm API user đã chọn: WP Content Post.",
6
+ "serverUrl": "https://v2.redai.vn/api",
7
+ "optional": true,
8
+ "tools": [
9
+ {
10
+ "name": "redai_openapi_wp_content_post_wpcontentpostusercontroller_bulkdelete_v1",
11
+ "description": "Xóa nhiều bài viết. Xóa nhiều bài viết cùng lúc (soft delete hoặc hard delete)",
12
+ "method": "DELETE",
13
+ "path": "/v1/user/posts",
14
+ "operationId": "wpcontentpostusercontroller_bulkdelete_v1",
15
+ "parameters": {
16
+ "type": "object",
17
+ "properties": {
18
+ "headers": {
19
+ "type": "object",
20
+ "properties": {
21
+ "x-workspace-id": {
22
+ "type": "string",
23
+ "description": "Workspace ID của tenant hiện tại (UUID)"
24
+ },
25
+ "x-base-id": {
26
+ "type": "string",
27
+ "description": "Base ID của tenant hiện tại (UUID, optional)"
28
+ }
29
+ },
30
+ "required": [
31
+ "x-workspace-id"
32
+ ],
33
+ "additionalProperties": false
34
+ },
35
+ "body": {
36
+ "type": "object",
37
+ "properties": {
38
+ "ids": {
39
+ "type": "array",
40
+ "description": "Array of post IDs to delete",
41
+ "items": {
42
+ "type": "string"
43
+ }
44
+ },
45
+ "permanent": {
46
+ "type": "boolean",
47
+ "description": "Permanent delete (hard delete) or soft delete (status=trash)",
48
+ "default": false
49
+ }
50
+ },
51
+ "required": [
52
+ "ids"
53
+ ]
54
+ }
55
+ },
56
+ "required": [
57
+ "headers",
58
+ "body"
59
+ ],
60
+ "additionalProperties": false,
61
+ "description": "Xóa nhiều bài viết tool arguments"
62
+ },
63
+ "tags": [
64
+ "User - WP Content Post"
65
+ ]
66
+ },
67
+ {
68
+ "name": "redai_openapi_wp_content_post_wpcontentpostusercontroller_create_v1",
69
+ "description": "Tạo bài viết mới. User hoặc Employee tạo bài viết mới (draft hoặc publish)",
70
+ "method": "POST",
71
+ "path": "/v1/user/posts",
72
+ "operationId": "wpcontentpostusercontroller_create_v1",
73
+ "parameters": {
74
+ "type": "object",
75
+ "properties": {
76
+ "headers": {
77
+ "type": "object",
78
+ "properties": {
79
+ "x-workspace-id": {
80
+ "type": "string",
81
+ "description": "Workspace ID của tenant hiện tại (UUID)"
82
+ },
83
+ "x-base-id": {
84
+ "type": "string",
85
+ "description": "Base ID của tenant hiện tại (UUID, optional)"
86
+ }
87
+ },
88
+ "required": [
89
+ "x-workspace-id"
90
+ ],
91
+ "additionalProperties": false
92
+ },
93
+ "body": {
94
+ "type": "object",
95
+ "properties": {
96
+ "title": {
97
+ "type": "string",
98
+ "description": "Tiêu đề bài viết"
99
+ },
100
+ "slug": {
101
+ "type": "string",
102
+ "description": "Slug (friendly URL) - auto-generate nếu không nhập"
103
+ },
104
+ "excerpt": {
105
+ "type": "string",
106
+ "description": "Mô tả ngắn"
107
+ },
108
+ "content": {
109
+ "description": "Nội dung bài viết (Gutenberg blocks)",
110
+ "allOf": [
111
+ {
112
+ "type": "object",
113
+ "properties": {
114
+ "blocks": {
115
+ "type": "array",
116
+ "description": "Array of Gutenberg blocks",
117
+ "items": {
118
+ "type": "array",
119
+ "items": {
120
+ "type": "a"
121
+ }
122
+ }
123
+ },
124
+ "meta": {
125
+ "type": "object",
126
+ "description": "Additional metadata"
127
+ },
128
+ "settings": {
129
+ "type": "object",
130
+ "description": "Content settings"
131
+ }
132
+ },
133
+ "required": [
134
+ "blocks"
135
+ ]
136
+ }
137
+ ]
138
+ },
139
+ "featuredImageId": {
140
+ "type": "string",
141
+ "description": "ID ảnh đại diện (UUID)"
142
+ },
143
+ "status": {
144
+ "type": "string",
145
+ "description": "Trạng thái bài viết",
146
+ "default": "draft",
147
+ "enum": [
148
+ "draft",
149
+ "pending",
150
+ "private",
151
+ "publish",
152
+ "future",
153
+ "trash",
154
+ "archived"
155
+ ]
156
+ },
157
+ "type": {
158
+ "type": "string",
159
+ "description": "Loại bài viết",
160
+ "default": "post"
161
+ },
162
+ "metaTitle": {
163
+ "type": "string",
164
+ "description": "SEO: Meta title (max 70 chars)"
165
+ },
166
+ "metaDescription": {
167
+ "type": "string",
168
+ "description": "SEO: Meta description (max 160 chars)"
169
+ },
170
+ "metaKeywords": {
171
+ "type": "array",
172
+ "description": "SEO: Meta keywords",
173
+ "items": {
174
+ "type": "string"
175
+ }
176
+ },
177
+ "commentStatus": {
178
+ "type": "string",
179
+ "description": "Trạng thái comment",
180
+ "default": "open"
181
+ },
182
+ "sticky": {
183
+ "type": "boolean",
184
+ "description": "Đánh dấu sticky post",
185
+ "default": false
186
+ },
187
+ "password": {
188
+ "type": "string",
189
+ "description": "Mật khẩu bảo vệ bài viết (plaintext)"
190
+ },
191
+ "menuOrder": {
192
+ "type": "number",
193
+ "description": "Thứ tự hiển thị",
194
+ "default": 0
195
+ }
196
+ },
197
+ "required": [
198
+ "title",
199
+ "content"
200
+ ]
201
+ }
202
+ },
203
+ "required": [
204
+ "headers",
205
+ "body"
206
+ ],
207
+ "additionalProperties": false,
208
+ "description": "Tạo bài viết mới tool arguments"
209
+ },
210
+ "tags": [
211
+ "User - WP Content Post"
212
+ ]
213
+ },
214
+ {
215
+ "name": "redai_openapi_wp_content_post_wpcontentpostusercontroller_findall_v1",
216
+ "description": "Lấy danh sách bài viết. Lấy danh sách bài viết của user/employee với filters và pagination",
217
+ "method": "GET",
218
+ "path": "/v1/user/posts",
219
+ "operationId": "wpcontentpostusercontroller_findall_v1",
220
+ "parameters": {
221
+ "type": "object",
222
+ "properties": {
223
+ "query": {
224
+ "type": "object",
225
+ "properties": {
226
+ "status": {
227
+ "type": "string",
228
+ "enum": [
229
+ "draft",
230
+ "pending",
231
+ "private",
232
+ "publish",
233
+ "future",
234
+ "trash",
235
+ "archived"
236
+ ],
237
+ "description": "Filter by status"
238
+ },
239
+ "type": {
240
+ "type": "string",
241
+ "description": "Filter by type"
242
+ },
243
+ "search": {
244
+ "type": "string",
245
+ "description": "Search in title, excerpt, content"
246
+ },
247
+ "sticky": {
248
+ "type": "boolean",
249
+ "default": false,
250
+ "description": "Filter sticky posts only"
251
+ },
252
+ "sortBy": {
253
+ "type": "string",
254
+ "default": "createdAt",
255
+ "description": "Sort field"
256
+ },
257
+ "sortOrder": {
258
+ "type": "string",
259
+ "default": "DESC",
260
+ "enum": [
261
+ "ASC",
262
+ "DESC"
263
+ ],
264
+ "description": "Sort order"
265
+ },
266
+ "page": {
267
+ "type": "number",
268
+ "default": 1,
269
+ "description": "Page number"
270
+ },
271
+ "limit": {
272
+ "type": "number",
273
+ "default": 10,
274
+ "description": "Items per page"
275
+ }
276
+ },
277
+ "additionalProperties": false
278
+ },
279
+ "headers": {
280
+ "type": "object",
281
+ "properties": {
282
+ "x-workspace-id": {
283
+ "type": "string",
284
+ "description": "Workspace ID của tenant hiện tại (UUID)"
285
+ },
286
+ "x-base-id": {
287
+ "type": "string",
288
+ "description": "Base ID của tenant hiện tại (UUID, optional)"
289
+ }
290
+ },
291
+ "required": [
292
+ "x-workspace-id"
293
+ ],
294
+ "additionalProperties": false
295
+ }
296
+ },
297
+ "required": [
298
+ "headers"
299
+ ],
300
+ "additionalProperties": false,
301
+ "description": "Lấy danh sách bài viết tool arguments"
302
+ },
303
+ "tags": [
304
+ "User - WP Content Post"
305
+ ]
306
+ },
307
+ {
308
+ "name": "redai_openapi_wp_content_post_wpcontentpostusercontroller_findone_v1",
309
+ "description": "Lấy chi tiết bài viết. Lấy thông tin chi tiết của một bài viết (chỉ bài viết của chính user/employee)",
310
+ "method": "GET",
311
+ "path": "/v1/user/posts/{id}",
312
+ "operationId": "wpcontentpostusercontroller_findone_v1",
313
+ "parameters": {
314
+ "type": "object",
315
+ "properties": {
316
+ "path": {
317
+ "type": "object",
318
+ "properties": {
319
+ "id": {
320
+ "type": "string",
321
+ "description": "Post ID (UUID)"
322
+ }
323
+ },
324
+ "required": [
325
+ "id"
326
+ ],
327
+ "additionalProperties": false
328
+ },
329
+ "headers": {
330
+ "type": "object",
331
+ "properties": {
332
+ "x-workspace-id": {
333
+ "type": "string",
334
+ "description": "Workspace ID của tenant hiện tại (UUID)"
335
+ },
336
+ "x-base-id": {
337
+ "type": "string",
338
+ "description": "Base ID của tenant hiện tại (UUID, optional)"
339
+ }
340
+ },
341
+ "required": [
342
+ "x-workspace-id"
343
+ ],
344
+ "additionalProperties": false
345
+ }
346
+ },
347
+ "required": [
348
+ "path",
349
+ "headers"
350
+ ],
351
+ "additionalProperties": false,
352
+ "description": "Lấy chi tiết bài viết tool arguments"
353
+ },
354
+ "tags": [
355
+ "User - WP Content Post"
356
+ ]
357
+ },
358
+ {
359
+ "name": "redai_openapi_wp_content_post_wpcontentpostusercontroller_submitforreview_v1",
360
+ "description": "Gửi bài viết đi duyệt. Chuyển trạng thái bài viết sang pending để chờ admin duyệt",
361
+ "method": "POST",
362
+ "path": "/v1/user/posts/{id}/submit-for-review",
363
+ "operationId": "wpcontentpostusercontroller_submitforreview_v1",
364
+ "parameters": {
365
+ "type": "object",
366
+ "properties": {
367
+ "path": {
368
+ "type": "object",
369
+ "properties": {
370
+ "id": {
371
+ "type": "string",
372
+ "description": "Post ID (UUID)"
373
+ }
374
+ },
375
+ "required": [
376
+ "id"
377
+ ],
378
+ "additionalProperties": false
379
+ },
380
+ "headers": {
381
+ "type": "object",
382
+ "properties": {
383
+ "x-workspace-id": {
384
+ "type": "string",
385
+ "description": "Workspace ID của tenant hiện tại (UUID)"
386
+ },
387
+ "x-base-id": {
388
+ "type": "string",
389
+ "description": "Base ID của tenant hiện tại (UUID, optional)"
390
+ }
391
+ },
392
+ "required": [
393
+ "x-workspace-id"
394
+ ],
395
+ "additionalProperties": false
396
+ }
397
+ },
398
+ "required": [
399
+ "path",
400
+ "headers"
401
+ ],
402
+ "additionalProperties": false,
403
+ "description": "Gửi bài viết đi duyệt tool arguments"
404
+ },
405
+ "tags": [
406
+ "User - WP Content Post"
407
+ ]
408
+ },
409
+ {
410
+ "name": "redai_openapi_wp_content_post_wpcontentpostusercontroller_togglesticky_v1",
411
+ "description": "Toggle sticky status. Đảo trạng thái sticky của bài viết (true → false hoặc false → true)",
412
+ "method": "PATCH",
413
+ "path": "/v1/user/posts/{id}/toggle-sticky",
414
+ "operationId": "wpcontentpostusercontroller_togglesticky_v1",
415
+ "parameters": {
416
+ "type": "object",
417
+ "properties": {
418
+ "path": {
419
+ "type": "object",
420
+ "properties": {
421
+ "id": {
422
+ "type": "string",
423
+ "description": "Post ID (UUID)"
424
+ }
425
+ },
426
+ "required": [
427
+ "id"
428
+ ],
429
+ "additionalProperties": false
430
+ },
431
+ "headers": {
432
+ "type": "object",
433
+ "properties": {
434
+ "x-workspace-id": {
435
+ "type": "string",
436
+ "description": "Workspace ID của tenant hiện tại (UUID)"
437
+ },
438
+ "x-base-id": {
439
+ "type": "string",
440
+ "description": "Base ID của tenant hiện tại (UUID, optional)"
441
+ }
442
+ },
443
+ "required": [
444
+ "x-workspace-id"
445
+ ],
446
+ "additionalProperties": false
447
+ }
448
+ },
449
+ "required": [
450
+ "path",
451
+ "headers"
452
+ ],
453
+ "additionalProperties": false,
454
+ "description": "Toggle sticky status tool arguments"
455
+ },
456
+ "tags": [
457
+ "User - WP Content Post"
458
+ ]
459
+ },
460
+ {
461
+ "name": "redai_openapi_wp_content_post_wpcontentpostusercontroller_update_v1",
462
+ "description": "Cập nhật bài viết. Cập nhật thông tin bài viết (chỉ bài viết của chính user/employee)",
463
+ "method": "PUT",
464
+ "path": "/v1/user/posts/{id}",
465
+ "operationId": "wpcontentpostusercontroller_update_v1",
466
+ "parameters": {
467
+ "type": "object",
468
+ "properties": {
469
+ "path": {
470
+ "type": "object",
471
+ "properties": {
472
+ "id": {
473
+ "type": "string",
474
+ "description": "Post ID (UUID)"
475
+ }
476
+ },
477
+ "required": [
478
+ "id"
479
+ ],
480
+ "additionalProperties": false
481
+ },
482
+ "headers": {
483
+ "type": "object",
484
+ "properties": {
485
+ "x-workspace-id": {
486
+ "type": "string",
487
+ "description": "Workspace ID của tenant hiện tại (UUID)"
488
+ },
489
+ "x-base-id": {
490
+ "type": "string",
491
+ "description": "Base ID của tenant hiện tại (UUID, optional)"
492
+ }
493
+ },
494
+ "required": [
495
+ "x-workspace-id"
496
+ ],
497
+ "additionalProperties": false
498
+ },
499
+ "body": {
500
+ "type": "object",
501
+ "properties": {
502
+ "title": {
503
+ "type": "string",
504
+ "description": "Tiêu đề bài viết"
505
+ },
506
+ "slug": {
507
+ "type": "string",
508
+ "description": "Slug (friendly URL) - auto-generate nếu không nhập"
509
+ },
510
+ "excerpt": {
511
+ "type": "string",
512
+ "description": "Mô tả ngắn"
513
+ },
514
+ "content": {
515
+ "description": "Nội dung bài viết (Gutenberg blocks)",
516
+ "allOf": [
517
+ {
518
+ "type": "object",
519
+ "properties": {
520
+ "blocks": {
521
+ "type": "array",
522
+ "description": "Array of Gutenberg blocks",
523
+ "items": {
524
+ "type": "array",
525
+ "items": {
526
+ "type": "a"
527
+ }
528
+ }
529
+ },
530
+ "meta": {
531
+ "type": "object",
532
+ "description": "Additional metadata"
533
+ },
534
+ "settings": {
535
+ "type": "object",
536
+ "description": "Content settings"
537
+ }
538
+ },
539
+ "required": [
540
+ "blocks"
541
+ ]
542
+ }
543
+ ]
544
+ },
545
+ "featuredImageId": {
546
+ "type": "string",
547
+ "description": "ID ảnh đại diện (UUID)"
548
+ },
549
+ "status": {
550
+ "type": "string",
551
+ "description": "Trạng thái bài viết",
552
+ "default": "draft",
553
+ "enum": [
554
+ "draft",
555
+ "pending",
556
+ "private",
557
+ "publish",
558
+ "future",
559
+ "trash",
560
+ "archived"
561
+ ]
562
+ },
563
+ "type": {
564
+ "type": "string",
565
+ "description": "Loại bài viết",
566
+ "default": "post"
567
+ },
568
+ "metaTitle": {
569
+ "type": "string",
570
+ "description": "SEO: Meta title (max 70 chars)"
571
+ },
572
+ "metaDescription": {
573
+ "type": "string",
574
+ "description": "SEO: Meta description (max 160 chars)"
575
+ },
576
+ "metaKeywords": {
577
+ "type": "array",
578
+ "description": "SEO: Meta keywords",
579
+ "items": {
580
+ "type": "string"
581
+ }
582
+ },
583
+ "commentStatus": {
584
+ "type": "string",
585
+ "description": "Trạng thái comment",
586
+ "default": "open"
587
+ },
588
+ "sticky": {
589
+ "type": "boolean",
590
+ "description": "Đánh dấu sticky post",
591
+ "default": false
592
+ },
593
+ "password": {
594
+ "type": "string",
595
+ "description": "Mật khẩu bảo vệ bài viết (plaintext)"
596
+ },
597
+ "menuOrder": {
598
+ "type": "number",
599
+ "description": "Thứ tự hiển thị",
600
+ "default": 0
601
+ }
602
+ }
603
+ }
604
+ },
605
+ "required": [
606
+ "path",
607
+ "headers",
608
+ "body"
609
+ ],
610
+ "additionalProperties": false,
611
+ "description": "Cập nhật bài viết tool arguments"
612
+ },
613
+ "tags": [
614
+ "User - WP Content Post"
615
+ ]
616
+ }
617
+ ]
618
+ }