opensoma 0.2.1 → 0.3.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.
- package/dist/package.json +2 -2
- package/dist/src/cli.d.ts.map +1 -1
- package/dist/src/cli.js +2 -1
- package/dist/src/cli.js.map +1 -1
- package/dist/src/client.d.ts +24 -1
- package/dist/src/client.d.ts.map +1 -1
- package/dist/src/client.js +124 -1
- package/dist/src/client.js.map +1 -1
- package/dist/src/commands/auth.d.ts +5 -1
- package/dist/src/commands/auth.d.ts.map +1 -1
- package/dist/src/commands/auth.js +83 -4
- package/dist/src/commands/auth.js.map +1 -1
- package/dist/src/commands/helpers.d.ts +5 -1
- package/dist/src/commands/helpers.d.ts.map +1 -1
- package/dist/src/commands/helpers.js +28 -3
- package/dist/src/commands/helpers.js.map +1 -1
- package/dist/src/commands/index.d.ts +1 -0
- package/dist/src/commands/index.d.ts.map +1 -1
- package/dist/src/commands/index.js +1 -0
- package/dist/src/commands/index.js.map +1 -1
- package/dist/src/commands/mentoring.d.ts.map +1 -1
- package/dist/src/commands/mentoring.js +37 -1
- package/dist/src/commands/mentoring.js.map +1 -1
- package/dist/src/commands/report.d.ts +27 -0
- package/dist/src/commands/report.d.ts.map +1 -0
- package/dist/src/commands/report.js +224 -0
- package/dist/src/commands/report.js.map +1 -0
- package/dist/src/constants.d.ts +2 -0
- package/dist/src/constants.d.ts.map +1 -1
- package/dist/src/constants.js +2 -0
- package/dist/src/constants.js.map +1 -1
- package/dist/src/formatters.d.ts +4 -1
- package/dist/src/formatters.d.ts.map +1 -1
- package/dist/src/formatters.js +91 -1
- package/dist/src/formatters.js.map +1 -1
- package/dist/src/http.d.ts +2 -0
- package/dist/src/http.d.ts.map +1 -1
- package/dist/src/http.js +65 -1
- package/dist/src/http.js.map +1 -1
- package/dist/src/shared/utils/report-params.d.ts +11 -0
- package/dist/src/shared/utils/report-params.d.ts.map +1 -0
- package/dist/src/shared/utils/report-params.js +27 -0
- package/dist/src/shared/utils/report-params.js.map +1 -0
- package/dist/src/shared/utils/swmaestro.d.ts +24 -0
- package/dist/src/shared/utils/swmaestro.d.ts.map +1 -1
- package/dist/src/shared/utils/swmaestro.js +50 -2
- package/dist/src/shared/utils/swmaestro.js.map +1 -1
- package/dist/src/token-extractor.d.ts.map +1 -1
- package/dist/src/token-extractor.js +38 -8
- package/dist/src/token-extractor.js.map +1 -1
- package/dist/src/types.d.ts +120 -0
- package/dist/src/types.d.ts.map +1 -1
- package/dist/src/types.js +71 -0
- package/dist/src/types.js.map +1 -1
- package/package.json +2 -2
- package/src/cli.ts +2 -0
- package/src/client.test.ts +30 -5
- package/src/client.ts +151 -0
- package/src/commands/auth.test.ts +40 -1
- package/src/commands/auth.ts +91 -3
- package/src/commands/helpers.test.ts +108 -4
- package/src/commands/helpers.ts +30 -3
- package/src/commands/index.ts +1 -0
- package/src/commands/mentoring.ts +55 -0
- package/src/commands/report.test.ts +49 -0
- package/src/commands/report.ts +322 -0
- package/src/constants.ts +2 -0
- package/src/formatters.test.ts +287 -0
- package/src/formatters.ts +105 -0
- package/src/http.test.ts +158 -1
- package/src/http.ts +77 -1
- package/src/shared/utils/report-params.ts +41 -0
- package/src/shared/utils/swmaestro.ts +77 -5
- package/src/token-extractor.ts +59 -20
- package/src/types.test.ts +97 -0
- package/src/types.ts +83 -0
package/dist/src/types.d.ts
CHANGED
|
@@ -28,6 +28,13 @@ export declare const MentoringListItemSchema: z.ZodObject<{
|
|
|
28
28
|
createdAt: z.ZodString;
|
|
29
29
|
}, z.core.$strip>;
|
|
30
30
|
export type MentoringListItem = z.infer<typeof MentoringListItemSchema>;
|
|
31
|
+
export declare const MentoringApplicantSchema: z.ZodObject<{
|
|
32
|
+
name: z.ZodString;
|
|
33
|
+
appliedAt: z.ZodString;
|
|
34
|
+
cancelledAt: z.ZodString;
|
|
35
|
+
status: z.ZodString;
|
|
36
|
+
}, z.core.$strip>;
|
|
37
|
+
export type MentoringApplicant = z.infer<typeof MentoringApplicantSchema>;
|
|
31
38
|
export declare const MentoringDetailSchema: z.ZodObject<{
|
|
32
39
|
id: z.ZodNumber;
|
|
33
40
|
title: z.ZodString;
|
|
@@ -57,6 +64,12 @@ export declare const MentoringDetailSchema: z.ZodObject<{
|
|
|
57
64
|
createdAt: z.ZodString;
|
|
58
65
|
content: z.ZodString;
|
|
59
66
|
venue: z.ZodString;
|
|
67
|
+
applicants: z.ZodArray<z.ZodObject<{
|
|
68
|
+
name: z.ZodString;
|
|
69
|
+
appliedAt: z.ZodString;
|
|
70
|
+
cancelledAt: z.ZodString;
|
|
71
|
+
status: z.ZodString;
|
|
72
|
+
}, z.core.$strip>>;
|
|
60
73
|
}, z.core.$strip>;
|
|
61
74
|
export type MentoringDetail = z.infer<typeof MentoringDetailSchema>;
|
|
62
75
|
export declare const RoomCardSchema: z.ZodObject<{
|
|
@@ -191,4 +204,111 @@ export declare const CredentialsSchema: z.ZodObject<{
|
|
|
191
204
|
loggedInAt: z.ZodOptional<z.ZodString>;
|
|
192
205
|
}, z.core.$strip>;
|
|
193
206
|
export type Credentials = z.infer<typeof CredentialsSchema>;
|
|
207
|
+
export declare const ReportListItemSchema: z.ZodObject<{
|
|
208
|
+
id: z.ZodNumber;
|
|
209
|
+
category: z.ZodString;
|
|
210
|
+
title: z.ZodString;
|
|
211
|
+
progressDate: z.ZodString;
|
|
212
|
+
status: z.ZodString;
|
|
213
|
+
author: z.ZodString;
|
|
214
|
+
createdAt: z.ZodString;
|
|
215
|
+
acceptedTime: z.ZodString;
|
|
216
|
+
payAmount: z.ZodString;
|
|
217
|
+
}, z.core.$strip>;
|
|
218
|
+
export type ReportListItem = z.infer<typeof ReportListItemSchema>;
|
|
219
|
+
export declare const ReportDetailSchema: z.ZodObject<{
|
|
220
|
+
id: z.ZodNumber;
|
|
221
|
+
category: z.ZodString;
|
|
222
|
+
title: z.ZodString;
|
|
223
|
+
progressDate: z.ZodString;
|
|
224
|
+
status: z.ZodString;
|
|
225
|
+
author: z.ZodString;
|
|
226
|
+
createdAt: z.ZodString;
|
|
227
|
+
acceptedTime: z.ZodString;
|
|
228
|
+
payAmount: z.ZodString;
|
|
229
|
+
content: z.ZodString;
|
|
230
|
+
subject: z.ZodString;
|
|
231
|
+
menteeRegion: z.ZodString;
|
|
232
|
+
reportType: z.ZodString;
|
|
233
|
+
teamNames: z.ZodString;
|
|
234
|
+
venue: z.ZodString;
|
|
235
|
+
attendanceCount: z.ZodNumber;
|
|
236
|
+
attendanceNames: z.ZodString;
|
|
237
|
+
progressStartTime: z.ZodString;
|
|
238
|
+
progressEndTime: z.ZodString;
|
|
239
|
+
exceptStartTime: z.ZodString;
|
|
240
|
+
exceptEndTime: z.ZodString;
|
|
241
|
+
exceptReason: z.ZodString;
|
|
242
|
+
mentorOpinion: z.ZodString;
|
|
243
|
+
nonAttendanceNames: z.ZodString;
|
|
244
|
+
etc: z.ZodString;
|
|
245
|
+
files: z.ZodArray<z.ZodString>;
|
|
246
|
+
}, z.core.$strip>;
|
|
247
|
+
export type ReportDetail = z.infer<typeof ReportDetailSchema>;
|
|
248
|
+
export declare const ApprovalListItemSchema: z.ZodObject<{
|
|
249
|
+
id: z.ZodNumber;
|
|
250
|
+
category: z.ZodString;
|
|
251
|
+
title: z.ZodString;
|
|
252
|
+
progressDate: z.ZodString;
|
|
253
|
+
status: z.ZodString;
|
|
254
|
+
author: z.ZodString;
|
|
255
|
+
createdAt: z.ZodString;
|
|
256
|
+
acceptedTime: z.ZodString;
|
|
257
|
+
travelExpense: z.ZodString;
|
|
258
|
+
mentoringAllowance: z.ZodString;
|
|
259
|
+
}, z.core.$strip>;
|
|
260
|
+
export type ApprovalListItem = z.infer<typeof ApprovalListItemSchema>;
|
|
261
|
+
export declare const ReportCreateOptionsSchema: z.ZodObject<{
|
|
262
|
+
menteeRegion: z.ZodEnum<{
|
|
263
|
+
S: "S";
|
|
264
|
+
B: "B";
|
|
265
|
+
}>;
|
|
266
|
+
reportType: z.ZodEnum<{
|
|
267
|
+
MRC010: "MRC010";
|
|
268
|
+
MRC020: "MRC020";
|
|
269
|
+
}>;
|
|
270
|
+
progressDate: z.ZodString;
|
|
271
|
+
teamNames: z.ZodOptional<z.ZodString>;
|
|
272
|
+
venue: z.ZodString;
|
|
273
|
+
attendanceCount: z.ZodNumber;
|
|
274
|
+
attendanceNames: z.ZodString;
|
|
275
|
+
progressStartTime: z.ZodString;
|
|
276
|
+
progressEndTime: z.ZodString;
|
|
277
|
+
exceptStartTime: z.ZodOptional<z.ZodString>;
|
|
278
|
+
exceptEndTime: z.ZodOptional<z.ZodString>;
|
|
279
|
+
exceptReason: z.ZodOptional<z.ZodString>;
|
|
280
|
+
subject: z.ZodString;
|
|
281
|
+
content: z.ZodString;
|
|
282
|
+
mentorOpinion: z.ZodOptional<z.ZodString>;
|
|
283
|
+
nonAttendanceNames: z.ZodOptional<z.ZodString>;
|
|
284
|
+
etc: z.ZodOptional<z.ZodString>;
|
|
285
|
+
}, z.core.$strip>;
|
|
286
|
+
export type ReportCreateOptions = z.infer<typeof ReportCreateOptionsSchema>;
|
|
287
|
+
export declare const ReportUpdateOptionsSchema: z.ZodObject<{
|
|
288
|
+
menteeRegion: z.ZodOptional<z.ZodEnum<{
|
|
289
|
+
S: "S";
|
|
290
|
+
B: "B";
|
|
291
|
+
}>>;
|
|
292
|
+
reportType: z.ZodOptional<z.ZodEnum<{
|
|
293
|
+
MRC010: "MRC010";
|
|
294
|
+
MRC020: "MRC020";
|
|
295
|
+
}>>;
|
|
296
|
+
progressDate: z.ZodOptional<z.ZodString>;
|
|
297
|
+
teamNames: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
298
|
+
venue: z.ZodOptional<z.ZodString>;
|
|
299
|
+
attendanceCount: z.ZodOptional<z.ZodNumber>;
|
|
300
|
+
attendanceNames: z.ZodOptional<z.ZodString>;
|
|
301
|
+
progressStartTime: z.ZodOptional<z.ZodString>;
|
|
302
|
+
progressEndTime: z.ZodOptional<z.ZodString>;
|
|
303
|
+
exceptStartTime: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
304
|
+
exceptEndTime: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
305
|
+
exceptReason: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
306
|
+
subject: z.ZodOptional<z.ZodString>;
|
|
307
|
+
content: z.ZodOptional<z.ZodString>;
|
|
308
|
+
mentorOpinion: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
309
|
+
nonAttendanceNames: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
310
|
+
etc: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
311
|
+
id: z.ZodNumber;
|
|
312
|
+
}, z.core.$strip>;
|
|
313
|
+
export type ReportUpdateOptions = z.infer<typeof ReportUpdateOptionsSchema>;
|
|
194
314
|
//# sourceMappingURL=types.d.ts.map
|
package/dist/src/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAA;AAqB1B,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAYlC,CAAA;AACF,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAA;AAEvE,eAAO,MAAM,qBAAqB
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAA;AAqB1B,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAYlC,CAAA;AACF,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAA;AAEvE,eAAO,MAAM,wBAAwB;;;;;iBAKnC,CAAA;AACF,MAAM,MAAM,kBAAkB,GA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B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,4BAA4B,CAAC,CAAA;AAEjF,eAAO,MAAM,gBAAgB;;;;iBAI3B,CAAA;AACF,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAA;AAEzD,eAAO,MAAM,iBAAiB;;;;;;;iBAO5B,CAAA;AACF,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAA;AAE3D,eAAO,MAAM,oBAAoB;;;;;;;;;;iBAU/B,CAAA;AACF,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAA;AAEjE,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAkB7B,CAAA;AACF,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAA;AAE7D,eAAO,MAAM,sBAAsB;;;;;;;;;;;iBAWjC,CAAA;AACF,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAA;AAErE,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;;iBAkBpC,CAAA;AACF,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAA;AAE3E,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;;;iBAEpC,CAAA;AACF,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAA"}
|
package/dist/src/types.js
CHANGED
|
@@ -30,9 +30,16 @@ export const MentoringListItemSchema = z.object({
|
|
|
30
30
|
author: z.string(),
|
|
31
31
|
createdAt: z.string(),
|
|
32
32
|
});
|
|
33
|
+
export const MentoringApplicantSchema = z.object({
|
|
34
|
+
name: z.string(),
|
|
35
|
+
appliedAt: z.string(),
|
|
36
|
+
cancelledAt: z.string(),
|
|
37
|
+
status: z.string(),
|
|
38
|
+
});
|
|
33
39
|
export const MentoringDetailSchema = MentoringListItemSchema.extend({
|
|
34
40
|
content: z.string(),
|
|
35
41
|
venue: z.string(),
|
|
42
|
+
applicants: z.array(MentoringApplicantSchema),
|
|
36
43
|
});
|
|
37
44
|
export const RoomCardSchema = z.object({
|
|
38
45
|
itemId: z.number(),
|
|
@@ -114,4 +121,68 @@ export const CredentialsSchema = z.object({
|
|
|
114
121
|
password: z.string().optional(),
|
|
115
122
|
loggedInAt: z.string().optional(),
|
|
116
123
|
});
|
|
124
|
+
export const ReportListItemSchema = z.object({
|
|
125
|
+
id: z.number(),
|
|
126
|
+
category: z.string(),
|
|
127
|
+
title: z.string(),
|
|
128
|
+
progressDate: z.string(),
|
|
129
|
+
status: z.string(),
|
|
130
|
+
author: z.string(),
|
|
131
|
+
createdAt: z.string(),
|
|
132
|
+
acceptedTime: z.string(),
|
|
133
|
+
payAmount: z.string(),
|
|
134
|
+
});
|
|
135
|
+
export const ReportDetailSchema = ReportListItemSchema.extend({
|
|
136
|
+
content: z.string(),
|
|
137
|
+
subject: z.string(),
|
|
138
|
+
menteeRegion: z.string(),
|
|
139
|
+
reportType: z.string(),
|
|
140
|
+
teamNames: z.string(),
|
|
141
|
+
venue: z.string(),
|
|
142
|
+
attendanceCount: z.number(),
|
|
143
|
+
attendanceNames: z.string(),
|
|
144
|
+
progressStartTime: z.string(),
|
|
145
|
+
progressEndTime: z.string(),
|
|
146
|
+
exceptStartTime: z.string(),
|
|
147
|
+
exceptEndTime: z.string(),
|
|
148
|
+
exceptReason: z.string(),
|
|
149
|
+
mentorOpinion: z.string(),
|
|
150
|
+
nonAttendanceNames: z.string(),
|
|
151
|
+
etc: z.string(),
|
|
152
|
+
files: z.array(z.string()),
|
|
153
|
+
});
|
|
154
|
+
export const ApprovalListItemSchema = z.object({
|
|
155
|
+
id: z.number(),
|
|
156
|
+
category: z.string(),
|
|
157
|
+
title: z.string(),
|
|
158
|
+
progressDate: z.string(),
|
|
159
|
+
status: z.string(),
|
|
160
|
+
author: z.string(),
|
|
161
|
+
createdAt: z.string(),
|
|
162
|
+
acceptedTime: z.string(),
|
|
163
|
+
travelExpense: z.string(),
|
|
164
|
+
mentoringAllowance: z.string(),
|
|
165
|
+
});
|
|
166
|
+
export const ReportCreateOptionsSchema = z.object({
|
|
167
|
+
menteeRegion: z.enum(['S', 'B']),
|
|
168
|
+
reportType: z.enum(['MRC010', 'MRC020']),
|
|
169
|
+
progressDate: z.string(),
|
|
170
|
+
teamNames: z.string().optional(),
|
|
171
|
+
venue: z.string(),
|
|
172
|
+
attendanceCount: z.number(),
|
|
173
|
+
attendanceNames: z.string(),
|
|
174
|
+
progressStartTime: z.string(),
|
|
175
|
+
progressEndTime: z.string(),
|
|
176
|
+
exceptStartTime: z.string().optional(),
|
|
177
|
+
exceptEndTime: z.string().optional(),
|
|
178
|
+
exceptReason: z.string().optional(),
|
|
179
|
+
subject: z.string().min(10),
|
|
180
|
+
content: z.string().min(100),
|
|
181
|
+
mentorOpinion: z.string().optional(),
|
|
182
|
+
nonAttendanceNames: z.string().optional(),
|
|
183
|
+
etc: z.string().optional(),
|
|
184
|
+
});
|
|
185
|
+
export const ReportUpdateOptionsSchema = ReportCreateOptionsSchema.partial().extend({
|
|
186
|
+
id: z.number(),
|
|
187
|
+
});
|
|
117
188
|
//# sourceMappingURL=types.js.map
|
package/dist/src/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAA;AAE1B,MAAM,eAAe,GAAG,CAAC,CAAC,MAAM,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,EAAE,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAA;AACxE,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;IACjB,eAAe,EAAE,CAAC,CAAC,MAAM,EAAE;IAC3B,eAAe,EAAE,CAAC,CAAC,MAAM,EAAE;IAC3B,iBAAiB,EAAE,CAAC,CAAC,MAAM,EAAE;IAC7B,eAAe,EAAE,CAAC,CAAC,MAAM,EAAE;IAC3B,eAAe,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACtC,aAAa,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACpC,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACnC,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC;IAC3B,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC;IAC5B,aAAa,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACpC,kBAAkB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACzC,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CAC3B,CAAC,CAAA;AAGF,MAAM,CAAC,MAAM,yBAAyB,GAAG,yBAAyB,CAAC,OAAO,EAAE,CAAC,MAAM,CAAC;IAClF,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE;CACf,CAAC,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "opensoma",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"description": "SWMaestro MyPage CLI & SDK for AI agents",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
8
|
-
"url": "git+https://github.com/
|
|
8
|
+
"url": "git+https://github.com/opensoma/opensoma.git"
|
|
9
9
|
},
|
|
10
10
|
"bin": {
|
|
11
11
|
"opensoma": "dist/src/cli.js"
|
package/src/cli.ts
CHANGED
|
@@ -10,6 +10,7 @@ import {
|
|
|
10
10
|
memberCommand,
|
|
11
11
|
mentoringCommand,
|
|
12
12
|
noticeCommand,
|
|
13
|
+
reportCommand,
|
|
13
14
|
roomCommand,
|
|
14
15
|
teamCommand,
|
|
15
16
|
} from './commands/index'
|
|
@@ -51,6 +52,7 @@ program.addCommand(noticeCommand)
|
|
|
51
52
|
program.addCommand(teamCommand)
|
|
52
53
|
program.addCommand(memberCommand)
|
|
53
54
|
program.addCommand(eventCommand)
|
|
55
|
+
program.addCommand(reportCommand)
|
|
54
56
|
|
|
55
57
|
program.parse(process.argv)
|
|
56
58
|
|
package/src/client.test.ts
CHANGED
|
@@ -91,6 +91,14 @@ describe('SomaClient', () => {
|
|
|
91
91
|
venue: '온라인(Webex)',
|
|
92
92
|
maxAttendees: 10,
|
|
93
93
|
})
|
|
94
|
+
await client.mentoring.update(42, {
|
|
95
|
+
title: '수정된 멘토링',
|
|
96
|
+
type: 'public',
|
|
97
|
+
date: '2026-05-01',
|
|
98
|
+
startTime: '14:00',
|
|
99
|
+
endTime: '15:00',
|
|
100
|
+
venue: '오프라인',
|
|
101
|
+
})
|
|
94
102
|
await client.mentoring.delete(7)
|
|
95
103
|
await client.mentoring.apply(8)
|
|
96
104
|
await client.mentoring.cancel({ applySn: 9, qustnrSn: 10 })
|
|
@@ -104,6 +112,7 @@ describe('SomaClient', () => {
|
|
|
104
112
|
|
|
105
113
|
expect(calls.map((call) => call.path)).toEqual([
|
|
106
114
|
'/mypage/mentoLec/insert.do',
|
|
115
|
+
'/mypage/mentoLec/update.do',
|
|
107
116
|
'/mypage/mentoLec/delete.do',
|
|
108
117
|
'/application/application/application.do',
|
|
109
118
|
'/mypage/userAnswer/cancel.do',
|
|
@@ -115,30 +124,36 @@ describe('SomaClient', () => {
|
|
|
115
124
|
reportCd: 'MRC020',
|
|
116
125
|
qustnrSj: '새 멘토링',
|
|
117
126
|
})
|
|
118
|
-
expect(calls[1]?.data).
|
|
127
|
+
expect(calls[1]?.data).toMatchObject({
|
|
128
|
+
menuNo: MENU_NO.MENTORING,
|
|
129
|
+
reportCd: 'MRC010',
|
|
130
|
+
qustnrSj: '수정된 멘토링',
|
|
131
|
+
qustnrSn: '42',
|
|
132
|
+
})
|
|
133
|
+
expect(calls[2]?.data).toEqual({
|
|
119
134
|
menuNo: MENU_NO.MENTORING,
|
|
120
135
|
qustnrSn: '7',
|
|
121
136
|
pageQueryString: '',
|
|
122
137
|
})
|
|
123
|
-
expect(calls[
|
|
138
|
+
expect(calls[3]?.data).toEqual({
|
|
124
139
|
menuNo: MENU_NO.EVENT,
|
|
125
140
|
qustnrSn: '8',
|
|
126
141
|
applyGb: 'C',
|
|
127
142
|
stepHeader: '0',
|
|
128
143
|
})
|
|
129
|
-
expect(calls[
|
|
144
|
+
expect(calls[4]?.data).toEqual({
|
|
130
145
|
menuNo: MENU_NO.APPLICATION_HISTORY,
|
|
131
146
|
applySn: '9',
|
|
132
147
|
qustnrSn: '10',
|
|
133
148
|
})
|
|
134
|
-
expect(calls[
|
|
149
|
+
expect(calls[5]?.data).toMatchObject({
|
|
135
150
|
menuNo: MENU_NO.ROOM,
|
|
136
151
|
itemId: '17',
|
|
137
152
|
title: '회의',
|
|
138
153
|
'time[0]': '10:00',
|
|
139
154
|
'time[1]': '10:30',
|
|
140
155
|
})
|
|
141
|
-
expect(calls[
|
|
156
|
+
expect(calls[6]?.data).toEqual({
|
|
142
157
|
menuNo: MENU_NO.EVENT,
|
|
143
158
|
qustnrSn: '11',
|
|
144
159
|
applyGb: 'C',
|
|
@@ -337,6 +352,16 @@ describe('SomaClient', () => {
|
|
|
337
352
|
venue: 'Test',
|
|
338
353
|
}),
|
|
339
354
|
).rejects.toBeInstanceOf(AuthenticationError)
|
|
355
|
+
await expect(
|
|
356
|
+
client.mentoring.update(1, {
|
|
357
|
+
title: 'Test',
|
|
358
|
+
type: 'public',
|
|
359
|
+
date: '2026-04-01',
|
|
360
|
+
startTime: '10:00',
|
|
361
|
+
endTime: '11:00',
|
|
362
|
+
venue: 'Test',
|
|
363
|
+
}),
|
|
364
|
+
).rejects.toBeInstanceOf(AuthenticationError)
|
|
340
365
|
await expect(client.mentoring.delete(1)).rejects.toBeInstanceOf(AuthenticationError)
|
|
341
366
|
await expect(client.mentoring.apply(1)).rejects.toBeInstanceOf(AuthenticationError)
|
|
342
367
|
await expect(client.mentoring.cancel({ applySn: 1, qustnrSn: 2 })).rejects.toBeInstanceOf(AuthenticationError)
|
package/src/client.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { readFile } from 'node:fs/promises'
|
|
2
|
+
|
|
1
3
|
import { MENU_NO } from './constants'
|
|
2
4
|
import { CredentialManager } from './credential-manager'
|
|
3
5
|
import { AuthenticationError } from './errors'
|
|
@@ -9,12 +11,17 @@ import {
|
|
|
9
11
|
buildCancelApplicationPayload,
|
|
10
12
|
buildDeleteMentoringPayload,
|
|
11
13
|
buildMentoringPayload,
|
|
14
|
+
buildReportPayload,
|
|
12
15
|
buildRoomReservationPayload,
|
|
16
|
+
buildUpdateMentoringPayload,
|
|
13
17
|
parseEventDetail,
|
|
14
18
|
resolveRoomId,
|
|
19
|
+
toRegionCode,
|
|
20
|
+
toReportTypeCd,
|
|
15
21
|
} from './shared/utils/swmaestro'
|
|
16
22
|
import type {
|
|
17
23
|
ApplicationHistoryItem,
|
|
24
|
+
ApprovalListItem,
|
|
18
25
|
Dashboard,
|
|
19
26
|
EventListItem,
|
|
20
27
|
MemberInfo,
|
|
@@ -23,6 +30,10 @@ import type {
|
|
|
23
30
|
NoticeDetail,
|
|
24
31
|
NoticeListItem,
|
|
25
32
|
Pagination,
|
|
33
|
+
ReportCreateOptions,
|
|
34
|
+
ReportDetail,
|
|
35
|
+
ReportListItem,
|
|
36
|
+
ReportUpdateOptions,
|
|
26
37
|
RoomCard,
|
|
27
38
|
TeamInfo,
|
|
28
39
|
} from './types'
|
|
@@ -60,6 +71,7 @@ export class SomaClient {
|
|
|
60
71
|
regEnd?: string
|
|
61
72
|
content?: string
|
|
62
73
|
}): Promise<void>
|
|
74
|
+
update(id: number, params: Parameters<typeof buildMentoringPayload>[0]): Promise<void>
|
|
63
75
|
delete(id: number): Promise<void>
|
|
64
76
|
apply(id: number): Promise<void>
|
|
65
77
|
cancel(params: { applySn: number; qustnrSn: number }): Promise<void>
|
|
@@ -88,6 +100,27 @@ export class SomaClient {
|
|
|
88
100
|
get(id: number): Promise<NoticeDetail>
|
|
89
101
|
}
|
|
90
102
|
|
|
103
|
+
readonly report: {
|
|
104
|
+
list(options?: {
|
|
105
|
+
page?: number
|
|
106
|
+
searchField?: string
|
|
107
|
+
searchKeyword?: string
|
|
108
|
+
}): Promise<{ items: ReportListItem[]; pagination: Pagination }>
|
|
109
|
+
get(id: number): Promise<ReportDetail>
|
|
110
|
+
create(options: ReportCreateOptions, file: Buffer | string, fileName?: string): Promise<void>
|
|
111
|
+
update(
|
|
112
|
+
id: number,
|
|
113
|
+
options: Omit<ReportUpdateOptions, 'id'>,
|
|
114
|
+
file?: Buffer | string,
|
|
115
|
+
fileName?: string,
|
|
116
|
+
): Promise<void>
|
|
117
|
+
approval(options?: {
|
|
118
|
+
page?: number
|
|
119
|
+
month?: string
|
|
120
|
+
reportType?: string
|
|
121
|
+
}): Promise<{ items: ApprovalListItem[]; pagination: Pagination }>
|
|
122
|
+
}
|
|
123
|
+
|
|
91
124
|
readonly team: {
|
|
92
125
|
show(): Promise<TeamInfo>
|
|
93
126
|
}
|
|
@@ -148,6 +181,13 @@ export class SomaClient {
|
|
|
148
181
|
throw new Error(this.extractErrorMessage(html) || '멘토링 등록에 실패했습니다.')
|
|
149
182
|
}
|
|
150
183
|
},
|
|
184
|
+
update: async (id, params) => {
|
|
185
|
+
await this.requireAuth()
|
|
186
|
+
const html = await this.http.post('/mypage/mentoLec/update.do', buildUpdateMentoringPayload(id, params))
|
|
187
|
+
if (this.containsErrorIndicator(html)) {
|
|
188
|
+
throw new Error(this.extractErrorMessage(html) || '멘토링 수정에 실패했습니다.')
|
|
189
|
+
}
|
|
190
|
+
},
|
|
151
191
|
delete: async (id) => {
|
|
152
192
|
await this.requireAuth()
|
|
153
193
|
await this.http.post('/mypage/mentoLec/delete.do', buildDeleteMentoringPayload(id))
|
|
@@ -244,6 +284,117 @@ export class SomaClient {
|
|
|
244
284
|
},
|
|
245
285
|
}
|
|
246
286
|
|
|
287
|
+
this.report = {
|
|
288
|
+
list: async (options) => {
|
|
289
|
+
await this.requireAuth()
|
|
290
|
+
const params: Record<string, string> = {
|
|
291
|
+
menuNo: MENU_NO.REPORT,
|
|
292
|
+
pageIndex: String(options?.page ?? 1),
|
|
293
|
+
}
|
|
294
|
+
if (options?.searchField !== undefined) params.searchCnd = options.searchField
|
|
295
|
+
if (options?.searchKeyword) params.searchWrd = options.searchKeyword
|
|
296
|
+
const html = await this.http.get('/mypage/mentoringReport/list.do', params)
|
|
297
|
+
return {
|
|
298
|
+
items: formatters.parseReportList(html),
|
|
299
|
+
pagination: formatters.parsePagination(html),
|
|
300
|
+
}
|
|
301
|
+
},
|
|
302
|
+
get: async (id) => {
|
|
303
|
+
await this.requireAuth()
|
|
304
|
+
const html = await this.http.get('/mypage/mentoringReport/view.do', {
|
|
305
|
+
menuNo: MENU_NO.REPORT,
|
|
306
|
+
reportId: String(id),
|
|
307
|
+
})
|
|
308
|
+
return formatters.parseReportDetail(html, id)
|
|
309
|
+
},
|
|
310
|
+
create: async (options, file, fileName) => {
|
|
311
|
+
await this.requireAuth()
|
|
312
|
+
const payload = buildReportPayload({
|
|
313
|
+
menteeRegion: options.menteeRegion,
|
|
314
|
+
reportType: options.reportType,
|
|
315
|
+
progressDate: options.progressDate,
|
|
316
|
+
teamNames: options.teamNames,
|
|
317
|
+
venue: options.venue,
|
|
318
|
+
attendanceCount: options.attendanceCount,
|
|
319
|
+
attendanceNames: options.attendanceNames,
|
|
320
|
+
progressStartTime: options.progressStartTime,
|
|
321
|
+
progressEndTime: options.progressEndTime,
|
|
322
|
+
exceptStartTime: options.exceptStartTime,
|
|
323
|
+
exceptEndTime: options.exceptEndTime,
|
|
324
|
+
exceptReason: options.exceptReason,
|
|
325
|
+
subject: options.subject,
|
|
326
|
+
content: options.content,
|
|
327
|
+
mentorOpinion: options.mentorOpinion,
|
|
328
|
+
nonAttendanceNames: options.nonAttendanceNames,
|
|
329
|
+
etc: options.etc,
|
|
330
|
+
})
|
|
331
|
+
const formData = new FormData()
|
|
332
|
+
for (const [key, value] of Object.entries(payload)) {
|
|
333
|
+
formData.append(key, value)
|
|
334
|
+
}
|
|
335
|
+
const isBuffer = Buffer.isBuffer(file)
|
|
336
|
+
const fileBuffer = isBuffer ? file : await readFile(file)
|
|
337
|
+
const resolvedFileName = isBuffer ? (fileName ?? 'file') : (file.split('/').pop() ?? 'file')
|
|
338
|
+
const uint8Array = new Uint8Array(fileBuffer.buffer, fileBuffer.byteOffset, fileBuffer.byteLength)
|
|
339
|
+
formData.append('file_1_1', new Blob([uint8Array as unknown as ArrayBuffer]), resolvedFileName)
|
|
340
|
+
formData.append('fileFieldNm_1', 'file_1')
|
|
341
|
+
formData.append('atchFileId', '')
|
|
342
|
+
await this.http.postMultipart('/mypage/mentoringReport/insert.do', formData)
|
|
343
|
+
},
|
|
344
|
+
update: async (id, options, file, fileName) => {
|
|
345
|
+
await this.requireAuth()
|
|
346
|
+
const existing = await this.report.get(id)
|
|
347
|
+
const payload = buildReportPayload({
|
|
348
|
+
menteeRegion: options.menteeRegion ?? toRegionCode(existing.menteeRegion),
|
|
349
|
+
reportType: options.reportType ?? toReportTypeCd(existing.reportType),
|
|
350
|
+
progressDate: options.progressDate ?? existing.progressDate,
|
|
351
|
+
teamNames: options.teamNames ?? existing.teamNames,
|
|
352
|
+
venue: options.venue ?? existing.venue,
|
|
353
|
+
attendanceCount: options.attendanceCount ?? existing.attendanceCount,
|
|
354
|
+
attendanceNames: options.attendanceNames ?? existing.attendanceNames,
|
|
355
|
+
progressStartTime: options.progressStartTime ?? existing.progressStartTime,
|
|
356
|
+
progressEndTime: options.progressEndTime ?? existing.progressEndTime,
|
|
357
|
+
exceptStartTime: options.exceptStartTime ?? existing.exceptStartTime,
|
|
358
|
+
exceptEndTime: options.exceptEndTime ?? existing.exceptEndTime,
|
|
359
|
+
exceptReason: options.exceptReason ?? existing.exceptReason,
|
|
360
|
+
subject: options.subject ?? existing.subject,
|
|
361
|
+
content: options.content ?? existing.content,
|
|
362
|
+
mentorOpinion: options.mentorOpinion ?? existing.mentorOpinion,
|
|
363
|
+
nonAttendanceNames: options.nonAttendanceNames ?? existing.nonAttendanceNames,
|
|
364
|
+
etc: options.etc ?? existing.etc,
|
|
365
|
+
reportId: id,
|
|
366
|
+
})
|
|
367
|
+
const formData = new FormData()
|
|
368
|
+
for (const [key, value] of Object.entries(payload)) {
|
|
369
|
+
formData.append(key, value)
|
|
370
|
+
}
|
|
371
|
+
if (file) {
|
|
372
|
+
const isBuffer = Buffer.isBuffer(file)
|
|
373
|
+
const fileBuffer = isBuffer ? file : await readFile(file)
|
|
374
|
+
const resolvedFileName = isBuffer ? (fileName ?? 'file') : (file.split('/').pop() ?? 'file')
|
|
375
|
+
const uint8Array = new Uint8Array(fileBuffer.buffer, fileBuffer.byteOffset, fileBuffer.byteLength)
|
|
376
|
+
formData.append('file_1_1', new Blob([uint8Array as unknown as ArrayBuffer]), resolvedFileName)
|
|
377
|
+
formData.append('fileFieldNm_1', 'file_1')
|
|
378
|
+
formData.append('atchFileId', '')
|
|
379
|
+
}
|
|
380
|
+
await this.http.postMultipart('/mypage/mentoringReport/update.do', formData)
|
|
381
|
+
},
|
|
382
|
+
approval: async (options) => {
|
|
383
|
+
await this.requireAuth()
|
|
384
|
+
const params: Record<string, string> = {
|
|
385
|
+
menuNo: MENU_NO.REPORT_APPROVAL,
|
|
386
|
+
pageIndex: String(options?.page ?? 1),
|
|
387
|
+
}
|
|
388
|
+
if (options?.month) params.searchMonth = options.month
|
|
389
|
+
if (options?.reportType !== undefined) params.searchReport = options.reportType
|
|
390
|
+
const html = await this.http.get('/mypage/mentoringReport/resultList.do', params)
|
|
391
|
+
return {
|
|
392
|
+
items: formatters.parseApprovalList(html),
|
|
393
|
+
pagination: formatters.parsePagination(html),
|
|
394
|
+
}
|
|
395
|
+
},
|
|
396
|
+
}
|
|
397
|
+
|
|
247
398
|
this.team = {
|
|
248
399
|
show: async () => {
|
|
249
400
|
await this.requireAuth()
|
|
@@ -2,6 +2,8 @@ import { describe, expect, test } from 'bun:test'
|
|
|
2
2
|
|
|
3
3
|
import { inspectStoredAuthStatus, resolveExtractedCredentials } from './auth'
|
|
4
4
|
|
|
5
|
+
const noBrowserExtraction = async () => null
|
|
6
|
+
|
|
5
7
|
describe('resolveExtractedCredentials', () => {
|
|
6
8
|
test('returns the first candidate that validates successfully', async () => {
|
|
7
9
|
const calls: string[] = []
|
|
@@ -55,7 +57,7 @@ describe('resolveExtractedCredentials', () => {
|
|
|
55
57
|
})
|
|
56
58
|
|
|
57
59
|
describe('inspectStoredAuthStatus', () => {
|
|
58
|
-
test('clears stale credentials when
|
|
60
|
+
test('clears stale credentials when both recovery methods fail', async () => {
|
|
59
61
|
let removed = false
|
|
60
62
|
|
|
61
63
|
const status = await inspectStoredAuthStatus(
|
|
@@ -75,6 +77,8 @@ describe('inspectStoredAuthStatus', () => {
|
|
|
75
77
|
() => ({
|
|
76
78
|
checkLogin: async () => null,
|
|
77
79
|
}),
|
|
80
|
+
undefined,
|
|
81
|
+
noBrowserExtraction,
|
|
78
82
|
)
|
|
79
83
|
|
|
80
84
|
expect(status).toEqual({
|
|
@@ -121,6 +125,41 @@ describe('inspectStoredAuthStatus', () => {
|
|
|
121
125
|
expect(removed).toBe(false)
|
|
122
126
|
})
|
|
123
127
|
|
|
128
|
+
test('recovers via browser extraction when no stored password is available', async () => {
|
|
129
|
+
let savedCredentials: Record<string, unknown> | null = null
|
|
130
|
+
|
|
131
|
+
const status = await inspectStoredAuthStatus(
|
|
132
|
+
{
|
|
133
|
+
getCredentials: async () => ({
|
|
134
|
+
sessionCookie: 'stale-session',
|
|
135
|
+
csrfToken: 'stale-csrf',
|
|
136
|
+
}),
|
|
137
|
+
setCredentials: async (credentials: Record<string, unknown>) => {
|
|
138
|
+
savedCredentials = credentials
|
|
139
|
+
},
|
|
140
|
+
remove: async () => {
|
|
141
|
+
throw new Error('should not remove when browser extraction succeeds')
|
|
142
|
+
},
|
|
143
|
+
},
|
|
144
|
+
() => ({
|
|
145
|
+
checkLogin: async () => null,
|
|
146
|
+
}),
|
|
147
|
+
undefined,
|
|
148
|
+
async () => ({ sessionCookie: 'browser-session', csrfToken: 'browser-csrf' }),
|
|
149
|
+
)
|
|
150
|
+
|
|
151
|
+
expect(status).toMatchObject({
|
|
152
|
+
authenticated: true,
|
|
153
|
+
valid: true,
|
|
154
|
+
username: null,
|
|
155
|
+
})
|
|
156
|
+
expect(savedCredentials).toMatchObject({
|
|
157
|
+
sessionCookie: 'browser-session',
|
|
158
|
+
csrfToken: 'browser-csrf',
|
|
159
|
+
})
|
|
160
|
+
expect(savedCredentials).toHaveProperty('loggedInAt')
|
|
161
|
+
})
|
|
162
|
+
|
|
124
163
|
test('refreshes the session automatically when encrypted login credentials are available', async () => {
|
|
125
164
|
let savedCredentials: Record<string, string> | null = null
|
|
126
165
|
|