@hatchet-dev/typescript-sdk 1.6.0 → 1.6.1

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": "@hatchet-dev/typescript-sdk",
3
- "version": "1.6.0",
3
+ "version": "1.6.1",
4
4
  "description": "Background task orchestration & visibility for developers",
5
5
  "types": "dist/index.d.ts",
6
6
  "files": [
@@ -67,6 +67,11 @@ export declare class Context<T, K = {}> {
67
67
  * @returns The triggers for the current workflow.
68
68
  */
69
69
  triggers(): TriggerData;
70
+ /**
71
+ * Gets the payload from the filter that matched when triggering the event.
72
+ * @returns The payload.
73
+ */
74
+ filterPayload(): Record<string, any>;
70
75
  /**
71
76
  * Determines if the workflow was triggered by an event.
72
77
  * @returns True if the workflow was triggered by an event, otherwise false.
@@ -112,6 +112,14 @@ class Context {
112
112
  triggers() {
113
113
  return this.data.triggers;
114
114
  }
115
+ /**
116
+ * Gets the payload from the filter that matched when triggering the event.
117
+ * @returns The payload.
118
+ */
119
+ filterPayload() {
120
+ var _a;
121
+ return ((_a = this.data.triggers) === null || _a === void 0 ? void 0 : _a.filter_payload) || {};
122
+ }
115
123
  /**
116
124
  * Determines if the workflow was triggered by an event.
117
125
  * @returns True if the workflow was triggered by an event, otherwise false.
package/version.d.ts CHANGED
@@ -1 +1 @@
1
- export declare const HATCHET_VERSION = "1.6.0";
1
+ export declare const HATCHET_VERSION = "1.6.1";
package/version.js CHANGED
@@ -1,4 +1,4 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.HATCHET_VERSION = void 0;
4
- exports.HATCHET_VERSION = '1.6.0';
4
+ exports.HATCHET_VERSION = '1.6.1';