@activepieces/pieces-framework 0.6.15 → 0.6.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@activepieces/pieces-framework",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.16",
|
|
4
4
|
"type": "commonjs",
|
|
5
5
|
"dependencies": {
|
|
6
6
|
"@sinclair/typebox": "^0.26.3",
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"is-base64": "^1.1.0",
|
|
10
10
|
"nanoid": "^3.3.4",
|
|
11
11
|
"semver": "7.5.4",
|
|
12
|
-
"@activepieces/shared": "0.
|
|
12
|
+
"@activepieces/shared": "0.8.1",
|
|
13
13
|
"tslib": "2.6.1"
|
|
14
14
|
},
|
|
15
15
|
"main": "./src/index.js",
|
|
@@ -12,6 +12,7 @@ type CreateActionParams<PieceAuth extends PieceAuthProperty, ActionProps extends
|
|
|
12
12
|
description: string;
|
|
13
13
|
props: ActionProps;
|
|
14
14
|
run: ActionRunner<PieceAuth, ActionProps>;
|
|
15
|
+
test?: ActionRunner<PieceAuth, ActionProps>;
|
|
15
16
|
requireAuth?: boolean;
|
|
16
17
|
};
|
|
17
18
|
export declare class IAction<PieceAuth extends PieceAuthProperty, ActionProps extends NonAuthPiecePropertyMap> implements ActionBase {
|
|
@@ -20,8 +21,9 @@ export declare class IAction<PieceAuth extends PieceAuthProperty, ActionProps ex
|
|
|
20
21
|
readonly description: string;
|
|
21
22
|
readonly props: ActionProps;
|
|
22
23
|
readonly run: ActionRunner<PieceAuth, ActionProps>;
|
|
24
|
+
readonly test: ActionRunner<PieceAuth, ActionProps>;
|
|
23
25
|
readonly requireAuth: boolean;
|
|
24
|
-
constructor(name: string, displayName: string, description: string, props: ActionProps, run: ActionRunner<PieceAuth, ActionProps>, requireAuth: boolean);
|
|
26
|
+
constructor(name: string, displayName: string, description: string, props: ActionProps, run: ActionRunner<PieceAuth, ActionProps>, test: ActionRunner<PieceAuth, ActionProps>, requireAuth: boolean);
|
|
25
27
|
}
|
|
26
28
|
export type Action<PieceAuth extends PieceAuthProperty = any, ActionProps extends NonAuthPiecePropertyMap = any> = IAction<PieceAuth, ActionProps>;
|
|
27
29
|
export declare const createAction: <PieceAuth extends PieceAuthProperty = PieceAuthProperty, ActionProps extends NonAuthPiecePropertyMap = any>(params: CreateActionParams<PieceAuth, ActionProps>) => IAction<PieceAuth, ActionProps>;
|
package/src/lib/action/action.js
CHANGED
|
@@ -2,19 +2,20 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.createAction = exports.IAction = void 0;
|
|
4
4
|
class IAction {
|
|
5
|
-
constructor(name, displayName, description, props, run, requireAuth) {
|
|
5
|
+
constructor(name, displayName, description, props, run, test, requireAuth) {
|
|
6
6
|
this.name = name;
|
|
7
7
|
this.displayName = displayName;
|
|
8
8
|
this.description = description;
|
|
9
9
|
this.props = props;
|
|
10
10
|
this.run = run;
|
|
11
|
+
this.test = test;
|
|
11
12
|
this.requireAuth = requireAuth;
|
|
12
13
|
}
|
|
13
14
|
}
|
|
14
15
|
exports.IAction = IAction;
|
|
15
16
|
const createAction = (params) => {
|
|
16
|
-
var _a;
|
|
17
|
-
return new IAction(params.name, params.displayName, params.description, params.props, params.run, (_a = params.
|
|
17
|
+
var _a, _b;
|
|
18
|
+
return new IAction(params.name, params.displayName, params.description, params.props, params.run, (_a = params.test) !== null && _a !== void 0 ? _a : params.run, (_b = params.requireAuth) !== null && _b !== void 0 ? _b : true);
|
|
18
19
|
};
|
|
19
20
|
exports.createAction = createAction;
|
|
20
21
|
//# sourceMappingURL=action.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"action.js","sourceRoot":"","sources":["../../../../../../../packages/pieces/framework/src/lib/action/action.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"action.js","sourceRoot":"","sources":["../../../../../../../packages/pieces/framework/src/lib/action/action.ts"],"names":[],"mappings":";;;AAqBA,MAAa,OAAO;IAClB,YACkB,IAAY,EACZ,WAAmB,EACnB,WAAmB,EACnB,KAAkB,EAClB,GAAyC,EACzC,IAA0C,EAC1C,WAAoB;QANpB,SAAI,GAAJ,IAAI,CAAQ;QACZ,gBAAW,GAAX,WAAW,CAAQ;QACnB,gBAAW,GAAX,WAAW,CAAQ;QACnB,UAAK,GAAL,KAAK,CAAa;QAClB,QAAG,GAAH,GAAG,CAAsC;QACzC,SAAI,GAAJ,IAAI,CAAsC;QAC1C,gBAAW,GAAX,WAAW,CAAS;IAClC,CAAC;CACN;AAVD,0BAUC;AAOM,MAAM,YAAY,GAAG,CAI1B,MAAkD,EAClD,EAAE;;IACF,OAAO,IAAI,OAAO,CAChB,MAAM,CAAC,IAAI,EACX,MAAM,CAAC,WAAW,EAClB,MAAM,CAAC,WAAW,EAClB,MAAM,CAAC,KAAK,EACZ,MAAM,CAAC,GAAG,EACV,MAAA,MAAM,CAAC,IAAI,mCAAI,MAAM,CAAC,GAAG,EACzB,MAAA,MAAM,CAAC,WAAW,mCAAI,IAAI,CAC3B,CAAA;AACH,CAAC,CAAA;AAfY,QAAA,YAAY,gBAexB"}
|