import { Capi } from '@tencent-sdk/capi'; import { ActionType } from '../apis'; import { Secret, ApigwSetupUsagePlanInputs, ApigwBindUsagePlanOutputs, ApigwSetupUsagePlanSecretInputs, ApigwRemoveUsagePlanInputs, } from '../interface'; export default class UsagePlanEntity { capi: Capi; constructor(capi: Capi); request({ Action, ...data }: { Action: ActionType; [key: string]: any }): Promise; removeRequest({ Action, ...data }: { Action: ActionType; [key: string]: any }): Promise; /** 设置 API 网关密钥 */ setupSecret({ secretName, secretIds, created }: ApigwSetupUsagePlanSecretInputs): Promise<{ created: boolean; secretIds: string[]; }>; /** 设置 API 网关的使用计划 */ setup({ usagePlan, }: { usagePlan: ApigwSetupUsagePlanInputs; }): Promise; /** 获取 secrets 列表 */ getBindedSecrets( usagePlanId: string, res: Secret[], { limit, offset, }: { limit: number; offset?: number; }, ): Promise; /** * 找到所有不存在的 secretIds */ getUnbindSecretIds({ usagePlanId, secretIds, }: { usagePlanId: string; secretIds: string[]; }): Promise; bind({ apiId, serviceId, environment, usagePlanConfig, authConfig, }: ApigwBindUsagePlanOutputs): Promise; removeSecretId(secretId: string): Promise; remove({ serviceId, environment, usagePlan, apiId }: ApigwRemoveUsagePlanInputs): Promise; }