@avaprotocol/sdk-js 2.13.0 → 2.14.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/CHANGELOG.md +14 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +58 -18
- package/dist/index.mjs +62 -19
- package/dist/models/edge.d.ts.map +1 -1
- package/dist/models/node/filter.js +2 -2
- package/dist/models/node/interface.d.ts.map +1 -1
- package/dist/models/node/interface.js +3 -3
- package/dist/models/node/loop.d.ts.map +1 -1
- package/dist/models/node/loop.js +6 -3
- package/dist/models/trigger/event.d.ts.map +1 -1
- package/dist/models/workflow.d.ts.map +1 -1
- package/dist/models/workflow.js +15 -8
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @avaprotocol/sdk-js
|
|
2
2
|
|
|
3
|
+
## 2.14.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- fix: update protobuf codegen to use inputVariable (renamed from inputNodeName) for LoopNode and FilterNode configs. Add loop ETHTransfer/GraphQL runner tests and strengthen from-field assertions.
|
|
8
|
+
- Updated dependencies
|
|
9
|
+
- @avaprotocol/types@2.10.1
|
|
10
|
+
|
|
11
|
+
## 2.14.0
|
|
12
|
+
|
|
13
|
+
### Minor Changes
|
|
14
|
+
|
|
15
|
+
- e636c25: feat: template variables for Loop/Filter nodes, settings validation, secrets fix
|
|
16
|
+
|
|
3
17
|
## 2.13.0
|
|
4
18
|
|
|
5
19
|
### Minor Changes
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,QAAQ,EAAU,MAAM,eAAe,CAAC;AAC9D,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAE9D,OAAO,QAAQ,MAAM,mBAAm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CAAC,gBAAgB;CAQzB;AAED,cAAc,uBAAuB,CAAC;AACtC,cAAc,0BAA0B,CAAC;AAEzC,OAAO,EACL,MAAM,EACN,QAAQ,EACR,IAAI,EACJ,SAAS,EACT,IAAI,EACJ,WAAW,EACX,cAAc,EACd,MAAM,EACN,SAAS,EACT,qBAAqB,GACtB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -6385,7 +6385,7 @@ var require_avs_pb = __commonJS({
|
|
|
6385
6385
|
proto.aggregator.FilterNode.Config.toObject = function(includeInstance, msg) {
|
|
6386
6386
|
var f, obj = {
|
|
6387
6387
|
expression: jspb.Message.getFieldWithDefault(msg, 1, ""),
|
|
6388
|
-
|
|
6388
|
+
inputVariable: jspb.Message.getFieldWithDefault(msg, 2, "")
|
|
6389
6389
|
};
|
|
6390
6390
|
if (includeInstance) {
|
|
6391
6391
|
obj.$jspbMessageInstance = msg;
|
|
@@ -6417,7 +6417,7 @@ var require_avs_pb = __commonJS({
|
|
|
6417
6417
|
/** @type {string} */
|
|
6418
6418
|
reader.readString()
|
|
6419
6419
|
);
|
|
6420
|
-
msg.
|
|
6420
|
+
msg.setInputVariable(value);
|
|
6421
6421
|
break;
|
|
6422
6422
|
default:
|
|
6423
6423
|
reader.skipField();
|
|
@@ -6440,7 +6440,7 @@ var require_avs_pb = __commonJS({
|
|
|
6440
6440
|
f
|
|
6441
6441
|
);
|
|
6442
6442
|
}
|
|
6443
|
-
f = message.
|
|
6443
|
+
f = message.getInputVariable();
|
|
6444
6444
|
if (f.length > 0) {
|
|
6445
6445
|
writer.writeString(
|
|
6446
6446
|
2,
|
|
@@ -6457,13 +6457,13 @@ var require_avs_pb = __commonJS({
|
|
|
6457
6457
|
proto.aggregator.FilterNode.Config.prototype.setExpression = function(value) {
|
|
6458
6458
|
return jspb.Message.setProto3StringField(this, 1, value);
|
|
6459
6459
|
};
|
|
6460
|
-
proto.aggregator.FilterNode.Config.prototype.
|
|
6460
|
+
proto.aggregator.FilterNode.Config.prototype.getInputVariable = function() {
|
|
6461
6461
|
return (
|
|
6462
6462
|
/** @type {string} */
|
|
6463
6463
|
jspb.Message.getFieldWithDefault(this, 2, "")
|
|
6464
6464
|
);
|
|
6465
6465
|
};
|
|
6466
|
-
proto.aggregator.FilterNode.Config.prototype.
|
|
6466
|
+
proto.aggregator.FilterNode.Config.prototype.setInputVariable = function(value) {
|
|
6467
6467
|
return jspb.Message.setProto3StringField(this, 2, value);
|
|
6468
6468
|
};
|
|
6469
6469
|
if (jspb.Message.GENERATE_TO_OBJECT) {
|
|
@@ -6710,10 +6710,11 @@ var require_avs_pb = __commonJS({
|
|
|
6710
6710
|
};
|
|
6711
6711
|
proto.aggregator.LoopNode.Config.toObject = function(includeInstance, msg) {
|
|
6712
6712
|
var f, obj = {
|
|
6713
|
-
|
|
6713
|
+
inputVariable: jspb.Message.getFieldWithDefault(msg, 1, ""),
|
|
6714
6714
|
iterVal: jspb.Message.getFieldWithDefault(msg, 2, ""),
|
|
6715
6715
|
iterKey: jspb.Message.getFieldWithDefault(msg, 3, ""),
|
|
6716
|
-
executionMode: jspb.Message.getFieldWithDefault(msg, 4, 0)
|
|
6716
|
+
executionMode: jspb.Message.getFieldWithDefault(msg, 4, 0),
|
|
6717
|
+
iterationTimeout: jspb.Message.getFieldWithDefault(msg, 5, 0)
|
|
6717
6718
|
};
|
|
6718
6719
|
if (includeInstance) {
|
|
6719
6720
|
obj.$jspbMessageInstance = msg;
|
|
@@ -6738,7 +6739,7 @@ var require_avs_pb = __commonJS({
|
|
|
6738
6739
|
/** @type {string} */
|
|
6739
6740
|
reader.readString()
|
|
6740
6741
|
);
|
|
6741
|
-
msg.
|
|
6742
|
+
msg.setInputVariable(value);
|
|
6742
6743
|
break;
|
|
6743
6744
|
case 2:
|
|
6744
6745
|
var value = (
|
|
@@ -6761,6 +6762,13 @@ var require_avs_pb = __commonJS({
|
|
|
6761
6762
|
);
|
|
6762
6763
|
msg.setExecutionMode(value);
|
|
6763
6764
|
break;
|
|
6765
|
+
case 5:
|
|
6766
|
+
var value = (
|
|
6767
|
+
/** @type {number} */
|
|
6768
|
+
reader.readUint32()
|
|
6769
|
+
);
|
|
6770
|
+
msg.setIterationTimeout(value);
|
|
6771
|
+
break;
|
|
6764
6772
|
default:
|
|
6765
6773
|
reader.skipField();
|
|
6766
6774
|
break;
|
|
@@ -6775,7 +6783,7 @@ var require_avs_pb = __commonJS({
|
|
|
6775
6783
|
};
|
|
6776
6784
|
proto.aggregator.LoopNode.Config.serializeBinaryToWriter = function(message, writer) {
|
|
6777
6785
|
var f = void 0;
|
|
6778
|
-
f = message.
|
|
6786
|
+
f = message.getInputVariable();
|
|
6779
6787
|
if (f.length > 0) {
|
|
6780
6788
|
writer.writeString(
|
|
6781
6789
|
1,
|
|
@@ -6803,14 +6811,21 @@ var require_avs_pb = __commonJS({
|
|
|
6803
6811
|
f
|
|
6804
6812
|
);
|
|
6805
6813
|
}
|
|
6814
|
+
f = message.getIterationTimeout();
|
|
6815
|
+
if (f !== 0) {
|
|
6816
|
+
writer.writeUint32(
|
|
6817
|
+
5,
|
|
6818
|
+
f
|
|
6819
|
+
);
|
|
6820
|
+
}
|
|
6806
6821
|
};
|
|
6807
|
-
proto.aggregator.LoopNode.Config.prototype.
|
|
6822
|
+
proto.aggregator.LoopNode.Config.prototype.getInputVariable = function() {
|
|
6808
6823
|
return (
|
|
6809
6824
|
/** @type {string} */
|
|
6810
6825
|
jspb.Message.getFieldWithDefault(this, 1, "")
|
|
6811
6826
|
);
|
|
6812
6827
|
};
|
|
6813
|
-
proto.aggregator.LoopNode.Config.prototype.
|
|
6828
|
+
proto.aggregator.LoopNode.Config.prototype.setInputVariable = function(value) {
|
|
6814
6829
|
return jspb.Message.setProto3StringField(this, 1, value);
|
|
6815
6830
|
};
|
|
6816
6831
|
proto.aggregator.LoopNode.Config.prototype.getIterVal = function() {
|
|
@@ -6840,6 +6855,15 @@ var require_avs_pb = __commonJS({
|
|
|
6840
6855
|
proto.aggregator.LoopNode.Config.prototype.setExecutionMode = function(value) {
|
|
6841
6856
|
return jspb.Message.setProto3EnumField(this, 4, value);
|
|
6842
6857
|
};
|
|
6858
|
+
proto.aggregator.LoopNode.Config.prototype.getIterationTimeout = function() {
|
|
6859
|
+
return (
|
|
6860
|
+
/** @type {number} */
|
|
6861
|
+
jspb.Message.getFieldWithDefault(this, 5, 0)
|
|
6862
|
+
);
|
|
6863
|
+
};
|
|
6864
|
+
proto.aggregator.LoopNode.Config.prototype.setIterationTimeout = function(value) {
|
|
6865
|
+
return jspb.Message.setProto3IntField(this, 5, value);
|
|
6866
|
+
};
|
|
6843
6867
|
if (jspb.Message.GENERATE_TO_OBJECT) {
|
|
6844
6868
|
proto.aggregator.LoopNode.Output.prototype.toObject = function(opt_includeInstance) {
|
|
6845
6869
|
return proto.aggregator.LoopNode.Output.toObject(opt_includeInstance, this);
|
|
@@ -20259,7 +20283,7 @@ var FilterNode2 = class _FilterNode extends Node {
|
|
|
20259
20283
|
const node = new avs_pb16.FilterNode();
|
|
20260
20284
|
const config = new avs_pb16.FilterNode.Config();
|
|
20261
20285
|
config.setExpression(this.data.expression);
|
|
20262
|
-
config.
|
|
20286
|
+
config.setInputVariable(this.data.inputVariable || "");
|
|
20263
20287
|
node.setConfig(config);
|
|
20264
20288
|
request.setFilter(node);
|
|
20265
20289
|
return request;
|
|
@@ -20373,11 +20397,12 @@ var LoopNode2 = class _LoopNode extends Node {
|
|
|
20373
20397
|
node.setType(avs_pb17.NodeType.NODE_TYPE_LOOP);
|
|
20374
20398
|
const data = this.data;
|
|
20375
20399
|
const config = new avs_pb17.LoopNode.Config();
|
|
20376
|
-
config.
|
|
20400
|
+
config.setInputVariable(data.inputVariable || "");
|
|
20377
20401
|
config.setIterVal(data.iterVal || "");
|
|
20378
20402
|
config.setIterKey(data.iterKey || "");
|
|
20379
20403
|
const executionMode = this.mapExecutionModeToProtobuf(data.executionMode);
|
|
20380
20404
|
config.setExecutionMode(executionMode);
|
|
20405
|
+
config.setIterationTimeout(data.iterationTimeout);
|
|
20381
20406
|
loopNode.setConfig(config);
|
|
20382
20407
|
if (data.runner) {
|
|
20383
20408
|
this.setRunnerOnProtobuf(loopNode, data.runner);
|
|
@@ -20436,6 +20461,7 @@ var LoopNode2 = class _LoopNode extends Node {
|
|
|
20436
20461
|
loopNode.setContractRead(contractRead);
|
|
20437
20462
|
break;
|
|
20438
20463
|
}
|
|
20464
|
+
case "graphqlQuery":
|
|
20439
20465
|
case "graphqlDataQuery": {
|
|
20440
20466
|
const gqlConfig = config;
|
|
20441
20467
|
const graphqlQuery = graphqlQuery_default.createProtobufNode({
|
|
@@ -20816,11 +20842,25 @@ var Workflow = class _Workflow {
|
|
|
20816
20842
|
request.setStartAt(this.startAt);
|
|
20817
20843
|
request.setExpiredAt(this.expiredAt);
|
|
20818
20844
|
request.setMaxExecution(this.maxExecution);
|
|
20819
|
-
if (this.inputVariables) {
|
|
20820
|
-
|
|
20821
|
-
|
|
20822
|
-
|
|
20823
|
-
|
|
20845
|
+
if (!this.inputVariables?.settings) {
|
|
20846
|
+
throw new Error(
|
|
20847
|
+
"inputVariables.settings is required. Must include at least { name, runner }."
|
|
20848
|
+
);
|
|
20849
|
+
}
|
|
20850
|
+
const settings = this.inputVariables.settings;
|
|
20851
|
+
if (!settings.name || typeof settings.name !== "string" || !settings.name.trim()) {
|
|
20852
|
+
throw new Error(
|
|
20853
|
+
"inputVariables.settings.name is required and must be a non-empty string."
|
|
20854
|
+
);
|
|
20855
|
+
}
|
|
20856
|
+
if (!settings.runner || typeof settings.runner !== "string" || !settings.runner.trim()) {
|
|
20857
|
+
throw new Error(
|
|
20858
|
+
"inputVariables.settings.runner is required and must be a non-empty string (smart wallet address)."
|
|
20859
|
+
);
|
|
20860
|
+
}
|
|
20861
|
+
const inputVarsMap = request.getInputVariablesMap();
|
|
20862
|
+
for (const [key, value] of Object.entries(this.inputVariables)) {
|
|
20863
|
+
inputVarsMap.set(key, convertJSValueToProtobuf(value));
|
|
20824
20864
|
}
|
|
20825
20865
|
return request;
|
|
20826
20866
|
}
|
package/dist/index.mjs
CHANGED
|
@@ -6385,7 +6385,7 @@ var require_avs_pb = __commonJS({
|
|
|
6385
6385
|
proto.aggregator.FilterNode.Config.toObject = function(includeInstance, msg) {
|
|
6386
6386
|
var f, obj = {
|
|
6387
6387
|
expression: jspb.Message.getFieldWithDefault(msg, 1, ""),
|
|
6388
|
-
|
|
6388
|
+
inputVariable: jspb.Message.getFieldWithDefault(msg, 2, "")
|
|
6389
6389
|
};
|
|
6390
6390
|
if (includeInstance) {
|
|
6391
6391
|
obj.$jspbMessageInstance = msg;
|
|
@@ -6417,7 +6417,7 @@ var require_avs_pb = __commonJS({
|
|
|
6417
6417
|
/** @type {string} */
|
|
6418
6418
|
reader.readString()
|
|
6419
6419
|
);
|
|
6420
|
-
msg.
|
|
6420
|
+
msg.setInputVariable(value);
|
|
6421
6421
|
break;
|
|
6422
6422
|
default:
|
|
6423
6423
|
reader.skipField();
|
|
@@ -6440,7 +6440,7 @@ var require_avs_pb = __commonJS({
|
|
|
6440
6440
|
f
|
|
6441
6441
|
);
|
|
6442
6442
|
}
|
|
6443
|
-
f = message.
|
|
6443
|
+
f = message.getInputVariable();
|
|
6444
6444
|
if (f.length > 0) {
|
|
6445
6445
|
writer.writeString(
|
|
6446
6446
|
2,
|
|
@@ -6457,13 +6457,13 @@ var require_avs_pb = __commonJS({
|
|
|
6457
6457
|
proto.aggregator.FilterNode.Config.prototype.setExpression = function(value) {
|
|
6458
6458
|
return jspb.Message.setProto3StringField(this, 1, value);
|
|
6459
6459
|
};
|
|
6460
|
-
proto.aggregator.FilterNode.Config.prototype.
|
|
6460
|
+
proto.aggregator.FilterNode.Config.prototype.getInputVariable = function() {
|
|
6461
6461
|
return (
|
|
6462
6462
|
/** @type {string} */
|
|
6463
6463
|
jspb.Message.getFieldWithDefault(this, 2, "")
|
|
6464
6464
|
);
|
|
6465
6465
|
};
|
|
6466
|
-
proto.aggregator.FilterNode.Config.prototype.
|
|
6466
|
+
proto.aggregator.FilterNode.Config.prototype.setInputVariable = function(value) {
|
|
6467
6467
|
return jspb.Message.setProto3StringField(this, 2, value);
|
|
6468
6468
|
};
|
|
6469
6469
|
if (jspb.Message.GENERATE_TO_OBJECT) {
|
|
@@ -6710,10 +6710,11 @@ var require_avs_pb = __commonJS({
|
|
|
6710
6710
|
};
|
|
6711
6711
|
proto.aggregator.LoopNode.Config.toObject = function(includeInstance, msg) {
|
|
6712
6712
|
var f, obj = {
|
|
6713
|
-
|
|
6713
|
+
inputVariable: jspb.Message.getFieldWithDefault(msg, 1, ""),
|
|
6714
6714
|
iterVal: jspb.Message.getFieldWithDefault(msg, 2, ""),
|
|
6715
6715
|
iterKey: jspb.Message.getFieldWithDefault(msg, 3, ""),
|
|
6716
|
-
executionMode: jspb.Message.getFieldWithDefault(msg, 4, 0)
|
|
6716
|
+
executionMode: jspb.Message.getFieldWithDefault(msg, 4, 0),
|
|
6717
|
+
iterationTimeout: jspb.Message.getFieldWithDefault(msg, 5, 0)
|
|
6717
6718
|
};
|
|
6718
6719
|
if (includeInstance) {
|
|
6719
6720
|
obj.$jspbMessageInstance = msg;
|
|
@@ -6738,7 +6739,7 @@ var require_avs_pb = __commonJS({
|
|
|
6738
6739
|
/** @type {string} */
|
|
6739
6740
|
reader.readString()
|
|
6740
6741
|
);
|
|
6741
|
-
msg.
|
|
6742
|
+
msg.setInputVariable(value);
|
|
6742
6743
|
break;
|
|
6743
6744
|
case 2:
|
|
6744
6745
|
var value = (
|
|
@@ -6761,6 +6762,13 @@ var require_avs_pb = __commonJS({
|
|
|
6761
6762
|
);
|
|
6762
6763
|
msg.setExecutionMode(value);
|
|
6763
6764
|
break;
|
|
6765
|
+
case 5:
|
|
6766
|
+
var value = (
|
|
6767
|
+
/** @type {number} */
|
|
6768
|
+
reader.readUint32()
|
|
6769
|
+
);
|
|
6770
|
+
msg.setIterationTimeout(value);
|
|
6771
|
+
break;
|
|
6764
6772
|
default:
|
|
6765
6773
|
reader.skipField();
|
|
6766
6774
|
break;
|
|
@@ -6775,7 +6783,7 @@ var require_avs_pb = __commonJS({
|
|
|
6775
6783
|
};
|
|
6776
6784
|
proto.aggregator.LoopNode.Config.serializeBinaryToWriter = function(message, writer) {
|
|
6777
6785
|
var f = void 0;
|
|
6778
|
-
f = message.
|
|
6786
|
+
f = message.getInputVariable();
|
|
6779
6787
|
if (f.length > 0) {
|
|
6780
6788
|
writer.writeString(
|
|
6781
6789
|
1,
|
|
@@ -6803,14 +6811,21 @@ var require_avs_pb = __commonJS({
|
|
|
6803
6811
|
f
|
|
6804
6812
|
);
|
|
6805
6813
|
}
|
|
6814
|
+
f = message.getIterationTimeout();
|
|
6815
|
+
if (f !== 0) {
|
|
6816
|
+
writer.writeUint32(
|
|
6817
|
+
5,
|
|
6818
|
+
f
|
|
6819
|
+
);
|
|
6820
|
+
}
|
|
6806
6821
|
};
|
|
6807
|
-
proto.aggregator.LoopNode.Config.prototype.
|
|
6822
|
+
proto.aggregator.LoopNode.Config.prototype.getInputVariable = function() {
|
|
6808
6823
|
return (
|
|
6809
6824
|
/** @type {string} */
|
|
6810
6825
|
jspb.Message.getFieldWithDefault(this, 1, "")
|
|
6811
6826
|
);
|
|
6812
6827
|
};
|
|
6813
|
-
proto.aggregator.LoopNode.Config.prototype.
|
|
6828
|
+
proto.aggregator.LoopNode.Config.prototype.setInputVariable = function(value) {
|
|
6814
6829
|
return jspb.Message.setProto3StringField(this, 1, value);
|
|
6815
6830
|
};
|
|
6816
6831
|
proto.aggregator.LoopNode.Config.prototype.getIterVal = function() {
|
|
@@ -6840,6 +6855,15 @@ var require_avs_pb = __commonJS({
|
|
|
6840
6855
|
proto.aggregator.LoopNode.Config.prototype.setExecutionMode = function(value) {
|
|
6841
6856
|
return jspb.Message.setProto3EnumField(this, 4, value);
|
|
6842
6857
|
};
|
|
6858
|
+
proto.aggregator.LoopNode.Config.prototype.getIterationTimeout = function() {
|
|
6859
|
+
return (
|
|
6860
|
+
/** @type {number} */
|
|
6861
|
+
jspb.Message.getFieldWithDefault(this, 5, 0)
|
|
6862
|
+
);
|
|
6863
|
+
};
|
|
6864
|
+
proto.aggregator.LoopNode.Config.prototype.setIterationTimeout = function(value) {
|
|
6865
|
+
return jspb.Message.setProto3IntField(this, 5, value);
|
|
6866
|
+
};
|
|
6843
6867
|
if (jspb.Message.GENERATE_TO_OBJECT) {
|
|
6844
6868
|
proto.aggregator.LoopNode.Output.prototype.toObject = function(opt_includeInstance) {
|
|
6845
6869
|
return proto.aggregator.LoopNode.Output.toObject(opt_includeInstance, this);
|
|
@@ -19686,7 +19710,10 @@ import _2 from "lodash";
|
|
|
19686
19710
|
|
|
19687
19711
|
// src/models/node/interface.ts
|
|
19688
19712
|
var avs_pb8 = __toESM(require_avs_pb());
|
|
19689
|
-
import {
|
|
19713
|
+
import {
|
|
19714
|
+
NodeType as NodeType2,
|
|
19715
|
+
NodeTypeGoConverter
|
|
19716
|
+
} from "@avaprotocol/types";
|
|
19690
19717
|
import _ from "lodash";
|
|
19691
19718
|
var Node = class {
|
|
19692
19719
|
constructor(props) {
|
|
@@ -20263,7 +20290,7 @@ var FilterNode2 = class _FilterNode extends Node {
|
|
|
20263
20290
|
const node = new avs_pb16.FilterNode();
|
|
20264
20291
|
const config = new avs_pb16.FilterNode.Config();
|
|
20265
20292
|
config.setExpression(this.data.expression);
|
|
20266
|
-
config.
|
|
20293
|
+
config.setInputVariable(this.data.inputVariable || "");
|
|
20267
20294
|
node.setConfig(config);
|
|
20268
20295
|
request.setFilter(node);
|
|
20269
20296
|
return request;
|
|
@@ -20380,11 +20407,12 @@ var LoopNode2 = class _LoopNode extends Node {
|
|
|
20380
20407
|
node.setType(avs_pb17.NodeType.NODE_TYPE_LOOP);
|
|
20381
20408
|
const data = this.data;
|
|
20382
20409
|
const config = new avs_pb17.LoopNode.Config();
|
|
20383
|
-
config.
|
|
20410
|
+
config.setInputVariable(data.inputVariable || "");
|
|
20384
20411
|
config.setIterVal(data.iterVal || "");
|
|
20385
20412
|
config.setIterKey(data.iterKey || "");
|
|
20386
20413
|
const executionMode = this.mapExecutionModeToProtobuf(data.executionMode);
|
|
20387
20414
|
config.setExecutionMode(executionMode);
|
|
20415
|
+
config.setIterationTimeout(data.iterationTimeout);
|
|
20388
20416
|
loopNode.setConfig(config);
|
|
20389
20417
|
if (data.runner) {
|
|
20390
20418
|
this.setRunnerOnProtobuf(loopNode, data.runner);
|
|
@@ -20443,6 +20471,7 @@ var LoopNode2 = class _LoopNode extends Node {
|
|
|
20443
20471
|
loopNode.setContractRead(contractRead);
|
|
20444
20472
|
break;
|
|
20445
20473
|
}
|
|
20474
|
+
case "graphqlQuery":
|
|
20446
20475
|
case "graphqlDataQuery": {
|
|
20447
20476
|
const gqlConfig = config;
|
|
20448
20477
|
const graphqlQuery = graphqlQuery_default.createProtobufNode({
|
|
@@ -20827,11 +20856,25 @@ var Workflow = class _Workflow {
|
|
|
20827
20856
|
request.setStartAt(this.startAt);
|
|
20828
20857
|
request.setExpiredAt(this.expiredAt);
|
|
20829
20858
|
request.setMaxExecution(this.maxExecution);
|
|
20830
|
-
if (this.inputVariables) {
|
|
20831
|
-
|
|
20832
|
-
|
|
20833
|
-
|
|
20834
|
-
|
|
20859
|
+
if (!this.inputVariables?.settings) {
|
|
20860
|
+
throw new Error(
|
|
20861
|
+
"inputVariables.settings is required. Must include at least { name, runner }."
|
|
20862
|
+
);
|
|
20863
|
+
}
|
|
20864
|
+
const settings = this.inputVariables.settings;
|
|
20865
|
+
if (!settings.name || typeof settings.name !== "string" || !settings.name.trim()) {
|
|
20866
|
+
throw new Error(
|
|
20867
|
+
"inputVariables.settings.name is required and must be a non-empty string."
|
|
20868
|
+
);
|
|
20869
|
+
}
|
|
20870
|
+
if (!settings.runner || typeof settings.runner !== "string" || !settings.runner.trim()) {
|
|
20871
|
+
throw new Error(
|
|
20872
|
+
"inputVariables.settings.runner is required and must be a non-empty string (smart wallet address)."
|
|
20873
|
+
);
|
|
20874
|
+
}
|
|
20875
|
+
const inputVarsMap = request.getInputVariablesMap();
|
|
20876
|
+
for (const [key, value] of Object.entries(this.inputVariables)) {
|
|
20877
|
+
inputVarsMap.set(key, convertJSValueToProtobuf(value));
|
|
20835
20878
|
}
|
|
20836
20879
|
return request;
|
|
20837
20880
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"edge.d.ts","sourceRoot":"","sources":["../../src/models/edge.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"edge.d.ts","sourceRoot":"","sources":["../../src/models/edge.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,uBAAuB,CAAC;AAChD,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAE/C,cAAM,IAAK,YAAW,SAAS;IAC7B,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;gBAEH,IAAI,EAAE,SAAS;IAM3B,MAAM,CAAC,YAAY,CAAC,IAAI,EAAE,MAAM,CAAC,QAAQ,GAAG,IAAI;IAIhD,SAAS,IAAI,MAAM,CAAC,QAAQ;CAQ7B;AAED,eAAe,IAAI,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
|
-
// Required props for constructor: id, name, type and data: { expression,
|
|
4
|
+
// Required props for constructor: id, name, type and data: { expression, inputVariable }
|
|
5
5
|
class FilterNode extends Node {
|
|
6
6
|
constructor(props) {
|
|
7
7
|
super({ ...props, type: NodeType.Filter, data: props.data });
|
|
@@ -23,7 +23,7 @@ class FilterNode extends Node {
|
|
|
23
23
|
const node = new avs_pb.FilterNode();
|
|
24
24
|
const config = new avs_pb.FilterNode.Config();
|
|
25
25
|
config.setExpression(this.data.expression);
|
|
26
|
-
config.
|
|
26
|
+
config.setInputVariable(this.data.inputVariable || "");
|
|
27
27
|
node.setConfig(config);
|
|
28
28
|
request.setFilter(node);
|
|
29
29
|
return request;
|
|
@@ -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;
|
|
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,EACL,QAAQ,EAER,SAAS,EACT,QAAQ,EACT,MAAM,oBAAoB,CAAC;AAI5B,wBAAgB,sBAAsB,CACpC,MAAM,EAAE,MAAM,CAAC,QAAQ,CAAC,YAAY,GACnC,QAAQ,CAgBV;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;qCAMnC,MAAM,aACT,IAAI,CAAC,iBAAiB,EAAE,MAAM,CAAC,KACzC,iBAAiB;CAMrB,CAAC;AAEF,MAAM,CAAC,OAAO,CAAC,QAAQ,OAAO,IAAK,YAAW,SAAS;IACrD,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;IAW5B,MAAM,CAAC,YAAY,CAAC,GAAG,EAAE,MAAM,CAAC,QAAQ,GAAG,IAAI;CAQhD"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as avs_pb from "@/grpc_codegen/avs_pb";
|
|
2
|
-
import { NodeType, NodeTypeGoConverter } from "@avaprotocol/types";
|
|
2
|
+
import { NodeType, NodeTypeGoConverter, } from "@avaprotocol/types";
|
|
3
3
|
import _ from "lodash";
|
|
4
4
|
// Function to convert TaskStatus to string
|
|
5
5
|
export function covertNodeTypeToString(status) {
|
|
@@ -28,9 +28,9 @@ export const ProtobufNodePropsUtils = {
|
|
|
28
28
|
fromGoStringType: (goStringType, baseProps) => {
|
|
29
29
|
return {
|
|
30
30
|
...baseProps,
|
|
31
|
-
type: NodeTypeGoConverter.fromGoString(goStringType)
|
|
31
|
+
type: NodeTypeGoConverter.fromGoString(goStringType),
|
|
32
32
|
};
|
|
33
|
-
}
|
|
33
|
+
},
|
|
34
34
|
};
|
|
35
35
|
export default class Node {
|
|
36
36
|
constructor(props) {
|
|
@@ -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;AAO/B,OAAO,EAGL,aAAa,EAKd,MAAM,oBAAoB,CAAC;AAG5B,cAAM,QAAS,SAAQ,IAAI;gBACb,KAAK,EAAE,aAAa;IAIhC,MAAM,CAAC,YAAY,CAAC,GAAG,EAAE,MAAM,CAAC,QAAQ,GAAG,QAAQ;
|
|
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;AAO/B,OAAO,EAGL,aAAa,EAKd,MAAM,oBAAoB,CAAC;AAG5B,cAAM,QAAS,SAAQ,IAAI;gBACb,KAAK,EAAE,aAAa;IAIhC,MAAM,CAAC,YAAY,CAAC,GAAG,EAAE,MAAM,CAAC,QAAQ,GAAG,QAAQ;IA4BnD,OAAO,CAAC,MAAM,CAAC,yBAAyB;IAsBxC,OAAO,CAAC,MAAM,CAAC,4BAA4B;IAe3C,OAAO,CAAC,0BAA0B;IA4BlC,SAAS,IAAI,MAAM,CAAC,QAAQ;IAoC5B,OAAO,CAAC,mBAAmB;IAuH3B,MAAM,CAAC,cAAc,CAAC,UAAU,EAAE,MAAM,CAAC,qBAAqB,GAAG,OAAO;CAkCzE;AAED,eAAe,QAAQ,CAAC"}
|
package/dist/models/node/loop.js
CHANGED
|
@@ -21,8 +21,6 @@ class LoopNode extends Node {
|
|
|
21
21
|
// Get the config data directly as flat structure
|
|
22
22
|
const configData = loopNode.getConfig()?.toObject();
|
|
23
23
|
const loopNodeData = loopNode.toObject();
|
|
24
|
-
// Since LoopNodeData is now Config.AsObject, we need to merge the config properties
|
|
25
|
-
// with the runner data from the protobuf structure
|
|
26
24
|
const data = {
|
|
27
25
|
...configData,
|
|
28
26
|
// Extract runner data from the oneof runner field
|
|
@@ -100,12 +98,16 @@ class LoopNode extends Node {
|
|
|
100
98
|
const data = this.data;
|
|
101
99
|
// Set the loop config from the flat data structure
|
|
102
100
|
const config = new avs_pb.LoopNode.Config();
|
|
103
|
-
config.
|
|
101
|
+
config.setInputVariable(data.inputVariable || "");
|
|
104
102
|
config.setIterVal(data.iterVal || "");
|
|
105
103
|
config.setIterKey(data.iterKey || "");
|
|
106
104
|
// Set execution mode - map ExecutionMode enum to protobuf enum
|
|
107
105
|
const executionMode = this.mapExecutionModeToProtobuf(data.executionMode);
|
|
108
106
|
config.setExecutionMode(executionMode);
|
|
107
|
+
// Per-iteration timeout in seconds. The server requires this field and will
|
|
108
|
+
// reject the request if it is 0 or missing. No default is applied here —
|
|
109
|
+
// the caller must explicitly provide iterationTimeout in their node config.
|
|
110
|
+
config.setIterationTimeout(data.iterationTimeout);
|
|
109
111
|
loopNode.setConfig(config);
|
|
110
112
|
// Handle runner - check the runner field and set the appropriate oneof field
|
|
111
113
|
if (data.runner) {
|
|
@@ -167,6 +169,7 @@ class LoopNode extends Node {
|
|
|
167
169
|
loopNode.setContractRead(contractRead);
|
|
168
170
|
break;
|
|
169
171
|
}
|
|
172
|
+
case "graphqlQuery":
|
|
170
173
|
case "graphqlDataQuery": {
|
|
171
174
|
const gqlConfig = config;
|
|
172
175
|
const graphqlQuery = GraphQLQueryNode.createProtobufNode({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"event.d.ts","sourceRoot":"","sources":["../../../src/models/trigger/event.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"event.d.ts","sourceRoot":"","sources":["../../../src/models/trigger/event.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,uBAAuB,CAAC;AAEhD,OAAO,OAAO,MAAM,aAAa,CAAC;AAClC,OAAO,EAGL,kBAAkB,EAClB,iBAAiB,EAIlB,MAAM,oBAAoB,CAAC;AA0C5B,cAAM,YAAa,SAAQ,OAAO;gBACpB,KAAK,EAAE,iBAAiB;IAIpC,SAAS,IAAI,MAAM,CAAC,WAAW;IAqH/B,MAAM,CAAC,YAAY,CAAC,GAAG,EAAE,MAAM,CAAC,WAAW,GAAG,YAAY;IA0F1D;;;;OAIG;IACH,SAAS,IAAI,kBAAkB,GAAG,SAAS;IAI3C;;;;OAIG;IACH,MAAM,CAAC,cAAc,CAAC,UAAU,EAAE,MAAM,CAAC,cAAc,GAAG,GAAG;CA0B9D;AAED,eAAe,YAAY,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workflow.d.ts","sourceRoot":"","sources":["../../src/models/workflow.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,MAAM,uBAAuB,CAAC;AAChD,OAAO,IAAI,MAAM,kBAAkB,CAAC;AACpC,OAAO,IAAI,MAAM,QAAQ,CAAC;AAC1B,OAAO,OAAO,MAAM,qBAAqB,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AC;AAG1C,eAAO,MAAM,gBAAgB,KAAK,CAAC;AACnC,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAInF,wBAAgB,qBAAqB,CACnC,MAAM,EAAE,MAAM,CAAC,UAAU,GACxB,cAAc,CAgBhB;AAED,cAAM,QAAS,YAAW,aAAa;IACrC,kBAAkB,EAAE,MAAM,CAAC;IAC3B,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,IAAI,EAAE,CAAC;IACd,KAAK,EAAE,IAAI,EAAE,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,MAAM,CAAC;IAGrB,IAAI,EAAE,MAAM,CAAC;IAGb,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,MAAM,CAAC,EAAE,cAAc,CAAC;IACxB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,cAAc,CAAC,EAAE,cAAc,CAAC;IAEhC;;;OAGG;gBACS,KAAK,EAAE,aAAa;IA2BhC;;;;OAIG;IACH,MAAM,CAAC,YAAY,CAAC,GAAG,EAAE,MAAM,CAAC,IAAI,GAAG,QAAQ;IA4C/C;;;OAGG;IACH,MAAM,CAAC,gBAAgB,CAAC,GAAG,EAAE,MAAM,CAAC,IAAI,GAAG,QAAQ;IAmCnD,SAAS,IAAI,MAAM,CAAC,aAAa;IAsEjC;;;OAGG;IACH,MAAM,IAAI,aAAa;CAmBxB;AAED,eAAe,QAAQ,CAAC"}
|
package/dist/models/workflow.js
CHANGED
|
@@ -169,14 +169,21 @@ class Workflow {
|
|
|
169
169
|
request.setStartAt(this.startAt);
|
|
170
170
|
request.setExpiredAt(this.expiredAt);
|
|
171
171
|
request.setMaxExecution(this.maxExecution);
|
|
172
|
-
//
|
|
173
|
-
//
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
172
|
+
// Validate inputVariables.settings before sending to aggregator.
|
|
173
|
+
// The aggregator requires settings.name and settings.runner.
|
|
174
|
+
if (!this.inputVariables?.settings) {
|
|
175
|
+
throw new Error("inputVariables.settings is required. Must include at least { name, runner }.");
|
|
176
|
+
}
|
|
177
|
+
const settings = this.inputVariables.settings;
|
|
178
|
+
if (!settings.name || typeof settings.name !== "string" || !settings.name.trim()) {
|
|
179
|
+
throw new Error("inputVariables.settings.name is required and must be a non-empty string.");
|
|
180
|
+
}
|
|
181
|
+
if (!settings.runner || typeof settings.runner !== "string" || !settings.runner.trim()) {
|
|
182
|
+
throw new Error("inputVariables.settings.runner is required and must be a non-empty string (smart wallet address).");
|
|
183
|
+
}
|
|
184
|
+
const inputVarsMap = request.getInputVariablesMap();
|
|
185
|
+
for (const [key, value] of Object.entries(this.inputVariables)) {
|
|
186
|
+
inputVarsMap.set(key, convertJSValueToProtobuf(value));
|
|
180
187
|
}
|
|
181
188
|
return request;
|
|
182
189
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@avaprotocol/sdk-js",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.14.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",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"prepare": "node ../../scripts/prepare-package.js"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@avaprotocol/types": "2.10.
|
|
34
|
+
"@avaprotocol/types": "2.10.1",
|
|
35
35
|
"@grpc/grpc-js": "^1.11.3",
|
|
36
36
|
"@grpc/proto-loader": "^0.7.13",
|
|
37
37
|
"dotenv": "^16.4.5",
|