@chukyo-umebo/web_parser 0.0.2 → 0.0.3
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/README.md +5 -5
- package/dist/cjs/albo/index.js +2 -1
- package/dist/cjs/albo/parser/albo.js +3 -1
- package/dist/cjs/albo/types/albo.js +46 -1
- package/dist/esm/albo/index.d.ts +2 -2
- package/dist/esm/albo/index.d.ts.map +1 -1
- package/dist/esm/albo/index.js +1 -1
- package/dist/esm/albo/parser/albo.d.ts +2 -1
- package/dist/esm/albo/parser/albo.d.ts.map +1 -1
- package/dist/esm/albo/parser/albo.js +2 -1
- package/dist/esm/albo/types/albo.d.ts +79 -0
- package/dist/esm/albo/types/albo.d.ts.map +1 -1
- package/dist/esm/albo/types/albo.js +45 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# @chukyo-
|
|
1
|
+
# @chukyo-umebo/web_parser
|
|
2
2
|
|
|
3
3
|
中京大学の各種システム(Albo, Cubics, Manabo)のHTMLを解析し、構造化されたデータとして抽出するためのTypeScriptライブラリです。
|
|
4
4
|
|
|
@@ -11,15 +11,15 @@
|
|
|
11
11
|
## インストール
|
|
12
12
|
|
|
13
13
|
```bash
|
|
14
|
-
bun add @chukyo-
|
|
14
|
+
bun add @chukyo-umebo/web_parser
|
|
15
15
|
# または
|
|
16
|
-
npm install @chukyo-
|
|
16
|
+
npm install @chukyo-umebo/web_parser
|
|
17
17
|
```
|
|
18
18
|
|
|
19
19
|
## 使い方
|
|
20
20
|
|
|
21
21
|
```typescript
|
|
22
|
-
import { parseManaboNews } from "@chukyo-
|
|
22
|
+
import { parseManaboNews } from "@chukyo-umebo/web_parser";
|
|
23
23
|
|
|
24
24
|
const html = `...`; // 取得したHTML文字列
|
|
25
25
|
const result = parseManaboNews(html);
|
|
@@ -33,7 +33,7 @@ if (result.success) {
|
|
|
33
33
|
|
|
34
34
|
## 対応システム
|
|
35
35
|
|
|
36
|
-
- **Albo**:
|
|
36
|
+
- **Albo**: お知らせ情報など
|
|
37
37
|
- **Cubics**: 履修登録、時間割など
|
|
38
38
|
- **Manabo**: ポータルサイト(お知らせ、課題、メールなど)
|
|
39
39
|
|
package/dist/cjs/albo/index.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.parseAlboPersonal = exports.parseAlboInformation = exports.parseAlboCalendar = void 0;
|
|
3
|
+
exports.parseAlboTimetable = exports.parseAlboPersonal = exports.parseAlboInformation = exports.parseAlboCalendar = void 0;
|
|
4
4
|
var albo_1 = require("./parser/albo");
|
|
5
5
|
Object.defineProperty(exports, "parseAlboCalendar", { enumerable: true, get: function () { return albo_1.parseAlboCalendar; } });
|
|
6
6
|
Object.defineProperty(exports, "parseAlboInformation", { enumerable: true, get: function () { return albo_1.parseAlboInformation; } });
|
|
7
7
|
Object.defineProperty(exports, "parseAlboPersonal", { enumerable: true, get: function () { return albo_1.parseAlboPersonal; } });
|
|
8
|
+
Object.defineProperty(exports, "parseAlboTimetable", { enumerable: true, get: function () { return albo_1.parseAlboTimetable; } });
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.parseAlboPersonal = exports.parseAlboInformation = exports.parseAlboCalendar = void 0;
|
|
3
|
+
exports.parseAlboTimetable = exports.parseAlboPersonal = exports.parseAlboInformation = exports.parseAlboCalendar = void 0;
|
|
4
4
|
const albo_1 = require("../types/albo");
|
|
5
5
|
const parseAlboJson = (input, schema) => {
|
|
6
6
|
try {
|
|
@@ -16,3 +16,5 @@ const parseAlboInformation = (json) => parseAlboJson(json, albo_1.AlboInformatio
|
|
|
16
16
|
exports.parseAlboInformation = parseAlboInformation;
|
|
17
17
|
const parseAlboPersonal = (json) => parseAlboJson(json, albo_1.AlboPersonalSchema);
|
|
18
18
|
exports.parseAlboPersonal = parseAlboPersonal;
|
|
19
|
+
const parseAlboTimetable = (json) => parseAlboJson(json, albo_1.AlboTimetableSchema);
|
|
20
|
+
exports.parseAlboTimetable = parseAlboTimetable;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.AlboPersonalSchema = exports.AlboPersonalUserSchema = exports.AlboPersonalGroupSchema = exports.AlboPersonalAuthProfileSchema = exports.AlboInformationSchema = exports.AlboInformationItemSchema = exports.AlboInformationFileSchema = exports.AlboInformationCategorySchema = exports.AlboCalendarSchema = exports.AlboCalendarItemSchema = void 0;
|
|
3
|
+
exports.AlboPersonalSchema = exports.AlboPersonalUserSchema = exports.AlboPersonalGroupSchema = exports.AlboPersonalAuthProfileSchema = exports.AlboInformationSchema = exports.AlboInformationItemSchema = exports.AlboInformationFileSchema = exports.AlboInformationCategorySchema = exports.AlboTimetableSchema = exports.AlboTimetableItemSchema = exports.AlboTimetableBadgeSchema = exports.AlboCalendarSchema = exports.AlboCalendarItemSchema = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
exports.AlboCalendarItemSchema = zod_1.z.object({
|
|
6
6
|
calendar_source_uuid: zod_1.z.string(),
|
|
@@ -24,6 +24,51 @@ exports.AlboCalendarSchema = zod_1.z.object({
|
|
|
24
24
|
items: zod_1.z.array(exports.AlboCalendarItemSchema),
|
|
25
25
|
}),
|
|
26
26
|
});
|
|
27
|
+
exports.AlboTimetableBadgeSchema = zod_1.z.object({
|
|
28
|
+
term: zod_1.z.string(),
|
|
29
|
+
});
|
|
30
|
+
exports.AlboTimetableItemSchema = zod_1.z.object({
|
|
31
|
+
uuid: zod_1.z.string(),
|
|
32
|
+
id: zod_1.z.string(),
|
|
33
|
+
execute_date: zod_1.z.string(),
|
|
34
|
+
day_of_week: zod_1.z.number(),
|
|
35
|
+
time_number: zod_1.z.number(),
|
|
36
|
+
class_id: zod_1.z.string(),
|
|
37
|
+
class_name: zod_1.z.string(),
|
|
38
|
+
term: zod_1.z.string(),
|
|
39
|
+
campus: zod_1.z.string(),
|
|
40
|
+
teacher: zod_1.z.string(),
|
|
41
|
+
room: zod_1.z.string().nullable(),
|
|
42
|
+
memo: zod_1.z.string(),
|
|
43
|
+
options: zod_1.z.unknown().nullable(),
|
|
44
|
+
created_at: zod_1.z.number(),
|
|
45
|
+
execute_school_year: zod_1.z.string(),
|
|
46
|
+
class_type: zod_1.z.number(),
|
|
47
|
+
memo_en: zod_1.z.string().nullable(),
|
|
48
|
+
options_en: zod_1.z.unknown().nullable(),
|
|
49
|
+
order: zod_1.z.number(),
|
|
50
|
+
badge: exports.AlboTimetableBadgeSchema,
|
|
51
|
+
term_en: zod_1.z.string(),
|
|
52
|
+
class_name_en: zod_1.z.string(),
|
|
53
|
+
campus_en: zod_1.z.string(),
|
|
54
|
+
cancels: zod_1.z.array(zod_1.z.unknown()),
|
|
55
|
+
extras: zod_1.z.array(zod_1.z.unknown()),
|
|
56
|
+
changes: zod_1.z.array(zod_1.z.unknown()),
|
|
57
|
+
});
|
|
58
|
+
exports.AlboTimetableSchema = zod_1.z.object({
|
|
59
|
+
is_successful: zod_1.z.boolean(),
|
|
60
|
+
code: zod_1.z.number(),
|
|
61
|
+
api_version: zod_1.z.number(),
|
|
62
|
+
gmt: zod_1.z.number(),
|
|
63
|
+
user: zod_1.z.unknown().nullable(),
|
|
64
|
+
result: zod_1.z.object({
|
|
65
|
+
time_table_type: zod_1.z.string(),
|
|
66
|
+
page_total: zod_1.z.number(),
|
|
67
|
+
page_size: zod_1.z.number(),
|
|
68
|
+
item_count: zod_1.z.number(),
|
|
69
|
+
items: zod_1.z.array(exports.AlboTimetableItemSchema),
|
|
70
|
+
}),
|
|
71
|
+
});
|
|
27
72
|
exports.AlboInformationCategorySchema = zod_1.z.object({
|
|
28
73
|
uuid: zod_1.z.string(),
|
|
29
74
|
name: zod_1.z.string(),
|
package/dist/esm/albo/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { parseAlboCalendar, parseAlboInformation, parseAlboPersonal } from "./parser/albo";
|
|
2
|
-
export { type AlboCalendarDTO, type AlboCalendarItemDTO, type AlboInformationDTO, type AlboInformationCategoryDTO, type AlboInformationFileDTO, type AlboInformationItemDTO, type AlboPersonalDTO, type AlboPersonalAuthProfileDTO, type AlboPersonalGroupDTO, type AlboPersonalUserDTO, } from "./types/albo";
|
|
1
|
+
export { parseAlboCalendar, parseAlboInformation, parseAlboPersonal, parseAlboTimetable } from "./parser/albo";
|
|
2
|
+
export { type AlboCalendarDTO, type AlboCalendarItemDTO, type AlboTimetableDTO, type AlboTimetableBadgeDTO, type AlboTimetableItemDTO, type AlboInformationDTO, type AlboInformationCategoryDTO, type AlboInformationFileDTO, type AlboInformationItemDTO, type AlboPersonalDTO, type AlboPersonalAuthProfileDTO, type AlboPersonalGroupDTO, type AlboPersonalUserDTO, } from "./types/albo";
|
|
3
3
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/albo/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/albo/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAC/G,OAAO,EACH,KAAK,eAAe,EACpB,KAAK,mBAAmB,EACxB,KAAK,gBAAgB,EACrB,KAAK,qBAAqB,EAC1B,KAAK,oBAAoB,EACzB,KAAK,kBAAkB,EACvB,KAAK,0BAA0B,EAC/B,KAAK,sBAAsB,EAC3B,KAAK,sBAAsB,EAC3B,KAAK,eAAe,EACpB,KAAK,0BAA0B,EAC/B,KAAK,oBAAoB,EACzB,KAAK,mBAAmB,GAC3B,MAAM,cAAc,CAAC"}
|
package/dist/esm/albo/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { parseAlboCalendar, parseAlboInformation, parseAlboPersonal } from "./parser/albo";
|
|
1
|
+
export { parseAlboCalendar, parseAlboInformation, parseAlboPersonal, parseAlboTimetable } from "./parser/albo";
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { ZodSafeParseResult } from "zod";
|
|
2
|
-
import { type AlboCalendarDTO, type AlboInformationDTO, type AlboPersonalDTO } from "../types/albo";
|
|
2
|
+
import { type AlboCalendarDTO, type AlboInformationDTO, type AlboPersonalDTO, type AlboTimetableDTO } from "../types/albo";
|
|
3
3
|
export declare const parseAlboCalendar: (json: string) => ZodSafeParseResult<AlboCalendarDTO>;
|
|
4
4
|
export declare const parseAlboInformation: (json: string) => ZodSafeParseResult<AlboInformationDTO>;
|
|
5
5
|
export declare const parseAlboPersonal: (json: string) => ZodSafeParseResult<AlboPersonalDTO>;
|
|
6
|
+
export declare const parseAlboTimetable: (json: string) => ZodSafeParseResult<AlboTimetableDTO>;
|
|
6
7
|
//# sourceMappingURL=albo.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"albo.d.ts","sourceRoot":"","sources":["../../../../src/albo/parser/albo.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,KAAK,CAAC;AAC9C,OAAO,EAEH,KAAK,eAAe,EAEpB,KAAK,kBAAkB,EAEvB,KAAK,eAAe,
|
|
1
|
+
{"version":3,"file":"albo.d.ts","sourceRoot":"","sources":["../../../../src/albo/parser/albo.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,KAAK,CAAC;AAC9C,OAAO,EAEH,KAAK,eAAe,EAEpB,KAAK,kBAAkB,EAEvB,KAAK,eAAe,EAEpB,KAAK,gBAAgB,EACxB,MAAM,eAAe,CAAC;AAUvB,eAAO,MAAM,iBAAiB,GAAI,MAAM,MAAM,KAAG,kBAAkB,CAAC,eAAe,CAA4C,CAAC;AAEhI,eAAO,MAAM,oBAAoB,GAAI,MAAM,MAAM,KAAG,kBAAkB,CAAC,kBAAkB,CAA+C,CAAC;AAEzI,eAAO,MAAM,iBAAiB,GAAI,MAAM,MAAM,KAAG,kBAAkB,CAAC,eAAe,CAA4C,CAAC;AAEhI,eAAO,MAAM,kBAAkB,GAAI,MAAM,MAAM,KAAG,kBAAkB,CAAC,gBAAgB,CAA6C,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AlboCalendarSchema, AlboInformationSchema, AlboPersonalSchema, } from "../types/albo";
|
|
1
|
+
import { AlboCalendarSchema, AlboInformationSchema, AlboPersonalSchema, AlboTimetableSchema, } from "../types/albo";
|
|
2
2
|
const parseAlboJson = (input, schema) => {
|
|
3
3
|
try {
|
|
4
4
|
return schema.safeParse(JSON.parse(input));
|
|
@@ -10,3 +10,4 @@ const parseAlboJson = (input, schema) => {
|
|
|
10
10
|
export const parseAlboCalendar = (json) => parseAlboJson(json, AlboCalendarSchema);
|
|
11
11
|
export const parseAlboInformation = (json) => parseAlboJson(json, AlboInformationSchema);
|
|
12
12
|
export const parseAlboPersonal = (json) => parseAlboJson(json, AlboPersonalSchema);
|
|
13
|
+
export const parseAlboTimetable = (json) => parseAlboJson(json, AlboTimetableSchema);
|
|
@@ -30,6 +30,85 @@ export declare const AlboCalendarSchema: z.ZodObject<{
|
|
|
30
30
|
}, z.core.$strip>;
|
|
31
31
|
}, z.core.$strip>;
|
|
32
32
|
export type AlboCalendarDTO = z.infer<typeof AlboCalendarSchema>;
|
|
33
|
+
export declare const AlboTimetableBadgeSchema: z.ZodObject<{
|
|
34
|
+
term: z.ZodString;
|
|
35
|
+
}, z.core.$strip>;
|
|
36
|
+
export type AlboTimetableBadgeDTO = z.infer<typeof AlboTimetableBadgeSchema>;
|
|
37
|
+
export declare const AlboTimetableItemSchema: z.ZodObject<{
|
|
38
|
+
uuid: z.ZodString;
|
|
39
|
+
id: z.ZodString;
|
|
40
|
+
execute_date: z.ZodString;
|
|
41
|
+
day_of_week: z.ZodNumber;
|
|
42
|
+
time_number: z.ZodNumber;
|
|
43
|
+
class_id: z.ZodString;
|
|
44
|
+
class_name: z.ZodString;
|
|
45
|
+
term: z.ZodString;
|
|
46
|
+
campus: z.ZodString;
|
|
47
|
+
teacher: z.ZodString;
|
|
48
|
+
room: z.ZodNullable<z.ZodString>;
|
|
49
|
+
memo: z.ZodString;
|
|
50
|
+
options: z.ZodNullable<z.ZodUnknown>;
|
|
51
|
+
created_at: z.ZodNumber;
|
|
52
|
+
execute_school_year: z.ZodString;
|
|
53
|
+
class_type: z.ZodNumber;
|
|
54
|
+
memo_en: z.ZodNullable<z.ZodString>;
|
|
55
|
+
options_en: z.ZodNullable<z.ZodUnknown>;
|
|
56
|
+
order: z.ZodNumber;
|
|
57
|
+
badge: z.ZodObject<{
|
|
58
|
+
term: z.ZodString;
|
|
59
|
+
}, z.core.$strip>;
|
|
60
|
+
term_en: z.ZodString;
|
|
61
|
+
class_name_en: z.ZodString;
|
|
62
|
+
campus_en: z.ZodString;
|
|
63
|
+
cancels: z.ZodArray<z.ZodUnknown>;
|
|
64
|
+
extras: z.ZodArray<z.ZodUnknown>;
|
|
65
|
+
changes: z.ZodArray<z.ZodUnknown>;
|
|
66
|
+
}, z.core.$strip>;
|
|
67
|
+
export type AlboTimetableItemDTO = z.infer<typeof AlboTimetableItemSchema>;
|
|
68
|
+
export declare const AlboTimetableSchema: z.ZodObject<{
|
|
69
|
+
is_successful: z.ZodBoolean;
|
|
70
|
+
code: z.ZodNumber;
|
|
71
|
+
api_version: z.ZodNumber;
|
|
72
|
+
gmt: z.ZodNumber;
|
|
73
|
+
user: z.ZodNullable<z.ZodUnknown>;
|
|
74
|
+
result: z.ZodObject<{
|
|
75
|
+
time_table_type: z.ZodString;
|
|
76
|
+
page_total: z.ZodNumber;
|
|
77
|
+
page_size: z.ZodNumber;
|
|
78
|
+
item_count: z.ZodNumber;
|
|
79
|
+
items: z.ZodArray<z.ZodObject<{
|
|
80
|
+
uuid: z.ZodString;
|
|
81
|
+
id: z.ZodString;
|
|
82
|
+
execute_date: z.ZodString;
|
|
83
|
+
day_of_week: z.ZodNumber;
|
|
84
|
+
time_number: z.ZodNumber;
|
|
85
|
+
class_id: z.ZodString;
|
|
86
|
+
class_name: z.ZodString;
|
|
87
|
+
term: z.ZodString;
|
|
88
|
+
campus: z.ZodString;
|
|
89
|
+
teacher: z.ZodString;
|
|
90
|
+
room: z.ZodNullable<z.ZodString>;
|
|
91
|
+
memo: z.ZodString;
|
|
92
|
+
options: z.ZodNullable<z.ZodUnknown>;
|
|
93
|
+
created_at: z.ZodNumber;
|
|
94
|
+
execute_school_year: z.ZodString;
|
|
95
|
+
class_type: z.ZodNumber;
|
|
96
|
+
memo_en: z.ZodNullable<z.ZodString>;
|
|
97
|
+
options_en: z.ZodNullable<z.ZodUnknown>;
|
|
98
|
+
order: z.ZodNumber;
|
|
99
|
+
badge: z.ZodObject<{
|
|
100
|
+
term: z.ZodString;
|
|
101
|
+
}, z.core.$strip>;
|
|
102
|
+
term_en: z.ZodString;
|
|
103
|
+
class_name_en: z.ZodString;
|
|
104
|
+
campus_en: z.ZodString;
|
|
105
|
+
cancels: z.ZodArray<z.ZodUnknown>;
|
|
106
|
+
extras: z.ZodArray<z.ZodUnknown>;
|
|
107
|
+
changes: z.ZodArray<z.ZodUnknown>;
|
|
108
|
+
}, z.core.$strip>>;
|
|
109
|
+
}, z.core.$strip>;
|
|
110
|
+
}, z.core.$strip>;
|
|
111
|
+
export type AlboTimetableDTO = z.infer<typeof AlboTimetableSchema>;
|
|
33
112
|
export declare const AlboInformationCategorySchema: z.ZodObject<{
|
|
34
113
|
uuid: z.ZodString;
|
|
35
114
|
name: z.ZodString;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
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;;;;;;;;;;;;;;iBA0CjC,CAAC;AAEH,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAEzE,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAW7B,CAAC;AAEH,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC"}
|
|
@@ -21,6 +21,51 @@ export const AlboCalendarSchema = z.object({
|
|
|
21
21
|
items: z.array(AlboCalendarItemSchema),
|
|
22
22
|
}),
|
|
23
23
|
});
|
|
24
|
+
export const AlboTimetableBadgeSchema = z.object({
|
|
25
|
+
term: z.string(),
|
|
26
|
+
});
|
|
27
|
+
export const AlboTimetableItemSchema = z.object({
|
|
28
|
+
uuid: z.string(),
|
|
29
|
+
id: z.string(),
|
|
30
|
+
execute_date: z.string(),
|
|
31
|
+
day_of_week: z.number(),
|
|
32
|
+
time_number: z.number(),
|
|
33
|
+
class_id: z.string(),
|
|
34
|
+
class_name: z.string(),
|
|
35
|
+
term: z.string(),
|
|
36
|
+
campus: z.string(),
|
|
37
|
+
teacher: z.string(),
|
|
38
|
+
room: z.string().nullable(),
|
|
39
|
+
memo: z.string(),
|
|
40
|
+
options: z.unknown().nullable(),
|
|
41
|
+
created_at: z.number(),
|
|
42
|
+
execute_school_year: z.string(),
|
|
43
|
+
class_type: z.number(),
|
|
44
|
+
memo_en: z.string().nullable(),
|
|
45
|
+
options_en: z.unknown().nullable(),
|
|
46
|
+
order: z.number(),
|
|
47
|
+
badge: AlboTimetableBadgeSchema,
|
|
48
|
+
term_en: z.string(),
|
|
49
|
+
class_name_en: z.string(),
|
|
50
|
+
campus_en: z.string(),
|
|
51
|
+
cancels: z.array(z.unknown()),
|
|
52
|
+
extras: z.array(z.unknown()),
|
|
53
|
+
changes: z.array(z.unknown()),
|
|
54
|
+
});
|
|
55
|
+
export const AlboTimetableSchema = z.object({
|
|
56
|
+
is_successful: z.boolean(),
|
|
57
|
+
code: z.number(),
|
|
58
|
+
api_version: z.number(),
|
|
59
|
+
gmt: z.number(),
|
|
60
|
+
user: z.unknown().nullable(),
|
|
61
|
+
result: z.object({
|
|
62
|
+
time_table_type: z.string(),
|
|
63
|
+
page_total: z.number(),
|
|
64
|
+
page_size: z.number(),
|
|
65
|
+
item_count: z.number(),
|
|
66
|
+
items: z.array(AlboTimetableItemSchema),
|
|
67
|
+
}),
|
|
68
|
+
});
|
|
24
69
|
export const AlboInformationCategorySchema = z.object({
|
|
25
70
|
uuid: z.string(),
|
|
26
71
|
name: z.string(),
|