Repository navigation
Expand file tree
/
Copy pathopenapi.yaml
More file actions
1912 lines (1833 loc) · 51.4 KB
/
Copy pathopenapi.yaml
File metadata and controls
1912 lines (1833 loc) · 51.4 KB
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
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
openapi: 3.1.0
info:
title: 프래그먼트 API
version: 0.1.0
description: 단일 조직 근무 스케줄 관리 도구 MVP API
servers:
- url: http://localhost:3001/api
description: Local development
tags:
- name: Auth
description: 회원가입, 로그인, 토큰 갱신, 현재 사용자 조회
- name: Organization
description: 단일 조직 생성, 조회, 수정
- name: Workers
description: 인력 관리
- name: Availability
description: 인력별 가능 시간 관리
- name: StaffingRules
description: 최소 인원 조건 관리
- name: Schedules
description: 스케줄 추천, DRAFT 조정, 확정
- name: ScheduleHistory
description: 확정 스케줄 이력과 CSV export
- name: Dashboard
description: 조직 정보와 최근 확정 스케줄 조회
paths:
/auth/signup:
post:
tags:
- Auth
summary: 회원가입
description: 새 계정을 생성하고 로그인 상태로 전환합니다.
operationId: signup
requestBody:
required: true
content:
application/json:
schema:
$ref: "#/components/schemas/AuthSignupRequest"
responses:
"201":
description: 회원가입 성공
content:
application/json:
schema:
$ref: "#/components/schemas/AuthSessionResponse"
"400":
$ref: "#/components/responses/ValidationError"
"409":
$ref: "#/components/responses/DuplicateEmail"
/auth/login:
post:
tags:
- Auth
summary: 로그인
description: 이메일과 비밀번호로 로그인합니다.
operationId: login
requestBody:
required: true
content:
application/json:
schema:
$ref: "#/components/schemas/AuthLoginRequest"
responses:
"200":
description: 로그인 성공
content:
application/json:
schema:
$ref: "#/components/schemas/AuthSessionResponse"
"400":
$ref: "#/components/responses/ValidationError"
"401":
$ref: "#/components/responses/Unauthorized"
/auth/logout:
post:
tags:
- Auth
summary: 로그아웃
description: 현재 refresh token을 폐기합니다.
operationId: logout
security:
- cookieAuth: []
responses:
"204":
description: 로그아웃 성공
"401":
$ref: "#/components/responses/Unauthorized"
/auth/refresh:
post:
tags:
- Auth
summary: 토큰 갱신
description: HTTP-only cookie의 refresh token으로 세션을 갱신합니다.
operationId: refreshSession
security:
- cookieAuth: []
responses:
"200":
description: 토큰 갱신 성공
content:
application/json:
schema:
$ref: "#/components/schemas/AuthSessionResponse"
"401":
$ref: "#/components/responses/Unauthorized"
/auth/me:
get:
tags:
- Auth
summary: 현재 사용자 조회
description: 로그인된 사용자와 조직 요약 정보를 조회합니다.
operationId: getMe
security:
- bearerAuth: []
responses:
"200":
description: 현재 사용자 조회 성공
content:
application/json:
schema:
$ref: "#/components/schemas/AuthMeResponse"
"401":
$ref: "#/components/responses/Unauthorized"
/organization:
post:
tags:
- Organization
summary: 조직 생성
description: MVP에서 계정당 하나의 조직만 생성할 수 있습니다.
operationId: createOrganization
security:
- bearerAuth: []
requestBody:
required: true
content:
application/json:
schema:
$ref: "#/components/schemas/CreateOrganizationRequest"
responses:
"201":
description: 조직 생성 성공
content:
application/json:
schema:
$ref: "#/components/schemas/OrganizationDetail"
"400":
$ref: "#/components/responses/ValidationError"
"401":
$ref: "#/components/responses/Unauthorized"
"409":
$ref: "#/components/responses/OrganizationAlreadyExists"
get:
tags:
- Organization
summary: 조직 조회
operationId: getOrganization
security:
- bearerAuth: []
responses:
"200":
description: 조직 조회 성공
content:
application/json:
schema:
$ref: "#/components/schemas/OrganizationDetail"
"401":
$ref: "#/components/responses/Unauthorized"
"404":
$ref: "#/components/responses/NotFound"
patch:
tags:
- Organization
summary: 조직 수정
operationId: updateOrganization
security:
- bearerAuth: []
requestBody:
required: true
content:
application/json:
schema:
$ref: "#/components/schemas/UpdateOrganizationRequest"
responses:
"200":
description: 조직 수정 성공
content:
application/json:
schema:
$ref: "#/components/schemas/OrganizationDetail"
"400":
$ref: "#/components/responses/ValidationError"
"401":
$ref: "#/components/responses/Unauthorized"
"404":
$ref: "#/components/responses/NotFound"
/organization/active-schedule-planning-period:
get:
tags:
- Organization
summary: 현재 스케줄링 기간 조회
description: 현재 사용자의 조직에 설정된 active schedule planning period를 조회합니다.
operationId: getActiveSchedulePlanningPeriod
security:
- bearerAuth: []
responses:
"200":
description: 현재 스케줄링 기간 조회 성공
content:
application/json:
schema:
$ref: "#/components/schemas/ActiveSchedulePlanningPeriodResponse"
"401":
$ref: "#/components/responses/Unauthorized"
"403":
$ref: "#/components/responses/OrganizationRequired"
put:
tags:
- Organization
summary: 현재 스케줄링 기간 저장
description: 현재 사용자의 조직에 설정된 active schedule planning period를 생성하거나 교체합니다.
operationId: upsertActiveSchedulePlanningPeriod
security:
- bearerAuth: []
requestBody:
required: true
content:
application/json:
schema:
$ref: "#/components/schemas/UpsertActiveSchedulePlanningPeriodRequest"
responses:
"200":
description: 현재 스케줄링 기간 저장 성공
content:
application/json:
schema:
$ref: "#/components/schemas/ActiveSchedulePlanningPeriod"
"400":
$ref: "#/components/responses/ValidationError"
"401":
$ref: "#/components/responses/Unauthorized"
"403":
$ref: "#/components/responses/OrganizationRequired"
delete:
tags:
- Organization
summary: 현재 스케줄링 기간 삭제
operationId: deleteActiveSchedulePlanningPeriod
security:
- bearerAuth: []
responses:
"204":
description: 현재 스케줄링 기간 삭제 성공
"401":
$ref: "#/components/responses/Unauthorized"
"403":
$ref: "#/components/responses/OrganizationRequired"
/availability:
get:
tags:
- Availability
summary: 가능 시간 조회
description: 특정 근무자의 선택 기간 가능 시간을 조회합니다. 정책상 가능 시간은 최소 인원 조건이 있는 시간대에만 입력하고 추천 생성에 사용합니다. 현재 최소 인원 조건 밖에 있는 기존 가능 시간은 유효하지 않은 데이터로 보고 조회 또는 저장 과정에서 정리하며, 조건과 겹치는 구간만 남깁니다.
operationId: listAvailability
security:
- bearerAuth: []
parameters:
- $ref: "#/components/parameters/AvailabilityWorkerId"
- $ref: "#/components/parameters/StartDate"
- $ref: "#/components/parameters/EndDate"
responses:
"200":
description: 가능 시간 조회 성공
content:
application/json:
schema:
$ref: "#/components/schemas/AvailabilityListResponse"
"400":
$ref: "#/components/responses/ValidationError"
"401":
$ref: "#/components/responses/Unauthorized"
"403":
$ref: "#/components/responses/OrganizationRequired"
"404":
$ref: "#/components/responses/NotFound"
/availability/bulk:
put:
tags:
- Availability
summary: 가능 시간 일괄 저장
description: 선택 범위의 특정 근무자 가능 시간을 요청값으로 전체 교체합니다. 저장 가능한 시간은 조직 영업시간 안에 있으면서 최소 인원 조건이 있는 시간대로 제한합니다. 현재 최소 인원 조건과 겹치는 구간만 저장하고, 전혀 겹치지 않는 구간은 삭제합니다.
operationId: replaceAvailability
security:
- bearerAuth: []
requestBody:
required: true
content:
application/json:
schema:
$ref: "#/components/schemas/ReplaceAvailabilityRequest"
responses:
"200":
description: 가능 시간 일괄 저장 성공
content:
application/json:
schema:
$ref: "#/components/schemas/AvailabilityListResponse"
"400":
$ref: "#/components/responses/ValidationError"
"401":
$ref: "#/components/responses/Unauthorized"
"403":
$ref: "#/components/responses/OrganizationRequired"
"404":
$ref: "#/components/responses/NotFound"
/workers:
get:
tags:
- Workers
summary: 근무자 목록 조회
description: 현재 사용자의 조직에 속한 근무자 목록을 사번 오름차순으로 조회합니다.
operationId: listWorkers
security:
- bearerAuth: []
responses:
"200":
description: 근무자 목록 조회 성공
content:
application/json:
schema:
$ref: "#/components/schemas/WorkersListResponse"
"401":
$ref: "#/components/responses/Unauthorized"
"403":
$ref: "#/components/responses/OrganizationRequired"
post:
tags:
- Workers
summary: 근무자 생성
description: 사번은 서버가 W-0001 형식으로 자동 생성합니다.
operationId: createWorker
security:
- bearerAuth: []
requestBody:
required: true
content:
application/json:
schema:
$ref: "#/components/schemas/CreateWorkerRequest"
responses:
"201":
description: 근무자 생성 성공
content:
application/json:
schema:
$ref: "#/components/schemas/Worker"
"400":
$ref: "#/components/responses/ValidationError"
"401":
$ref: "#/components/responses/Unauthorized"
"403":
$ref: "#/components/responses/OrganizationRequired"
/workers/{workerId}:
patch:
tags:
- Workers
summary: 근무자 수정
operationId: updateWorker
security:
- bearerAuth: []
parameters:
- $ref: "#/components/parameters/WorkerId"
requestBody:
required: true
content:
application/json:
schema:
$ref: "#/components/schemas/UpdateWorkerRequest"
responses:
"200":
description: 근무자 수정 성공
content:
application/json:
schema:
$ref: "#/components/schemas/Worker"
"400":
$ref: "#/components/responses/ValidationError"
"401":
$ref: "#/components/responses/Unauthorized"
"403":
$ref: "#/components/responses/OrganizationRequired"
"404":
$ref: "#/components/responses/NotFound"
delete:
tags:
- Workers
summary: 근무자 삭제
description: 근무자를 삭제합니다. 과거 스케줄 배정 기록의 worker_id는 null로 처리됩니다.
operationId: deleteWorker
security:
- bearerAuth: []
parameters:
- $ref: "#/components/parameters/WorkerId"
responses:
"204":
description: 근무자 삭제 성공
"400":
$ref: "#/components/responses/ValidationError"
"401":
$ref: "#/components/responses/Unauthorized"
"403":
$ref: "#/components/responses/OrganizationRequired"
"404":
$ref: "#/components/responses/NotFound"
/staffing-rules:
get:
tags:
- StaffingRules
summary: 최소 인원 조건 목록 조회
operationId: listMinimumStaffingRules
security:
- bearerAuth: []
responses:
"200":
description: 최소 인원 조건 목록 조회 성공
content:
application/json:
schema:
$ref: "#/components/schemas/MinimumStaffingRulesListResponse"
"401":
$ref: "#/components/responses/Unauthorized"
"403":
$ref: "#/components/responses/OrganizationRequired"
post:
tags:
- StaffingRules
summary: 최소 인원 조건 생성
description: 최소 인원 조건은 해당 요일의 조직 운영시간 안에서만 등록할 수 있습니다.
operationId: createMinimumStaffingRule
security:
- bearerAuth: []
requestBody:
required: true
content:
application/json:
schema:
$ref: "#/components/schemas/CreateMinimumStaffingRuleRequest"
responses:
"201":
description: 최소 인원 조건 생성 성공
content:
application/json:
schema:
$ref: "#/components/schemas/MinimumStaffingRule"
"400":
$ref: "#/components/responses/MinimumStaffingRuleBadRequest"
"401":
$ref: "#/components/responses/Unauthorized"
"403":
$ref: "#/components/responses/OrganizationRequired"
/staffing-rules/{ruleId}:
patch:
tags:
- StaffingRules
summary: 최소 인원 조건 수정
description: 수정 후의 조건도 해당 요일의 조직 운영시간 안에 있어야 합니다.
operationId: updateMinimumStaffingRule
security:
- bearerAuth: []
parameters:
- $ref: "#/components/parameters/RuleId"
requestBody:
required: true
content:
application/json:
schema:
$ref: "#/components/schemas/UpdateMinimumStaffingRuleRequest"
responses:
"200":
description: 최소 인원 조건 수정 성공
content:
application/json:
schema:
$ref: "#/components/schemas/MinimumStaffingRule"
"400":
$ref: "#/components/responses/MinimumStaffingRuleBadRequest"
"401":
$ref: "#/components/responses/Unauthorized"
"403":
$ref: "#/components/responses/OrganizationRequired"
"404":
$ref: "#/components/responses/NotFound"
delete:
tags:
- StaffingRules
summary: 최소 인원 조건 삭제
operationId: deleteMinimumStaffingRule
security:
- bearerAuth: []
parameters:
- $ref: "#/components/parameters/RuleId"
responses:
"204":
description: 최소 인원 조건 삭제 성공
"400":
$ref: "#/components/responses/ValidationError"
"401":
$ref: "#/components/responses/Unauthorized"
"403":
$ref: "#/components/responses/OrganizationRequired"
"404":
$ref: "#/components/responses/NotFound"
/schedules/recommend:
post:
tags:
- Schedules
summary: 스케줄 추천 생성
description: 현재 active planning period, 조직 영업시간, 인력, 가능 시간, 최소 인원 조건을 기준으로 DRAFT 스케줄을 생성합니다. 최소 인원 조건은 추천 대상 시간대와 최소 필요 인원을 정의하며, 조건이 있는 시간대에서만 가능 후보 산출, 추천 배정, 미충족 판단을 수행합니다.
operationId: recommendSchedule
security:
- bearerAuth: []
requestBody:
required: true
content:
application/json:
schema:
$ref: "#/components/schemas/RecommendScheduleRequest"
responses:
"201":
description: 스케줄 추천 생성 성공
content:
application/json:
schema:
$ref: "#/components/schemas/ScheduleDetail"
"400":
$ref: "#/components/responses/ValidationError"
"401":
$ref: "#/components/responses/Unauthorized"
"403":
$ref: "#/components/responses/OrganizationRequired"
"409":
$ref: "#/components/responses/DraftAlreadyExists"
/schedules/draft:
get:
tags:
- Schedules
summary: DRAFT 스케줄 조회
operationId: getDraftSchedule
security:
- bearerAuth: []
parameters:
- $ref: "#/components/parameters/StartDate"
- $ref: "#/components/parameters/EndDate"
responses:
"200":
description: DRAFT 스케줄 조회 성공
content:
application/json:
schema:
$ref: "#/components/schemas/DraftScheduleResponse"
"400":
$ref: "#/components/responses/ValidationError"
"401":
$ref: "#/components/responses/Unauthorized"
"403":
$ref: "#/components/responses/OrganizationRequired"
/schedules/{scheduleId}/assignments:
post:
tags:
- Schedules
summary: DRAFT 스케줄 배정 추가
operationId: createScheduleAssignment
security:
- bearerAuth: []
parameters:
- $ref: "#/components/parameters/ScheduleId"
requestBody:
required: true
content:
application/json:
schema:
$ref: "#/components/schemas/ScheduleAssignmentInput"
responses:
"201":
description: 배정 추가 성공
content:
application/json:
schema:
$ref: "#/components/schemas/ScheduleAssignment"
"400":
$ref: "#/components/responses/ValidationError"
"401":
$ref: "#/components/responses/Unauthorized"
"403":
$ref: "#/components/responses/OrganizationRequired"
"404":
$ref: "#/components/responses/NotFound"
"409":
$ref: "#/components/responses/ScheduleConflict"
/schedules/{scheduleId}/assignments/{assignmentId}:
patch:
tags:
- Schedules
summary: DRAFT 스케줄 배정 수정
operationId: updateScheduleAssignment
security:
- bearerAuth: []
parameters:
- $ref: "#/components/parameters/ScheduleId"
- $ref: "#/components/parameters/AssignmentId"
requestBody:
required: true
content:
application/json:
schema:
$ref: "#/components/schemas/UpdateScheduleAssignmentRequest"
responses:
"200":
description: 배정 수정 성공
content:
application/json:
schema:
$ref: "#/components/schemas/ScheduleAssignment"
"400":
$ref: "#/components/responses/ValidationError"
"401":
$ref: "#/components/responses/Unauthorized"
"403":
$ref: "#/components/responses/OrganizationRequired"
"404":
$ref: "#/components/responses/NotFound"
"409":
$ref: "#/components/responses/ScheduleConflict"
delete:
tags:
- Schedules
summary: DRAFT 스케줄 배정 삭제
operationId: deleteScheduleAssignment
security:
- bearerAuth: []
parameters:
- $ref: "#/components/parameters/ScheduleId"
- $ref: "#/components/parameters/AssignmentId"
responses:
"204":
description: 배정 삭제 성공
"400":
$ref: "#/components/responses/ValidationError"
"401":
$ref: "#/components/responses/Unauthorized"
"403":
$ref: "#/components/responses/OrganizationRequired"
"404":
$ref: "#/components/responses/NotFound"
"409":
$ref: "#/components/responses/ScheduleConflict"
/schedules/{scheduleId}/confirm:
post:
tags:
- Schedules
summary: DRAFT 스케줄 확정
operationId: confirmSchedule
security:
- bearerAuth: []
parameters:
- $ref: "#/components/parameters/ScheduleId"
responses:
"200":
description: 스케줄 확정 성공
content:
application/json:
schema:
$ref: "#/components/schemas/ScheduleDetail"
"400":
$ref: "#/components/responses/ValidationError"
"401":
$ref: "#/components/responses/Unauthorized"
"403":
$ref: "#/components/responses/OrganizationRequired"
"404":
$ref: "#/components/responses/NotFound"
"409":
$ref: "#/components/responses/ScheduleConflict"
/schedule-history:
get:
tags:
- ScheduleHistory
summary: 확정 스케줄 이력 목록 조회
description: 현재 조직의 CONFIRMED 스케줄 이력을 조회합니다. year와 month가 모두 없으면 모든 확정 이력을 조회합니다. month는 year와 함께 전달해야 합니다.
operationId: listScheduleHistory
security:
- bearerAuth: []
parameters:
- name: year
in: query
required: false
schema:
type: integer
minimum: 1900
example: 2026
- name: month
in: query
required: false
description: 1월부터 12월까지의 월입니다. month를 전달할 때는 year도 함께 전달해야 합니다.
schema:
type: integer
minimum: 1
maximum: 12
example: 7
responses:
"200":
description: 확정 스케줄 이력 목록 조회 성공
content:
application/json:
schema:
$ref: "#/components/schemas/ScheduleHistoryListResponse"
"400":
$ref: "#/components/responses/ValidationError"
"401":
$ref: "#/components/responses/Unauthorized"
"403":
$ref: "#/components/responses/OrganizationRequired"
/schedule-history/{scheduleId}:
get:
tags:
- ScheduleHistory
summary: 확정 스케줄 상세 조회
description: 현재 조직에 속한 CONFIRMED 스케줄 상세를 조회합니다.
operationId: getScheduleHistoryDetail
security:
- bearerAuth: []
parameters:
- $ref: "#/components/parameters/ScheduleId"
responses:
"200":
description: 확정 스케줄 상세 조회 성공
content:
application/json:
schema:
$ref: "#/components/schemas/ScheduleHistoryDetailResponse"
"400":
$ref: "#/components/responses/ValidationError"
"401":
$ref: "#/components/responses/Unauthorized"
"403":
$ref: "#/components/responses/OrganizationRequired"
"404":
$ref: "#/components/responses/ScheduleNotFound"
/schedule-history/{scheduleId}/export.csv:
get:
tags:
- ScheduleHistory
summary: 확정 스케줄 CSV 내보내기
description: 현재 조직에 속한 CONFIRMED 스케줄을 인쇄/공유용 근무표 CSV로 내려줍니다. 응답 본문은 Excel 호환을 위해 UTF-8 BOM으로 시작합니다.
operationId: exportScheduleHistoryCsv
security:
- bearerAuth: []
parameters:
- $ref: "#/components/parameters/ScheduleId"
responses:
"200":
description: CSV export 성공
content:
text/csv; charset=utf-8:
schema:
type: string
example: |
날짜,요일,10:00-14:00,15:00-18:00
2026-07-01,수,김민수 / 이서연,
2026-07-02,목,,박준호
"400":
$ref: "#/components/responses/ValidationError"
"401":
$ref: "#/components/responses/Unauthorized"
"403":
$ref: "#/components/responses/OrganizationRequired"
"404":
$ref: "#/components/responses/ScheduleNotFound"
/dashboard:
get:
tags:
- Dashboard
summary: 대시보드 조회
description: 현재 조직 상세와 가장 최근 확정 스케줄 1개를 조회합니다. 가장 최근 확정 스케줄은 confirmedAt desc, id desc 기준입니다.
operationId: getDashboard
security:
- bearerAuth: []
responses:
"200":
description: 대시보드 조회 성공
content:
application/json:
schema:
$ref: "#/components/schemas/DashboardResponse"
"401":
$ref: "#/components/responses/Unauthorized"
"403":
$ref: "#/components/responses/OrganizationRequired"
components:
securitySchemes:
bearerAuth:
type: http
scheme: bearer
bearerFormat: JWT
cookieAuth:
type: apiKey
in: cookie
name: refreshToken
responses:
ValidationError:
description: 요청 값 검증 실패
content:
application/json:
schema:
$ref: "#/components/schemas/ErrorResponse"
example:
statusCode: 400
errorCode: VALIDATION_ERROR
message: 요청 형식이 올바르지 않습니다.
MinimumStaffingRuleBadRequest:
description: 요청 값 검증 실패 또는 최소 인원 조건 도메인 규칙 위반
content:
application/json:
schema:
$ref: "#/components/schemas/ErrorResponse"
examples:
validationError:
summary: 요청 형식 오류
value:
statusCode: 400
errorCode: VALIDATION_ERROR
message: 요청 형식이 올바르지 않습니다.
closedDay:
summary: 휴무일 요청
value:
statusCode: 400
errorCode: CLOSED_DAY
message: 휴무일에는 최소 인원 조건을 등록할 수 없습니다.
invalidTimeRange:
summary: 운영시간 밖 요청
value:
statusCode: 400
errorCode: INVALID_TIME_RANGE
message: 최소 인원 조건은 조직 운영시간 안에서만 등록할 수 있습니다.
Unauthorized:
description: 인증 실패
content:
application/json:
schema:
$ref: "#/components/schemas/ErrorResponse"
examples:
invalidCredentials:
summary: 로그인 인증 실패
value:
statusCode: 401
errorCode: UNAUTHORIZED
message: 이메일 또는 비밀번호가 올바르지 않습니다.
authRequired:
summary: 인증 필요
value:
statusCode: 401
errorCode: UNAUTHORIZED
message: 인증이 필요합니다.
invalidToken:
summary: 유효하지 않은 인증 토큰
value:
statusCode: 401
errorCode: UNAUTHORIZED
message: 유효하지 않은 인증 토큰입니다.
invalidRefreshToken:
summary: 유효하지 않은 refresh token
value:
statusCode: 401
errorCode: UNAUTHORIZED
message: Refresh token이 유효하지 않습니다.
NotFound:
description: 리소스를 찾을 수 없음
content:
application/json:
schema:
$ref: "#/components/schemas/ErrorResponse"
examples:
notFound:
summary: 일반 리소스 없음
value:
statusCode: 404
errorCode: NOT_FOUND
message: 요청한 API를 찾을 수 없습니다.
workerNotFound:
summary: 근무자 없음
value:
statusCode: 404
errorCode: WORKER_NOT_FOUND
message: 근무자를 찾을 수 없습니다.
scheduleNotFound:
summary: 스케줄 없음
value:
statusCode: 404
errorCode: SCHEDULE_NOT_FOUND
message: 스케줄을 찾을 수 없습니다.
ScheduleNotFound:
description: 스케줄을 찾을 수 없음
content:
application/json:
schema:
$ref: "#/components/schemas/ErrorResponse"
example:
statusCode: 404
errorCode: SCHEDULE_NOT_FOUND
message: 스케줄을 찾을 수 없습니다.
OrganizationRequired:
description: 조직 생성 필요
content:
application/json:
schema:
$ref: "#/components/schemas/ErrorResponse"
example:
statusCode: 403
errorCode: ORGANIZATION_REQUIRED
message: 조직 생성 후 이용할 수 있습니다.
DuplicateEmail:
description: 이미 가입된 이메일
content:
application/json:
schema:
$ref: "#/components/schemas/ErrorResponse"
example:
statusCode: 409
errorCode: DUPLICATE_EMAIL
message: 이미 사용 중인 이메일입니다.
OrganizationAlreadyExists:
description: 이미 조직이 존재함
content:
application/json:
schema:
$ref: "#/components/schemas/ErrorResponse"
example:
statusCode: 409
errorCode: ORGANIZATION_ALREADY_EXISTS
message: 이미 조직이 존재합니다.
DraftAlreadyExists:
description: 같은 입력 조건의 DRAFT가 이미 존재함
content:
application/json:
schema:
$ref: "#/components/schemas/ErrorResponse"
example:
statusCode: 409
errorCode: DRAFT_ALREADY_EXISTS
message: 이미 생성된 DRAFT 스케줄입니다.
ScheduleConflict:
description: DRAFT 상태가 아닌 스케줄
content:
application/json:
schema:
$ref: "#/components/schemas/ErrorResponse"
example:
statusCode: 409
errorCode: CONFLICT
message: DRAFT 상태의 스케줄만 변경할 수 있습니다.
parameters:
WorkerId:
name: workerId