@activepieces/pieces-framework
Advanced tools
Comparing version 0.6.10 to 0.6.11
{ | ||
"name": "@activepieces/pieces-framework", | ||
"version": "0.6.10", | ||
"version": "0.6.11", | ||
"type": "commonjs", | ||
@@ -5,0 +5,0 @@ "dependencies": { |
@@ -16,3 +16,2 @@ import { ActionContext } from '../context'; | ||
requireAuth?: boolean; | ||
sampleData?: unknown; | ||
}; | ||
@@ -26,4 +25,3 @@ export declare class IAction<PieceAuth extends PieceAuthProperty, ActionProps extends NonAuthPiecePropertyMap> implements ActionBase { | ||
readonly requireAuth: boolean; | ||
readonly sampleData: unknown; | ||
constructor(name: string, displayName: string, description: string, props: ActionProps, run: ActionRunner<PieceAuth, ActionProps>, requireAuth: boolean, sampleData?: unknown); | ||
constructor(name: string, displayName: string, description: string, props: ActionProps, run: ActionRunner<PieceAuth, ActionProps>, requireAuth: boolean); | ||
} | ||
@@ -30,0 +28,0 @@ export type Action<PieceAuth extends PieceAuthProperty = any, ActionProps extends NonAuthPiecePropertyMap = any> = IAction<PieceAuth, ActionProps>; |
@@ -5,3 +5,3 @@ "use strict"; | ||
class IAction { | ||
constructor(name, displayName, description, props, run, requireAuth, sampleData = {}) { | ||
constructor(name, displayName, description, props, run, requireAuth) { | ||
this.name = name; | ||
@@ -13,3 +13,2 @@ this.displayName = displayName; | ||
this.requireAuth = requireAuth; | ||
this.sampleData = sampleData; | ||
} | ||
@@ -20,5 +19,5 @@ } | ||
var _a; | ||
return new IAction(params.name, params.displayName, params.description, params.props, params.run, (_a = params.requireAuth) !== null && _a !== void 0 ? _a : true, params.sampleData); | ||
return new IAction(params.name, params.displayName, params.description, params.props, params.run, (_a = params.requireAuth) !== null && _a !== void 0 ? _a : true); | ||
}; | ||
exports.createAction = createAction; | ||
//# sourceMappingURL=action.js.map |
@@ -21,3 +21,2 @@ import { ProjectId } from "@activepieces/shared"; | ||
description: string; | ||
sampleData: unknown; | ||
props: PiecePropertyMap; | ||
@@ -28,2 +27,3 @@ requireAuth: boolean; | ||
type: TriggerStrategy; | ||
sampleData: unknown; | ||
handshakeConfiguration?: WebhookHandshakeConfiguration; | ||
@@ -30,0 +30,0 @@ }; |
@@ -62,8 +62,9 @@ import { ArrayProperty, CheckboxProperty, DateTimeProperty, FileProperty, JsonProperty, LongTextProperty, MarkDownProperty, MarkDownPropertySchema, NumberProperty, ObjectProperty, SecretTextProperty, ShortTextProperty } from "./base-prop"; | ||
SecretText<R extends boolean>(request: Properties<SecretTextProperty<R>>): R extends true ? SecretTextProperty<true> : SecretTextProperty<false>; | ||
BasicAuth<R_1 extends boolean>(request: Properties<BasicAuthProperty<R_1>>): R_1 extends true ? BasicAuthProperty<true> : BasicAuthProperty<false>; | ||
CustomAuth<R_2 extends boolean, T extends CustomAuthProps>(request: Properties<CustomAuthProperty<R_2, T>>): R_2 extends true ? CustomAuthProperty<true, T> : CustomAuthProperty<false, T>; | ||
OAuth2<R_3 extends boolean, T_1 extends OAuth2Props>(request: Properties<OAuth2Property<R_3, T_1>>): R_3 extends true ? OAuth2Property<true, T_1> : OAuth2Property<false, T_1>; | ||
BasicAuth<R_1 extends boolean>(request: AuthProperties<BasicAuthProperty<R_1>>): R_1 extends true ? BasicAuthProperty<true> : BasicAuthProperty<false>; | ||
CustomAuth<R_2 extends boolean, T extends CustomAuthProps>(request: AuthProperties<CustomAuthProperty<R_2, T>>): R_2 extends true ? CustomAuthProperty<true, T> : CustomAuthProperty<false, T>; | ||
OAuth2<R_3 extends boolean, T_1 extends OAuth2Props>(request: AuthProperties<OAuth2Property<R_3, T_1>>): R_3 extends true ? OAuth2Property<true, T_1> : OAuth2Property<false, T_1>; | ||
None(): undefined; | ||
}; | ||
type AuthProperties<T> = Omit<Properties<T>, "displayName">; | ||
type Properties<T> = Omit<T, "valueSchema" | "type" | "defaultValidators" | "defaultProcessors">; | ||
export {}; |
@@ -80,9 +80,9 @@ "use strict"; | ||
BasicAuth(request) { | ||
return Object.assign(Object.assign({}, request), { valueSchema: undefined, type: PropertyType.BASIC_AUTH }); | ||
return Object.assign(Object.assign({}, request), { valueSchema: undefined, type: PropertyType.BASIC_AUTH, displayName: 'Connection' }); | ||
}, | ||
CustomAuth(request) { | ||
return Object.assign(Object.assign({}, request), { valueSchema: undefined, type: PropertyType.CUSTOM_AUTH }); | ||
return Object.assign(Object.assign({}, request), { valueSchema: undefined, type: PropertyType.CUSTOM_AUTH, displayName: 'Connection' }); | ||
}, | ||
OAuth2(request) { | ||
return Object.assign(Object.assign({}, request), { valueSchema: undefined, type: PropertyType.OAUTH2 }); | ||
return Object.assign(Object.assign({}, request), { valueSchema: undefined, type: PropertyType.OAUTH2, displayName: 'Connection' }); | ||
}, | ||
@@ -89,0 +89,0 @@ None() { |
@@ -22,3 +22,3 @@ "use strict"; | ||
? null | ||
: (0, utils_1.formatErrorMessage)(errors_1.ErrorMessages.REGEX, { property: property.displayName }); | ||
: (0, utils_1.formatErrorMessage)(errors_1.ErrorMessages.REGEX, { property: property === null || property === void 0 ? void 0 : property.displayName }); | ||
} | ||
@@ -126,3 +126,3 @@ }; | ||
? null | ||
: (0, utils_1.formatErrorMessage)(errors_1.ErrorMessages.IMAGE, { property: property.displayName }); | ||
: (0, utils_1.formatErrorMessage)(errors_1.ErrorMessages.IMAGE, { property: property }); | ||
} | ||
@@ -129,0 +129,0 @@ }; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
77680
1122