
package com.pavis.admin.open.service;

import com.pavis.admin.open.model.entity.AppDO;
import com.pavis.admin.open.model.query.AppQuery;
import com.pavis.admin.open.model.req.AppReq;
import com.pavis.admin.open.model.resp.AppDetailResp;
import com.pavis.admin.open.model.resp.AppResp;
import com.pavis.admin.open.model.resp.AppSecretResp;
import top.continew.starter.extension.crud.service.BaseService;

/**
 * 应用业务接口
 *
 * 
 *
 * @since 2024/10/17 16:03
 */
public interface AppService extends BaseService<AppResp, AppDetailResp, AppQuery, AppReq> {

    /**
     * 获取密钥
     *
     * @param id ID
     * @return 密钥信息
     */
    AppSecretResp getSecret(Long id);

    /**
     * 重置密钥
     *
     * @param id ID
     */
    void resetSecret(Long id);

    /**
     * 根据 Access Key 查询
     *
     * @param accessKey Access Key
     * @return 应用信息
     */
    AppDO getByAccessKey(String accessKey);
}