import { Capi } from '@tencent-sdk/capi'; import { RegionType, CapiCredentials, ApiServiceType } from '../interface'; import { TriggerInputs, TriggerInputsParams, CreateTriggerReq, TriggerResponse } from './interface'; import Scf from '../scf'; import { TriggerManager } from './manager'; declare type Qualifier = string; export default abstract class BaseTrigger
{
region: RegionType;
credentials: CapiCredentials;
capi: Capi;
constructor(options?: {
credentials?: CapiCredentials;
region?: RegionType;
serviceType: ApiServiceType;
});
abstract getKey(triggerType: CreateTriggerReq): Promise }):
| {
triggerKey: string;
triggerInputs: P;
}
| Promise<{
triggerKey: string;
triggerInputs: P;
}>;
/** Get Trigger List */
getTriggerList({
functionName,
namespace,
qualifier,
}: {
functionName?: string;
namespace: string;
qualifier: Qualifier;
}): Promise ;
}): Promise ;
}): Promise<
| boolean
| {
requestId: string;
success: boolean;
}
>;
/** delete scf trigger */
abstract delete({
scf,
region,
inputs,
}: {
scf: Scf | TriggerManager;
region: RegionType;
inputs: TriggerInputs ;
}): Promise<
| boolean
| {
requestId: string;
success: boolean;
}
>;
abstract update(
{
scf,
region,
inputs,
}: {
scf: Scf | TriggerManager;
region: string;
inputs: TriggerInputs ;
},
triggerName?: string | undefined,
): Promise ;
}): Promise