Improve doc
This commit is contained in:
		
							parent
							
								
									02e4929a97
								
							
						
					
					
						commit
						b67f3438e9
					
				
					 10 changed files with 133 additions and 6 deletions
				
			
		| 
						 | 
					@ -30,7 +30,14 @@ export const meta = {
 | 
				
			||||||
			validator: $.optional.type(ID),
 | 
								validator: $.optional.type(ID),
 | 
				
			||||||
			transform: transform,
 | 
								transform: transform,
 | 
				
			||||||
		},
 | 
							},
 | 
				
			||||||
	}
 | 
						},
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						res: {
 | 
				
			||||||
 | 
							type: 'array',
 | 
				
			||||||
 | 
							items: {
 | 
				
			||||||
 | 
								type: 'Blocking',
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
						},
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export default define(meta, async (ps, me) => {
 | 
					export default define(meta, async (ps, me) => {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -30,7 +30,14 @@ export const meta = {
 | 
				
			||||||
			validator: $.optional.type(ID),
 | 
								validator: $.optional.type(ID),
 | 
				
			||||||
			transform: transform,
 | 
								transform: transform,
 | 
				
			||||||
		},
 | 
							},
 | 
				
			||||||
	}
 | 
						},
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						res: {
 | 
				
			||||||
 | 
							type: 'array',
 | 
				
			||||||
 | 
							items: {
 | 
				
			||||||
 | 
								type: 'Muting',
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
						},
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export default define(meta, async (ps, me) => {
 | 
					export default define(meta, async (ps, me) => {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -67,7 +67,14 @@ export const meta = {
 | 
				
			||||||
			validator: $.optional.type(ID),
 | 
								validator: $.optional.type(ID),
 | 
				
			||||||
			transform: transform,
 | 
								transform: transform,
 | 
				
			||||||
		},
 | 
							},
 | 
				
			||||||
	}
 | 
						},
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						res: {
 | 
				
			||||||
 | 
							type: 'array',
 | 
				
			||||||
 | 
							items: {
 | 
				
			||||||
 | 
								type: 'Note',
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
						},
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export default define(meta, async (ps) => {
 | 
					export default define(meta, async (ps) => {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -53,7 +53,14 @@ export const meta = {
 | 
				
			||||||
			]),
 | 
								]),
 | 
				
			||||||
			default: 'local'
 | 
								default: 'local'
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
	}
 | 
						},
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						res: {
 | 
				
			||||||
 | 
							type: 'array',
 | 
				
			||||||
 | 
							items: {
 | 
				
			||||||
 | 
								type: 'User',
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
						},
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
const state: any = { // < https://github.com/Microsoft/TypeScript/issues/1863
 | 
					const state: any = { // < https://github.com/Microsoft/TypeScript/issues/1863
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -52,6 +52,23 @@ export const meta = {
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
	},
 | 
						},
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						res: {
 | 
				
			||||||
 | 
							type: 'object',
 | 
				
			||||||
 | 
							properties: {
 | 
				
			||||||
 | 
								users: {
 | 
				
			||||||
 | 
									type: 'array',
 | 
				
			||||||
 | 
									items: {
 | 
				
			||||||
 | 
										type: 'User',
 | 
				
			||||||
 | 
									}
 | 
				
			||||||
 | 
								},
 | 
				
			||||||
 | 
								next: {
 | 
				
			||||||
 | 
									type: 'string',
 | 
				
			||||||
 | 
									format: 'id',
 | 
				
			||||||
 | 
									nullable: true
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
						},
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	errors: {
 | 
						errors: {
 | 
				
			||||||
		noSuchUser: {
 | 
							noSuchUser: {
 | 
				
			||||||
			message: 'No such user.',
 | 
								message: 'No such user.',
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -52,6 +52,23 @@ export const meta = {
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
	},
 | 
						},
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						res: {
 | 
				
			||||||
 | 
							type: 'object',
 | 
				
			||||||
 | 
							properties: {
 | 
				
			||||||
 | 
								users: {
 | 
				
			||||||
 | 
									type: 'array',
 | 
				
			||||||
 | 
									items: {
 | 
				
			||||||
 | 
										type: 'User',
 | 
				
			||||||
 | 
									}
 | 
				
			||||||
 | 
								},
 | 
				
			||||||
 | 
								next: {
 | 
				
			||||||
 | 
									type: 'string',
 | 
				
			||||||
 | 
									format: 'id',
 | 
				
			||||||
 | 
									nullable: true
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
						},
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	errors: {
 | 
						errors: {
 | 
				
			||||||
		noSuchUser: {
 | 
							noSuchUser: {
 | 
				
			||||||
			message: 'No such user.',
 | 
								message: 'No such user.',
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -29,6 +29,13 @@ export const meta = {
 | 
				
			||||||
		},
 | 
							},
 | 
				
			||||||
	},
 | 
						},
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						res: {
 | 
				
			||||||
 | 
							type: 'array',
 | 
				
			||||||
 | 
							items: {
 | 
				
			||||||
 | 
								type: 'User',
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
						},
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	errors: {
 | 
						errors: {
 | 
				
			||||||
		noSuchUser: {
 | 
							noSuchUser: {
 | 
				
			||||||
			message: 'No such user.',
 | 
								message: 'No such user.',
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -31,7 +31,14 @@ export const meta = {
 | 
				
			||||||
			validator: $.optional.num.min(0),
 | 
								validator: $.optional.num.min(0),
 | 
				
			||||||
			default: 0
 | 
								default: 0
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
	}
 | 
						},
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						res: {
 | 
				
			||||||
 | 
							type: 'array',
 | 
				
			||||||
 | 
							items: {
 | 
				
			||||||
 | 
								type: 'User',
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
						},
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export default define(meta, async (ps, me) => {
 | 
					export default define(meta, async (ps, me) => {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -52,6 +52,13 @@ export const meta = {
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
		},
 | 
							},
 | 
				
			||||||
	},
 | 
						},
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						res: {
 | 
				
			||||||
 | 
							type: 'array',
 | 
				
			||||||
 | 
							items: {
 | 
				
			||||||
 | 
								type: 'User',
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
						},
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export default define(meta, async (ps, me) => {
 | 
					export default define(meta, async (ps, me) => {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -221,5 +221,49 @@ export const schemas = {
 | 
				
			||||||
			},
 | 
								},
 | 
				
			||||||
		},
 | 
							},
 | 
				
			||||||
		required: ['id', 'createdAt', 'name', 'type', 'datasize', 'md5']
 | 
							required: ['id', 'createdAt', 'name', 'type', 'datasize', 'md5']
 | 
				
			||||||
	}
 | 
						},
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						Muting: {
 | 
				
			||||||
 | 
							type: 'object',
 | 
				
			||||||
 | 
							properties: {
 | 
				
			||||||
 | 
								id: {
 | 
				
			||||||
 | 
									type: 'string',
 | 
				
			||||||
 | 
									format: 'id',
 | 
				
			||||||
 | 
									description: 'The unique identifier for this mute.',
 | 
				
			||||||
 | 
									example: 'xxxxxxxxxxxxxxxxxxxxxxxx',
 | 
				
			||||||
 | 
								},
 | 
				
			||||||
 | 
								createdAt: {
 | 
				
			||||||
 | 
									type: 'string',
 | 
				
			||||||
 | 
									format: 'date-time',
 | 
				
			||||||
 | 
									description: 'The date that the mute was created.'
 | 
				
			||||||
 | 
								},
 | 
				
			||||||
 | 
								mutee: {
 | 
				
			||||||
 | 
									$ref: '#/components/schemas/User',
 | 
				
			||||||
 | 
									description: 'The mutee.'
 | 
				
			||||||
 | 
								},
 | 
				
			||||||
 | 
							},
 | 
				
			||||||
 | 
							required: ['id', 'createdAt', 'mutee']
 | 
				
			||||||
 | 
						},
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						Blocking: {
 | 
				
			||||||
 | 
							type: 'object',
 | 
				
			||||||
 | 
							properties: {
 | 
				
			||||||
 | 
								id: {
 | 
				
			||||||
 | 
									type: 'string',
 | 
				
			||||||
 | 
									format: 'id',
 | 
				
			||||||
 | 
									description: 'The unique identifier for this block.',
 | 
				
			||||||
 | 
									example: 'xxxxxxxxxxxxxxxxxxxxxxxx',
 | 
				
			||||||
 | 
								},
 | 
				
			||||||
 | 
								createdAt: {
 | 
				
			||||||
 | 
									type: 'string',
 | 
				
			||||||
 | 
									format: 'date-time',
 | 
				
			||||||
 | 
									description: 'The date that the block was created.'
 | 
				
			||||||
 | 
								},
 | 
				
			||||||
 | 
								blockee: {
 | 
				
			||||||
 | 
									$ref: '#/components/schemas/User',
 | 
				
			||||||
 | 
									description: 'The blockee.'
 | 
				
			||||||
 | 
								},
 | 
				
			||||||
 | 
							},
 | 
				
			||||||
 | 
							required: ['id', 'createdAt', 'blockee']
 | 
				
			||||||
 | 
						},
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue