@activepieces/pieces-framework 0.11.0 → 0.13.0
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 +1 -1
- package/src/lib/property/authentication/common.d.ts +2 -0
- package/src/lib/property/authentication/common.js +1 -1
- package/src/lib/property/authentication/common.js.map +1 -1
- package/src/lib/property/authentication/oauth2-prop.d.ts +1 -3
- package/src/lib/property/authentication/oauth2-prop.js +2 -3
- package/src/lib/property/authentication/oauth2-prop.js.map +1 -1
- package/src/lib/property/index.d.ts +3 -1
- package/src/lib/property/index.js +3 -2
- package/src/lib/property/index.js.map +1 -1
- package/src/lib/property/input/custom-property.d.ts +9 -0
- package/src/lib/property/input/index.d.ts +11 -2
- package/src/lib/property/input/index.js +2 -1
- package/src/lib/property/input/index.js.map +1 -1
package/package.json
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ServerContext } from '../../context';
|
|
1
2
|
export declare const BasePieceAuthSchema: import("@sinclair/typebox").TObject<{
|
|
2
3
|
displayName: import("@sinclair/typebox").TString;
|
|
3
4
|
description: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
@@ -7,6 +8,7 @@ export type BasePieceAuthSchema<AuthValueSchema> = {
|
|
|
7
8
|
description?: string;
|
|
8
9
|
validate?: (params: {
|
|
9
10
|
auth: AuthValueSchema;
|
|
11
|
+
server: Omit<ServerContext, 'token'>;
|
|
10
12
|
}) => Promise<{
|
|
11
13
|
valid: true;
|
|
12
14
|
} | {
|
|
@@ -4,6 +4,6 @@ exports.BasePieceAuthSchema = void 0;
|
|
|
4
4
|
const typebox_1 = require("@sinclair/typebox");
|
|
5
5
|
exports.BasePieceAuthSchema = typebox_1.Type.Object({
|
|
6
6
|
displayName: typebox_1.Type.String(),
|
|
7
|
-
description: typebox_1.Type.Optional(typebox_1.Type.String())
|
|
7
|
+
description: typebox_1.Type.Optional(typebox_1.Type.String())
|
|
8
8
|
});
|
|
9
9
|
//# sourceMappingURL=common.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"common.js","sourceRoot":"","sources":["../../../../../../../../../packages/pieces/community/framework/src/lib/property/authentication/common.ts"],"names":[],"mappings":";;;AAAA,+CAAyC;
|
|
1
|
+
{"version":3,"file":"common.js","sourceRoot":"","sources":["../../../../../../../../../packages/pieces/community/framework/src/lib/property/authentication/common.ts"],"names":[],"mappings":";;;AAAA,+CAAyC;AAG5B,QAAA,mBAAmB,GAAG,cAAI,CAAC,MAAM,CAAC;IAC7C,WAAW,EAAE,cAAI,CAAC,MAAM,EAAE;IAC1B,WAAW,EAAE,cAAI,CAAC,QAAQ,CAAC,cAAI,CAAC,MAAM,EAAE,CAAC;CAC1C,CAAC,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { OAuth2GrantType } from '@activepieces/shared';
|
|
1
|
+
import { BOTH_CLIENT_CREDENTIALS_AND_AUTHORIZATION_CODE, OAuth2GrantType } from '@activepieces/shared';
|
|
2
2
|
import { ShortTextProperty } from '../input/text-property';
|
|
3
3
|
import { SecretTextProperty } from './secret-text-property';
|
|
4
4
|
import { BasePieceAuthSchema } from './common';
|
|
@@ -6,7 +6,6 @@ import { TPropertyValue } from '../input/common';
|
|
|
6
6
|
import { PropertyType } from '../input/property-type';
|
|
7
7
|
import { StaticDropdownProperty } from '../input/dropdown/static-dropdown';
|
|
8
8
|
import { StaticPropsValue } from '..';
|
|
9
|
-
export declare const BOTH_CLIENT_CREDENTIALS_AND_AUTHORIZATION_CODE: "both_client_credentials_and_authorization_code";
|
|
10
9
|
export declare enum OAuth2AuthorizationMethod {
|
|
11
10
|
HEADER = "HEADER",
|
|
12
11
|
BODY = "BODY"
|
|
@@ -106,7 +105,6 @@ type OAuth2ExtraProps = {
|
|
|
106
105
|
authorizationMethod?: OAuth2AuthorizationMethod;
|
|
107
106
|
grantType?: OAuth2GrantType | typeof BOTH_CLIENT_CREDENTIALS_AND_AUTHORIZATION_CODE;
|
|
108
107
|
extra?: Record<string, string>;
|
|
109
|
-
allowsSwitchingGrantType?: boolean;
|
|
110
108
|
};
|
|
111
109
|
export declare const OAuth2PropertyValue: import("@sinclair/typebox").TObject<{
|
|
112
110
|
access_token: import("@sinclair/typebox").TString;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.OAuth2Property = exports.OAuth2PropertyValue = exports.OAuth2Props = exports.OAuth2AuthorizationMethod =
|
|
3
|
+
exports.OAuth2Property = exports.OAuth2PropertyValue = exports.OAuth2Props = exports.OAuth2AuthorizationMethod = void 0;
|
|
4
4
|
const shared_1 = require("@activepieces/shared");
|
|
5
5
|
const typebox_1 = require("@sinclair/typebox");
|
|
6
6
|
const text_property_1 = require("../input/text-property");
|
|
@@ -9,7 +9,6 @@ const common_1 = require("./common");
|
|
|
9
9
|
const common_2 = require("../input/common");
|
|
10
10
|
const property_type_1 = require("../input/property-type");
|
|
11
11
|
const static_dropdown_1 = require("../input/dropdown/static-dropdown");
|
|
12
|
-
exports.BOTH_CLIENT_CREDENTIALS_AND_AUTHORIZATION_CODE = 'both_client_credentials_and_authorization_code';
|
|
13
12
|
var OAuth2AuthorizationMethod;
|
|
14
13
|
(function (OAuth2AuthorizationMethod) {
|
|
15
14
|
OAuth2AuthorizationMethod["HEADER"] = "HEADER";
|
|
@@ -28,7 +27,7 @@ const OAuth2ExtraProps = typebox_1.Type.Object({
|
|
|
28
27
|
scope: typebox_1.Type.Array(typebox_1.Type.String()),
|
|
29
28
|
pkce: typebox_1.Type.Optional(typebox_1.Type.Boolean()),
|
|
30
29
|
authorizationMethod: typebox_1.Type.Optional(typebox_1.Type.Enum(OAuth2AuthorizationMethod)),
|
|
31
|
-
grantType: typebox_1.Type.Optional(typebox_1.Type.Union([typebox_1.Type.Enum(shared_1.OAuth2GrantType), typebox_1.Type.Literal(
|
|
30
|
+
grantType: typebox_1.Type.Optional(typebox_1.Type.Union([typebox_1.Type.Enum(shared_1.OAuth2GrantType), typebox_1.Type.Literal(shared_1.BOTH_CLIENT_CREDENTIALS_AND_AUTHORIZATION_CODE)])),
|
|
32
31
|
extra: typebox_1.Type.Optional(typebox_1.Type.Record(typebox_1.Type.String(), typebox_1.Type.String())),
|
|
33
32
|
});
|
|
34
33
|
exports.OAuth2PropertyValue = typebox_1.Type.Object({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"oauth2-prop.js","sourceRoot":"","sources":["../../../../../../../../../packages/pieces/community/framework/src/lib/property/authentication/oauth2-prop.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"oauth2-prop.js","sourceRoot":"","sources":["../../../../../../../../../packages/pieces/community/framework/src/lib/property/authentication/oauth2-prop.ts"],"names":[],"mappings":";;;AAAA,iDAAuG;AACvG,+CAAyC;AACzC,0DAA2D;AAC3D,iEAA4D;AAC5D,qCAA+C;AAC/C,4CAAiD;AACjD,0DAAsD;AACtD,uEAA2E;AAG3E,IAAY,yBAGX;AAHD,WAAY,yBAAyB;IACnC,8CAAiB,CAAA;IACjB,0CAAa,CAAA;AACf,CAAC,EAHW,yBAAyB,yCAAzB,yBAAyB,QAGpC;AAED,MAAM,SAAS,GAAG,cAAI,CAAC,KAAK,CAAC;IAC3B,iCAAiB;IACjB,yCAAkB;IAClB,wCAAsB;CACvB,CAAC,CAAA;AAQW,QAAA,WAAW,GAAG,cAAI,CAAC,MAAM,CAAC,cAAI,CAAC,MAAM,EAAE,EAAE,SAAS,CAAC,CAAC;AASjE,MAAM,gBAAgB,GAAG,cAAI,CAAC,MAAM,CAAC;IACnC,KAAK,EAAE,cAAI,CAAC,QAAQ,CAAC,cAAI,CAAC,MAAM,CAAC,cAAI,CAAC,MAAM,EAAE,EAAE,SAAS,CAAC,CAAC;IAC3D,OAAO,EAAE,cAAI,CAAC,MAAM,EAAE;IACtB,QAAQ,EAAE,cAAI,CAAC,MAAM,EAAE;IACvB,KAAK,EAAE,cAAI,CAAC,KAAK,CAAC,cAAI,CAAC,MAAM,EAAE,CAAC;IAChC,IAAI,EAAE,cAAI,CAAC,QAAQ,CAAC,cAAI,CAAC,OAAO,EAAE,CAAC;IACnC,mBAAmB,EAAE,cAAI,CAAC,QAAQ,CAAC,cAAI,CAAC,IAAI,CAAC,yBAAyB,CAAC,CAAC;IACxE,SAAS,EAAE,cAAI,CAAC,QAAQ,CAAC,cAAI,CAAC,KAAK,CAAC,CAAC,cAAI,CAAC,IAAI,CAAC,wBAAe,CAAC,EAAE,cAAI,CAAC,OAAO,CAAC,uDAA8C,CAAC,CAAC,CAAC,CAAC;IAChI,KAAK,EAAE,cAAI,CAAC,QAAQ,CAAC,cAAI,CAAC,MAAM,CAAC,cAAI,CAAC,MAAM,EAAE,EAAE,cAAI,CAAC,MAAM,EAAE,CAAC,CAAC;CAChE,CAAC,CAAA;AAaW,QAAA,mBAAmB,GAAG,cAAI,CAAC,MAAM,CAAC;IAC7C,YAAY,EAAE,cAAI,CAAC,MAAM,EAAE;IAC3B,KAAK,EAAE,cAAI,CAAC,QAAQ,CAAC,mBAAW,CAAC;IACjC,IAAI,EAAE,cAAI,CAAC,MAAM,CAAC,cAAI,CAAC,MAAM,EAAE,EAAE,cAAI,CAAC,GAAG,EAAE,CAAC;CAC7C,CAAC,CAAA;AAQW,QAAA,cAAc,GAAG,cAAI,CAAC,SAAS,CAAC;IAC3C,4BAAmB;IACnB,gBAAgB;IAChB,IAAA,uBAAc,EAAC,2BAAmB,EAAE,4BAAY,CAAC,MAAM,CAAC;CACzD,CAAC,CAAA"}
|
|
@@ -26,7 +26,7 @@ export { BasicAuthPropertyValue } from './authentication/basic-auth-prop';
|
|
|
26
26
|
export { StaticMultiSelectDropdownProperty } from './input/dropdown/static-dropdown';
|
|
27
27
|
export { StaticDropdownProperty } from './input/dropdown/static-dropdown';
|
|
28
28
|
export * from './authentication/custom-auth-prop';
|
|
29
|
-
export { OAuth2Property
|
|
29
|
+
export { OAuth2Property } from './authentication/oauth2-prop';
|
|
30
30
|
export { FileProperty } from './input/file-property';
|
|
31
31
|
export { BasicAuthProperty } from './authentication/basic-auth-prop';
|
|
32
32
|
export { SecretTextProperty } from './authentication/secret-text-property';
|
|
@@ -281,6 +281,8 @@ export declare const PieceProperty: import("@sinclair/typebox").TUnion<[import("
|
|
|
281
281
|
description: import("@sinclair/typebox").TIntersect<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TSchema]>;
|
|
282
282
|
}>]>]>;
|
|
283
283
|
export type PieceProperty = InputProperty | PieceAuthProperty;
|
|
284
|
+
export { CustomProperty } from './input/custom-property';
|
|
285
|
+
export type { CustomPropertyCodeFunctionParams } from './input/custom-property';
|
|
284
286
|
export declare const PiecePropertyMap: import("@sinclair/typebox").TRecord<import("@sinclair/typebox").TString, import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TObject<{
|
|
285
287
|
[x: string]: import("@sinclair/typebox").TSchema;
|
|
286
288
|
[x: number]: import("@sinclair/typebox").TSchema;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.InputPropertyMap = exports.PiecePropertyMap = exports.PieceProperty = exports.JsonProperty = exports.CustomAuthProperty = exports.SecretTextProperty = exports.BasicAuthProperty = exports.FileProperty = exports.
|
|
3
|
+
exports.InputPropertyMap = exports.PiecePropertyMap = exports.CustomProperty = exports.PieceProperty = exports.JsonProperty = exports.CustomAuthProperty = exports.SecretTextProperty = exports.BasicAuthProperty = exports.FileProperty = exports.OAuth2Property = exports.StaticDropdownProperty = exports.StaticMultiSelectDropdownProperty = exports.BasicAuthPropertyValue = exports.OAuth2AuthorizationMethod = exports.OAuth2Props = exports.ObjectProperty = exports.NumberProperty = exports.LongTextProperty = exports.DateTimeProperty = exports.CheckboxProperty = exports.BasePropertySchema = exports.ArraySubProps = exports.ArrayProperty = exports.ShortTextProperty = exports.PieceAuthProperty = exports.OAuth2PropertyValue = exports.DropdownState = exports.DropdownOption = exports.DynamicPropsValue = exports.PieceAuth = exports.Property = exports.PropertyType = exports.DynamicProp = exports.DynamicProperties = exports.MultiSelectDropdownProperty = exports.DropdownProperty = exports.ApFile = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const input_1 = require("./input");
|
|
6
6
|
const authentication_1 = require("./authentication");
|
|
@@ -59,7 +59,6 @@ Object.defineProperty(exports, "StaticDropdownProperty", { enumerable: true, get
|
|
|
59
59
|
tslib_1.__exportStar(require("./authentication/custom-auth-prop"), exports);
|
|
60
60
|
var oauth2_prop_4 = require("./authentication/oauth2-prop");
|
|
61
61
|
Object.defineProperty(exports, "OAuth2Property", { enumerable: true, get: function () { return oauth2_prop_4.OAuth2Property; } });
|
|
62
|
-
Object.defineProperty(exports, "BOTH_CLIENT_CREDENTIALS_AND_AUTHORIZATION_CODE", { enumerable: true, get: function () { return oauth2_prop_4.BOTH_CLIENT_CREDENTIALS_AND_AUTHORIZATION_CODE; } });
|
|
63
62
|
var file_property_2 = require("./input/file-property");
|
|
64
63
|
Object.defineProperty(exports, "FileProperty", { enumerable: true, get: function () { return file_property_2.FileProperty; } });
|
|
65
64
|
var basic_auth_prop_2 = require("./authentication/basic-auth-prop");
|
|
@@ -71,6 +70,8 @@ Object.defineProperty(exports, "CustomAuthProperty", { enumerable: true, get: fu
|
|
|
71
70
|
var json_property_1 = require("./input/json-property");
|
|
72
71
|
Object.defineProperty(exports, "JsonProperty", { enumerable: true, get: function () { return json_property_1.JsonProperty; } });
|
|
73
72
|
exports.PieceProperty = typebox_1.Type.Union([input_1.InputProperty, authentication_1.PieceAuthProperty]);
|
|
73
|
+
var custom_property_1 = require("./input/custom-property");
|
|
74
|
+
Object.defineProperty(exports, "CustomProperty", { enumerable: true, get: function () { return custom_property_1.CustomProperty; } });
|
|
74
75
|
exports.PiecePropertyMap = typebox_1.Type.Record(typebox_1.Type.String(), exports.PieceProperty);
|
|
75
76
|
exports.InputPropertyMap = typebox_1.Type.Record(typebox_1.Type.String(), input_1.InputProperty);
|
|
76
77
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../../packages/pieces/community/framework/src/lib/property/index.ts"],"names":[],"mappings":";;;;AAAA,mCAAwC;AACxC,qDAAqD;AACrD,+CAAyC;AAIzC,WAAW;AACX,uDAA+C;AAAtC,uGAAA,MAAM,OAAA;AACf,gEAA+F;AAAtF,iHAAA,gBAAgB,OAAA;AAAE,4HAAA,2BAA2B,OAAA;AACtD,qDAAsE;AAA7D,iHAAA,iBAAiB,OAAA;AAAE,2GAAA,WAAW,OAAA;AACvC,uDAAqD;AAA5C,6GAAA,YAAY,OAAA;AACrB,iCAAmC;AAA1B,iGAAA,QAAQ,OAAA;AACjB,mDAA6C;AAApC,2GAAA,SAAS,OAAA;AAClB,qDAAyD;AAAhD,iHAAA,iBAAiB,OAAA;AAC1B,kDAAuE;AAA9D,wGAAA,cAAc,OAAA;AAAC,uGAAA,aAAa,OAAA;AACrC,4DAAmE;AAA1D,kHAAA,mBAAmB,OAAA;AAC5B,mDAAqD;AAA5C,mHAAA,iBAAiB,OAAA;AAC1B,uDAA0D;AAAjD,kHAAA,iBAAiB,OAAA;AAC1B,yDAAsE;AAA7D,+GAAA,aAAa,OAAA;AAAE,+GAAA,aAAa,OAAA;AACrC,yCAAoD;AAA3C,4GAAA,kBAAkB,OAAA;AAC3B,+DAA6D;AAApD,qHAAA,gBAAgB,OAAA;AACzB,iEAA8D;AAArD,sHAAA,gBAAgB,OAAA;AACzB,uDAAyD;AAAhD,iHAAA,gBAAgB,OAAA;AACzB,2DAAyD;AAAhD,iHAAA,cAAc,OAAA;AACvB,2DAAyD;AAAhD,iHAAA,cAAc,OAAA;AACvB,4DAA2D;AAAlD,0GAAA,WAAW,OAAA;AACpB,4DAAyE;AAAhE,wHAAA,yBAAyB,OAAA;AAClC,oEAA0E;AAAjE,yHAAA,sBAAsB,OAAA;AAC/B,oEAAqF;AAA5E,oIAAA,iCAAiC,OAAA;AAC1C,oEAA0E;AAAjE,yHAAA,sBAAsB,OAAA;AAC/B,4EAAkD;AAClD,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../../packages/pieces/community/framework/src/lib/property/index.ts"],"names":[],"mappings":";;;;AAAA,mCAAwC;AACxC,qDAAqD;AACrD,+CAAyC;AAIzC,WAAW;AACX,uDAA+C;AAAtC,uGAAA,MAAM,OAAA;AACf,gEAA+F;AAAtF,iHAAA,gBAAgB,OAAA;AAAE,4HAAA,2BAA2B,OAAA;AACtD,qDAAsE;AAA7D,iHAAA,iBAAiB,OAAA;AAAE,2GAAA,WAAW,OAAA;AACvC,uDAAqD;AAA5C,6GAAA,YAAY,OAAA;AACrB,iCAAmC;AAA1B,iGAAA,QAAQ,OAAA;AACjB,mDAA6C;AAApC,2GAAA,SAAS,OAAA;AAClB,qDAAyD;AAAhD,iHAAA,iBAAiB,OAAA;AAC1B,kDAAuE;AAA9D,wGAAA,cAAc,OAAA;AAAC,uGAAA,aAAa,OAAA;AACrC,4DAAmE;AAA1D,kHAAA,mBAAmB,OAAA;AAC5B,mDAAqD;AAA5C,mHAAA,iBAAiB,OAAA;AAC1B,uDAA0D;AAAjD,kHAAA,iBAAiB,OAAA;AAC1B,yDAAsE;AAA7D,+GAAA,aAAa,OAAA;AAAE,+GAAA,aAAa,OAAA;AACrC,yCAAoD;AAA3C,4GAAA,kBAAkB,OAAA;AAC3B,+DAA6D;AAApD,qHAAA,gBAAgB,OAAA;AACzB,iEAA8D;AAArD,sHAAA,gBAAgB,OAAA;AACzB,uDAAyD;AAAhD,iHAAA,gBAAgB,OAAA;AACzB,2DAAyD;AAAhD,iHAAA,cAAc,OAAA;AACvB,2DAAyD;AAAhD,iHAAA,cAAc,OAAA;AACvB,4DAA2D;AAAlD,0GAAA,WAAW,OAAA;AACpB,4DAAyE;AAAhE,wHAAA,yBAAyB,OAAA;AAClC,oEAA0E;AAAjE,yHAAA,sBAAsB,OAAA;AAC/B,oEAAqF;AAA5E,oIAAA,iCAAiC,OAAA;AAC1C,oEAA0E;AAAjE,yHAAA,sBAAsB,OAAA;AAC/B,4EAAkD;AAClD,4DAA8D;AAArD,6GAAA,cAAc,OAAA;AACvB,uDAAqD;AAA5C,6GAAA,YAAY,OAAA;AACrB,oEAAqE;AAA5D,oHAAA,iBAAiB,OAAA;AAC1B,8EAA0E;AAAjE,0HAAA,kBAAkB,OAAA;AAC3B,sEAAuE;AAA9D,sHAAA,kBAAkB,OAAA;AAC3B,uDAAoD;AAA3C,6GAAA,YAAY,OAAA;AACR,QAAA,aAAa,GAAG,cAAI,CAAC,KAAK,CAAC,CAAC,qBAAa,EAAE,kCAAiB,CAAC,CAAC,CAAA;AAE3E,2DAAsD;AAA9C,iHAAA,cAAc,OAAA;AAET,QAAA,gBAAgB,GAAG,cAAI,CAAC,MAAM,CAAC,cAAI,CAAC,MAAM,EAAE,EAAE,qBAAa,CAAC,CAAA;AAK5D,QAAA,gBAAgB,GAAG,cAAI,CAAC,MAAM,CAAC,cAAI,CAAC,MAAM,EAAE,EAAE,qBAAa,CAAC,CAAA"}
|
|
@@ -9,3 +9,12 @@ export declare const CustomProperty: import("@sinclair/typebox").TObject<{
|
|
|
9
9
|
export type CustomProperty<R extends boolean> = BasePropertySchema & TPropertyValue<unknown, PropertyType.CUSTOM, R> & {
|
|
10
10
|
code: string;
|
|
11
11
|
};
|
|
12
|
+
export type CustomPropertyCodeFunctionParams = {
|
|
13
|
+
containerId: string;
|
|
14
|
+
value: unknown;
|
|
15
|
+
onChange: (value: unknown) => void;
|
|
16
|
+
isEmbeded: boolean;
|
|
17
|
+
projectId: string;
|
|
18
|
+
property: Pick<CustomProperty<boolean>, 'displayName' | 'description' | 'required'>;
|
|
19
|
+
disabled: boolean;
|
|
20
|
+
};
|
|
@@ -11,7 +11,7 @@ import { MarkdownVariant } from '@activepieces/shared';
|
|
|
11
11
|
import { NumberProperty } from './number-property';
|
|
12
12
|
import { ObjectProperty } from './object-property';
|
|
13
13
|
import { LongTextProperty, ShortTextProperty } from './text-property';
|
|
14
|
-
import { CustomProperty } from './custom-property';
|
|
14
|
+
import { CustomProperty, CustomPropertyCodeFunctionParams } from './custom-property';
|
|
15
15
|
import { ColorProperty } from './color-property';
|
|
16
16
|
export declare const InputProperty: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TObject<{
|
|
17
17
|
[x: string]: import("@sinclair/typebox").TSchema;
|
|
@@ -189,7 +189,16 @@ export declare const Property: {
|
|
|
189
189
|
StaticMultiSelectDropdown<T, R extends boolean = boolean>(request: Properties<StaticMultiSelectDropdownProperty<T, R>>): R extends true ? StaticMultiSelectDropdownProperty<T, true> : StaticMultiSelectDropdownProperty<T, false>;
|
|
190
190
|
DateTime<R extends boolean>(request: Properties<DateTimeProperty<R>>): R extends true ? DateTimeProperty<true> : DateTimeProperty<false>;
|
|
191
191
|
File<R extends boolean>(request: Properties<FileProperty<R>>): R extends true ? FileProperty<true> : FileProperty<false>;
|
|
192
|
-
Custom<R extends boolean>(request: Properties<CustomProperty<R
|
|
192
|
+
Custom<R extends boolean>(request: Omit<Properties<CustomProperty<R>>, "code"> & {
|
|
193
|
+
/**
|
|
194
|
+
* This is designed to be self-contained and operates independently of any
|
|
195
|
+
* external libraries or imported dependencies. All necessary logic and
|
|
196
|
+
* functionality are implemented within this function itself.
|
|
197
|
+
*
|
|
198
|
+
* You can return a cleanup function that will be called when the component is unmounted in the frontend.
|
|
199
|
+
* */
|
|
200
|
+
code: ((ctx: CustomPropertyCodeFunctionParams) => (() => void) | void);
|
|
201
|
+
}): R extends true ? CustomProperty<true> : CustomProperty<false>;
|
|
193
202
|
Color<R extends boolean>(request: Properties<ColorProperty<R>>): R extends true ? ColorProperty<true> : ColorProperty<false>;
|
|
194
203
|
};
|
|
195
204
|
export {};
|
|
@@ -90,7 +90,8 @@ exports.Property = {
|
|
|
90
90
|
return Object.assign(Object.assign({}, request), { valueSchema: undefined, type: property_type_1.PropertyType.FILE });
|
|
91
91
|
},
|
|
92
92
|
Custom(request) {
|
|
93
|
-
|
|
93
|
+
const code = request.code.toString();
|
|
94
|
+
return Object.assign(Object.assign({}, request), { code, valueSchema: undefined, type: property_type_1.PropertyType.CUSTOM });
|
|
94
95
|
},
|
|
95
96
|
Color(request) {
|
|
96
97
|
return Object.assign(Object.assign({}, request), { valueSchema: undefined, type: property_type_1.PropertyType.COLOR });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../../../packages/pieces/community/framework/src/lib/property/input/index.ts"],"names":[],"mappings":";;;AAAA,+CAAyC;AACzC,qDAAiD;AACjD,2DAAuD;AACvD,6DAAwD;AACxD,4DAGkC;AAClC,gEAGoC;AACpC,iDAAmD;AACnD,mDAA+C;AAC/C,mDAA+C;AAC/C,2DAAuD;AACvD,iDAAuD;AACvD,uDAAmD;AACnD,uDAAmD;AACnD,mDAA+C;AAC/C,mDAAsE;AAEtE,qDAAiD;AAEpC,QAAA,aAAa,GAAG,cAAI,CAAC,KAAK,CAAC;IACtC,iCAAiB;IACjB,gCAAgB;IAChB,oCAAgB;IAChB,oCAAgB;IAChB,wCAAsB;IACtB,mDAAiC;IACjC,gCAAgB;IAChB,2CAA2B;IAC3B,gCAAiB;IACjB,gCAAc;IACd,8BAAa;IACb,gCAAc;IACd,4BAAY;IACZ,qCAAgB;IAChB,4BAAY;IACZ,8BAAa;CACd,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../../../packages/pieces/community/framework/src/lib/property/input/index.ts"],"names":[],"mappings":";;;AAAA,+CAAyC;AACzC,qDAAiD;AACjD,2DAAuD;AACvD,6DAAwD;AACxD,4DAGkC;AAClC,gEAGoC;AACpC,iDAAmD;AACnD,mDAA+C;AAC/C,mDAA+C;AAC/C,2DAAuD;AAC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