@avaprotocol/sdk-js 2.5.2-dev.0 → 2.5.2-dev.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/dist/index.js CHANGED
@@ -17469,12 +17469,14 @@ var ManualTrigger2 = class _ManualTrigger extends Trigger {
17469
17469
  const manualTrigger = new avs_pb6.ManualTrigger();
17470
17470
  const config = new avs_pb6.ManualTrigger.Config();
17471
17471
  const dataToSend = this.data ?? this.input;
17472
- if (dataToSend !== null && dataToSend !== void 0) {
17473
- const inputValue = convertInputToProtobuf(dataToSend);
17474
- if (inputValue) {
17475
- config.setData(inputValue);
17476
- }
17472
+ if (dataToSend === null || dataToSend === void 0) {
17473
+ throw new Error("ManualTrigger data is required");
17474
+ }
17475
+ const inputValue = convertInputToProtobuf(dataToSend);
17476
+ if (!inputValue) {
17477
+ throw new Error("Failed to convert ManualTrigger data to protobuf format");
17477
17478
  }
17479
+ config.setData(inputValue);
17478
17480
  if (this.headers && Object.keys(this.headers).length > 0) {
17479
17481
  const headersMap = config.getHeadersMap();
17480
17482
  Object.entries(this.headers).forEach(([key, value]) => {
package/dist/index.mjs CHANGED
@@ -17447,12 +17447,14 @@ var ManualTrigger2 = class _ManualTrigger extends Trigger {
17447
17447
  const manualTrigger = new avs_pb6.ManualTrigger();
17448
17448
  const config = new avs_pb6.ManualTrigger.Config();
17449
17449
  const dataToSend = this.data ?? this.input;
17450
- if (dataToSend !== null && dataToSend !== void 0) {
17451
- const inputValue = convertInputToProtobuf(dataToSend);
17452
- if (inputValue) {
17453
- config.setData(inputValue);
17454
- }
17450
+ if (dataToSend === null || dataToSend === void 0) {
17451
+ throw new Error("ManualTrigger data is required");
17452
+ }
17453
+ const inputValue = convertInputToProtobuf(dataToSend);
17454
+ if (!inputValue) {
17455
+ throw new Error("Failed to convert ManualTrigger data to protobuf format");
17455
17456
  }
17457
+ config.setData(inputValue);
17456
17458
  if (this.headers && Object.keys(this.headers).length > 0) {
17457
17459
  const headersMap = config.getHeadersMap();
17458
17460
  Object.entries(this.headers).forEach(([key, value]) => {
@@ -1 +1 @@
1
- {"version":3,"file":"manual.d.ts","sourceRoot":"","sources":["../../../src/models/trigger/manual.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,uBAAuB,CAAC;AAChD,OAAO,OAAO,MAAM,aAAa,CAAC;AAMlC,OAAO,EAEL,kBAAkB,EAEnB,MAAM,oBAAoB,CAAC;AAE5B,cAAM,aAAc,SAAQ,OAAO;IAC1B,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACjC,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;gBAE/B,KAAK,EAAE,kBAAkB;IAWrC,SAAS,IAAI,MAAM,CAAC,WAAW;IAyC/B,MAAM,CAAC,YAAY,CAAC,GAAG,EAAE,MAAM,CAAC,WAAW,GAAG,aAAa;IA+C3D,iBAAiB,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI;IAKnD;;;;OAIG;IACH,MAAM,CAAC,cAAc,CACnB,UAAU,EAAE,MAAM,CAAC,cAAc,GAChC,OAAO;CAuBX;AAED,eAAe,aAAa,CAAC"}
1
+ {"version":3,"file":"manual.d.ts","sourceRoot":"","sources":["../../../src/models/trigger/manual.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,uBAAuB,CAAC;AAChD,OAAO,OAAO,MAAM,aAAa,CAAC;AAMlC,OAAO,EAEL,kBAAkB,EAEnB,MAAM,oBAAoB,CAAC;AAE5B,cAAM,aAAc,SAAQ,OAAO;IAC1B,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACjC,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;gBAE/B,KAAK,EAAE,kBAAkB;IAWrC,SAAS,IAAI,MAAM,CAAC,WAAW;IA4C/B,MAAM,CAAC,YAAY,CAAC,GAAG,EAAE,MAAM,CAAC,WAAW,GAAG,aAAa;IA+C3D,iBAAiB,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI;IAKnD;;;;OAIG;IACH,MAAM,CAAC,cAAc,CACnB,UAAU,EAAE,MAAM,CAAC,cAAc,GAChC,OAAO;CAuBX;AAED,eAAe,aAAa,CAAC"}
@@ -21,14 +21,16 @@ class ManualTrigger extends Trigger {
21
21
  // Create ManualTrigger with proper config structure
22
22
  const manualTrigger = new avs_pb.ManualTrigger();
23
23
  const config = new avs_pb.ManualTrigger.Config();
24
- // Set the data
24
+ // Set the data - required for ManualTrigger
25
25
  const dataToSend = this.data ?? this.input;
26
- if (dataToSend !== null && dataToSend !== undefined) {
27
- const inputValue = convertInputToProtobuf(dataToSend);
28
- if (inputValue) {
29
- config.setData(inputValue);
30
- }
26
+ if (dataToSend === null || dataToSend === undefined) {
27
+ throw new Error("ManualTrigger data is required");
28
+ }
29
+ const inputValue = convertInputToProtobuf(dataToSend);
30
+ if (!inputValue) {
31
+ throw new Error("Failed to convert ManualTrigger data to protobuf format");
31
32
  }
33
+ config.setData(inputValue);
32
34
  // Set headers if provided - direct object to protobuf map mapping
33
35
  if (this.headers && Object.keys(this.headers).length > 0) {
34
36
  const headersMap = config.getHeadersMap();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@avaprotocol/sdk-js",
3
- "version": "2.5.2-dev.0",
3
+ "version": "2.5.2-dev.1",
4
4
  "description": "A JavaScript/TypeScript SDK designed to simplify integration with Ava Protocol's AVS",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",