@avaprotocol/sdk-js 2.3.13-de.0 → 2.3.13-dev.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.
Files changed (39) hide show
  1. package/dist/index.js +839 -198
  2. package/dist/index.mjs +843 -202
  3. package/dist/models/node/branch.d.ts.map +1 -1
  4. package/dist/models/node/branch.js +9 -0
  5. package/dist/models/node/contractRead.d.ts.map +1 -1
  6. package/dist/models/node/contractRead.js +9 -0
  7. package/dist/models/node/contractWrite.d.ts.map +1 -1
  8. package/dist/models/node/contractWrite.js +9 -0
  9. package/dist/models/node/customCode.d.ts.map +1 -1
  10. package/dist/models/node/customCode.js +9 -1
  11. package/dist/models/node/ethTransfer.d.ts.map +1 -1
  12. package/dist/models/node/ethTransfer.js +9 -0
  13. package/dist/models/node/filter.d.ts.map +1 -1
  14. package/dist/models/node/filter.js +9 -0
  15. package/dist/models/node/graphqlQuery.d.ts.map +1 -1
  16. package/dist/models/node/graphqlQuery.js +9 -0
  17. package/dist/models/node/interface.d.ts +1 -0
  18. package/dist/models/node/interface.d.ts.map +1 -1
  19. package/dist/models/node/interface.js +1 -0
  20. package/dist/models/node/loop.d.ts.map +1 -1
  21. package/dist/models/node/loop.js +9 -0
  22. package/dist/models/node/restApi.d.ts.map +1 -1
  23. package/dist/models/node/restApi.js +15 -1
  24. package/dist/models/step.d.ts +1 -0
  25. package/dist/models/step.d.ts.map +1 -1
  26. package/dist/models/step.js +11 -0
  27. package/dist/models/trigger/block.d.ts.map +1 -1
  28. package/dist/models/trigger/block.js +13 -0
  29. package/dist/models/trigger/cron.d.ts.map +1 -1
  30. package/dist/models/trigger/cron.js +20 -0
  31. package/dist/models/trigger/interface.d.ts +1 -0
  32. package/dist/models/trigger/interface.d.ts.map +1 -1
  33. package/dist/models/trigger/interface.js +2 -0
  34. package/dist/models/trigger/manual.d.ts.map +1 -1
  35. package/dist/models/trigger/manual.js +13 -0
  36. package/dist/utils.d.ts +20 -0
  37. package/dist/utils.d.ts.map +1 -1
  38. package/dist/utils.js +34 -0
  39. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"branch.d.ts","sourceRoot":"","sources":["../../../src/models/node/branch.ts"],"names":[],"mappings":"AAAA,OAAO,EAA4B,eAAe,EAAa,MAAM,oBAAoB,CAAC;AAC1F,OAAO,IAAI,MAAM,aAAa,CAAC;AAC/B,OAAO,KAAK,MAAM,MAAM,uBAAuB,CAAC;AAKhD,cAAM,UAAW,SAAQ,IAAI;gBACf,KAAK,EAAE,eAAe;IAIlC,MAAM,CAAC,YAAY,CAAC,GAAG,EAAE,MAAM,CAAC,QAAQ,GAAG,UAAU;IAqBrD,SAAS,IAAI,MAAM,CAAC,QAAQ;IA+B5B,MAAM,CAAC,cAAc,CAAC,UAAU,EAAE,MAAM,CAAC,qBAAqB,GAAG,GAAG;CAMrE;AACD,eAAe,UAAU,CAAC"}
1
+ {"version":3,"file":"branch.d.ts","sourceRoot":"","sources":["../../../src/models/node/branch.ts"],"names":[],"mappings":"AAAA,OAAO,EAA4B,eAAe,EAAa,MAAM,oBAAoB,CAAC;AAC1F,OAAO,IAAI,MAAM,aAAa,CAAC;AAC/B,OAAO,KAAK,MAAM,MAAM,uBAAuB,CAAC;AAMhD,cAAM,UAAW,SAAQ,IAAI;gBACf,KAAK,EAAE,eAAe;IAIlC,MAAM,CAAC,YAAY,CAAC,GAAG,EAAE,MAAM,CAAC,QAAQ,GAAG,UAAU;IAyBrD,SAAS,IAAI,MAAM,CAAC,QAAQ;IAsC5B,MAAM,CAAC,cAAc,CAAC,UAAU,EAAE,MAAM,CAAC,qBAAqB,GAAG,GAAG;CAMrE;AACD,eAAe,UAAU,CAAC"}
@@ -1,6 +1,7 @@
1
1
  import { NodeType } from "@avaprotocol/types";
2
2
  import Node from "./interface";
3
3
  import * as avs_pb from "@/grpc_codegen/avs_pb";
4
+ import { convertInputToProtobuf, extractInputFromProtobuf } from "../../utils";
4
5
  // Required props for constructor: id, name, type and data: { conditions }
5
6
  class BranchNode extends Node {
6
7
  constructor(props) {
@@ -18,10 +19,13 @@ class BranchNode extends Node {
18
19
  expression: condition.expression,
19
20
  })) || [],
20
21
  };
22
+ // Extract input data if present
23
+ const input = extractInputFromProtobuf(raw.getBranch()?.getInput());
21
24
  return new BranchNode({
22
25
  ...obj,
23
26
  type: NodeType.Branch,
24
27
  data: data,
28
+ input: input,
25
29
  });
26
30
  }
27
31
  toRequest() {
@@ -42,6 +46,11 @@ class BranchNode extends Node {
42
46
  config.setConditionsList(conditionsList);
43
47
  }
44
48
  nodeData.setConfig(config);
49
+ // Set input data if provided
50
+ const inputValue = convertInputToProtobuf(this.input);
51
+ if (inputValue) {
52
+ nodeData.setInput(inputValue);
53
+ }
45
54
  request.setBranch(nodeData);
46
55
  return request;
47
56
  }
@@ -1 +1 @@
1
- {"version":3,"file":"contractRead.d.ts","sourceRoot":"","sources":["../../../src/models/node/contractRead.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,aAAa,CAAC;AAC/B,OAAO,KAAK,MAAM,MAAM,uBAAuB,CAAC;AAChD,OAAO,EAAkC,qBAAqB,EAAa,MAAM,oBAAoB,CAAC;AAMtG,cAAM,gBAAiB,SAAQ,IAAI;gBACrB,KAAK,EAAE,qBAAqB;IAIxC,MAAM,CAAC,YAAY,CAAC,GAAG,EAAE,MAAM,CAAC,QAAQ,GAAG,gBAAgB;IAsB3D,SAAS,IAAI,MAAM,CAAC,QAAQ;IA8B5B,MAAM,CAAC,cAAc,CAAC,UAAU,EAAE,MAAM,CAAC,qBAAqB,GAAG,GAAG;CAmBrE;AAED,eAAe,gBAAgB,CAAC"}
1
+ {"version":3,"file":"contractRead.d.ts","sourceRoot":"","sources":["../../../src/models/node/contractRead.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,aAAa,CAAC;AAC/B,OAAO,KAAK,MAAM,MAAM,uBAAuB,CAAC;AAChD,OAAO,EAAkC,qBAAqB,EAAa,MAAM,oBAAoB,CAAC;AAMtG,cAAM,gBAAiB,SAAQ,IAAI;gBACrB,KAAK,EAAE,qBAAqB;IAIxC,MAAM,CAAC,YAAY,CAAC,GAAG,EAAE,MAAM,CAAC,QAAQ,GAAG,gBAAgB;IA0B3D,SAAS,IAAI,MAAM,CAAC,QAAQ;IAoC5B,MAAM,CAAC,cAAc,CAAC,UAAU,EAAE,MAAM,CAAC,qBAAqB,GAAG,GAAG;CAmBrE;AAED,eAAe,gBAAgB,CAAC"}
@@ -1,6 +1,7 @@
1
1
  import Node from "./interface";
2
2
  import * as avs_pb from "@/grpc_codegen/avs_pb";
3
3
  import { NodeType } from "@avaprotocol/types";
4
+ import { convertInputToProtobuf, extractInputFromProtobuf } from "../../utils";
4
5
  // Required props for constructor: id, name, type and data
5
6
  class ContractReadNode extends Node {
6
7
  constructor(props) {
@@ -19,10 +20,13 @@ class ContractReadNode extends Node {
19
20
  methodName: call.methodName,
20
21
  })) || [],
21
22
  };
23
+ // Extract input data if present
24
+ const input = extractInputFromProtobuf(raw.getContractRead()?.getInput());
22
25
  return new ContractReadNode({
23
26
  ...obj,
24
27
  type: NodeType.ContractRead,
25
28
  data: data,
29
+ input: input,
26
30
  });
27
31
  }
28
32
  toRequest() {
@@ -44,6 +48,11 @@ class ContractReadNode extends Node {
44
48
  config.addMethodCalls(methodCallMsg);
45
49
  });
46
50
  nodeData.setConfig(config);
51
+ // Set input data if provided
52
+ const inputValue = convertInputToProtobuf(this.input);
53
+ if (inputValue) {
54
+ nodeData.setInput(inputValue);
55
+ }
47
56
  request.setContractRead(nodeData);
48
57
  return request;
49
58
  }
@@ -1 +1 @@
1
- {"version":3,"file":"contractWrite.d.ts","sourceRoot":"","sources":["../../../src/models/node/contractWrite.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,aAAa,CAAC;AAC/B,OAAO,KAAK,MAAM,MAAM,uBAAuB,CAAC;AAChD,OAAO,EAAmC,sBAAsB,EAAa,MAAM,oBAAoB,CAAC;AAKxG,cAAM,iBAAkB,SAAQ,IAAI;gBACtB,KAAK,EAAE,sBAAsB;IAIzC,MAAM,CAAC,YAAY,CAAC,GAAG,EAAE,MAAM,CAAC,QAAQ,GAAG,iBAAiB;IAuB5D,SAAS,IAAI,MAAM,CAAC,QAAQ;IA+B5B,MAAM,CAAC,cAAc,CAAC,UAAU,EAAE,MAAM,CAAC,qBAAqB,GAAG,GAAG;CAyDrE;AAED,eAAe,iBAAiB,CAAC"}
1
+ {"version":3,"file":"contractWrite.d.ts","sourceRoot":"","sources":["../../../src/models/node/contractWrite.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,aAAa,CAAC;AAC/B,OAAO,KAAK,MAAM,MAAM,uBAAuB,CAAC;AAChD,OAAO,EAAmC,sBAAsB,EAAa,MAAM,oBAAoB,CAAC;AAMxG,cAAM,iBAAkB,SAAQ,IAAI;gBACtB,KAAK,EAAE,sBAAsB;IAIzC,MAAM,CAAC,YAAY,CAAC,GAAG,EAAE,MAAM,CAAC,QAAQ,GAAG,iBAAiB;IA2B5D,SAAS,IAAI,MAAM,CAAC,QAAQ;IAqC5B,MAAM,CAAC,cAAc,CAAC,UAAU,EAAE,MAAM,CAAC,qBAAqB,GAAG,GAAG;CAyDrE;AAED,eAAe,iBAAiB,CAAC"}
@@ -1,6 +1,7 @@
1
1
  import Node from "./interface";
2
2
  import * as avs_pb from "@/grpc_codegen/avs_pb";
3
3
  import { NodeType } from "@avaprotocol/types";
4
+ import { convertInputToProtobuf, extractInputFromProtobuf } from "../../utils";
4
5
  // Required props for constructor: id, name, type and data: { config: { contractAddress, callData, contractAbi, methodCallsList? } }
5
6
  class ContractWriteNode extends Node {
6
7
  constructor(props) {
@@ -20,10 +21,13 @@ class ContractWriteNode extends Node {
20
21
  methodName: call.methodName,
21
22
  })) || [],
22
23
  };
24
+ // Extract input data if present
25
+ const input = extractInputFromProtobuf(raw.getContractWrite()?.getInput());
23
26
  return new ContractWriteNode({
24
27
  ...obj,
25
28
  type: NodeType.ContractWrite,
26
29
  data: data,
30
+ input: input,
27
31
  });
28
32
  }
29
33
  toRequest() {
@@ -46,6 +50,11 @@ class ContractWriteNode extends Node {
46
50
  config.addMethodCalls(methodCallMsg);
47
51
  });
48
52
  nodeData.setConfig(config);
53
+ // Set input data if provided
54
+ const inputValue = convertInputToProtobuf(this.input);
55
+ if (inputValue) {
56
+ nodeData.setInput(inputValue);
57
+ }
49
58
  request.setContractWrite(nodeData);
50
59
  return request;
51
60
  }
@@ -1 +1 @@
1
- {"version":3,"file":"customCode.d.ts","sourceRoot":"","sources":["../../../src/models/node/customCode.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,aAAa,CAAC;AAC/B,OAAO,KAAK,MAAM,MAAM,uBAAuB,CAAC;AAChD,OAAO,EAIL,mBAAmB,EAEpB,MAAM,oBAAoB,CAAC;AAK5B,cAAM,cAAe,SAAQ,IAAI;gBACnB,KAAK,EAAE,mBAAmB;IAItC,MAAM,CAAC,YAAY,CAAC,GAAG,EAAE,MAAM,CAAC,QAAQ,GAAG,cAAc;IAmBzD,SAAS,IAAI,MAAM,CAAC,QAAQ;IAqB5B,MAAM,CAAC,cAAc,CAAC,UAAU,EAAE,MAAM,CAAC,qBAAqB,GAAG,GAAG;CAkBrE;AAED,eAAe,cAAc,CAAC"}
1
+ {"version":3,"file":"customCode.d.ts","sourceRoot":"","sources":["../../../src/models/node/customCode.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,aAAa,CAAC;AAC/B,OAAO,KAAK,MAAM,MAAM,uBAAuB,CAAC;AAChD,OAAO,EAIL,mBAAmB,EAEpB,MAAM,oBAAoB,CAAC;AAK5B,cAAM,cAAe,SAAQ,IAAI;gBACnB,KAAK,EAAE,mBAAmB;IAItC,MAAM,CAAC,YAAY,CAAC,GAAG,EAAE,MAAM,CAAC,QAAQ,GAAG,cAAc;IAuBzD,SAAS,IAAI,MAAM,CAAC,QAAQ;IA2B5B,MAAM,CAAC,cAAc,CAAC,UAAU,EAAE,MAAM,CAAC,qBAAqB,GAAG,GAAG;CAkBrE;AAED,eAAe,cAAc,CAAC"}
@@ -1,7 +1,7 @@
1
1
  import Node from "./interface";
2
2
  import * as avs_pb from "@/grpc_codegen/avs_pb";
3
3
  import { NodeType, } from "@avaprotocol/types";
4
- import { convertProtobufValueToJs } from "../../utils";
4
+ import { convertProtobufValueToJs, convertInputToProtobuf, extractInputFromProtobuf } from "../../utils";
5
5
  // Required props for constructor: id, name, type and data: { lang: number, source: string }
6
6
  class CustomCodeNode extends Node {
7
7
  constructor(props) {
@@ -16,10 +16,13 @@ class CustomCodeNode extends Node {
16
16
  lang: rawConfig.lang,
17
17
  source: rawConfig.source,
18
18
  };
19
+ // Extract input data if present
20
+ const input = extractInputFromProtobuf(raw.getCustomCode()?.getInput());
19
21
  return new CustomCodeNode({
20
22
  ...obj,
21
23
  type: NodeType.CustomCode,
22
24
  data: convertedConfig,
25
+ input: input,
23
26
  });
24
27
  }
25
28
  toRequest() {
@@ -32,6 +35,11 @@ class CustomCodeNode extends Node {
32
35
  config.setLang(this.data.lang);
33
36
  config.setSource(this.data.source);
34
37
  nodeData.setConfig(config);
38
+ // Set input data if provided
39
+ const inputValue = convertInputToProtobuf(this.input);
40
+ if (inputValue) {
41
+ nodeData.setInput(inputValue);
42
+ }
35
43
  request.setCustomCode(nodeData);
36
44
  return request;
37
45
  }
@@ -1 +1 @@
1
- {"version":3,"file":"ethTransfer.d.ts","sourceRoot":"","sources":["../../../src/models/node/ethTransfer.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,aAAa,CAAC;AAC/B,OAAO,KAAK,MAAM,MAAM,uBAAuB,CAAC;AAChD,OAAO,EAAiC,oBAAoB,EAAa,MAAM,oBAAoB,CAAC;AAKpG,cAAM,eAAgB,SAAQ,IAAI;gBACpB,KAAK,EAAE,oBAAoB;IAIvC,MAAM,CAAC,YAAY,CAAC,GAAG,EAAE,MAAM,CAAC,QAAQ,GAAG,eAAe;IAU1D,SAAS,IAAI,MAAM,CAAC,QAAQ;IAkB5B,MAAM,CAAC,cAAc,CAAC,UAAU,EAAE,MAAM,CAAC,qBAAqB,GAAG,GAAG;CAIrE;AAED,eAAe,eAAe,CAAC"}
1
+ {"version":3,"file":"ethTransfer.d.ts","sourceRoot":"","sources":["../../../src/models/node/ethTransfer.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,aAAa,CAAC;AAC/B,OAAO,KAAK,MAAM,MAAM,uBAAuB,CAAC;AAChD,OAAO,EAAiC,oBAAoB,EAAa,MAAM,oBAAoB,CAAC;AAMpG,cAAM,eAAgB,SAAQ,IAAI;gBACpB,KAAK,EAAE,oBAAoB;IAIvC,MAAM,CAAC,YAAY,CAAC,GAAG,EAAE,MAAM,CAAC,QAAQ,GAAG,eAAe;IAe1D,SAAS,IAAI,MAAM,CAAC,QAAQ;IAwB5B,MAAM,CAAC,cAAc,CAAC,UAAU,EAAE,MAAM,CAAC,qBAAqB,GAAG,GAAG;CAIrE;AAED,eAAe,eAAe,CAAC"}
@@ -1,6 +1,7 @@
1
1
  import Node from "./interface";
2
2
  import * as avs_pb from "@/grpc_codegen/avs_pb";
3
3
  import { NodeType } from "@avaprotocol/types";
4
+ import { convertInputToProtobuf, extractInputFromProtobuf } from "../../utils";
4
5
  // Required props for constructor: id, name, type and data: { destination, amount }
5
6
  class ETHTransferNode extends Node {
6
7
  constructor(props) {
@@ -9,10 +10,13 @@ class ETHTransferNode extends Node {
9
10
  static fromResponse(raw) {
10
11
  // Convert the raw object to ETHTransferNodeProps, which should keep name and id
11
12
  const obj = raw.toObject();
13
+ // Extract input data if present
14
+ const input = extractInputFromProtobuf(raw.getEthTransfer()?.getInput());
12
15
  return new ETHTransferNode({
13
16
  ...obj,
14
17
  type: NodeType.ETHTransfer,
15
18
  data: raw.getEthTransfer().getConfig().toObject(),
19
+ input: input,
16
20
  });
17
21
  }
18
22
  toRequest() {
@@ -24,6 +28,11 @@ class ETHTransferNode extends Node {
24
28
  config.setDestination(this.data.destination);
25
29
  config.setAmount(this.data.amount);
26
30
  nodeData.setConfig(config);
31
+ // Set input data if provided
32
+ const inputValue = convertInputToProtobuf(this.input);
33
+ if (inputValue) {
34
+ nodeData.setInput(inputValue);
35
+ }
27
36
  request.setEthTransfer(nodeData);
28
37
  return request;
29
38
  }
@@ -1 +1 @@
1
- {"version":3,"file":"filter.d.ts","sourceRoot":"","sources":["../../../src/models/node/filter.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,aAAa,CAAC;AAC/B,OAAO,KAAK,MAAM,MAAM,uBAAuB,CAAC;AAChD,OAAO,EAA4B,eAAe,EAAa,MAAM,oBAAoB,CAAC;AAK1F,cAAM,UAAW,SAAQ,IAAI;gBACf,KAAK,EAAE,eAAe;IAIlC,MAAM,CAAC,YAAY,CAAC,GAAG,EAAE,MAAM,CAAC,QAAQ,GAAG,UAAU;IAUrD,SAAS,IAAI,MAAM,CAAC,QAAQ;IAiB5B,MAAM,CAAC,cAAc,CAAC,UAAU,EAAE,MAAM,CAAC,qBAAqB,GAAG,GAAG;CAIrE;AAED,eAAe,UAAU,CAAC"}
1
+ {"version":3,"file":"filter.d.ts","sourceRoot":"","sources":["../../../src/models/node/filter.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,aAAa,CAAC;AAC/B,OAAO,KAAK,MAAM,MAAM,uBAAuB,CAAC;AAChD,OAAO,EAA4B,eAAe,EAAa,MAAM,oBAAoB,CAAC;AAM1F,cAAM,UAAW,SAAQ,IAAI;gBACf,KAAK,EAAE,eAAe;IAIlC,MAAM,CAAC,YAAY,CAAC,GAAG,EAAE,MAAM,CAAC,QAAQ,GAAG,UAAU;IAerD,SAAS,IAAI,MAAM,CAAC,QAAQ;IAuB5B,MAAM,CAAC,cAAc,CAAC,UAAU,EAAE,MAAM,CAAC,qBAAqB,GAAG,GAAG;CAIrE;AAED,eAAe,UAAU,CAAC"}
@@ -1,6 +1,7 @@
1
1
  import Node from "./interface";
2
2
  import * as avs_pb from "@/grpc_codegen/avs_pb";
3
3
  import { NodeType } from "@avaprotocol/types";
4
+ import { convertInputToProtobuf, extractInputFromProtobuf } from "../../utils";
4
5
  // Required props for constructor: id, name, type and data: { expression, sourceId }
5
6
  class FilterNode extends Node {
6
7
  constructor(props) {
@@ -9,10 +10,13 @@ class FilterNode extends Node {
9
10
  static fromResponse(raw) {
10
11
  // Convert the raw object to FilterNodeProps, which should keep name and id
11
12
  const obj = raw.toObject();
13
+ // Extract input data if present
14
+ const input = extractInputFromProtobuf(raw.getFilter()?.getInput());
12
15
  return new FilterNode({
13
16
  ...obj,
14
17
  type: NodeType.Filter,
15
18
  data: raw.getFilter().getConfig().toObject(),
19
+ input: input,
16
20
  });
17
21
  }
18
22
  toRequest() {
@@ -24,6 +28,11 @@ class FilterNode extends Node {
24
28
  config.setExpression(this.data.expression);
25
29
  config.setSourceId(this.data.sourceId || '');
26
30
  nodeData.setConfig(config);
31
+ // Set input data if provided
32
+ const inputValue = convertInputToProtobuf(this.input);
33
+ if (inputValue) {
34
+ nodeData.setInput(inputValue);
35
+ }
27
36
  request.setFilter(nodeData);
28
37
  return request;
29
38
  }
@@ -1 +1 @@
1
- {"version":3,"file":"graphqlQuery.d.ts","sourceRoot":"","sources":["../../../src/models/node/graphqlQuery.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,aAAa,CAAC;AAC/B,OAAO,KAAK,MAAM,MAAM,uBAAuB,CAAC;AAChD,OAAO,EAAkC,qBAAqB,EAAa,MAAM,oBAAoB,CAAC;AAKtG,cAAM,gBAAiB,SAAQ,IAAI;gBACrB,KAAK,EAAE,qBAAqB;IAQxC,MAAM,CAAC,YAAY,CAAC,GAAG,EAAE,MAAM,CAAC,QAAQ,GAAG,gBAAgB;IAU3D,SAAS,IAAI,MAAM,CAAC,QAAQ;IA2B5B,MAAM,CAAC,cAAc,CAAC,UAAU,EAAE,MAAM,CAAC,qBAAqB,GAAG,GAAG;CAIrE;AAED,eAAe,gBAAgB,CAAC"}
1
+ {"version":3,"file":"graphqlQuery.d.ts","sourceRoot":"","sources":["../../../src/models/node/graphqlQuery.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,aAAa,CAAC;AAC/B,OAAO,KAAK,MAAM,MAAM,uBAAuB,CAAC;AAChD,OAAO,EAAkC,qBAAqB,EAAa,MAAM,oBAAoB,CAAC;AAMtG,cAAM,gBAAiB,SAAQ,IAAI;gBACrB,KAAK,EAAE,qBAAqB;IAQxC,MAAM,CAAC,YAAY,CAAC,GAAG,EAAE,MAAM,CAAC,QAAQ,GAAG,gBAAgB;IAe3D,SAAS,IAAI,MAAM,CAAC,QAAQ;IAiC5B,MAAM,CAAC,cAAc,CAAC,UAAU,EAAE,MAAM,CAAC,qBAAqB,GAAG,GAAG;CAIrE;AAED,eAAe,gBAAgB,CAAC"}
@@ -1,6 +1,7 @@
1
1
  import Node from "./interface";
2
2
  import * as avs_pb from "@/grpc_codegen/avs_pb";
3
3
  import { NodeType } from "@avaprotocol/types";
4
+ import { convertInputToProtobuf, extractInputFromProtobuf } from "../../utils";
4
5
  // Required props for constructor: id, name, type and data: { url, query, variablesMap }
5
6
  class GraphQLQueryNode extends Node {
6
7
  constructor(props) {
@@ -13,10 +14,13 @@ class GraphQLQueryNode extends Node {
13
14
  static fromResponse(raw) {
14
15
  // Convert the raw object to GraphQLQueryNodeProps, which should keep name and id
15
16
  const obj = raw.toObject();
17
+ // Extract input data if present
18
+ const input = extractInputFromProtobuf(raw.getGraphqlQuery()?.getInput());
16
19
  return new GraphQLQueryNode({
17
20
  ...obj,
18
21
  type: NodeType.GraphQLQuery,
19
22
  data: raw.getGraphqlQuery().getConfig().toObject(),
23
+ input: input,
20
24
  });
21
25
  }
22
26
  toRequest() {
@@ -35,6 +39,11 @@ class GraphQLQueryNode extends Node {
35
39
  });
36
40
  }
37
41
  nodeData.setConfig(config);
42
+ // Set input data if provided
43
+ const inputValue = convertInputToProtobuf(this.input);
44
+ if (inputValue) {
45
+ nodeData.setInput(inputValue);
46
+ }
38
47
  request.setGraphqlQuery(nodeData);
39
48
  return request;
40
49
  }
@@ -13,6 +13,7 @@ declare class Node implements NodeProps {
13
13
  name: string;
14
14
  type: NodeType;
15
15
  data: NodeData;
16
+ input?: Record<string, any>;
16
17
  constructor(props: NodeProps);
17
18
  toRequest(): avs_pb.TaskNode;
18
19
  }
@@ -1 +1 @@
1
- {"version":3,"file":"interface.d.ts","sourceRoot":"","sources":["../../../src/models/node/interface.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,uBAAuB,CAAC;AAChD,OAAO,EAAE,QAAQ,EAA0C,SAAS,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAI3G,wBAAgB,sBAAsB,CACpC,MAAM,EAAE,MAAM,CAAC,QAAQ,CAAC,YAAY,GACnC,QAAQ,CAeV;AAGD,MAAM,MAAM,iBAAiB,GAAG,IAAI,CAClC,MAAM,CAAC,QAAQ,CAAC,QAAQ,EACtB,aAAa,GACb,eAAe,GACf,cAAc,GACd,kBAAkB,GAClB,SAAS,GACT,QAAQ,GACR,QAAQ,GACR,MAAM,GACN,YAAY,CACf,GAAG;IAEF,IAAI,EAAE,GAAG,CAAC;CACX,CAAC;AAGF,eAAO,MAAM,sBAAsB;6BAER,iBAAiB,KAAG,MAAM;qCAKlB,MAAM,aAAa,IAAI,CAAC,iBAAiB,EAAE,MAAM,CAAC,KAAG,iBAAiB;CAMxG,CAAC;AAEF,cAAM,IAAK,YAAW,SAAS;IAC7B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,QAAQ,CAAC;IACf,IAAI,EAAE,QAAQ,CAAC;gBAEH,KAAK,EAAE,SAAS;IAO5B,SAAS,IAAI,MAAM,CAAC,QAAQ;CAU7B;AAED,eAAe,IAAI,CAAC"}
1
+ {"version":3,"file":"interface.d.ts","sourceRoot":"","sources":["../../../src/models/node/interface.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,uBAAuB,CAAC;AAChD,OAAO,EAAE,QAAQ,EAA0C,SAAS,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAI3G,wBAAgB,sBAAsB,CACpC,MAAM,EAAE,MAAM,CAAC,QAAQ,CAAC,YAAY,GACnC,QAAQ,CAeV;AAGD,MAAM,MAAM,iBAAiB,GAAG,IAAI,CAClC,MAAM,CAAC,QAAQ,CAAC,QAAQ,EACtB,aAAa,GACb,eAAe,GACf,cAAc,GACd,kBAAkB,GAClB,SAAS,GACT,QAAQ,GACR,QAAQ,GACR,MAAM,GACN,YAAY,CACf,GAAG;IAEF,IAAI,EAAE,GAAG,CAAC;CACX,CAAC;AAGF,eAAO,MAAM,sBAAsB;6BAER,iBAAiB,KAAG,MAAM;qCAKlB,MAAM,aAAa,IAAI,CAAC,iBAAiB,EAAE,MAAM,CAAC,KAAG,iBAAiB;CAMxG,CAAC;AAEF,cAAM,IAAK,YAAW,SAAS;IAC7B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,QAAQ,CAAC;IACf,IAAI,EAAE,QAAQ,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;gBAEhB,KAAK,EAAE,SAAS;IAQ5B,SAAS,IAAI,MAAM,CAAC,QAAQ;CAU7B;AAED,eAAe,IAAI,CAAC"}
@@ -37,6 +37,7 @@ class Node {
37
37
  this.name = props.name;
38
38
  this.type = props.type;
39
39
  this.data = props.data;
40
+ this.input = props.input;
40
41
  }
41
42
  toRequest() {
42
43
  const request = new avs_pb.TaskNode();
@@ -1 +1 @@
1
- {"version":3,"file":"loop.d.ts","sourceRoot":"","sources":["../../../src/models/node/loop.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,uBAAuB,CAAC;AAChD,OAAO,IAAI,MAAM,aAAa,CAAC;AAC/B,OAAO,EAGL,aAAa,EAEd,MAAM,oBAAoB,CAAC;AAI5B,cAAM,QAAS,SAAQ,IAAI;gBACb,KAAK,EAAE,aAAa;IAIhC,MAAM,CAAC,YAAY,CAAC,GAAG,EAAE,MAAM,CAAC,QAAQ,GAAG,QAAQ;IA+BnD,SAAS,IAAI,MAAM,CAAC,QAAQ;IAuI5B,MAAM,CAAC,cAAc,CAAC,UAAU,EAAE,MAAM,CAAC,qBAAqB,GAAG,GAAG;CAuCrE;AAED,eAAe,QAAQ,CAAC"}
1
+ {"version":3,"file":"loop.d.ts","sourceRoot":"","sources":["../../../src/models/node/loop.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,uBAAuB,CAAC;AAChD,OAAO,IAAI,MAAM,aAAa,CAAC;AAC/B,OAAO,EAGL,aAAa,EAEd,MAAM,oBAAoB,CAAC;AAI5B,cAAM,QAAS,SAAQ,IAAI;gBACb,KAAK,EAAE,aAAa;IAIhC,MAAM,CAAC,YAAY,CAAC,GAAG,EAAE,MAAM,CAAC,QAAQ,GAAG,QAAQ;IAmCnD,SAAS,IAAI,MAAM,CAAC,QAAQ;IA6I5B,MAAM,CAAC,cAAc,CAAC,UAAU,EAAE,MAAM,CAAC,qBAAqB,GAAG,GAAG;CAuCrE;AAED,eAAe,QAAQ,CAAC"}
@@ -1,6 +1,7 @@
1
1
  import * as avs_pb from "@/grpc_codegen/avs_pb";
2
2
  import Node from "./interface";
3
3
  import { NodeType, } from "@avaprotocol/types";
4
+ import { convertInputToProtobuf, extractInputFromProtobuf } from "../../utils";
4
5
  class LoopNode extends Node {
5
6
  constructor(props) {
6
7
  super({ ...props, type: NodeType.Loop, data: props.data });
@@ -26,10 +27,13 @@ class LoopNode extends Node {
26
27
  contractWrite: loopNodeData.contractWrite,
27
28
  graphqlDataQuery: loopNodeData.graphqlDataQuery,
28
29
  };
30
+ // Extract input data if present
31
+ const input = extractInputFromProtobuf(raw.getLoop()?.getInput());
29
32
  return new LoopNode({
30
33
  ...obj,
31
34
  type: NodeType.Loop,
32
35
  data: data,
36
+ input: input,
33
37
  });
34
38
  }
35
39
  toRequest() {
@@ -44,6 +48,11 @@ class LoopNode extends Node {
44
48
  config.setIterVal(data.iterVal || "");
45
49
  config.setIterKey(data.iterKey || "");
46
50
  loopNode.setConfig(config);
51
+ // Set input data if provided
52
+ const inputValue = convertInputToProtobuf(this.input);
53
+ if (inputValue) {
54
+ loopNode.setInput(inputValue);
55
+ }
47
56
  // Handle nested nodes - these still use the nested structure within LoopNodeData
48
57
  if (data.ethTransfer) {
49
58
  const ethTransfer = new avs_pb.ETHTransferNode();
@@ -1 +1 @@
1
- {"version":3,"file":"restApi.d.ts","sourceRoot":"","sources":["../../../src/models/node/restApi.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,aAAa,CAAC;AAC/B,OAAO,KAAK,MAAM,MAAM,uBAAuB,CAAC;AAChD,OAAO,EAIL,gBAAgB,EAEjB,MAAM,oBAAoB,CAAC;AAM5B,cAAM,WAAY,SAAQ,IAAI;gBAChB,KAAK,EAAE,gBAAgB;IAInC,MAAM,CAAC,YAAY,CAAC,GAAG,EAAE,MAAM,CAAC,QAAQ,GAAG,WAAW;IAUtD,SAAS,IAAI,MAAM,CAAC,QAAQ;IAgC5B,MAAM,CAAC,cAAc,CAAC,UAAU,EAAE,MAAM,CAAC,qBAAqB,GAAG,GAAG;CAerE;AAED,eAAe,WAAW,CAAC"}
1
+ {"version":3,"file":"restApi.d.ts","sourceRoot":"","sources":["../../../src/models/node/restApi.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,aAAa,CAAC;AAC/B,OAAO,KAAK,MAAM,MAAM,uBAAuB,CAAC;AAChD,OAAO,EAGL,gBAAgB,EAEjB,MAAM,oBAAoB,CAAC;AAS5B,cAAM,WAAY,SAAQ,IAAI;gBAChB,KAAK,EAAE,gBAAgB;IAInC,MAAM,CAAC,YAAY,CAAC,GAAG,EAAE,MAAM,CAAC,QAAQ,GAAG,WAAW;IAmBtD,SAAS,IAAI,MAAM,CAAC,QAAQ;IAyC5B,MAAM,CAAC,cAAc,CAAC,UAAU,EAAE,MAAM,CAAC,qBAAqB,GAAG,GAAG;CAerE;AAED,eAAe,WAAW,CAAC"}
@@ -1,7 +1,7 @@
1
1
  import Node from "./interface";
2
2
  import * as avs_pb from "@/grpc_codegen/avs_pb";
3
3
  import { NodeType, } from "@avaprotocol/types";
4
- import { convertProtobufValueToJs } from "../../utils";
4
+ import { convertProtobufValueToJs, convertInputToProtobuf, extractInputFromProtobuf, } from "../../utils";
5
5
  // Required props for constructor: id, name, type and data: { url, method, headersMap, body }
6
6
  class RestAPINode extends Node {
7
7
  constructor(props) {
@@ -10,10 +10,17 @@ class RestAPINode extends Node {
10
10
  static fromResponse(raw) {
11
11
  // Convert the raw object to RestAPINodeProps, which should keep name and id
12
12
  const obj = raw.toObject();
13
+ // Extract input data from top-level TaskNode.input field (not nested RestAPINode.input)
14
+ // This matches where we set it in toRequest() and where the Go backend looks for it
15
+ let input = undefined;
16
+ if (raw.hasInput()) {
17
+ input = extractInputFromProtobuf(raw.getInput());
18
+ }
13
19
  return new RestAPINode({
14
20
  ...obj,
15
21
  type: NodeType.RestAPI,
16
22
  data: raw.getRestApi().getConfig().toObject(),
23
+ input: input, // Include input data from top-level TaskNode
17
24
  });
18
25
  }
19
26
  toRequest() {
@@ -33,6 +40,13 @@ class RestAPINode extends Node {
33
40
  });
34
41
  }
35
42
  nodeData.setConfig(config);
43
+ // Use the standard utility function to convert input field to protobuf format
44
+ const inputValue = convertInputToProtobuf(this.input);
45
+ if (inputValue) {
46
+ // Set input on the top-level TaskNode, not the nested RestAPINode
47
+ // This matches where the Go backend's ExtractNodeInputData() looks for it
48
+ request.setInput(inputValue);
49
+ }
36
50
  request.setRestApi(nodeData);
37
51
  return request;
38
52
  }
@@ -8,6 +8,7 @@ declare class Step implements StepProps {
8
8
  error: string;
9
9
  log: string;
10
10
  inputsList: string[];
11
+ input?: any;
11
12
  output: OutputDataProps;
12
13
  startAt: number;
13
14
  endAt: number;
@@ -1 +1 @@
1
- {"version":3,"file":"step.d.ts","sourceRoot":"","sources":["../../src/models/step.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,uBAAuB,CAAC;AAMhD,OAAO,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAEhE,cAAM,IAAK,YAAW,SAAS;IAC7B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;IACZ,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,MAAM,EAAE,eAAe,CAAC;IACxB,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;gBAEF,KAAK,EAAE,SAAS;IAa5B;;;OAGG;IACH,MAAM,IAAI,SAAS;IAenB,MAAM,CAAC,SAAS,CAAC,IAAI,EAAE,MAAM,CAAC,SAAS,CAAC,IAAI,GAAG,eAAe;IAgQ9D,MAAM,CAAC,YAAY,CAAC,IAAI,EAAE,MAAM,CAAC,SAAS,CAAC,IAAI,GAAG,IAAI;CAgBvD;AAED,eAAe,IAAI,CAAC"}
1
+ {"version":3,"file":"step.d.ts","sourceRoot":"","sources":["../../src/models/step.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,uBAAuB,CAAC;AAMhD,OAAO,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAEhE,cAAM,IAAK,YAAW,SAAS;IAC7B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;IACZ,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,KAAK,CAAC,EAAE,GAAG,CAAC;IACZ,MAAM,EAAE,eAAe,CAAC;IACxB,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;gBAEF,KAAK,EAAE,SAAS;IAc5B;;;OAGG;IACH,MAAM,IAAI,SAAS;IAgBnB,MAAM,CAAC,SAAS,CAAC,IAAI,EAAE,MAAM,CAAC,SAAS,CAAC,IAAI,GAAG,eAAe;IAgQ9D,MAAM,CAAC,YAAY,CAAC,IAAI,EAAE,MAAM,CAAC,SAAS,CAAC,IAAI,GAAG,IAAI;CA0BvD;AAED,eAAe,IAAI,CAAC"}
@@ -10,6 +10,7 @@ class Step {
10
10
  this.error = props.error;
11
11
  this.log = props.log;
12
12
  this.inputsList = props.inputsList;
13
+ this.input = props.input;
13
14
  this.output = props.output;
14
15
  this.startAt = props.startAt;
15
16
  this.endAt = props.endAt;
@@ -27,6 +28,7 @@ class Step {
27
28
  error: this.error,
28
29
  log: this.log,
29
30
  inputsList: this.inputsList,
31
+ input: this.input,
30
32
  output: this.output,
31
33
  startAt: this.startAt,
32
34
  endAt: this.endAt,
@@ -272,6 +274,14 @@ class Step {
272
274
  }
273
275
  }
274
276
  static fromResponse(step) {
277
+ // Extract input data if present
278
+ let inputData = undefined;
279
+ if (step.hasInput()) {
280
+ const inputValue = step.getInput();
281
+ if (inputValue) {
282
+ inputData = convertProtobufValueToJs(inputValue);
283
+ }
284
+ }
275
285
  return new Step({
276
286
  id: step.getId(),
277
287
  type: convertProtobufStepTypeToSdk(step.getType()),
@@ -280,6 +290,7 @@ class Step {
280
290
  error: step.getError(),
281
291
  log: step.getLog(),
282
292
  inputsList: step.getInputsList(),
293
+ input: inputData,
283
294
  output: Step.getOutput(step),
284
295
  startAt: step.getStartAt(),
285
296
  endAt: step.getEndAt(),
@@ -1 +1 @@
1
- {"version":3,"file":"block.d.ts","sourceRoot":"","sources":["../../../src/models/trigger/block.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,uBAAuB,CAAC;AAChD,OAAO,OAA0B,MAAM,aAAa,CAAC;AACrD,OAAO,EAAqC,kBAAkB,EAAE,iBAAiB,EAAgB,MAAM,oBAAoB,CAAC;AAK5H,cAAM,YAAa,SAAQ,OAAO;gBACpB,KAAK,EAAE,iBAAiB;IAIpC,SAAS,IAAI,MAAM,CAAC,WAAW;IAgC/B,MAAM,CAAC,YAAY,CAAC,GAAG,EAAE,MAAM,CAAC,WAAW,GAAG,YAAY;IAuB1D;;;;OAIG;IACH,SAAS,IAAI,kBAAkB,GAAG,SAAS;IAI3C;;;;OAIG;IACH,MAAM,CAAC,cAAc,CAAC,UAAU,EAAE,MAAM,CAAC,cAAc,GAAG,GAAG;CAI9D;AAED,eAAe,YAAY,CAAC"}
1
+ {"version":3,"file":"block.d.ts","sourceRoot":"","sources":["../../../src/models/trigger/block.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,uBAAuB,CAAC;AAChD,OAAO,OAA0B,MAAM,aAAa,CAAC;AAErD,OAAO,EAAqC,kBAAkB,EAAE,iBAAiB,EAAgB,MAAM,oBAAoB,CAAC;AAK5H,cAAM,YAAa,SAAQ,OAAO;gBACpB,KAAK,EAAE,iBAAiB;IAIpC,SAAS,IAAI,MAAM,CAAC,WAAW;IAsC/B,MAAM,CAAC,YAAY,CAAC,GAAG,EAAE,MAAM,CAAC,WAAW,GAAG,YAAY;IA+B1D;;;;OAIG;IACH,SAAS,IAAI,kBAAkB,GAAG,SAAS;IAI3C;;;;OAIG;IACH,MAAM,CAAC,cAAc,CAAC,UAAU,EAAE,MAAM,CAAC,cAAc,GAAG,GAAG;CAI9D;AAED,eAAe,YAAY,CAAC"}
@@ -1,5 +1,6 @@
1
1
  import * as avs_pb from "@/grpc_codegen/avs_pb";
2
2
  import Trigger from "./interface";
3
+ import { convertInputToProtobuf, extractInputFromProtobuf } from "../../utils";
3
4
  import { TriggerType } from "@avaprotocol/types";
4
5
  // Required props for constructor: id, name, type and data: { interval }
5
6
  class BlockTrigger extends Trigger {
@@ -27,6 +28,11 @@ class BlockTrigger extends Trigger {
27
28
  const config = new avs_pb.BlockTrigger.Config();
28
29
  config.setInterval(blockData.interval);
29
30
  trigger.setConfig(config);
31
+ // Use utility function to convert input field to protobuf format
32
+ const inputValue = convertInputToProtobuf(this.input);
33
+ if (inputValue) {
34
+ trigger.setInput(inputValue);
35
+ }
30
36
  request.setBlock(trigger);
31
37
  return request;
32
38
  }
@@ -34,6 +40,7 @@ class BlockTrigger extends Trigger {
34
40
  // Convert the raw object to TriggerProps, which should keep name and id
35
41
  const obj = raw.toObject();
36
42
  let data = { interval: 0 };
43
+ let input = undefined;
37
44
  if (raw.getBlock() && raw.getBlock().hasConfig()) {
38
45
  const config = raw.getBlock().getConfig();
39
46
  if (config) {
@@ -41,11 +48,17 @@ class BlockTrigger extends Trigger {
41
48
  interval: config.getInterval() || 0
42
49
  };
43
50
  }
51
+ // Use utility function to extract input field from protobuf format
52
+ const blockTrigger = raw.getBlock();
53
+ if (blockTrigger.hasInput()) {
54
+ input = extractInputFromProtobuf(blockTrigger.getInput());
55
+ }
44
56
  }
45
57
  return new BlockTrigger({
46
58
  ...obj,
47
59
  type: TriggerType.Block,
48
60
  data: data,
61
+ input: input,
49
62
  });
50
63
  }
51
64
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"cron.d.ts","sourceRoot":"","sources":["../../../src/models/trigger/cron.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,uBAAuB,CAAC;AAChD,OAAO,OAA0B,MAAM,aAAa,CAAC;AACrD,OAAO,EAAoC,iBAAiB,EAAE,gBAAgB,EAAgB,MAAM,oBAAoB,CAAC;AAEzH,cAAM,WAAY,SAAQ,OAAO;gBACnB,KAAK,EAAE,gBAAgB;IAInC,SAAS,IAAI,MAAM,CAAC,WAAW;IAgC/B,MAAM,CAAC,YAAY,CAAC,GAAG,EAAE,MAAM,CAAC,WAAW,GAAG,WAAW;IAuBzD;;;;OAIG;IACH,SAAS,IAAI,iBAAiB,GAAG,SAAS;IAI1C;;;;;OAKG;IACH,MAAM,CAAC,cAAc,CAAC,UAAU,EAAE,MAAM,CAAC,cAAc,GAAG,GAAG;CAW9D;AAED,eAAe,WAAW,CAAC"}
1
+ {"version":3,"file":"cron.d.ts","sourceRoot":"","sources":["../../../src/models/trigger/cron.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,uBAAuB,CAAC;AAEhD,OAAO,OAAO,MAAM,aAAa,CAAC;AAClC,OAAO,EAAoC,iBAAiB,EAAE,gBAAgB,EAAgB,MAAM,oBAAoB,CAAC;AAEzH,cAAM,WAAY,SAAQ,OAAO;gBACnB,KAAK,EAAE,gBAAgB;IAInC,SAAS,IAAI,MAAM,CAAC,WAAW;IA0C/B,MAAM,CAAC,YAAY,CAAC,GAAG,EAAE,MAAM,CAAC,WAAW,GAAG,WAAW;IAiCzD;;;;OAIG;IACH,SAAS,IAAI,iBAAiB,GAAG,SAAS;IAI1C;;;;;OAKG;IACH,MAAM,CAAC,cAAc,CAAC,UAAU,EAAE,MAAM,CAAC,cAAc,GAAG,GAAG;CAW9D;AAED,eAAe,WAAW,CAAC"}
@@ -1,4 +1,5 @@
1
1
  import * as avs_pb from "@/grpc_codegen/avs_pb";
2
+ import * as google_protobuf_struct_pb from "google-protobuf/google/protobuf/struct_pb";
2
3
  import Trigger from "./interface";
3
4
  import { TriggerType } from "@avaprotocol/types";
4
5
  class CronTrigger extends Trigger {
@@ -26,6 +27,16 @@ class CronTrigger extends Trigger {
26
27
  const config = new avs_pb.CronTrigger.Config();
27
28
  config.setSchedulesList(cronData.schedules);
28
29
  trigger.setConfig(config);
30
+ // ✨ NEW: Set input data if provided
31
+ if (this.input) {
32
+ try {
33
+ const inputValue = google_protobuf_struct_pb.Value.fromJavaScript(this.input);
34
+ trigger.setInput(inputValue);
35
+ }
36
+ catch (error) {
37
+ throw new Error(`Failed to convert input data to protobuf.Value: ${error}`);
38
+ }
39
+ }
29
40
  request.setCron(trigger);
30
41
  return request;
31
42
  }
@@ -41,10 +52,19 @@ class CronTrigger extends Trigger {
41
52
  };
42
53
  }
43
54
  }
55
+ // ✨ NEW: Extract input data if present
56
+ let input;
57
+ if (raw.getCron() && raw.getCron().hasInput()) {
58
+ const inputValue = raw.getCron().getInput();
59
+ if (inputValue) {
60
+ input = inputValue.toObject();
61
+ }
62
+ }
44
63
  return new CronTrigger({
45
64
  ...obj,
46
65
  type: TriggerType.Cron,
47
66
  data: data,
67
+ input: input, // ✨ NEW: Include input data
48
68
  });
49
69
  }
50
70
  /**
@@ -8,6 +8,7 @@ declare class Trigger implements TriggerProps {
8
8
  type: TriggerType;
9
9
  data: TriggerData;
10
10
  output?: TriggerOutput;
11
+ input?: Record<string, any>;
11
12
  /**
12
13
  * Create an instance of Trigger from user inputs
13
14
  * @param props
@@ -1 +1 @@
1
- {"version":3,"file":"interface.d.ts","sourceRoot":"","sources":["../../../src/models/trigger/interface.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,uBAAuB,CAAC;AAChD,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAE/D,MAAM,MAAM,WAAW,GACnB,MAAM,CAAC,gBAAgB,CAAC,QAAQ,GAChC,MAAM,CAAC,WAAW,CAAC,QAAQ,GAC3B,MAAM,CAAC,YAAY,CAAC,QAAQ,GAC5B,MAAM,CAAC,YAAY,CAAC,QAAQ,GAC5B,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GACnB,IAAI,CAAC;AAET,MAAM,MAAM,aAAa,GACrB,MAAM,CAAC,gBAAgB,CAAC,MAAM,CAAC,QAAQ,GACvC,MAAM,CAAC,WAAW,CAAC,MAAM,CAAC,QAAQ,GAClC,MAAM,CAAC,YAAY,CAAC,MAAM,CAAC,QAAQ,GACnC,MAAM,CAAC,YAAY,CAAC,MAAM,CAAC,QAAQ,GACnC,MAAM,CAAC,aAAa,CAAC,MAAM,CAAC,QAAQ,GACpC,IAAI,CAAC;AAIT,cAAM,OAAQ,YAAW,YAAY;IACnC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,WAAW,CAAC;IAClB,IAAI,EAAE,WAAW,CAAC;IAClB,MAAM,CAAC,EAAE,aAAa,CAAC;IAEvB;;;OAGG;gBACS,KAAK,EAAE,YAAY;IAQ/B,SAAS,IAAI,MAAM,CAAC,WAAW;IAI/B,SAAS,IAAI,aAAa,GAAG,SAAS;IAItC,MAAM,IAAI,YAAY;CASvB;AAED,eAAe,OAAO,CAAC"}
1
+ {"version":3,"file":"interface.d.ts","sourceRoot":"","sources":["../../../src/models/trigger/interface.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,uBAAuB,CAAC;AAChD,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAE/D,MAAM,MAAM,WAAW,GACnB,MAAM,CAAC,gBAAgB,CAAC,QAAQ,GAChC,MAAM,CAAC,WAAW,CAAC,QAAQ,GAC3B,MAAM,CAAC,YAAY,CAAC,QAAQ,GAC5B,MAAM,CAAC,YAAY,CAAC,QAAQ,GAC5B,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GACnB,IAAI,CAAC;AAET,MAAM,MAAM,aAAa,GACrB,MAAM,CAAC,gBAAgB,CAAC,MAAM,CAAC,QAAQ,GACvC,MAAM,CAAC,WAAW,CAAC,MAAM,CAAC,QAAQ,GAClC,MAAM,CAAC,YAAY,CAAC,MAAM,CAAC,QAAQ,GACnC,MAAM,CAAC,YAAY,CAAC,MAAM,CAAC,QAAQ,GACnC,MAAM,CAAC,aAAa,CAAC,MAAM,CAAC,QAAQ,GACpC,IAAI,CAAC;AAIT,cAAM,OAAQ,YAAW,YAAY;IACnC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,WAAW,CAAC;IAClB,IAAI,EAAE,WAAW,CAAC;IAClB,MAAM,CAAC,EAAE,aAAa,CAAC;IACvB,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAE5B;;;OAGG;gBACS,KAAK,EAAE,YAAY;IAS/B,SAAS,IAAI,MAAM,CAAC,WAAW;IAI/B,SAAS,IAAI,aAAa,GAAG,SAAS;IAItC,MAAM,IAAI,YAAY;CAUvB;AAED,eAAe,OAAO,CAAC"}
@@ -9,6 +9,7 @@ class Trigger {
9
9
  this.type = props.type;
10
10
  this.data = props.data;
11
11
  this.output = props.output;
12
+ this.input = props.input;
12
13
  }
13
14
  toRequest() {
14
15
  throw new Error("Method not implemented.");
@@ -23,6 +24,7 @@ class Trigger {
23
24
  type: this.type,
24
25
  data: this.data,
25
26
  output: this.output,
27
+ input: this.input,
26
28
  };
27
29
  }
28
30
  }
@@ -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;AAClC,OAAO,EAAe,mBAAmB,EAAE,kBAAkB,EAAgB,MAAM,oBAAoB,CAAC;AAIxG,cAAM,aAAc,SAAQ,OAAO;gBACrB,KAAK,EAAE,kBAAkB;IAIrC,SAAS,IAAI,MAAM,CAAC,WAAW;IAW/B,MAAM,CAAC,YAAY,CAAC,GAAG,EAAE,MAAM,CAAC,WAAW,GAAG,aAAa;IAU3D,iBAAiB,IAAI,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,IAAI;IAI/C;;;;OAIG;IACH,SAAS,IAAI,mBAAmB,GAAG,SAAS;IAI5C;;;;OAIG;IACH,MAAM,CAAC,cAAc,CAAC,UAAU,EAAE,MAAM,CAAC,cAAc,GAAG,GAAG;CAI9D;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;AAElC,OAAO,EAAe,mBAAmB,EAAE,kBAAkB,EAAgB,MAAM,oBAAoB,CAAC;AAIxG,cAAM,aAAc,SAAQ,OAAO;gBACrB,KAAK,EAAE,kBAAkB;IAIrC,SAAS,IAAI,MAAM,CAAC,WAAW;IAkB/B,MAAM,CAAC,YAAY,CAAC,GAAG,EAAE,MAAM,CAAC,WAAW,GAAG,aAAa;IAiB3D,iBAAiB,IAAI,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,IAAI;IAI/C;;;;OAIG;IACH,SAAS,IAAI,mBAAmB,GAAG,SAAS;IAI5C;;;;OAIG;IACH,MAAM,CAAC,cAAc,CAAC,UAAU,EAAE,MAAM,CAAC,cAAc,GAAG,GAAG;CAI9D;AAED,eAAe,aAAa,CAAC"}
@@ -1,5 +1,6 @@
1
1
  import * as avs_pb from "@/grpc_codegen/avs_pb";
2
2
  import Trigger from "./interface";
3
+ import { convertInputToProtobuf, extractInputFromProtobuf } from "../../utils";
3
4
  import { TriggerType } from "@avaprotocol/types";
4
5
  class ManualTrigger extends Trigger {
5
6
  constructor(props) {
@@ -11,14 +12,26 @@ class ManualTrigger extends Trigger {
11
12
  trigger.setName(this.name);
12
13
  trigger.setType(avs_pb.TriggerType.TRIGGER_TYPE_MANUAL);
13
14
  trigger.setManual(true);
15
+ // Convert input field to protobuf format and set on top-level TaskTrigger
16
+ // Manual triggers use the top-level input field since they don't have nested structure
17
+ const inputValue = convertInputToProtobuf(this.input);
18
+ if (inputValue) {
19
+ trigger.setInput(inputValue);
20
+ }
14
21
  return trigger;
15
22
  }
16
23
  static fromResponse(raw) {
17
24
  const obj = raw.toObject();
25
+ // Extract input from top-level TaskTrigger input field for manual triggers
26
+ let input = undefined;
27
+ if (raw.hasInput()) {
28
+ input = extractInputFromProtobuf(raw.getInput());
29
+ }
18
30
  return new ManualTrigger({
19
31
  ...obj,
20
32
  type: TriggerType.Manual,
21
33
  data: null, // Manual triggers don't have data in the protobuf response
34
+ input: input,
22
35
  });
23
36
  }
24
37
  getInputVariables() {