generated from mintlify/starter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathheroapi.yml
835 lines (835 loc) · 25.3 KB
/
heroapi.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
openapi: "3.0.0"
info:
version: "1.0.0"
title: "Hero API"
servers:
- url: "https://hero.page"
paths:
/api/v1/createSpace:
post:
summary: "Create a new Space"
operationId: "createSpace"
tags:
- "Space"
security:
- bearerAuth: []
requestBody:
required: true
content:
application/json:
schema:
type: "object"
properties:
name:
type: "string"
description: "The name of the space"
example: "My wonderful space"
isPublic:
type: "boolean"
description: "Whether the space is public"
example: true
img:
type: "string"
description: "Image URL for the space"
example: "https://firebasestorage.googleapis.com/v0/b/focushero-1650416072840.appspot.com/o/FCMImages%2Fdefault_spacey.webp?alt=media&token=e37eecbd-6b99-430c-b073-b57622ef8440"
responses:
'201':
description: "Space created successfully"
content:
application/json:
schema:
type: "object"
properties:
id:
type: "string"
description: "The ID of the created space"
shareable_link:
type: "string"
description: "Shareable link if the space is public"
online_editor:
type: "string"
description: "Link to the online editor for the space"
space:
type: "object"
properties:
id:
type: "string"
createdAt:
type: "string"
format: "date-time"
img:
type: "string"
name:
type: "string"
slug:
type: "string"
isOwner:
type: "boolean"
'400':
description: "Bad Request"
'500':
description: "Internal Server Error"
/api/v1/getSpace/{spaceId}:
get:
summary: "Retrieve details of a specific Space"
operationId: "getSpace"
tags:
- "Space"
security:
- bearerAuth: []
parameters:
- name: "spaceId"
in: "path"
required: true
schema:
type: "string"
description: "The ID of the space"
responses:
'200':
description: "Space retrieved successfully"
content:
application/json:
schema:
type: "object"
properties:
id:
type: "string"
description: "The ID of the retrieved space"
createdAt:
type: "string"
format: "date-time"
img:
type: "string"
description: "Image URL for the space"
name:
type: "string"
description: "The name of the space"
slug:
type: "string"
description: "The slug of the space"
isOwner:
type: "boolean"
description: "Whether the user is the owner of the space"
'404':
description: "Not Found"
'500':
description: "Internal Server Error"
/api/v1/updateSpace/{spaceId}:
post:
summary: "Update details of a specific Space"
operationId: "updateSpace"
tags:
- "Space"
security:
- bearerAuth: []
parameters:
- name: "spaceId"
in: "path"
required: true
schema:
type: "string"
description: "The ID of the space"
requestBody:
required: true
content:
application/json:
schema:
type: "object"
properties:
name:
type: "string"
description: "The name of the space"
example: "Updated Space Name"
isPublic:
type: "boolean"
description: "Whether the space is public"
example: true
img:
type: "string"
description: "Image URL for the space"
example: "https://firebasestorage.googleapis.com/v0/b/focushero-1650416072840.appspot.com/o/FCMImages%2Fdefault_spacey.webp?alt=media&token=e37eecbd-6b99-430c-b073-b57622ef8440"
responses:
'200':
description: "Space updated successfully"
content:
text/plain:
schema:
type: "string"
example: "OK"
'400':
description: "Bad Request"
'404':
description: "Not Found"
'500':
description: "Internal Server Error"
/api/v1/listSpaces:
get:
summary: "List all Spaces for a user"
operationId: "listSpaces"
tags:
- "Space"
security:
- bearerAuth: []
responses:
'200':
description: "Spaces retrieved successfully"
content:
application/json:
schema:
type: "array"
items:
type: "object"
properties:
id:
type: "string"
description: "The ID of the space"
dateJoined:
type: "string"
format: "date-time"
description: "The date when the space was joined"
'500':
description: "Internal Server Error"
/api/v1/deleteSpace/{spaceId}:
post:
summary: "Delete a specific Space"
operationId: "deleteSpace"
tags:
- "Space"
security:
- bearerAuth: []
parameters:
- name: "spaceId"
in: "path"
required: true
schema:
type: "string"
description: "The ID of the space"
responses:
'204':
description: "Space deleted successfully"
'404':
description: "Space not found"
/api/v1/createList:
post:
summary: "Create a new List in a specified Space"
operationId: "createList"
tags:
- "List"
security:
- bearerAuth: []
requestBody:
required: true
content:
application/json:
schema:
type: "object"
properties:
spaceId:
type: "string"
description: "The ID of the space"
name:
type: "string"
description: "The name of the list"
color:
type: "string"
description: "The color code for the list"
required:
- spaceId
- name
- color
responses:
'201':
description: "List created successfully"
content:
application/json:
schema:
type: "object"
properties:
id:
type: "string"
page:
type: "object"
properties:
name:
type: "string"
color:
type: "string"
spaceID:
type: "string"
sortIndex:
type: "integer"
createdAt:
type: "string"
format: "date-time"
workflow_type:
type: "string"
'400':
description: "Bad Request"
/api/v1/getList/{spaceId}/{listId}:
get:
summary: "Retrieve details of a specific List"
operationId: "getList"
tags:
- "List"
security:
- bearerAuth: []
parameters:
- name: "spaceId"
in: "path"
required: true
description: "The ID of the space"
schema:
type: "string"
- name: "listId"
in: "path"
required: true
description: "The ID of the list"
schema:
type: "string"
responses:
'200':
description: "OK"
content:
application/json:
schema:
type: "object"
properties:
id:
type: "string"
name:
type: "string"
color:
type: "string"
spaceID:
type: "string"
sortIndex:
type: "integer"
createdAt:
type: "string"
format: "date-time"
workflow_type:
type: "string"
'404':
description: "List not found"
'400':
description: "Bad Request"
/api/v1/updateList/{spaceId}/{listId}:
post:
summary: "Update details of a specific List"
operationId: "updateList"
tags:
- "List"
security:
- bearerAuth: []
parameters:
- name: "spaceId"
in: "path"
required: true
description: "The ID of the space"
schema:
type: "string"
- name: "listId"
in: "path"
required: true
description: "The ID of the list"
schema:
type: "string"
requestBody:
required: true
content:
application/json:
schema:
type: "object"
properties:
name:
type: "string"
description: "The name of the list"
color:
type: "string"
description: "The color code for the list"
responses:
'200':
description: "OK"
'400':
description: "Bad Request"
/api/v1/deleteList/{spaceId}/{listId}:
post:
summary: "Delete a specific List"
operationId: "deleteList"
tags:
- "List"
security:
- bearerAuth: []
parameters:
- name: "spaceId"
in: "path"
required: true
description: "The ID of the space"
schema:
type: "string"
- name: "listId"
in: "path"
required: true
description: "The ID of the list"
schema:
type: "string"
responses:
'204':
description: "No Content"
'404':
description: "List not found"
/api/v1/listLists/{spaceId}:
get:
summary: List all Lists within a specific Space
operationId: "listLists"
tags:
- "List"
security:
- bearerAuth: []
parameters:
- name: spaceId
in: path
description: The ID of the space
required: true
schema:
type: string
responses:
200:
description: OK
content:
application/json:
schema:
type: array
items:
type: object
properties:
id:
type: string
name:
type: string
color:
type: string
spaceID:
type: string
sortIndex:
type: number
createdAt:
type: string
format: date-time
workflow_type:
type: string
400:
description: Bad Request
/api/v1/createItem/{spaceId}:
post:
operationId: "createItem"
tags:
- "Item"
summary: "Creates a new item in a specified List, within a Space."
parameters:
- name: spaceId
in: path
description: The ID of the space where the item will be created. Must be a non-empty string.
required: true
schema:
type: string
requestBody:
content:
application/json:
schema:
type: object
properties:
listId:
type: string
description: The ID of the list within the space where the item will be created. Must be a non-empty string.
title:
type: string
description: The title of the item. Must be a non-empty string.
note:
type: string
description: The note content of the item. Optional.
image:
type: string
description: The URL of the image associated with the item. Optional.
link:
type: string
description: The URL of the link associated with the item. Optional.
generated_by:
type: object
properties:
model:
type: string
job_id:
type: string
appDescription:
type: string
appSubtitle:
type: string
appID:
type: string
appName:
type: string
appIcon:
type: string
appTags:
type: array
items:
type: string
isAIPrompt:
type: boolean
default: false
responses:
200:
description: OK
content:
application/json:
schema:
type: object
properties:
id:
type: string
title:
type: string
note:
type: string
img:
type: string
url:
type: string
pageID:
type: string
spaceID:
type: string
sortIndex:
type: integer
send_approval_email:
type: boolean
readMorePageSlug:
type: string
is_archived:
type: boolean
completed:
type: boolean
actionType:
type: string
fileURL:
type: string
fileName:
type: string
createdAt:
type: string
format: date-time
is_image_full_width:
type: boolean
submitted_by:
type: object
urlMetadata:
type: object
image_generated_on_hero:
type: boolean
isAIPrompt:
type: boolean
owner_uid:
type: string
ticketType:
type: string
generated_by:
type: object
400:
description: Bad Request
security:
- bearerAuth: []
/api/v1/updateItem/{spaceId}/{itemId}:
post:
operationId: "updateItem"
tags:
- "Item"
summary: Updates details of a specific Item in a specific Space.
parameters:
- name: spaceId
in: path
description: The ID of the space where the item is located. Must be a non-empty string.
required: true
schema:
type: string
example: "EeQKVCfV0tsoQwmeE0nA"
- name: itemId
in: path
description: The ID of the item to update. Must be a non-empty string.
required: true
schema:
type: string
example: "hRzp9xTTl5pnj2G2Nr3E"
requestBody:
content:
application/json:
schema:
type: object
properties:
title:
type: string
description: The new title of the item. Optional.
example: "Update item title 2"
note:
type: string
description: The new note content of the item. Optional.
example: "This is my `wonderful` note"
image:
type: string
description: The new URL of the image associated with the item. Optional.
example: "https://media.discordapp.net/attachments/1069316234291712020/1105446908962558022/samoshasfallen_Design_a_bustling_fantasy_marketplace_filled_wit_6b011c6f-6d0c-4e52-b65b-c76f313ef5f4.png"
link:
type: string
description: The new URL of the link associated with the item. Optional.
responses:
200:
description: Updated
400:
description: Bad Request
security:
- bearerAuth: []
/api/v1/getItem/{spaceId}/{itemId}:
get:
summary: Retrieve details of a specific Item.
operationId: "getItem"
tags:
- "Item"
parameters:
- name: spaceId
in: path
description: The ID of the space where the item is located. Must be a non-empty string.
required: true
schema:
type: string
example: "F5VHE7m4xJJpXcZXcqut"
- name: itemId
in: path
description: The ID of the item to retrieve. Must be a non-empty string.
required: true
schema:
type: string
example: "xVkvt0FpsagnnhvmpdAi"
security:
- bearerAuth: []
responses:
200:
description: OK
content:
application/json:
schema:
type: object
properties:
id:
type: string
title:
type: string
note:
type: string
img:
type: string
url:
type: string
pageID:
type: string
spaceID:
type: string
sortIndex:
type: integer
send_approval_email:
type: boolean
readMorePageSlug:
type: string
is_archived:
type: boolean
completed:
type: boolean
actionType:
type: string
fileURL:
type: string
fileName:
type: string
createdAt:
type: string
format: date-time
is_image_full_width:
type: boolean
submitted_by:
type: object
urlMetadata:
type: object
image_generated_on_hero:
type: boolean
isAIPrompt:
type: boolean
owner_uid:
type: string
ticketType:
type: string
generated_by:
type: object
400:
description: Bad Request
404:
description: Not Found
/api/v1/listItems/{spaceId}/{listId}:
get:
summary: List all Items within a specific List.
operationId: "listItems"
tags:
- "Item"
parameters:
- name: spaceId
in: path
description: The ID of the space where the items are located. Must be a non-empty string.
required: true
schema:
type: string
example: "EeQKVCfV0tsoQwmeE0nA"
- name: listId
in: path
description: The ID of the list within the space where the items are located. Must be a non-empty string.
required: true
schema:
type: string
example: "pHr8bQnV2FIgGdO2LVrt"
security:
- bearerAuth: []
responses:
200:
description: OK
content:
application/json:
schema:
type: array
items:
type: object
properties:
id:
type: string
title:
type: string
note:
type: string
img:
type: string
url:
type: string
pageID:
type: string
spaceID:
type: string
sortIndex:
type: integer
send_approval_email:
type: boolean
readMorePageSlug:
type: string
is_archived:
type: boolean
completed:
type: boolean
actionType:
type: string
fileURL:
type: string
fileName:
type: string
createdAt:
type: string
format: date-time
is_image_full_width:
type: boolean
submitted_by:
type: object
urlMetadata:
type: object
image_generated_on_hero:
type: boolean
isAIPrompt:
type: boolean
owner_uid:
type: string
ticketType:
type: string
generated_by:
type: object
400:
description: Bad Request
/api/v1/deleteItem/{spaceId}/{itemId}:
post:
summary: Delete a specific Item within a specific Space.
operationId: "deleteItem"
tags:
- "Item"
parameters:
- name: spaceId
in: path
description: The ID of the space where the item is located. Must be a non-empty string.
required: true
schema:
type: string
example: "EeQKVCfV0tsoQwmeE0nA"
- name: itemId
in: path
description: The ID of the item to delete. Must be a non-empty string.
required: true
schema:
type: string
example: "0p15DJTXOl5kQPhTUiv3"
security:
- bearerAuth: []
responses:
204:
description: No Content
400:
description: Bad Request
404:
description: Not Found
/api/v1/uploadImage:
post:
summary: "Uploads an image encoded in base64 to the specified storage bucket."
operationId: "uploadImage"
tags:
- "Image"
security:
- bearerAuth: []
requestBody:
required: true
content:
application/json:
schema:
type: "object"
properties:
base64:
type: "string"
description: "The base64-encoded image"
format: "byte"
example: "data:image/png;base64,iVBORw0KG..."
name:
type: "string"
description: "Optional name prefix for the uploaded image, limited to 100 characters"
maxLength: 100
example: "ProfileImage"
responses:
'201':
description: "Image uploaded successfully"
content:
application/json:
schema:
type: "object"
properties:
url:
type: "string"
description: "The signed URL of the uploaded image"
example: "https://url-for-image-example.com/api_images_YourFileName_1628009230000.png"
'400':
description: "Bad Request. Reasons might include no base64 string provided, name length exceeding 100 characters, or base64 size exceeding 10MB."
'500':
description: "Internal Server Error"
components:
securitySchemes:
bearerAuth:
type: "http"
scheme: "bearer"
bearerFormat: "JWT"