@avaprotocol/sdk-js 2.10.4 → 2.11.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 +19 -0
- package/dist/index.d.ts +7 -6
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +258 -104
- package/dist/index.mjs +258 -104
- package/dist/models/trigger/event.d.ts.map +1 -1
- package/dist/models/trigger/event.js +13 -1
- package/dist/models/workflow.d.ts.map +1 -1
- package/dist/models/workflow.js +15 -8
- package/package.json +2 -2
package/dist/index.mjs
CHANGED
|
@@ -64,7 +64,6 @@ var require_avs_pb = __commonJS({
|
|
|
64
64
|
goog.exportSymbol("proto.aggregator.BranchNode.Condition", null, global);
|
|
65
65
|
goog.exportSymbol("proto.aggregator.BranchNode.Config", null, global);
|
|
66
66
|
goog.exportSymbol("proto.aggregator.BranchNode.Output", null, global);
|
|
67
|
-
goog.exportSymbol("proto.aggregator.CancelTaskResp", null, global);
|
|
68
67
|
goog.exportSymbol("proto.aggregator.ContractReadNode", null, global);
|
|
69
68
|
goog.exportSymbol("proto.aggregator.ContractReadNode.Config", null, global);
|
|
70
69
|
goog.exportSymbol("proto.aggregator.ContractReadNode.MethodCall", null, global);
|
|
@@ -166,6 +165,8 @@ var require_avs_pb = __commonJS({
|
|
|
166
165
|
goog.exportSymbol("proto.aggregator.RunTriggerResp", null, global);
|
|
167
166
|
goog.exportSymbol("proto.aggregator.RunTriggerResp.OutputDataCase", null, global);
|
|
168
167
|
goog.exportSymbol("proto.aggregator.Secret", null, global);
|
|
168
|
+
goog.exportSymbol("proto.aggregator.SetTaskEnabledReq", null, global);
|
|
169
|
+
goog.exportSymbol("proto.aggregator.SetTaskEnabledResp", null, global);
|
|
169
170
|
goog.exportSymbol("proto.aggregator.SetWalletReq", null, global);
|
|
170
171
|
goog.exportSymbol("proto.aggregator.SimulateTaskReq", null, global);
|
|
171
172
|
goog.exportSymbol("proto.aggregator.SmartWallet", null, global);
|
|
@@ -864,12 +865,19 @@ var require_avs_pb = __commonJS({
|
|
|
864
865
|
if (goog.DEBUG && !COMPILED) {
|
|
865
866
|
proto.aggregator.DeleteTaskResp.displayName = "proto.aggregator.DeleteTaskResp";
|
|
866
867
|
}
|
|
867
|
-
proto.aggregator.
|
|
868
|
+
proto.aggregator.SetTaskEnabledReq = function(opt_data) {
|
|
868
869
|
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
|
|
869
870
|
};
|
|
870
|
-
goog.inherits(proto.aggregator.
|
|
871
|
+
goog.inherits(proto.aggregator.SetTaskEnabledReq, jspb.Message);
|
|
871
872
|
if (goog.DEBUG && !COMPILED) {
|
|
872
|
-
proto.aggregator.
|
|
873
|
+
proto.aggregator.SetTaskEnabledReq.displayName = "proto.aggregator.SetTaskEnabledReq";
|
|
874
|
+
}
|
|
875
|
+
proto.aggregator.SetTaskEnabledResp = function(opt_data) {
|
|
876
|
+
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
|
|
877
|
+
};
|
|
878
|
+
goog.inherits(proto.aggregator.SetTaskEnabledResp, jspb.Message);
|
|
879
|
+
if (goog.DEBUG && !COMPILED) {
|
|
880
|
+
proto.aggregator.SetTaskEnabledResp.displayName = "proto.aggregator.SetTaskEnabledResp";
|
|
873
881
|
}
|
|
874
882
|
proto.aggregator.GetWorkflowCountReq = function(opt_data) {
|
|
875
883
|
jspb.Message.initialize(this, opt_data, 0, -1, proto.aggregator.GetWorkflowCountReq.repeatedFields_, null);
|
|
@@ -2466,7 +2474,8 @@ var require_avs_pb = __commonJS({
|
|
|
2466
2474
|
msg.getQueriesList(),
|
|
2467
2475
|
proto.aggregator.EventTrigger.Query.toObject,
|
|
2468
2476
|
includeInstance
|
|
2469
|
-
)
|
|
2477
|
+
),
|
|
2478
|
+
cooldownSeconds: jspb.Message.getFieldWithDefault(msg, 2, 0)
|
|
2470
2479
|
};
|
|
2471
2480
|
if (includeInstance) {
|
|
2472
2481
|
obj.$jspbMessageInstance = msg;
|
|
@@ -2491,6 +2500,13 @@ var require_avs_pb = __commonJS({
|
|
|
2491
2500
|
reader.readMessage(value, proto.aggregator.EventTrigger.Query.deserializeBinaryFromReader);
|
|
2492
2501
|
msg.addQueries(value);
|
|
2493
2502
|
break;
|
|
2503
|
+
case 2:
|
|
2504
|
+
var value = (
|
|
2505
|
+
/** @type {number} */
|
|
2506
|
+
reader.readUint32()
|
|
2507
|
+
);
|
|
2508
|
+
msg.setCooldownSeconds(value);
|
|
2509
|
+
break;
|
|
2494
2510
|
default:
|
|
2495
2511
|
reader.skipField();
|
|
2496
2512
|
break;
|
|
@@ -2513,6 +2529,14 @@ var require_avs_pb = __commonJS({
|
|
|
2513
2529
|
proto.aggregator.EventTrigger.Query.serializeBinaryToWriter
|
|
2514
2530
|
);
|
|
2515
2531
|
}
|
|
2532
|
+
f = /** @type {number} */
|
|
2533
|
+
jspb.Message.getField(message, 2);
|
|
2534
|
+
if (f != null) {
|
|
2535
|
+
writer.writeUint32(
|
|
2536
|
+
2,
|
|
2537
|
+
f
|
|
2538
|
+
);
|
|
2539
|
+
}
|
|
2516
2540
|
};
|
|
2517
2541
|
proto.aggregator.EventTrigger.Config.prototype.getQueriesList = function() {
|
|
2518
2542
|
return (
|
|
@@ -2529,6 +2553,21 @@ var require_avs_pb = __commonJS({
|
|
|
2529
2553
|
proto.aggregator.EventTrigger.Config.prototype.clearQueriesList = function() {
|
|
2530
2554
|
return this.setQueriesList([]);
|
|
2531
2555
|
};
|
|
2556
|
+
proto.aggregator.EventTrigger.Config.prototype.getCooldownSeconds = function() {
|
|
2557
|
+
return (
|
|
2558
|
+
/** @type {number} */
|
|
2559
|
+
jspb.Message.getFieldWithDefault(this, 2, 0)
|
|
2560
|
+
);
|
|
2561
|
+
};
|
|
2562
|
+
proto.aggregator.EventTrigger.Config.prototype.setCooldownSeconds = function(value) {
|
|
2563
|
+
return jspb.Message.setField(this, 2, value);
|
|
2564
|
+
};
|
|
2565
|
+
proto.aggregator.EventTrigger.Config.prototype.clearCooldownSeconds = function() {
|
|
2566
|
+
return jspb.Message.setField(this, 2, void 0);
|
|
2567
|
+
};
|
|
2568
|
+
proto.aggregator.EventTrigger.Config.prototype.hasCooldownSeconds = function() {
|
|
2569
|
+
return jspb.Message.getField(this, 2) != null;
|
|
2570
|
+
};
|
|
2532
2571
|
if (jspb.Message.GENERATE_TO_OBJECT) {
|
|
2533
2572
|
proto.aggregator.EventTrigger.Output.prototype.toObject = function(opt_includeInstance) {
|
|
2534
2573
|
return proto.aggregator.EventTrigger.Output.toObject(opt_includeInstance, this);
|
|
@@ -10870,10 +10909,10 @@ var require_avs_pb = __commonJS({
|
|
|
10870
10909
|
factoryAddress: jspb.Message.getFieldWithDefault(msg, 3, ""),
|
|
10871
10910
|
isHidden: jspb.Message.getBooleanFieldWithDefault(msg, 4, false),
|
|
10872
10911
|
totalTaskCount: jspb.Message.getFieldWithDefault(msg, 5, 0),
|
|
10873
|
-
|
|
10912
|
+
enabledTaskCount: jspb.Message.getFieldWithDefault(msg, 6, 0),
|
|
10874
10913
|
completedTaskCount: jspb.Message.getFieldWithDefault(msg, 7, 0),
|
|
10875
10914
|
failedTaskCount: jspb.Message.getFieldWithDefault(msg, 8, 0),
|
|
10876
|
-
|
|
10915
|
+
disabledTaskCount: jspb.Message.getFieldWithDefault(msg, 9, 0)
|
|
10877
10916
|
};
|
|
10878
10917
|
if (includeInstance) {
|
|
10879
10918
|
obj.$jspbMessageInstance = msg;
|
|
@@ -10933,7 +10972,7 @@ var require_avs_pb = __commonJS({
|
|
|
10933
10972
|
/** @type {number} */
|
|
10934
10973
|
reader.readUint64()
|
|
10935
10974
|
);
|
|
10936
|
-
msg.
|
|
10975
|
+
msg.setEnabledTaskCount(value);
|
|
10937
10976
|
break;
|
|
10938
10977
|
case 7:
|
|
10939
10978
|
var value = (
|
|
@@ -10954,7 +10993,7 @@ var require_avs_pb = __commonJS({
|
|
|
10954
10993
|
/** @type {number} */
|
|
10955
10994
|
reader.readUint64()
|
|
10956
10995
|
);
|
|
10957
|
-
msg.
|
|
10996
|
+
msg.setDisabledTaskCount(value);
|
|
10958
10997
|
break;
|
|
10959
10998
|
default:
|
|
10960
10999
|
reader.skipField();
|
|
@@ -11005,7 +11044,7 @@ var require_avs_pb = __commonJS({
|
|
|
11005
11044
|
f
|
|
11006
11045
|
);
|
|
11007
11046
|
}
|
|
11008
|
-
f = message.
|
|
11047
|
+
f = message.getEnabledTaskCount();
|
|
11009
11048
|
if (f !== 0) {
|
|
11010
11049
|
writer.writeUint64(
|
|
11011
11050
|
6,
|
|
@@ -11026,7 +11065,7 @@ var require_avs_pb = __commonJS({
|
|
|
11026
11065
|
f
|
|
11027
11066
|
);
|
|
11028
11067
|
}
|
|
11029
|
-
f = message.
|
|
11068
|
+
f = message.getDisabledTaskCount();
|
|
11030
11069
|
if (f !== 0) {
|
|
11031
11070
|
writer.writeUint64(
|
|
11032
11071
|
9,
|
|
@@ -11079,13 +11118,13 @@ var require_avs_pb = __commonJS({
|
|
|
11079
11118
|
proto.aggregator.GetWalletResp.prototype.setTotalTaskCount = function(value) {
|
|
11080
11119
|
return jspb.Message.setProto3IntField(this, 5, value);
|
|
11081
11120
|
};
|
|
11082
|
-
proto.aggregator.GetWalletResp.prototype.
|
|
11121
|
+
proto.aggregator.GetWalletResp.prototype.getEnabledTaskCount = function() {
|
|
11083
11122
|
return (
|
|
11084
11123
|
/** @type {number} */
|
|
11085
11124
|
jspb.Message.getFieldWithDefault(this, 6, 0)
|
|
11086
11125
|
);
|
|
11087
11126
|
};
|
|
11088
|
-
proto.aggregator.GetWalletResp.prototype.
|
|
11127
|
+
proto.aggregator.GetWalletResp.prototype.setEnabledTaskCount = function(value) {
|
|
11089
11128
|
return jspb.Message.setProto3IntField(this, 6, value);
|
|
11090
11129
|
};
|
|
11091
11130
|
proto.aggregator.GetWalletResp.prototype.getCompletedTaskCount = function() {
|
|
@@ -11106,13 +11145,13 @@ var require_avs_pb = __commonJS({
|
|
|
11106
11145
|
proto.aggregator.GetWalletResp.prototype.setFailedTaskCount = function(value) {
|
|
11107
11146
|
return jspb.Message.setProto3IntField(this, 8, value);
|
|
11108
11147
|
};
|
|
11109
|
-
proto.aggregator.GetWalletResp.prototype.
|
|
11148
|
+
proto.aggregator.GetWalletResp.prototype.getDisabledTaskCount = function() {
|
|
11110
11149
|
return (
|
|
11111
11150
|
/** @type {number} */
|
|
11112
11151
|
jspb.Message.getFieldWithDefault(this, 9, 0)
|
|
11113
11152
|
);
|
|
11114
11153
|
};
|
|
11115
|
-
proto.aggregator.GetWalletResp.prototype.
|
|
11154
|
+
proto.aggregator.GetWalletResp.prototype.setDisabledTaskCount = function(value) {
|
|
11116
11155
|
return jspb.Message.setProto3IntField(this, 9, value);
|
|
11117
11156
|
};
|
|
11118
11157
|
if (jspb.Message.GENERATE_TO_OBJECT) {
|
|
@@ -13972,17 +14011,105 @@ var require_avs_pb = __commonJS({
|
|
|
13972
14011
|
return jspb.Message.setProto3StringField(this, 6, value);
|
|
13973
14012
|
};
|
|
13974
14013
|
if (jspb.Message.GENERATE_TO_OBJECT) {
|
|
13975
|
-
proto.aggregator.
|
|
13976
|
-
return proto.aggregator.
|
|
14014
|
+
proto.aggregator.SetTaskEnabledReq.prototype.toObject = function(opt_includeInstance) {
|
|
14015
|
+
return proto.aggregator.SetTaskEnabledReq.toObject(opt_includeInstance, this);
|
|
13977
14016
|
};
|
|
13978
|
-
proto.aggregator.
|
|
14017
|
+
proto.aggregator.SetTaskEnabledReq.toObject = function(includeInstance, msg) {
|
|
14018
|
+
var f, obj = {
|
|
14019
|
+
id: jspb.Message.getFieldWithDefault(msg, 1, ""),
|
|
14020
|
+
enabled: jspb.Message.getBooleanFieldWithDefault(msg, 2, false)
|
|
14021
|
+
};
|
|
14022
|
+
if (includeInstance) {
|
|
14023
|
+
obj.$jspbMessageInstance = msg;
|
|
14024
|
+
}
|
|
14025
|
+
return obj;
|
|
14026
|
+
};
|
|
14027
|
+
}
|
|
14028
|
+
proto.aggregator.SetTaskEnabledReq.deserializeBinary = function(bytes) {
|
|
14029
|
+
var reader = new jspb.BinaryReader(bytes);
|
|
14030
|
+
var msg = new proto.aggregator.SetTaskEnabledReq();
|
|
14031
|
+
return proto.aggregator.SetTaskEnabledReq.deserializeBinaryFromReader(msg, reader);
|
|
14032
|
+
};
|
|
14033
|
+
proto.aggregator.SetTaskEnabledReq.deserializeBinaryFromReader = function(msg, reader) {
|
|
14034
|
+
while (reader.nextField()) {
|
|
14035
|
+
if (reader.isEndGroup()) {
|
|
14036
|
+
break;
|
|
14037
|
+
}
|
|
14038
|
+
var field = reader.getFieldNumber();
|
|
14039
|
+
switch (field) {
|
|
14040
|
+
case 1:
|
|
14041
|
+
var value = (
|
|
14042
|
+
/** @type {string} */
|
|
14043
|
+
reader.readString()
|
|
14044
|
+
);
|
|
14045
|
+
msg.setId(value);
|
|
14046
|
+
break;
|
|
14047
|
+
case 2:
|
|
14048
|
+
var value = (
|
|
14049
|
+
/** @type {boolean} */
|
|
14050
|
+
reader.readBool()
|
|
14051
|
+
);
|
|
14052
|
+
msg.setEnabled(value);
|
|
14053
|
+
break;
|
|
14054
|
+
default:
|
|
14055
|
+
reader.skipField();
|
|
14056
|
+
break;
|
|
14057
|
+
}
|
|
14058
|
+
}
|
|
14059
|
+
return msg;
|
|
14060
|
+
};
|
|
14061
|
+
proto.aggregator.SetTaskEnabledReq.prototype.serializeBinary = function() {
|
|
14062
|
+
var writer = new jspb.BinaryWriter();
|
|
14063
|
+
proto.aggregator.SetTaskEnabledReq.serializeBinaryToWriter(this, writer);
|
|
14064
|
+
return writer.getResultBuffer();
|
|
14065
|
+
};
|
|
14066
|
+
proto.aggregator.SetTaskEnabledReq.serializeBinaryToWriter = function(message, writer) {
|
|
14067
|
+
var f = void 0;
|
|
14068
|
+
f = message.getId();
|
|
14069
|
+
if (f.length > 0) {
|
|
14070
|
+
writer.writeString(
|
|
14071
|
+
1,
|
|
14072
|
+
f
|
|
14073
|
+
);
|
|
14074
|
+
}
|
|
14075
|
+
f = message.getEnabled();
|
|
14076
|
+
if (f) {
|
|
14077
|
+
writer.writeBool(
|
|
14078
|
+
2,
|
|
14079
|
+
f
|
|
14080
|
+
);
|
|
14081
|
+
}
|
|
14082
|
+
};
|
|
14083
|
+
proto.aggregator.SetTaskEnabledReq.prototype.getId = function() {
|
|
14084
|
+
return (
|
|
14085
|
+
/** @type {string} */
|
|
14086
|
+
jspb.Message.getFieldWithDefault(this, 1, "")
|
|
14087
|
+
);
|
|
14088
|
+
};
|
|
14089
|
+
proto.aggregator.SetTaskEnabledReq.prototype.setId = function(value) {
|
|
14090
|
+
return jspb.Message.setProto3StringField(this, 1, value);
|
|
14091
|
+
};
|
|
14092
|
+
proto.aggregator.SetTaskEnabledReq.prototype.getEnabled = function() {
|
|
14093
|
+
return (
|
|
14094
|
+
/** @type {boolean} */
|
|
14095
|
+
jspb.Message.getBooleanFieldWithDefault(this, 2, false)
|
|
14096
|
+
);
|
|
14097
|
+
};
|
|
14098
|
+
proto.aggregator.SetTaskEnabledReq.prototype.setEnabled = function(value) {
|
|
14099
|
+
return jspb.Message.setProto3BooleanField(this, 2, value);
|
|
14100
|
+
};
|
|
14101
|
+
if (jspb.Message.GENERATE_TO_OBJECT) {
|
|
14102
|
+
proto.aggregator.SetTaskEnabledResp.prototype.toObject = function(opt_includeInstance) {
|
|
14103
|
+
return proto.aggregator.SetTaskEnabledResp.toObject(opt_includeInstance, this);
|
|
14104
|
+
};
|
|
14105
|
+
proto.aggregator.SetTaskEnabledResp.toObject = function(includeInstance, msg) {
|
|
13979
14106
|
var f, obj = {
|
|
13980
14107
|
success: jspb.Message.getBooleanFieldWithDefault(msg, 1, false),
|
|
13981
14108
|
status: jspb.Message.getFieldWithDefault(msg, 2, ""),
|
|
13982
14109
|
message: jspb.Message.getFieldWithDefault(msg, 3, ""),
|
|
13983
|
-
|
|
13984
|
-
|
|
13985
|
-
|
|
14110
|
+
id: jspb.Message.getFieldWithDefault(msg, 4, ""),
|
|
14111
|
+
previousStatus: jspb.Message.getFieldWithDefault(msg, 5, ""),
|
|
14112
|
+
updatedAt: jspb.Message.getFieldWithDefault(msg, 6, 0)
|
|
13986
14113
|
};
|
|
13987
14114
|
if (includeInstance) {
|
|
13988
14115
|
obj.$jspbMessageInstance = msg;
|
|
@@ -13990,12 +14117,12 @@ var require_avs_pb = __commonJS({
|
|
|
13990
14117
|
return obj;
|
|
13991
14118
|
};
|
|
13992
14119
|
}
|
|
13993
|
-
proto.aggregator.
|
|
14120
|
+
proto.aggregator.SetTaskEnabledResp.deserializeBinary = function(bytes) {
|
|
13994
14121
|
var reader = new jspb.BinaryReader(bytes);
|
|
13995
|
-
var msg = new proto.aggregator.
|
|
13996
|
-
return proto.aggregator.
|
|
14122
|
+
var msg = new proto.aggregator.SetTaskEnabledResp();
|
|
14123
|
+
return proto.aggregator.SetTaskEnabledResp.deserializeBinaryFromReader(msg, reader);
|
|
13997
14124
|
};
|
|
13998
|
-
proto.aggregator.
|
|
14125
|
+
proto.aggregator.SetTaskEnabledResp.deserializeBinaryFromReader = function(msg, reader) {
|
|
13999
14126
|
while (reader.nextField()) {
|
|
14000
14127
|
if (reader.isEndGroup()) {
|
|
14001
14128
|
break;
|
|
@@ -14025,24 +14152,24 @@ var require_avs_pb = __commonJS({
|
|
|
14025
14152
|
break;
|
|
14026
14153
|
case 4:
|
|
14027
14154
|
var value = (
|
|
14028
|
-
/** @type {
|
|
14029
|
-
reader.
|
|
14155
|
+
/** @type {string} */
|
|
14156
|
+
reader.readString()
|
|
14030
14157
|
);
|
|
14031
|
-
msg.
|
|
14158
|
+
msg.setId(value);
|
|
14032
14159
|
break;
|
|
14033
14160
|
case 5:
|
|
14034
14161
|
var value = (
|
|
14035
14162
|
/** @type {string} */
|
|
14036
14163
|
reader.readString()
|
|
14037
14164
|
);
|
|
14038
|
-
msg.
|
|
14165
|
+
msg.setPreviousStatus(value);
|
|
14039
14166
|
break;
|
|
14040
14167
|
case 6:
|
|
14041
14168
|
var value = (
|
|
14042
|
-
/** @type {
|
|
14043
|
-
reader.
|
|
14169
|
+
/** @type {number} */
|
|
14170
|
+
reader.readInt64()
|
|
14044
14171
|
);
|
|
14045
|
-
msg.
|
|
14172
|
+
msg.setUpdatedAt(value);
|
|
14046
14173
|
break;
|
|
14047
14174
|
default:
|
|
14048
14175
|
reader.skipField();
|
|
@@ -14051,12 +14178,12 @@ var require_avs_pb = __commonJS({
|
|
|
14051
14178
|
}
|
|
14052
14179
|
return msg;
|
|
14053
14180
|
};
|
|
14054
|
-
proto.aggregator.
|
|
14181
|
+
proto.aggregator.SetTaskEnabledResp.prototype.serializeBinary = function() {
|
|
14055
14182
|
var writer = new jspb.BinaryWriter();
|
|
14056
|
-
proto.aggregator.
|
|
14183
|
+
proto.aggregator.SetTaskEnabledResp.serializeBinaryToWriter(this, writer);
|
|
14057
14184
|
return writer.getResultBuffer();
|
|
14058
14185
|
};
|
|
14059
|
-
proto.aggregator.
|
|
14186
|
+
proto.aggregator.SetTaskEnabledResp.serializeBinaryToWriter = function(message, writer) {
|
|
14060
14187
|
var f = void 0;
|
|
14061
14188
|
f = message.getSuccess();
|
|
14062
14189
|
if (f) {
|
|
@@ -14079,81 +14206,81 @@ var require_avs_pb = __commonJS({
|
|
|
14079
14206
|
f
|
|
14080
14207
|
);
|
|
14081
14208
|
}
|
|
14082
|
-
f = message.
|
|
14083
|
-
if (f
|
|
14084
|
-
writer.
|
|
14209
|
+
f = message.getId();
|
|
14210
|
+
if (f.length > 0) {
|
|
14211
|
+
writer.writeString(
|
|
14085
14212
|
4,
|
|
14086
14213
|
f
|
|
14087
14214
|
);
|
|
14088
14215
|
}
|
|
14089
|
-
f = message.
|
|
14216
|
+
f = message.getPreviousStatus();
|
|
14090
14217
|
if (f.length > 0) {
|
|
14091
14218
|
writer.writeString(
|
|
14092
14219
|
5,
|
|
14093
14220
|
f
|
|
14094
14221
|
);
|
|
14095
14222
|
}
|
|
14096
|
-
f = message.
|
|
14097
|
-
if (f
|
|
14098
|
-
writer.
|
|
14223
|
+
f = message.getUpdatedAt();
|
|
14224
|
+
if (f !== 0) {
|
|
14225
|
+
writer.writeInt64(
|
|
14099
14226
|
6,
|
|
14100
14227
|
f
|
|
14101
14228
|
);
|
|
14102
14229
|
}
|
|
14103
14230
|
};
|
|
14104
|
-
proto.aggregator.
|
|
14231
|
+
proto.aggregator.SetTaskEnabledResp.prototype.getSuccess = function() {
|
|
14105
14232
|
return (
|
|
14106
14233
|
/** @type {boolean} */
|
|
14107
14234
|
jspb.Message.getBooleanFieldWithDefault(this, 1, false)
|
|
14108
14235
|
);
|
|
14109
14236
|
};
|
|
14110
|
-
proto.aggregator.
|
|
14237
|
+
proto.aggregator.SetTaskEnabledResp.prototype.setSuccess = function(value) {
|
|
14111
14238
|
return jspb.Message.setProto3BooleanField(this, 1, value);
|
|
14112
14239
|
};
|
|
14113
|
-
proto.aggregator.
|
|
14240
|
+
proto.aggregator.SetTaskEnabledResp.prototype.getStatus = function() {
|
|
14114
14241
|
return (
|
|
14115
14242
|
/** @type {string} */
|
|
14116
14243
|
jspb.Message.getFieldWithDefault(this, 2, "")
|
|
14117
14244
|
);
|
|
14118
14245
|
};
|
|
14119
|
-
proto.aggregator.
|
|
14246
|
+
proto.aggregator.SetTaskEnabledResp.prototype.setStatus = function(value) {
|
|
14120
14247
|
return jspb.Message.setProto3StringField(this, 2, value);
|
|
14121
14248
|
};
|
|
14122
|
-
proto.aggregator.
|
|
14249
|
+
proto.aggregator.SetTaskEnabledResp.prototype.getMessage = function() {
|
|
14123
14250
|
return (
|
|
14124
14251
|
/** @type {string} */
|
|
14125
14252
|
jspb.Message.getFieldWithDefault(this, 3, "")
|
|
14126
14253
|
);
|
|
14127
14254
|
};
|
|
14128
|
-
proto.aggregator.
|
|
14255
|
+
proto.aggregator.SetTaskEnabledResp.prototype.setMessage = function(value) {
|
|
14129
14256
|
return jspb.Message.setProto3StringField(this, 3, value);
|
|
14130
14257
|
};
|
|
14131
|
-
proto.aggregator.
|
|
14258
|
+
proto.aggregator.SetTaskEnabledResp.prototype.getId = function() {
|
|
14132
14259
|
return (
|
|
14133
|
-
/** @type {
|
|
14134
|
-
jspb.Message.getFieldWithDefault(this, 4,
|
|
14260
|
+
/** @type {string} */
|
|
14261
|
+
jspb.Message.getFieldWithDefault(this, 4, "")
|
|
14135
14262
|
);
|
|
14136
14263
|
};
|
|
14137
|
-
proto.aggregator.
|
|
14138
|
-
return jspb.Message.
|
|
14264
|
+
proto.aggregator.SetTaskEnabledResp.prototype.setId = function(value) {
|
|
14265
|
+
return jspb.Message.setProto3StringField(this, 4, value);
|
|
14139
14266
|
};
|
|
14140
|
-
proto.aggregator.
|
|
14267
|
+
proto.aggregator.SetTaskEnabledResp.prototype.getPreviousStatus = function() {
|
|
14141
14268
|
return (
|
|
14142
14269
|
/** @type {string} */
|
|
14143
14270
|
jspb.Message.getFieldWithDefault(this, 5, "")
|
|
14144
14271
|
);
|
|
14145
14272
|
};
|
|
14146
|
-
proto.aggregator.
|
|
14273
|
+
proto.aggregator.SetTaskEnabledResp.prototype.setPreviousStatus = function(value) {
|
|
14147
14274
|
return jspb.Message.setProto3StringField(this, 5, value);
|
|
14148
14275
|
};
|
|
14149
|
-
proto.aggregator.
|
|
14276
|
+
proto.aggregator.SetTaskEnabledResp.prototype.getUpdatedAt = function() {
|
|
14150
14277
|
return (
|
|
14151
|
-
/** @type {
|
|
14152
|
-
jspb.Message.getFieldWithDefault(this, 6,
|
|
14278
|
+
/** @type {number} */
|
|
14279
|
+
jspb.Message.getFieldWithDefault(this, 6, 0)
|
|
14153
14280
|
);
|
|
14154
14281
|
};
|
|
14155
|
-
proto.aggregator.
|
|
14156
|
-
return jspb.Message.
|
|
14282
|
+
proto.aggregator.SetTaskEnabledResp.prototype.setUpdatedAt = function(value) {
|
|
14283
|
+
return jspb.Message.setProto3IntField(this, 6, value);
|
|
14157
14284
|
};
|
|
14158
14285
|
proto.aggregator.GetWorkflowCountReq.repeatedFields_ = [1];
|
|
14159
14286
|
if (jspb.Message.GENERATE_TO_OBJECT) {
|
|
@@ -17844,11 +17971,11 @@ var require_avs_pb = __commonJS({
|
|
|
17844
17971
|
INSUFFICIENT_BALANCE: 8003
|
|
17845
17972
|
};
|
|
17846
17973
|
proto.aggregator.TaskStatus = {
|
|
17847
|
-
|
|
17974
|
+
ENABLED: 0,
|
|
17848
17975
|
COMPLETED: 1,
|
|
17849
17976
|
FAILED: 2,
|
|
17850
|
-
|
|
17851
|
-
|
|
17977
|
+
RUNNING: 4,
|
|
17978
|
+
DISABLED: 5
|
|
17852
17979
|
};
|
|
17853
17980
|
proto.aggregator.ExecutionStatus = {
|
|
17854
17981
|
EXECUTION_STATUS_UNSPECIFIED: 0,
|
|
@@ -17868,15 +17995,6 @@ var require_avs_grpc_pb = __commonJS({
|
|
|
17868
17995
|
var grpc = __require("@grpc/grpc-js");
|
|
17869
17996
|
var avs_pb25 = require_avs_pb();
|
|
17870
17997
|
var google_protobuf_struct_pb4 = __require("google-protobuf/google/protobuf/struct_pb.js");
|
|
17871
|
-
function serialize_aggregator_CancelTaskResp(arg) {
|
|
17872
|
-
if (!(arg instanceof avs_pb25.CancelTaskResp)) {
|
|
17873
|
-
throw new Error("Expected argument of type aggregator.CancelTaskResp");
|
|
17874
|
-
}
|
|
17875
|
-
return Buffer.from(arg.serializeBinary());
|
|
17876
|
-
}
|
|
17877
|
-
function deserialize_aggregator_CancelTaskResp(buffer_arg) {
|
|
17878
|
-
return avs_pb25.CancelTaskResp.deserializeBinary(new Uint8Array(buffer_arg));
|
|
17879
|
-
}
|
|
17880
17998
|
function serialize_aggregator_CreateOrUpdateSecretReq(arg) {
|
|
17881
17999
|
if (!(arg instanceof avs_pb25.CreateOrUpdateSecretReq)) {
|
|
17882
18000
|
throw new Error("Expected argument of type aggregator.CreateOrUpdateSecretReq");
|
|
@@ -18246,6 +18364,24 @@ var require_avs_grpc_pb = __commonJS({
|
|
|
18246
18364
|
function deserialize_aggregator_RunTriggerResp(buffer_arg) {
|
|
18247
18365
|
return avs_pb25.RunTriggerResp.deserializeBinary(new Uint8Array(buffer_arg));
|
|
18248
18366
|
}
|
|
18367
|
+
function serialize_aggregator_SetTaskEnabledReq(arg) {
|
|
18368
|
+
if (!(arg instanceof avs_pb25.SetTaskEnabledReq)) {
|
|
18369
|
+
throw new Error("Expected argument of type aggregator.SetTaskEnabledReq");
|
|
18370
|
+
}
|
|
18371
|
+
return Buffer.from(arg.serializeBinary());
|
|
18372
|
+
}
|
|
18373
|
+
function deserialize_aggregator_SetTaskEnabledReq(buffer_arg) {
|
|
18374
|
+
return avs_pb25.SetTaskEnabledReq.deserializeBinary(new Uint8Array(buffer_arg));
|
|
18375
|
+
}
|
|
18376
|
+
function serialize_aggregator_SetTaskEnabledResp(arg) {
|
|
18377
|
+
if (!(arg instanceof avs_pb25.SetTaskEnabledResp)) {
|
|
18378
|
+
throw new Error("Expected argument of type aggregator.SetTaskEnabledResp");
|
|
18379
|
+
}
|
|
18380
|
+
return Buffer.from(arg.serializeBinary());
|
|
18381
|
+
}
|
|
18382
|
+
function deserialize_aggregator_SetTaskEnabledResp(buffer_arg) {
|
|
18383
|
+
return avs_pb25.SetTaskEnabledResp.deserializeBinary(new Uint8Array(buffer_arg));
|
|
18384
|
+
}
|
|
18249
18385
|
function serialize_aggregator_SetWalletReq(arg) {
|
|
18250
18386
|
if (!(arg instanceof avs_pb25.SetWalletReq)) {
|
|
18251
18387
|
throw new Error("Expected argument of type aggregator.SetWalletReq");
|
|
@@ -18467,16 +18603,16 @@ var require_avs_grpc_pb = __commonJS({
|
|
|
18467
18603
|
responseSerialize: serialize_aggregator_ExecutionStatusResp,
|
|
18468
18604
|
responseDeserialize: deserialize_aggregator_ExecutionStatusResp
|
|
18469
18605
|
},
|
|
18470
|
-
|
|
18471
|
-
path: "/aggregator.Aggregator/
|
|
18606
|
+
setTaskEnabled: {
|
|
18607
|
+
path: "/aggregator.Aggregator/SetTaskEnabled",
|
|
18472
18608
|
requestStream: false,
|
|
18473
18609
|
responseStream: false,
|
|
18474
|
-
requestType: avs_pb25.
|
|
18475
|
-
responseType: avs_pb25.
|
|
18476
|
-
requestSerialize:
|
|
18477
|
-
requestDeserialize:
|
|
18478
|
-
responseSerialize:
|
|
18479
|
-
responseDeserialize:
|
|
18610
|
+
requestType: avs_pb25.SetTaskEnabledReq,
|
|
18611
|
+
responseType: avs_pb25.SetTaskEnabledResp,
|
|
18612
|
+
requestSerialize: serialize_aggregator_SetTaskEnabledReq,
|
|
18613
|
+
requestDeserialize: deserialize_aggregator_SetTaskEnabledReq,
|
|
18614
|
+
responseSerialize: serialize_aggregator_SetTaskEnabledResp,
|
|
18615
|
+
responseDeserialize: deserialize_aggregator_SetTaskEnabledResp
|
|
18480
18616
|
},
|
|
18481
18617
|
deleteTask: {
|
|
18482
18618
|
path: "/aggregator.Aggregator/DeleteTask",
|
|
@@ -19164,6 +19300,9 @@ var EventTrigger2 = class _EventTrigger extends Trigger {
|
|
|
19164
19300
|
return query;
|
|
19165
19301
|
});
|
|
19166
19302
|
config.setQueriesList(queryMessages);
|
|
19303
|
+
if (dataConfig.cooldownSeconds !== void 0) {
|
|
19304
|
+
config.setCooldownSeconds(dataConfig.cooldownSeconds);
|
|
19305
|
+
}
|
|
19167
19306
|
trigger.setConfig(config);
|
|
19168
19307
|
request.setEvent(trigger);
|
|
19169
19308
|
return request;
|
|
@@ -19188,9 +19327,7 @@ var EventTrigger2 = class _EventTrigger extends Trigger {
|
|
|
19188
19327
|
queryData.addresses = query.getAddressesList();
|
|
19189
19328
|
}
|
|
19190
19329
|
if (query.getTopicsList && query.getTopicsList().length > 0) {
|
|
19191
|
-
queryData.topics = query.getTopicsList().map(
|
|
19192
|
-
(topic) => topic === "" ? null : topic
|
|
19193
|
-
);
|
|
19330
|
+
queryData.topics = query.getTopicsList().map((topic) => topic === "" ? null : topic);
|
|
19194
19331
|
}
|
|
19195
19332
|
const maxEvents = query.getMaxEventsPerBlock();
|
|
19196
19333
|
if (maxEvents && maxEvents > 0) {
|
|
@@ -19221,6 +19358,9 @@ var EventTrigger2 = class _EventTrigger extends Trigger {
|
|
|
19221
19358
|
});
|
|
19222
19359
|
}
|
|
19223
19360
|
data = { queries };
|
|
19361
|
+
if (config.hasCooldownSeconds()) {
|
|
19362
|
+
data.cooldownSeconds = config.getCooldownSeconds();
|
|
19363
|
+
}
|
|
19224
19364
|
}
|
|
19225
19365
|
}
|
|
19226
19366
|
return new _EventTrigger({
|
|
@@ -20503,14 +20643,21 @@ var factory_default2 = NodeFactory;
|
|
|
20503
20643
|
// src/models/workflow.ts
|
|
20504
20644
|
import { WorkflowStatus } from "@avaprotocol/types";
|
|
20505
20645
|
function convertStatusToString(status2) {
|
|
20506
|
-
|
|
20507
|
-
|
|
20508
|
-
|
|
20509
|
-
|
|
20510
|
-
|
|
20511
|
-
|
|
20512
|
-
|
|
20513
|
-
|
|
20646
|
+
switch (status2) {
|
|
20647
|
+
case avs_pb20.TaskStatus.ENABLED:
|
|
20648
|
+
return WorkflowStatus.Enabled;
|
|
20649
|
+
case avs_pb20.TaskStatus.COMPLETED:
|
|
20650
|
+
return WorkflowStatus.Completed;
|
|
20651
|
+
case avs_pb20.TaskStatus.FAILED:
|
|
20652
|
+
return WorkflowStatus.Failed;
|
|
20653
|
+
case avs_pb20.TaskStatus.RUNNING:
|
|
20654
|
+
return WorkflowStatus.Running;
|
|
20655
|
+
case avs_pb20.TaskStatus.DISABLED:
|
|
20656
|
+
return WorkflowStatus.Disabled;
|
|
20657
|
+
default: {
|
|
20658
|
+
throw new Error(`Unknown TaskStatus: ${status2}`);
|
|
20659
|
+
}
|
|
20660
|
+
}
|
|
20514
20661
|
}
|
|
20515
20662
|
var Workflow = class _Workflow {
|
|
20516
20663
|
/**
|
|
@@ -21274,12 +21421,17 @@ var Client = class extends BaseClient {
|
|
|
21274
21421
|
/**
|
|
21275
21422
|
* Get the list of smart wallets; new wallets can be added to the list by calling `getWallet`
|
|
21276
21423
|
* @param {RequestOptions} options - Request options
|
|
21277
|
-
* @returns {Promise<SmartWallet[]>} - The list of SmartWallet objects
|
|
21424
|
+
* @returns {Promise<SmartWallet[]>} - The list of SmartWallet objects, sorted by salt
|
|
21278
21425
|
*/
|
|
21279
21426
|
async getWallets(options) {
|
|
21280
21427
|
const request = new avs_pb24.ListWalletReq();
|
|
21281
21428
|
const result = await this.sendGrpcRequest("listWallets", request, options);
|
|
21282
|
-
|
|
21429
|
+
const wallets = result.getItemsList().map((item) => item.toObject());
|
|
21430
|
+
return wallets.sort((a, b) => {
|
|
21431
|
+
const saltA = a.salt || "";
|
|
21432
|
+
const saltB = b.salt || "";
|
|
21433
|
+
return saltA.localeCompare(saltB);
|
|
21434
|
+
});
|
|
21283
21435
|
}
|
|
21284
21436
|
/**
|
|
21285
21437
|
* Add a new smart wallet address to the wallet list
|
|
@@ -21303,10 +21455,10 @@ var Client = class extends BaseClient {
|
|
|
21303
21455
|
factory: result.getFactoryAddress(),
|
|
21304
21456
|
isHidden: result.getIsHidden(),
|
|
21305
21457
|
totalTaskCount: result.getTotalTaskCount(),
|
|
21306
|
-
|
|
21458
|
+
enabledTaskCount: result.getEnabledTaskCount(),
|
|
21307
21459
|
completedTaskCount: result.getCompletedTaskCount(),
|
|
21308
21460
|
failedTaskCount: result.getFailedTaskCount(),
|
|
21309
|
-
|
|
21461
|
+
disabledTaskCount: result.getDisabledTaskCount()
|
|
21310
21462
|
};
|
|
21311
21463
|
}
|
|
21312
21464
|
/**
|
|
@@ -21333,17 +21485,17 @@ var Client = class extends BaseClient {
|
|
|
21333
21485
|
factory: result.getFactoryAddress(),
|
|
21334
21486
|
isHidden: result.getIsHidden(),
|
|
21335
21487
|
totalTaskCount: result.getTotalTaskCount(),
|
|
21336
|
-
|
|
21488
|
+
enabledTaskCount: result.getEnabledTaskCount(),
|
|
21337
21489
|
completedTaskCount: result.getCompletedTaskCount(),
|
|
21338
21490
|
failedTaskCount: result.getFailedTaskCount(),
|
|
21339
|
-
|
|
21491
|
+
disabledTaskCount: result.getDisabledTaskCount()
|
|
21340
21492
|
};
|
|
21341
21493
|
}
|
|
21342
21494
|
/**
|
|
21343
21495
|
* Withdraw funds from a smart wallet using UserOp
|
|
21344
21496
|
* @param {WithdrawFundsRequest} withdrawRequest - The withdraw request parameters
|
|
21345
21497
|
* @param {string} withdrawRequest.recipientAddress - The recipient address to send funds to
|
|
21346
|
-
* @param {string} withdrawRequest.amount - The amount to withdraw in wei for ETH or smallest token unit for ERC20
|
|
21498
|
+
* @param {string} withdrawRequest.amount - The amount to withdraw in wei for ETH or smallest token unit for ERC20. Use "max" to withdraw maximum available balance
|
|
21347
21499
|
* @param {string} withdrawRequest.token - Token type: "ETH" for native ETH, or contract address for ERC20 tokens
|
|
21348
21500
|
* @param {string} withdrawRequest.smartWalletAddress - Required: Smart wallet address to withdraw from (must be from user's getWallet() call)
|
|
21349
21501
|
* @param {RequestOptions} options - Request options
|
|
@@ -21706,20 +21858,22 @@ var Client = class extends BaseClient {
|
|
|
21706
21858
|
return response;
|
|
21707
21859
|
}
|
|
21708
21860
|
/**
|
|
21709
|
-
*
|
|
21861
|
+
* Set workflow active state (activate/deactivate)
|
|
21710
21862
|
* @param {string} id - The workflow id
|
|
21863
|
+
* @param {boolean} enabled - Desired enabled state (true=enable, false=disable)
|
|
21711
21864
|
* @param {RequestOptions} options - Request options
|
|
21712
|
-
* @returns {Promise<
|
|
21865
|
+
* @returns {Promise<SetTaskEnabledResponse>} - The response from updating the workflow state
|
|
21713
21866
|
*/
|
|
21714
|
-
async
|
|
21715
|
-
const request = new avs_pb24.
|
|
21867
|
+
async setWorkflowEnabled(id, enabled, options) {
|
|
21868
|
+
const request = new avs_pb24.SetTaskEnabledReq();
|
|
21716
21869
|
request.setId(id);
|
|
21717
|
-
|
|
21870
|
+
request.setEnabled(enabled);
|
|
21871
|
+
const result = await this.sendGrpcRequest("setTaskEnabled", request, options);
|
|
21718
21872
|
return {
|
|
21719
21873
|
success: result.getSuccess(),
|
|
21720
21874
|
status: result.getStatus(),
|
|
21721
21875
|
message: result.getMessage(),
|
|
21722
|
-
|
|
21876
|
+
updatedAt: result.getUpdatedAt() || void 0,
|
|
21723
21877
|
id: result.getId(),
|
|
21724
21878
|
previousStatus: result.getPreviousStatus()
|
|
21725
21879
|
};
|