import { Capi } from '@tencent-sdk/capi'; import { CreateOptions, CreateResult, DeleteResult, UpdateOptions, UpdateResult, ExecuteOptions, ExecuteResult, ExecuteState, FlowDetail, } from './interface'; import { ActionType } from './apis'; import { CapiCredentials, RegionType } from '../interface'; import { Cam } from '../../'; export default class Asw { credentials: CapiCredentials; capi: Capi; region: RegionType; cam: Cam; constructor(credentials: CapiCredentials, region?: RegionType); /** * 获取执行状态 * @param executeName 执行名称 * @returns 执行状态 */ get(resourceId: string): Promise; /** * 创建工作流 * @param {CreateOptions} options 创建参数 * @returns 工作流资源 ID */ create(options: CreateOptions): Promise; /** * 更新工作流 * @param {UpdateOptions} options 更新参数 * @returns 工作流资源 ID */ update(options: UpdateOptions): Promise; /** * 删除工作流 * @param {string} resourceId 工作流资源 ID * @returns */ delete(resourceId: string): Promise; /** * 启动执行 * @param {ExecuteOptions} options 启动参数 * @returns */ execute({ resourceId, name, input }: ExecuteOptions): Promise; /** * 获取执行状态 * @param executeName 执行名称 * @returns 执行状态 */ getExecuteState(executeName: string): Promise; /** * 停止状态机 * @param executeName 执行名称 * @returns 停止请求结果 */ stop(executeName: string): Promise<{ requestId: any; executeName: string; }>; /** * 创建 ASW 角色 * @param {string} name aws 服务名称 * @param {string} appId 应用 ID * @returns {string} 角色名称 */ createRole(name: string, appId: string): Promise; request({ Action, ...data }: { Action: ActionType; [key: string]: any }): Promise; }