🎨 优化小程序云开发接口类的注释文档

This commit is contained in:
Binary Wang
2025-07-02 10:17:11 +08:00
parent 4731479b93
commit a45f0ac048

View File

@ -16,539 +16,457 @@ import java.util.Map;
*/ */
public interface WxMaCloudService { public interface WxMaCloudService {
/** /**
* Invoke cloud function string. * 触发云函数。注意HTTP API 途径触发云函数不包含用户信息。
* *
* @param name the name * @param name 云函数名称
* @param body the body * @param body 云函数的传入参数,具体结构由开发者定义
* @return the string * @return 云函数返回的buffer
* @throws WxErrorException the wx error exception * @throws WxErrorException 调用失败时抛出
*/ */
String invokeCloudFunction(String name, String body) throws WxErrorException; String invokeCloudFunction(String name, String body) throws WxErrorException;
/** /**
* <pre>
* 触发云函数。注意HTTP API 途径触发云函数不包含用户信息。 * 触发云函数。注意HTTP API 途径触发云函数不包含用户信息。
* 文档地址https://developers.weixin.qq.com/miniprogram/dev/wxcloud/reference-http-api/functions/invokeCloudFunction.html * 文档地址https://developers.weixin.qq.com/miniprogram/dev/wxcloud/reference-http-api/functions/invokeCloudFunction.html
* *
* 请求地址 * @param env 云开发环境ID
* POST https://api.weixin.qq.com/tcb/invokecloudfunction?access_token=ACCESS_TOKEN&env=ENV&name=FUNCTION_NAME * @param name 云函数名称
* * @param body 云函数的传入参数,具体结构由开发者定义
* </pre> * @return 云函数返回的buffer
* * @throws WxErrorException 调用失败时抛出
* @param env string 是 云开发环境ID
* @param name string 是 云函数名称
* @param body string 是 云函数的传入参数,具体结构由开发者定义。
* @return resp_data string 云函数返回的buffer
* @throws WxErrorException .
*/ */
String invokeCloudFunction(String env, String name, String body) throws WxErrorException; String invokeCloudFunction(String env, String name, String body) throws WxErrorException;
/** /**
* Add list. * 批量添加记录到集合。
* *
* @param collection the collection * @param collection 集合名称
* @param list the list * @param list 要添加的记录列表
* @return the list * @return 插入成功的记录ID列表
* @throws WxErrorException the wx error exception * @throws WxErrorException 添加失败时抛出
*/ */
List<String> add(String collection, List<?> list) throws WxErrorException; List<String> add(String collection, List<?> list) throws WxErrorException;
/** /**
* Add string. * 添加单条记录到集合。
* *
* @param collection the collection * @param collection 集合名称
* @param obj the obj * @param obj 要添加的记录对象
* @return the string * @return 插入成功的记录ID
* @throws WxErrorException the wx error exception * @throws WxErrorException 添加失败时抛出
*/ */
String add(String collection, Object obj) throws WxErrorException; String add(String collection, Object obj) throws WxErrorException;
/** /**
* Database add json array. * 数据库插入记录。
* *
* @param query the query * @param query 数据库操作语句
* @return the json array * @return 插入成功的数据集合主键_id列表
* @throws WxErrorException the wx error exception * @throws WxErrorException 插入失败时抛出
*/ */
JsonArray databaseAdd(String query) throws WxErrorException; JsonArray databaseAdd(String query) throws WxErrorException;
/** /**
* <pre> * 数据库插入记录。
* 数据库插入记录
*
* 文档地址https://developers.weixin.qq.com/miniprogram/dev/wxcloud/reference-http-api/database/databaseAdd.html * 文档地址https://developers.weixin.qq.com/miniprogram/dev/wxcloud/reference-http-api/database/databaseAdd.html
* 请求地址POST https://api.weixin.qq.com/tcb/databaseadd?access_token=ACCESS_TOKEN
* </pre>
* *
* @param env 云环境ID * @param env 云环境ID
* @param query 数据库操作语句 * @param query 数据库操作语句
* @return 插入成功的数据集合主键_id json array * @return 插入成功的数据集合主键_id列表
* @throws WxErrorException . * @throws WxErrorException 插入失败时抛出
*/ */
JsonArray databaseAdd(String env, String query) throws WxErrorException; JsonArray databaseAdd(String env, String query) throws WxErrorException;
/** /**
* Delete integer. * 删除集合中符合条件的记录。
* *
* @param collection the collection * @param collection 集合名称
* @param whereJson the where json * @param whereJson 查询条件JSON字符串
* @return the integer * @return 删除的记录数量
* @throws WxErrorException the wx error exception * @throws WxErrorException 删除失败时抛出
*/ */
Integer delete(String collection, String whereJson) throws WxErrorException; Integer delete(String collection, String whereJson) throws WxErrorException;
/** /**
* Database delete int. * 数据库删除记录。
* *
* @param query the query * @param query 数据库操作语句
* @return the int * @return 删除记录数量
* @throws WxErrorException the wx error exception * @throws WxErrorException 删除失败时抛出
*/ */
int databaseDelete(String query) throws WxErrorException; int databaseDelete(String query) throws WxErrorException;
/** /**
* <pre> * 数据库删除记录。
* 数据库删除记录
*
* 文档地址https://developers.weixin.qq.com/miniprogram/dev/wxcloud/reference-http-api/database/databaseDelete.html * 文档地址https://developers.weixin.qq.com/miniprogram/dev/wxcloud/reference-http-api/database/databaseDelete.html
* 请求地址POST https://api.weixin.qq.com/tcb/databasedelete?access_token=ACCESS_TOKEN
* </pre>
* *
* @param env 云环境ID * @param env 云环境ID
* @param query 数据库操作语句 * @param query 数据库操作语句
* @return 删除记录数量 int * @return 删除记录数量
* @throws WxErrorException . * @throws WxErrorException 删除失败时抛出
*/ */
int databaseDelete(String env, String query) throws WxErrorException; int databaseDelete(String env, String query) throws WxErrorException;
/** /**
* Update wx cloud database update result. * 更新集合中符合条件的记录。
* *
* @param collection the collection * @param collection 集合名称
* @param whereJson the where json * @param whereJson 查询条件JSON字符串
* @param updateJson the update json * @param updateJson 更新内容JSON字符串
* @return the wx cloud database update result * @return 更新结果对象
* @throws WxErrorException the wx error exception * @throws WxErrorException 更新失败时抛出
*/ */
WxCloudDatabaseUpdateResult update(String collection, String whereJson, String updateJson) throws WxErrorException; WxCloudDatabaseUpdateResult update(String collection, String whereJson, String updateJson) throws WxErrorException;
/** /**
* Database update wx cloud database update result. * 数据库更新记录。
* *
* @param query the query * @param query 数据库操作语句
* @return the wx cloud database update result * @return 更新结果对象
* @throws WxErrorException the wx error exception * @throws WxErrorException 更新失败时抛出
*/ */
WxCloudDatabaseUpdateResult databaseUpdate(String query) throws WxErrorException; WxCloudDatabaseUpdateResult databaseUpdate(String query) throws WxErrorException;
/** /**
* <pre> * 数据库更新记录。
* 数据库更新记录
*
* 文档地址https://developers.weixin.qq.com/miniprogram/dev/wxcloud/reference-http-api/database/databaseUpdate.html * 文档地址https://developers.weixin.qq.com/miniprogram/dev/wxcloud/reference-http-api/database/databaseUpdate.html
* 请求地址POST https://api.weixin.qq.com/tcb/databaseupdate?access_token=ACCESS_TOKEN
* </pre>
* *
* @param env 云环境ID * @param env 云环境ID
* @param query 数据库操作语句 * @param query 数据库操作语句
* @return . wx cloud database update result * @return 更新结果对象
* @throws WxErrorException . * @throws WxErrorException 更新失败时抛出
*/ */
WxCloudDatabaseUpdateResult databaseUpdate(String env, String query) throws WxErrorException; WxCloudDatabaseUpdateResult databaseUpdate(String env, String query) throws WxErrorException;
/** /**
* 查询集合中的记录。
* 示例:
* db.collection('geo') * db.collection('geo')
* .where({ * .where({price: _.gt(10)})
* price: _.gt(10) * .orderBy('_id', 'asc')
* }) * .orderBy('price', 'desc')
* .orderBy('_id', 'asc') * .skip(1)
* .orderBy('price', 'desc') * .limit(10)
* .skip(1) * .get()
* .limit(10)
* .get()
* *
* @param collection the collection * @param collection 集合名称
* @param whereJson the where json * @param whereJson 查询条件JSON字符串
* @param orderBy the order by * @param orderBy 排序条件Map
* @param skip the skip * @param skip 跳过记录数
* @param limit the limit * @param limit 限制返回记录数
* @return wx cloud database query result * @return 查询结果对象
* @throws WxErrorException the wx error exception * @throws WxErrorException 查询失败时抛出
*/ */
WxCloudDatabaseQueryResult query(String collection, String whereJson, Map<String, String> orderBy, WxCloudDatabaseQueryResult query(String collection, String whereJson, Map<String, String> orderBy,
Integer skip, Integer limit) throws WxErrorException; Integer skip, Integer limit) throws WxErrorException;
/** /**
* Database query wx cloud database query result. * 数据库查询记录。
* *
* @param query the query * @param query 数据库操作语句
* @return the wx cloud database query result * @return 查询结果对象
* @throws WxErrorException the wx error exception * @throws WxErrorException 查询失败时抛出
*/ */
WxCloudDatabaseQueryResult databaseQuery(String query) throws WxErrorException; WxCloudDatabaseQueryResult databaseQuery(String query) throws WxErrorException;
/** /**
* <pre> * 数据库查询记录。
* 数据库查询记录
*
* 文档地址https://developers.weixin.qq.com/miniprogram/dev/wxcloud/reference-http-api/database/databaseQuery.html * 文档地址https://developers.weixin.qq.com/miniprogram/dev/wxcloud/reference-http-api/database/databaseQuery.html
* 请求地址POST https://api.weixin.qq.com/tcb/databasequery?access_token=ACCESS_TOKEN
* </pre>
* *
* @param env 云环境ID * @param env 云环境ID
* @param query 数据库操作语句 * @param query 数据库操作语句
* @return . wx cloud database query result * @return 查询结果对象
* @throws WxErrorException . * @throws WxErrorException 查询失败时抛出
*/ */
WxCloudDatabaseQueryResult databaseQuery(String env, String query) throws WxErrorException; WxCloudDatabaseQueryResult databaseQuery(String env, String query) throws WxErrorException;
/** /**
* Database aggregate json array. * 数据库聚合记录。
* *
* @param query the query * @param query 数据库操作语句
* @return the json array * @return 聚合结果JSON数组
* @throws WxErrorException the wx error exception * @throws WxErrorException 聚合失败时抛出
*/ */
JsonArray databaseAggregate(String query) throws WxErrorException; JsonArray databaseAggregate(String query) throws WxErrorException;
/** /**
* <pre> * 数据库聚合记录。
* 数据库聚合记录
*
* 文档地址https://developers.weixin.qq.com/miniprogram/dev/wxcloud/reference-http-api/database/databaseAggregate.html * 文档地址https://developers.weixin.qq.com/miniprogram/dev/wxcloud/reference-http-api/database/databaseAggregate.html
* 请求地址POST https://api.weixin.qq.com/tcb/databaseaggregate?access_token=ACCESS_TOKEN
* </pre>
* *
* @param env 云环境ID * @param env 云环境ID
* @param query 数据库操作语句 * @param query 数据库操作语句
* @return . json array * @return 聚合结果JSON数组
* @throws WxErrorException . * @throws WxErrorException 聚合失败时抛出
*/ */
JsonArray databaseAggregate(String env, String query) throws WxErrorException; JsonArray databaseAggregate(String env, String query) throws WxErrorException;
/** /**
* Count long. * 统计集合中符合条件的记录数。
* *
* @param collection the collection * @param collection 集合名称
* @param whereJson the where json * @param whereJson 查询条件JSON字符串
* @return the long * @return 记录数量
* @throws WxErrorException the wx error exception * @throws WxErrorException 统计失败时抛出
*/ */
Long count(String collection, String whereJson) throws WxErrorException; Long count(String collection, String whereJson) throws WxErrorException;
/** /**
* Database count long. * 统计集合记录数或统计查询语句对应的结果记录数。
* *
* @param query the query * @param query 数据库操作语句
* @return the long * @return 记录数量
* @throws WxErrorException the wx error exception * @throws WxErrorException 统计失败时抛出
*/ */
Long databaseCount(String query) throws WxErrorException; Long databaseCount(String query) throws WxErrorException;
/** /**
* <pre> * 统计集合记录数或统计查询语句对应的结果记录数。
* 统计集合记录数或统计查询语句对应的结果记录数
*
* 文档地址https://developers.weixin.qq.com/miniprogram/dev/wxcloud/reference-http-api/database/databaseCount.html * 文档地址https://developers.weixin.qq.com/miniprogram/dev/wxcloud/reference-http-api/database/databaseCount.html
* 请求地址POST https://api.weixin.qq.com/tcb/databasecount?access_token=ACCESS_TOKEN
* </pre>
* *
* @param env 云环境ID * @param env 云环境ID
* @param query 数据库操作语句 * @param query 数据库操作语句
* @return 记录数量 long * @return 记录数量
* @throws WxErrorException . * @throws WxErrorException 统计失败时抛出
*/ */
Long databaseCount(String env, String query) throws WxErrorException; Long databaseCount(String env, String query) throws WxErrorException;
/** /**
* Update index. * 变更数据库索引。
* *
* @param collectionName the collection name * @param collectionName 集合名称
* @param createIndexes the create indexes * @param createIndexes 新增索引对象列表
* @param dropIndexNames the drop index names * @param dropIndexNames 要删除的索引名称列表
* @throws WxErrorException the wx error exception * @throws WxErrorException 更新失败时抛出
*/ */
void updateIndex(String collectionName, List<WxCloudDatabaseCreateIndexRequest> createIndexes, void updateIndex(String collectionName, List<WxCloudDatabaseCreateIndexRequest> createIndexes,
List<String> dropIndexNames) throws WxErrorException; List<String> dropIndexNames) throws WxErrorException;
/** /**
* <pre> * 变更数据库索引。
* 变更数据库索引
*
* 文档地址https://developers.weixin.qq.com/miniprogram/dev/wxcloud/reference-http-api/database/updateIndex.html * 文档地址https://developers.weixin.qq.com/miniprogram/dev/wxcloud/reference-http-api/database/updateIndex.html
* 请求地址POST https://api.weixin.qq.com/tcb/updateindex?access_token=ACCESS_TOKEN
* </pre>
* *
* @param env 云环境ID * @param env 云环境ID
* @param collectionName 集合名称 * @param collectionName 集合名称
* @param createIndexes 新增索引对象 * @param createIndexes 新增索引对象列表
* @param dropIndexNames 要删除的索引的名字 * @param dropIndexNames 要删除的索引名称列表
* @throws WxErrorException . * @throws WxErrorException 更新失败时抛出
*/ */
void updateIndex(String env, String collectionName, List<WxCloudDatabaseCreateIndexRequest> createIndexes, void updateIndex(String env, String collectionName, List<WxCloudDatabaseCreateIndexRequest> createIndexes,
List<String> dropIndexNames) throws WxErrorException; List<String> dropIndexNames) throws WxErrorException;
/** /**
* Database migrate import long. * 数据库导入。
* *
* @param collectionName the collection name * @param collectionName 导入collection
* @param filePath the file path * @param filePath 导入文件路径
* @param fileType the file type * @param fileType 导入文件类型1JSON2CSV
* @param stopOnError the stop on error * @param stopOnError 是否在遇到错误时停止导入
* @param conflictMode the conflict mode * @param conflictMode 冲突处理模式1INSERT2UPSERT
* @return the long * @return 任务ID
* @throws WxErrorException the wx error exception * @throws WxErrorException 导入失败时抛出
*/ */
Long databaseMigrateImport(String collectionName, String filePath, int fileType, Long databaseMigrateImport(String collectionName, String filePath, int fileType,
boolean stopOnError, int conflictMode) throws WxErrorException; boolean stopOnError, int conflictMode) throws WxErrorException;
/** /**
* <pre> * 数据库导入。
* 数据库导入 * 文档地址https://developers.weixin.qq.com/miniprogram/dev/wxcloud/reference-http-api/database/databaseMigrateImport.html
* 注意导入文件需先上传到同环境的存储中可使用开发者工具或HTTP API的上传文件API上传
* *
* 文档地址https://developers.weixin.qq.com/miniprogram/dev/wxcloud/reference-http-api/database/databaseMigrateImport * @param env 云环境ID
* .html * @param collectionName 导入collection名
* 请求地址: POST https://api.weixin.qq.com/tcb/databasemigrateimport?access_token=ACCESS_TOKEN * @param filePath 导入文件路径
* </pre> * @param fileType 导入文件类型1JSON2CSV
* * @param stopOnError 是否在遇到错误时停止导入
* @param env 云环境ID * @param conflictMode 冲突处理模式1INSERT2UPSERT
* @param collectionName 导入collection名 * @return 任务ID
* @param filePath 导入文件路径(导入文件需先上传到同环境的存储中,可使用开发者工具或 HTTP API的上传文件 API上传 * @throws WxErrorException 导入失败时抛出
* @param fileType 导入文件类型, 1 JSON 2 CSV
* @param stopOnError 是否在遇到错误时停止导入
* @param conflictMode 冲突处理模式 1 INSERT , 2 UPSERT
* @return jobId long
* @throws WxErrorException .
*/ */
Long databaseMigrateImport(String env, String collectionName, String filePath, int fileType, boolean stopOnError, Long databaseMigrateImport(String env, String collectionName, String filePath, int fileType, boolean stopOnError,
int conflictMode) throws WxErrorException; int conflictMode) throws WxErrorException;
/** /**
* Database migrate export long. * 数据库导出。
* *
* @param filePath the file path * @param filePath 导出文件路径
* @param fileType the file type * @param fileType 导出文件类型1JSON2CSV
* @param query the query * @param query 导出条件
* @return the long * @return 任务ID
* @throws WxErrorException the wx error exception * @throws WxErrorException 导出失败时抛出
*/ */
Long databaseMigrateExport(String filePath, int fileType, String query) throws WxErrorException; Long databaseMigrateExport(String filePath, int fileType, String query) throws WxErrorException;
/** /**
* <pre> * 数据库导出。
* 数据库导出 * 文档地址https://developers.weixin.qq.com/miniprogram/dev/wxcloud/reference-http-api/database/databaseMigrateExport.html
* 注意文件会导出到同环境的云存储中可使用获取下载链接API获取下载链接
* *
* 文档地址https://developers.weixin.qq.com/miniprogram/dev/wxcloud/reference-http-api/database/databaseMigrateExport * @param env 云环境ID
* .html * @param filePath 导出文件路径
* 请求地址: POST https://api.weixin.qq.com/tcb/databasemigrateexport?access_token=ACCESS_TOKEN * @param fileType 导出文件类型1JSON2CSV
* </pre> * @param query 导出条件
* * @return 任务ID
* @param env 云环境ID * @throws WxErrorException 导出失败时抛出
* @param filePath 导出文件路径(文件会导出到同环境的云存储中,可使用获取下载链接 API 获取下载链接)
* @param fileType 导出文件类型, 1 JSON 2 CSV
* @param query 导出条件
* @return jobId long
* @throws WxErrorException .
*/ */
Long databaseMigrateExport(String env, String filePath, int fileType, String query) throws WxErrorException; Long databaseMigrateExport(String env, String filePath, int fileType, String query) throws WxErrorException;
/** /**
* Database migrate query info wx cloud cloud database migrate query info result. * 数据库迁移状态查询。
* *
* @param jobId the job id * @param jobId 迁移任务ID
* @return the wx cloud cloud database migrate query info result * @return 迁移状态查询结果
* @throws WxErrorException the wx error exception * @throws WxErrorException 查询失败时抛出
*/ */
WxCloudCloudDatabaseMigrateQueryInfoResult databaseMigrateQueryInfo(Long jobId) throws WxErrorException; WxCloudCloudDatabaseMigrateQueryInfoResult databaseMigrateQueryInfo(Long jobId) throws WxErrorException;
/** /**
* <pre> * 数据库迁移状态查询。
* 数据库迁移状态查询 * 文档地址https://developers.weixin.qq.com/miniprogram/dev/wxcloud/reference-http-api/database/databaseMigrateQueryInfo.html
* *
* 文档地址https://developers.weixin.qq.com/miniprogram/dev/wxcloud/reference-http-api/database * @param env 云环境ID
* /databaseMigrateQueryInfo.html * @param jobId 迁移任务ID
* 请求地址POST https://api.weixin.qq.com/tcb/databasemigratequeryinfo?access_token=ACCESS_TOKEN * @return 迁移状态查询结果
* </pre> * @throws WxErrorException 查询失败时抛出
*
* @param env 云环境ID
* @param jobId 迁移任务ID
* @return . wx cloud cloud database migrate query info result
* @throws WxErrorException .
*/ */
WxCloudCloudDatabaseMigrateQueryInfoResult databaseMigrateQueryInfo(String env, Long jobId) throws WxErrorException; WxCloudCloudDatabaseMigrateQueryInfoResult databaseMigrateQueryInfo(String env, Long jobId) throws WxErrorException;
/** /**
* Upload file wx cloud upload file result. * 获取文件上传链接。
* *
* @param path the path * @param path 上传路径
* @return the wx cloud upload file result * @return 上传结果对象
* @throws WxErrorException the wx error exception * @throws WxErrorException 获取失败时抛出
*/ */
WxCloudUploadFileResult uploadFile(String path) throws WxErrorException; WxCloudUploadFileResult uploadFile(String path) throws WxErrorException;
/** /**
* <pre> * 获取文件上传链接。
* 获取文件上传链接
*
* 文档地址https://developers.weixin.qq.com/miniprogram/dev/wxcloud/reference-http-api/storage/uploadFile.html * 文档地址https://developers.weixin.qq.com/miniprogram/dev/wxcloud/reference-http-api/storage/uploadFile.html
* 请求地址POST https://api.weixin.qq.com/tcb/uploadfile?access_token=ACCESS_TOKEN
* *
* </pre> * @param env 云环境ID
* * @param path 上传路径
* @param env 云环境ID * @return 上传结果对象
* @param path 上传路径 * @throws WxErrorException 获取失败时抛出
* @return 上传结果 wx cloud upload file result
* @throws WxErrorException .
*/ */
WxCloudUploadFileResult uploadFile(String env, String path) throws WxErrorException; WxCloudUploadFileResult uploadFile(String env, String path) throws WxErrorException;
/** /**
* Batch download file wx cloud batch download file result. * 获取文件下载链接。
* *
* @param fileIds the file ids * @param fileIds 文件ID数组
* @param maxAges the max ages * @param maxAges 下载链接有效期数组对应文件id列表
* @return the wx cloud batch download file result * @return 下载链接信息对象
* @throws WxErrorException the wx error exception * @throws WxErrorException 获取失败时抛出
*/ */
WxCloudBatchDownloadFileResult batchDownloadFile(String[] fileIds, long[] maxAges) throws WxErrorException; WxCloudBatchDownloadFileResult batchDownloadFile(String[] fileIds, long[] maxAges) throws WxErrorException;
/** /**
* <pre> * 获取文件下载链接。
* 获取文件下载链接
*
* 文档地址https://developers.weixin.qq.com/miniprogram/dev/wxcloud/reference-http-api/storage/batchDownloadFile.html * 文档地址https://developers.weixin.qq.com/miniprogram/dev/wxcloud/reference-http-api/storage/batchDownloadFile.html
* 请求地址POST https://api.weixin.qq.com/tcb/batchdownloadfile?access_token=ACCESS_TOKEN
* *
* </pre> * @param env 云环境ID
* * @param fileIds 文件ID数组
* @param env 云环境ID * @param maxAges 下载链接有效期数组对应文件id列表
* @param fileIds 文件ID列表 * @return 下载链接信息对象
* @param maxAges 下载链接有效期列表对应文件id列表 * @throws WxErrorException 获取失败时抛出
* @return 下载链接信息 wx cloud batch download file result
* @throws WxErrorException .
*/ */
WxCloudBatchDownloadFileResult batchDownloadFile(String env, String[] fileIds, long[] maxAges) throws WxErrorException; WxCloudBatchDownloadFileResult batchDownloadFile(String env, String[] fileIds, long[] maxAges) throws WxErrorException;
/** /**
* Batch delete file wx cloud batch delete file result. * 删除文件。
* *
* @param fileIds the file ids * @param fileIds 文件ID数组
* @return the wx cloud batch delete file result * @return 删除结果对象
* @throws WxErrorException the wx error exception * @throws WxErrorException 删除失败时抛出
*/ */
WxCloudBatchDeleteFileResult batchDeleteFile(String[] fileIds) throws WxErrorException; WxCloudBatchDeleteFileResult batchDeleteFile(String[] fileIds) throws WxErrorException;
/** /**
* <pre> * 删除文件。
* 删除文件
*
* 文档地址https://developers.weixin.qq.com/miniprogram/dev/wxcloud/reference-http-api/storage/batchDeleteFile.html * 文档地址https://developers.weixin.qq.com/miniprogram/dev/wxcloud/reference-http-api/storage/batchDeleteFile.html
* 请求地址POST https://api.weixin.qq.com/tcb/batchdeletefile?access_token=ACCESS_TOKEN
* *
* </pre> * @param env 云环境ID
* * @param fileIds 文件ID数组
* @param env 云环境ID * @return 删除结果对象
* @param fileIds 文件ID列表 * @throws WxErrorException 删除失败时抛出
* @return 下载链接信息 wx cloud batch delete file result
* @throws WxErrorException .
*/ */
WxCloudBatchDeleteFileResult batchDeleteFile(String env, String[] fileIds) throws WxErrorException; WxCloudBatchDeleteFileResult batchDeleteFile(String env, String[] fileIds) throws WxErrorException;
/** /**
* <pre> * 获取腾讯云API调用凭证。
* 获取腾讯云API调用凭证 * 文档地址https://developers.weixin.qq.com/miniprogram/dev/wxcloud/reference-http-api/utils/getQcloudToken.html
* *
* 文档地址https://developers.weixin.qq.com/miniprogram/dev/wxcloud/reference-http-api/utils/getQcloudToken.html * @param lifeSpan 有效期单位为秒最大7200
* 请求地址POST https://api.weixin.qq.com/tcb/getqcloudtoken?access_token=ACCESS_TOKEN * @return 腾讯云Token结果对象
* </pre> * @throws WxErrorException 获取失败时抛出
*
* @param lifeSpan 有效期单位为秒最大7200
* @return . qcloud token
* @throws WxErrorException .
*/ */
WxCloudGetQcloudTokenResult getQcloudToken(long lifeSpan) throws WxErrorException; WxCloudGetQcloudTokenResult getQcloudToken(long lifeSpan) throws WxErrorException;
/** /**
* Database collection add. * 新增集合。
* *
* @param collectionName the collection name * @param collectionName 集合名称
* @throws WxErrorException the wx error exception * @throws WxErrorException 新增失败时抛出
*/ */
void databaseCollectionAdd(String collectionName) throws WxErrorException; void databaseCollectionAdd(String collectionName) throws WxErrorException;
/** /**
* <pre> * 新增集合。
* 新增集合 * 文档地址https://developers.weixin.qq.com/miniprogram/dev/wxcloud/reference-http-api/database/databaseCollectionAdd.html
* *
* 文档地址https://developers.weixin.qq.com/miniprogram/dev/wxcloud/reference-http-api/database/databaseCollectionAdd * @param env 云环境ID
* .html * @param collectionName 集合名称
* 请求地址POST https://api.weixin.qq.com/tcb/databasecollectionadd?access_token=ACCESS_TOKEN * @throws WxErrorException 新增失败时抛出
* </pre>
*
* @param env 云环境ID
* @param collectionName 集合名称
* @throws WxErrorException .
*/ */
void databaseCollectionAdd(String env, String collectionName) throws WxErrorException; void databaseCollectionAdd(String env, String collectionName) throws WxErrorException;
/** /**
* Database collection delete. * 删除集合。
* *
* @param collectionName the collection name * @param collectionName 集合名称
* @throws WxErrorException the wx error exception * @throws WxErrorException 删除失败时抛出
*/ */
void databaseCollectionDelete(String collectionName) throws WxErrorException; void databaseCollectionDelete(String collectionName) throws WxErrorException;
/** /**
* <pre> * 删除集合。
* 删除集合 * 文档地址https://developers.weixin.qq.com/miniprogram/dev/wxcloud/reference-http-api/database/databaseCollectionDelete.html
* *
* 文档地址https://developers.weixin.qq.com/miniprogram/dev/wxcloud/reference-http-api/database * @param env 云环境ID
* /databaseCollectionDelete.html * @param collectionName 集合名称
* 请求地址POST https://api.weixin.qq.com/tcb/databasecollectionadd?access_token=ACCESS_TOKEN * @throws WxErrorException 删除失败时抛出
* </pre>
*
* @param env 云环境ID
* @param collectionName 集合名称
* @throws WxErrorException .
*/ */
void databaseCollectionDelete(String env, String collectionName) throws WxErrorException; void databaseCollectionDelete(String env, String collectionName) throws WxErrorException;
/** /**
* Database collection get wx cloud database collection get result. * 获取特定云环境下集合信息。
* *
* @param limit the limit * @param limit 获取数量限制默认值10
* @param offset the offset * @param offset 偏移量默认值0
* @return the wx cloud database collection get result * @return 集合信息获取结果对象
* @throws WxErrorException the wx error exception * @throws WxErrorException 获取失败时抛出
*/ */
WxCloudDatabaseCollectionGetResult databaseCollectionGet(Long limit, Long offset) throws WxErrorException; WxCloudDatabaseCollectionGetResult databaseCollectionGet(Long limit, Long offset) throws WxErrorException;
/** /**
* <pre> * 获取特定云环境下集合信息。
* 获取特定云环境下集合信息 * 文档地址https://developers.weixin.qq.com/miniprogram/dev/wxcloud/reference-http-api/database/databaseCollectionGet.html
* *
* 文档地址https://developers.weixin.qq.com/miniprogram/dev/wxcloud/reference-http-api/database/databaseCollectionGet * @param env 云环境ID
* .html * @param limit 获取数量限制默认值10
* 请求地址POST https://api.weixin.qq.com/tcb/databasecollectionget?access_token=ACCESS_TOKEN * @param offset 偏移量默认值0
* </pre> * @return 集合信息获取结果对象
* * @throws WxErrorException 获取失败时抛出
* @param env 云环境ID
* @param limit 获取数量限制默认值10
* @param offset 偏移量,默认值0
* @return . wx cloud database collection get result
* @throws WxErrorException .
*/ */
WxCloudDatabaseCollectionGetResult databaseCollectionGet(String env, Long limit, Long offset) throws WxErrorException; WxCloudDatabaseCollectionGetResult databaseCollectionGet(String env, Long limit, Long offset) throws WxErrorException;
/** /**
* 发送携带 URL Link 的短信 * 发送携带 URL Link 的短信
*
* 文档地址https://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/cloudbase/cloudbase.sendSmsV2.html * 文档地址https://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/cloudbase/cloudbase.sendSmsV2.html
* @param request *
* @return WxCloudSendSmsV2Result * @param request 短信发送请求对象
* @throws WxErrorException * @return 短信发送结果对象
* @throws WxErrorException 发送失败时抛出
*/ */
WxCloudSendSmsV2Result sendSmsV2(WxCloudSendSmsV2Request request) throws WxErrorException; WxCloudSendSmsV2Result sendSmsV2(WxCloudSendSmsV2Request request) throws WxErrorException;
} }