Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(types): update private API type definition #639

Merged
merged 1 commit into from
May 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
94 changes: 43 additions & 51 deletions packages/client/api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,8 @@ components:
type: string
type:
anyOf:
- const: 0
- enum:
- 0
type: number
- enum:
- 1
Expand Down Expand Up @@ -1090,8 +1091,7 @@ paths:
replyTo:
default: 0
description: 被回复的 topic ID, `0` 代表回复楼主
examples:
- 0
example: 0
type: integer
required:
- content
Expand Down Expand Up @@ -1750,14 +1750,11 @@ paths:
properties:
date:
description: YYYY-MM-DD
examples:
- '2022-02-02'
example: '2022-02-02'
pattern: ^\d{4}-\d{2}-\d{2}$
type: string
duration:
examples:
- '24:53'
- 24m52s
example: '24:53'
type: string
ep:
type: number
Expand All @@ -1769,7 +1766,8 @@ paths:
type: string
type:
anyOf:
- const: 0
- enum:
- 0
type: number
- enum:
- 1
Expand Down Expand Up @@ -1926,46 +1924,44 @@ paths:
minLength: 1
type: string
subject:
examples:
- infobox: |-
{{Infobox animanga/TVAnime
|中文名= 沙盒
|别名={
}
|话数= 7
|放送开始= 0000-10-06
|放送星期=
|官方网站=
|播放电视台=
|其他电视台=
|播放结束=
|其他=
|Copyright=
|平台={
[龟壳]
[Xbox Series S]
[Xbox Series X]
[Xbox Series X/S]
[PC]
[Xbox Series X|S]
}
}}
name: 沙盒
nsfw: false
platform: 0
summary: >-
本条目是一个沙盒,可以用于尝试bgm功能。
example:
infobox: |-
{{Infobox animanga/TVAnime
|中文名= 沙盒
|别名={
}
|话数= 7
|放送开始= 0000-10-06
|放送星期=
|官方网站=
|播放电视台=
|其他电视台=
|播放结束=
|其他=
|Copyright=
|平台={
[龟壳]
[Xbox Series S]
[Xbox Series X]
[Xbox Series X/S]
[PC]
[Xbox Series X|S]
}
}}
name: 沙盒
nsfw: false
platform: 0
summary: >-
本条目是一个沙盒,可以用于尝试bgm功能。


普通维基人可以随意编辑条目信息以及相关关联查看编辑效果,但是请不要完全删除沙盒说明并且不要关联非沙盒条目/人物/角色。
普通维基人可以随意编辑条目信息以及相关关联查看编辑效果,但是请不要完全删除沙盒说明并且不要关联非沙盒条目/人物/角色。


https://bgm.tv/group/topic/366812#post_1923517
https://bgm.tv/group/topic/366812#post_1923517
properties:
date:
examples:
- '0000-00-00'
- '2007-01-30'
example: '0000-00-00'
pattern: ^\d{4}-\d{2}-\d{2}$
type: string
infobox:
Expand Down Expand Up @@ -2130,8 +2126,7 @@ paths:
large:
type: string
medium:
examples:
- sai
example: sai
type: string
small:
type: string
Expand All @@ -2142,20 +2137,17 @@ paths:
title: Avatar
type: object
id:
examples:
- 1
example: 1
type: integer
nickname:
examples:
- Sai🖖
example: Sai🖖
type: string
sign:
type: string
user_group:
type: integer
username:
examples:
- sai
example: sai
type: string
required:
- id
Expand Down
4 changes: 2 additions & 2 deletions packages/client/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ export type EpisodeWikiInfo = {
name: string;
nameCN: string;
summary: string;
type: number | 1 | 2 | 3 | 4 | 5 | 6;
type: 0 | 1 | 2 | 3 | 4 | 5 | 6;
};
export type WikiPlatform = {
id: number;
Expand Down Expand Up @@ -756,7 +756,7 @@ export function patchEpisodeWikiInfo(
name?: string;
nameCN?: string;
summary?: string;
type?: number | 1 | 2 | 3 | 4 | 5 | 6;
type?: 0 | 1 | 2 | 3 | 4 | 5 | 6;
};
},
opts?: Oazapfts.RequestOpts,
Expand Down
21 changes: 20 additions & 1 deletion packages/client/types/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -579,6 +579,7 @@ export interface operations {
/**
* @description 被回复的 topic ID, `0` 代表回复楼主
* @default 0
* @example 0
*/
replyTo?: number;
};
Expand Down Expand Up @@ -976,8 +977,12 @@ export interface operations {
'application/json': {
commitMessage: string;
episode: {
/** @description YYYY-MM-DD */
/**
* @description YYYY-MM-DD
* @example 2022-02-02
*/
date?: string;
/** @example 24:53 */
duration?: string;
ep?: number;
name?: string;
Expand Down Expand Up @@ -1117,7 +1122,17 @@ export interface operations {
*/
'application/json': {
commitMessage: string;
/**
* @example {
* "infobox": "{{Infobox animanga/TVAnime\n|中文名= 沙盒\n|别名={\n}\n|话数= 7\n|放送开始= 0000-10-06\n|放送星期= \n|官方网站= \n|播放电视台= \n|其他电视台= \n|播放结束= \n|其他= \n|Copyright= \n|平台={\n[龟壳]\n[Xbox Series S]\n[Xbox Series X]\n[Xbox Series X/S]\n[PC]\n[Xbox Series X|S]\n}\n}}",
* "name": "沙盒",
* "nsfw": false,
* "platform": 0,
* "summary": "本条目是一个沙盒,可以用于尝试bgm功能。\n\n普通维基人可以随意编辑条目信息以及相关关联查看编辑效果,但是请不要完全删除沙盒说明并且不要关联非沙盒条目/人物/角色。\n\nhttps://bgm.tv/group/topic/366812#post_1923517"
* }
*/
subject: {
/** @example 0000-00-00 */
date?: string;
infobox?: string;
name?: string;
Expand Down Expand Up @@ -1163,13 +1178,17 @@ export interface operations {
/** Avatar */
avatar: {
large: string;
/** @example sai */
medium: string;
small: string;
};
/** @example 1 */
id: number;
/** @example Sai🖖 */
nickname: string;
sign: string;
user_group: number;
/** @example sai */
username: string;
};
id: number;
Expand Down
Loading