New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@activepieces/pieces-framework

Package Overview
Dependencies
Maintainers
3
Versions
86
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@activepieces/pieces-framework - npm Package Compare versions

Comparing version 0.6.5 to 0.6.6

6

package.json
{
"name": "@activepieces/pieces-framework",
"version": "0.6.5",
"version": "0.6.6",
"type": "commonjs",
"dependencies": {
"@sinclair/typebox": "^0.26.3",
"axios": "1.4.0",
"dayjs": "^1.11.8",
"is-base64": "^1.1.0",
"lodash": "4.17.21",
"nanoid": "^3.3.4",

@@ -12,0 +8,0 @@ "semver": "7.5.3",

@@ -7,3 +7,1 @@ export * from './action/action';

export * from './piece-metadata';
export * from './validators/validators';
export * from './processors/processors';

@@ -10,4 +10,2 @@ "use strict";

tslib_1.__exportStar(require("./piece-metadata"), exports);
tslib_1.__exportStar(require("./validators/validators"), exports);
tslib_1.__exportStar(require("./processors/processors"), exports);
//# sourceMappingURL=index.js.map

30

src/lib/property/base-prop.d.ts

@@ -1,3 +0,1 @@

import { ProcessorFn } from "../processors/types";
import { TypedValidatorFn, ValidationInputType } from "../validators/types";
import { PropertyType } from "./property";

@@ -23,22 +21,18 @@ export type BasePropertySchema = {

};
export type TPropertyValue<T, U extends PropertyType, VALIDATION_INPUT extends ValidationInputType, REQUIRED extends boolean> = {
export type TPropertyValue<T, U extends PropertyType, REQUIRED extends boolean> = {
valueSchema: T;
type: U;
required: REQUIRED;
defaultProcessors?: ProcessorFn[];
processors?: ProcessorFn[];
validators?: TypedValidatorFn<VALIDATION_INPUT>[];
defaultValidators?: TypedValidatorFn<VALIDATION_INPUT>[];
defaultValue?: U extends PropertyType.ARRAY ? unknown[] : U extends PropertyType.JSON ? object : U extends PropertyType.CHECKBOX ? boolean : U extends PropertyType.LONG_TEXT ? string : U extends PropertyType.SHORT_TEXT ? string : U extends PropertyType.NUMBER ? number : U extends PropertyType.DROPDOWN ? unknown : U extends PropertyType.MULTI_SELECT_DROPDOWN ? unknown[] : U extends PropertyType.STATIC_MULTI_SELECT_DROPDOWN ? unknown[] : U extends PropertyType.STATIC_DROPDOWN ? unknown : U extends PropertyType.DATE_TIME ? string : U extends PropertyType.FILE ? ApFile : unknown;
};
export type ShortTextProperty<R extends boolean> = BasePropertySchema & TPropertyValue<string, PropertyType.SHORT_TEXT, ValidationInputType.STRING, R>;
export type LongTextProperty<R extends boolean> = BasePropertySchema & TPropertyValue<string, PropertyType.LONG_TEXT, ValidationInputType.STRING, R>;
export type MarkDownProperty = BasePropertySchema & TPropertyValue<never, PropertyType.MARKDOWN, ValidationInputType.ANY, true>;
export type SecretTextProperty<R extends boolean> = BasePieceAuthSchema<string> & TPropertyValue<string, PropertyType.SECRET_TEXT, ValidationInputType.STRING, R>;
export type CheckboxProperty<R extends boolean> = BasePropertySchema & TPropertyValue<boolean, PropertyType.CHECKBOX, ValidationInputType.ANY, R>;
export type NumberProperty<R extends boolean> = BasePropertySchema & TPropertyValue<number, PropertyType.NUMBER, ValidationInputType.NUMBER, R>;
export type ArrayProperty<R extends boolean> = BasePropertySchema & TPropertyValue<unknown[], PropertyType.ARRAY, ValidationInputType.ARRAY, R>;
export type ObjectProperty<R extends boolean> = BasePropertySchema & TPropertyValue<Record<string, unknown>, PropertyType.OBJECT, ValidationInputType.OBJECT, R>;
export type JsonProperty<R extends boolean> = BasePropertySchema & TPropertyValue<Record<string, unknown>, PropertyType.JSON, ValidationInputType.JSON, R>;
export type DateTimeProperty<R extends boolean> = BasePropertySchema & TPropertyValue<string, PropertyType.DATE_TIME, ValidationInputType.DATE_TIME, R>;
export type ShortTextProperty<R extends boolean> = BasePropertySchema & TPropertyValue<string, PropertyType.SHORT_TEXT, R>;
export type LongTextProperty<R extends boolean> = BasePropertySchema & TPropertyValue<string, PropertyType.LONG_TEXT, R>;
export type MarkDownProperty = BasePropertySchema & TPropertyValue<never, PropertyType.MARKDOWN, true>;
export type SecretTextProperty<R extends boolean> = BasePieceAuthSchema<string> & TPropertyValue<string, PropertyType.SECRET_TEXT, R>;
export type CheckboxProperty<R extends boolean> = BasePropertySchema & TPropertyValue<boolean, PropertyType.CHECKBOX, R>;
export type NumberProperty<R extends boolean> = BasePropertySchema & TPropertyValue<number, PropertyType.NUMBER, R>;
export type ArrayProperty<R extends boolean> = BasePropertySchema & TPropertyValue<unknown[], PropertyType.ARRAY, R>;
export type ObjectProperty<R extends boolean> = BasePropertySchema & TPropertyValue<Record<string, unknown>, PropertyType.OBJECT, R>;
export type JsonProperty<R extends boolean> = BasePropertySchema & TPropertyValue<Record<string, unknown>, PropertyType.JSON, R>;
export type DateTimeProperty<R extends boolean> = BasePropertySchema & TPropertyValue<string, PropertyType.DATE_TIME, R>;
export type ApFile = {

@@ -49,3 +43,3 @@ filename?: string;

};
export type FileProperty<R extends boolean> = BasePropertySchema & TPropertyValue<ApFile, PropertyType.FILE, ValidationInputType.FILE, R>;
export type FileProperty<R extends boolean> = BasePropertySchema & TPropertyValue<ApFile, PropertyType.FILE, R>;
export {};
import { PropertyType } from "./property";
import { BasePieceAuthSchema, TPropertyValue } from "./base-prop";
import { ValidationInputType } from "../validators/types";
export type BasicAuthPropertyValue = {

@@ -18,2 +17,2 @@ username: string;

};
export type BasicAuthProperty<R extends boolean> = BasicAuthPropertySchema & TPropertyValue<BasicAuthPropertyValue, PropertyType.BASIC_AUTH, ValidationInputType.ANY, R>;
export type BasicAuthProperty<R extends boolean> = BasicAuthPropertySchema & TPropertyValue<BasicAuthPropertyValue, PropertyType.BASIC_AUTH, R>;

@@ -5,3 +5,2 @@ import { PropertyType } from "./property";

import { StaticPropsValue } from "./property";
import { ValidationInputType } from "../validators/types";
export interface CustomAuthProps {

@@ -14,2 +13,2 @@ [name: string]: ShortTextProperty<boolean> | LongTextProperty<boolean> | SecretTextProperty<boolean> | NumberProperty<boolean> | StaticDropdownProperty<unknown, boolean> | CheckboxProperty<boolean>;

};
export type CustomAuthProperty<R extends boolean, T extends CustomAuthProps> = CustomAuthPropertySchema<T> & TPropertyValue<CustomAuthPropertyValue<T>, PropertyType.CUSTOM_AUTH, ValidationInputType.ANY, R>;
export type CustomAuthProperty<R extends boolean, T extends CustomAuthProps> = CustomAuthPropertySchema<T> & TPropertyValue<CustomAuthPropertyValue<T>, PropertyType.CUSTOM_AUTH, R>;
import { PropertyType } from "./property";
import { BasePropertySchema, TPropertyValue } from "./base-prop";
import { ValidationInputType } from "../validators/types";
export type DropdownState<T> = {

@@ -17,12 +16,12 @@ disabled?: boolean;

options: DynamicDropdownOptions<T>;
} & TPropertyValue<T, PropertyType.DROPDOWN, ValidationInputType.ANY, R>;
} & TPropertyValue<T, PropertyType.DROPDOWN, R>;
export type StaticDropdownProperty<T, R extends boolean> = BasePropertySchema & {
options: DropdownState<T>;
} & TPropertyValue<T, PropertyType.STATIC_DROPDOWN, ValidationInputType.ANY, R>;
} & TPropertyValue<T, PropertyType.STATIC_DROPDOWN, R>;
export type MultiSelectDropdownProperty<T, R extends boolean> = BasePropertySchema & {
refreshers: string[];
options: DynamicDropdownOptions<T>;
} & TPropertyValue<T[], PropertyType.MULTI_SELECT_DROPDOWN, ValidationInputType.ANY, R>;
} & TPropertyValue<T[], PropertyType.MULTI_SELECT_DROPDOWN, R>;
export type StaticMultiSelectDropdownProperty<T, R extends boolean> = BasePropertySchema & {
options: DropdownState<T>;
} & TPropertyValue<T[], PropertyType.STATIC_MULTI_SELECT_DROPDOWN, ValidationInputType.ANY, R>;
} & TPropertyValue<T[], PropertyType.STATIC_MULTI_SELECT_DROPDOWN, R>;
import { PropertyType } from "./property";
import { BasePropertySchema, ShortTextProperty, TPropertyValue } from "./base-prop";
import { StaticDropdownProperty, StaticMultiSelectDropdownProperty } from "./dropdown-prop";
import { ValidationInputType } from "../validators/types";
type DynamicProp = ShortTextProperty<boolean> | StaticDropdownProperty<any, boolean> | StaticMultiSelectDropdownProperty<any, boolean>;

@@ -11,3 +10,3 @@ export type DynamicPropsValue = Record<string, DynamicProp['valueSchema']>;

};
export type DynamicProperties<R extends boolean> = DynamicPropsSchema & TPropertyValue<DynamicPropsValue, PropertyType.DYNAMIC, ValidationInputType.ANY, R>;
export type DynamicProperties<R extends boolean> = DynamicPropsSchema & TPropertyValue<DynamicPropsValue, PropertyType.DYNAMIC, R>;
export {};

@@ -5,3 +5,2 @@ import { PropertyType } from "./property";

import { StaticPropsValue } from "./property";
import { ValidationInputType } from "../validators/types";
type OAuthProp = ShortTextProperty<true> | SecretTextProperty<true> | StaticDropdownProperty<any, true>;

@@ -26,3 +25,3 @@ export interface OAuth2Props {

};
export type OAuth2Property<R extends boolean, T extends OAuth2Props> = OAuth2PropertySchema & TPropertyValue<OAuth2PropertyValue<T>, PropertyType.OAUTH2, ValidationInputType.ANY, R>;
export type OAuth2Property<R extends boolean, T extends OAuth2Props> = OAuth2PropertySchema & TPropertyValue<OAuth2PropertyValue<T>, PropertyType.OAUTH2, R>;
export declare enum OAuth2AuthorizationMethod {

@@ -29,0 +28,0 @@ HEADER = "HEADER",

@@ -67,3 +67,3 @@ import { ArrayProperty, CheckboxProperty, DateTimeProperty, FileProperty, JsonProperty, LongTextProperty, MarkDownProperty, MarkDownPropertySchema, NumberProperty, ObjectProperty, SecretTextProperty, ShortTextProperty } from "./base-prop";

};
type Properties<T> = Omit<T, "valueSchema" | "type" | "defaultValidators" | "defaultProcessors">;
type Properties<T> = Omit<T, "valueSchema" | "type">;
export {};
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.PieceAuth = exports.Property = exports.PropertyType = void 0;
const processors_1 = require("../processors/processors");
const validators_1 = require("../validators/validators");
var PropertyType;

@@ -42,3 +40,3 @@ (function (PropertyType) {

Number(request) {
return Object.assign(Object.assign({}, request), { defaultProcessors: [processors_1.Processors.number], defaultValidators: [validators_1.Validators.number], valueSchema: undefined, type: PropertyType.NUMBER });
return Object.assign(Object.assign({}, request), { valueSchema: undefined, type: PropertyType.NUMBER });
},

@@ -70,6 +68,6 @@ Json(request) {

DateTime(request) {
return Object.assign(Object.assign({}, request), { defaultProcessors: [processors_1.Processors.datetime], defaultValidators: [validators_1.Validators.datetimeIso], valueSchema: undefined, type: PropertyType.DATE_TIME });
return Object.assign(Object.assign({}, request), { valueSchema: undefined, type: PropertyType.DATE_TIME });
},
File(request) {
return Object.assign(Object.assign({}, request), { defaultProcessors: [processors_1.Processors.file], defaultValidators: [validators_1.Validators.file], valueSchema: undefined, type: PropertyType.FILE });
return Object.assign(Object.assign({}, request), { valueSchema: undefined, type: PropertyType.FILE });
},

@@ -76,0 +74,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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc