opensoma 0.5.0 → 0.6.0

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.
Files changed (133) hide show
  1. package/dist/package.json +5 -1
  2. package/dist/src/agent-browser-launcher.d.ts +43 -0
  3. package/dist/src/agent-browser-launcher.d.ts.map +1 -0
  4. package/dist/src/agent-browser-launcher.js +97 -0
  5. package/dist/src/agent-browser-launcher.js.map +1 -0
  6. package/dist/src/cli.d.ts.map +1 -1
  7. package/dist/src/cli.js +3 -2
  8. package/dist/src/cli.js.map +1 -1
  9. package/dist/src/client.d.ts +36 -7
  10. package/dist/src/client.d.ts.map +1 -1
  11. package/dist/src/client.js +231 -63
  12. package/dist/src/client.js.map +1 -1
  13. package/dist/src/commands/agent-browser.d.ts +3 -0
  14. package/dist/src/commands/agent-browser.d.ts.map +1 -0
  15. package/dist/src/commands/agent-browser.js +27 -0
  16. package/dist/src/commands/agent-browser.js.map +1 -0
  17. package/dist/src/commands/auth.d.ts +1 -1
  18. package/dist/src/commands/auth.d.ts.map +1 -1
  19. package/dist/src/commands/auth.js +4 -2
  20. package/dist/src/commands/auth.js.map +1 -1
  21. package/dist/src/commands/dashboard.d.ts +13 -0
  22. package/dist/src/commands/dashboard.d.ts.map +1 -1
  23. package/dist/src/commands/dashboard.js +10 -18
  24. package/dist/src/commands/dashboard.js.map +1 -1
  25. package/dist/src/commands/helpers.d.ts +1 -1
  26. package/dist/src/commands/helpers.d.ts.map +1 -1
  27. package/dist/src/commands/helpers.js +2 -2
  28. package/dist/src/commands/helpers.js.map +1 -1
  29. package/dist/src/commands/index.d.ts +2 -1
  30. package/dist/src/commands/index.d.ts.map +1 -1
  31. package/dist/src/commands/index.js +2 -1
  32. package/dist/src/commands/index.js.map +1 -1
  33. package/dist/src/commands/mentoring.d.ts.map +1 -1
  34. package/dist/src/commands/mentoring.js +54 -29
  35. package/dist/src/commands/mentoring.js.map +1 -1
  36. package/dist/src/commands/notice.d.ts.map +1 -1
  37. package/dist/src/commands/notice.js +2 -1
  38. package/dist/src/commands/notice.js.map +1 -1
  39. package/dist/src/commands/report.d.ts.map +1 -1
  40. package/dist/src/commands/report.js +4 -2
  41. package/dist/src/commands/report.js.map +1 -1
  42. package/dist/src/commands/room.d.ts.map +1 -1
  43. package/dist/src/commands/room.js +125 -2
  44. package/dist/src/commands/room.js.map +1 -1
  45. package/dist/src/commands/schedule.d.ts +3 -0
  46. package/dist/src/commands/schedule.d.ts.map +1 -0
  47. package/dist/src/commands/schedule.js +27 -0
  48. package/dist/src/commands/schedule.js.map +1 -0
  49. package/dist/src/commands/team.d.ts.map +1 -1
  50. package/dist/src/commands/team.js +55 -4
  51. package/dist/src/commands/team.js.map +1 -1
  52. package/dist/src/constants.d.ts +5 -5
  53. package/dist/src/constants.d.ts.map +1 -1
  54. package/dist/src/constants.js +20 -8
  55. package/dist/src/constants.js.map +1 -1
  56. package/dist/src/credential-manager.d.ts +9 -0
  57. package/dist/src/credential-manager.d.ts.map +1 -1
  58. package/dist/src/credential-manager.js +24 -0
  59. package/dist/src/credential-manager.js.map +1 -1
  60. package/dist/src/formatters.d.ts +11 -3
  61. package/dist/src/formatters.d.ts.map +1 -1
  62. package/dist/src/formatters.js +281 -52
  63. package/dist/src/formatters.js.map +1 -1
  64. package/dist/src/http.d.ts +8 -0
  65. package/dist/src/http.d.ts.map +1 -1
  66. package/dist/src/http.js +29 -1
  67. package/dist/src/http.js.map +1 -1
  68. package/dist/src/index.d.ts +4 -1
  69. package/dist/src/index.d.ts.map +1 -1
  70. package/dist/src/index.js +2 -1
  71. package/dist/src/index.js.map +1 -1
  72. package/dist/src/shared/utils/swmaestro.d.ts +34 -1
  73. package/dist/src/shared/utils/swmaestro.d.ts.map +1 -1
  74. package/dist/src/shared/utils/swmaestro.js +102 -43
  75. package/dist/src/shared/utils/swmaestro.js.map +1 -1
  76. package/dist/src/shared/utils/team-action-params.d.ts +3 -0
  77. package/dist/src/shared/utils/team-action-params.d.ts.map +1 -0
  78. package/dist/src/shared/utils/team-action-params.js +10 -0
  79. package/dist/src/shared/utils/team-action-params.js.map +1 -0
  80. package/dist/src/shared/utils/team-params.d.ts +12 -0
  81. package/dist/src/shared/utils/team-params.d.ts.map +1 -0
  82. package/dist/src/shared/utils/team-params.js +38 -0
  83. package/dist/src/shared/utils/team-params.js.map +1 -0
  84. package/dist/src/types.d.ts +147 -10
  85. package/dist/src/types.d.ts.map +1 -1
  86. package/dist/src/types.js +74 -6
  87. package/dist/src/types.js.map +1 -1
  88. package/package.json +5 -1
  89. package/src/agent-browser-launcher.test.ts +263 -0
  90. package/src/agent-browser-launcher.ts +159 -0
  91. package/src/cli.ts +4 -2
  92. package/src/client.test.ts +801 -140
  93. package/src/client.ts +293 -79
  94. package/src/commands/agent-browser.ts +33 -0
  95. package/src/commands/auth.test.ts +83 -32
  96. package/src/commands/auth.ts +5 -3
  97. package/src/commands/dashboard.test.ts +57 -0
  98. package/src/commands/dashboard.ts +22 -19
  99. package/src/commands/helpers.test.ts +79 -32
  100. package/src/commands/helpers.ts +3 -3
  101. package/src/commands/index.ts +2 -1
  102. package/src/commands/mentoring.ts +60 -29
  103. package/src/commands/notice.ts +2 -1
  104. package/src/commands/report.test.ts +7 -7
  105. package/src/commands/report.ts +4 -2
  106. package/src/commands/room.ts +160 -1
  107. package/src/commands/schedule.ts +32 -0
  108. package/src/commands/team.ts +73 -5
  109. package/src/constants.ts +20 -8
  110. package/src/credential-manager.test.ts +49 -5
  111. package/src/credential-manager.ts +27 -0
  112. package/src/formatters.test.ts +548 -53
  113. package/src/formatters.ts +309 -55
  114. package/src/http.test.ts +108 -39
  115. package/src/http.ts +41 -2
  116. package/src/index.ts +10 -1
  117. package/src/shared/utils/mentoring-params.test.ts +16 -16
  118. package/src/shared/utils/swmaestro.test.ts +326 -11
  119. package/src/shared/utils/swmaestro.ts +150 -52
  120. package/src/shared/utils/team-action-params.test.ts +32 -0
  121. package/src/shared/utils/team-action-params.ts +10 -0
  122. package/src/shared/utils/team-params.test.ts +141 -0
  123. package/src/shared/utils/team-params.ts +53 -0
  124. package/src/shared/utils/toz.test.ts +12 -7
  125. package/src/token-extractor.test.ts +12 -12
  126. package/src/toz-http.test.ts +11 -11
  127. package/src/types.test.ts +235 -206
  128. package/src/types.ts +87 -7
  129. package/dist/src/commands/event.d.ts +0 -3
  130. package/dist/src/commands/event.d.ts.map +0 -1
  131. package/dist/src/commands/event.js +0 -58
  132. package/dist/src/commands/event.js.map +0 -1
  133. package/src/commands/event.ts +0 -73
package/src/types.test.ts CHANGED
@@ -1,11 +1,10 @@
1
- import { describe, expect, test } from 'bun:test'
1
+ import { describe, expect, it } from 'bun:test'
2
2
 
3
3
  import {
4
4
  ApplicationHistoryItemSchema,
5
5
  ApprovalListItemSchema,
6
6
  CredentialsSchema,
7
7
  DashboardSchema,
8
- EventListItemSchema,
9
8
  MemberInfoSchema,
10
9
  MentoringDetailSchema,
11
10
  MentoringListItemSchema,
@@ -16,230 +15,260 @@ import {
16
15
  ReportDetailSchema,
17
16
  ReportListItemSchema,
18
17
  RoomCardSchema,
18
+ ScheduleListItemSchema,
19
19
  TeamInfoSchema,
20
20
  } from './types'
21
21
 
22
22
  describe('schemas', () => {
23
- test('accept valid values', () => {
24
- expect(
25
- MentoringListItemSchema.parse({
26
- id: 9572,
27
- title: 'AI 멘토링',
28
- type: '자유 멘토링',
29
- registrationPeriod: { start: '2026-04-01', end: '2026-04-10' },
30
- sessionDate: '2026-04-11',
31
- sessionTime: { start: '14:00', end: '15:30' },
32
- attendees: { current: 3, max: 4 },
33
- approved: true,
34
- status: '접수중',
35
- author: '전수열',
36
- createdAt: '2026-04-01',
37
- }),
38
- ).toBeDefined()
23
+ it('preserves valid MentoringListItem values through parse', () => {
24
+ const input = {
25
+ id: 9572,
26
+ title: 'AI 멘토링',
27
+ type: '자유 멘토링' as const,
28
+ registrationPeriod: { start: '2026-04-01', end: '2026-04-10' },
29
+ sessionDate: '2026-04-11',
30
+ sessionTime: { start: '14:00', end: '15:30' },
31
+ attendees: { current: 3, max: 4 },
32
+ approved: true,
33
+ status: '접수중' as const,
34
+ author: '전수열',
35
+ createdAt: '2026-04-01',
36
+ }
37
+ expect(MentoringListItemSchema.parse(input)).toEqual(input)
38
+ })
39
39
 
40
- expect(
41
- MentoringDetailSchema.parse({
42
- id: 9572,
43
- title: 'AI 멘토링',
44
- type: '멘토 특강',
45
- registrationPeriod: { start: '2026-04-01', end: '2026-04-10' },
46
- sessionDate: '2026-04-11',
47
- sessionTime: { start: '14:00', end: '15:30' },
48
- attendees: { current: 6, max: 20 },
49
- approved: false,
50
- status: '마감',
51
- author: '전수열',
52
- createdAt: '2026-04-01',
53
- content: '<p>내용</p>',
54
- venue: '온라인(Webex)',
55
- applicants: [],
56
- }),
57
- ).toBeDefined()
40
+ it('preserves valid MentoringDetail values through parse', () => {
41
+ const input = {
42
+ id: 9572,
43
+ title: 'AI 멘토링',
44
+ type: '멘토 특강' as const,
45
+ registrationPeriod: { start: '2026-04-01', end: '2026-04-10' },
46
+ sessionDate: '2026-04-11',
47
+ sessionTime: { start: '14:00', end: '15:30' },
48
+ attendees: { current: 6, max: 20 },
49
+ approved: false,
50
+ status: '마감' as const,
51
+ author: '전수열',
52
+ createdAt: '2026-04-01',
53
+ content: '<p>내용</p>',
54
+ venue: '온라인(Webex)',
55
+ applicants: [],
56
+ }
57
+ expect(MentoringDetailSchema.parse(input)).toEqual(input)
58
+ })
58
59
 
59
- expect(
60
- RoomCardSchema.parse({
61
- itemId: 17,
62
- name: '스페이스 A1',
63
- capacity: 4,
64
- availablePeriod: { start: '2026-04-01', end: '2026-12-31' },
65
- description: '소회의실 : 4인',
66
- timeSlots: [
67
- { time: '09:00', available: true },
68
- { time: '09:30', available: false, reservation: { title: '팀 회의', bookedBy: '전수열' } },
69
- ],
70
- }),
71
- ).toBeDefined()
60
+ it('preserves valid RoomCard values through parse', () => {
61
+ const input = {
62
+ itemId: 17,
63
+ name: '스페이스 A1',
64
+ capacity: 4,
65
+ availablePeriod: { start: '2026-04-01', end: '2026-12-31' },
66
+ description: '소회의실 : 4인',
67
+ timeSlots: [
68
+ { time: '09:00', available: true },
69
+ { time: '09:30', available: false, reservation: { title: '팀 회의', bookedBy: '전수열' } },
70
+ ],
71
+ }
72
+ expect(RoomCardSchema.parse(input)).toEqual(input)
73
+ })
72
74
 
73
- expect(
74
- DashboardSchema.parse({
75
- name: '전수열',
76
- role: '멘토',
77
- organization: 'Indent',
78
- position: '',
79
- team: { name: '오픈소마', members: '전수열, 김개발', mentor: '전수열' },
80
- mentoringSessions: [{ title: 'AI 멘토링', url: '/mentoring/1', status: '접수중' }],
81
- roomReservations: [{ title: 'A1 회의', url: '/room/1', status: '예약완료' }],
82
- }),
83
- ).toBeDefined()
75
+ it('preserves valid Dashboard values through parse', () => {
76
+ const input = {
77
+ name: '전수열',
78
+ role: '멘토',
79
+ organization: 'Indent',
80
+ position: '',
81
+ team: { name: '오픈소마', members: '전수열, 김개발', mentor: '전수열' },
82
+ teams: [],
83
+ mentoringSessions: [{ title: 'AI 멘토링', url: '/mentoring/1', status: '접수중' }],
84
+ roomReservations: [{ title: 'A1 회의', url: '/room/1', status: '예약완료' }],
85
+ }
86
+ expect(DashboardSchema.parse(input)).toEqual(input)
87
+ })
84
88
 
85
- expect(
86
- NoticeListItemSchema.parse({
87
- id: 1,
88
- title: '공지',
89
- author: '관리자',
90
- createdAt: '2026-04-01',
91
- }),
92
- ).toBeDefined()
89
+ it('preserves valid NoticeListItem values through parse', () => {
90
+ const input = {
91
+ id: 1,
92
+ title: '공지',
93
+ author: '관리자',
94
+ createdAt: '2026-04-01',
95
+ }
96
+ expect(NoticeListItemSchema.parse(input)).toEqual(input)
97
+ })
93
98
 
94
- expect(
95
- NoticeDetailSchema.parse({
96
- id: 1,
97
- title: '공지',
98
- author: '관리자',
99
- createdAt: '2026-04-01',
100
- content: '<p>내용</p>',
101
- }),
102
- ).toBeDefined()
99
+ it('preserves valid NoticeDetail values through parse', () => {
100
+ const input = {
101
+ id: 1,
102
+ title: '공지',
103
+ author: '관리자',
104
+ createdAt: '2026-04-01',
105
+ content: '<p>내용</p>',
106
+ }
107
+ expect(NoticeDetailSchema.parse(input)).toEqual(input)
108
+ })
103
109
 
104
- expect(
105
- TeamInfoSchema.parse({
106
- teams: [
107
- { name: '오픈소마', memberCount: 3, joinStatus: '참여중' },
108
- { name: '김앤강', memberCount: 5, joinStatus: '참여하기' },
109
- ],
110
- currentTeams: 1,
111
- maxTeams: 100,
112
- }),
113
- ).toBeDefined()
110
+ it('preserves valid TeamInfo values through parse', () => {
111
+ const input = {
112
+ teams: [
113
+ {
114
+ name: '오픈소마',
115
+ projectName: 'Previzion',
116
+ ownerId: 'owner-1',
117
+ teamId: 'team-a',
118
+ leader: '전수열',
119
+ members: [
120
+ { name: '전수열', userId: 'uid-1' },
121
+ { name: '강동우', userId: 'uid-2' },
122
+ ],
123
+ mentors: [{ name: '문승현', userId: 'uid-m1' }],
124
+ ictCategoryMajor: 'SW·SI',
125
+ ictCategoryMinor: '응용SW',
126
+ teamCompleted: true,
127
+ mentorCompleted: false,
128
+ joinStatus: '완료',
129
+ },
130
+ ],
131
+ currentTeams: 1,
132
+ maxTeams: 100,
133
+ }
134
+ expect(TeamInfoSchema.parse(input)).toEqual(input)
135
+ })
114
136
 
115
- expect(
116
- MemberInfoSchema.parse({
117
- email: 'neo@example.com',
118
- name: '전수열',
119
- gender: '남자',
120
- birthDate: '1995-01-14',
121
- phone: '01012345678',
122
- organization: 'Indent',
123
- position: '',
124
- }),
125
- ).toBeDefined()
137
+ it('preserves valid MemberInfo values through parse', () => {
138
+ const input = {
139
+ email: 'neo@example.com',
140
+ name: '전수열',
141
+ gender: '남자',
142
+ birthDate: '1995-01-14',
143
+ phone: '01012345678',
144
+ organization: 'Indent',
145
+ position: '',
146
+ }
147
+ expect(MemberInfoSchema.parse(input)).toEqual(input)
148
+ })
126
149
 
127
- expect(
128
- EventListItemSchema.parse({
129
- id: 11,
130
- category: '행사',
131
- title: '데모데이',
132
- registrationPeriod: { start: '2026-04-01', end: '2026-04-05' },
133
- eventPeriod: { start: '2026-04-10', end: '2026-04-10' },
134
- status: '접수중',
135
- createdAt: '2026-03-30',
136
- }),
137
- ).toBeDefined()
150
+ it('preserves valid ScheduleListItem values through parse', () => {
151
+ const input = {
152
+ id: 1,
153
+ category: '교육',
154
+ title: '[교육] 디자인씽킹 교육',
155
+ period: { start: '2026-04-21', end: '2026-04-26' },
156
+ }
157
+ expect(ScheduleListItemSchema.parse(input)).toEqual(input)
158
+ })
138
159
 
139
- expect(
140
- ApplicationHistoryItemSchema.parse({
141
- id: 99,
142
- category: '멘토 특강',
143
- title: 'AI 멘토링',
144
- author: '전수열',
145
- sessionDate: '2026-04-11',
146
- appliedAt: '2026-04-02 09:00',
147
- applicationStatus: '신청완료',
148
- approvalStatus: 'OK',
149
- applicationDetail: '승인대기',
150
- note: '-',
151
- }),
152
- ).toBeDefined()
160
+ it('preserves valid ApplicationHistoryItem values through parse', () => {
161
+ const input = {
162
+ id: 99,
163
+ category: '멘토 특강',
164
+ title: 'AI 멘토링',
165
+ author: '전수열',
166
+ sessionDate: '2026-04-11',
167
+ appliedAt: '2026-04-02 09:00',
168
+ applicationStatus: '신청완료',
169
+ approvalStatus: 'OK',
170
+ applicationDetail: '승인대기',
171
+ note: '-',
172
+ }
173
+ expect(ApplicationHistoryItemSchema.parse(input)).toEqual(input)
174
+ })
153
175
 
154
- expect(PaginationSchema.parse({ total: 23, currentPage: 2, totalPages: 3 })).toBeDefined()
176
+ it('preserves valid Pagination values through parse', () => {
177
+ const input = { total: 23, currentPage: 2, totalPages: 3 }
178
+ expect(PaginationSchema.parse(input)).toEqual(input)
179
+ })
155
180
 
156
- expect(
157
- CredentialsSchema.parse({
158
- sessionCookie: 'session-token',
159
- csrfToken: 'csrf-token',
160
- username: 'neo@example.com',
161
- loggedInAt: '2026-04-09T00:00:00.000Z',
162
- }),
163
- ).toBeDefined()
181
+ it('preserves valid Credentials values through parse', () => {
182
+ const input = {
183
+ sessionCookie: 'session-token',
184
+ csrfToken: 'csrf-token',
185
+ username: 'neo@example.com',
186
+ loggedInAt: '2026-04-09T00:00:00.000Z',
187
+ }
188
+ expect(CredentialsSchema.parse(input)).toEqual(input)
189
+ })
164
190
 
165
- expect(
166
- ReportListItemSchema.parse({
167
- id: 1,
168
- category: '멘토링',
169
- title: 'AI 멘토링 보고서',
170
- progressDate: '2026-04-10',
171
- status: '승인완료',
172
- author: '전수열',
173
- createdAt: '2026-04-11',
174
- acceptedTime: '2시간',
175
- payAmount: '100000',
176
- }),
177
- ).toBeDefined()
191
+ it('preserves valid ReportListItem values through parse', () => {
192
+ const input = {
193
+ id: 1,
194
+ category: '멘토링',
195
+ title: 'AI 멘토링 보고서',
196
+ progressDate: '2026-04-10',
197
+ status: '승인완료',
198
+ author: '전수열',
199
+ createdAt: '2026-04-11',
200
+ acceptedTime: '2시간',
201
+ payAmount: '100000',
202
+ }
203
+ expect(ReportListItemSchema.parse(input)).toEqual(input)
204
+ })
178
205
 
179
- expect(
180
- ReportDetailSchema.parse({
181
- id: 1,
182
- category: '멘토링',
183
- title: 'AI 멘토링 보고서',
184
- progressDate: '2026-04-10',
185
- status: '승인완료',
186
- author: '전수열',
187
- createdAt: '2026-04-11',
188
- acceptedTime: '2시간',
189
- payAmount: '100000',
190
- content: '멘토링 진행 내용',
191
- subject: 'AI 기술 멘토링',
192
- menteeRegion: 'S',
193
- reportType: 'MRC010',
194
- teamNames: '오픈소마',
195
- venue: '스페이스 A1',
196
- attendanceCount: 4,
197
- attendanceNames: '김개발, 박코딩, 이알고, 최리즘',
198
- progressStartTime: '14:00',
199
- progressEndTime: '16:00',
200
- exceptStartTime: '',
201
- exceptEndTime: '',
202
- exceptReason: '',
203
- mentorOpinion: '우수',
204
- nonAttendanceNames: '',
205
- etc: '',
206
- files: [],
207
- }),
208
- ).toBeDefined()
206
+ it('preserves valid ReportDetail values through parse', () => {
207
+ const input = {
208
+ id: 1,
209
+ category: '멘토링',
210
+ title: 'AI 멘토링 보고서',
211
+ progressDate: '2026-04-10',
212
+ status: '승인완료',
213
+ author: '전수열',
214
+ createdAt: '2026-04-11',
215
+ acceptedTime: '2시간',
216
+ payAmount: '100000',
217
+ content: '멘토링 진행 내용',
218
+ subject: 'AI 기술 멘토링',
219
+ menteeRegion: 'S',
220
+ reportType: 'MRC010',
221
+ teamNames: '오픈소마',
222
+ venue: '스페이스 A1',
223
+ attendanceCount: 4,
224
+ attendanceNames: '김개발, 박코딩, 이알고, 최리즘',
225
+ progressStartTime: '14:00',
226
+ progressEndTime: '16:00',
227
+ exceptStartTime: '',
228
+ exceptEndTime: '',
229
+ exceptReason: '',
230
+ mentorOpinion: '우수',
231
+ nonAttendanceNames: '',
232
+ etc: '',
233
+ files: [],
234
+ }
235
+ expect(ReportDetailSchema.parse(input)).toEqual(input)
236
+ })
209
237
 
210
- expect(
211
- ApprovalListItemSchema.parse({
212
- id: 1,
213
- category: '멘토링',
214
- title: 'AI 멘토링 보고서',
215
- progressDate: '2026-04-10',
216
- status: '승인완료',
217
- author: '전수열',
218
- createdAt: '2026-04-11',
219
- acceptedTime: '2시간',
220
- travelExpense: '50000',
221
- mentoringAllowance: '100000',
222
- }),
223
- ).toBeDefined()
238
+ it('preserves valid ApprovalListItem values through parse', () => {
239
+ const input = {
240
+ id: 1,
241
+ category: '멘토링',
242
+ title: 'AI 멘토링 보고서',
243
+ progressDate: '2026-04-10',
244
+ status: '승인완료',
245
+ author: '전수열',
246
+ createdAt: '2026-04-11',
247
+ acceptedTime: '2시간',
248
+ travelExpense: '50000',
249
+ mentoringAllowance: '100000',
250
+ }
251
+ expect(ApprovalListItemSchema.parse(input)).toEqual(input)
252
+ })
224
253
 
225
- expect(
226
- ReportCreateOptionsSchema.parse({
227
- menteeRegion: 'S',
228
- reportType: 'MRC010',
229
- progressDate: '2026-04-10',
230
- venue: '스페이스 A1',
231
- attendanceCount: 4,
232
- attendanceNames: '김개발, 박코딩, 이알고, 최리즘',
233
- progressStartTime: '14:00',
234
- progressEndTime: '16:00',
235
- subject: 'AI 멘토링 진행 보고',
236
- content:
237
- '이번 멘토링에서는 AI 기술의 기초 개념과 실제 적용 사례에 대해 다루었습니다. 참가자들은 머신러닝의 기본 원리와 딥러닝의 구조에 대해 학습하고, 실습을 통해 모델을 구현해보았습니다.',
238
- }),
239
- ).toBeDefined()
254
+ it('preserves valid ReportCreateOptions values through parse', () => {
255
+ const input = {
256
+ menteeRegion: 'S',
257
+ reportType: 'MRC010',
258
+ progressDate: '2026-04-10',
259
+ venue: '스페이스 A1',
260
+ attendanceCount: 4,
261
+ attendanceNames: '김개발, 박코딩, 이알고, 최리즘',
262
+ progressStartTime: '14:00',
263
+ progressEndTime: '16:00',
264
+ subject: 'AI 멘토링 진행 보고',
265
+ content:
266
+ '이번 멘토링에서는 AI 기술의 기초 개념과 실제 적용 사례에 대해 다루었습니다. 참가자들은 머신러닝의 기본 원리와 딥러닝의 구조에 대해 학습하고, 실습을 통해 모델을 구현해보았습니다.',
267
+ }
268
+ expect(ReportCreateOptionsSchema.parse(input)).toEqual(input)
240
269
  })
241
270
 
242
- test('reject invalid values', () => {
271
+ it('rejects invalid values for every schema', () => {
243
272
  expect(() => MentoringListItemSchema.parse({})).toThrow()
244
273
  expect(() => MentoringDetailSchema.parse({ content: 123 })).toThrow()
245
274
  expect(() => RoomCardSchema.parse({ itemId: '17' })).toThrow()
@@ -250,7 +279,7 @@ describe('schemas', () => {
250
279
  ).toThrow()
251
280
  expect(() => TeamInfoSchema.parse({ teams: [{ name: '김개발' }], currentTeams: 1, maxTeams: 100 })).toThrow()
252
281
  expect(() => MemberInfoSchema.parse({ email: 1, name: '전수열' })).toThrow()
253
- expect(() => EventListItemSchema.parse({ id: 1, title: '행사', status: '접수중' })).toThrow()
282
+ expect(() => ScheduleListItemSchema.parse({ id: 1, category: '교육', title: '강의' })).toThrow()
254
283
  expect(() => ApplicationHistoryItemSchema.parse({ id: 1, status: '신청완료' })).toThrow()
255
284
  expect(() => PaginationSchema.parse({ total: '23', currentPage: 2, totalPages: 3 })).toThrow()
256
285
  expect(() => CredentialsSchema.parse({ sessionCookie: 'cookie' })).toThrow()
package/src/types.ts CHANGED
@@ -18,9 +18,22 @@ const DashboardStatusItemSchema = z.object({
18
18
  venue: z.string().optional(),
19
19
  type: z.enum(['자유 멘토링', '멘토 특강']).optional(),
20
20
  })
21
+ const TeamMemberSchema = z.object({
22
+ name: z.string(),
23
+ userId: z.string(),
24
+ })
21
25
  const TeamListItemSchema = z.object({
22
26
  name: z.string(),
23
- memberCount: z.number(),
27
+ projectName: z.string(),
28
+ ownerId: z.string(),
29
+ teamId: z.string(),
30
+ leader: z.string(),
31
+ members: z.array(TeamMemberSchema),
32
+ mentors: z.array(TeamMemberSchema),
33
+ ictCategoryMajor: z.string(),
34
+ ictCategoryMinor: z.string(),
35
+ teamCompleted: z.boolean(),
36
+ mentorCompleted: z.boolean(),
24
37
  joinStatus: z.string(),
25
38
  })
26
39
 
@@ -54,6 +67,23 @@ export const MentoringDetailSchema = MentoringListItemSchema.extend({
54
67
  })
55
68
  export type MentoringDetail = z.infer<typeof MentoringDetailSchema>
56
69
 
70
+ export const MentoringEditFormSchema = z.object({
71
+ id: z.number(),
72
+ title: z.string(),
73
+ reportCd: z.string(),
74
+ receiptType: z.enum(['UNTIL_LECTURE', 'DIRECT']),
75
+ bgndeDate: z.string(),
76
+ bgndeTime: z.string(),
77
+ enddeDate: z.string(),
78
+ enddeTime: z.string(),
79
+ eventDt: z.string(),
80
+ eventStime: z.string(),
81
+ eventEtime: z.string(),
82
+ applyCnt: z.number(),
83
+ place: z.string(),
84
+ })
85
+ export type MentoringEditForm = z.infer<typeof MentoringEditFormSchema>
86
+
57
87
  export const RoomCardSchema = z.object({
58
88
  itemId: z.number(),
59
89
  name: z.string(),
@@ -64,11 +94,55 @@ export const RoomCardSchema = z.object({
64
94
  })
65
95
  export type RoomCard = z.infer<typeof RoomCardSchema>
66
96
 
97
+ export const RoomReservationStatusSchema = z.enum(['confirmed', 'cancelled', 'unknown'])
98
+ export type RoomReservationStatus = z.infer<typeof RoomReservationStatusSchema>
99
+
100
+ export const RoomReservationDetailSchema = z.object({
101
+ rentId: z.number(),
102
+ itemId: z.number(),
103
+ title: z.string(),
104
+ date: z.string(),
105
+ startTime: z.string(),
106
+ endTime: z.string(),
107
+ attendees: z.number(),
108
+ notes: z.string(),
109
+ status: RoomReservationStatusSchema,
110
+ statusCode: z.string(),
111
+ })
112
+ export type RoomReservationDetail = z.infer<typeof RoomReservationDetailSchema>
113
+
114
+ export const RoomReservationListItemSchema = z.object({
115
+ rentId: z.number(),
116
+ venue: z.string(),
117
+ title: z.string(),
118
+ date: z.string(),
119
+ startTime: z.string(),
120
+ endTime: z.string(),
121
+ author: z.string(),
122
+ status: RoomReservationStatusSchema,
123
+ statusLabel: z.string(),
124
+ registeredAt: z.string(),
125
+ })
126
+ export type RoomReservationListItem = z.infer<typeof RoomReservationListItemSchema>
127
+
128
+ export const RoomUpdateOptionsSchema = z.object({
129
+ title: z.string().optional(),
130
+ roomId: z.number().optional(),
131
+ date: z.string().optional(),
132
+ slots: z.array(z.string()).optional(),
133
+ attendees: z.number().optional(),
134
+ notes: z.string().optional(),
135
+ })
136
+ export type RoomUpdateOptions = z.infer<typeof RoomUpdateOptionsSchema>
137
+
67
138
  export const DashboardSchema = z.object({
68
139
  name: z.string(),
69
140
  role: z.string(),
70
141
  organization: z.string(),
71
142
  position: z.string(),
143
+ // Mirrors the single team the native dashboard HTML renders in `ul.dash-box`.
144
+ // The native page only ever surfaces one team here even when the user belongs
145
+ // to multiple. For the full set, see `teams` below.
72
146
  team: z
73
147
  .object({
74
148
  name: z.string(),
@@ -76,6 +150,9 @@ export const DashboardSchema = z.object({
76
150
  mentor: z.string(),
77
151
  })
78
152
  .optional(),
153
+ // Enriched from `team.list()` so consumers see every team the user belongs to,
154
+ // not just the one the native dashboard chose to render.
155
+ teams: z.array(TeamListItemSchema),
79
156
  mentoringSessions: z.array(DashboardStatusItemSchema),
80
157
  roomReservations: z.array(DashboardStatusItemSchema),
81
158
  })
@@ -94,6 +171,8 @@ export const NoticeDetailSchema = NoticeListItemSchema.extend({
94
171
  })
95
172
  export type NoticeDetail = z.infer<typeof NoticeDetailSchema>
96
173
 
174
+ export type TeamMember = z.infer<typeof TeamMemberSchema>
175
+ export type TeamListItem = z.infer<typeof TeamListItemSchema>
97
176
  export const TeamInfoSchema = z.object({
98
177
  teams: z.array(TeamListItemSchema),
99
178
  currentTeams: z.number(),
@@ -112,21 +191,19 @@ export const MemberInfoSchema = z.object({
112
191
  })
113
192
  export type MemberInfo = z.infer<typeof MemberInfoSchema>
114
193
 
115
- export const EventListItemSchema = z.object({
194
+ export const ScheduleListItemSchema = z.object({
116
195
  id: z.number(),
117
196
  category: z.string(),
118
197
  title: z.string(),
119
- registrationPeriod: DateRangeSchema,
120
- eventPeriod: DateRangeSchema,
121
- status: z.string(),
122
- createdAt: z.string(),
198
+ period: DateRangeSchema,
123
199
  })
124
- export type EventListItem = z.infer<typeof EventListItemSchema>
200
+ export type ScheduleListItem = z.infer<typeof ScheduleListItemSchema>
125
201
 
126
202
  export const ApplicationHistoryItemSchema = z.object({
127
203
  id: z.number(),
128
204
  category: z.string(),
129
205
  title: z.string(),
206
+ url: z.string().optional(),
130
207
  author: z.string(),
131
208
  sessionDate: z.string(),
132
209
  appliedAt: z.string(),
@@ -294,8 +371,11 @@ export const MentoringCreateOptionsSchema = z.object({
294
371
  endTime: z.string(),
295
372
  venue: z.string(),
296
373
  maxAttendees: z.number().optional(),
374
+ receiptType: z.enum(['UNTIL_LECTURE', 'DIRECT']).optional(),
297
375
  regStart: z.string().optional(),
376
+ regStartTime: z.string().optional(),
298
377
  regEnd: z.string().optional(),
378
+ regEndTime: z.string().optional(),
299
379
  content: z.string().optional(),
300
380
  })
301
381
  export type MentoringCreateOptions = z.infer<typeof MentoringCreateOptionsSchema>
@@ -1,3 +0,0 @@
1
- import { Command } from 'commander';
2
- export declare const eventCommand: Command;
3
- //# sourceMappingURL=event.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"event.d.ts","sourceRoot":"","sources":["../../../src/commands/event.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AAkDnC,eAAO,MAAM,YAAY,SAsBtB,CAAA"}