598 lines
		
	
	
		
			12 KiB
		
	
	
	
		
			TypeScript
		
	
	
	
			
		
		
	
	
			598 lines
		
	
	
		
			12 KiB
		
	
	
	
		
			TypeScript
		
	
	
	
| // Code generated by protoc-gen-typescript-http. DO NOT EDIT.
 | |
| /* eslint-disable camelcase */
 | |
| // @ts-nocheck
 | |
| 
 | |
| /** 通用响应消息 */ 
 | |
| export type Empty = {
 | |
| };
 | |
| 
 | |
| /** 通用ID请求 */ 
 | |
| export type IDRequest = {
 | |
|   id?: number;
 | |
| };
 | |
| 
 | |
| export type IdentRequest = {
 | |
|   /** 唯一ID */ 
 | |
|   id?: number;
 | |
|   /** 唯一码 */ 
 | |
|   identity?: string;
 | |
| };
 | |
| 
 | |
| /** 通用ID列表请求 */ 
 | |
| export type IDListRequest = {
 | |
|   ids?: number[];
 | |
| };
 | |
| 
 | |
| /** 列表请求参数 */ 
 | |
| export type FetchRequest = {
 | |
|   /** 页数 */ 
 | |
|   page_no?: number;
 | |
|   /** 每页记录数 */ 
 | |
|   page_size?: number;
 | |
|   /** 条件参数,key=val,eg key:category_id=?,vlaue=11 */ 
 | |
|   params?: { [key: string]: string };
 | |
| };
 | |
| 
 | |
| /** 基础时间戳和ID结构 */ 
 | |
| export type StdIicuds = {
 | |
|   id?: number;
 | |
|   createdAt?: string;
 | |
|   updatedAt?: string;
 | |
|   deletedAt?: string;
 | |
| };
 | |
| 
 | |
| /** 用户身份信息 */ 
 | |
| export type StdPassport = {
 | |
|   passportId?: number;
 | |
|   passportIdentity?: string;
 | |
| };
 | |
| 
 | |
| /** 云盘基础信息 */ 
 | |
| export type CloudBase = {
 | |
|   cloudId?: number;
 | |
|   cloudIdentity?: string;
 | |
| };
 | |
| 
 | |
| /** 状态回复 */ 
 | |
| export type StatusReply = {
 | |
|   /** 数据 */ 
 | |
|   data?: string;
 | |
|   /** 响应时间序列 */ 
 | |
|   timeseq?: number;
 | |
| };
 | |
| 
 | |
| /** 请求消息定义 */ 
 | |
| export type CreateAlbumRequest = {
 | |
|   cloudId?: number;
 | |
|   cloudIdentity?: string;
 | |
|   /** 相册名称 */ 
 | |
|   name?: string;
 | |
|   /** 相册描述 */ 
 | |
|   description?: string;
 | |
|   /** 封面照片URL */ 
 | |
|   coverPhoto?: string;
 | |
|   /** 是否私有 */ 
 | |
|   isPrivate?: boolean;
 | |
| };
 | |
| 
 | |
| export type ListAlbumsResponse = {
 | |
|   albums?: CloudAlbumItem[];
 | |
|   total?: number;
 | |
| };
 | |
| 
 | |
| /** 相册模型 */ 
 | |
| export type CloudAlbumItem = {
 | |
|   id?: number;
 | |
|   identity?: string;
 | |
|   /** 相册名称 */ 
 | |
|   name?: string;
 | |
|   /** 相册描述 */ 
 | |
|   description?: string;
 | |
|   /** 封面照片URL */ 
 | |
|   coverPhoto?: string;
 | |
|   /** 是否私有 */ 
 | |
|   isPrivate?: boolean;
 | |
|   createdAt?: string;
 | |
|   updatedAt?: string;
 | |
|   /** 相册下的照片 */ 
 | |
|   /** 关联关系 */ 
 | |
|   photos?: CloudPhotoItem[];
 | |
| };
 | |
| 
 | |
| /** 照片模型 */ 
 | |
| export type CloudPhotoItem = {
 | |
|   id?: number;
 | |
|   identity?: string;
 | |
|   /** 专辑ID */ 
 | |
|   albumId?: number;
 | |
|   /** 照片标题 */ 
 | |
|   title?: string;
 | |
|   /** 照片描述 */ 
 | |
|   description?: string;
 | |
|   /** 文件路径 */ 
 | |
|   filePath?: string;
 | |
|   /** 文件大小 */ 
 | |
|   fileSize?: number;
 | |
|   /** 文件类型 */ 
 | |
|   mimeType?: string;
 | |
|   /** 图片宽度 */ 
 | |
|   width?: number;
 | |
|   /** 图片高度 */ 
 | |
|   height?: number;
 | |
|   /** 拍摄时间 */ 
 | |
|   takenAt?: string;
 | |
|   /** 拍摄地点 */ 
 | |
|   location?: string;
 | |
|   /** 标签,逗号分隔 */ 
 | |
|   tags?: string;
 | |
|   createdAt?: string;
 | |
|   updatedAt?: string;
 | |
|   /** 关联关系 */ 
 | |
|   album?: CloudAlbumItem;
 | |
| };
 | |
| 
 | |
| export type SetCoverPhotoRequest = {
 | |
|   albumId?: number;
 | |
|   photoId?: number;
 | |
| };
 | |
| 
 | |
| export type ListPhotosResponse = {
 | |
|   photos?: CloudPhotoItem[];
 | |
|   total?: number;
 | |
| };
 | |
| 
 | |
| export type MovePhotoRequest = {
 | |
|   photoId?: number;
 | |
|   newAlbumId?: number;
 | |
| };
 | |
| 
 | |
| /** 相册服务 */ 
 | |
| export interface Album {
 | |
| }
 | |
| 
 | |
| type RequestType = {
 | |
|   path: string;
 | |
|   method: string;
 | |
|   body: string | null;
 | |
| };
 | |
| 
 | |
| type RequestHandler = (request: RequestType, meta: { service: string, method: string }) => Promise<unknown>;
 | |
| 
 | |
| export function createAlbumClient(
 | |
|   handler: RequestHandler
 | |
| ): Album {
 | |
|   return {
 | |
|   };
 | |
| }
 | |
| export type CreateBookmarkRequest = {
 | |
|   cloudId?: number;
 | |
|   cloudIdentity?: string;
 | |
|   /** 标题 */ 
 | |
|   title?: string;
 | |
|   /** 网址 */ 
 | |
|   url?: string;
 | |
|   /** 描述 */ 
 | |
|   description?: string;
 | |
|   /** 分类 */ 
 | |
|   category?: string;
 | |
|   /** 标签 */ 
 | |
|   tags?: string;
 | |
|   /** 网站图标URL */ 
 | |
|   icon?: string;
 | |
|   /** 是否私有 */ 
 | |
|   isPrivate?: boolean;
 | |
| };
 | |
| 
 | |
| export type ListBookmarksResponse = {
 | |
|   bookmarks?: CloudBookmarkItem[];
 | |
|   total?: number;
 | |
| };
 | |
| 
 | |
| /** 网址收藏夹模型 */ 
 | |
| export type CloudBookmarkItem = {
 | |
|   id?: number;
 | |
|   identity?: string;
 | |
|   /** 标题 */ 
 | |
|   title?: string;
 | |
|   /** 网址 */ 
 | |
|   url?: string;
 | |
|   /** 描述 */ 
 | |
|   description?: string;
 | |
|   /** 分类 */ 
 | |
|   category?: string;
 | |
|   /** 标签 */ 
 | |
|   tags?: string;
 | |
|   /** 网站图标URL */ 
 | |
|   icon?: string;
 | |
|   /** 是否私有 */ 
 | |
|   isPrivate?: boolean;
 | |
|   createdAt?: string;
 | |
|   updatedAt?: string;
 | |
| };
 | |
| 
 | |
| export type ImportBookmarksRequest = {
 | |
|   /** JSON格式的书签数据 */ 
 | |
|   data?: string;
 | |
|   /** 导入格式: chrome, firefox, safari, etc. */ 
 | |
|   format?: string;
 | |
| };
 | |
| 
 | |
| /** 书签服务 */ 
 | |
| export interface Bookmark {
 | |
| }
 | |
| 
 | |
| export function createBookmarkClient(
 | |
|   handler: RequestHandler
 | |
| ): Bookmark {
 | |
|   return {
 | |
|   };
 | |
| }
 | |
| export type CreateDirRequest = {
 | |
|   cloudId?: number;
 | |
|   cloudIdentity?: string;
 | |
|   /** 支持嵌套目录 */ 
 | |
|   parentId?: number;
 | |
|   /** 目录名称 */ 
 | |
|   name?: string;
 | |
|   /** 完整路径 */ 
 | |
|   path?: string;
 | |
| };
 | |
| 
 | |
| /** 请求消息定义 */ 
 | |
| export type ListDirsResponse = {
 | |
|   dirs?: CloudDiskDirItem[];
 | |
|   total?: number;
 | |
| };
 | |
| 
 | |
| /** 云盘目录模型 */ 
 | |
| export type CloudDiskDirItem = {
 | |
|   id?: number;
 | |
|   identity?: string;
 | |
|   /** 支持嵌套目录 */ 
 | |
|   parentId?: number;
 | |
|   /** 目录名称 */ 
 | |
|   name?: string;
 | |
|   /** 完整路径 */ 
 | |
|   path?: string;
 | |
|   createdAt?: string;
 | |
|   updatedAt?: string;
 | |
|   /** 父级目录 */ 
 | |
|   /** 自关联 */ 
 | |
|   parent?: CloudDiskDirItem;
 | |
|   /** 子级目录 */ 
 | |
|   subdirectories?: CloudDiskDirItem[];
 | |
|   /** 文件 */ 
 | |
|   files?: CloudDiskFileItem[];
 | |
| };
 | |
| 
 | |
| /** 云盘文件 */ 
 | |
| export type CloudDiskFileItem = {
 | |
|   id?: number;
 | |
|   identity?: string;
 | |
|   /** 文件所属目录 */ 
 | |
|   directoryId?: number;
 | |
|   /** 文件名 */ 
 | |
|   name?: string;
 | |
|   /** 原始文件名 */ 
 | |
|   originalName?: string;
 | |
|   /** 文件大小 (bytes) */ 
 | |
|   size?: number;
 | |
|   /** 文件类型 */ 
 | |
|   mimeType?: string;
 | |
|   /** 实际存储路径 */ 
 | |
|   storagePath?: string;
 | |
|   /** 文件哈希,用于去重 */ 
 | |
|   hash?: string;
 | |
|   createdAt?: string;
 | |
|   updatedAt?: string;
 | |
|   /** 文件所属目录 */ 
 | |
|   /** 关联关系 */ 
 | |
|   directory?: CloudDiskDirItem;
 | |
| };
 | |
| 
 | |
| export type MoveDirRequest = {
 | |
|   id?: number;
 | |
|   newParentId?: number;
 | |
| };
 | |
| 
 | |
| export type ListFilesResponse = {
 | |
|   files?: CloudDiskFileItem[];
 | |
|   total?: number;
 | |
| };
 | |
| 
 | |
| export type MoveFileRequest = {
 | |
|   id?: number;
 | |
|   newDirectoryId?: number;
 | |
| };
 | |
| 
 | |
| export type CopyFileRequest = {
 | |
|   id?: number;
 | |
|   targetDirectoryId?: number;
 | |
|   newName?: string;
 | |
| };
 | |
| 
 | |
| export type CloudDiskFileRequest = {
 | |
|   cloudId?: number;
 | |
|   cloudIdentity?: string;
 | |
|   /** 文件所属目录 */ 
 | |
|   directoryId?: number;
 | |
|   /** 文件名 */ 
 | |
|   name?: string;
 | |
|   /** 原始文件名 */ 
 | |
|   originalName?: string;
 | |
|   /** 文件大小 (bytes) */ 
 | |
|   size?: number;
 | |
|   /** 文件类型 */ 
 | |
|   mimeType?: string;
 | |
|   /** 实际存储路径 */ 
 | |
|   storagePath?: string;
 | |
|   /** 文件哈希,用于去重 */ 
 | |
|   hash?: string;
 | |
| };
 | |
| 
 | |
| /** 云盘目录服务 */ 
 | |
| export interface Disk {
 | |
| }
 | |
| 
 | |
| export function createDiskClient(
 | |
|   handler: RequestHandler
 | |
| ): Disk {
 | |
|   return {
 | |
|   };
 | |
| }
 | |
| /** 请求消息定义 */ 
 | |
| export type CreateNoteRequest = {
 | |
|   cloudId?: number;
 | |
|   cloudIdentity?: string;
 | |
|   /** 标题 */ 
 | |
|   title?: string;
 | |
|   /** 内容 */ 
 | |
|   content?: string;
 | |
|   /** 分类 */ 
 | |
|   category?: string;
 | |
|   /** 标签,逗号分隔 */ 
 | |
|   tags?: string;
 | |
|   /** 是否是markdown格式 */ 
 | |
|   isMarkdown?: boolean;
 | |
|   /** 是否是置顶 */ 
 | |
|   isPinned?: boolean;
 | |
|   /** 是否是私有 */ 
 | |
|   isPrivate?: boolean;
 | |
| };
 | |
| 
 | |
| export type ListNotesResponse = {
 | |
|   notes?: CloudNoteItem[];
 | |
|   total?: number;
 | |
| };
 | |
| 
 | |
| /** 知识笔记模型 */ 
 | |
| export type CloudNoteItem = {
 | |
|   id?: number;
 | |
|   identity?: string;
 | |
|   /** 标题 */ 
 | |
|   title?: string;
 | |
|   /** 内容 */ 
 | |
|   content?: string;
 | |
|   /** 分类 */ 
 | |
|   category?: string;
 | |
|   /** 标签,逗号分隔 */ 
 | |
|   tags?: string;
 | |
|   /** 是否是markdown格式 */ 
 | |
|   isMarkdown?: boolean;
 | |
|   /** 是否是置顶 */ 
 | |
|   isPinned?: boolean;
 | |
|   /** 是否是私有 */ 
 | |
|   isPrivate?: boolean;
 | |
|   /** 浏览次数 */ 
 | |
|   views?: number;
 | |
|   createdAt?: string;
 | |
|   updatedAt?: string;
 | |
|   /** 关联关系 */ 
 | |
|   attachments?: NoteAttachmentItem[];
 | |
| };
 | |
| 
 | |
| /** 笔记附件模型 */ 
 | |
| export type NoteAttachmentItem = {
 | |
|   id?: number;
 | |
|   /** 笔记ID */ 
 | |
|   noteId?: number;
 | |
|   /** 文件名 */ 
 | |
|   fileName?: string;
 | |
|   /** 文件路径 */ 
 | |
|   filePath?: string;
 | |
|   /** 文件大小 */ 
 | |
|   fileSize?: number;
 | |
|   /** 文件类型 */ 
 | |
|   mimeType?: string;
 | |
|   /** 创建时间 */ 
 | |
|   createdAt?: string;
 | |
| };
 | |
| 
 | |
| export type TogglePinRequest = {
 | |
|   id?: number;
 | |
|   isPinned?: boolean;
 | |
| };
 | |
| 
 | |
| /** 笔记服务 */ 
 | |
| export interface Note {
 | |
| }
 | |
| 
 | |
| export function createNoteClient(
 | |
|   handler: RequestHandler
 | |
| ): Note {
 | |
|   return {
 | |
|   };
 | |
| }
 | |
| /** 请求消息定义 */ 
 | |
| export type CreatePrivateDataRequest = {
 | |
|   cloudId?: number;
 | |
|   cloudIdentity?: string;
 | |
|   /** 数据类型: password, card, document, etc. */ 
 | |
|   dataType?: string;
 | |
|   /** 标题 */ 
 | |
|   title?: string;
 | |
|   /** 描述 */ 
 | |
|   description?: string;
 | |
|   /** 加密存储的实际数据 */ 
 | |
|   data?: string;
 | |
|   /** 是否已加密 */ 
 | |
|   isEncrypted?: boolean;
 | |
|   /** 标签 */ 
 | |
|   tags?: string;
 | |
| };
 | |
| 
 | |
| export type ListPrivateDataResponse = {
 | |
|   data?: CloudPrivateItem[];
 | |
|   total?: number;
 | |
| };
 | |
| 
 | |
| /** 个人隐私数据模型 */ 
 | |
| export type CloudPrivateItem = {
 | |
|   id?: number;
 | |
|   identity?: string;
 | |
|   /** 数据类型: password, card, document, etc. */ 
 | |
|   dataType?: string;
 | |
|   /** 标题 */ 
 | |
|   title?: string;
 | |
|   /** 描述 */ 
 | |
|   description?: string;
 | |
|   /** 加密存储的实际数据 */ 
 | |
|   data?: string;
 | |
|   /** 是否已加密 */ 
 | |
|   isEncrypted?: boolean;
 | |
|   /** 标签 */ 
 | |
|   tags?: string;
 | |
|   createdAt?: string;
 | |
|   updatedAt?: string;
 | |
| };
 | |
| 
 | |
| export type DataRequest = {
 | |
|   /** 数据 */ 
 | |
|   data?: string;
 | |
|   /** 密钥KEY */ 
 | |
|   key?: string;
 | |
| };
 | |
| 
 | |
| /** 隐私数据服务 */ 
 | |
| export interface Private {
 | |
| }
 | |
| 
 | |
| export function createPrivateClient(
 | |
|   handler: RequestHandler
 | |
| ): Private {
 | |
|   return {
 | |
|   };
 | |
| }
 | |
| /** 请求消息定义 */ 
 | |
| export type CreateShareRequest = {
 | |
|   cloudId?: number;
 | |
|   cloudIdentity?: string;
 | |
|   /** file, album, note, etc. */ 
 | |
|   shareType?: string;
 | |
|   /** 对应资源的ID */ 
 | |
|   resourceId?: number;
 | |
|   /** 分享令牌 */ 
 | |
|   shareToken?: string;
 | |
|   /** 可选分享密码 */ 
 | |
|   password?: string;
 | |
|   /** 过期时间 */ 
 | |
|   expiresAt?: string;
 | |
|   /** 是否公开 */ 
 | |
|   isPublic?: boolean;
 | |
| };
 | |
| 
 | |
| export type ListSharesResponse = {
 | |
|   shares?: CloudShareItem[];
 | |
|   total?: number;
 | |
| };
 | |
| 
 | |
| /** 分享系统模型 */ 
 | |
| export type CloudShareItem = {
 | |
|   id?: number;
 | |
|   identity?: string;
 | |
|   /** file, album, note, etc. */ 
 | |
|   shareType?: string;
 | |
|   /** 对应资源的ID */ 
 | |
|   resourceId?: number;
 | |
|   /** 分享令牌 */ 
 | |
|   shareToken?: string;
 | |
|   /** 可选分享密码 */ 
 | |
|   password?: string;
 | |
|   /** 过期时间 */ 
 | |
|   expiresAt?: string;
 | |
|   /** 浏览次数 */ 
 | |
|   viewCount?: number;
 | |
|   /** 下载次数 */ 
 | |
|   downloadCount?: number;
 | |
|   /** 是否公开 */ 
 | |
|   isPublic?: boolean;
 | |
|   createdAt?: string;
 | |
|   updatedAt?: string;
 | |
| };
 | |
| 
 | |
| export type ValidateSharePasswordRequest = {
 | |
|   identity?: string;
 | |
|   password?: string;
 | |
| };
 | |
| 
 | |
| /** 分享服务 */ 
 | |
| export interface Share {
 | |
| }
 | |
| 
 | |
| export function createShareClient(
 | |
|   handler: RequestHandler
 | |
| ): Share {
 | |
|   return {
 | |
|   };
 | |
| }
 | |
| /** 系统统计和配置模型 */ 
 | |
| export type CloudSpace = {
 | |
|   id?: number;
 | |
|   identity?: string;
 | |
|   /** 总存储空间 */ 
 | |
|   totalStorage?: number;
 | |
|   /** 已用存储空间 */ 
 | |
|   usedStorage?: number;
 | |
|   /** 最大存储空间 */ 
 | |
|   maxStorage?: number;
 | |
|   /** 文件数量 */ 
 | |
|   fileCount?: number;
 | |
|   /** 相册数量 */ 
 | |
|   albumCount?: number;
 | |
|   /** 照片数量 */ 
 | |
|   photoCount?: number;
 | |
|   /** 笔记数量 */ 
 | |
|   noteCount?: number;
 | |
|   /** 书签数量 */ 
 | |
|   bookmarkCount?: number;
 | |
|   /** 私有数量 */ 
 | |
|   privateCount?: number;
 | |
|   createdAt?: string;
 | |
|   updatedAt?: string;
 | |
|   /** 关联云盘目录 */ 
 | |
|   /** 关联关系 */ 
 | |
|   cloudDiskDirs?: CloudDiskDirItem[];
 | |
|   /** 关联相册 */ 
 | |
|   cloudAlbums?: CloudAlbumItem[];
 | |
|   /** 关联笔记 */ 
 | |
|   cloudNotes?: CloudNoteItem[];
 | |
|   /** 关联书签 */ 
 | |
|   cloudBookmarks?: CloudBookmarkItem[];
 | |
|   /** 关联私有数据 */ 
 | |
|   cloudPrivate?: CloudPrivateItem[];
 | |
|   /** 关联分享 */ 
 | |
|   cloudShares?: CloudShareItem[];
 | |
| };
 | |
| 
 | |
| export interface Space {
 | |
| }
 | |
| 
 | |
| export function createSpaceClient(
 | |
|   handler: RequestHandler
 | |
| ): Space {
 | |
|   return {
 | |
|   };
 | |
| }
 | |
| 
 | |
| // @@protoc_insertion_point(typescript-http-eof)
 |