@activepieces/pieces-framework 0.7.38 → 0.7.40

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.
Files changed (56) hide show
  1. package/package.json +4 -5
  2. package/src/lib/index.d.ts +0 -3
  3. package/src/lib/index.js +0 -3
  4. package/src/lib/index.js.map +1 -1
  5. package/src/lib/property/authentication/basic-auth-prop.d.ts +1 -2
  6. package/src/lib/property/authentication/basic-auth-prop.js.map +1 -1
  7. package/src/lib/property/authentication/custom-auth-prop.d.ts +1 -2
  8. package/src/lib/property/authentication/custom-auth-prop.js.map +1 -1
  9. package/src/lib/property/authentication/oauth2-prop.d.ts +1 -2
  10. package/src/lib/property/authentication/oauth2-prop.js.map +1 -1
  11. package/src/lib/property/authentication/secret-text-property.d.ts +1 -2
  12. package/src/lib/property/authentication/secret-text-property.js.map +1 -1
  13. package/src/lib/property/input/array-property.d.ts +1 -2
  14. package/src/lib/property/input/array-property.js.map +1 -1
  15. package/src/lib/property/input/checkbox-property.d.ts +1 -2
  16. package/src/lib/property/input/checkbox-property.js.map +1 -1
  17. package/src/lib/property/input/common.d.ts +1 -4
  18. package/src/lib/property/input/common.js.map +1 -1
  19. package/src/lib/property/input/date-time-property.d.ts +1 -2
  20. package/src/lib/property/input/date-time-property.js.map +1 -1
  21. package/src/lib/property/input/dropdown/dropdown-prop.d.ts +2 -3
  22. package/src/lib/property/input/dropdown/dropdown-prop.js.map +1 -1
  23. package/src/lib/property/input/dropdown/static-dropdown.d.ts +2 -3
  24. package/src/lib/property/input/dropdown/static-dropdown.js.map +1 -1
  25. package/src/lib/property/input/dynamic-prop.d.ts +127 -3
  26. package/src/lib/property/input/dynamic-prop.js +2 -0
  27. package/src/lib/property/input/dynamic-prop.js.map +1 -1
  28. package/src/lib/property/input/file-property.d.ts +1 -2
  29. package/src/lib/property/input/file-property.js.map +1 -1
  30. package/src/lib/property/input/index.js +4 -5
  31. package/src/lib/property/input/index.js.map +1 -1
  32. package/src/lib/property/input/json-property.d.ts +1 -2
  33. package/src/lib/property/input/json-property.js.map +1 -1
  34. package/src/lib/property/input/markdown-property.d.ts +1 -2
  35. package/src/lib/property/input/markdown-property.js.map +1 -1
  36. package/src/lib/property/input/number-property.d.ts +1 -2
  37. package/src/lib/property/input/number-property.js.map +1 -1
  38. package/src/lib/property/input/object-property.d.ts +1 -2
  39. package/src/lib/property/input/object-property.js.map +1 -1
  40. package/src/lib/property/input/text-property.d.ts +2 -3
  41. package/src/lib/property/input/text-property.js.map +1 -1
  42. package/src/lib/validators/index.d.ts +0 -3
  43. package/src/lib/validators/index.js +0 -4
  44. package/src/lib/validators/index.js.map +1 -1
  45. package/src/lib/validators/errors.d.ts +0 -26
  46. package/src/lib/validators/errors.js +0 -31
  47. package/src/lib/validators/errors.js.map +0 -1
  48. package/src/lib/validators/types.d.ts +0 -17
  49. package/src/lib/validators/types.js +0 -15
  50. package/src/lib/validators/types.js.map +0 -1
  51. package/src/lib/validators/utils.d.ts +0 -1
  52. package/src/lib/validators/utils.js +0 -11
  53. package/src/lib/validators/utils.js.map +0 -1
  54. package/src/lib/validators/validators.d.ts +0 -26
  55. package/src/lib/validators/validators.js +0 -323
  56. package/src/lib/validators/validators.js.map +0 -1
@@ -1,10 +1,9 @@
1
1
  import { BasePropertySchema, TPropertyValue } from "./common";
2
2
  import { PropertyType } from "./property-type";
3
- import { ValidationInputType } from "../../validators/types";
4
3
  export declare const NumberProperty: import("@sinclair/typebox").TObject<{
5
4
  [x: string]: import("@sinclair/typebox").TSchema;
6
5
  [x: number]: import("@sinclair/typebox").TSchema;
7
6
  displayName: import("@sinclair/typebox").TIntersect<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TSchema]>;
8
7
  description: import("@sinclair/typebox").TIntersect<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TSchema]>;
9
8
  }>;
10
- export type NumberProperty<R extends boolean> = BasePropertySchema & TPropertyValue<number, PropertyType.NUMBER, ValidationInputType.NUMBER, R>;
9
+ export type NumberProperty<R extends boolean> = BasePropertySchema & TPropertyValue<number, PropertyType.NUMBER, R>;
@@ -1 +1 @@
1
- {"version":3,"file":"number-property.js","sourceRoot":"","sources":["../../../../../../../../../packages/pieces/community/framework/src/lib/property/input/number-property.ts"],"names":[],"mappings":";;;AAAA,+CAAyC;AACzC,qCAA8D;AAC9D,mDAA+C;AAGlC,QAAA,cAAc,GAAG,cAAI,CAAC,SAAS,CAAC;IACzC,2BAAkB;IAClB,IAAA,uBAAc,EAAC,cAAI,CAAC,MAAM,EAAE,EAAE,4BAAY,CAAC,MAAM,CAAC;CACrD,CAAC,CAAA"}
1
+ {"version":3,"file":"number-property.js","sourceRoot":"","sources":["../../../../../../../../../packages/pieces/community/framework/src/lib/property/input/number-property.ts"],"names":[],"mappings":";;;AAAA,+CAAyC;AACzC,qCAA8D;AAC9D,mDAA+C;AAElC,QAAA,cAAc,GAAG,cAAI,CAAC,SAAS,CAAC;IACzC,2BAAkB;IAClB,IAAA,uBAAc,EAAC,cAAI,CAAC,MAAM,EAAE,EAAE,4BAAY,CAAC,MAAM,CAAC;CACrD,CAAC,CAAA"}
@@ -1,10 +1,9 @@
1
1
  import { BasePropertySchema, TPropertyValue } from "./common";
2
2
  import { PropertyType } from "./property-type";
3
- import { ValidationInputType } from "../../validators/types";
4
3
  export declare const ObjectProperty: import("@sinclair/typebox").TObject<{
5
4
  [x: string]: import("@sinclair/typebox").TSchema;
6
5
  [x: number]: import("@sinclair/typebox").TSchema;
7
6
  displayName: import("@sinclair/typebox").TIntersect<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TSchema]>;
8
7
  description: import("@sinclair/typebox").TIntersect<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TSchema]>;
9
8
  }>;
10
- export type ObjectProperty<R extends boolean> = BasePropertySchema & TPropertyValue<Record<string, unknown>, PropertyType.OBJECT, ValidationInputType.OBJECT, R>;
9
+ export type ObjectProperty<R extends boolean> = BasePropertySchema & TPropertyValue<Record<string, unknown>, PropertyType.OBJECT, R>;
@@ -1 +1 @@
1
- {"version":3,"file":"object-property.js","sourceRoot":"","sources":["../../../../../../../../../packages/pieces/community/framework/src/lib/property/input/object-property.ts"],"names":[],"mappings":";;;AAAA,+CAAyC;AACzC,qCAA8D;AAC9D,mDAA+C;AAGlC,QAAA,cAAc,GAAG,cAAI,CAAC,SAAS,CAAC;IACzC,2BAAkB;IAClB,IAAA,uBAAc,EACV,cAAI,CAAC,MAAM,CAAC,cAAI,CAAC,MAAM,EAAE,EAAE,cAAI,CAAC,OAAO,EAAE,CAAC,EAC1C,4BAAY,CAAC,MAAM,CACtB;CACJ,CAAC,CAAA"}
1
+ {"version":3,"file":"object-property.js","sourceRoot":"","sources":["../../../../../../../../../packages/pieces/community/framework/src/lib/property/input/object-property.ts"],"names":[],"mappings":";;;AAAA,+CAAyC;AACzC,qCAA8D;AAC9D,mDAA+C;AAElC,QAAA,cAAc,GAAG,cAAI,CAAC,SAAS,CAAC;IACzC,2BAAkB;IAClB,IAAA,uBAAc,EACV,cAAI,CAAC,MAAM,CAAC,cAAI,CAAC,MAAM,EAAE,EAAE,cAAI,CAAC,OAAO,EAAE,CAAC,EAC1C,4BAAY,CAAC,MAAM,CACtB;CACJ,CAAC,CAAA"}
@@ -1,17 +1,16 @@
1
1
  import { BasePropertySchema, TPropertyValue } from "./common";
2
2
  import { PropertyType } from "./property-type";
3
- import { ValidationInputType } from "../../validators/types";
4
3
  export declare const ShortTextProperty: import("@sinclair/typebox").TObject<{
5
4
  [x: string]: import("@sinclair/typebox").TSchema;
6
5
  [x: number]: import("@sinclair/typebox").TSchema;
7
6
  displayName: import("@sinclair/typebox").TIntersect<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TSchema]>;
8
7
  description: import("@sinclair/typebox").TIntersect<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TSchema]>;
9
8
  }>;
10
- export type ShortTextProperty<R extends boolean> = BasePropertySchema & TPropertyValue<string, PropertyType.SHORT_TEXT, ValidationInputType.STRING, R>;
9
+ export type ShortTextProperty<R extends boolean> = BasePropertySchema & TPropertyValue<string, PropertyType.SHORT_TEXT, R>;
11
10
  export declare const LongTextProperty: import("@sinclair/typebox").TObject<{
12
11
  [x: string]: import("@sinclair/typebox").TSchema;
13
12
  [x: number]: import("@sinclair/typebox").TSchema;
14
13
  displayName: import("@sinclair/typebox").TIntersect<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TSchema]>;
15
14
  description: import("@sinclair/typebox").TIntersect<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TSchema]>;
16
15
  }>;
17
- export type LongTextProperty<R extends boolean> = BasePropertySchema & TPropertyValue<string, PropertyType.LONG_TEXT, ValidationInputType.STRING, R>;
16
+ export type LongTextProperty<R extends boolean> = BasePropertySchema & TPropertyValue<string, PropertyType.LONG_TEXT, R>;
@@ -1 +1 @@
1
- {"version":3,"file":"text-property.js","sourceRoot":"","sources":["../../../../../../../../../packages/pieces/community/framework/src/lib/property/input/text-property.ts"],"names":[],"mappings":";;;AAAA,+CAAyC;AACzC,qCAA8D;AAC9D,mDAA+C;AAIlC,QAAA,iBAAiB,GAAG,cAAI,CAAC,SAAS,CAAC;IAC5C,2BAAkB;IAClB,IAAA,uBAAc,EAAC,cAAI,CAAC,MAAM,EAAE,EAAE,4BAAY,CAAC,UAAU,CAAC;CACzD,CAAC,CAAA;AAOW,QAAA,gBAAgB,GAAG,cAAI,CAAC,SAAS,CAAC;IAC3C,2BAAkB;IAClB,IAAA,uBAAc,EAAC,cAAI,CAAC,MAAM,EAAE,EAAE,4BAAY,CAAC,SAAS,CAAC;CACxD,CAAC,CAAA"}
1
+ {"version":3,"file":"text-property.js","sourceRoot":"","sources":["../../../../../../../../../packages/pieces/community/framework/src/lib/property/input/text-property.ts"],"names":[],"mappings":";;;AAAA,+CAAyC;AACzC,qCAA8D;AAC9D,mDAA+C;AAGlC,QAAA,iBAAiB,GAAG,cAAI,CAAC,SAAS,CAAC;IAC5C,2BAAkB;IAClB,IAAA,uBAAc,EAAC,cAAI,CAAC,MAAM,EAAE,EAAE,4BAAY,CAAC,UAAU,CAAC;CACzD,CAAC,CAAA;AAOW,QAAA,gBAAgB,GAAG,cAAI,CAAC,SAAS,CAAC;IAC3C,2BAAkB;IAClB,IAAA,uBAAc,EAAC,cAAI,CAAC,MAAM,EAAE,EAAE,4BAAY,CAAC,SAAS,CAAC;CACxD,CAAC,CAAA"}
@@ -1,4 +1 @@
1
- export * from './types';
2
- export * from './errors';
3
- export * from './utils';
4
1
  export declare const CONNECTION_REGEX = "{{1}{connections.(.*?)}{1}}";
@@ -1,9 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.CONNECTION_REGEX = void 0;
4
- const tslib_1 = require("tslib");
5
- tslib_1.__exportStar(require("./types"), exports);
6
- tslib_1.__exportStar(require("./errors"), exports);
7
- tslib_1.__exportStar(require("./utils"), exports);
8
4
  exports.CONNECTION_REGEX = '{{1}{connections.(.*?)}{1}}';
9
5
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../../packages/pieces/community/framework/src/lib/validators/index.ts"],"names":[],"mappings":";;;;AAAA,kDAAuB;AACvB,mDAAwB;AACxB,kDAAuB;AACV,QAAA,gBAAgB,GAAG,6BAA6B,CAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../../packages/pieces/community/framework/src/lib/validators/index.ts"],"names":[],"mappings":";;;AACa,QAAA,gBAAgB,GAAG,6BAA6B,CAAA"}
@@ -1,26 +0,0 @@
1
- export declare enum ErrorMessages {
2
- REQUIRED = "Expected value, but found value: {userInput}",
3
- EMAIL = "Invalid Email format: {userInput}",
4
- ISO_DATE = "Expected ISO string, but found value: {userInput}",
5
- FILE = "Expected file url or base64 with mimeType, but found value: {userInput}",
6
- NUMBER = "Expected number, but found value: {userInput}",
7
- STRING = "Expected string, but found value: {userInput}",
8
- WHOLE_NUMBER = "Expected whole number, but found value: {userInput}",
9
- MAX_LENGTH = "The value: {userInput} must be less than {length} characters",
10
- MIN_LENGTH = "The value: {userInput} must be at least {length} characters",
11
- MAX = "The value: {userInput} must be {max} or less",
12
- MIN = "The value: {userInput} must be {min} or more",
13
- MIN_DATE = "The date {userInput} must be after {min}",
14
- MAX_DATE = "The date {userInput} must be before {max}",
15
- IN_RANGE = "The value: {userInput} must be at least {min} and less than or equal {max}",
16
- IN_DATE_RANGE = "The date {userInput} must be between {min} and {max}",
17
- URL = "The value: {userInput} is not a valid URL",
18
- REGEX = "The value: {userInput} format is invalid",
19
- PROHIBIT_REGEX = "The value: {userInput} is not allowed",
20
- IMAGE = "The {property} value must be an image",
21
- ONE_OF = "The {userInput} is not a valid value, valid choices are: {choices}",
22
- REQUIRE_KEYS = "The following keys are required: {keys}",
23
- SIZE = "The {property} size must be less than 0:{size}KB",
24
- NON_ZERO = "The value: {userInput} must be a non-zero value",
25
- PHONE_NUMBER = "The phone number entered is not a valid phone number"
26
- }
@@ -1,31 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ErrorMessages = void 0;
4
- var ErrorMessages;
5
- (function (ErrorMessages) {
6
- ErrorMessages["REQUIRED"] = "Expected value, but found value: {userInput}";
7
- ErrorMessages["EMAIL"] = "Invalid Email format: {userInput}";
8
- ErrorMessages["ISO_DATE"] = "Expected ISO string, but found value: {userInput}";
9
- ErrorMessages["FILE"] = "Expected file url or base64 with mimeType, but found value: {userInput}";
10
- ErrorMessages["NUMBER"] = "Expected number, but found value: {userInput}";
11
- ErrorMessages["STRING"] = "Expected string, but found value: {userInput}";
12
- ErrorMessages["WHOLE_NUMBER"] = "Expected whole number, but found value: {userInput}";
13
- ErrorMessages["MAX_LENGTH"] = "The value: {userInput} must be less than {length} characters";
14
- ErrorMessages["MIN_LENGTH"] = "The value: {userInput} must be at least {length} characters";
15
- ErrorMessages["MAX"] = "The value: {userInput} must be {max} or less";
16
- ErrorMessages["MIN"] = "The value: {userInput} must be {min} or more";
17
- ErrorMessages["MIN_DATE"] = "The date {userInput} must be after {min}";
18
- ErrorMessages["MAX_DATE"] = "The date {userInput} must be before {max}";
19
- ErrorMessages["IN_RANGE"] = "The value: {userInput} must be at least {min} and less than or equal {max}";
20
- ErrorMessages["IN_DATE_RANGE"] = "The date {userInput} must be between {min} and {max}";
21
- ErrorMessages["URL"] = "The value: {userInput} is not a valid URL";
22
- ErrorMessages["REGEX"] = "The value: {userInput} format is invalid";
23
- ErrorMessages["PROHIBIT_REGEX"] = "The value: {userInput} is not allowed";
24
- ErrorMessages["IMAGE"] = "The {property} value must be an image";
25
- ErrorMessages["ONE_OF"] = "The {userInput} is not a valid value, valid choices are: {choices}";
26
- ErrorMessages["REQUIRE_KEYS"] = "The following keys are required: {keys}";
27
- ErrorMessages["SIZE"] = "The {property} size must be less than 0:{size}KB";
28
- ErrorMessages["NON_ZERO"] = "The value: {userInput} must be a non-zero value";
29
- ErrorMessages["PHONE_NUMBER"] = "The phone number entered is not a valid phone number";
30
- })(ErrorMessages || (exports.ErrorMessages = ErrorMessages = {}));
31
- //# sourceMappingURL=errors.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"errors.js","sourceRoot":"","sources":["../../../../../../../../packages/pieces/community/framework/src/lib/validators/errors.ts"],"names":[],"mappings":";;;AAAA,IAAY,aAyBX;AAzBD,WAAY,aAAa;IACvB,0EAAyD,CAAA;IACzD,4DAA2C,CAAA;IAC3C,+EAA8D,CAAA;IAC9D,iGAAgF,CAAA;IAChF,yEAAwD,CAAA;IACxD,yEAAwD,CAAA;IACxD,qFAAoE,CAAA;IACpE,4FAA2E,CAAA;IAC3E,2FAA0E,CAAA;IAC1E,qEAAoD,CAAA;IACpD,qEAAoD,CAAA;IACpD,sEAAqD,CAAA;IACrD,uEAAsD,CAAA;IACtD,wGAAuF,CAAA;IACvF,uFAAsE,CAAA;IACtE,kEAAiD,CAAA;IACjD,mEAAkD,CAAA;IAClD,yEAAwD,CAAA;IACxD,gEAA+C,CAAA;IAC/C,8FAA6E,CAAA;IAC7E,yEAAwD,CAAA;IACxD,0EAAyD,CAAA;IACzD,6EAA4D,CAAA;IAC5D,sFAAqE,CAAA;AACvE,CAAC,EAzBW,aAAa,6BAAb,aAAa,QAyBxB"}
@@ -1,17 +0,0 @@
1
- import { PieceProperty } from '../property';
2
- export type ValidationErrors = Record<string, string[] | Record<string, string[]>>;
3
- export type ValidatorFn = (property: PieceProperty, processedValue: any, userInput: any) => string | null;
4
- export declare enum ValidationInputType {
5
- NUMBER = "NUMBER",
6
- STRING = "STRING",
7
- FILE = "FILE",
8
- ANY = "ANY",
9
- DATE_TIME = "DATE_TIME",
10
- OBJECT = "OBJECT",
11
- ARRAY = "ARRAY",
12
- JSON = "JSON"
13
- }
14
- export type TypedValidatorFn<T extends ValidationInputType> = {
15
- type: T;
16
- fn: ValidatorFn;
17
- };
@@ -1,15 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ValidationInputType = void 0;
4
- var ValidationInputType;
5
- (function (ValidationInputType) {
6
- ValidationInputType["NUMBER"] = "NUMBER";
7
- ValidationInputType["STRING"] = "STRING";
8
- ValidationInputType["FILE"] = "FILE";
9
- ValidationInputType["ANY"] = "ANY";
10
- ValidationInputType["DATE_TIME"] = "DATE_TIME";
11
- ValidationInputType["OBJECT"] = "OBJECT";
12
- ValidationInputType["ARRAY"] = "ARRAY";
13
- ValidationInputType["JSON"] = "JSON";
14
- })(ValidationInputType || (exports.ValidationInputType = ValidationInputType = {}));
15
- //# sourceMappingURL=types.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../../../../../packages/pieces/community/framework/src/lib/validators/types.ts"],"names":[],"mappings":";;;AAaA,IAAY,mBASX;AATD,WAAY,mBAAmB;IAC7B,wCAAiB,CAAA;IACjB,wCAAiB,CAAA;IACjB,oCAAa,CAAA;IACb,kCAAW,CAAA;IACX,8CAAuB,CAAA;IACvB,wCAAiB,CAAA;IACjB,sCAAe,CAAA;IACf,oCAAa,CAAA;AACf,CAAC,EATW,mBAAmB,mCAAnB,mBAAmB,QAS9B"}
@@ -1 +0,0 @@
1
- export declare function formatErrorMessage(errorMessage: string, tokens: Record<string, any>): string;
@@ -1,11 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.formatErrorMessage = formatErrorMessage;
4
- function formatErrorMessage(errorMessage, tokens) {
5
- let formattedMessage = errorMessage;
6
- for (const key in tokens) {
7
- formattedMessage = formattedMessage.replace(`{${key}}`, tokens[key]);
8
- }
9
- return formattedMessage;
10
- }
11
- //# sourceMappingURL=utils.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../../../../../../packages/pieces/community/framework/src/lib/validators/utils.ts"],"names":[],"mappings":";;AAAA,gDASC;AATD,SAAgB,kBAAkB,CAChC,YAAoB,EACpB,MAA2B;IAE3B,IAAI,gBAAgB,GAAG,YAAY,CAAC;IACpC,KAAK,MAAM,GAAG,IAAI,MAAM,EAAE,CAAC;QACzB,gBAAgB,GAAG,gBAAgB,CAAC,OAAO,CAAC,IAAI,GAAG,GAAG,EAAE,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC;IACvE,CAAC;IACD,OAAO,gBAAgB,CAAC;AAC1B,CAAC"}
@@ -1,26 +0,0 @@
1
- import { OpUnitType } from 'dayjs';
2
- import { TypedValidatorFn, ValidationInputType } from './types';
3
- export declare class Validators {
4
- static pattern(regex: string | RegExp): TypedValidatorFn<ValidationInputType.STRING>;
5
- static prohibitPattern(regex: string | RegExp): TypedValidatorFn<ValidationInputType.STRING>;
6
- static maxLength(max: number): TypedValidatorFn<ValidationInputType.STRING>;
7
- static minLength(min: number): TypedValidatorFn<ValidationInputType.STRING>;
8
- static minValue(min: number): TypedValidatorFn<ValidationInputType.NUMBER>;
9
- static maxValue(max: number): TypedValidatorFn<ValidationInputType.NUMBER>;
10
- static minDate(min: string, unit?: OpUnitType, includeBounds?: boolean): TypedValidatorFn<ValidationInputType.DATE_TIME>;
11
- static maxDate(max: string, unit?: OpUnitType, includeBounds?: boolean): TypedValidatorFn<ValidationInputType.DATE_TIME>;
12
- static inRange(min: number, max: number): TypedValidatorFn<ValidationInputType.NUMBER>;
13
- static inDateRange(min: string, max: string, unit?: OpUnitType, includeBounds?: boolean): TypedValidatorFn<ValidationInputType.DATE_TIME>;
14
- static number: TypedValidatorFn<ValidationInputType.NUMBER>;
15
- static string: TypedValidatorFn<ValidationInputType.STRING>;
16
- static nonZero: TypedValidatorFn<ValidationInputType.NUMBER>;
17
- static integer: TypedValidatorFn<ValidationInputType.NUMBER>;
18
- static image: TypedValidatorFn<ValidationInputType.FILE>;
19
- static email: TypedValidatorFn<ValidationInputType.STRING>;
20
- static url: TypedValidatorFn<ValidationInputType.STRING>;
21
- static datetimeIso: TypedValidatorFn<ValidationInputType.DATE_TIME>;
22
- static file: TypedValidatorFn<ValidationInputType.FILE>;
23
- static phoneNumber: TypedValidatorFn<ValidationInputType.STRING>;
24
- static oneOf(values: unknown[]): TypedValidatorFn<any>;
25
- static requireKeys(values: string[]): TypedValidatorFn<ValidationInputType.OBJECT>;
26
- }
@@ -1,323 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Validators = void 0;
4
- const tslib_1 = require("tslib");
5
- const dayjs_1 = tslib_1.__importDefault(require("dayjs"));
6
- const errors_1 = require("./errors");
7
- const types_1 = require("./types");
8
- const utils_1 = require("./utils");
9
- const shared_1 = require("@activepieces/shared");
10
- class Validators {
11
- static pattern(regex) {
12
- return {
13
- type: types_1.ValidationInputType.STRING,
14
- fn: (property, processedValue, userInput) => {
15
- if ((0, shared_1.isEmpty)(processedValue))
16
- return null;
17
- if (typeof regex === 'string') {
18
- regex = new RegExp(regex);
19
- }
20
- return regex.test(String(processedValue))
21
- ? null
22
- : (0, utils_1.formatErrorMessage)(errors_1.ErrorMessages.REGEX, {
23
- property: property === null || property === void 0 ? void 0 : property.displayName,
24
- });
25
- },
26
- };
27
- }
28
- static prohibitPattern(regex) {
29
- return {
30
- type: types_1.ValidationInputType.STRING,
31
- fn: (property, processedValue, userInput) => {
32
- const patternValidator = Validators.pattern(regex);
33
- const patternError = patternValidator.fn(property, processedValue, userInput);
34
- return patternError
35
- ? null
36
- : (0, utils_1.formatErrorMessage)(errors_1.ErrorMessages.PROHIBIT_REGEX, {
37
- property: property.displayName,
38
- });
39
- },
40
- };
41
- }
42
- static maxLength(max) {
43
- return {
44
- type: types_1.ValidationInputType.STRING,
45
- fn: (property, processedValue, userInput) => {
46
- if ((0, shared_1.isEmpty)(processedValue))
47
- return null;
48
- const isValid = processedValue.length <= max;
49
- if (!isValid) {
50
- return (0, utils_1.formatErrorMessage)(errors_1.ErrorMessages.MAX_LENGTH, {
51
- userInput,
52
- length: max.toString(),
53
- });
54
- }
55
- return null;
56
- },
57
- };
58
- }
59
- static minLength(min) {
60
- return {
61
- type: types_1.ValidationInputType.STRING,
62
- fn: (property, processedValue, userInput) => {
63
- if ((0, shared_1.isEmpty)(processedValue))
64
- return null;
65
- const isValid = processedValue.length >= min;
66
- if (!isValid) {
67
- return (0, utils_1.formatErrorMessage)(errors_1.ErrorMessages.MIN_LENGTH, {
68
- userInput,
69
- length: min.toString(),
70
- });
71
- }
72
- return null;
73
- },
74
- };
75
- }
76
- static minValue(min) {
77
- return {
78
- type: types_1.ValidationInputType.NUMBER,
79
- fn: (property, processedValue, userInput) => {
80
- const isValid = Number(processedValue) >= min;
81
- if (isValid)
82
- return null;
83
- return (0, utils_1.formatErrorMessage)(errors_1.ErrorMessages.MIN, { userInput, min });
84
- },
85
- };
86
- }
87
- static maxValue(max) {
88
- return {
89
- type: types_1.ValidationInputType.NUMBER,
90
- fn: (property, processedValue, userInput) => {
91
- const isValid = Number(processedValue) <= max;
92
- if (isValid)
93
- return null;
94
- return (0, utils_1.formatErrorMessage)(errors_1.ErrorMessages.MAX, { userInput, max });
95
- },
96
- };
97
- }
98
- static minDate(min, unit = 'day', includeBounds = false) {
99
- return {
100
- type: types_1.ValidationInputType.DATE_TIME,
101
- fn: (property, processedValue, userInput) => {
102
- const dateValue = (0, dayjs_1.default)(processedValue);
103
- const minDate = (0, dayjs_1.default)(min);
104
- if (!minDate.isValid())
105
- return null;
106
- const isValid = includeBounds
107
- ? dateValue.isAfter(minDate, unit)
108
- : dateValue.isSame(minDate, unit) && dateValue.isAfter(minDate, unit);
109
- if (isValid)
110
- return null;
111
- return (0, utils_1.formatErrorMessage)(errors_1.ErrorMessages.MIN_DATE, {
112
- userInput: dateValue.toISOString(),
113
- min: minDate.toISOString(),
114
- });
115
- },
116
- };
117
- }
118
- static maxDate(max, unit = 'day', includeBounds = false) {
119
- return {
120
- type: types_1.ValidationInputType.DATE_TIME,
121
- fn: (property, processedValue, userInput) => {
122
- const dateValue = (0, dayjs_1.default)(processedValue);
123
- const maxDate = (0, dayjs_1.default)(max);
124
- if (!maxDate.isValid())
125
- return null;
126
- const isValid = includeBounds
127
- ? dateValue.isBefore(maxDate, unit)
128
- : dateValue.isSame(maxDate, unit) &&
129
- dateValue.isBefore(maxDate, unit);
130
- if (isValid)
131
- return null;
132
- return (0, utils_1.formatErrorMessage)(errors_1.ErrorMessages.MAX_DATE, {
133
- userInput: dateValue.toISOString(),
134
- max: maxDate.toISOString(),
135
- });
136
- },
137
- };
138
- }
139
- static inRange(min, max) {
140
- return {
141
- type: types_1.ValidationInputType.NUMBER,
142
- fn: (property, processedValue, userInput) => {
143
- const numericValue = Number(processedValue);
144
- const isValid = numericValue <= max && numericValue >= min;
145
- if (isValid)
146
- return null;
147
- return (0, utils_1.formatErrorMessage)(errors_1.ErrorMessages.IN_RANGE, {
148
- userInput,
149
- min,
150
- max,
151
- });
152
- },
153
- };
154
- }
155
- static inDateRange(min, max, unit = 'day', includeBounds = false) {
156
- return {
157
- type: types_1.ValidationInputType.DATE_TIME,
158
- fn: (property, processedValue) => {
159
- const dateValue = (0, dayjs_1.default)(processedValue);
160
- const minDate = (0, dayjs_1.default)(min);
161
- const maxDate = (0, dayjs_1.default)(max);
162
- const validRanges = minDate.isValid() && maxDate.isValid();
163
- if (!validRanges)
164
- return null;
165
- const isValid = includeBounds
166
- ? (dateValue.isBefore(maxDate, unit) ||
167
- dateValue.isSame(maxDate, unit)) &&
168
- (dateValue.isAfter(minDate, unit) ||
169
- dateValue.isSame(minDate, unit))
170
- : dateValue.isBefore(maxDate, unit) &&
171
- dateValue.isAfter(minDate, unit);
172
- if (isValid)
173
- return null;
174
- return (0, utils_1.formatErrorMessage)(errors_1.ErrorMessages.IN_RANGE, {
175
- userInput: dateValue.toISOString(),
176
- min: minDate.toISOString(),
177
- max: maxDate.toISOString(),
178
- });
179
- },
180
- };
181
- }
182
- static oneOf(values) {
183
- return {
184
- type: types_1.ValidationInputType.ANY,
185
- fn: (property, processedValue, userInput) => {
186
- if (Array.isArray(values)) {
187
- return values.includes(processedValue)
188
- ? null
189
- : (0, utils_1.formatErrorMessage)(errors_1.ErrorMessages.ONE_OF, {
190
- userInput,
191
- choices: values,
192
- });
193
- }
194
- return null;
195
- },
196
- };
197
- }
198
- static requireKeys(values) {
199
- return {
200
- type: types_1.ValidationInputType.OBJECT,
201
- fn: (property, processedValue, userInput) => {
202
- if (Array.isArray(values)) {
203
- const missingKeys = values.filter((key) => !processedValue[key]);
204
- return missingKeys.length
205
- ? (0, utils_1.formatErrorMessage)(errors_1.ErrorMessages.REQUIRE_KEYS, {
206
- userInput,
207
- keys: missingKeys.join(', '),
208
- })
209
- : null;
210
- }
211
- return null;
212
- },
213
- };
214
- }
215
- }
216
- exports.Validators = Validators;
217
- Validators.number = {
218
- type: types_1.ValidationInputType.NUMBER,
219
- fn: (property, processedValue, userInput) => {
220
- if (isNaN(processedValue)) {
221
- return (0, utils_1.formatErrorMessage)(errors_1.ErrorMessages.NUMBER, { userInput });
222
- }
223
- return null;
224
- },
225
- };
226
- Validators.string = {
227
- type: types_1.ValidationInputType.STRING,
228
- fn: (property, processedValue, userInput) => {
229
- if (!(0, shared_1.isString)(processedValue)) {
230
- return (0, utils_1.formatErrorMessage)(errors_1.ErrorMessages.STRING, { userInput });
231
- }
232
- return null;
233
- }
234
- };
235
- Validators.nonZero = {
236
- type: types_1.ValidationInputType.NUMBER,
237
- fn: (property, processedValue, userInput) => {
238
- if (processedValue === 0) {
239
- return (0, utils_1.formatErrorMessage)(errors_1.ErrorMessages.NON_ZERO, { userInput });
240
- }
241
- return null;
242
- },
243
- };
244
- Validators.integer = {
245
- type: types_1.ValidationInputType.NUMBER,
246
- fn: (property, processedValue, userInput) => {
247
- if (!Number.isInteger(processedValue)) {
248
- return (0, utils_1.formatErrorMessage)(errors_1.ErrorMessages.WHOLE_NUMBER, { userInput });
249
- }
250
- return null;
251
- },
252
- };
253
- Validators.image = {
254
- type: types_1.ValidationInputType.FILE,
255
- fn: (property, processedValue, userInput) => {
256
- const allowedType = ['jpg', 'png', 'gif', 'webp', 'flif', 'cr2', 'tif', 'bmp', 'jxr', 'psd', 'ico', 'bpg', 'jp2', 'jpm', 'jpx', 'heic', 'cur', 'dcm', 'avif'];
257
- const ext = processedValue.extension;
258
- return allowedType.includes(ext !== null && ext !== void 0 ? ext : '')
259
- ? null
260
- : (0, utils_1.formatErrorMessage)(errors_1.ErrorMessages.IMAGE, { property: property });
261
- },
262
- };
263
- Validators.email = {
264
- type: types_1.ValidationInputType.STRING,
265
- fn: (property, processedValue, userInput) => {
266
- const pattern = new RegExp('^(([^<>()\\[\\].,;:\\s@"]+(\\.[^<>()\\[\\].,;:\\s@"]+)*)|(".+"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}])|(([a-zA-Z-0-9]+\\.)+[a-zA-Z]{2,}))$');
267
- if ((0, shared_1.isEmpty)(processedValue)) {
268
- return null;
269
- }
270
- if ((0, shared_1.isEmpty)(processedValue))
271
- return null;
272
- return pattern.test(String(processedValue))
273
- ? null
274
- : (0, utils_1.formatErrorMessage)(errors_1.ErrorMessages.EMAIL, { userInput });
275
- },
276
- };
277
- Validators.url = {
278
- type: types_1.ValidationInputType.STRING,
279
- fn: (property, processedValue, userInput) => {
280
- const pattern = new RegExp('^((https?|ftp|file)://)?' + // protocol
281
- '((([a-zA-Z\\d]([a-zA-Z\\d-]*[a-zA-Z\\d])*)\\.)+[a-zA-Z]{2,}|' + // domain name
282
- '((\\d{1,3}\\.){3}\\d{1,3}))' + // OR ip (v4) address
283
- '(\\:\\d+)?(\\/[-a-zA-Z\\d%_.~+]*)*' + // port and path
284
- '(\\?[;&a-zA-Z\\d%_.~+=-]*)?' + // query string
285
- '(\\#[-a-zA-Z\\d_]*)?$' // fragment locator
286
- );
287
- if ((0, shared_1.isEmpty)(processedValue))
288
- return null;
289
- return pattern.test(String(processedValue))
290
- ? null
291
- : (0, utils_1.formatErrorMessage)(errors_1.ErrorMessages.URL, { userInput });
292
- },
293
- };
294
- Validators.datetimeIso = {
295
- type: types_1.ValidationInputType.DATE_TIME,
296
- fn: (property, processedValue, userInput) => {
297
- if (property.required && (0, shared_1.isNil)(processedValue)) {
298
- return (0, utils_1.formatErrorMessage)(errors_1.ErrorMessages.ISO_DATE, { userInput });
299
- }
300
- return null;
301
- },
302
- };
303
- Validators.file = {
304
- type: types_1.ValidationInputType.FILE,
305
- fn: (property, processedValue, userInput) => {
306
- if (property.required && (0, shared_1.isNil)(processedValue)) {
307
- return (0, utils_1.formatErrorMessage)(errors_1.ErrorMessages.FILE, { userInput });
308
- }
309
- return null;
310
- },
311
- };
312
- Validators.phoneNumber = {
313
- type: types_1.ValidationInputType.STRING,
314
- fn: (property, processedValue, userInput) => {
315
- const pattern = new RegExp('^\\+?\\d{1,4}?[-.\\s]?\\(?\\d{1,3}?\\)?[-.\\s]?\\d{1,4}[-.\\s]?\\d{1,4}[-.\\s]?\\d{1,9}$');
316
- if ((0, shared_1.isEmpty)(processedValue))
317
- return null;
318
- return pattern.test(String(processedValue))
319
- ? null
320
- : (0, utils_1.formatErrorMessage)(errors_1.ErrorMessages.PHONE_NUMBER, { userInput });
321
- },
322
- };
323
- //# sourceMappingURL=validators.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"validators.js","sourceRoot":"","sources":["../../../../../../../../packages/pieces/community/framework/src/lib/validators/validators.ts"],"names":[],"mappings":";;;;AAAA,0DAA0C;AAC1C,qCAAyC;AACzC,mCAGiB;AACjB,mCAA6C;AAE7C,iDAAgE;AAEhE,MAAa,UAAU;IACrB,MAAM,CAAC,OAAO,CACZ,KAAsB;QAEtB,OAAO;YACL,IAAI,EAAE,2BAAmB,CAAC,MAAM;YAChC,EAAE,EAAE,CAAC,QAAQ,EAAE,cAAc,EAAE,SAAS,EAAE,EAAE;gBAC1C,IAAI,IAAA,gBAAO,EAAC,cAAc,CAAC;oBAAE,OAAO,IAAI,CAAC;gBAEzC,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;oBAC9B,KAAK,GAAG,IAAI,MAAM,CAAC,KAAK,CAAC,CAAC;gBAC5B,CAAC;gBAED,OAAO,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC;oBACvC,CAAC,CAAC,IAAI;oBACN,CAAC,CAAC,IAAA,0BAAkB,EAAC,sBAAa,CAAC,KAAK,EAAE;wBACxC,QAAQ,EAAE,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,WAAW;qBAChC,CAAC,CAAC;YACP,CAAC;SACF,CAAC;IACJ,CAAC;IAED,MAAM,CAAC,eAAe,CACpB,KAAsB;QAEtB,OAAO;YACL,IAAI,EAAE,2BAAmB,CAAC,MAAM;YAChC,EAAE,EAAE,CAAC,QAAQ,EAAE,cAAc,EAAE,SAAS,EAAE,EAAE;gBAC1C,MAAM,gBAAgB,GAAG,UAAU,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;gBACnD,MAAM,YAAY,GAAG,gBAAgB,CAAC,EAAE,CACtC,QAAQ,EACR,cAAc,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