@funmary/client 0.0.0-reserved → 1.0.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.
@@ -0,0 +1,3251 @@
1
+ //#region src/generated/api.d.ts
2
+ interface paths {
3
+ "/api/v1/lessons": {
4
+ parameters: {
5
+ query?: never;
6
+ header?: never;
7
+ path?: never;
8
+ cookie?: never;
9
+ };
10
+ /** @description 日付の範囲の授業を返す */
11
+ get: operations["getApiV1Lessons"];
12
+ put?: never;
13
+ post?: never;
14
+ delete?: never;
15
+ options?: never;
16
+ head?: never;
17
+ patch?: never;
18
+ trace?: never;
19
+ };
20
+ "/api/v1/lessons/next": {
21
+ parameters: {
22
+ query?: never;
23
+ header?: never;
24
+ path?: never;
25
+ cookie?: never;
26
+ };
27
+ /** @description 次の授業を返す。授業中ならその授業 (inProgress が true)。休講の授業は飛ばし、14 日先まで見て、なければ next が null */
28
+ get: operations["getApiV1LessonsNext"];
29
+ put?: never;
30
+ post?: never;
31
+ delete?: never;
32
+ options?: never;
33
+ head?: never;
34
+ patch?: never;
35
+ trace?: never;
36
+ };
37
+ "/api/v1/timetable": {
38
+ parameters: {
39
+ query?: never;
40
+ header?: never;
41
+ path?: never;
42
+ cookie?: never;
43
+ };
44
+ /** @description 日付の範囲の授業 (時刻つき) と、授業の日に関わる事情 (振替授業日、全学の休講日、祝日) を返す */
45
+ get: operations["getApiV1Timetable"];
46
+ put?: never;
47
+ post?: never;
48
+ delete?: never;
49
+ options?: never;
50
+ head?: never;
51
+ patch?: never;
52
+ trace?: never;
53
+ };
54
+ "/api/v1/timetable/week": {
55
+ parameters: {
56
+ query?: never;
57
+ header?: never;
58
+ path?: never;
59
+ cookie?: never;
60
+ };
61
+ /** @description date (省けば今日) を含む週 (月曜から日曜) の、曜日と時限の格子。画面の週の時間割と同じ並びで、クライアントでの整形が要らない。授業のない時限も cells に入る (lessons が空) */
62
+ get: operations["getApiV1TimetableWeek"];
63
+ put?: never;
64
+ post?: never;
65
+ delete?: never;
66
+ options?: never;
67
+ head?: never;
68
+ patch?: never;
69
+ trace?: never;
70
+ };
71
+ "/api/v1/periods": {
72
+ parameters: {
73
+ query?: never;
74
+ header?: never;
75
+ path?: never;
76
+ cookie?: never;
77
+ };
78
+ /** @description 時限ごとの開始と終了の時刻 (日本時間) */
79
+ get: operations["getApiV1Periods"];
80
+ put?: never;
81
+ post?: never;
82
+ delete?: never;
83
+ options?: never;
84
+ head?: never;
85
+ patch?: never;
86
+ trace?: never;
87
+ };
88
+ "/api/v1/courses": {
89
+ parameters: {
90
+ query?: never;
91
+ header?: never;
92
+ path?: never;
93
+ cookie?: never;
94
+ };
95
+ /** @description 履修登録した科目と、その曜日と時限 */
96
+ get: operations["getApiV1Courses"];
97
+ put?: never;
98
+ /** @description 履修登録する。科目は、年度とシラバスの番号か、名前で指す (名前が複数の科目に当たったら、登録せず、409 で候補を返す)。登録済みなら、何も変えずに今の状態を返す。書き込みは、1 分あたり 20 回まで */
99
+ post: operations["postApiV1Courses"];
100
+ delete?: never;
101
+ options?: never;
102
+ head?: never;
103
+ patch?: never;
104
+ trace?: never;
105
+ };
106
+ "/api/v1/academic-calendar": {
107
+ parameters: {
108
+ query?: never;
109
+ header?: never;
110
+ path?: never;
111
+ cookie?: never;
112
+ };
113
+ /** @description 年度の学期の期間と、その年度の祝日、全学の休講日、振替授業日 (year を省けば今日が属する年度) */
114
+ get: operations["getApiV1AcademicCalendar"];
115
+ put?: never;
116
+ post?: never;
117
+ delete?: never;
118
+ options?: never;
119
+ head?: never;
120
+ patch?: never;
121
+ trace?: never;
122
+ };
123
+ "/api/v1/changes": {
124
+ parameters: {
125
+ query?: never;
126
+ header?: never;
127
+ path?: never;
128
+ cookie?: never;
129
+ };
130
+ /** @description 日付の範囲の休講、補講、教室変更を返す */
131
+ get: operations["getApiV1Changes"];
132
+ put?: never;
133
+ post?: never;
134
+ delete?: never;
135
+ options?: never;
136
+ head?: never;
137
+ patch?: never;
138
+ trace?: never;
139
+ };
140
+ "/api/v1/subjects/{year}/{syllabusId}": {
141
+ parameters: {
142
+ query?: never;
143
+ header?: never;
144
+ path?: never;
145
+ cookie?: never;
146
+ };
147
+ /** @description 授業の詳細を返す */
148
+ get: operations["getApiV1SubjectsByYearBySyllabusId"];
149
+ put?: never;
150
+ post?: never;
151
+ delete?: never;
152
+ options?: never;
153
+ head?: never;
154
+ patch?: never;
155
+ trace?: never;
156
+ };
157
+ "/api/v1/events": {
158
+ parameters: {
159
+ query?: never;
160
+ header?: never;
161
+ path?: never;
162
+ cookie?: never;
163
+ };
164
+ /** @description 日付の範囲の、自分の予定と、時間割に加えたほかの人の予定 (繰り返しは回ごとに展開する) */
165
+ get: operations["getApiV1Events"];
166
+ put?: never;
167
+ /** @description 自分の予定を足す。公開範囲は決められず、常に非公開で足す。書き込みは、1 分あたり 20 回まで */
168
+ post: operations["postApiV1Events"];
169
+ delete?: never;
170
+ options?: never;
171
+ head?: never;
172
+ patch?: never;
173
+ trace?: never;
174
+ };
175
+ "/api/v1/events/{id}": {
176
+ parameters: {
177
+ query?: never;
178
+ header?: never;
179
+ path?: never;
180
+ cookie?: never;
181
+ };
182
+ /** @description 自分の予定を 1 件、足すときと同じ形で返す。直すときは、この形から id を除いて送り直す */
183
+ get: operations["getApiV1EventsById"];
184
+ /** @description 自分の予定を、送った内容に置き換える (送らなかった項目は、空になる)。公開範囲は変わらない */
185
+ put: operations["putApiV1EventsById"];
186
+ post?: never;
187
+ /** @description 自分の予定を消す。元には戻せない */
188
+ delete: operations["deleteApiV1EventsById"];
189
+ options?: never;
190
+ head?: never;
191
+ patch?: never;
192
+ trace?: never;
193
+ };
194
+ "/api/v1/status": {
195
+ parameters: {
196
+ query?: never;
197
+ header?: never;
198
+ path?: never;
199
+ cookie?: never;
200
+ };
201
+ /** @description 休講や教室の変更のデータが新しいか。古いときは、反映が遅れているかもしれない */
202
+ get: operations["getApiV1Status"];
203
+ put?: never;
204
+ post?: never;
205
+ delete?: never;
206
+ options?: never;
207
+ head?: never;
208
+ patch?: never;
209
+ trace?: never;
210
+ };
211
+ "/api/v1/subjects": {
212
+ parameters: {
213
+ query?: never;
214
+ header?: never;
215
+ path?: never;
216
+ cookie?: never;
217
+ };
218
+ /** @description 年度 (省けば今年度) の科目を、名前、教員、授業コードで探す。公開の科目だけを、50 件まで返す */
219
+ get: operations["getApiV1Subjects"];
220
+ put?: never;
221
+ post?: never;
222
+ delete?: never;
223
+ options?: never;
224
+ head?: never;
225
+ patch?: never;
226
+ trace?: never;
227
+ };
228
+ "/api/v1/subjects/{year}/{syllabusId}/sessions": {
229
+ parameters: {
230
+ query?: never;
231
+ header?: never;
232
+ path?: never;
233
+ cookie?: never;
234
+ };
235
+ /** @description 科目のその年度の全授業日 (時刻、教室、休講、補講、教室変更を反映)。sequence は休講を除いた通し番号 */
236
+ get: operations["getApiV1SubjectsByYearBySyllabusIdSessions"];
237
+ put?: never;
238
+ post?: never;
239
+ delete?: never;
240
+ options?: never;
241
+ head?: never;
242
+ patch?: never;
243
+ trace?: never;
244
+ };
245
+ "/api/v1/bus/stops": {
246
+ parameters: {
247
+ query?: never;
248
+ header?: never;
249
+ path?: never;
250
+ cookie?: never;
251
+ };
252
+ /** @description バスの停留所と、時刻表の版の一覧。バスの機能を使わない設定のサーバーでは 404。取り込む前は stops が空 */
253
+ get: operations["getApiV1BusStops"];
254
+ put?: never;
255
+ post?: never;
256
+ delete?: never;
257
+ options?: never;
258
+ head?: never;
259
+ patch?: never;
260
+ trace?: never;
261
+ };
262
+ "/api/v1/bus/stops/{stopId}": {
263
+ parameters: {
264
+ query?: never;
265
+ header?: never;
266
+ path?: never;
267
+ cookie?: never;
268
+ };
269
+ /** @description 1 つの停留所の発車表。generation (8 桁の版のコード) を省くと、今日に有効な版。取り込んでいなければ 404 */
270
+ get: operations["getApiV1BusStopsByStopId"];
271
+ put?: never;
272
+ post?: never;
273
+ delete?: never;
274
+ options?: never;
275
+ head?: never;
276
+ patch?: never;
277
+ trace?: never;
278
+ };
279
+ "/api/v1/bus/next": {
280
+ parameters: {
281
+ query?: never;
282
+ header?: never;
283
+ path?: never;
284
+ cookie?: never;
285
+ };
286
+ /** @description 今から先のバスの発車。stopId を省くと、強調する停留所 (未来大、亀田支所前)。limit は停留所ごとの件数で、既定は 3 */
287
+ get: operations["getApiV1BusNext"];
288
+ put?: never;
289
+ post?: never;
290
+ delete?: never;
291
+ options?: never;
292
+ head?: never;
293
+ patch?: never;
294
+ trace?: never;
295
+ };
296
+ "/api/v1/bus/legs": {
297
+ parameters: {
298
+ query?: never;
299
+ header?: never;
300
+ path?: never;
301
+ cookie?: never;
302
+ };
303
+ /** @description 「A から未来大へ」「未来大から A へ」の発車。stopId は、未来大を通る任意の停留所 A。direction は toUniversity (A から未来大) か fromUniversity (未来大から A)。向きは、時刻表の経由と行き先の文字から決めるので、経由に書かれない停留所を通る便は、出ないことがある。day を省くと今日の区分 */
304
+ get: operations["getApiV1BusLegs"];
305
+ put?: never;
306
+ post?: never;
307
+ delete?: never;
308
+ options?: never;
309
+ head?: never;
310
+ patch?: never;
311
+ trace?: never;
312
+ };
313
+ "/api/v1/courses/{year}/{syllabusId}": {
314
+ parameters: {
315
+ query?: never;
316
+ header?: never;
317
+ path?: never;
318
+ cookie?: never;
319
+ };
320
+ get?: never;
321
+ put?: never;
322
+ post?: never;
323
+ /** @description 履修登録を取り消す。自分だけの曜日と時限と略称は残るので、登録し直せば元に戻る */
324
+ delete: operations["deleteApiV1CoursesByYearBySyllabusId"];
325
+ options?: never;
326
+ head?: never;
327
+ patch?: never;
328
+ trace?: never;
329
+ };
330
+ "/api/v1/courses/{year}/{syllabusId}/personal-slots": {
331
+ parameters: {
332
+ query?: never;
333
+ header?: never;
334
+ path?: never;
335
+ cookie?: never;
336
+ };
337
+ get?: never;
338
+ /** @description 自分だけに使う曜日と時限を足す (同じ曜日と時限があれば、教室を上書きする)。ほかの利用者の時間割には効かない。履修登録した科目だけ。共有の枠は、ここからは書き込めない */
339
+ put: operations["putApiV1CoursesByYearBySyllabusIdPersonalSlots"];
340
+ post?: never;
341
+ delete?: never;
342
+ options?: never;
343
+ head?: never;
344
+ patch?: never;
345
+ trace?: never;
346
+ };
347
+ "/api/v1/courses/{year}/{syllabusId}/personal-slots/{weekday}/{period}": {
348
+ parameters: {
349
+ query?: never;
350
+ header?: never;
351
+ path?: never;
352
+ cookie?: never;
353
+ };
354
+ get?: never;
355
+ put?: never;
356
+ post?: never;
357
+ /** @description 自分だけの曜日と時限を消す */
358
+ delete: operations["deleteApiV1CoursesByYearBySyllabusIdPersonalSlotsByWeekdayByPeriod"];
359
+ options?: never;
360
+ head?: never;
361
+ patch?: never;
362
+ trace?: never;
363
+ };
364
+ "/api/v1/courses/{year}/{syllabusId}/abbreviation": {
365
+ parameters: {
366
+ query?: never;
367
+ header?: never;
368
+ path?: never;
369
+ cookie?: never;
370
+ };
371
+ get?: never;
372
+ /** @description 時間割のセルに出す、自分だけの略称を保存する。空にすると、正式名称を使う指定になる */
373
+ put: operations["putApiV1CoursesByYearBySyllabusIdAbbreviation"];
374
+ post?: never;
375
+ delete?: never;
376
+ options?: never;
377
+ head?: never;
378
+ patch?: never;
379
+ trace?: never;
380
+ };
381
+ "/api/v1/notifications": {
382
+ parameters: {
383
+ query?: never;
384
+ header?: never;
385
+ path?: never;
386
+ cookie?: never;
387
+ };
388
+ /** @description 通知欄を返す */
389
+ get: operations["getApiV1Notifications"];
390
+ put?: never;
391
+ post?: never;
392
+ delete?: never;
393
+ options?: never;
394
+ head?: never;
395
+ patch?: never;
396
+ trace?: never;
397
+ };
398
+ "/api/v1/notifications/read": {
399
+ parameters: {
400
+ query?: never;
401
+ header?: never;
402
+ path?: never;
403
+ cookie?: never;
404
+ };
405
+ get?: never;
406
+ put?: never;
407
+ /** @description 未読の通知をすべて既読にし、既読にした件数を返す */
408
+ post: operations["postApiV1NotificationsRead"];
409
+ delete?: never;
410
+ options?: never;
411
+ head?: never;
412
+ patch?: never;
413
+ trace?: never;
414
+ };
415
+ "/api/v1/notifications/{id}/read": {
416
+ parameters: {
417
+ query?: never;
418
+ header?: never;
419
+ path?: never;
420
+ cookie?: never;
421
+ };
422
+ get?: never;
423
+ put?: never;
424
+ /** @description 通知を 1 件、既読にして返す */
425
+ post: operations["postApiV1NotificationsByIdRead"];
426
+ delete?: never;
427
+ options?: never;
428
+ head?: never;
429
+ patch?: never;
430
+ trace?: never;
431
+ };
432
+ "/api/v1/me": {
433
+ parameters: {
434
+ query?: never;
435
+ header?: never;
436
+ path?: never;
437
+ cookie?: never;
438
+ };
439
+ /** @description トークンの持ち主の情報と、トークンに許された範囲を返す */
440
+ get: operations["getApiV1Me"];
441
+ put?: never;
442
+ post?: never;
443
+ delete?: never;
444
+ options?: never;
445
+ head?: never;
446
+ patch?: never;
447
+ trace?: never;
448
+ };
449
+ }
450
+ interface components {
451
+ schemas: never;
452
+ responses: never;
453
+ parameters: never;
454
+ requestBodies: never;
455
+ headers: never;
456
+ pathItems: never;
457
+ }
458
+ interface operations {
459
+ getApiV1Lessons: {
460
+ parameters: {
461
+ query: {
462
+ start: string;
463
+ end: string;
464
+ };
465
+ header?: never;
466
+ path?: never;
467
+ cookie?: never;
468
+ };
469
+ requestBody?: never;
470
+ responses: {
471
+ /** @description OK */
472
+ 200: {
473
+ headers: {
474
+ [name: string]: unknown;
475
+ };
476
+ content: {
477
+ "application/json": {
478
+ /** @description YYYY-MM-DD (日本時間) */
479
+ date: string;
480
+ /** @description 時限の番号。時刻は start と end */
481
+ period: number;
482
+ /** @description HH:MM (日本時間)。時限の時刻が不明なら null */
483
+ start: string | null;
484
+ end: string | null;
485
+ subjectId: number;
486
+ subjectName: string;
487
+ academicYear: number;
488
+ syllabusId: string;
489
+ /** @description 教室。分からなければ null */
490
+ room: string | null;
491
+ /** @description 補講の教室が分からず、ふだんの教室を仮に出しているとき true */
492
+ roomIsTentative: boolean;
493
+ /** @description 休講、補講、教室変更の詳細。変更がなければ null */
494
+ change: {
495
+ comment: string | null;
496
+ /** @description 教室変更の移動元の教室 */
497
+ fromRoom: string | null;
498
+ /** @description 休講コメントにある補講の予定 (あり、なし、未定) */
499
+ makeupPlan: ("planned" | "none" | "undecided") | null;
500
+ } | null;
501
+ /**
502
+ * @description normal: 変更なし、cancelled: 休講、makeup: 補講、roomChanged: 教室変更
503
+ * @enum {string}
504
+ */
505
+ status: "normal" | "cancelled" | "makeup" | "roomChanged";
506
+ }[];
507
+ };
508
+ };
509
+ /** @description Validation Error */
510
+ 400: {
511
+ headers: {
512
+ [name: string]: unknown;
513
+ };
514
+ content: {
515
+ "application/json": {
516
+ /** @enum {boolean} */
517
+ success: false;
518
+ error: unknown[];
519
+ data: unknown;
520
+ };
521
+ };
522
+ };
523
+ };
524
+ };
525
+ getApiV1LessonsNext: {
526
+ parameters: {
527
+ query?: never;
528
+ header?: never;
529
+ path?: never;
530
+ cookie?: never;
531
+ };
532
+ requestBody?: never;
533
+ responses: {
534
+ /** @description OK */
535
+ 200: {
536
+ headers: {
537
+ [name: string]: unknown;
538
+ };
539
+ content: {
540
+ "application/json": {
541
+ next: {
542
+ /** @description YYYY-MM-DD (日本時間) */
543
+ date: string;
544
+ /** @description 時限の番号。時刻は start と end */
545
+ period: number;
546
+ /** @description HH:MM (日本時間)。時限の時刻が不明なら null */
547
+ start: string | null;
548
+ end: string | null;
549
+ subjectId: number;
550
+ subjectName: string;
551
+ academicYear: number;
552
+ syllabusId: string;
553
+ /** @description 教室。分からなければ null */
554
+ room: string | null;
555
+ /** @description 補講の教室が分からず、ふだんの教室を仮に出しているとき true */
556
+ roomIsTentative: boolean;
557
+ /** @description 休講、補講、教室変更の詳細。変更がなければ null */
558
+ change: {
559
+ comment: string | null;
560
+ /** @description 教室変更の移動元の教室 */
561
+ fromRoom: string | null;
562
+ /** @description 休講コメントにある補講の予定 (あり、なし、未定) */
563
+ makeupPlan: ("planned" | "none" | "undecided") | null;
564
+ } | null;
565
+ /**
566
+ * @description normal: 変更なし、cancelled: 休講、makeup: 補講、roomChanged: 教室変更
567
+ * @enum {string}
568
+ */
569
+ status: "normal" | "cancelled" | "makeup" | "roomChanged";
570
+ inProgress: boolean;
571
+ } | null;
572
+ };
573
+ };
574
+ };
575
+ };
576
+ };
577
+ getApiV1Timetable: {
578
+ parameters: {
579
+ query: {
580
+ start: string;
581
+ end: string;
582
+ };
583
+ header?: never;
584
+ path?: never;
585
+ cookie?: never;
586
+ };
587
+ requestBody?: never;
588
+ responses: {
589
+ /** @description OK */
590
+ 200: {
591
+ headers: {
592
+ [name: string]: unknown;
593
+ };
594
+ content: {
595
+ "application/json": {
596
+ lessons: {
597
+ /** @description YYYY-MM-DD (日本時間) */
598
+ date: string;
599
+ /** @description 時限の番号。時刻は start と end */
600
+ period: number;
601
+ /** @description HH:MM (日本時間)。時限の時刻が不明なら null */
602
+ start: string | null;
603
+ end: string | null;
604
+ subjectId: number;
605
+ subjectName: string;
606
+ academicYear: number;
607
+ syllabusId: string;
608
+ /** @description 教室。分からなければ null */
609
+ room: string | null;
610
+ /** @description 補講の教室が分からず、ふだんの教室を仮に出しているとき true */
611
+ roomIsTentative: boolean;
612
+ /** @description 休講、補講、教室変更の詳細。変更がなければ null */
613
+ change: {
614
+ comment: string | null;
615
+ /** @description 教室変更の移動元の教室 */
616
+ fromRoom: string | null;
617
+ /** @description 休講コメントにある補講の予定 (あり、なし、未定) */
618
+ makeupPlan: ("planned" | "none" | "undecided") | null;
619
+ } | null;
620
+ /**
621
+ * @description normal: 変更なし、cancelled: 休講、makeup: 補講、roomChanged: 教室変更
622
+ * @enum {string}
623
+ */
624
+ status: "normal" | "cancelled" | "makeup" | "roomChanged";
625
+ }[];
626
+ /** @description 授業の日の置き換え (振替授業日)、全学の休講日、祝日 */
627
+ days: ({
628
+ date: string;
629
+ /** @constant */
630
+ kind: "substitute";
631
+ /** @description この日に行う授業の曜日。1 (月) から 7 (日) */
632
+ weekday: number;
633
+ } | {
634
+ date: string;
635
+ /** @constant */
636
+ kind: "noClass";
637
+ label: string | null;
638
+ } | {
639
+ date: string;
640
+ /** @constant */
641
+ kind: "holiday";
642
+ name: string;
643
+ })[];
644
+ /** @description 学期の期間に、規則で推定した値を使った */
645
+ usesEstimatedTerms: boolean;
646
+ };
647
+ };
648
+ };
649
+ /** @description Validation Error */
650
+ 400: {
651
+ headers: {
652
+ [name: string]: unknown;
653
+ };
654
+ content: {
655
+ "application/json": {
656
+ /** @enum {boolean} */
657
+ success: false;
658
+ error: unknown[];
659
+ data: unknown;
660
+ };
661
+ };
662
+ };
663
+ };
664
+ };
665
+ getApiV1TimetableWeek: {
666
+ parameters: {
667
+ query?: {
668
+ date?: string;
669
+ };
670
+ header?: never;
671
+ path?: never;
672
+ cookie?: never;
673
+ };
674
+ requestBody?: never;
675
+ responses: {
676
+ /** @description OK */
677
+ 200: {
678
+ headers: {
679
+ [name: string]: unknown;
680
+ };
681
+ content: {
682
+ "application/json": {
683
+ /** @description その週の月曜の日付 (YYYY-MM-DD) */
684
+ weekStart: string;
685
+ periods: {
686
+ number: number;
687
+ start: string;
688
+ end: string;
689
+ }[];
690
+ /** @description 月曜から日曜の 7 日 */
691
+ days: {
692
+ date: string;
693
+ /** @description 1 (月) から 7 (日) */
694
+ weekday: number;
695
+ /** @description 振替授業日、全学の休講日、祝日。なければ null */
696
+ note: ({
697
+ date: string;
698
+ /** @constant */
699
+ kind: "substitute";
700
+ /** @description この日に行う授業の曜日。1 (月) から 7 (日) */
701
+ weekday: number;
702
+ } | {
703
+ date: string;
704
+ /** @constant */
705
+ kind: "noClass";
706
+ label: string | null;
707
+ } | {
708
+ date: string;
709
+ /** @constant */
710
+ kind: "holiday";
711
+ name: string;
712
+ }) | null;
713
+ /** @description 時限の順。授業のない時限も入り、lessons が空になる */
714
+ cells: {
715
+ period: number;
716
+ lessons: {
717
+ /** @description YYYY-MM-DD (日本時間) */
718
+ date: string;
719
+ /** @description 時限の番号。時刻は start と end */
720
+ period: number;
721
+ /** @description HH:MM (日本時間)。時限の時刻が不明なら null */
722
+ start: string | null;
723
+ end: string | null;
724
+ subjectId: number;
725
+ subjectName: string;
726
+ academicYear: number;
727
+ syllabusId: string;
728
+ /** @description 教室。分からなければ null */
729
+ room: string | null;
730
+ /** @description 補講の教室が分からず、ふだんの教室を仮に出しているとき true */
731
+ roomIsTentative: boolean;
732
+ /** @description 休講、補講、教室変更の詳細。変更がなければ null */
733
+ change: {
734
+ comment: string | null;
735
+ /** @description 教室変更の移動元の教室 */
736
+ fromRoom: string | null;
737
+ /** @description 休講コメントにある補講の予定 (あり、なし、未定) */
738
+ makeupPlan: ("planned" | "none" | "undecided") | null;
739
+ } | null;
740
+ /**
741
+ * @description normal: 変更なし、cancelled: 休講、makeup: 補講、roomChanged: 教室変更
742
+ * @enum {string}
743
+ */
744
+ status: "normal" | "cancelled" | "makeup" | "roomChanged";
745
+ }[];
746
+ }[];
747
+ }[];
748
+ usesEstimatedTerms: boolean;
749
+ };
750
+ };
751
+ };
752
+ /** @description Validation Error */
753
+ 400: {
754
+ headers: {
755
+ [name: string]: unknown;
756
+ };
757
+ content: {
758
+ "application/json": {
759
+ /** @enum {boolean} */
760
+ success: false;
761
+ error: unknown[];
762
+ data: unknown;
763
+ };
764
+ };
765
+ };
766
+ };
767
+ };
768
+ getApiV1Periods: {
769
+ parameters: {
770
+ query?: never;
771
+ header?: never;
772
+ path?: never;
773
+ cookie?: never;
774
+ };
775
+ requestBody?: never;
776
+ responses: {
777
+ /** @description OK */
778
+ 200: {
779
+ headers: {
780
+ [name: string]: unknown;
781
+ };
782
+ content: {
783
+ "application/json": {
784
+ number: number;
785
+ /** @description HH:MM (日本時間) */
786
+ start: string;
787
+ end: string;
788
+ }[];
789
+ };
790
+ };
791
+ };
792
+ };
793
+ getApiV1Courses: {
794
+ parameters: {
795
+ query?: never;
796
+ header?: never;
797
+ path?: never;
798
+ cookie?: never;
799
+ };
800
+ requestBody?: never;
801
+ responses: {
802
+ /** @description OK */
803
+ 200: {
804
+ headers: {
805
+ [name: string]: unknown;
806
+ };
807
+ content: {
808
+ "application/json": {
809
+ subjectId: number;
810
+ academicYear: number;
811
+ syllabusId: string;
812
+ name: string;
813
+ teacher: string | null;
814
+ credits: number | null;
815
+ term: string;
816
+ slots: {
817
+ /** @description 1 (月) から 7 (日) */
818
+ weekday: number;
819
+ period: number;
820
+ room: string | null;
821
+ }[];
822
+ }[];
823
+ };
824
+ };
825
+ };
826
+ };
827
+ postApiV1Courses: {
828
+ parameters: {
829
+ query?: never;
830
+ header?: never;
831
+ path?: never;
832
+ cookie?: never;
833
+ };
834
+ requestBody: {
835
+ content: {
836
+ "application/json": {
837
+ academicYear: number;
838
+ syllabusId: string;
839
+ } | {
840
+ name: string;
841
+ academicYear?: number;
842
+ };
843
+ };
844
+ };
845
+ responses: {
846
+ /** @description 登録後の状態 */
847
+ 200: {
848
+ headers: {
849
+ [name: string]: unknown;
850
+ };
851
+ content: {
852
+ "application/json": {
853
+ subject: {
854
+ academicYear: number;
855
+ syllabusId: string;
856
+ name: string;
857
+ teacher: string | null;
858
+ credits: number | null;
859
+ term: string;
860
+ };
861
+ registered: boolean;
862
+ personalSlots: {
863
+ weekday: number;
864
+ period: number;
865
+ room: string | null;
866
+ }[];
867
+ /** @description 保存した略称。保存していなければ null、正式名称に戻す指定なら空文字 */
868
+ abbreviation: string | null;
869
+ };
870
+ };
871
+ };
872
+ /** @description Validation Error */
873
+ 400: {
874
+ headers: {
875
+ [name: string]: unknown;
876
+ };
877
+ content: {
878
+ "application/json": {
879
+ /** @enum {boolean} */
880
+ success: false;
881
+ error: unknown[];
882
+ data: unknown;
883
+ };
884
+ };
885
+ };
886
+ /** @description 科目が見つからない (ほかの人の非公開の科目も、見つからないことにする) */
887
+ 404: {
888
+ headers: {
889
+ [name: string]: unknown;
890
+ };
891
+ content?: never;
892
+ };
893
+ /** @description 名前が複数の科目に当たった (candidates に候補が入る) */
894
+ 409: {
895
+ headers: {
896
+ [name: string]: unknown;
897
+ };
898
+ content?: never;
899
+ };
900
+ };
901
+ };
902
+ getApiV1AcademicCalendar: {
903
+ parameters: {
904
+ query?: {
905
+ year?: number;
906
+ };
907
+ header?: never;
908
+ path?: never;
909
+ cookie?: never;
910
+ };
911
+ requestBody?: never;
912
+ responses: {
913
+ /** @description OK */
914
+ 200: {
915
+ headers: {
916
+ [name: string]: unknown;
917
+ };
918
+ content: {
919
+ "application/json": {
920
+ academicYear: number;
921
+ terms: {
922
+ term: string;
923
+ start: string;
924
+ end: string;
925
+ /** @description manual、auto、estimated */
926
+ source: string;
927
+ }[];
928
+ days: ({
929
+ date: string;
930
+ /** @constant */
931
+ kind: "substitute";
932
+ /** @description この日に行う授業の曜日。1 (月) から 7 (日) */
933
+ weekday: number;
934
+ } | {
935
+ date: string;
936
+ /** @constant */
937
+ kind: "noClass";
938
+ label: string | null;
939
+ } | {
940
+ date: string;
941
+ /** @constant */
942
+ kind: "holiday";
943
+ name: string;
944
+ })[];
945
+ };
946
+ };
947
+ };
948
+ /** @description Validation Error */
949
+ 400: {
950
+ headers: {
951
+ [name: string]: unknown;
952
+ };
953
+ content: {
954
+ "application/json": {
955
+ /** @enum {boolean} */
956
+ success: false;
957
+ error: unknown[];
958
+ data: unknown;
959
+ };
960
+ };
961
+ };
962
+ };
963
+ };
964
+ getApiV1Changes: {
965
+ parameters: {
966
+ query: {
967
+ start: string;
968
+ end: string;
969
+ };
970
+ header?: never;
971
+ path?: never;
972
+ cookie?: never;
973
+ };
974
+ requestBody?: never;
975
+ responses: {
976
+ /** @description OK */
977
+ 200: {
978
+ headers: {
979
+ [name: string]: unknown;
980
+ };
981
+ content: {
982
+ "application/json": {
983
+ /** @description YYYY-MM-DD (日本時間) */
984
+ date: string;
985
+ /** @description 時限の番号。時刻は start と end */
986
+ period: number;
987
+ /** @description HH:MM (日本時間)。時限の時刻が不明なら null */
988
+ start: string | null;
989
+ end: string | null;
990
+ subjectId: number;
991
+ subjectName: string;
992
+ academicYear: number;
993
+ syllabusId: string;
994
+ /** @description 教室。分からなければ null */
995
+ room: string | null;
996
+ /** @description 補講の教室が分からず、ふだんの教室を仮に出しているとき true */
997
+ roomIsTentative: boolean;
998
+ /** @description 休講、補講、教室変更の詳細。変更がなければ null */
999
+ change: {
1000
+ comment: string | null;
1001
+ /** @description 教室変更の移動元の教室 */
1002
+ fromRoom: string | null;
1003
+ /** @description 休講コメントにある補講の予定 (あり、なし、未定) */
1004
+ makeupPlan: ("planned" | "none" | "undecided") | null;
1005
+ } | null;
1006
+ /**
1007
+ * @description normal: 変更なし、cancelled: 休講、makeup: 補講、roomChanged: 教室変更
1008
+ * @enum {string}
1009
+ */
1010
+ status: "normal" | "cancelled" | "makeup" | "roomChanged";
1011
+ }[];
1012
+ };
1013
+ };
1014
+ /** @description Validation Error */
1015
+ 400: {
1016
+ headers: {
1017
+ [name: string]: unknown;
1018
+ };
1019
+ content: {
1020
+ "application/json": {
1021
+ /** @enum {boolean} */
1022
+ success: false;
1023
+ error: unknown[];
1024
+ data: unknown;
1025
+ };
1026
+ };
1027
+ };
1028
+ };
1029
+ };
1030
+ getApiV1SubjectsByYearBySyllabusId: {
1031
+ parameters: {
1032
+ query?: never;
1033
+ header?: never;
1034
+ path: {
1035
+ year: number;
1036
+ syllabusId: string;
1037
+ };
1038
+ cookie?: never;
1039
+ };
1040
+ requestBody?: never;
1041
+ responses: {
1042
+ /** @description OK */
1043
+ 200: {
1044
+ headers: {
1045
+ [name: string]: unknown;
1046
+ };
1047
+ content: {
1048
+ "application/json": {
1049
+ subject: {
1050
+ id: number;
1051
+ academicYear: number;
1052
+ syllabusId: string;
1053
+ name: string;
1054
+ teacher: string | null;
1055
+ credits: number | null;
1056
+ term: string;
1057
+ /** @description 配当年次などの項目 */
1058
+ attributes: {
1059
+ [key: string]: string;
1060
+ };
1061
+ /** @description シラバスの内容 (授業の概要、到達目標など) */
1062
+ syllabus: {
1063
+ [key: string]: string;
1064
+ };
1065
+ syllabusUrl: string | null;
1066
+ updatedAt: string;
1067
+ /** @enum {string} */
1068
+ source: "syllabus" | "user";
1069
+ createdBy: string | null;
1070
+ /** @enum {string} */
1071
+ visibility: "public" | "link" | "private";
1072
+ };
1073
+ /** @description 休講、補講、教室変更の履歴 (新しい順) */
1074
+ changes: {
1075
+ /** @enum {string} */
1076
+ kind: "cancellation" | "makeup" | "roomChange";
1077
+ date: string;
1078
+ period: number;
1079
+ room: string | null;
1080
+ fromRoom: string | null;
1081
+ comment: string | null;
1082
+ makeupPlan: ("planned" | "none" | "undecided") | null;
1083
+ withdrawn: boolean;
1084
+ }[];
1085
+ };
1086
+ };
1087
+ };
1088
+ /** @description Validation Error */
1089
+ 400: {
1090
+ headers: {
1091
+ [name: string]: unknown;
1092
+ };
1093
+ content: {
1094
+ "application/json": {
1095
+ /** @enum {boolean} */
1096
+ success: false;
1097
+ error: unknown[];
1098
+ data: unknown;
1099
+ };
1100
+ };
1101
+ };
1102
+ /** @description 科目がない、または見られない */
1103
+ 404: {
1104
+ headers: {
1105
+ [name: string]: unknown;
1106
+ };
1107
+ content?: never;
1108
+ };
1109
+ };
1110
+ };
1111
+ getApiV1Events: {
1112
+ parameters: {
1113
+ query: {
1114
+ start: string;
1115
+ end: string;
1116
+ };
1117
+ header?: never;
1118
+ path?: never;
1119
+ cookie?: never;
1120
+ };
1121
+ requestBody?: never;
1122
+ responses: {
1123
+ /** @description OK */
1124
+ 200: {
1125
+ headers: {
1126
+ [name: string]: unknown;
1127
+ };
1128
+ content: {
1129
+ "application/json": {
1130
+ /** @description 回ごとに決まる ID */
1131
+ key: string;
1132
+ eventId: number;
1133
+ title: string;
1134
+ location: string | null;
1135
+ /** @description 自分の予定のメモ。ほかの人の予定を加えたものは null */
1136
+ notes: string | null;
1137
+ startDate: string;
1138
+ /** @description この回の終わりの日 (この日を含む) */
1139
+ endDate: string;
1140
+ allDay: boolean;
1141
+ /** @description HH:MM (日本時間)。時限で決めた予定は、時限の時刻。終日なら null */
1142
+ start: string | null;
1143
+ end: string | null;
1144
+ /** @description 時限で決めた予定の、時限の範囲 */
1145
+ periods: {
1146
+ from: number;
1147
+ to: number;
1148
+ } | null;
1149
+ /** @description ほかの人の予定を、自分の時間割に加えたもの */
1150
+ added: boolean;
1151
+ }[];
1152
+ };
1153
+ };
1154
+ /** @description Validation Error */
1155
+ 400: {
1156
+ headers: {
1157
+ [name: string]: unknown;
1158
+ };
1159
+ content: {
1160
+ "application/json": {
1161
+ /** @enum {boolean} */
1162
+ success: false;
1163
+ error: unknown[];
1164
+ data: unknown;
1165
+ };
1166
+ };
1167
+ };
1168
+ };
1169
+ };
1170
+ postApiV1Events: {
1171
+ parameters: {
1172
+ query?: never;
1173
+ header?: never;
1174
+ path?: never;
1175
+ cookie?: never;
1176
+ };
1177
+ requestBody: {
1178
+ content: {
1179
+ "application/json": {
1180
+ title: string;
1181
+ location?: string | null;
1182
+ notes?: string | null;
1183
+ /**
1184
+ * Format: date
1185
+ * @description YYYY-MM-DD
1186
+ */
1187
+ startDate: string;
1188
+ /** @description 省けば開始日と同じ */
1189
+ endDate?: string | null;
1190
+ time: {
1191
+ /** @constant */
1192
+ kind: "allDay";
1193
+ } | {
1194
+ /** @constant */
1195
+ kind: "time";
1196
+ /** @description HH:MM (日本時間) */
1197
+ start: string;
1198
+ /** @description HH:MM。始まりより後 */
1199
+ end: string;
1200
+ } | {
1201
+ /** @constant */
1202
+ kind: "period";
1203
+ /** @description 始まりの時限 (1 から 6) */
1204
+ from: number;
1205
+ /** @description 終わりの時限 (始まり以上、6 まで) */
1206
+ to: number;
1207
+ };
1208
+ /** @description 繰り返さないなら省くか null */
1209
+ repeat?: {
1210
+ /** @enum {string} */
1211
+ freq: "daily" | "weekly" | "monthly" | "yearly";
1212
+ /** @description 間隔 (1 から 99)。省けば 1 */
1213
+ interval?: number;
1214
+ /** @description weekly のとき。曜日 (月曜が 1、日曜が 7)。省けば開始日の曜日 */
1215
+ weekdays?: number[];
1216
+ /**
1217
+ * @description monthly のとき。day は毎月の同じ日、nth は第何曜日、last は最終週の曜日
1218
+ * @enum {string}
1219
+ */
1220
+ monthly?: "day" | "nth" | "last";
1221
+ /** @description 省けば、終わりなし */
1222
+ end?: {
1223
+ /** @constant */
1224
+ kind: "never";
1225
+ } | {
1226
+ /** @constant */
1227
+ kind: "until";
1228
+ /**
1229
+ * Format: date
1230
+ * @description YYYY-MM-DD
1231
+ */
1232
+ date: string;
1233
+ } | {
1234
+ /** @constant */
1235
+ kind: "count";
1236
+ count: number;
1237
+ };
1238
+ } | null;
1239
+ /** @description 繰り返しから除く日 (始まりの日で数える) */
1240
+ excludedDates?: string[];
1241
+ };
1242
+ };
1243
+ };
1244
+ responses: {
1245
+ /** @description 足した予定 */
1246
+ 201: {
1247
+ headers: {
1248
+ [name: string]: unknown;
1249
+ };
1250
+ content: {
1251
+ "application/json": {
1252
+ id: number;
1253
+ title: string;
1254
+ location?: string | null;
1255
+ notes?: string | null;
1256
+ /**
1257
+ * Format: date
1258
+ * @description YYYY-MM-DD
1259
+ */
1260
+ startDate: string;
1261
+ /** @description 省けば開始日と同じ */
1262
+ endDate?: string | null;
1263
+ time: {
1264
+ /** @constant */
1265
+ kind: "allDay";
1266
+ } | {
1267
+ /** @constant */
1268
+ kind: "time";
1269
+ /** @description HH:MM (日本時間) */
1270
+ start: string;
1271
+ /** @description HH:MM。始まりより後 */
1272
+ end: string;
1273
+ } | {
1274
+ /** @constant */
1275
+ kind: "period";
1276
+ /** @description 始まりの時限 (1 から 6) */
1277
+ from: number;
1278
+ /** @description 終わりの時限 (始まり以上、6 まで) */
1279
+ to: number;
1280
+ };
1281
+ /** @description 繰り返さないなら省くか null */
1282
+ repeat?: {
1283
+ /** @enum {string} */
1284
+ freq: "daily" | "weekly" | "monthly" | "yearly";
1285
+ /** @description 間隔 (1 から 99)。省けば 1 */
1286
+ interval?: number;
1287
+ /** @description weekly のとき。曜日 (月曜が 1、日曜が 7)。省けば開始日の曜日 */
1288
+ weekdays?: number[];
1289
+ /**
1290
+ * @description monthly のとき。day は毎月の同じ日、nth は第何曜日、last は最終週の曜日
1291
+ * @enum {string}
1292
+ */
1293
+ monthly?: "day" | "nth" | "last";
1294
+ /** @description 省けば、終わりなし */
1295
+ end?: {
1296
+ /** @constant */
1297
+ kind: "never";
1298
+ } | {
1299
+ /** @constant */
1300
+ kind: "until";
1301
+ /**
1302
+ * Format: date
1303
+ * @description YYYY-MM-DD
1304
+ */
1305
+ date: string;
1306
+ } | {
1307
+ /** @constant */
1308
+ kind: "count";
1309
+ count: number;
1310
+ };
1311
+ } | null;
1312
+ /** @description 繰り返しから除く日 (始まりの日で数える) */
1313
+ excludedDates?: string[];
1314
+ };
1315
+ };
1316
+ };
1317
+ /** @description 入力が正しくない (message に、直し方が分かる文が入る) */
1318
+ 400: {
1319
+ headers: {
1320
+ [name: string]: unknown;
1321
+ };
1322
+ content?: never;
1323
+ };
1324
+ };
1325
+ };
1326
+ getApiV1EventsById: {
1327
+ parameters: {
1328
+ query?: never;
1329
+ header?: never;
1330
+ path: {
1331
+ id: string;
1332
+ };
1333
+ cookie?: never;
1334
+ };
1335
+ requestBody?: never;
1336
+ responses: {
1337
+ /** @description OK */
1338
+ 200: {
1339
+ headers: {
1340
+ [name: string]: unknown;
1341
+ };
1342
+ content: {
1343
+ "application/json": {
1344
+ id: number;
1345
+ title: string;
1346
+ location?: string | null;
1347
+ notes?: string | null;
1348
+ /**
1349
+ * Format: date
1350
+ * @description YYYY-MM-DD
1351
+ */
1352
+ startDate: string;
1353
+ /** @description 省けば開始日と同じ */
1354
+ endDate?: string | null;
1355
+ time: {
1356
+ /** @constant */
1357
+ kind: "allDay";
1358
+ } | {
1359
+ /** @constant */
1360
+ kind: "time";
1361
+ /** @description HH:MM (日本時間) */
1362
+ start: string;
1363
+ /** @description HH:MM。始まりより後 */
1364
+ end: string;
1365
+ } | {
1366
+ /** @constant */
1367
+ kind: "period";
1368
+ /** @description 始まりの時限 (1 から 6) */
1369
+ from: number;
1370
+ /** @description 終わりの時限 (始まり以上、6 まで) */
1371
+ to: number;
1372
+ };
1373
+ /** @description 繰り返さないなら省くか null */
1374
+ repeat?: {
1375
+ /** @enum {string} */
1376
+ freq: "daily" | "weekly" | "monthly" | "yearly";
1377
+ /** @description 間隔 (1 から 99)。省けば 1 */
1378
+ interval?: number;
1379
+ /** @description weekly のとき。曜日 (月曜が 1、日曜が 7)。省けば開始日の曜日 */
1380
+ weekdays?: number[];
1381
+ /**
1382
+ * @description monthly のとき。day は毎月の同じ日、nth は第何曜日、last は最終週の曜日
1383
+ * @enum {string}
1384
+ */
1385
+ monthly?: "day" | "nth" | "last";
1386
+ /** @description 省けば、終わりなし */
1387
+ end?: {
1388
+ /** @constant */
1389
+ kind: "never";
1390
+ } | {
1391
+ /** @constant */
1392
+ kind: "until";
1393
+ /**
1394
+ * Format: date
1395
+ * @description YYYY-MM-DD
1396
+ */
1397
+ date: string;
1398
+ } | {
1399
+ /** @constant */
1400
+ kind: "count";
1401
+ count: number;
1402
+ };
1403
+ } | null;
1404
+ /** @description 繰り返しから除く日 (始まりの日で数える) */
1405
+ excludedDates?: string[];
1406
+ };
1407
+ };
1408
+ };
1409
+ /** @description Validation Error */
1410
+ 400: {
1411
+ headers: {
1412
+ [name: string]: unknown;
1413
+ };
1414
+ content: {
1415
+ "application/json": {
1416
+ /** @enum {boolean} */
1417
+ success: false;
1418
+ error: unknown[];
1419
+ data: unknown;
1420
+ };
1421
+ };
1422
+ };
1423
+ /** @description 予定が見つからない (ほかの人の予定も、見つからないことにする) */
1424
+ 404: {
1425
+ headers: {
1426
+ [name: string]: unknown;
1427
+ };
1428
+ content?: never;
1429
+ };
1430
+ };
1431
+ };
1432
+ putApiV1EventsById: {
1433
+ parameters: {
1434
+ query?: never;
1435
+ header?: never;
1436
+ path: {
1437
+ id: string;
1438
+ };
1439
+ cookie?: never;
1440
+ };
1441
+ requestBody: {
1442
+ content: {
1443
+ "application/json": {
1444
+ title: string;
1445
+ location?: string | null;
1446
+ notes?: string | null;
1447
+ /**
1448
+ * Format: date
1449
+ * @description YYYY-MM-DD
1450
+ */
1451
+ startDate: string;
1452
+ /** @description 省けば開始日と同じ */
1453
+ endDate?: string | null;
1454
+ time: {
1455
+ /** @constant */
1456
+ kind: "allDay";
1457
+ } | {
1458
+ /** @constant */
1459
+ kind: "time";
1460
+ /** @description HH:MM (日本時間) */
1461
+ start: string;
1462
+ /** @description HH:MM。始まりより後 */
1463
+ end: string;
1464
+ } | {
1465
+ /** @constant */
1466
+ kind: "period";
1467
+ /** @description 始まりの時限 (1 から 6) */
1468
+ from: number;
1469
+ /** @description 終わりの時限 (始まり以上、6 まで) */
1470
+ to: number;
1471
+ };
1472
+ /** @description 繰り返さないなら省くか null */
1473
+ repeat?: {
1474
+ /** @enum {string} */
1475
+ freq: "daily" | "weekly" | "monthly" | "yearly";
1476
+ /** @description 間隔 (1 から 99)。省けば 1 */
1477
+ interval?: number;
1478
+ /** @description weekly のとき。曜日 (月曜が 1、日曜が 7)。省けば開始日の曜日 */
1479
+ weekdays?: number[];
1480
+ /**
1481
+ * @description monthly のとき。day は毎月の同じ日、nth は第何曜日、last は最終週の曜日
1482
+ * @enum {string}
1483
+ */
1484
+ monthly?: "day" | "nth" | "last";
1485
+ /** @description 省けば、終わりなし */
1486
+ end?: {
1487
+ /** @constant */
1488
+ kind: "never";
1489
+ } | {
1490
+ /** @constant */
1491
+ kind: "until";
1492
+ /**
1493
+ * Format: date
1494
+ * @description YYYY-MM-DD
1495
+ */
1496
+ date: string;
1497
+ } | {
1498
+ /** @constant */
1499
+ kind: "count";
1500
+ count: number;
1501
+ };
1502
+ } | null;
1503
+ /** @description 繰り返しから除く日 (始まりの日で数える) */
1504
+ excludedDates?: string[];
1505
+ };
1506
+ };
1507
+ };
1508
+ responses: {
1509
+ /** @description 直した予定 */
1510
+ 200: {
1511
+ headers: {
1512
+ [name: string]: unknown;
1513
+ };
1514
+ content: {
1515
+ "application/json": {
1516
+ id: number;
1517
+ title: string;
1518
+ location?: string | null;
1519
+ notes?: string | null;
1520
+ /**
1521
+ * Format: date
1522
+ * @description YYYY-MM-DD
1523
+ */
1524
+ startDate: string;
1525
+ /** @description 省けば開始日と同じ */
1526
+ endDate?: string | null;
1527
+ time: {
1528
+ /** @constant */
1529
+ kind: "allDay";
1530
+ } | {
1531
+ /** @constant */
1532
+ kind: "time";
1533
+ /** @description HH:MM (日本時間) */
1534
+ start: string;
1535
+ /** @description HH:MM。始まりより後 */
1536
+ end: string;
1537
+ } | {
1538
+ /** @constant */
1539
+ kind: "period";
1540
+ /** @description 始まりの時限 (1 から 6) */
1541
+ from: number;
1542
+ /** @description 終わりの時限 (始まり以上、6 まで) */
1543
+ to: number;
1544
+ };
1545
+ /** @description 繰り返さないなら省くか null */
1546
+ repeat?: {
1547
+ /** @enum {string} */
1548
+ freq: "daily" | "weekly" | "monthly" | "yearly";
1549
+ /** @description 間隔 (1 から 99)。省けば 1 */
1550
+ interval?: number;
1551
+ /** @description weekly のとき。曜日 (月曜が 1、日曜が 7)。省けば開始日の曜日 */
1552
+ weekdays?: number[];
1553
+ /**
1554
+ * @description monthly のとき。day は毎月の同じ日、nth は第何曜日、last は最終週の曜日
1555
+ * @enum {string}
1556
+ */
1557
+ monthly?: "day" | "nth" | "last";
1558
+ /** @description 省けば、終わりなし */
1559
+ end?: {
1560
+ /** @constant */
1561
+ kind: "never";
1562
+ } | {
1563
+ /** @constant */
1564
+ kind: "until";
1565
+ /**
1566
+ * Format: date
1567
+ * @description YYYY-MM-DD
1568
+ */
1569
+ date: string;
1570
+ } | {
1571
+ /** @constant */
1572
+ kind: "count";
1573
+ count: number;
1574
+ };
1575
+ } | null;
1576
+ /** @description 繰り返しから除く日 (始まりの日で数える) */
1577
+ excludedDates?: string[];
1578
+ };
1579
+ };
1580
+ };
1581
+ /** @description 入力が正しくない */
1582
+ 400: {
1583
+ headers: {
1584
+ [name: string]: unknown;
1585
+ };
1586
+ content?: never;
1587
+ };
1588
+ /** @description 予定が見つからない */
1589
+ 404: {
1590
+ headers: {
1591
+ [name: string]: unknown;
1592
+ };
1593
+ content?: never;
1594
+ };
1595
+ };
1596
+ };
1597
+ deleteApiV1EventsById: {
1598
+ parameters: {
1599
+ query?: never;
1600
+ header?: never;
1601
+ path: {
1602
+ id: string;
1603
+ };
1604
+ cookie?: never;
1605
+ };
1606
+ requestBody?: never;
1607
+ responses: {
1608
+ /** @description 消した */
1609
+ 204: {
1610
+ headers: {
1611
+ [name: string]: unknown;
1612
+ };
1613
+ content?: never;
1614
+ };
1615
+ /** @description Validation Error */
1616
+ 400: {
1617
+ headers: {
1618
+ [name: string]: unknown;
1619
+ };
1620
+ content: {
1621
+ "application/json": {
1622
+ /** @enum {boolean} */
1623
+ success: false;
1624
+ error: unknown[];
1625
+ data: unknown;
1626
+ };
1627
+ };
1628
+ };
1629
+ /** @description 予定が見つからない */
1630
+ 404: {
1631
+ headers: {
1632
+ [name: string]: unknown;
1633
+ };
1634
+ content?: never;
1635
+ };
1636
+ };
1637
+ };
1638
+ getApiV1Status: {
1639
+ parameters: {
1640
+ query?: never;
1641
+ header?: never;
1642
+ path?: never;
1643
+ cookie?: never;
1644
+ };
1645
+ requestBody?: never;
1646
+ responses: {
1647
+ /** @description OK */
1648
+ 200: {
1649
+ headers: {
1650
+ [name: string]: unknown;
1651
+ };
1652
+ content: {
1653
+ "application/json": {
1654
+ timetable: {
1655
+ /** @description 休講や教室の変更を最後に取れた日時 (ISO 8601)。一度も取れていなければ null */
1656
+ lastSuccessAt: string | null;
1657
+ /** @description 情報が古い。休講や教室の変更が、まだ反映されていないかもしれない */
1658
+ stale: boolean;
1659
+ };
1660
+ };
1661
+ };
1662
+ };
1663
+ };
1664
+ };
1665
+ getApiV1Subjects: {
1666
+ parameters: {
1667
+ query?: {
1668
+ q?: string;
1669
+ year?: number;
1670
+ term?: string;
1671
+ };
1672
+ header?: never;
1673
+ path?: never;
1674
+ cookie?: never;
1675
+ };
1676
+ requestBody?: never;
1677
+ responses: {
1678
+ /** @description OK */
1679
+ 200: {
1680
+ headers: {
1681
+ [name: string]: unknown;
1682
+ };
1683
+ content: {
1684
+ "application/json": {
1685
+ subjects: {
1686
+ academicYear: number;
1687
+ syllabusId: string;
1688
+ name: string;
1689
+ teacher: string | null;
1690
+ credits: number | null;
1691
+ term: string;
1692
+ }[];
1693
+ truncated: boolean;
1694
+ };
1695
+ };
1696
+ };
1697
+ /** @description Validation Error */
1698
+ 400: {
1699
+ headers: {
1700
+ [name: string]: unknown;
1701
+ };
1702
+ content: {
1703
+ "application/json": {
1704
+ /** @enum {boolean} */
1705
+ success: false;
1706
+ error: unknown[];
1707
+ data: unknown;
1708
+ };
1709
+ };
1710
+ };
1711
+ };
1712
+ };
1713
+ getApiV1SubjectsByYearBySyllabusIdSessions: {
1714
+ parameters: {
1715
+ query?: never;
1716
+ header?: never;
1717
+ path: {
1718
+ year: number;
1719
+ syllabusId: string;
1720
+ };
1721
+ cookie?: never;
1722
+ };
1723
+ requestBody?: never;
1724
+ responses: {
1725
+ /** @description OK */
1726
+ 200: {
1727
+ headers: {
1728
+ [name: string]: unknown;
1729
+ };
1730
+ content: {
1731
+ "application/json": {
1732
+ subject: {
1733
+ academicYear: number;
1734
+ syllabusId: string;
1735
+ name: string;
1736
+ teacher: string | null;
1737
+ credits: number | null;
1738
+ term: string;
1739
+ };
1740
+ sessions: {
1741
+ /** @description YYYY-MM-DD (日本時間) */
1742
+ date: string;
1743
+ /** @description 時限の番号。時刻は start と end */
1744
+ period: number;
1745
+ /** @description HH:MM (日本時間)。時限の時刻が不明なら null */
1746
+ start: string | null;
1747
+ end: string | null;
1748
+ subjectId: number;
1749
+ subjectName: string;
1750
+ academicYear: number;
1751
+ syllabusId: string;
1752
+ /** @description 教室。分からなければ null */
1753
+ room: string | null;
1754
+ /** @description 補講の教室が分からず、ふだんの教室を仮に出しているとき true */
1755
+ roomIsTentative: boolean;
1756
+ /** @description 休講、補講、教室変更の詳細。変更がなければ null */
1757
+ change: {
1758
+ comment: string | null;
1759
+ /** @description 教室変更の移動元の教室 */
1760
+ fromRoom: string | null;
1761
+ /** @description 休講コメントにある補講の予定 (あり、なし、未定) */
1762
+ makeupPlan: ("planned" | "none" | "undecided") | null;
1763
+ } | null;
1764
+ /**
1765
+ * @description normal: 変更なし、cancelled: 休講、makeup: 補講、roomChanged: 教室変更
1766
+ * @enum {string}
1767
+ */
1768
+ status: "normal" | "cancelled" | "makeup" | "roomChanged";
1769
+ sequence: number | null;
1770
+ }[];
1771
+ };
1772
+ };
1773
+ };
1774
+ /** @description Validation Error */
1775
+ 400: {
1776
+ headers: {
1777
+ [name: string]: unknown;
1778
+ };
1779
+ content: {
1780
+ "application/json": {
1781
+ /** @enum {boolean} */
1782
+ success: false;
1783
+ error: unknown[];
1784
+ data: unknown;
1785
+ };
1786
+ };
1787
+ };
1788
+ };
1789
+ };
1790
+ getApiV1BusStops: {
1791
+ parameters: {
1792
+ query?: never;
1793
+ header?: never;
1794
+ path?: never;
1795
+ cookie?: never;
1796
+ };
1797
+ requestBody?: never;
1798
+ responses: {
1799
+ /** @description OK */
1800
+ 200: {
1801
+ headers: {
1802
+ [name: string]: unknown;
1803
+ };
1804
+ content: {
1805
+ "application/json": {
1806
+ /** @description 一覧を、時刻表の API に最後に確かめた日時 (ISO 8601)。まだ取り込んでいなければ null */
1807
+ checkedAt: string | null;
1808
+ generations: {
1809
+ /** @description 版のコード。有効になる日の 8 桁 (例: 20261001) */
1810
+ code: number;
1811
+ name: string;
1812
+ /** @description 一覧を取った日に、使われていた版か */
1813
+ current: boolean;
1814
+ }[];
1815
+ stops: {
1816
+ id: string;
1817
+ name: string;
1818
+ /** @description 既定で強調する停留所 (未来大、亀田支所前) */
1819
+ highlighted: boolean;
1820
+ }[];
1821
+ };
1822
+ };
1823
+ };
1824
+ };
1825
+ };
1826
+ getApiV1BusStopsByStopId: {
1827
+ parameters: {
1828
+ query?: {
1829
+ generation?: string;
1830
+ };
1831
+ header?: never;
1832
+ path: {
1833
+ stopId: string;
1834
+ };
1835
+ cookie?: never;
1836
+ };
1837
+ requestBody?: never;
1838
+ responses: {
1839
+ /** @description OK */
1840
+ 200: {
1841
+ headers: {
1842
+ [name: string]: unknown;
1843
+ };
1844
+ content: {
1845
+ "application/json": {
1846
+ stop: {
1847
+ id: string;
1848
+ name: string;
1849
+ };
1850
+ generation: {
1851
+ /** @description 版のコード。有効になる日の 8 桁 (例: 20261001) */
1852
+ code: number;
1853
+ name: string;
1854
+ /** @description 一覧を取った日に、使われていた版か */
1855
+ current: boolean;
1856
+ };
1857
+ /** @description 時刻表の API が事業者から、この発車表を取った日時 (ISO 8601) */
1858
+ fetchedAt: string | null;
1859
+ /** @description Funmary が時刻表の API に最後に確かめた日時 */
1860
+ checkedAt: string;
1861
+ /** @description のりばと曜日の区分ごとの発車表 */
1862
+ platforms: {
1863
+ platformNo: number;
1864
+ platformName: string | null;
1865
+ /**
1866
+ * @description holiday は土曜、日曜、祝日
1867
+ * @enum {string}
1868
+ */
1869
+ day: "weekday" | "holiday";
1870
+ /** @description 事業者の注意書き。印の意味もここにある */
1871
+ notes: string[];
1872
+ departures: {
1873
+ /** @description HH:MM (日本時間)。24 時以降は 24:10 のように書く */
1874
+ time: string;
1875
+ routes: string[];
1876
+ via: string | null;
1877
+ destination: string | null;
1878
+ marks: string[];
1879
+ }[];
1880
+ }[];
1881
+ };
1882
+ };
1883
+ };
1884
+ /** @description Validation Error */
1885
+ 400: {
1886
+ headers: {
1887
+ [name: string]: unknown;
1888
+ };
1889
+ content: {
1890
+ "application/json": {
1891
+ /** @enum {boolean} */
1892
+ success: false;
1893
+ error: unknown[];
1894
+ data: unknown;
1895
+ };
1896
+ };
1897
+ };
1898
+ };
1899
+ };
1900
+ getApiV1BusNext: {
1901
+ parameters: {
1902
+ query?: {
1903
+ stopId?: string;
1904
+ limit?: number;
1905
+ };
1906
+ header?: never;
1907
+ path?: never;
1908
+ cookie?: never;
1909
+ };
1910
+ requestBody?: never;
1911
+ responses: {
1912
+ /** @description OK */
1913
+ 200: {
1914
+ headers: {
1915
+ [name: string]: unknown;
1916
+ };
1917
+ content: {
1918
+ "application/json": {
1919
+ stops: {
1920
+ stop: {
1921
+ id: string;
1922
+ name: string;
1923
+ };
1924
+ generation: {
1925
+ /** @description 版のコード。有効になる日の 8 桁 (例: 20261001) */
1926
+ code: number;
1927
+ name: string;
1928
+ /** @description 一覧を取った日に、使われていた版か */
1929
+ current: boolean;
1930
+ } | null;
1931
+ checkedAt: string | null;
1932
+ /** @description 今から先の発車。発車表がまだなければ空 */
1933
+ upcoming: {
1934
+ /** @description その発車が属するダイヤの日。24 時以降の発車は、日付が変わったあとも前日 */
1935
+ serviceDate: string;
1936
+ time: string;
1937
+ minutesUntil: number;
1938
+ platformNo: number;
1939
+ platformName: string | null;
1940
+ routes: string[];
1941
+ via: string | null;
1942
+ destination: string | null;
1943
+ marks: string[];
1944
+ }[];
1945
+ platforms: {
1946
+ platformNo: number;
1947
+ platformName: string | null;
1948
+ notes: string[];
1949
+ }[];
1950
+ }[];
1951
+ };
1952
+ };
1953
+ };
1954
+ /** @description Validation Error */
1955
+ 400: {
1956
+ headers: {
1957
+ [name: string]: unknown;
1958
+ };
1959
+ content: {
1960
+ "application/json": {
1961
+ /** @enum {boolean} */
1962
+ success: false;
1963
+ error: unknown[];
1964
+ data: unknown;
1965
+ };
1966
+ };
1967
+ };
1968
+ };
1969
+ };
1970
+ getApiV1BusLegs: {
1971
+ parameters: {
1972
+ query: {
1973
+ stopId: string;
1974
+ direction: "toUniversity" | "fromUniversity";
1975
+ day?: "weekday" | "holiday";
1976
+ limit?: number;
1977
+ };
1978
+ header?: never;
1979
+ path?: never;
1980
+ cookie?: never;
1981
+ };
1982
+ requestBody?: never;
1983
+ responses: {
1984
+ /** @description OK */
1985
+ 200: {
1986
+ headers: {
1987
+ [name: string]: unknown;
1988
+ };
1989
+ content: {
1990
+ "application/json": {
1991
+ /** @description 選んだ停留所 A */
1992
+ stop: {
1993
+ id: string;
1994
+ name: string;
1995
+ };
1996
+ /** @enum {string} */
1997
+ direction: "toUniversity" | "fromUniversity";
1998
+ /** @description 乗る停留所 */
1999
+ from: {
2000
+ id: string;
2001
+ name: string;
2002
+ };
2003
+ /** @description 降りる停留所 */
2004
+ to: {
2005
+ id: string;
2006
+ name: string;
2007
+ };
2008
+ /**
2009
+ * @description 発車を並べた日の区分。holiday は土曜、日曜、祝日
2010
+ * @enum {string}
2011
+ */
2012
+ day: "weekday" | "holiday";
2013
+ /** @enum {string} */
2014
+ todayDay: "weekday" | "holiday";
2015
+ generation: {
2016
+ /** @description 版のコード。有効になる日の 8 桁 (例: 20261001) */
2017
+ code: number;
2018
+ name: string;
2019
+ /** @description 一覧を取った日に、使われていた版か */
2020
+ current: boolean;
2021
+ } | null;
2022
+ checkedAt: string | null;
2023
+ /** @description その区分の、この向きの発車のすべて。時刻の順 */
2024
+ departures: {
2025
+ /** @description HH:MM (日本時間)。24 時以降は 24:10 のように書く */
2026
+ time: string;
2027
+ /** @description この便に乗る停留所。亀田支所前から先で路線が分かれるので、選んだ停留所を通らない系統の便は、亀田支所前と未来大の間になる */
2028
+ from: {
2029
+ id: string;
2030
+ name: string;
2031
+ };
2032
+ /** @description この便で降りる停留所 */
2033
+ to: {
2034
+ id: string;
2035
+ name: string;
2036
+ };
2037
+ platformNo: number;
2038
+ platformName: string | null;
2039
+ routes: string[];
2040
+ via: string | null;
2041
+ destination: string | null;
2042
+ marks: string[];
2043
+ /** @description 降りる停留所に着く時刻 (HH:MM)。到着する停留所の発車表から、同じ行き先と系統の便を結んで求めるので、結べなければ null */
2044
+ arrivalTime: string | null;
2045
+ }[];
2046
+ /** @description これからの発車 (day が今日の区分のときだけ。違えば空) */
2047
+ upcoming: {
2048
+ /** @description HH:MM (日本時間)。24 時以降は 24:10 のように書く */
2049
+ time: string;
2050
+ /** @description この便に乗る停留所。亀田支所前から先で路線が分かれるので、選んだ停留所を通らない系統の便は、亀田支所前と未来大の間になる */
2051
+ from: {
2052
+ id: string;
2053
+ name: string;
2054
+ };
2055
+ /** @description この便で降りる停留所 */
2056
+ to: {
2057
+ id: string;
2058
+ name: string;
2059
+ };
2060
+ platformNo: number;
2061
+ platformName: string | null;
2062
+ routes: string[];
2063
+ via: string | null;
2064
+ destination: string | null;
2065
+ marks: string[];
2066
+ /** @description その発車が属するダイヤの日。24 時以降の発車は、日付が変わったあとも前日 */
2067
+ serviceDate: string;
2068
+ minutesUntil: number;
2069
+ }[];
2070
+ notes: string[];
2071
+ };
2072
+ };
2073
+ };
2074
+ /** @description Validation Error */
2075
+ 400: {
2076
+ headers: {
2077
+ [name: string]: unknown;
2078
+ };
2079
+ content: {
2080
+ "application/json": {
2081
+ /** @enum {boolean} */
2082
+ success: false;
2083
+ error: unknown[];
2084
+ data: unknown;
2085
+ };
2086
+ };
2087
+ };
2088
+ /** @description 一覧にない停留所、または未来大そのもの */
2089
+ 404: {
2090
+ headers: {
2091
+ [name: string]: unknown;
2092
+ };
2093
+ content?: never;
2094
+ };
2095
+ };
2096
+ };
2097
+ deleteApiV1CoursesByYearBySyllabusId: {
2098
+ parameters: {
2099
+ query?: never;
2100
+ header?: never;
2101
+ path: {
2102
+ year: string;
2103
+ syllabusId: string;
2104
+ };
2105
+ cookie?: never;
2106
+ };
2107
+ requestBody?: never;
2108
+ responses: {
2109
+ /** @description 取り消し後の状態 */
2110
+ 200: {
2111
+ headers: {
2112
+ [name: string]: unknown;
2113
+ };
2114
+ content: {
2115
+ "application/json": {
2116
+ subject: {
2117
+ academicYear: number;
2118
+ syllabusId: string;
2119
+ name: string;
2120
+ teacher: string | null;
2121
+ credits: number | null;
2122
+ term: string;
2123
+ };
2124
+ registered: boolean;
2125
+ personalSlots: {
2126
+ weekday: number;
2127
+ period: number;
2128
+ room: string | null;
2129
+ }[];
2130
+ /** @description 保存した略称。保存していなければ null、正式名称に戻す指定なら空文字 */
2131
+ abbreviation: string | null;
2132
+ };
2133
+ };
2134
+ };
2135
+ /** @description Validation Error */
2136
+ 400: {
2137
+ headers: {
2138
+ [name: string]: unknown;
2139
+ };
2140
+ content: {
2141
+ "application/json": {
2142
+ /** @enum {boolean} */
2143
+ success: false;
2144
+ error: unknown[];
2145
+ data: unknown;
2146
+ };
2147
+ };
2148
+ };
2149
+ /** @description 科目がない、または履修登録していない */
2150
+ 404: {
2151
+ headers: {
2152
+ [name: string]: unknown;
2153
+ };
2154
+ content?: never;
2155
+ };
2156
+ };
2157
+ };
2158
+ putApiV1CoursesByYearBySyllabusIdPersonalSlots: {
2159
+ parameters: {
2160
+ query?: never;
2161
+ header?: never;
2162
+ path: {
2163
+ year: string;
2164
+ syllabusId: string;
2165
+ };
2166
+ cookie?: never;
2167
+ };
2168
+ requestBody: {
2169
+ content: {
2170
+ "application/json": {
2171
+ /** @description 1 (月) から 6 (土) */
2172
+ weekday: number;
2173
+ /** @description 1 から 6 */
2174
+ period: number;
2175
+ /** @default null */
2176
+ room?: string | null;
2177
+ };
2178
+ };
2179
+ };
2180
+ responses: {
2181
+ /** @description 書き込み後の状態 */
2182
+ 200: {
2183
+ headers: {
2184
+ [name: string]: unknown;
2185
+ };
2186
+ content: {
2187
+ "application/json": {
2188
+ subject: {
2189
+ academicYear: number;
2190
+ syllabusId: string;
2191
+ name: string;
2192
+ teacher: string | null;
2193
+ credits: number | null;
2194
+ term: string;
2195
+ };
2196
+ registered: boolean;
2197
+ personalSlots: {
2198
+ weekday: number;
2199
+ period: number;
2200
+ room: string | null;
2201
+ }[];
2202
+ /** @description 保存した略称。保存していなければ null、正式名称に戻す指定なら空文字 */
2203
+ abbreviation: string | null;
2204
+ };
2205
+ };
2206
+ };
2207
+ /** @description 曜日か時限が範囲の外 */
2208
+ 400: {
2209
+ headers: {
2210
+ [name: string]: unknown;
2211
+ };
2212
+ content?: never;
2213
+ };
2214
+ /** @description 履修登録していない科目 */
2215
+ 409: {
2216
+ headers: {
2217
+ [name: string]: unknown;
2218
+ };
2219
+ content?: never;
2220
+ };
2221
+ };
2222
+ };
2223
+ deleteApiV1CoursesByYearBySyllabusIdPersonalSlotsByWeekdayByPeriod: {
2224
+ parameters: {
2225
+ query?: never;
2226
+ header?: never;
2227
+ path: {
2228
+ year: string;
2229
+ syllabusId: string;
2230
+ weekday: string;
2231
+ period: string;
2232
+ };
2233
+ cookie?: never;
2234
+ };
2235
+ requestBody?: never;
2236
+ responses: {
2237
+ /** @description 消した後の状態 */
2238
+ 200: {
2239
+ headers: {
2240
+ [name: string]: unknown;
2241
+ };
2242
+ content: {
2243
+ "application/json": {
2244
+ subject: {
2245
+ academicYear: number;
2246
+ syllabusId: string;
2247
+ name: string;
2248
+ teacher: string | null;
2249
+ credits: number | null;
2250
+ term: string;
2251
+ };
2252
+ registered: boolean;
2253
+ personalSlots: {
2254
+ weekday: number;
2255
+ period: number;
2256
+ room: string | null;
2257
+ }[];
2258
+ /** @description 保存した略称。保存していなければ null、正式名称に戻す指定なら空文字 */
2259
+ abbreviation: string | null;
2260
+ };
2261
+ };
2262
+ };
2263
+ /** @description Validation Error */
2264
+ 400: {
2265
+ headers: {
2266
+ [name: string]: unknown;
2267
+ };
2268
+ content: {
2269
+ "application/json": {
2270
+ /** @enum {boolean} */
2271
+ success: false;
2272
+ error: unknown[];
2273
+ data: unknown;
2274
+ };
2275
+ };
2276
+ };
2277
+ /** @description その曜日と時限は、登録されていない */
2278
+ 404: {
2279
+ headers: {
2280
+ [name: string]: unknown;
2281
+ };
2282
+ content?: never;
2283
+ };
2284
+ };
2285
+ };
2286
+ putApiV1CoursesByYearBySyllabusIdAbbreviation: {
2287
+ parameters: {
2288
+ query?: never;
2289
+ header?: never;
2290
+ path: {
2291
+ year: string;
2292
+ syllabusId: string;
2293
+ };
2294
+ cookie?: never;
2295
+ };
2296
+ requestBody: {
2297
+ content: {
2298
+ "application/json": {
2299
+ /** @description 100 文字まで。空にすると、正式名称を使う */
2300
+ abbreviation: string;
2301
+ };
2302
+ };
2303
+ };
2304
+ responses: {
2305
+ /** @description 保存後の状態 */
2306
+ 200: {
2307
+ headers: {
2308
+ [name: string]: unknown;
2309
+ };
2310
+ content: {
2311
+ "application/json": {
2312
+ subject: {
2313
+ academicYear: number;
2314
+ syllabusId: string;
2315
+ name: string;
2316
+ teacher: string | null;
2317
+ credits: number | null;
2318
+ term: string;
2319
+ };
2320
+ registered: boolean;
2321
+ personalSlots: {
2322
+ weekday: number;
2323
+ period: number;
2324
+ room: string | null;
2325
+ }[];
2326
+ /** @description 保存した略称。保存していなければ null、正式名称に戻す指定なら空文字 */
2327
+ abbreviation: string | null;
2328
+ };
2329
+ };
2330
+ };
2331
+ /** @description 100 文字を超えている */
2332
+ 400: {
2333
+ headers: {
2334
+ [name: string]: unknown;
2335
+ };
2336
+ content?: never;
2337
+ };
2338
+ };
2339
+ };
2340
+ getApiV1Notifications: {
2341
+ parameters: {
2342
+ query?: {
2343
+ kinds?: string;
2344
+ since?: string;
2345
+ afterId?: number;
2346
+ limit?: number;
2347
+ };
2348
+ header?: never;
2349
+ path?: never;
2350
+ cookie?: never;
2351
+ };
2352
+ requestBody?: never;
2353
+ responses: {
2354
+ /** @description OK */
2355
+ 200: {
2356
+ headers: {
2357
+ [name: string]: unknown;
2358
+ };
2359
+ content: {
2360
+ "application/json": {
2361
+ id: number;
2362
+ kind: string;
2363
+ title: string;
2364
+ body: string | null;
2365
+ link: string | null;
2366
+ createdAt: string;
2367
+ }[];
2368
+ };
2369
+ };
2370
+ /** @description Validation Error */
2371
+ 400: {
2372
+ headers: {
2373
+ [name: string]: unknown;
2374
+ };
2375
+ content: {
2376
+ "application/json": {
2377
+ /** @enum {boolean} */
2378
+ success: false;
2379
+ error: unknown[];
2380
+ data: unknown;
2381
+ };
2382
+ };
2383
+ };
2384
+ };
2385
+ };
2386
+ postApiV1NotificationsRead: {
2387
+ parameters: {
2388
+ query?: never;
2389
+ header?: never;
2390
+ path?: never;
2391
+ cookie?: never;
2392
+ };
2393
+ requestBody?: never;
2394
+ responses: {
2395
+ /** @description OK */
2396
+ 200: {
2397
+ headers: {
2398
+ [name: string]: unknown;
2399
+ };
2400
+ content: {
2401
+ "application/json": {
2402
+ count: number;
2403
+ };
2404
+ };
2405
+ };
2406
+ };
2407
+ };
2408
+ postApiV1NotificationsByIdRead: {
2409
+ parameters: {
2410
+ query?: never;
2411
+ header?: never;
2412
+ path: {
2413
+ id: string;
2414
+ };
2415
+ cookie?: never;
2416
+ };
2417
+ requestBody?: never;
2418
+ responses: {
2419
+ /** @description OK */
2420
+ 200: {
2421
+ headers: {
2422
+ [name: string]: unknown;
2423
+ };
2424
+ content: {
2425
+ "application/json": {
2426
+ id: number;
2427
+ kind: string;
2428
+ title: string;
2429
+ body: string | null;
2430
+ link: string | null;
2431
+ createdAt: string;
2432
+ };
2433
+ };
2434
+ };
2435
+ /** @description Validation Error */
2436
+ 400: {
2437
+ headers: {
2438
+ [name: string]: unknown;
2439
+ };
2440
+ content: {
2441
+ "application/json": {
2442
+ /** @enum {boolean} */
2443
+ success: false;
2444
+ error: unknown[];
2445
+ data: unknown;
2446
+ };
2447
+ };
2448
+ };
2449
+ /** @description 通知が見つからない */
2450
+ 404: {
2451
+ headers: {
2452
+ [name: string]: unknown;
2453
+ };
2454
+ content?: never;
2455
+ };
2456
+ };
2457
+ };
2458
+ getApiV1Me: {
2459
+ parameters: {
2460
+ query?: never;
2461
+ header?: never;
2462
+ path?: never;
2463
+ cookie?: never;
2464
+ };
2465
+ requestBody?: never;
2466
+ responses: {
2467
+ /** @description OK */
2468
+ 200: {
2469
+ headers: {
2470
+ [name: string]: unknown;
2471
+ };
2472
+ content: {
2473
+ "application/json": {
2474
+ id: string;
2475
+ email: string;
2476
+ /** @description このトークンに許された範囲 */
2477
+ scopes: string[];
2478
+ };
2479
+ };
2480
+ };
2481
+ };
2482
+ };
2483
+ }
2484
+ //#endregion
2485
+ //#region src/index.d.ts
2486
+ type Path = keyof paths;
2487
+ /** 成功した応答 (200 か 201) の JSON の型 */
2488
+ type ResponseOf<Operation> = Operation extends {
2489
+ responses: infer R;
2490
+ } ? R extends {
2491
+ 200: {
2492
+ content: {
2493
+ 'application/json': infer J;
2494
+ };
2495
+ };
2496
+ } ? J : R extends {
2497
+ 201: {
2498
+ content: {
2499
+ 'application/json': infer J;
2500
+ };
2501
+ };
2502
+ } ? J : never : never;
2503
+ /** リクエストの本文 (JSON) の型 */
2504
+ type BodyOf<Operation> = Operation extends {
2505
+ requestBody: {
2506
+ content: {
2507
+ 'application/json': infer J;
2508
+ };
2509
+ };
2510
+ } ? J : never;
2511
+ type Post<P extends Path> = paths[P] extends {
2512
+ post: infer Operation;
2513
+ } ? Operation : never;
2514
+ type Put<P extends Path> = paths[P] extends {
2515
+ put: infer Operation;
2516
+ } ? Operation : never;
2517
+ export type CourseState = ResponseOf<Post<'/api/v1/courses'>>;
2518
+ export type EventBody = BodyOf<Post<'/api/v1/events'>>;
2519
+ export type EventResult = ResponseOf<Post<'/api/v1/events'>>;
2520
+ /** 履修登録する科目の指し方。年度とシラバスの番号か、名前 */
2521
+ export type CourseRef = BodyOf<Post<'/api/v1/courses'>>;
2522
+ export type PersonalSlotBody = BodyOf<Put<'/api/v1/courses/{year}/{syllabusId}/personal-slots'>>;
2523
+ /** サーバーが誤りを返したときと、通信できなかったときの例外。トークンは含めない */
2524
+ export declare class FunmaryApiError extends Error {
2525
+ /** HTTP の状態。通信できなかったときは 0 */
2526
+ readonly status: number;
2527
+ /** サーバーが返した誤りの種類 (not_found、invalid_request、terms_not_accepted など)。通信の失敗は network_error */
2528
+ readonly code: string;
2529
+ /** サーバーが返した本文。JSON でなければ undefined */
2530
+ readonly body: unknown;
2531
+ constructor(init: {
2532
+ status: number;
2533
+ code: string;
2534
+ message: string;
2535
+ body?: unknown;
2536
+ });
2537
+ }
2538
+ export interface FunmaryClientOptions {
2539
+ /** サーバーの URL。例: https://funmary.example.com (既定値は持たない) */
2540
+ baseURL: string;
2541
+ /** 設定画面で発行した、個人用のアクセストークン */
2542
+ token: string;
2543
+ /** 1 回の通信を待つ時間 (ミリ秒)。既定は 15 秒 */
2544
+ timeoutMs?: number;
2545
+ /** 429 (回数の制限) のときに、やり直す回数。既定は 2 回 */
2546
+ maxRetries?: number;
2547
+ fetch?: typeof fetch;
2548
+ /** 待つ処理。テストで差し替える */
2549
+ sleep?: (ms: number) => Promise<void>;
2550
+ }
2551
+ export declare function createFunmaryClient(options: FunmaryClientOptions): {
2552
+ /** トークンの持ち主と、許された範囲 */
2553
+ me: () => Promise<{
2554
+ id: string;
2555
+ email: string;
2556
+ scopes: string[];
2557
+ }>;
2558
+ /** 休講などのデータが新しいか */
2559
+ status: () => Promise<{
2560
+ timetable: {
2561
+ lastSuccessAt: string | null;
2562
+ stale: boolean;
2563
+ };
2564
+ }>;
2565
+ lessons: (r: {
2566
+ start: string;
2567
+ end: string;
2568
+ }) => Promise<{
2569
+ date: string;
2570
+ period: number;
2571
+ start: string | null;
2572
+ end: string | null;
2573
+ subjectId: number;
2574
+ subjectName: string;
2575
+ academicYear: number;
2576
+ syllabusId: string;
2577
+ room: string | null;
2578
+ roomIsTentative: boolean;
2579
+ change: {
2580
+ comment: string | null;
2581
+ fromRoom: string | null;
2582
+ makeupPlan: ("planned" | "none" | "undecided") | null;
2583
+ } | null;
2584
+ status: "normal" | "cancelled" | "makeup" | "roomChanged";
2585
+ }[]>;
2586
+ nextLesson: () => Promise<{
2587
+ next: {
2588
+ date: string;
2589
+ period: number;
2590
+ start: string | null;
2591
+ end: string | null;
2592
+ subjectId: number;
2593
+ subjectName: string;
2594
+ academicYear: number;
2595
+ syllabusId: string;
2596
+ room: string | null;
2597
+ roomIsTentative: boolean;
2598
+ change: {
2599
+ comment: string | null;
2600
+ fromRoom: string | null;
2601
+ makeupPlan: ("planned" | "none" | "undecided") | null;
2602
+ } | null;
2603
+ status: "normal" | "cancelled" | "makeup" | "roomChanged";
2604
+ inProgress: boolean;
2605
+ } | null;
2606
+ }>;
2607
+ /** 授業と、振替授業日、全学の休講日、祝日 */
2608
+ timetable: (r: {
2609
+ start: string;
2610
+ end: string;
2611
+ }) => Promise<{
2612
+ lessons: {
2613
+ date: string;
2614
+ period: number;
2615
+ start: string | null;
2616
+ end: string | null;
2617
+ subjectId: number;
2618
+ subjectName: string;
2619
+ academicYear: number;
2620
+ syllabusId: string;
2621
+ room: string | null;
2622
+ roomIsTentative: boolean;
2623
+ change: {
2624
+ comment: string | null;
2625
+ fromRoom: string | null;
2626
+ makeupPlan: ("planned" | "none" | "undecided") | null;
2627
+ } | null;
2628
+ status: "normal" | "cancelled" | "makeup" | "roomChanged";
2629
+ }[];
2630
+ days: ({
2631
+ date: string;
2632
+ kind: "substitute";
2633
+ weekday: number;
2634
+ } | {
2635
+ date: string;
2636
+ kind: "noClass";
2637
+ label: string | null;
2638
+ } | {
2639
+ date: string;
2640
+ kind: "holiday";
2641
+ name: string;
2642
+ })[];
2643
+ usesEstimatedTerms: boolean;
2644
+ }>;
2645
+ /** 週の曜日と時限の格子。date を省くと今週 */
2646
+ week: (query?: {
2647
+ date?: string;
2648
+ }) => Promise<{
2649
+ weekStart: string;
2650
+ periods: {
2651
+ number: number;
2652
+ start: string;
2653
+ end: string;
2654
+ }[];
2655
+ days: {
2656
+ date: string;
2657
+ weekday: number;
2658
+ note: ({
2659
+ date: string;
2660
+ kind: "substitute";
2661
+ weekday: number;
2662
+ } | {
2663
+ date: string;
2664
+ kind: "noClass";
2665
+ label: string | null;
2666
+ } | {
2667
+ date: string;
2668
+ kind: "holiday";
2669
+ name: string;
2670
+ }) | null;
2671
+ cells: {
2672
+ period: number;
2673
+ lessons: {
2674
+ date: string;
2675
+ period: number;
2676
+ start: string | null;
2677
+ end: string | null;
2678
+ subjectId: number;
2679
+ subjectName: string;
2680
+ academicYear: number;
2681
+ syllabusId: string;
2682
+ room: string | null;
2683
+ roomIsTentative: boolean;
2684
+ change: {
2685
+ comment: string | null;
2686
+ fromRoom: string | null;
2687
+ makeupPlan: ("planned" | "none" | "undecided") | null;
2688
+ } | null;
2689
+ status: "normal" | "cancelled" | "makeup" | "roomChanged";
2690
+ }[];
2691
+ }[];
2692
+ }[];
2693
+ usesEstimatedTerms: boolean;
2694
+ }>;
2695
+ periods: () => Promise<{
2696
+ number: number;
2697
+ start: string;
2698
+ end: string;
2699
+ }[]>;
2700
+ academicCalendar: (query?: {
2701
+ year?: number;
2702
+ }) => Promise<{
2703
+ academicYear: number;
2704
+ terms: {
2705
+ term: string;
2706
+ start: string;
2707
+ end: string;
2708
+ source: string;
2709
+ }[];
2710
+ days: ({
2711
+ date: string;
2712
+ kind: "substitute";
2713
+ weekday: number;
2714
+ } | {
2715
+ date: string;
2716
+ kind: "noClass";
2717
+ label: string | null;
2718
+ } | {
2719
+ date: string;
2720
+ kind: "holiday";
2721
+ name: string;
2722
+ })[];
2723
+ }>;
2724
+ /** 休講、補講、教室変更 */
2725
+ changes: (r: {
2726
+ start: string;
2727
+ end: string;
2728
+ }) => Promise<{
2729
+ date: string;
2730
+ period: number;
2731
+ start: string | null;
2732
+ end: string | null;
2733
+ subjectId: number;
2734
+ subjectName: string;
2735
+ academicYear: number;
2736
+ syllabusId: string;
2737
+ room: string | null;
2738
+ roomIsTentative: boolean;
2739
+ change: {
2740
+ comment: string | null;
2741
+ fromRoom: string | null;
2742
+ makeupPlan: ("planned" | "none" | "undecided") | null;
2743
+ } | null;
2744
+ status: "normal" | "cancelled" | "makeup" | "roomChanged";
2745
+ }[]>;
2746
+ courses: {
2747
+ list: () => Promise<{
2748
+ subjectId: number;
2749
+ academicYear: number;
2750
+ syllabusId: string;
2751
+ name: string;
2752
+ teacher: string | null;
2753
+ credits: number | null;
2754
+ term: string;
2755
+ slots: {
2756
+ weekday: number;
2757
+ period: number;
2758
+ room: string | null;
2759
+ }[];
2760
+ }[]>;
2761
+ /** 履修登録する。登録済みなら、何も変えずに今の状態を返す */
2762
+ register: (ref: CourseRef) => Promise<{
2763
+ subject: {
2764
+ academicYear: number;
2765
+ syllabusId: string;
2766
+ name: string;
2767
+ teacher: string | null;
2768
+ credits: number | null;
2769
+ term: string;
2770
+ };
2771
+ registered: boolean;
2772
+ personalSlots: {
2773
+ weekday: number;
2774
+ period: number;
2775
+ room: string | null;
2776
+ }[];
2777
+ abbreviation: string | null;
2778
+ }>;
2779
+ /** 履修登録を取り消す。自分だけの曜日と時限と略称は残る */
2780
+ unregister: (ref: {
2781
+ year: number;
2782
+ syllabusId: string;
2783
+ }) => Promise<{
2784
+ subject: {
2785
+ academicYear: number;
2786
+ syllabusId: string;
2787
+ name: string;
2788
+ teacher: string | null;
2789
+ credits: number | null;
2790
+ term: string;
2791
+ };
2792
+ registered: boolean;
2793
+ personalSlots: {
2794
+ weekday: number;
2795
+ period: number;
2796
+ room: string | null;
2797
+ }[];
2798
+ abbreviation: string | null;
2799
+ }>;
2800
+ /** 自分だけに使う曜日と時限を足す (同じ曜日と時限があれば、教室を上書きする) */
2801
+ setPersonalSlot: (ref: {
2802
+ year: number;
2803
+ syllabusId: string;
2804
+ }, slot: PersonalSlotBody) => Promise<{
2805
+ subject: {
2806
+ academicYear: number;
2807
+ syllabusId: string;
2808
+ name: string;
2809
+ teacher: string | null;
2810
+ credits: number | null;
2811
+ term: string;
2812
+ };
2813
+ registered: boolean;
2814
+ personalSlots: {
2815
+ weekday: number;
2816
+ period: number;
2817
+ room: string | null;
2818
+ }[];
2819
+ abbreviation: string | null;
2820
+ }>;
2821
+ removePersonalSlot: (ref: {
2822
+ year: number;
2823
+ syllabusId: string;
2824
+ }, slot: {
2825
+ weekday: number;
2826
+ period: number;
2827
+ }) => Promise<{
2828
+ subject: {
2829
+ academicYear: number;
2830
+ syllabusId: string;
2831
+ name: string;
2832
+ teacher: string | null;
2833
+ credits: number | null;
2834
+ term: string;
2835
+ };
2836
+ registered: boolean;
2837
+ personalSlots: {
2838
+ weekday: number;
2839
+ period: number;
2840
+ room: string | null;
2841
+ }[];
2842
+ abbreviation: string | null;
2843
+ }>;
2844
+ /** 時間割に出す、自分だけの略称。空にすると、正式名称を使う */
2845
+ setAbbreviation: (ref: {
2846
+ year: number;
2847
+ syllabusId: string;
2848
+ }, abbreviation: string) => Promise<{
2849
+ subject: {
2850
+ academicYear: number;
2851
+ syllabusId: string;
2852
+ name: string;
2853
+ teacher: string | null;
2854
+ credits: number | null;
2855
+ term: string;
2856
+ };
2857
+ registered: boolean;
2858
+ personalSlots: {
2859
+ weekday: number;
2860
+ period: number;
2861
+ room: string | null;
2862
+ }[];
2863
+ abbreviation: string | null;
2864
+ }>;
2865
+ };
2866
+ subjects: {
2867
+ search: (query?: {
2868
+ q?: string | undefined;
2869
+ year?: number | undefined;
2870
+ term?: string | undefined;
2871
+ }) => Promise<{
2872
+ subjects: {
2873
+ academicYear: number;
2874
+ syllabusId: string;
2875
+ name: string;
2876
+ teacher: string | null;
2877
+ credits: number | null;
2878
+ term: string;
2879
+ }[];
2880
+ truncated: boolean;
2881
+ }>;
2882
+ get: (ref: {
2883
+ year: number;
2884
+ syllabusId: string;
2885
+ }) => Promise<{
2886
+ subject: {
2887
+ id: number;
2888
+ academicYear: number;
2889
+ syllabusId: string;
2890
+ name: string;
2891
+ teacher: string | null;
2892
+ credits: number | null;
2893
+ term: string;
2894
+ attributes: {
2895
+ [key: string]: string;
2896
+ };
2897
+ syllabus: {
2898
+ [key: string]: string;
2899
+ };
2900
+ syllabusUrl: string | null;
2901
+ updatedAt: string;
2902
+ source: "syllabus" | "user";
2903
+ createdBy: string | null;
2904
+ visibility: "public" | "link" | "private";
2905
+ };
2906
+ changes: {
2907
+ kind: "cancellation" | "makeup" | "roomChange";
2908
+ date: string;
2909
+ period: number;
2910
+ room: string | null;
2911
+ fromRoom: string | null;
2912
+ comment: string | null;
2913
+ makeupPlan: ("planned" | "none" | "undecided") | null;
2914
+ withdrawn: boolean;
2915
+ }[];
2916
+ }>;
2917
+ sessions: (ref: {
2918
+ year: number;
2919
+ syllabusId: string;
2920
+ }) => Promise<{
2921
+ subject: {
2922
+ academicYear: number;
2923
+ syllabusId: string;
2924
+ name: string;
2925
+ teacher: string | null;
2926
+ credits: number | null;
2927
+ term: string;
2928
+ };
2929
+ sessions: {
2930
+ date: string;
2931
+ period: number;
2932
+ start: string | null;
2933
+ end: string | null;
2934
+ subjectId: number;
2935
+ subjectName: string;
2936
+ academicYear: number;
2937
+ syllabusId: string;
2938
+ room: string | null;
2939
+ roomIsTentative: boolean;
2940
+ change: {
2941
+ comment: string | null;
2942
+ fromRoom: string | null;
2943
+ makeupPlan: ("planned" | "none" | "undecided") | null;
2944
+ } | null;
2945
+ status: "normal" | "cancelled" | "makeup" | "roomChanged";
2946
+ sequence: number | null;
2947
+ }[];
2948
+ }>;
2949
+ };
2950
+ events: {
2951
+ list: (r: {
2952
+ start: string;
2953
+ end: string;
2954
+ }) => Promise<{
2955
+ key: string;
2956
+ eventId: number;
2957
+ title: string;
2958
+ location: string | null;
2959
+ notes: string | null;
2960
+ startDate: string;
2961
+ endDate: string;
2962
+ allDay: boolean;
2963
+ start: string | null;
2964
+ end: string | null;
2965
+ periods: {
2966
+ from: number;
2967
+ to: number;
2968
+ } | null;
2969
+ added: boolean;
2970
+ }[]>;
2971
+ get: (id: number) => Promise<{
2972
+ id: number;
2973
+ title: string;
2974
+ location?: string | null;
2975
+ notes?: string | null;
2976
+ startDate: string;
2977
+ endDate?: string | null;
2978
+ time: {
2979
+ kind: "allDay";
2980
+ } | {
2981
+ kind: "time";
2982
+ start: string;
2983
+ end: string;
2984
+ } | {
2985
+ kind: "period";
2986
+ from: number;
2987
+ to: number;
2988
+ };
2989
+ repeat?: {
2990
+ freq: "daily" | "weekly" | "monthly" | "yearly";
2991
+ interval?: number;
2992
+ weekdays?: number[];
2993
+ monthly?: "day" | "nth" | "last";
2994
+ end?: {
2995
+ kind: "never";
2996
+ } | {
2997
+ kind: "until";
2998
+ date: string;
2999
+ } | {
3000
+ kind: "count";
3001
+ count: number;
3002
+ };
3003
+ } | null;
3004
+ excludedDates?: string[];
3005
+ }>;
3006
+ create: (body: EventBody) => Promise<{
3007
+ id: number;
3008
+ title: string;
3009
+ location?: string | null;
3010
+ notes?: string | null;
3011
+ startDate: string;
3012
+ endDate?: string | null;
3013
+ time: {
3014
+ kind: "allDay";
3015
+ } | {
3016
+ kind: "time";
3017
+ start: string;
3018
+ end: string;
3019
+ } | {
3020
+ kind: "period";
3021
+ from: number;
3022
+ to: number;
3023
+ };
3024
+ repeat?: {
3025
+ freq: "daily" | "weekly" | "monthly" | "yearly";
3026
+ interval?: number;
3027
+ weekdays?: number[];
3028
+ monthly?: "day" | "nth" | "last";
3029
+ end?: {
3030
+ kind: "never";
3031
+ } | {
3032
+ kind: "until";
3033
+ date: string;
3034
+ } | {
3035
+ kind: "count";
3036
+ count: number;
3037
+ };
3038
+ } | null;
3039
+ excludedDates?: string[];
3040
+ }>;
3041
+ /** 送った内容に置き換える (送らなかった項目は、空になる) */
3042
+ replace: (id: number, body: EventBody) => Promise<{
3043
+ id: number;
3044
+ title: string;
3045
+ location?: string | null;
3046
+ notes?: string | null;
3047
+ startDate: string;
3048
+ endDate?: string | null;
3049
+ time: {
3050
+ kind: "allDay";
3051
+ } | {
3052
+ kind: "time";
3053
+ start: string;
3054
+ end: string;
3055
+ } | {
3056
+ kind: "period";
3057
+ from: number;
3058
+ to: number;
3059
+ };
3060
+ repeat?: {
3061
+ freq: "daily" | "weekly" | "monthly" | "yearly";
3062
+ interval?: number;
3063
+ weekdays?: number[];
3064
+ monthly?: "day" | "nth" | "last";
3065
+ end?: {
3066
+ kind: "never";
3067
+ } | {
3068
+ kind: "until";
3069
+ date: string;
3070
+ } | {
3071
+ kind: "count";
3072
+ count: number;
3073
+ };
3074
+ } | null;
3075
+ excludedDates?: string[];
3076
+ }>;
3077
+ delete: (id: number) => Promise<undefined>;
3078
+ };
3079
+ notifications: {
3080
+ list: (query?: {
3081
+ kinds?: string | undefined;
3082
+ since?: string | undefined;
3083
+ afterId?: number | undefined;
3084
+ limit?: number | undefined;
3085
+ }) => Promise<{
3086
+ id: number;
3087
+ kind: string;
3088
+ title: string;
3089
+ body: string | null;
3090
+ link: string | null;
3091
+ createdAt: string;
3092
+ }[]>;
3093
+ markRead: (id: number) => Promise<{
3094
+ id: number;
3095
+ kind: string;
3096
+ title: string;
3097
+ body: string | null;
3098
+ link: string | null;
3099
+ createdAt: string;
3100
+ }>;
3101
+ markAllRead: () => Promise<{
3102
+ count: number;
3103
+ }>;
3104
+ };
3105
+ bus: {
3106
+ stops: () => Promise<{
3107
+ checkedAt: string | null;
3108
+ generations: {
3109
+ code: number;
3110
+ name: string;
3111
+ current: boolean;
3112
+ }[];
3113
+ stops: {
3114
+ id: string;
3115
+ name: string;
3116
+ highlighted: boolean;
3117
+ }[];
3118
+ }>;
3119
+ stop: (stopId: string, query?: {
3120
+ generation?: number;
3121
+ }) => Promise<{
3122
+ stop: {
3123
+ id: string;
3124
+ name: string;
3125
+ };
3126
+ generation: {
3127
+ code: number;
3128
+ name: string;
3129
+ current: boolean;
3130
+ };
3131
+ fetchedAt: string | null;
3132
+ checkedAt: string;
3133
+ platforms: {
3134
+ platformNo: number;
3135
+ platformName: string | null;
3136
+ day: "weekday" | "holiday";
3137
+ notes: string[];
3138
+ departures: {
3139
+ time: string;
3140
+ routes: string[];
3141
+ via: string | null;
3142
+ destination: string | null;
3143
+ marks: string[];
3144
+ }[];
3145
+ }[];
3146
+ }>;
3147
+ next: (query?: {
3148
+ stopId?: string;
3149
+ limit?: number;
3150
+ }) => Promise<{
3151
+ stops: {
3152
+ stop: {
3153
+ id: string;
3154
+ name: string;
3155
+ };
3156
+ generation: {
3157
+ code: number;
3158
+ name: string;
3159
+ current: boolean;
3160
+ } | null;
3161
+ checkedAt: string | null;
3162
+ upcoming: {
3163
+ serviceDate: string;
3164
+ time: string;
3165
+ minutesUntil: number;
3166
+ platformNo: number;
3167
+ platformName: string | null;
3168
+ routes: string[];
3169
+ via: string | null;
3170
+ destination: string | null;
3171
+ marks: string[];
3172
+ }[];
3173
+ platforms: {
3174
+ platformNo: number;
3175
+ platformName: string | null;
3176
+ notes: string[];
3177
+ }[];
3178
+ }[];
3179
+ }>;
3180
+ /** 「A から未来大へ」「未来大から A へ」の発車。A は、未来大を通る任意のバス停 */
3181
+ legs: (query: {
3182
+ stopId: string;
3183
+ direction: "toUniversity" | "fromUniversity";
3184
+ day?: "weekday" | "holiday";
3185
+ limit?: number;
3186
+ }) => Promise<{
3187
+ stop: {
3188
+ id: string;
3189
+ name: string;
3190
+ };
3191
+ direction: "toUniversity" | "fromUniversity";
3192
+ from: {
3193
+ id: string;
3194
+ name: string;
3195
+ };
3196
+ to: {
3197
+ id: string;
3198
+ name: string;
3199
+ };
3200
+ day: "weekday" | "holiday";
3201
+ todayDay: "weekday" | "holiday";
3202
+ generation: {
3203
+ code: number;
3204
+ name: string;
3205
+ current: boolean;
3206
+ } | null;
3207
+ checkedAt: string | null;
3208
+ departures: {
3209
+ time: string;
3210
+ from: {
3211
+ id: string;
3212
+ name: string;
3213
+ };
3214
+ to: {
3215
+ id: string;
3216
+ name: string;
3217
+ };
3218
+ platformNo: number;
3219
+ platformName: string | null;
3220
+ routes: string[];
3221
+ via: string | null;
3222
+ destination: string | null;
3223
+ marks: string[];
3224
+ arrivalTime: string | null;
3225
+ }[];
3226
+ upcoming: {
3227
+ time: string;
3228
+ from: {
3229
+ id: string;
3230
+ name: string;
3231
+ };
3232
+ to: {
3233
+ id: string;
3234
+ name: string;
3235
+ };
3236
+ platformNo: number;
3237
+ platformName: string | null;
3238
+ routes: string[];
3239
+ via: string | null;
3240
+ destination: string | null;
3241
+ marks: string[];
3242
+ serviceDate: string;
3243
+ minutesUntil: number;
3244
+ }[];
3245
+ notes: string[];
3246
+ }>;
3247
+ };
3248
+ };
3249
+ export type FunmaryClient = ReturnType<typeof createFunmaryClient>;
3250
+ //#endregion
3251
+ export type { components, paths };