@activepieces/pieces-framework 0.7.14 → 0.7.15

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.7.14",
3
+ "version": "0.7.15",
4
4
  "type": "commonjs",
5
5
  "dependencies": {
6
6
  "@sinclair/typebox": "0.26.8",
@@ -10,8 +10,8 @@
10
10
  "lodash": "4.17.21",
11
11
  "nanoid": "3.3.6",
12
12
  "semver": "7.5.4",
13
- "@activepieces/shared": "0.10.65",
14
- "tslib": "1.14.1"
13
+ "@activepieces/shared": "0.10.68",
14
+ "tslib": "2.6.2"
15
15
  },
16
16
  "main": "./src/index.js"
17
17
  }
@@ -1,8 +1,8 @@
1
1
  import { PiecePropertyMap } from "./property";
2
- import { TriggerStrategy, WebhookHandshakeConfiguration } from "./trigger/trigger";
2
+ import { WebhookRenewConfiguration, TriggerStrategy, WebhookHandshakeConfiguration } from "./trigger/trigger";
3
3
  import { ErrorHandlingOptionsParam } from "./action/action";
4
4
  import { PieceAuthProperty } from "./property/authentication";
5
- import { ProjectId } from "@activepieces/shared";
5
+ import { PieceCategory, ProjectId } from "@activepieces/shared";
6
6
  export declare const PieceBase: import("@sinclair/typebox").TObject<{
7
7
  id: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString<string>>;
8
8
  name: import("@sinclair/typebox").TString<string>;
@@ -88,6 +88,7 @@ export declare const PieceBase: import("@sinclair/typebox").TObject<{
88
88
  description: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString<string>>;
89
89
  }>, import("@sinclair/typebox").TObject<import("@sinclair/typebox").TProperties>]>]>>;
90
90
  version: import("@sinclair/typebox").TString<string>;
91
+ categories: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TEnum<typeof PieceCategory>>>;
91
92
  minimumSupportedRelease: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString<string>>;
92
93
  maximumSupportedRelease: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString<string>>;
93
94
  }>;
@@ -102,6 +103,7 @@ export type PieceBase = {
102
103
  directoryPath?: string;
103
104
  auth?: PieceAuthProperty;
104
105
  version: string;
106
+ categories?: PieceCategory[];
105
107
  minimumSupportedRelease?: string;
106
108
  maximumSupportedRelease?: string;
107
109
  };
@@ -524,11 +526,18 @@ export declare const TriggerBase: import("@sinclair/typebox").TComposite<[import
524
526
  strategy: import("@sinclair/typebox").TEnum<typeof import("./trigger/trigger").WebhookHandshakeStrategy>;
525
527
  paramName: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString<string>>;
526
528
  }>>;
529
+ renewConfiguration: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TObject<{
530
+ strategy: import("@sinclair/typebox").TLiteral<import("./trigger/trigger").WebhookRenewStrategy.CRON>;
531
+ cronExpression: import("@sinclair/typebox").TString<string>;
532
+ }>, import("@sinclair/typebox").TObject<{
533
+ strategy: import("@sinclair/typebox").TLiteral<import("./trigger/trigger").WebhookRenewStrategy.NONE>;
534
+ }>]>>;
527
535
  }>]>;
528
536
  export type TriggerBase = Omit<ActionBase, "requireAuth"> & {
529
537
  type: TriggerStrategy;
530
538
  sampleData: unknown;
531
539
  handshakeConfiguration?: WebhookHandshakeConfiguration;
540
+ renewConfiguration?: WebhookRenewConfiguration;
532
541
  };
533
542
  export declare const PieceMetadata: import("@sinclair/typebox").TComposite<[import("@sinclair/typebox").TObject<{
534
543
  id: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString<string>>;
@@ -615,6 +624,7 @@ export declare const PieceMetadata: import("@sinclair/typebox").TComposite<[impo
615
624
  description: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString<string>>;
616
625
  }>, import("@sinclair/typebox").TObject<import("@sinclair/typebox").TProperties>]>]>>;
617
626
  version: import("@sinclair/typebox").TString<string>;
627
+ categories: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TEnum<typeof PieceCategory>>>;
618
628
  minimumSupportedRelease: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString<string>>;
619
629
  maximumSupportedRelease: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString<string>>;
620
630
  }>, import("@sinclair/typebox").TObject<{
@@ -1029,6 +1039,12 @@ export declare const PieceMetadata: import("@sinclair/typebox").TComposite<[impo
1029
1039
  strategy: import("@sinclair/typebox").TEnum<typeof import("./trigger/trigger").WebhookHandshakeStrategy>;
1030
1040
  paramName: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString<string>>;
1031
1041
  }>>;
1042
+ renewConfiguration: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TObject<{
1043
+ strategy: import("@sinclair/typebox").TLiteral<import("./trigger/trigger").WebhookRenewStrategy.CRON>;
1044
+ cronExpression: import("@sinclair/typebox").TString<string>;
1045
+ }>, import("@sinclair/typebox").TObject<{
1046
+ strategy: import("@sinclair/typebox").TLiteral<import("./trigger/trigger").WebhookRenewStrategy.NONE>;
1047
+ }>]>>;
1032
1048
  }>]>>;
1033
1049
  }>]>;
1034
1050
  export type PieceMetadata = PieceBase & {
@@ -1120,6 +1136,7 @@ export declare const PieceMetadataSummary: import("@sinclair/typebox").TComposit
1120
1136
  platformId: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString<string>>;
1121
1137
  directoryPath: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString<string>>;
1122
1138
  version: import("@sinclair/typebox").TString<string>;
1139
+ categories: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TEnum<typeof PieceCategory>>>;
1123
1140
  minimumSupportedRelease: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString<string>>;
1124
1141
  maximumSupportedRelease: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString<string>>;
1125
1142
  }>, import("@sinclair/typebox").TObject<{}>]>, import("@sinclair/typebox").TObject<{
@@ -6,6 +6,7 @@ const trigger_1 = require("./trigger/trigger");
6
6
  const action_1 = require("./action/action");
7
7
  const authentication_1 = require("./property/authentication");
8
8
  const typebox_1 = require("@sinclair/typebox");
9
+ const shared_1 = require("@activepieces/shared");
9
10
  exports.PieceBase = typebox_1.Type.Object({
10
11
  id: typebox_1.Type.Optional(typebox_1.Type.String()),
11
12
  name: typebox_1.Type.String(),
@@ -17,6 +18,7 @@ exports.PieceBase = typebox_1.Type.Object({
17
18
  directoryPath: typebox_1.Type.Optional(typebox_1.Type.String()),
18
19
  auth: typebox_1.Type.Optional(authentication_1.PieceAuthProperty),
19
20
  version: typebox_1.Type.String(),
21
+ categories: typebox_1.Type.Optional(typebox_1.Type.Array(typebox_1.Type.Enum(shared_1.PieceCategory))),
20
22
  minimumSupportedRelease: typebox_1.Type.Optional(typebox_1.Type.String()),
21
23
  maximumSupportedRelease: typebox_1.Type.Optional(typebox_1.Type.String()),
22
24
  });
@@ -34,6 +36,7 @@ exports.TriggerBase = typebox_1.Type.Composite([
34
36
  type: typebox_1.Type.Enum(trigger_1.TriggerStrategy),
35
37
  sampleData: typebox_1.Type.Unknown(),
36
38
  handshakeConfiguration: typebox_1.Type.Optional(trigger_1.WebhookHandshakeConfiguration),
39
+ renewConfiguration: typebox_1.Type.Optional(trigger_1.WebhookRenewConfiguration),
37
40
  })
38
41
  ]);
39
42
  exports.PieceMetadata = typebox_1.Type.Composite([
@@ -1 +1 @@
1
- {"version":3,"file":"piece-metadata.js","sourceRoot":"","sources":["../../../../../../../packages/pieces/community/framework/src/lib/piece-metadata.ts"],"names":[],"mappings":";;;AAAA,yCAA8C;AAC9C,+CAAmF;AACnF,4CAA4D;AAC5D,8DAA8D;AAC9D,+CAAyC;AAG5B,QAAA,SAAS,GAAG,cAAI,CAAC,MAAM,CAAC;IACnC,EAAE,EAAE,cAAI,CAAC,QAAQ,CAAC,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AAE,cAAI,CAAC,OAAO,EAAE;QAC1B,sBAAsB,EAAE,cAAI,CAAC,QAAQ,CAAC,uCAA6B,CAAC;KACrE,CAAC;CACH,CAAC,CAAA;AAOW,QAAA,aAAa,GAAG,cAAI,CAAC,SAAS,CAAC;IAC1C,iBAAS;IACT,cAAI,CAAC,MAAM,CAAC;QACV,OAAO,EAAE,cAAI,CAAC,MAAM,CAAC,cAAI,CAAC,MAAM,EAAE,EAAE,kBAAU,CAAC;QAC/C,QAAQ,EAAE,cAAI,CAAC,MAAM,CAAC,cAAI,CAAC,MAAM,EAAE,EAAE,mBAAW,CAAC;KAClD,CAAC;CACH,CAAC,CAAA;AAOW,QAAA,oBAAoB,GAAG,cAAI,CAAC,SAAS,CAAC;IACjD,cAAI,CAAC,IAAI,CAAC,qBAAa,EAAE,CAAC,SAAS,EAAE,UAAU,CAAC,CAAC;IACjD,cAAI,CAAC,MAAM,CAAC;QACV,OAAO,EAAE,cAAI,CAAC,MAAM,EAAE;QACtB,QAAQ,EAAE,cAAI,CAAC,MAAM,EAAE;KACxB,CAAC;CACH,CAAC,CAAA"}
1
+ {"version":3,"file":"piece-metadata.js","sourceRoot":"","sources":["../../../../../../../packages/pieces/community/framework/src/lib/piece-metadata.ts"],"names":[],"mappings":";;;AAAA,yCAA8C;AAC9C,+CAA8G;AAC9G,4CAA4D;AAC5D,8DAA8D;AAC9D,+CAAyC;AACzC,iDAAgE;AAEnD,QAAA,SAAS,GAAG,cAAI,CAAC,MAAM,CAAC;IACnC,EAAE,EAAE,cAAI,CAAC,QAAQ,CAAC,cAAI,CAAC,MAAM,EAAE,CAAC;IAChC,IAAI,EAAE,cAAI,CAAC,MAAM,EAAE;IACnB,WAAW,EAAE,cAAI,CAAC,MAAM,EAAE;IAC1B,OAAO,EAAE,cAAI,CAAC,MAAM,EAAE;IACtB,WAAW,EAAE,cAAI,CAAC,MAAM,EAAE;IAC1B,SAAS,EAAE,cAAI,CAAC,QAAQ,CAAC,cAAI,CAAC,MAA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B,CAAC;KAC7D,CAAC;CACH,CAAC,CAAA;AAQW,QAAA,aAAa,GAAG,cAAI,CAAC,SAAS,CAAC;IAC1C,iBAAS;IACT,cAAI,CAAC,MAAM,CAAC;QACV,OAAO,EAAE,cAAI,CAAC,MAAM,CAAC,cAAI,CAAC,MAAM,EAAE,EAAE,kBAAU,CAAC;QAC/C,QAAQ,EAAE,cAAI,CAAC,MAAM,CAAC,cAAI,CAAC,MAAM,EAAE,EAAE,mBAAW,CAAC;KAClD,CAAC;CACH,CAAC,CAAA;AAOW,QAAA,oBAAoB,GAAG,cAAI,CAAC,SAAS,CAAC;IACjD,cAAI,CAAC,IAAI,CAAC,qBAAa,EAAE,CAAC,SAAS,EAAE,UAAU,CAAC,CAAC;IACjD,cAAI,CAAC,MAAM,CAAC;QACV,OAAO,EAAE,cAAI,CAAC,MAAM,EAAE;QACtB,QAAQ,EAAE,cAAI,CAAC,MAAM,EAAE;KACxB,CAAC;CACH,CAAC,CAAA"}
@@ -8,14 +8,14 @@ export declare class Piece<PieceAuth extends PieceAuthProperty = PieceAuthProper
8
8
  readonly logoUrl: string;
9
9
  readonly authors: string[];
10
10
  readonly events: PieceEventProcessors | undefined;
11
+ readonly categories: PieceCategory[];
11
12
  readonly auth?: PieceAuth | undefined;
12
13
  readonly minimumSupportedRelease?: string | undefined;
13
14
  readonly maximumSupportedRelease?: string | undefined;
14
15
  readonly description: string;
15
- readonly categories?: PieceCategory[] | undefined;
16
16
  private readonly _actions;
17
17
  private readonly _triggers;
18
- constructor(displayName: string, logoUrl: string, authors: string[], events: PieceEventProcessors | undefined, actions: Action<PieceAuth>[], triggers: Trigger<PieceAuth>[], auth?: PieceAuth | undefined, minimumSupportedRelease?: string | undefined, maximumSupportedRelease?: string | undefined, description?: string, categories?: PieceCategory[] | undefined);
18
+ constructor(displayName: string, logoUrl: string, authors: string[], events: PieceEventProcessors | undefined, actions: Action<PieceAuth>[], triggers: Trigger<PieceAuth>[], categories: PieceCategory[], auth?: PieceAuth | undefined, minimumSupportedRelease?: string | undefined, maximumSupportedRelease?: string | undefined, description?: string);
19
19
  metadata(): Omit<PieceMetadata, 'name' | 'version'>;
20
20
  getAction(actionName: string): Action | undefined;
21
21
  getTrigger(triggerName: string): Trigger | undefined;
package/src/lib/piece.js CHANGED
@@ -2,16 +2,16 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.createPiece = exports.Piece = void 0;
4
4
  class Piece {
5
- constructor(displayName, logoUrl, authors, events, actions, triggers, auth, minimumSupportedRelease, maximumSupportedRelease, description = '', categories) {
5
+ constructor(displayName, logoUrl, authors, events, actions, triggers, categories, auth, minimumSupportedRelease, maximumSupportedRelease, description = '') {
6
6
  this.displayName = displayName;
7
7
  this.logoUrl = logoUrl;
8
8
  this.authors = authors;
9
9
  this.events = events;
10
+ this.categories = categories;
10
11
  this.auth = auth;
11
12
  this.minimumSupportedRelease = minimumSupportedRelease;
12
13
  this.maximumSupportedRelease = maximumSupportedRelease;
13
14
  this.description = description;
14
- this.categories = categories;
15
15
  this._actions = {};
16
16
  this._triggers = {};
17
17
  actions.forEach((action) => (this._actions[action.name] = action));
@@ -23,6 +23,7 @@ class Piece {
23
23
  logoUrl: this.logoUrl,
24
24
  actions: this._actions,
25
25
  triggers: this._triggers,
26
+ categories: this.categories,
26
27
  description: this.description,
27
28
  auth: this.auth,
28
29
  minimumSupportedRelease: this.minimumSupportedRelease,
@@ -44,8 +45,8 @@ class Piece {
44
45
  }
45
46
  exports.Piece = Piece;
46
47
  const createPiece = (params) => {
47
- var _a, _b;
48
- return new Piece(params.displayName, params.logoUrl, (_a = params.authors) !== null && _a !== void 0 ? _a : [], params.events, params.actions, params.triggers, (_b = params.auth) !== null && _b !== void 0 ? _b : undefined, params.minimumSupportedRelease, params.maximumSupportedRelease, params.description, params.categories);
48
+ var _a, _b, _c;
49
+ return new Piece(params.displayName, params.logoUrl, (_a = params.authors) !== null && _a !== void 0 ? _a : [], params.events, params.actions, params.triggers, (_b = params.categories) !== null && _b !== void 0 ? _b : [], (_c = params.auth) !== null && _c !== void 0 ? _c : undefined, params.minimumSupportedRelease, params.maximumSupportedRelease, params.description);
49
50
  };
50
51
  exports.createPiece = createPiece;
51
52
  //# sourceMappingURL=piece.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"piece.js","sourceRoot":"","sources":["../../../../../../../packages/pieces/community/framework/src/lib/piece.ts"],"names":[],"mappings":";;;AAUA,MAAa,KAAK;IAMhB,YACkB,WAAmB,EACnB,OAAe,EACf,OAAiB,EACjB,MAAwC,EACxD,OAA4B,EAC5B,QAA8B,EACd,IAAgB,EAChB,uBAAgC,EAChC,uBAAgC,EAChC,cAAsB,EAAE,EACxB,UAA4B;QAV5B,gBAAW,GAAX,WAAW,CAAQ;QACnB,YAAO,GAAP,OAAO,CAAQ;QACf,YAAO,GAAP,OAAO,CAAU;QACjB,WAAM,GAAN,MAAM,CAAkC;QAGxC,SAAI,GAAJ,IAAI,CAAY;QAChB,4BAAuB,GAAvB,uBAAuB,CAAS;QAChC,4BAAuB,GAAvB,uBAAuB,CAAS;QAChC,gBAAW,GAAX,WAAW,CAAa;QACxB,eAAU,GAAV,UAAU,CAAkB;QAd7B,aAAQ,GAA2B,EAAE,CAAC;QACtC,cAAS,GAA4B,EAAE,CAAC;QAevD,OAAO,CAAC,OAAO,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC,CAAC,CAAC;QACnE,QAAQ,CAAC,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC;IAC1E,CAAC;IAED,QAAQ;QACN,OAAO;YACL,WAAW,EAAE,IAAI,CAAC,WAAW;YAC7B,OAAO,EAAE,IAAI,CAAC,OAAO;YACrB,OAAO,EAAE,IAAI,CAAC,QAAQ;YACtB,QAAQ,EAAE,IAAI,CAAC,SAAS;YACxB,WAAW,EAAE,IAAI,CAAC,WAAW;YAC7B,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,uBAAuB,EAAE,IAAI,CAAC,uBAAuB;YACrD,uBAAuB,EAAE,IAAI,CAAC,uBAAuB;SACtD,CAAC;IACJ,CAAC;IAED,SAAS,CAAC,UAAkB;QAC1B,OAAO,IAAI,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC;IACnC,CAAC;IAED,UAAU,CAAC,WAAmB;QAC5B,OAAO,IAAI,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC;IACrC,CAAC;IAED,OAAO;QACL,OAAO,IAAI,CAAC,QAAQ,CAAC;IACvB,CAAC;IAED,QAAQ;QACN,OAAO,IAAI,CAAC,SAAS,CAAC;IACxB,CAAC;CACF;AAnDD,sBAmDC;AAEM,MAAM,WAAW,GAAG,CACzB,MAAoC,EACpC,EAAE;;IACF,OAAO,IAAI,KAAK,CACd,MAAM,CAAC,WAAW,EAClB,MAAM,CAAC,OAAO,EACd,MAAA,MAAM,CAAC,OAAO,mCAAI,EAAE,EACpB,MAAM,CAAC,MAAM,EACb,MAAM,CAAC,OAAO,EACd,MAAM,CAAC,QAAQ,EACf,MAAA,MAAM,CAAC,IAAI,mCAAI,SAAS,EACxB,MAAM,CAAC,uBAAuB,EAC9B,MAAM,CAAC,uBAAuB,EAC9B,MAAM,CAAC,WAAW,EAClB,MAAM,CAAC,UAAU,CAClB,CAAC;AACJ,CAAC,CAAC;AAhBW,QAAA,WAAW,eAgBtB"}
1
+ {"version":3,"file":"piece.js","sourceRoot":"","sources":["../../../../../../../packages/pieces/community/framework/src/lib/piece.ts"],"names":[],"mappings":";;;AAUA,MAAa,KAAK;IAMhB,YACkB,WAAmB,EACnB,OAAe,EACf,OAAiB,EACjB,MAAwC,EACxD,OAA4B,EAC5B,QAA8B,EACd,UAA2B,EAC3B,IAAgB,EAChB,uBAAgC,EAChC,uBAAgC,EAChC,c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IACrC,CAAC;IAED,OAAO;QACL,OAAO,IAAI,CAAC,QAAQ,CAAC;IACvB,CAAC;IAED,QAAQ;QACN,OAAO,IAAI,CAAC,SAAS,CAAC;IACxB,CAAC;CACF;AApDD,sBAoDC;AAEM,MAAM,WAAW,GAAG,CACzB,MAAoC,EACpC,EAAE;;IACF,OAAO,IAAI,KAAK,CACd,MAAM,CAAC,WAAW,EAClB,MAAM,CAAC,OAAO,EACd,MAAA,MAAM,CAAC,OAAO,mCAAI,EAAE,EACpB,MAAM,CAAC,MAAM,EACb,MAAM,CAAC,OAAO,EACd,MAAM,CAAC,QAAQ,EACf,MAAA,MAAM,CAAC,UAAU,mCAAI,EAAE,EACvB,MAAA,MAAM,CAAC,IAAI,mCAAI,SAAS,EACxB,MAAM,CAAC,uBAAuB,EAC9B,MAAM,CAAC,uBAAuB,EAC9B,MAAM,CAAC,WAAW,CACnB,CAAC;AACJ,CAAC,CAAC;AAhBW,QAAA,WAAW,eAgBtB"}
@@ -14,29 +14,41 @@ export declare enum WebhookHandshakeStrategy {
14
14
  QUERY_PRESENT = "QUERY_PRESENT",
15
15
  BODY_PARAM_PRESENT = "BODY_PARAM_PRESENT"
16
16
  }
17
+ export declare enum WebhookRenewStrategy {
18
+ CRON = "CRON",
19
+ NONE = "NONE"
20
+ }
17
21
  export declare const WebhookHandshakeConfiguration: import("@sinclair/typebox").TObject<{
18
22
  strategy: import("@sinclair/typebox").TEnum<typeof WebhookHandshakeStrategy>;
19
23
  paramName: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString<string>>;
20
24
  }>;
21
25
  export type WebhookHandshakeConfiguration = Static<typeof WebhookHandshakeConfiguration>;
26
+ export declare const WebhookRenewConfiguration: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TObject<{
27
+ strategy: import("@sinclair/typebox").TLiteral<WebhookRenewStrategy.CRON>;
28
+ cronExpression: import("@sinclair/typebox").TString<string>;
29
+ }>, import("@sinclair/typebox").TObject<{
30
+ strategy: import("@sinclair/typebox").TLiteral<WebhookRenewStrategy.NONE>;
31
+ }>]>;
32
+ export type WebhookRenewConfiguration = Static<typeof WebhookRenewConfiguration>;
22
33
  export interface WebhookResponse {
23
34
  status: number;
24
35
  body?: any;
25
36
  headers?: Record<string, string>;
26
37
  }
27
- type CreateTriggerParams<PieceAuth extends PieceAuthProperty, TriggerProps extends InputPropertyMap, TS extends TriggerStrategy> = {
28
- /**
29
- * A dummy parameter used to infer {@code PieceAuth} type
30
- */
38
+ type CreateTriggerParams<PieceAuth extends PieceAuthProperty, TriggerProps extends InputPropertyMap, TS extends TriggerStrategy> = TS extends TriggerStrategy.WEBHOOK ? BaseTriggerParams<PieceAuth, TriggerProps, TS> & {
39
+ handshakeConfiguration?: WebhookHandshakeConfiguration;
40
+ onHandshake?: (context: TriggerHookContext<PieceAuth, TriggerProps, TS>) => Promise<WebhookResponse>;
41
+ renewConfiguration?: WebhookRenewConfiguration;
42
+ onRenew?(context: TriggerHookContext<PieceAuth, TriggerProps, TS>): Promise<void>;
43
+ } : BaseTriggerParams<PieceAuth, TriggerProps, TS>;
44
+ type BaseTriggerParams<PieceAuth extends PieceAuthProperty, TriggerProps extends InputPropertyMap, TS extends TriggerStrategy> = {
31
45
  name: string;
32
46
  displayName: string;
33
47
  description: string;
34
48
  auth?: PieceAuth;
35
49
  props: TriggerProps;
36
50
  type: TS;
37
- handshakeConfiguration?: WebhookHandshakeConfiguration;
38
51
  onEnable: (context: TriggerHookContext<PieceAuth, TriggerProps, TS>) => Promise<void>;
39
- onHandshake?: (context: TriggerHookContext<PieceAuth, TriggerProps, TS>) => Promise<WebhookResponse>;
40
52
  onDisable: (context: TriggerHookContext<PieceAuth, TriggerProps, TS>) => Promise<void>;
41
53
  run: (context: TestOrRunHookContext<PieceAuth, TriggerProps, TS>) => Promise<unknown[]>;
42
54
  test?: (context: TestOrRunHookContext<PieceAuth, TriggerProps, TS>) => Promise<unknown[]>;
@@ -49,14 +61,16 @@ export declare class ITrigger<TS extends TriggerStrategy, PieceAuth extends Piec
49
61
  readonly props: TriggerProps;
50
62
  readonly type: TS;
51
63
  readonly handshakeConfiguration: WebhookHandshakeConfiguration;
52
- readonly onEnable: (ctx: TriggerHookContext<PieceAuth, TriggerProps, TS>) => Promise<void>;
53
64
  readonly onHandshake: (ctx: TriggerHookContext<PieceAuth, TriggerProps, TS>) => Promise<WebhookResponse>;
65
+ readonly renewConfiguration: WebhookRenewConfiguration;
66
+ readonly onRenew: (ctx: TriggerHookContext<PieceAuth, TriggerProps, TS>) => Promise<void>;
67
+ readonly onEnable: (ctx: TriggerHookContext<PieceAuth, TriggerProps, TS>) => Promise<void>;
54
68
  readonly onDisable: (ctx: TriggerHookContext<PieceAuth, TriggerProps, TS>) => Promise<void>;
55
69
  readonly run: (ctx: TestOrRunHookContext<PieceAuth, TriggerProps, TS>) => Promise<unknown[]>;
56
70
  readonly test: (ctx: TestOrRunHookContext<PieceAuth, TriggerProps, TS>) => Promise<unknown[]>;
57
71
  sampleData: unknown;
58
- constructor(name: string, displayName: string, description: string, props: TriggerProps, type: TS, handshakeConfiguration: WebhookHandshakeConfiguration, onEnable: (ctx: TriggerHookContext<PieceAuth, TriggerProps, TS>) => Promise<void>, onHandshake: (ctx: TriggerHookContext<PieceAuth, TriggerProps, TS>) => Promise<WebhookResponse>, onDisable: (ctx: TriggerHookContext<PieceAuth, TriggerProps, TS>) => Promise<void>, run: (ctx: TestOrRunHookContext<PieceAuth, TriggerProps, TS>) => Promise<unknown[]>, test: (ctx: TestOrRunHookContext<PieceAuth, TriggerProps, TS>) => Promise<unknown[]>, sampleData: unknown);
72
+ constructor(name: string, displayName: string, description: string, props: TriggerProps, type: TS, handshakeConfiguration: WebhookHandshakeConfiguration, onHandshake: (ctx: TriggerHookContext<PieceAuth, TriggerProps, TS>) => Promise<WebhookResponse>, renewConfiguration: WebhookRenewConfiguration, onRenew: (ctx: TriggerHookContext<PieceAuth, TriggerProps, TS>) => Promise<void>, onEnable: (ctx: TriggerHookContext<PieceAuth, TriggerProps, TS>) => Promise<void>, onDisable: (ctx: TriggerHookContext<PieceAuth, TriggerProps, TS>) => Promise<void>, run: (ctx: TestOrRunHookContext<PieceAuth, TriggerProps, TS>) => Promise<unknown[]>, test: (ctx: TestOrRunHookContext<PieceAuth, TriggerProps, TS>) => Promise<unknown[]>, sampleData: unknown);
59
73
  }
60
74
  export type Trigger<PieceAuth extends PieceAuthProperty = any, TriggerProps extends InputPropertyMap = any, S extends TriggerStrategy = TriggerStrategy> = ITrigger<S, PieceAuth, TriggerProps>;
61
- export declare const createTrigger: <TS extends TriggerStrategy, PieceAuth extends PieceAuthProperty, TriggerProps extends InputPropertyMap>(params: CreateTriggerParams<PieceAuth, TriggerProps, TS>) => ITrigger<TS, PieceAuth, TriggerProps>;
75
+ export declare const createTrigger: <TS extends TriggerStrategy, PieceAuth extends PieceAuthProperty, TriggerProps extends InputPropertyMap>(params: CreateTriggerParams<PieceAuth, TriggerProps, TS>) => ITrigger<TriggerStrategy.WEBHOOK, PieceAuth, TriggerProps> | ITrigger<TriggerStrategy.POLLING, PieceAuth, TriggerProps> | ITrigger<TriggerStrategy.APP_WEBHOOK, PieceAuth, TriggerProps>;
62
76
  export {};
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.createTrigger = exports.ITrigger = exports.WebhookHandshakeConfiguration = exports.WebhookHandshakeStrategy = exports.TriggerStrategy = void 0;
3
+ exports.createTrigger = exports.ITrigger = exports.WebhookRenewConfiguration = exports.WebhookHandshakeConfiguration = exports.WebhookRenewStrategy = exports.WebhookHandshakeStrategy = exports.TriggerStrategy = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const typebox_1 = require("@sinclair/typebox");
6
6
  var TriggerStrategy;
@@ -16,20 +16,36 @@ var WebhookHandshakeStrategy;
16
16
  WebhookHandshakeStrategy["QUERY_PRESENT"] = "QUERY_PRESENT";
17
17
  WebhookHandshakeStrategy["BODY_PARAM_PRESENT"] = "BODY_PARAM_PRESENT";
18
18
  })(WebhookHandshakeStrategy || (exports.WebhookHandshakeStrategy = WebhookHandshakeStrategy = {}));
19
+ var WebhookRenewStrategy;
20
+ (function (WebhookRenewStrategy) {
21
+ WebhookRenewStrategy["CRON"] = "CRON";
22
+ WebhookRenewStrategy["NONE"] = "NONE";
23
+ })(WebhookRenewStrategy || (exports.WebhookRenewStrategy = WebhookRenewStrategy = {}));
19
24
  exports.WebhookHandshakeConfiguration = typebox_1.Type.Object({
20
25
  strategy: typebox_1.Type.Enum(WebhookHandshakeStrategy),
21
26
  paramName: typebox_1.Type.Optional(typebox_1.Type.String()),
22
27
  });
28
+ exports.WebhookRenewConfiguration = typebox_1.Type.Union([
29
+ typebox_1.Type.Object({
30
+ strategy: typebox_1.Type.Literal(WebhookRenewStrategy.CRON),
31
+ cronExpression: typebox_1.Type.String(),
32
+ }),
33
+ typebox_1.Type.Object({
34
+ strategy: typebox_1.Type.Literal(WebhookRenewStrategy.NONE),
35
+ }),
36
+ ]);
23
37
  class ITrigger {
24
- constructor(name, displayName, description, props, type, handshakeConfiguration, onEnable, onHandshake, onDisable, run, test, sampleData) {
38
+ constructor(name, displayName, description, props, type, handshakeConfiguration, onHandshake, renewConfiguration, onRenew, onEnable, onDisable, run, test, sampleData) {
25
39
  this.name = name;
26
40
  this.displayName = displayName;
27
41
  this.description = description;
28
42
  this.props = props;
29
43
  this.type = type;
30
44
  this.handshakeConfiguration = handshakeConfiguration;
31
- this.onEnable = onEnable;
32
45
  this.onHandshake = onHandshake;
46
+ this.renewConfiguration = renewConfiguration;
47
+ this.onRenew = onRenew;
48
+ this.onEnable = onEnable;
33
49
  this.onDisable = onDisable;
34
50
  this.run = run;
35
51
  this.test = test;
@@ -37,9 +53,17 @@ class ITrigger {
37
53
  }
38
54
  }
39
55
  exports.ITrigger = ITrigger;
56
+ // TODO refactor and exctract common logic
40
57
  const createTrigger = (params) => {
41
- var _a, _b, _c;
42
- return new ITrigger(params.name, params.displayName, params.description, params.props, params.type, (_a = params.handshakeConfiguration) !== null && _a !== void 0 ? _a : { strategy: WebhookHandshakeStrategy.NONE }, params.onEnable, (_b = params.onHandshake) !== null && _b !== void 0 ? _b : (() => tslib_1.__awaiter(void 0, void 0, void 0, function* () { return ({ status: 200 }); })), params.onDisable, params.run, (_c = params.test) !== null && _c !== void 0 ? _c : (() => Promise.resolve([params.sampleData])), params.sampleData);
58
+ var _a, _b, _c, _d, _e, _f, _g;
59
+ switch (params.type) {
60
+ case TriggerStrategy.WEBHOOK:
61
+ return new ITrigger(params.name, params.displayName, params.description, params.props, params.type, (_a = params.handshakeConfiguration) !== null && _a !== void 0 ? _a : { strategy: WebhookHandshakeStrategy.NONE }, (_b = params.onHandshake) !== null && _b !== void 0 ? _b : (() => tslib_1.__awaiter(void 0, void 0, void 0, function* () { return ({ status: 200 }); })), (_c = params.renewConfiguration) !== null && _c !== void 0 ? _c : { strategy: WebhookRenewStrategy.NONE }, (_d = params.onRenew) !== null && _d !== void 0 ? _d : (() => tslib_1.__awaiter(void 0, void 0, void 0, function* () { return Promise.resolve(); })), params.onEnable, params.onDisable, params.run, (_e = params.test) !== null && _e !== void 0 ? _e : (() => Promise.resolve([params.sampleData])), params.sampleData);
62
+ case TriggerStrategy.POLLING:
63
+ return new ITrigger(params.name, params.displayName, params.description, params.props, params.type, { strategy: WebhookHandshakeStrategy.NONE }, () => tslib_1.__awaiter(void 0, void 0, void 0, function* () { return ({ status: 200 }); }), { strategy: WebhookRenewStrategy.NONE }, (() => tslib_1.__awaiter(void 0, void 0, void 0, function* () { return Promise.resolve(); })), params.onEnable, params.onDisable, params.run, (_f = params.test) !== null && _f !== void 0 ? _f : (() => Promise.resolve([params.sampleData])), params.sampleData);
64
+ case TriggerStrategy.APP_WEBHOOK:
65
+ return new ITrigger(params.name, params.displayName, params.description, params.props, params.type, { strategy: WebhookHandshakeStrategy.NONE }, () => tslib_1.__awaiter(void 0, void 0, void 0, function* () { return ({ status: 200 }); }), { strategy: WebhookRenewStrategy.NONE }, (() => tslib_1.__awaiter(void 0, void 0, void 0, function* () { return Promise.resolve(); })), params.onEnable, params.onDisable, params.run, (_g = params.test) !== null && _g !== void 0 ? _g : (() => Promise.resolve([params.sampleData])), params.sampleData);
66
+ }
43
67
  };
44
68
  exports.createTrigger = createTrigger;
45
69
  //# sourceMappingURL=trigger.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"trigger.js","sourceRoot":"","sources":["../../../../../../../../packages/pieces/community/framework/src/lib/trigger/trigger.ts"],"names":[],"mappings":";;;;AAAA,+CAAiD;AAMjD,IAAY,eAIX;AAJD,WAAY,eAAe;IACzB,sCAAmB,CAAA;IACnB,sCAAmB,CAAA;IACnB,8CAA2B,CAAA;AAC7B,CAAC,EAJW,eAAe,+BAAf,eAAe,QAI1B;AAED,IAAY,wBAKX;AALD,WAAY,wBAAwB;IAClC,yCAAa,CAAA;IACb,6DAAiC,CAAA;IACjC,2DAA+B,CAAA;IAC/B,qEAAyC,CAAA;AAC3C,CAAC,EALW,wBAAwB,wCAAxB,wBAAwB,QAKnC;AAEY,QAAA,6BAA6B,GAAG,cAAI,CAAC,MAAM,CAAC;IACvD,QAAQ,EAAE,cAAI,CAAC,IAAI,CAAC,wBAAwB,CAAC;IAC7C,SAAS,EAAE,cAAI,CAAC,QAAQ,CAAC,cAAI,CAAC,MAAM,EAAE,CAAC;CACxC,CAAC,CAAA;AAiCF,MAAa,QAAQ;IAKnB,YACkB,IAAY,EACZ,WAAmB,EACnB,WAAmB,EACnB,KAAmB,EACnB,IAAQ,EACR,sBAAqD,EACrD,QAAiF,EACjF,WAA+F,EAC/F,SAAkF,EAClF,GAAmF,EACnF,IAAoF,EAC7F,UAAmB;QAXV,SAAI,GAAJ,IAAI,CAAQ;QACZ,gBAAW,GAAX,WAAW,CAAQ;QACnB,gBAAW,GAAX,WAAW,CAAQ;QACnB,UAAK,GAAL,KAAK,CAAc;QACnB,SAAI,GAAJ,IAAI,CAAI;QACR,2BAAsB,GAAtB,sBAAsB,CAA+B;QACrD,aAAQ,GAAR,QAAQ,CAAyE;QACjF,gBAAW,GAAX,WAAW,CAAoF;QAC/F,cAAS,GAAT,SAAS,CAAyE;QAClF,QAAG,GAAH,GAAG,CAAgF;QACnF,SAAI,GAAJ,IAAI,CAAgF;QAC7F,eAAU,GAAV,UAAU,CAAS;IACxB,CAAC;CACN;AAnBD,4BAmBC;AAQM,MAAM,aAAa,GAAG,CAI3B,MAAwD,EAAE,EAAE;;IAC5D,OAAO,IAAI,QAAQ,CACjB,MAAM,CAAC,IAAI,EACX,MAAM,CAAC,WAAW,EAClB,MAAM,CAAC,WAAW,EAClB,MAAM,CAAC,KAAK,EACZ,MAAM,CAAC,IAAI,EACX,MAAA,MAAM,CAAC,sBAAsB,mCAAI,EAAE,QAAQ,EAAE,wBAAwB,CAAC,IAAI,EAAE,EAC5E,MAAM,CAAC,QAAQ,EACf,MAAA,MAAM,CAAC,WAAW,mCAAI,CAAC,GAAS,EAAE,0DAAC,OAAA,CAAC,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC,CAAA,GAAA,CAAC,EACrD,MAAM,CAAC,SAAS,EAChB,MAAM,CAAC,GAAG,EACV,MAAA,MAAM,CAAC,IAAI,mCAAI,CAAC,GAAG,EAAE,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,CAAC,EAC3D,MAAM,CAAC,UAAU,CAClB,CAAA;AACH,CAAC,CAAA;AAnBY,QAAA,aAAa,iBAmBzB"}
1
+ {"version":3,"file":"trigger.js","sourceRoot":"","sources":["../../../../../../../../packages/pieces/community/framework/src/lib/trigger/trigger.ts"],"names":[],"mappings":";;;;AAAA,+CAAiD;AAMjD,IAAY,eAIX;AAJD,WAAY,eAAe;IACzB,sCAAmB,CAAA;IACnB,sCAAmB,CAAA;IACnB,8CAA2B,CAAA;AAC7B,CAAC,EAJW,eAAe,+BAAf,eAAe,QAI1B;AAED,IAAY,wBAKX;AALD,WAAY,wBAAwB;IAClC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