|
|
@ -30,21 +30,83 @@ declare module "dpa" { |
|
|
|
* @param {string} action 流程输出参数 默认为 input |
|
|
|
* @example |
|
|
|
* ```typescript
|
|
|
|
* dpa.getOutParam('输出内容'); |
|
|
|
* dpa.setOutParam('输出内容'); |
|
|
|
* ``` |
|
|
|
*/ |
|
|
|
setOutParam(content: any, action?: string): void; |
|
|
|
|
|
|
|
/** |
|
|
|
* @description: 数据表操作 |
|
|
|
* @param {+} content 流程输出内容 |
|
|
|
* @param {string} action 流程输出参数 默认为 input |
|
|
|
* @param {string} type "find" | "select" | "delete" |
|
|
|
* @param {string} content where查询条件 |
|
|
|
* @example |
|
|
|
* ```typescript
|
|
|
|
* dpa.optDataTable("find", { name: '名字', age: 18 }); |
|
|
|
* ``` |
|
|
|
*/ |
|
|
|
optDataTable( |
|
|
|
type: "find" | "select" | "delete", |
|
|
|
content?: Record<string, string | number> |
|
|
|
): void; |
|
|
|
|
|
|
|
/** |
|
|
|
* @description: 数据表操作添加单条数据 |
|
|
|
* @param {string} type add |
|
|
|
* @param {string} content 数据对象 |
|
|
|
* @example |
|
|
|
* ```typescript
|
|
|
|
* dpa.getOutParam('输出内容'); |
|
|
|
* dpa.optDataTable("add", { name: '名字', age: 18 }); |
|
|
|
* ``` |
|
|
|
*/ |
|
|
|
optDataTable(type, action?: string): void; |
|
|
|
optDataTable(type: "add", content?: Record<string, string | number>): void; |
|
|
|
|
|
|
|
/** |
|
|
|
* @description: 数据表操作 添加多条数据 |
|
|
|
* @param {string} type add |
|
|
|
* @param {string} content 数据对象数组 |
|
|
|
* @example |
|
|
|
* ```typescript
|
|
|
|
* dpa.optDataTable("add", [{ name: '名字1', age: 18 }, { name: '名字2', age: 19 }]); |
|
|
|
* ``` |
|
|
|
*/ |
|
|
|
optDataTable( |
|
|
|
type: "add", |
|
|
|
content?: Record<string, string | number>[] |
|
|
|
): void; |
|
|
|
|
|
|
|
/** |
|
|
|
* @description: 数据表操作 更新数据 |
|
|
|
* @param {string} type "find" | "select" | "delete" |
|
|
|
* @param {string} content where查询条件, data更新数据 |
|
|
|
* @example |
|
|
|
* ```typescript
|
|
|
|
* dpa.optDataTable("find", { name: '名字', age: 18 }); |
|
|
|
* ``` |
|
|
|
*/ |
|
|
|
optDataTable( |
|
|
|
type: "update", |
|
|
|
content?: { |
|
|
|
where: Record<string, string | number>; |
|
|
|
data: Record<string, string | number>; |
|
|
|
} |
|
|
|
): void; |
|
|
|
|
|
|
|
/** |
|
|
|
* @description: 数据表操作 条件更新 当 where 条件未命中到任何数据时添加数据,命中数据则更新该数据。 |
|
|
|
* @param {string} type "thenUpdate" |
|
|
|
* @param {string} content where查询条件, data更新数据 |
|
|
|
* @example |
|
|
|
* ```typescript
|
|
|
|
* dpa.optDataTable("find", { name: '名字', age: 18 }); |
|
|
|
* ``` |
|
|
|
*/ |
|
|
|
optDataTable( |
|
|
|
type: "thenUpdate", |
|
|
|
content?: { |
|
|
|
where: Record<string, string | number>; |
|
|
|
data: Record<string, string | number>; |
|
|
|
} |
|
|
|
): void; |
|
|
|
} |
|
|
|
|
|
|
|
interface DPAEnv { |
|
|
|